diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e38abcf7d794..6359137973e2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -792,3 +792,9 @@ # Client generation tooling /eng/templates/Azure.ServiceTemplate.Template @chunyu3 @lirenhe + +# PRLabel: %Cognitive - Content Safety +/sdk/contentsafety/ @bowgong @mengaims + +# ServiceLabel: %Cognitive - Content Safety %Service Attention +/sdk/contentsafety/Azure.AI.ContentSafety/ @bowgong @mengaims \ No newline at end of file diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/Azure.AI.ContentSafety.sln b/sdk/contentsafety/Azure.AI.ContentSafety/Azure.AI.ContentSafety.sln new file mode 100644 index 000000000000..2ad525a0e29c --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/Azure.AI.ContentSafety.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33502.453 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.AI.ContentSafety.Perf", "perf\Azure.AI.ContentSafety.Perf.csproj", "{30C5FF85-655A-49FC-A324-16438130FF3F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.AI.ContentSafety.Tests", "tests\Azure.AI.ContentSafety.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.AI.ContentSafety", "src\Azure.AI.ContentSafety.csproj", "{D57E62A5-01D2-4D1E-8E10-2A66345F38CD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU + {30C5FF85-655A-49FC-A324-16438130FF3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30C5FF85-655A-49FC-A324-16438130FF3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30C5FF85-655A-49FC-A324-16438130FF3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30C5FF85-655A-49FC-A324-16438130FF3F}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + {D57E62A5-01D2-4D1E-8E10-2A66345F38CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D57E62A5-01D2-4D1E-8E10-2A66345F38CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D57E62A5-01D2-4D1E-8E10-2A66345F38CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D57E62A5-01D2-4D1E-8E10-2A66345F38CD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/CHANGELOG.md b/sdk/contentsafety/Azure.AI.ContentSafety/CHANGELOG.md new file mode 100644 index 000000000000..eb08e4a4d10a --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2023-05-22) + +- Initial version diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/Directory.Build.props b/sdk/contentsafety/Azure.AI.ContentSafety/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/README.md b/sdk/contentsafety/Azure.AI.ContentSafety/README.md new file mode 100644 index 000000000000..1bf9c8a8fd7e --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/README.md @@ -0,0 +1,87 @@ +# Azure ContentSafety client library for .NET + +This section should give out brief introduction of the client library. + +* First sentence: **Describe the service** briefly. You can usually use the first line of the service's docs landing page for this (Example: [Cosmos DB docs landing page](https://docs.microsoft.com/azure/cosmos-db/)). +* Next, add a **bulleted list** of the **most common tasks** supported by the package or library, prefaced with "Use the client library for [Product Name] to:". Then, provide code snippets for these tasks in the [Examples](#examples) section later in the document. Keep the task list short but include those tasks most developers need to perform with your package. + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/contentsafety/Azure.AI.ContentSafety) | [Package (NuGet)](https://www.nuget.org) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository. + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.AI --prerelease +``` + +### Prerequisites + +Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB: + +> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. + +### Authenticate the client + +If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating. + +For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object. + +## Key concepts + +The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity. + +Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of: + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples). + +### + +You can create a client and call the client's `` method. + +## Troubleshooting + +Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery. + +Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API. + +If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code. + +## Next steps + +* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory. +* If appropriate, point users to other packages that might be useful. +* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for. + +## Contributing + +This is a template, but your SDK readme should include details on how to contribute code to the repo/package. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk//Azure.AI/README.png) diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.netstandard2.0.cs b/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.netstandard2.0.cs new file mode 100644 index 000000000000..20751e206f4d --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.netstandard2.0.cs @@ -0,0 +1,194 @@ +namespace Azure.AI.ContentSafety +{ + public partial class AddBlockItemsOptions + { + public AddBlockItemsOptions(System.Collections.Generic.IEnumerable blockItems) { } + public System.Collections.Generic.IList BlockItems { get { throw null; } } + } + public partial class AddBlockItemsResult + { + internal AddBlockItemsResult() { } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class AnalyzeImageOptions + { + public AnalyzeImageOptions(Azure.AI.ContentSafety.ImageData image) { } + public System.Collections.Generic.IList Categories { get { throw null; } } + public Azure.AI.ContentSafety.ImageData Image { get { throw null; } } + } + public partial class AnalyzeImageResult + { + internal AnalyzeImageResult() { } + public Azure.AI.ContentSafety.ImageAnalyzeSeverityResult HateResult { get { throw null; } } + public Azure.AI.ContentSafety.ImageAnalyzeSeverityResult SelfHarmResult { get { throw null; } } + public Azure.AI.ContentSafety.ImageAnalyzeSeverityResult SexualResult { get { throw null; } } + public Azure.AI.ContentSafety.ImageAnalyzeSeverityResult ViolenceResult { get { throw null; } } + } + public partial class AnalyzeTextOptions + { + public AnalyzeTextOptions(string text) { } + public System.Collections.Generic.IList BlocklistNames { get { throw null; } } + public bool? BreakByBlocklists { get { throw null; } set { } } + public System.Collections.Generic.IList Categories { get { throw null; } } + public string Text { get { throw null; } } + } + public partial class AnalyzeTextResult + { + internal AnalyzeTextResult() { } + public System.Collections.Generic.IReadOnlyList BlocklistsMatchResults { get { throw null; } } + public Azure.AI.ContentSafety.TextAnalyzeSeverityResult HateResult { get { throw null; } } + public Azure.AI.ContentSafety.TextAnalyzeSeverityResult SelfHarmResult { get { throw null; } } + public Azure.AI.ContentSafety.TextAnalyzeSeverityResult SexualResult { get { throw null; } } + public Azure.AI.ContentSafety.TextAnalyzeSeverityResult ViolenceResult { get { throw null; } } + } + public partial class ContentSafetyClient + { + protected ContentSafetyClient() { } + public ContentSafetyClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public ContentSafetyClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.ContentSafety.ContentSafetyClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response AddBlockItems(string blocklistName, Azure.AI.ContentSafety.AddBlockItemsOptions addBlockItemsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddBlockItems(string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> AddBlockItemsAsync(string blocklistName, Azure.AI.ContentSafety.AddBlockItemsOptions addBlockItemsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AddBlockItemsAsync(string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response AnalyzeImage(Azure.AI.ContentSafety.AnalyzeImageOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AnalyzeImage(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> AnalyzeImageAsync(Azure.AI.ContentSafety.AnalyzeImageOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AnalyzeImageAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response AnalyzeText(Azure.AI.ContentSafety.AnalyzeTextOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AnalyzeText(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> AnalyzeTextAsync(Azure.AI.ContentSafety.AnalyzeTextOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AnalyzeTextAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateOrUpdateTextBlocklist(string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateTextBlocklistAsync(string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTextBlocklist(string blocklistName, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTextBlocklistAsync(string blocklistName, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetTextBlocklist(string blocklistName, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTextBlocklist(string blocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTextBlocklistAsync(string blocklistName, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTextBlocklistAsync(string blocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTextBlocklistItem(string blocklistName, string blockItemId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTextBlocklistItem(string blocklistName, string blockItemId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTextBlocklistItemAsync(string blocklistName, string blockItemId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTextBlocklistItemAsync(string blocklistName, string blockItemId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTextBlocklistItems(string blocklistName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTextBlocklistItems(string blocklistName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTextBlocklistItemsAsync(string blocklistName, int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTextBlocklistItemsAsync(string blocklistName, int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTextBlocklists(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTextBlocklists(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTextBlocklistsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTextBlocklistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveBlockItems(string blocklistName, Azure.AI.ContentSafety.RemoveBlockItemsOptions removeBlockItemsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveBlockItems(string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task RemoveBlockItemsAsync(string blocklistName, Azure.AI.ContentSafety.RemoveBlockItemsOptions removeBlockItemsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RemoveBlockItemsAsync(string blocklistName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class ContentSafetyClientOptions : Azure.Core.ClientOptions + { + public ContentSafetyClientOptions(Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion version = Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion.V2023_04_30_Preview) { } + public enum ServiceVersion + { + V2023_04_30_Preview = 1, + } + } + public partial class ImageAnalyzeSeverityResult + { + internal ImageAnalyzeSeverityResult() { } + public Azure.AI.ContentSafety.ImageCategory Category { get { throw null; } } + public int Severity { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageCategory(string value) { throw null; } + public static Azure.AI.ContentSafety.ImageCategory Hate { get { throw null; } } + public static Azure.AI.ContentSafety.ImageCategory SelfHarm { get { throw null; } } + public static Azure.AI.ContentSafety.ImageCategory Sexual { get { throw null; } } + public static Azure.AI.ContentSafety.ImageCategory Violence { get { throw null; } } + public bool Equals(Azure.AI.ContentSafety.ImageCategory other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.ContentSafety.ImageCategory left, Azure.AI.ContentSafety.ImageCategory right) { throw null; } + public static implicit operator Azure.AI.ContentSafety.ImageCategory (string value) { throw null; } + public static bool operator !=(Azure.AI.ContentSafety.ImageCategory left, Azure.AI.ContentSafety.ImageCategory right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ImageData + { + public ImageData() { } + public string BlobUrl { get { throw null; } set { } } + public System.BinaryData Content { get { throw null; } set { } } + } + public partial class RemoveBlockItemsOptions + { + public RemoveBlockItemsOptions(System.Collections.Generic.IEnumerable blockItemIds) { } + public System.Collections.Generic.IList BlockItemIds { get { throw null; } } + } + public partial class TextAnalyzeSeverityResult + { + internal TextAnalyzeSeverityResult() { } + public Azure.AI.ContentSafety.TextCategory Category { get { throw null; } } + public int Severity { get { throw null; } } + } + public partial class TextBlockItem + { + internal TextBlockItem() { } + public string BlockItemId { get { throw null; } } + public string Description { get { throw null; } } + public string Text { get { throw null; } } + } + public partial class TextBlockItemInfo + { + public TextBlockItemInfo(string text) { } + public string Description { get { throw null; } set { } } + public string Text { get { throw null; } } + } + public partial class TextBlocklist + { + internal TextBlocklist() { } + public string BlocklistName { get { throw null; } } + public string Description { get { throw null; } } + } + public partial class TextBlocklistMatchResult + { + internal TextBlocklistMatchResult() { } + public string BlockItemId { get { throw null; } } + public string BlockItemText { get { throw null; } } + public string BlocklistName { get { throw null; } } + public int Length { get { throw null; } } + public int Offset { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TextCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TextCategory(string value) { throw null; } + public static Azure.AI.ContentSafety.TextCategory Hate { get { throw null; } } + public static Azure.AI.ContentSafety.TextCategory SelfHarm { get { throw null; } } + public static Azure.AI.ContentSafety.TextCategory Sexual { get { throw null; } } + public static Azure.AI.ContentSafety.TextCategory Violence { get { throw null; } } + public bool Equals(Azure.AI.ContentSafety.TextCategory other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.ContentSafety.TextCategory left, Azure.AI.ContentSafety.TextCategory right) { throw null; } + public static implicit operator Azure.AI.ContentSafety.TextCategory (string value) { throw null; } + public static bool operator !=(Azure.AI.ContentSafety.TextCategory left, Azure.AI.ContentSafety.TextCategory right) { throw null; } + public override string ToString() { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class ContentSafetyClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddContentSafetyClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddContentSafetyClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/perf/Azure.AI.ContentSafety.Perf.csproj b/sdk/contentsafety/Azure.AI.ContentSafety/perf/Azure.AI.ContentSafety.Perf.csproj new file mode 100644 index 000000000000..0c5e767a690c --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/perf/Azure.AI.ContentSafety.Perf.csproj @@ -0,0 +1,16 @@ + + + + Exe + + + + + + + + + + + + diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/perf/ClientTest.cs b/sdk/contentsafety/Azure.AI.ContentSafety/perf/ClientTest.cs new file mode 100644 index 000000000000..4d17aed7bfb5 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/perf/ClientTest.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Identity; +using Azure.Test.Perf; +using CommandLine; + +namespace Azure.AI.ContentSafety.Perf +{ + public class ClientTest : PerfTest + { + /* please refer to https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/template/Azure.Template/perf/TemplateClientTest.cs to write perf test. */ + + public ClientTest(ClientPerfOptions options) : base(options) + { + } + public class ClientPerfOptions : PerfOptions + { + } + + public override void Run(CancellationToken cancellationToken) + { + } + + public override async Task RunAsync(CancellationToken cancellationToken) + { + await Task.Run(() => + { + Console.WriteLine("exec some async operation"); + }); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/perf/Program.cs b/sdk/contentsafety/Azure.AI.ContentSafety/perf/Program.cs new file mode 100644 index 000000000000..78a52ddce190 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/perf/Program.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Reflection; +using Azure.Test.Perf; + + await PerfProgram.Main(Assembly.GetEntryAssembly(), args); diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Azure.AI.ContentSafety.csproj b/sdk/contentsafety/Azure.AI.ContentSafety/src/Azure.AI.ContentSafety.csproj new file mode 100644 index 000000000000..7b032997b5b0 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Azure.AI.ContentSafety.csproj @@ -0,0 +1,24 @@ + + + This is the ContentSafety client library for developing .NET applications with rich experience. + Azure SDK Code Generation ContentSafety for Azure Data Plane + 1.0.0-beta.1 + Azure ContentSafety + $(RequiredTargetFrameworks) + true + $(NoWarn);AZC0002 + true + + + + + + + + + + + + + + diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsOptions.Serialization.cs new file mode 100644 index 000000000000..e524744c252d --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsOptions.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class AddBlockItemsOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("blockItems"u8); + writer.WriteStartArray(); + foreach (var item in BlockItems) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsOptions.cs new file mode 100644 index 000000000000..1cf626e27a0e --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsOptions.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// The request of adding blockItems to text blocklist. + public partial class AddBlockItemsOptions + { + /// Initializes a new instance of AddBlockItemsOptions. + /// Array of blockItemInfo to add. + /// is null. + public AddBlockItemsOptions(IEnumerable blockItems) + { + Argument.AssertNotNull(blockItems, nameof(blockItems)); + + BlockItems = blockItems.ToList(); + } + + /// Initializes a new instance of AddBlockItemsOptions. + /// Array of blockItemInfo to add. + internal AddBlockItemsOptions(IList blockItems) + { + BlockItems = blockItems; + } + + /// Array of blockItemInfo to add. + public IList BlockItems { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsResult.Serialization.cs new file mode 100644 index 000000000000..2cc2e19f8267 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsResult.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class AddBlockItemsResult + { + internal static AddBlockItemsResult DeserializeAddBlockItemsResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextBlockItem.DeserializeTextBlockItem(item)); + } + value = array; + continue; + } + } + return new AddBlockItemsResult(Optional.ToList(value)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AddBlockItemsResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAddBlockItemsResult(document.RootElement); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsResult.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsResult.cs new file mode 100644 index 000000000000..cdcc2c531e98 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AddBlockItemsResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// The response of adding blockItems to text blocklist. + public partial class AddBlockItemsResult + { + /// Initializes a new instance of AddBlockItemsResult. + internal AddBlockItemsResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of AddBlockItemsResult. + /// Array of blockItems added. + internal AddBlockItemsResult(IReadOnlyList value) + { + Value = value; + } + + /// Array of blockItems added. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.Serialization.cs new file mode 100644 index 000000000000..0b09ca42ffa6 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class AnalyzeImageOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("image"u8); + writer.WriteObjectValue(Image); + if (Optional.IsCollectionDefined(Categories)) + { + writer.WritePropertyName("categories"u8); + writer.WriteStartArray(); + foreach (var item in Categories) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.cs new file mode 100644 index 000000000000..f997381eee03 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageOptions.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// The analysis request of the image. + public partial class AnalyzeImageOptions + { + /// Initializes a new instance of AnalyzeImageOptions. + /// The image needs to be analyzed. + /// is null. + public AnalyzeImageOptions(ImageData image) + { + Argument.AssertNotNull(image, nameof(image)); + + Image = image; + Categories = new ChangeTrackingList(); + } + + /// Initializes a new instance of AnalyzeImageOptions. + /// The image needs to be analyzed. + /// The categories will be analyzed. If not assigned, a default set of the categories' analysis results will be returned. + internal AnalyzeImageOptions(ImageData image, IList categories) + { + Image = image; + Categories = categories; + } + + /// The image needs to be analyzed. + public ImageData Image { get; } + /// The categories will be analyzed. If not assigned, a default set of the categories' analysis results will be returned. + public IList Categories { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.Serialization.cs new file mode 100644 index 000000000000..0d77db7335eb --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class AnalyzeImageResult + { + internal static AnalyzeImageResult DeserializeAnalyzeImageResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional hateResult = default; + Optional selfHarmResult = default; + Optional sexualResult = default; + Optional violenceResult = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hateResult"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hateResult = ImageAnalyzeSeverityResult.DeserializeImageAnalyzeSeverityResult(property.Value); + continue; + } + if (property.NameEquals("selfHarmResult"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + selfHarmResult = ImageAnalyzeSeverityResult.DeserializeImageAnalyzeSeverityResult(property.Value); + continue; + } + if (property.NameEquals("sexualResult"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sexualResult = ImageAnalyzeSeverityResult.DeserializeImageAnalyzeSeverityResult(property.Value); + continue; + } + if (property.NameEquals("violenceResult"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + violenceResult = ImageAnalyzeSeverityResult.DeserializeImageAnalyzeSeverityResult(property.Value); + continue; + } + } + return new AnalyzeImageResult(hateResult, selfHarmResult, sexualResult, violenceResult); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AnalyzeImageResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzeImageResult(document.RootElement); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.cs new file mode 100644 index 000000000000..45b67ca068c7 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeImageResult.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.ContentSafety +{ + /// The analysis response of the image. + public partial class AnalyzeImageResult + { + /// Initializes a new instance of AnalyzeImageResult. + internal AnalyzeImageResult() + { + } + + /// Initializes a new instance of AnalyzeImageResult. + /// Analysis result for Hate category. + /// Analysis result for SelfHarm category. + /// Analysis result for Sexual category. + /// Analysis result for Violence category. + internal AnalyzeImageResult(ImageAnalyzeSeverityResult hateResult, ImageAnalyzeSeverityResult selfHarmResult, ImageAnalyzeSeverityResult sexualResult, ImageAnalyzeSeverityResult violenceResult) + { + HateResult = hateResult; + SelfHarmResult = selfHarmResult; + SexualResult = sexualResult; + ViolenceResult = violenceResult; + } + + /// Analysis result for Hate category. + public ImageAnalyzeSeverityResult HateResult { get; } + /// Analysis result for SelfHarm category. + public ImageAnalyzeSeverityResult SelfHarmResult { get; } + /// Analysis result for Sexual category. + public ImageAnalyzeSeverityResult SexualResult { get; } + /// Analysis result for Violence category. + public ImageAnalyzeSeverityResult ViolenceResult { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.Serialization.cs new file mode 100644 index 000000000000..e3e9a158a1a5 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class AnalyzeTextOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + if (Optional.IsCollectionDefined(Categories)) + { + writer.WritePropertyName("categories"u8); + writer.WriteStartArray(); + foreach (var item in Categories) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BlocklistNames)) + { + writer.WritePropertyName("blocklistNames"u8); + writer.WriteStartArray(); + foreach (var item in BlocklistNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(BreakByBlocklists)) + { + if (BreakByBlocklists != null) + { + writer.WritePropertyName("breakByBlocklists"u8); + writer.WriteBooleanValue(BreakByBlocklists.Value); + } + else + { + writer.WriteNull("breakByBlocklists"); + } + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.cs new file mode 100644 index 000000000000..73ffda9748cc --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextOptions.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// The analysis request of the text. + public partial class AnalyzeTextOptions + { + /// Initializes a new instance of AnalyzeTextOptions. + /// The text needs to be scanned. We support at most 1000 characters (unicode code points) in text of one request. + /// is null. + public AnalyzeTextOptions(string text) + { + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + Categories = new ChangeTrackingList(); + BlocklistNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of AnalyzeTextOptions. + /// The text needs to be scanned. We support at most 1000 characters (unicode code points) in text of one request. + /// The categories will be analyzed. If not assigned, a default set of the categories' analysis results will be returned. + /// The names of blocklists. + /// When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit. + internal AnalyzeTextOptions(string text, IList categories, IList blocklistNames, bool? breakByBlocklists) + { + Text = text; + Categories = categories; + BlocklistNames = blocklistNames; + BreakByBlocklists = breakByBlocklists; + } + + /// The text needs to be scanned. We support at most 1000 characters (unicode code points) in text of one request. + public string Text { get; } + /// The categories will be analyzed. If not assigned, a default set of the categories' analysis results will be returned. + public IList Categories { get; } + /// The names of blocklists. + public IList BlocklistNames { get; } + /// When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit. + public bool? BreakByBlocklists { get; set; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.Serialization.cs new file mode 100644 index 000000000000..be21a91e576e --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.Serialization.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class AnalyzeTextResult + { + internal static AnalyzeTextResult DeserializeAnalyzeTextResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> blocklistsMatchResults = default; + Optional hateResult = default; + Optional selfHarmResult = default; + Optional sexualResult = default; + Optional violenceResult = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blocklistsMatchResults"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TextBlocklistMatchResult.DeserializeTextBlocklistMatchResult(item)); + } + blocklistsMatchResults = array; + continue; + } + if (property.NameEquals("hateResult"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hateResult = TextAnalyzeSeverityResult.DeserializeTextAnalyzeSeverityResult(property.Value); + continue; + } + if (property.NameEquals("selfHarmResult"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + selfHarmResult = TextAnalyzeSeverityResult.DeserializeTextAnalyzeSeverityResult(property.Value); + continue; + } + if (property.NameEquals("sexualResult"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sexualResult = TextAnalyzeSeverityResult.DeserializeTextAnalyzeSeverityResult(property.Value); + continue; + } + if (property.NameEquals("violenceResult"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + violenceResult = TextAnalyzeSeverityResult.DeserializeTextAnalyzeSeverityResult(property.Value); + continue; + } + } + return new AnalyzeTextResult(Optional.ToList(blocklistsMatchResults), hateResult, selfHarmResult, sexualResult, violenceResult); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AnalyzeTextResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAnalyzeTextResult(document.RootElement); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.cs new file mode 100644 index 000000000000..125ca8a7f6ee --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/AnalyzeTextResult.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// The analysis response of the text. + public partial class AnalyzeTextResult + { + /// Initializes a new instance of AnalyzeTextResult. + internal AnalyzeTextResult() + { + BlocklistsMatchResults = new ChangeTrackingList(); + } + + /// Initializes a new instance of AnalyzeTextResult. + /// The details of blocklist match. + /// Analysis result for Hate category. + /// Analysis result for SelfHarm category. + /// Analysis result for Sexual category. + /// Analysis result for Violence category. + internal AnalyzeTextResult(IReadOnlyList blocklistsMatchResults, TextAnalyzeSeverityResult hateResult, TextAnalyzeSeverityResult selfHarmResult, TextAnalyzeSeverityResult sexualResult, TextAnalyzeSeverityResult violenceResult) + { + BlocklistsMatchResults = blocklistsMatchResults; + HateResult = hateResult; + SelfHarmResult = selfHarmResult; + SexualResult = sexualResult; + ViolenceResult = violenceResult; + } + + /// The details of blocklist match. + public IReadOnlyList BlocklistsMatchResults { get; } + /// Analysis result for Hate category. + public TextAnalyzeSeverityResult HateResult { get; } + /// Analysis result for SelfHarm category. + public TextAnalyzeSeverityResult SelfHarmResult { get; } + /// Analysis result for Sexual category. + public TextAnalyzeSeverityResult SexualResult { get; } + /// Analysis result for Violence category. + public TextAnalyzeSeverityResult ViolenceResult { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs new file mode 100644 index 000000000000..49de8d2e3d14 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClient.cs @@ -0,0 +1,1316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.ContentSafety +{ + // Data plane generated client. + /// The ContentSafety service client. + public partial class ContentSafetyClient + { + private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; + private readonly AzureKeyCredential _keyCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of ContentSafetyClient for mocking. + protected ContentSafetyClient() + { + } + + /// Initializes a new instance of ContentSafetyClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://<resource-name>.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + /// or is null. + public ContentSafetyClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new ContentSafetyClientOptions()) + { + } + + /// Initializes a new instance of ContentSafetyClient. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://<resource-name>.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public ContentSafetyClient(Uri endpoint, AzureKeyCredential credential, ContentSafetyClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new ContentSafetyClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _keyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new AzureKeyCredentialPolicy(_keyCredential, AuthorizationHeader) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Analyze Text. + /// The request of text analysis. + /// The cancellation token to use. + /// is null. + /// A sync API for harmful content analysis for text. Currently, we support four categories: Hate, SelfHarm, Sexual, Violence. + /// + public virtual async Task> AnalyzeTextAsync(AnalyzeTextOptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AnalyzeTextAsync(body.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(AnalyzeTextResult.FromResponse(response), response); + } + + /// Analyze Text. + /// The request of text analysis. + /// The cancellation token to use. + /// is null. + /// A sync API for harmful content analysis for text. Currently, we support four categories: Hate, SelfHarm, Sexual, Violence. + /// + public virtual Response AnalyzeText(AnalyzeTextOptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AnalyzeText(body.ToRequestContent(), context); + return Response.FromValue(AnalyzeTextResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Analyze Text + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AnalyzeTextAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AnalyzeText"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeTextRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Analyze Text + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AnalyzeText(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AnalyzeText"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeTextRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Analyze Image. + /// The analysis request of the image. + /// The cancellation token to use. + /// is null. + /// A sync API for harmful content analysis for image. Currently, we support four categories: Hate, SelfHarm, Sexual, Violence. + /// + public virtual async Task> AnalyzeImageAsync(AnalyzeImageOptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AnalyzeImageAsync(body.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(AnalyzeImageResult.FromResponse(response), response); + } + + /// Analyze Image. + /// The analysis request of the image. + /// The cancellation token to use. + /// is null. + /// A sync API for harmful content analysis for image. Currently, we support four categories: Hate, SelfHarm, Sexual, Violence. + /// + public virtual Response AnalyzeImage(AnalyzeImageOptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AnalyzeImage(body.ToRequestContent(), context); + return Response.FromValue(AnalyzeImageResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Analyze Image + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AnalyzeImageAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AnalyzeImage"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeImageRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Analyze Image + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AnalyzeImage(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AnalyzeImage"); + scope.Start(); + try + { + using HttpMessage message = CreateAnalyzeImageRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get Text Blocklist By blocklistName. + /// Text blocklist name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Returns text blocklist details. + /// + public virtual async Task> GetTextBlocklistAsync(string blocklistName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTextBlocklistAsync(blocklistName, context).ConfigureAwait(false); + return Response.FromValue(TextBlocklist.FromResponse(response), response); + } + + /// Get Text Blocklist By blocklistName. + /// Text blocklist name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Returns text blocklist details. + /// + public virtual Response GetTextBlocklist(string blocklistName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTextBlocklist(blocklistName, context); + return Response.FromValue(TextBlocklist.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get Text Blocklist By blocklistName + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTextBlocklistAsync(string blocklistName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.GetTextBlocklist"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTextBlocklistRequest(blocklistName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get Text Blocklist By blocklistName + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTextBlocklist(string blocklistName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.GetTextBlocklist"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTextBlocklistRequest(blocklistName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create Or Update Text Blocklist + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Text blocklist name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateOrUpdateTextBlocklistAsync(string blocklistName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.CreateOrUpdateTextBlocklist"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateTextBlocklistRequest(blocklistName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create Or Update Text Blocklist + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Text blocklist name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateOrUpdateTextBlocklist(string blocklistName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.CreateOrUpdateTextBlocklist"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateTextBlocklistRequest(blocklistName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete Text Blocklist By blocklistName + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Text blocklist name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteTextBlocklistAsync(string blocklistName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.DeleteTextBlocklist"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTextBlocklistRequest(blocklistName, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Delete Text Blocklist By blocklistName + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Text blocklist name. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteTextBlocklist(string blocklistName, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.DeleteTextBlocklist"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTextBlocklistRequest(blocklistName, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add BlockItems To Text Blocklist. + /// Text blocklist name. + /// The request of adding blockItems to text blocklist. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Add blockItems to a text blocklist. You can add at most 100 BlockItems in one request. + /// + public virtual async Task> AddBlockItemsAsync(string blocklistName, AddBlockItemsOptions addBlockItemsOptions, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(addBlockItemsOptions, nameof(addBlockItemsOptions)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AddBlockItemsAsync(blocklistName, addBlockItemsOptions.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(AddBlockItemsResult.FromResponse(response), response); + } + + /// Add BlockItems To Text Blocklist. + /// Text blocklist name. + /// The request of adding blockItems to text blocklist. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Add blockItems to a text blocklist. You can add at most 100 BlockItems in one request. + /// + public virtual Response AddBlockItems(string blocklistName, AddBlockItemsOptions addBlockItemsOptions, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(addBlockItemsOptions, nameof(addBlockItemsOptions)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AddBlockItems(blocklistName, addBlockItemsOptions.ToRequestContent(), context); + return Response.FromValue(AddBlockItemsResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Add BlockItems To Text Blocklist + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddBlockItemsAsync(string blocklistName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AddBlockItems"); + scope.Start(); + try + { + using HttpMessage message = CreateAddBlockItemsRequest(blocklistName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Add BlockItems To Text Blocklist + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddBlockItems(string blocklistName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.AddBlockItems"); + scope.Start(); + try + { + using HttpMessage message = CreateAddBlockItemsRequest(blocklistName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Remove BlockItems From Text Blocklist. + /// Text blocklist name. + /// The request of removing blockItems from text blocklist. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Remove blockItems from a text blocklist. You can remove at most 100 BlockItems in one request. + /// + public virtual async Task RemoveBlockItemsAsync(string blocklistName, RemoveBlockItemsOptions removeBlockItemsOptions, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(removeBlockItemsOptions, nameof(removeBlockItemsOptions)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RemoveBlockItemsAsync(blocklistName, removeBlockItemsOptions.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Remove BlockItems From Text Blocklist. + /// Text blocklist name. + /// The request of removing blockItems from text blocklist. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Remove blockItems from a text blocklist. You can remove at most 100 BlockItems in one request. + /// + public virtual Response RemoveBlockItems(string blocklistName, RemoveBlockItemsOptions removeBlockItemsOptions, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(removeBlockItemsOptions, nameof(removeBlockItemsOptions)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = RemoveBlockItems(blocklistName, removeBlockItemsOptions.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Remove BlockItems From Text Blocklist + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RemoveBlockItemsAsync(string blocklistName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.RemoveBlockItems"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveBlockItemsRequest(blocklistName, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Remove BlockItems From Text Blocklist + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RemoveBlockItems(string blocklistName, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.RemoveBlockItems"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveBlockItemsRequest(blocklistName, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get BlockItem By blocklistName And blockItemId. + /// Text blocklist name. + /// Block Item Id. It will be uuid. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Get blockItem By blockItemId from a text blocklist. + /// + public virtual async Task> GetTextBlocklistItemAsync(string blocklistName, string blockItemId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNullOrEmpty(blockItemId, nameof(blockItemId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTextBlocklistItemAsync(blocklistName, blockItemId, context).ConfigureAwait(false); + return Response.FromValue(TextBlockItem.FromResponse(response), response); + } + + /// Get BlockItem By blocklistName And blockItemId. + /// Text blocklist name. + /// Block Item Id. It will be uuid. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Get blockItem By blockItemId from a text blocklist. + /// + public virtual Response GetTextBlocklistItem(string blocklistName, string blockItemId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNullOrEmpty(blockItemId, nameof(blockItemId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTextBlocklistItem(blocklistName, blockItemId, context); + return Response.FromValue(TextBlockItem.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get BlockItem By blocklistName And blockItemId + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// Block Item Id. It will be uuid. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTextBlocklistItemAsync(string blocklistName, string blockItemId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNullOrEmpty(blockItemId, nameof(blockItemId)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.GetTextBlocklistItem"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTextBlocklistItemRequest(blocklistName, blockItemId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get BlockItem By blocklistName And blockItemId + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// Block Item Id. It will be uuid. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTextBlocklistItem(string blocklistName, string blockItemId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + Argument.AssertNotNullOrEmpty(blockItemId, nameof(blockItemId)); + + using var scope = ClientDiagnostics.CreateScope("ContentSafetyClient.GetTextBlocklistItem"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTextBlocklistItemRequest(blocklistName, blockItemId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get All Text Blocklists. + /// The cancellation token to use. + /// Get all text blocklists details. + /// + public virtual AsyncPageable GetTextBlocklistsAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTextBlocklistsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTextBlocklistsNextPageRequest(nextLink, context); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, TextBlocklist.DeserializeTextBlocklist, ClientDiagnostics, _pipeline, "ContentSafetyClient.GetTextBlocklists", "value", "nextLink", context); + } + + /// Get All Text Blocklists. + /// The cancellation token to use. + /// Get all text blocklists details. + /// + public virtual Pageable GetTextBlocklists(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTextBlocklistsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTextBlocklistsNextPageRequest(nextLink, context); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, TextBlocklist.DeserializeTextBlocklist, ClientDiagnostics, _pipeline, "ContentSafetyClient.GetTextBlocklists", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Get All Text Blocklists + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTextBlocklistsAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTextBlocklistsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTextBlocklistsNextPageRequest(nextLink, context); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ContentSafetyClient.GetTextBlocklists", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Get All Text Blocklists + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTextBlocklists(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTextBlocklistsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTextBlocklistsNextPageRequest(nextLink, context); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ContentSafetyClient.GetTextBlocklists", "value", "nextLink", context); + } + + /// Get All BlockItems By blocklistName. + /// Text blocklist name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Get all blockItems in a text blocklist. + /// + public virtual AsyncPageable GetTextBlocklistItemsAsync(string blocklistName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTextBlocklistItemsRequest(blocklistName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTextBlocklistItemsNextPageRequest(nextLink, blocklistName, maxCount, skip, maxpagesize, context); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, TextBlockItem.DeserializeTextBlockItem, ClientDiagnostics, _pipeline, "ContentSafetyClient.GetTextBlocklistItems", "value", "nextLink", context); + } + + /// Get All BlockItems By blocklistName. + /// Text blocklist name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Get all blockItems in a text blocklist. + /// + public virtual Pageable GetTextBlocklistItems(string blocklistName, int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTextBlocklistItemsRequest(blocklistName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTextBlocklistItemsNextPageRequest(nextLink, blocklistName, maxCount, skip, maxpagesize, context); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, TextBlockItem.DeserializeTextBlockItem, ClientDiagnostics, _pipeline, "ContentSafetyClient.GetTextBlocklistItems", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Get All BlockItems By blocklistName + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTextBlocklistItemsAsync(string blocklistName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTextBlocklistItemsRequest(blocklistName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTextBlocklistItemsNextPageRequest(nextLink, blocklistName, maxCount, skip, maxpagesize, context); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ContentSafetyClient.GetTextBlocklistItems", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Get All BlockItems By blocklistName + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Text blocklist name. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTextBlocklistItems(string blocklistName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + Argument.AssertNotNullOrEmpty(blocklistName, nameof(blocklistName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTextBlocklistItemsRequest(blocklistName, maxCount, skip, maxpagesize, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTextBlocklistItemsNextPageRequest(nextLink, blocklistName, maxCount, skip, maxpagesize, context); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ContentSafetyClient.GetTextBlocklistItems", "value", "nextLink", context); + } + + internal HttpMessage CreateAnalyzeTextRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text:analyze", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAnalyzeImageRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/image:analyze", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetTextBlocklistRequest(string blocklistName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text/blocklists/", false); + uri.AppendPath(blocklistName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateOrUpdateTextBlocklistRequest(string blocklistName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text/blocklists/", false); + uri.AppendPath(blocklistName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteTextBlocklistRequest(string blocklistName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text/blocklists/", false); + uri.AppendPath(blocklistName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTextBlocklistsRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text/blocklists", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateAddBlockItemsRequest(string blocklistName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text/blocklists/", false); + uri.AppendPath(blocklistName, true); + uri.AppendPath(":addBlockItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateRemoveBlockItemsRequest(string blocklistName, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text/blocklists/", false); + uri.AppendPath(blocklistName, true); + uri.AppendPath(":removeBlockItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetTextBlocklistItemRequest(string blocklistName, string blockItemId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text/blocklists/", false); + uri.AppendPath(blocklistName, true); + uri.AppendPath("/blockItems/", false); + uri.AppendPath(blockItemId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTextBlocklistItemsRequest(string blocklistName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendPath("/text/blocklists/", false); + uri.AppendPath(blocklistName, true); + uri.AppendPath("/blockItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTextBlocklistsNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTextBlocklistItemsNextPageRequest(string nextLink, string blocklistName, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRaw("/contentsafety", false); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientBuilderExtensions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientBuilderExtensions.cs new file mode 100644 index 000000000000..7893c377493a --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientBuilderExtensions.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.AI.ContentSafety; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class ContentSafetyClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// + /// Supported Cognitive Services endpoints (protocol and hostname, for example: + /// https://<resource-name>.cognitiveservices.azure.com). + /// + /// A credential used to authenticate to an Azure Service. + public static IAzureClientBuilder AddContentSafetyClient(this TBuilder builder, Uri endpoint, AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new ContentSafetyClient(endpoint, credential, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddContentSafetyClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientOptions.cs new file mode 100644 index 000000000000..8f6285c3198e --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ContentSafetyClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// Client options for ContentSafetyClient. + public partial class ContentSafetyClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2023_04_30_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2023-04-30-preview". + V2023_04_30_Preview = 1, + } + + internal string Version { get; } + + /// Initializes new instance of ContentSafetyClientOptions. + public ContentSafetyClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_04_30_Preview => "2023-04-30-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml new file mode 100644 index 000000000000..5e9bb53506d6 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/Docs/ContentSafetyClient.xml @@ -0,0 +1,797 @@ + + + + + +This sample shows how to call AnalyzeTextAsync with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var body = new AnalyzeTextOptions("") +{ + Categories = +{ + TextCategory.Hate + }, + BlocklistNames = +{ + "" + }, + BreakByBlocklists = true, +}; +var result = await client.AnalyzeTextAsync(body); +]]> + + + + +This sample shows how to call AnalyzeText with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var body = new AnalyzeTextOptions("") +{ + Categories = +{ + TextCategory.Hate + }, + BlocklistNames = +{ + "" + }, + BreakByBlocklists = true, +}; +var result = client.AnalyzeText(body); +]]> + + + + +This sample shows how to call AnalyzeTextAsync with required request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + text = "", +}; + +Response response = await client.AnalyzeTextAsync(RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call AnalyzeTextAsync with all request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + text = "", + categories = new[] { + "Hate" + }, + blocklistNames = new[] { + "" + }, + breakByBlocklists = true, +}; + +Response response = await client.AnalyzeTextAsync(RequestContent.Create(data), new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blocklistName").ToString()); +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blockItemId").ToString()); +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blockItemText").ToString()); +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("hateResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); +]]> + + + + +This sample shows how to call AnalyzeText with required request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + text = "", +}; + +Response response = client.AnalyzeText(RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call AnalyzeText with all request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + text = "", + categories = new[] { + "Hate" + }, + blocklistNames = new[] { + "" + }, + breakByBlocklists = true, +}; + +Response response = client.AnalyzeText(RequestContent.Create(data), new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blocklistName").ToString()); +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blockItemId").ToString()); +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blockItemText").ToString()); +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("offset").ToString()); +Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("length").ToString()); +Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("hateResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); +]]> + + + + +This sample shows how to call AnalyzeImageAsync with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var body = new AnalyzeImageOptions(new ImageData() +{ + Content = BinaryData.FromString(""), + BlobUrl = "", +}) +{ + Categories = +{ + ImageCategory.Hate + }, +}; +var result = await client.AnalyzeImageAsync(body); +]]> + + + + +This sample shows how to call AnalyzeImage with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var body = new AnalyzeImageOptions(new ImageData() +{ + Content = BinaryData.FromString(""), + BlobUrl = "", +}) +{ + Categories = +{ + ImageCategory.Hate + }, +}; +var result = client.AnalyzeImage(body); +]]> + + + + +This sample shows how to call AnalyzeImageAsync with required request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + image = new {}, +}; + +Response response = await client.AnalyzeImageAsync(RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call AnalyzeImageAsync with all request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + image = new { + content = new {}, + blobUrl = "", + }, + categories = new[] { + "Hate" + }, +}; + +Response response = await client.AnalyzeImageAsync(RequestContent.Create(data), new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("hateResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); +]]> + + + + +This sample shows how to call AnalyzeImage with required request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + image = new {}, +}; + +Response response = client.AnalyzeImage(RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call AnalyzeImage with all request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + image = new { + content = new {}, + blobUrl = "", + }, + categories = new[] { + "Hate" + }, +}; + +Response response = client.AnalyzeImage(RequestContent.Create(data), new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("hateResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); +Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); +]]> + + + + +This sample shows how to call GetTextBlocklistAsync with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var result = await client.GetTextBlocklistAsync(""); +]]> + + + + +This sample shows how to call GetTextBlocklist with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var result = client.GetTextBlocklist(""); +]]> + + + + +This sample shows how to call GetTextBlocklistAsync with required parameters and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistAsync("", new RequestContext()); + +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 with required parameters and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklist("", new RequestContext()); + +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 CreateOrUpdateTextBlocklistAsync with required parameters and request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + blocklistName = "", +}; + +Response response = await client.CreateOrUpdateTextBlocklistAsync("", RequestContent.Create(data)); + +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 how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + blocklistName = "", + description = "", +}; + +Response response = await client.CreateOrUpdateTextBlocklistAsync("", RequestContent.Create(data), new RequestContext()); + +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 with required parameters and request content, and how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + blocklistName = "", +}; + +Response response = client.CreateOrUpdateTextBlocklist("", RequestContent.Create(data)); + +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 how to parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + blocklistName = "", + description = "", +}; + +Response response = client.CreateOrUpdateTextBlocklist("", RequestContent.Create(data), new RequestContext()); + +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 with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.DeleteTextBlocklistAsync("", new RequestContext()); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call DeleteTextBlocklist with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +Response response = client.DeleteTextBlocklist("", new RequestContext()); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call AddBlockItemsAsync with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] +{ + new TextBlockItemInfo("") +{ + Description = "", + } +}); +var result = await client.AddBlockItemsAsync("", addBlockItemsOptions); +]]> + + + + +This sample shows how to call AddBlockItems with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] +{ + new TextBlockItemInfo("") +{ + Description = "", + } +}); +var result = client.AddBlockItems("", addBlockItemsOptions); +]]> + + + + +This sample shows how to call AddBlockItemsAsync with required parameters and request content and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + blockItems = new[] { + new { + description = "", + text = "", + } + }, +}; + +Response response = await client.AddBlockItemsAsync("", RequestContent.Create(data), new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); +]]> + + + + +This sample shows how to call AddBlockItems with required parameters and request content and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + blockItems = new[] { + new { + description = "", + text = "", + } + }, +}; + +Response response = client.AddBlockItems("", RequestContent.Create(data), new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); +]]> + + + + +This sample shows how to call RemoveBlockItemsAsync with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] +{ + "" +}); +var result = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); +]]> + + + + +This sample shows how to call RemoveBlockItems with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] +{ + "" +}); +var result = client.RemoveBlockItems("", removeBlockItemsOptions); +]]> + + + + +This sample shows how to call RemoveBlockItemsAsync with required parameters and request content. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + blockItemIds = new[] { + "" + }, +}; + +Response response = await client.RemoveBlockItemsAsync("", RequestContent.Create(data), new RequestContext()); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call RemoveBlockItems with required parameters and request content. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var data = new { + blockItemIds = new[] { + "" + }, +}; + +Response response = client.RemoveBlockItems("", RequestContent.Create(data), new RequestContext()); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call GetTextBlocklistItemAsync with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var result = await client.GetTextBlocklistItemAsync("", ""); +]]> + + + + +This sample shows how to call GetTextBlocklistItem with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +var result = client.GetTextBlocklistItem("", ""); +]]> + + + + +This sample shows how to call GetTextBlocklistItemAsync with required parameters and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +Response response = await client.GetTextBlocklistItemAsync("", "", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blockItemId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("text").ToString()); +]]> + + + + +This sample shows how to call GetTextBlocklistItem with required parameters and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +Response response = client.GetTextBlocklistItem("", "", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blockItemId").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("text").ToString()); +]]> + + + + +This sample shows how to call GetTextBlocklistsAsync. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +await foreach (var item in client.GetTextBlocklistsAsync()) +{ +} +]]> + + + + +This sample shows how to call GetTextBlocklists. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +foreach (var item in client.GetTextBlocklists()) +{ +} +]]> + + + + +This sample shows how to call GetTextBlocklistsAsync with required parameters and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +await foreach (var item in client.GetTextBlocklistsAsync(new RequestContext())) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); +} +]]> + + + + +This sample shows how to call GetTextBlocklists with required parameters and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +foreach (var item in client.GetTextBlocklists(new RequestContext())) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); +} +]]> + + + + +This sample shows how to call GetTextBlocklistItemsAsync with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234)) +{ +} +]]> + + + + +This sample shows how to call GetTextBlocklistItems with required parameters. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +foreach (var item in client.GetTextBlocklistItems("", 1234, 1234, 1234)) +{ +} +]]> + + + + +This sample shows how to call GetTextBlocklistItemsAsync with required parameters and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, new RequestContext())) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); +} +]]> + + + + +This sample shows how to call GetTextBlocklistItems with required parameters and parse the result. +"); +var endpoint = new Uri(""); +var client = new ContentSafetyClient(endpoint, credential); + +foreach (var item in client.GetTextBlocklistItems("", 1234, 1234, 1234, new RequestContext())) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); +} +]]> + + + + \ No newline at end of file diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageAnalyzeSeverityResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageAnalyzeSeverityResult.Serialization.cs new file mode 100644 index 000000000000..8463864488a1 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageAnalyzeSeverityResult.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class ImageAnalyzeSeverityResult + { + internal static ImageAnalyzeSeverityResult DeserializeImageAnalyzeSeverityResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ImageCategory category = default; + int severity = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = new ImageCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetInt32(); + continue; + } + } + return new ImageAnalyzeSeverityResult(category, severity); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ImageAnalyzeSeverityResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImageAnalyzeSeverityResult(document.RootElement); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageAnalyzeSeverityResult.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageAnalyzeSeverityResult.cs new file mode 100644 index 000000000000..9af75fe1da78 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageAnalyzeSeverityResult.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.ContentSafety +{ + /// Image analysis result. + public partial class ImageAnalyzeSeverityResult + { + /// Initializes a new instance of ImageAnalyzeSeverityResult. + /// The image category. + /// The higher the severity of input content, the larger this value, currently its value could be: 0,2,4,6. + internal ImageAnalyzeSeverityResult(ImageCategory category, int severity) + { + Category = category; + Severity = severity; + } + + /// The image category. + public ImageCategory Category { get; } + /// The higher the severity of input content, the larger this value, currently its value could be: 0,2,4,6. + public int Severity { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategory.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategory.cs new file mode 100644 index 000000000000..987f3eda4f88 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageCategory.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.ContentSafety +{ + /// Image analyze category. + public readonly partial struct ImageCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ImageCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HateValue = "Hate"; + private const string SelfHarmValue = "SelfHarm"; + private const string SexualValue = "Sexual"; + private const string ViolenceValue = "Violence"; + + /// Hate. + public static ImageCategory Hate { get; } = new ImageCategory(HateValue); + /// SelfHarm. + public static ImageCategory SelfHarm { get; } = new ImageCategory(SelfHarmValue); + /// Sexual. + public static ImageCategory Sexual { get; } = new ImageCategory(SexualValue); + /// Violence. + public static ImageCategory Violence { get; } = new ImageCategory(ViolenceValue); + /// Determines if two values are the same. + public static bool operator ==(ImageCategory left, ImageCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImageCategory left, ImageCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ImageCategory(string value) => new ImageCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImageCategory other && Equals(other); + /// + public bool Equals(ImageCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageData.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageData.Serialization.cs new file mode 100644 index 000000000000..a074cf932c4c --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageData.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class ImageData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteBase64StringValue(Content.ToArray(), "D"); + } + if (Optional.IsDefined(BlobUrl)) + { + writer.WritePropertyName("blobUrl"u8); + writer.WriteStringValue(BlobUrl); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageData.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageData.cs new file mode 100644 index 000000000000..5ee0fa1b5732 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/ImageData.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.AI.ContentSafety +{ + /// The content or blob url of image, could be base64 encoding bytes or blob url. If both are given, the request will be refused. The maximum size of image is 2048 pixels * 2048 pixels, no larger than 4MB at the same time. The minimum size of image is 50 pixels * 50 pixels. + public partial class ImageData + { + /// Initializes a new instance of ImageData. + public ImageData() + { + } + + /// Initializes a new instance of ImageData. + /// Base64 encoding of image. + /// The blob url of image. + internal ImageData(BinaryData content, string blobUrl) + { + Content = content; + BlobUrl = blobUrl; + } + + /// + /// Base64 encoding of image. + /// + /// To assign a byte[] to this property use . + /// The byte[] will be serialized to a Base64 encoded string. + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromBytes(new byte[] { 1, 2, 3 }) + /// Creates a payload of "AQID". + /// + /// + /// + /// + public BinaryData Content { get; set; } + /// The blob url of image. + public string BlobUrl { get; set; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveBlockItemsOptions.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveBlockItemsOptions.Serialization.cs new file mode 100644 index 000000000000..d1df71a0dbe1 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveBlockItemsOptions.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class RemoveBlockItemsOptions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("blockItemIds"u8); + writer.WriteStartArray(); + foreach (var item in BlockItemIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveBlockItemsOptions.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveBlockItemsOptions.cs new file mode 100644 index 000000000000..d8759e8db58e --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/RemoveBlockItemsOptions.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// The request of removing blockItems from text blocklist. + public partial class RemoveBlockItemsOptions + { + /// Initializes a new instance of RemoveBlockItemsOptions. + /// Array of blockItemIds to remove. + /// is null. + public RemoveBlockItemsOptions(IEnumerable blockItemIds) + { + Argument.AssertNotNull(blockItemIds, nameof(blockItemIds)); + + BlockItemIds = blockItemIds.ToList(); + } + + /// Initializes a new instance of RemoveBlockItemsOptions. + /// Array of blockItemIds to remove. + internal RemoveBlockItemsOptions(IList blockItemIds) + { + BlockItemIds = blockItemIds; + } + + /// Array of blockItemIds to remove. + public IList BlockItemIds { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextAnalyzeSeverityResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextAnalyzeSeverityResult.Serialization.cs new file mode 100644 index 000000000000..6f2b4c9a2c82 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextAnalyzeSeverityResult.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class TextAnalyzeSeverityResult + { + internal static TextAnalyzeSeverityResult DeserializeTextAnalyzeSeverityResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TextCategory category = default; + int severity = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = new TextCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetInt32(); + continue; + } + } + return new TextAnalyzeSeverityResult(category, severity); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TextAnalyzeSeverityResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextAnalyzeSeverityResult(document.RootElement); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextAnalyzeSeverityResult.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextAnalyzeSeverityResult.cs new file mode 100644 index 000000000000..b77d1561e74d --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextAnalyzeSeverityResult.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.ContentSafety +{ + /// Text analysis result. + public partial class TextAnalyzeSeverityResult + { + /// Initializes a new instance of TextAnalyzeSeverityResult. + /// The text category. + /// The higher the severity of input content, the larger this value is. The values could be: 0,2,4,6. + internal TextAnalyzeSeverityResult(TextCategory category, int severity) + { + Category = category; + Severity = severity; + } + + /// The text category. + public TextCategory Category { get; } + /// The higher the severity of input content, the larger this value is. The values could be: 0,2,4,6. + public int Severity { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItem.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItem.Serialization.cs new file mode 100644 index 000000000000..0fe411f93d51 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItem.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class TextBlockItem + { + internal static TextBlockItem DeserializeTextBlockItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string blockItemId = default; + Optional description = default; + string text = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blockItemId"u8)) + { + blockItemId = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + } + return new TextBlockItem(blockItemId, description, text); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TextBlockItem FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextBlockItem(document.RootElement); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItem.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItem.cs new file mode 100644 index 000000000000..23ac2522a815 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItem.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// Item in TextBlocklist. + public partial class TextBlockItem + { + /// Initializes a new instance of TextBlockItem. + /// Block Item Id. It will be uuid. + /// Block item content. + /// or is null. + internal TextBlockItem(string blockItemId, string text) + { + Argument.AssertNotNull(blockItemId, nameof(blockItemId)); + Argument.AssertNotNull(text, nameof(text)); + + BlockItemId = blockItemId; + Text = text; + } + + /// Initializes a new instance of TextBlockItem. + /// Block Item Id. It will be uuid. + /// Block item description. + /// Block item content. + internal TextBlockItem(string blockItemId, string description, string text) + { + BlockItemId = blockItemId; + Description = description; + Text = text; + } + + /// Block Item Id. It will be uuid. + public string BlockItemId { get; } + /// Block item description. + public string Description { get; } + /// Block item content. + public string Text { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItemInfo.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItemInfo.Serialization.cs new file mode 100644 index 000000000000..0f78b5dc1d76 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItemInfo.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class TextBlockItemInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItemInfo.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItemInfo.cs new file mode 100644 index 000000000000..f983f67dbbee --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlockItemInfo.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// Block item info in text blocklist. + public partial class TextBlockItemInfo + { + /// Initializes a new instance of TextBlockItemInfo. + /// Block item content. + /// is null. + public TextBlockItemInfo(string text) + { + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + } + + /// Initializes a new instance of TextBlockItemInfo. + /// Block item description. + /// Block item content. + internal TextBlockItemInfo(string description, string text) + { + Description = description; + Text = text; + } + + /// Block item description. + public string Description { get; set; } + /// Block item content. + public string Text { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.Serialization.cs new file mode 100644 index 000000000000..25f92f81ed08 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class TextBlocklist + { + internal static TextBlocklist DeserializeTextBlocklist(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string blocklistName = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blocklistName"u8)) + { + blocklistName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + } + return new TextBlocklist(blocklistName, description); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TextBlocklist FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextBlocklist(document.RootElement); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.cs new file mode 100644 index 000000000000..c2261aee3d68 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklist.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// Text Blocklist. + public partial class TextBlocklist + { + /// Initializes a new instance of TextBlocklist. + /// Text blocklist name. + /// is null. + internal TextBlocklist(string blocklistName) + { + Argument.AssertNotNull(blocklistName, nameof(blocklistName)); + + BlocklistName = blocklistName; + } + + /// Initializes a new instance of TextBlocklist. + /// Text blocklist name. + /// Text blocklist description. + internal TextBlocklist(string blocklistName, string description) + { + BlocklistName = blocklistName; + Description = description; + } + + /// Text blocklist name. + public string BlocklistName { get; } + /// Text blocklist description. + public string Description { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatchResult.Serialization.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatchResult.Serialization.cs new file mode 100644 index 000000000000..5af845e64bb1 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatchResult.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + public partial class TextBlocklistMatchResult + { + internal static TextBlocklistMatchResult DeserializeTextBlocklistMatchResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string blocklistName = default; + string blockItemId = default; + string blockItemText = default; + int offset = default; + int length = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blocklistName"u8)) + { + blocklistName = property.Value.GetString(); + continue; + } + if (property.NameEquals("blockItemId"u8)) + { + blockItemId = property.Value.GetString(); + continue; + } + if (property.NameEquals("blockItemText"u8)) + { + blockItemText = property.Value.GetString(); + continue; + } + if (property.NameEquals("offset"u8)) + { + offset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("length"u8)) + { + length = property.Value.GetInt32(); + continue; + } + } + return new TextBlocklistMatchResult(blocklistName, blockItemId, blockItemText, offset, length); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TextBlocklistMatchResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTextBlocklistMatchResult(document.RootElement); + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatchResult.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatchResult.cs new file mode 100644 index 000000000000..b4fc2ead623b --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextBlocklistMatchResult.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.ContentSafety +{ + /// The result of blocklist match. + public partial class TextBlocklistMatchResult + { + /// Initializes a new instance of TextBlocklistMatchResult. + /// The name of matched blocklist. + /// The id of matched item. + /// The content of matched item. + /// The character offset of matched text in original input. + /// The length of matched text in original input. + /// , or is null. + internal TextBlocklistMatchResult(string blocklistName, string blockItemId, string blockItemText, int offset, int length) + { + Argument.AssertNotNull(blocklistName, nameof(blocklistName)); + Argument.AssertNotNull(blockItemId, nameof(blockItemId)); + Argument.AssertNotNull(blockItemText, nameof(blockItemText)); + + BlocklistName = blocklistName; + BlockItemId = blockItemId; + BlockItemText = blockItemText; + Offset = offset; + Length = length; + } + + /// The name of matched blocklist. + public string BlocklistName { get; } + /// The id of matched item. + public string BlockItemId { get; } + /// The content of matched item. + public string BlockItemText { get; } + /// The character offset of matched text in original input. + public int Offset { get; } + /// The length of matched text in original input. + public int Length { get; } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategory.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategory.cs new file mode 100644 index 000000000000..48faf39a15ba --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/Generated/TextCategory.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.ContentSafety +{ + /// Text analyze category. + public readonly partial struct TextCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TextCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HateValue = "Hate"; + private const string SelfHarmValue = "SelfHarm"; + private const string SexualValue = "Sexual"; + private const string ViolenceValue = "Violence"; + + /// Hate. + public static TextCategory Hate { get; } = new TextCategory(HateValue); + /// SelfHarm. + public static TextCategory SelfHarm { get; } = new TextCategory(SelfHarmValue); + /// Sexual. + public static TextCategory Sexual { get; } = new TextCategory(SexualValue); + /// Violence. + public static TextCategory Violence { get; } = new TextCategory(ViolenceValue); + /// Determines if two values are the same. + public static bool operator ==(TextCategory left, TextCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TextCategory left, TextCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TextCategory(string value) => new TextCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TextCategory other && Equals(other); + /// + public bool Equals(TextCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/src/properties/AssemblyInfo.cs b/sdk/contentsafety/Azure.AI.ContentSafety/src/properties/AssemblyInfo.cs new file mode 100644 index 000000000000..7ae45a286cc6 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/src/properties/AssemblyInfo.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +// Replace with test project/test project public key and uncomment to make internal members visible to +// your test project. If not needed, this can be deleted. +// [assembly: InternalsVisibleTo("Azure.AI.Generated.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft")] diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/stress/README.md b/sdk/contentsafety/Azure.AI.ContentSafety/stress/README.md new file mode 100644 index 000000000000..c563a2c84601 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/stress/README.md @@ -0,0 +1 @@ +For information on reliability testing with the Azure SDK stress test framework, please refer to the [Reliability testing wiki](https://aka.ms/azsdk/stress). \ No newline at end of file diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Azure.AI.ContentSafety.Tests.csproj b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Azure.AI.ContentSafety.Tests.csproj new file mode 100644 index 000000000000..d85ca124b057 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Azure.AI.ContentSafety.Tests.csproj @@ -0,0 +1,30 @@ + + + $(RequiredTargetFrameworks) + + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/ContentSafetyClientTestEnvironment.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/ContentSafetyClientTestEnvironment.cs new file mode 100644 index 000000000000..e02586aa0f48 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/ContentSafetyClientTestEnvironment.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.AI.ContentSafety.Tests +{ + public class ContentSafetyClientTestEnvironment + : TestEnvironment + { + public string Endpoint => GetRecordedVariable("CONTENT_SAFETY_ENDPOINT"); + + public string Key => GetRecordedVariable("CONTENT_SAFETY_KEY", options => options.IsSecret()); + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/ContentSafetyLiveTests.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/ContentSafetyLiveTests.cs new file mode 100644 index 000000000000..2fe0af8e2e71 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/ContentSafetyLiveTests.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.ContentSafety.Tests +{ + public class ContentSafetyLiveTests: RecordedTestBase + { + public ContentSafetyLiveTests(bool isAsync) : base(isAsync) + { + SanitizedHeaders.Add("Ocp-Apim-Subscription-Key"); + } + + protected ContentSafetyClient CreateContentSafetyClient(bool useTokenCredential = false, string key = default, bool skipInstrumenting = false) + { + var endpoint = new Uri(TestEnvironment.Endpoint); + ContentSafetyClient client; + var optoins = InstrumentClientOptions(new ContentSafetyClientOptions()); + + if (useTokenCredential) + { + AzureKeyCredential credential = new AzureKeyCredential(TestEnvironment.Credential.ToString()); + client = new ContentSafetyClient(endpoint, credential, options: optoins); + } + else + { + AzureKeyCredential credential = new AzureKeyCredential(key ?? TestEnvironment.Key); + client = new ContentSafetyClient(endpoint, credential, options: optoins); + } + + return skipInstrumenting ? client : InstrumentClient(client); + } + + [RecordedTest] + public async Task TestAnalyzeText() + { + var client = CreateContentSafetyClient(); + + var request = new AnalyzeTextOptions(TestData.TestText); + request.Categories.Add(TextCategory.Hate); + request.Categories.Add(TextCategory.SelfHarm); + var response = await client.AnalyzeTextAsync(request); + + Assert.IsNotNull(response); + Assert.IsNotNull(response.Value.HateResult); + Assert.Greater(response.Value.HateResult.Severity, 0); + Assert.IsNotNull(response.Value.SelfHarmResult); + Assert.IsNull(response.Value.SexualResult); + Assert.IsNull(response.Value.ViolenceResult); + } + + [RecordedTest] + public async Task TestAnalyzeImage() + { + var client = CreateContentSafetyClient(); + + var image = new ImageData() + { + Content = BinaryData.FromBytes(File.ReadAllBytes(TestData.TestImageLocation)) + }; + var request = new AnalyzeImageOptions(image); + var response = await client.AnalyzeImageAsync(request); + + Assert.IsNotNull(response); + Assert.Greater(response.Value.ViolenceResult.Severity, 0); + } + } +} 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 new file mode 100644 index 000000000000..7c95afd6d1cc --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Generated/Samples/Samples_ContentSafetyClient.cs @@ -0,0 +1,916 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.ContentSafety.Samples +{ + public class Samples_ContentSafetyClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeText() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + text = "", + }; + + Response response = client.AnalyzeText(RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeText_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + text = "", + categories = new[] { + "Hate" + }, + blocklistNames = new[] { + "" + }, + breakByBlocklists = true, + }; + + Response response = client.AnalyzeText(RequestContent.Create(data), new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blockItemText").ToString()); + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("hateResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeText_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + text = "", + }; + + Response response = await client.AnalyzeTextAsync(RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeText_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + text = "", + categories = new[] { + "Hate" + }, + blocklistNames = new[] { + "" + }, + breakByBlocklists = true, + }; + + Response response = await client.AnalyzeTextAsync(RequestContent.Create(data), new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blocklistName").ToString()); + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("blockItemText").ToString()); + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("offset").ToString()); + Console.WriteLine(result.GetProperty("blocklistsMatchResults")[0].GetProperty("length").ToString()); + Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("hateResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeText_Convenience_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var body = new AnalyzeTextOptions("") + { + Categories = +{ + TextCategory.Hate + }, + BlocklistNames = +{ + "" + }, + BreakByBlocklists = true, + }; + var result = await client.AnalyzeTextAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeImage() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + image = new { }, + }; + + Response response = client.AnalyzeImage(RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeImage_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + image = new + { + content = new { }, + blobUrl = "", + }, + categories = new[] { + "Hate" + }, + }; + + Response response = client.AnalyzeImage(RequestContent.Create(data), new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("hateResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeImage_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + image = new { }, + }; + + Response response = await client.AnalyzeImageAsync(RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeImage_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + image = new + { + content = new { }, + blobUrl = "", + }, + categories = new[] { + "Hate" + }, + }; + + Response response = await client.AnalyzeImageAsync(RequestContent.Create(data), new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("hateResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("hateResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("selfHarmResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("sexualResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("sexualResult").GetProperty("severity").ToString()); + Console.WriteLine(result.GetProperty("violenceResult").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("violenceResult").GetProperty("severity").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeImage_Convenience_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var body = new AnalyzeImageOptions(new ImageData() + { + Content = BinaryData.FromString(""), + BlobUrl = "", + }) + { + Categories = +{ + ImageCategory.Hate + }, + }; + var result = await client.AnalyzeImageAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklist() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = client.GetTextBlocklist("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklist_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = client.GetTextBlocklist("", new RequestContext()); + + 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_GetTextBlocklist_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = await client.GetTextBlocklistAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklist_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = await client.GetTextBlocklistAsync("", new RequestContext()); + + 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_GetTextBlocklist_Convenience_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var result = await client.GetTextBlocklistAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CreateOrUpdateTextBlocklist() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blocklistName = "", + }; + + Response response = client.CreateOrUpdateTextBlocklist("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CreateOrUpdateTextBlocklist_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blocklistName = "", + description = "", + }; + + Response response = client.CreateOrUpdateTextBlocklist("", RequestContent.Create(data), new RequestContext()); + + 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_CreateOrUpdateTextBlocklist_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blocklistName = "", + }; + + Response response = await client.CreateOrUpdateTextBlocklistAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateOrUpdateTextBlocklist_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blocklistName = "", + description = "", + }; + + Response response = await client.CreateOrUpdateTextBlocklistAsync("", RequestContent.Create(data), new RequestContext()); + + 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_DeleteTextBlocklist() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = client.DeleteTextBlocklist(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DeleteTextBlocklist_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = client.DeleteTextBlocklist("", new RequestContext()); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeleteTextBlocklist_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = await client.DeleteTextBlocklistAsync(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DeleteTextBlocklist_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = await client.DeleteTextBlocklistAsync("", new RequestContext()); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddBlockItems() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blockItems = new[] { + new { + text = "", + } + }, + }; + + Response response = client.AddBlockItems("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddBlockItems_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blockItems = new[] { + new { + description = "", + text = "", + } + }, + }; + + Response response = client.AddBlockItems("", RequestContent.Create(data), new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddBlockItems_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blockItems = new[] { + new { + text = "", + } + }, + }; + + Response response = await client.AddBlockItemsAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddBlockItems_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blockItems = new[] { + new { + description = "", + text = "", + } + }, + }; + + Response response = await client.AddBlockItemsAsync("", RequestContent.Create(data), new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("text").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddBlockItems_Convenience_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var addBlockItemsOptions = new AddBlockItemsOptions(new TextBlockItemInfo[] + { + new TextBlockItemInfo("") +{ + Description = "", + } + }); + var result = await client.AddBlockItemsAsync("", addBlockItemsOptions); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RemoveBlockItems() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blockItemIds = new[] { + "" + }, + }; + + Response response = client.RemoveBlockItems("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RemoveBlockItems_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blockItemIds = new[] { + "" + }, + }; + + Response response = client.RemoveBlockItems("", RequestContent.Create(data), new RequestContext()); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RemoveBlockItems_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blockItemIds = new[] { + "" + }, + }; + + Response response = await client.RemoveBlockItemsAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RemoveBlockItems_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var data = new + { + blockItemIds = new[] { + "" + }, + }; + + Response response = await client.RemoveBlockItemsAsync("", RequestContent.Create(data), new RequestContext()); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RemoveBlockItems_Convenience_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var removeBlockItemsOptions = new RemoveBlockItemsOptions(new string[] + { + "" + }); + var result = await client.RemoveBlockItemsAsync("", removeBlockItemsOptions); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklistItem() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = client.GetTextBlocklistItem("", "", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklistItem_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = client.GetTextBlocklistItem("", "", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklistItem_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = await client.GetTextBlocklistItemAsync("", "", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklistItem_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + Response response = await client.GetTextBlocklistItemAsync("", "", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklistItem_Convenience_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + var result = await client.GetTextBlocklistItemAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklists() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + foreach (var item in client.GetTextBlocklists(new RequestContext())) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklists_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + foreach (var item in client.GetTextBlocklists(new RequestContext())) + { + 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_GetTextBlocklists_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + await foreach (var item in client.GetTextBlocklistsAsync(new RequestContext())) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blocklistName").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklists_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + await foreach (var item in client.GetTextBlocklistsAsync(new RequestContext())) + { + 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_GetTextBlocklists_Convenience_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + await foreach (var item in client.GetTextBlocklistsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklistItems() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + foreach (var item in client.GetTextBlocklistItems("", 1234, 1234, 1234, new RequestContext())) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTextBlocklistItems_AllParameters() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + foreach (var item in client.GetTextBlocklistItems("", 1234, 1234, 1234, new RequestContext())) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklistItems_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, new RequestContext())) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklistItems_AllParameters_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234, new RequestContext())) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("blockItemId").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("text").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTextBlocklistItems_Convenience_Async() + { + var credential = new AzureKeyCredential(""); + var endpoint = new Uri(""); + var client = new ContentSafetyClient(endpoint, credential); + + await foreach (var item in client.GetTextBlocklistItemsAsync("", 1234, 1234, 1234)) + { + } + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/README.md b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/README.md new file mode 100644 index 000000000000..f9bab6a394dc --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/README.md @@ -0,0 +1,3 @@ +Source files in this directory are written as tests from which samples are extracted. +They are not intended to be viewed directly and help ensure our samples compile and work correctly. +See our [list of samples](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples) for more explanation about how to use this client library. diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample1_AnalyzeText.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample1_AnalyzeText.cs new file mode 100644 index 000000000000..7cb338f430bf --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample1_AnalyzeText.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Reflection; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.ContentSafety.Tests.Samples +{ + //TODO: Commenting unused snippets until they are used in readme + public partial class ContentSafetySamples: SamplesBase + { + [Test] + [SyncOnly] + public void AnalyzeText() + { + //#region Snippet:CreateContentSafetyClient + + string endpoint = TestEnvironment.Endpoint; + string key = TestEnvironment.Key; + + ContentSafetyClient client = new ContentSafetyClient(new Uri(endpoint), new AzureKeyCredential(key)); + + //#endregion + + //#region Snippet:ReadTextData + + string datapath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Samples", "sample_data", "text.txt"); + string text = File.ReadAllText(datapath); + + //#endregion + + //#region Snippet:CreateRequest + + var request = new AnalyzeTextOptions(text); + + //#endregion + + //#region Snippet:AnalyzeText + + Response response; + try + { + response = client.AnalyzeText(request); + } + catch (RequestFailedException ex) + { + Console.WriteLine(String.Format("Analyze text failed: {0}", ex.Message)); + throw; + } + catch (Exception ex) + { + Console.WriteLine(String.Format("Analyze text error: {0}", ex.Message)); + throw; + } + + if (response.Value.HateResult != null) + { + Console.WriteLine(String.Format("Hate severity: {0}", response.Value.HateResult.Severity)); + } + if (response.Value.SelfHarmResult != null) + { + Console.WriteLine(String.Format("SelfHarm severity: {0}", response.Value.SelfHarmResult.Severity)); + } + if (response.Value.SexualResult != null) + { + Console.WriteLine(String.Format("Sexual severity: {0}", response.Value.SexualResult.Severity)); + } + if (response.Value.ViolenceResult != null) + { + Console.WriteLine(String.Format("Violence severity: {0}", response.Value.ViolenceResult.Severity)); + } + //#endregion + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample2_AnalyzeImage.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample2_AnalyzeImage.cs new file mode 100644 index 000000000000..64e395441020 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample2_AnalyzeImage.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Drawing; +using System.IO; +using System.Reflection; +using System.Security.Cryptography; +using Azure.Core.TestFramework; +using NUnit.Framework; +using static System.Net.Mime.MediaTypeNames; + +namespace Azure.AI.ContentSafety.Tests.Samples +{ + //TODO: Commenting unused snippets until they are used in readme + public partial class ContentSafetySamples : SamplesBase + { + [Test] + [SyncOnly] + public void AnalyzeImage() + { + //#region Snippet:CreateContentSafetyClient + + string endpoint = TestEnvironment.Endpoint; + string key = TestEnvironment.Key; + + ContentSafetyClient client = new ContentSafetyClient(new Uri(endpoint), new AzureKeyCredential(key)); + + //#endregion + + //#region Snippet:ReadImageData + + string datapath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Samples", "sample_data", "image.jpg"); + byte[] b = File.ReadAllBytes(datapath); + //BinaryData binaryData = BinaryData.FromObjectAsJson(TestData.TestImageContent); + //BinaryData binaryData = BinaryData.FromString("\""+TestData.TestImageContent+"\""); + BinaryData binaryData = BinaryData.FromBytes(b); + ImageData image = new ImageData() { Content = binaryData }; + + //FileStream stream = new FileStream(datapath, FileMode.Open); + //byte[] buffer = new byte[stream.Length]; + //stream.Read(buffer, 0, (int)stream.Length); + //MemoryStream memoryStream = new MemoryStream(buffer); + + //#endregion + + //#region Snippet:CreateRequest + + var request = new AnalyzeImageOptions(image); + + //#endregion + + //#region Snippet:AnalyzeText + + Response response; + try + { + response = client.AnalyzeImage(request); + } + catch (RequestFailedException ex) + { + Console.WriteLine(String.Format("Analyze image failed: {0}", ex.Message)); + throw; + } + catch (Exception ex) + { + Console.WriteLine(String.Format("Analyze image error: {0}", ex.Message)); + throw; + } + + if (response.Value.HateResult != null) + { + Console.WriteLine(String.Format("Hate severity: {0}", response.Value.HateResult.Severity)); + } + if (response.Value.SelfHarmResult != null) + { + Console.WriteLine(String.Format("SelfHarm severity: {0}", response.Value.SelfHarmResult.Severity)); + } + if (response.Value.SexualResult != null) + { + Console.WriteLine(String.Format("Sexual severity: {0}", response.Value.SexualResult.Severity)); + } + if (response.Value.ViolenceResult != null) + { + Console.WriteLine(String.Format("Violence severity: {0}", response.Value.ViolenceResult.Severity)); + } + //#endregion + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample3_ManageBlocklist.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample3_ManageBlocklist.cs new file mode 100644 index 000000000000..91b0e449fb55 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/Sample3_ManageBlocklist.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Threading; +using Azure.Core.TestFramework; +using NUnit.Framework; +using static System.Net.Mime.MediaTypeNames; + +namespace Azure.AI.ContentSafety.Tests.Samples +{ + //TODO: Commenting unused snippets until they are used in readme + public partial class ContentSafetySamples : SamplesBase + { + [Test] + [SyncOnly] + public void ManageBlocklist() + { + //#region Snippet:CreateContentSafetyClient + + string endpoint = TestEnvironment.Endpoint; + string key = TestEnvironment.Key; + + ContentSafetyClient client = new ContentSafetyClient(new Uri(endpoint), new AzureKeyCredential(key)); + + //#endregion + + //#region Snippet:ListBlocklists + + var blocklists = client.GetTextBlocklists(); + Console.WriteLine("\nMy blocklists:"); + foreach (var blocklist in blocklists) + { + Console.WriteLine(String.Format("BlocklistName: {0}, Description: {1}", blocklist.BlocklistName, blocklist.Description)); + } + //#endregion + + //#region Snippet:CreateNewBlocklist + + var blocklistName = "TestBlocklist"; + var blocklistDescription = "Test blocklist management"; + + client.CreateOrUpdateTextBlocklist(blocklistName, blocklistDescription); + + //#endregion + + //#region Snippet:GetBlocklist + + var newBlocklist = client.GetTextBlocklist(blocklistName); + if (newBlocklist != null && newBlocklist.Value != null) + { + Console.WriteLine("\nBlocklist created:"); + Console.WriteLine(String.Format("BlocklistName: {0}, Description: {1}", newBlocklist.Value.BlocklistName, newBlocklist.Value.Description)); + } + + //#endregion + + //#region Snippet:AddBlockItems + + string blockItemText1 = "k*ll"; + string blockItemText2 = "h*te"; + + var blockItems = new TextBlockItemInfo[] { new TextBlockItemInfo(blockItemText1), new TextBlockItemInfo(blockItemText2) }; + var addedBlockItems = client.AddBlockItems(blocklistName, new AddBlockItemsOptions(blockItems)); + + if (addedBlockItems != null && addedBlockItems.Value != null) + { + Console.WriteLine("\nBlockItems added:"); + foreach (var addedBlockItem in addedBlockItems.Value.Value) + { + { + Console.WriteLine(String.Format("BlockItemId: {0}, Text: {1}, Description: {2}", addedBlockItem.BlockItemId, addedBlockItem.Text, addedBlockItem.Description)); + } + } + } + + //#endregion + + //#region Snippet:RemoveBlockItems + + var removeBlockItemId = addedBlockItems.Value.Value[1].BlockItemId; + var removeBlockItemIds = new List { removeBlockItemId }; + var removeResult = client.RemoveBlockItems(blocklistName, new RemoveBlockItemsOptions(removeBlockItemIds)); + + if (removeResult != null && removeResult.Status == 204) + { + Console.WriteLine(String.Format("\nBlockItem {0} removed.", removeBlockItemId)); + } + + //#endregion + + //#region Snippet:ListBlockItems + + var remainingBlockItems = client.GetTextBlocklistItems(blocklistName); + Console.WriteLine("\nList BlockItems:"); + foreach (var blocklistItem in remainingBlockItems) + { + Console.WriteLine(String.Format("BlockItemId: {0}, Text: {1}, Description: {2}", blocklistItem.BlockItemId, blocklistItem.Text, blocklistItem.Description)); + } + + //#endregion + + //#region Snippet:AnalyzeTextWithBlocklist + Thread.Sleep(30000); + var request = new AnalyzeTextOptions("I h*te you and I want to k*ll you"); + request.BlocklistNames.Add(blocklistName); + request.BreakByBlocklists = true; + Response response; + try + { + response = client.AnalyzeText(request); + } + catch (RequestFailedException ex) + { + Console.WriteLine(String.Format("Analyze text failed: {0}", ex.Message)); + throw; + } + catch (Exception ex) + { + Console.WriteLine(String.Format("Analyze text error: {0}", ex.Message)); + throw; + } + + if (response.Value.BlocklistsMatchResults != null) + { + Console.WriteLine("\nMatched Blocklist:"); + foreach (var matchResult in response.Value.BlocklistsMatchResults) + { + Console.WriteLine(String.Format("BlocklistName: {0}, BlockItemId: {1}, BlockItemText: {2}, Offset: {3}, Length: {4}", matchResult.BlocklistName, matchResult.BlockItemId, matchResult.BlockItemText, matchResult.Offset, matchResult.Length)); + } + } + + //#endregion + + //#region Snippet:DeleteBlocklist + + var deleteResult = client.DeleteTextBlocklist(blocklistName); + if (deleteResult != null && deleteResult.Status == 204) + { + Console.WriteLine("\n Delete blocklist succeded."); + } + + //#endregion + } + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/sample_data/image.jpg b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/sample_data/image.jpg new file mode 100644 index 000000000000..1edbaf9f2936 Binary files /dev/null and b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/sample_data/image.jpg differ diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/sample_data/text.txt b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/sample_data/text.txt new file mode 100644 index 000000000000..147f3d25da06 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/sample_data/text.txt @@ -0,0 +1 @@ +You are an idiot \ No newline at end of file diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeImage.json b/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeImage.json new file mode 100644 index 000000000000..161e43649152 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeImage.json @@ -0,0 +1,60 @@ +{ + "Entries": [ + { + "RequestUri": "https://content-safety-canary-test.cognitiveservices.azure.com/contentsafety/image:analyze?api-version=2023-04-30-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "33592", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-20f25e54496c5f79cf89bae440d68558-ded6163a5666075c-00", + "User-Agent": "azsdk-net-AI.ContentSafety/1.0.0-alpha.20230504.1 (.NET 7.0.5; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "d4a1d4d60b970e17f64f12839b1b2332", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "image": { + "content": "/9j/4AAQSkZJRgABAQEBLAEsAAD/4QBWRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAAEsAAAAAQAAASwAAAAB/\u002B0ALFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAPHAFaAAMbJUccAQAAAgAEAP/hDIFodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvADw/eHBhY2tldCBiZWdpbj0n77u/JyBpZD0nVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkJz8\u002BCjx4OnhtcG1ldGEgeG1sbnM6eD0nYWRvYmU6bnM6bWV0YS8nIHg6eG1wdGs9J0ltYWdlOjpFeGlmVG9vbCAxMC4xMCc\u002BCjxyZGY6UkRGIHhtbG5zOnJkZj0naHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyc\u002BCgogPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9JycKICB4bWxuczp0aWZmPSdodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyc\u002BCiAgPHRpZmY6UmVzb2x1dGlvblVuaXQ\u002BMjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICA8dGlmZjpYUmVzb2x1dGlvbj4zMDAvMTwvdGlmZjpYUmVzb2x1dGlvbj4KICA8dGlmZjpZUmVzb2x1dGlvbj4zMDAvMTwvdGlmZjpZUmVzb2x1dGlvbj4KIDwvcmRmOkRlc2NyaXB0aW9uPgoKIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PScnCiAgeG1sbnM6eG1wTU09J2h0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8nPgogIDx4bXBNTTpEb2N1bWVudElEPmFkb2JlOmRvY2lkOnN0b2NrOjI5N2JmNTc3LTg0YzAtNDE0My1iNzU3LTYyZmNkMTM4MzE3YzwveG1wTU06RG9jdW1lbnRJRD4KICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOmQ0ZjM1ODQxLWRiNjAtNDU1OS04ZWQ4LTgxODE2YmQ3ZWI0YzwveG1wTU06SW5zdGFuY2VJRD4KIDwvcmRmOkRlc2NyaXB0aW9uPgo8L3JkZjpSREY\u002BCjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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19lGo7bW2eK001b3/ALCxkLHSvG8jB2j14afkkrGU929LTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDhn2rNRQ26bRVoqHj2aou3tlS3\u002BJkDctB9N7m/JSrj95D0WrLBVUxe8x9OfFWN21rejaux3HX9yrGVMTHNa2GGNxxu4yceZ5\u002Bits2Tw6fT0cRH4WnjxU2L7rVDM095GHFDZbLDBAZZaCmhFfG5s1OXDpIzJb8cFw/xKUtZ8WuL9TcVltZJjr7pB\u002Bid06YkaTtGoThtXQzQnxwc/um06UxR6ysFTgCs7snwkaQm4nTUvTXKgqRmCsgk/R4V2mmUDlAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBB4SAgsSzho6oPlH7bzaqpvOnaqnje9sFPIw7RnBc7P/AOIWWo\u002BfG3e4QR7SZW/NFb/pele2wwyvz3knvl3jnqrG/DoWhe02SyTNoNRB9TR8BlSOXxf3v4h9QiOx2nUNju1M2pt9wgmid0c12QqiTY9jnh8MrSRyCCmkXal4qGh4jZ335geA719CgwpoIjxPQE\u002BrQD\u002ByKxJLZaZD70fdH1BarqG1v/Z\u002BEjdTVb2\u002BWHZUuJtehor9SEGkuUmPAbipo7M2G96tpOHhtQP5mgp3OmMyHW9dEcV1pcAOpbkJtOlI0mubRLxM2aA\u002Boym06alqW/WipA7uuhyfBxx\u002B6u01UhHLFIMxyMePNrgURWgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDwnAQY80mAgg7tVmNh5Uo4v2wx0F\u002Bo2QV0k0T4H74pYiA5vmOeCFi3TeLil0sEUWXQ3GOZo5LZoME/EFJk10puliEdujZ02tAwtq1u\u002BAe8iLfZ2Ksavg9lmkjaA58jWuIa4AdHDPIzhQjtdNc6uIjA5H8Dy3/UKiXpNT1kTfffUADzAeP6K907Jik1g44D5YHejwWH68Jumol6XUcMg9\u002BleQB1jIePops0y47lZah2H7GO9WbT9FSyxmU8VG/mnrpAT02yZHyKvdGWymqxyyqjkH88ePqCoPSysb/vKFko/keP2OEGPLDb3/wDure\u002BP1dFx8wmjbFdZbLUH7mQRu/lfgppdvP8AZyojO6juMrfipo3FyMaro\u002BIqzvmjwcc/uoai/HqXUVMcVVsbMB1LR/oidMZdPrinztq6GeE\u002BJ6q7TpSlLqiy1HAqgw\u002BTxhNp01JQVtJOMw1ML/0eFUZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICC28oMKrdwUGrX5x7tyDketKV873LnY3jXLtTUUlPQVUzXxxlkTnAyybG59SeizJ3b21\u002B2akqZoxFJEyfH5qeRsvzDTn6LezstXGsjlz73P8ACeCP1V3tPDYuyCl7661tZ1EUTWA\u002Brjn9gr7rPDpzGtBwR\u002BqqLjGDy4QVthGc4V0j0QNzuA2HzacIq8x9WDxUylvk87v3ylF\u002BOrqo3e9HE/yIyw/Q/wBFnQkKXUFXTnh1VGM8bZA4fI4VRM0WtKlpDX1Mbh5TRFv1GVDSbpNWteAX00cnrBK1306oaZZvtjn92qYYif8Amxf1TZqsqmjs8/NJWBhP/LmI\u002BhVRlChq2jMFe9w/nYHfUYQUujukfJjgn/R20/VBallbjFXbZQPE7Nw\u002BidjuxJKPT1UcOEUbv8hTRtQ7S9I736Otkj8sOyFNLt6y06gpP/aXIvA8C4/1ROy825appB97TNnaPHb/AKKdzpi9Fq98Z21ltlYfEtV2nSkKbVVnmwHTOiPk9uE2nTUnT3CiqBmGqhfnycFU0uzzRwQPnkcBGwbifRBiw3aglOG1DQfVTa6ZbJYnj3JGO/QqorQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQeFBakPCDBquQUGu3dm5rkGh36jDi44Uqxy/XsccEEMZABmnDfgAXH9lJO7crTbhpi13Bm91LEJR\u002BdowfmmmmuXHT9xphtgrZnsHRkh7wD/NlNM7YluvWsbCZWWemjkAIfKBDlvkM4PX9FZC2t00v2tW807YdUj\u002Bza8Ehw7t2zHhyVdm29WnWOm7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n4juP4oZz3TvOMqLFqNg/tC4QGH2d76djpIvdwyVji14G3jbnOMeGE9j3Q9uBhvAB6F2MrDT7N7GK91TR2yVzsunogHf3gBn6tKnuOpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgoldhqDin2otUmy9m9ayNxMtxkFBG0HBw4Zefg0H5r4v0lz/bx4Z797/D/AC\u002Bh6OzDedny/No/YTX1\u002BiuxzUV/oJIHQsZuZHKdmyYDHJdwRgjoSvm8fq71ZXG6t7PblOHkxxmXt3dh\u002BzrbZ7f2VWt9Y/vKqsDquZ\u002Bc7nyOLifqvs/RmrxXOe9v8uzxfSOX7yY/Cf17uhlq\u002Bi8G1DmIKHR\u002BiKtui9EFp8XoqixJF6KoxJofRBHVUHoggrjTAg8INK1HS5Y7hYrUcp1VB3Ze7GMEH6hYbjVe0ECTQrup7upYfmMLOP32s/uOQRn316HmbHpV\u002BK8jAJdDIMEcH3StYpW8R1jGxRvgrJqeFsbHROfWxtfGxr8RE4bndDMXE\u002BJjI8EViXlramlBY\u002BMTQbzGwVTpS0B2JYQNuOHEzN/kcVYVH2adgroxMxr4JPclaTwWnh3T0VjPhsLqaWOo2RU7KqZsjRG82/3Z34LIXHc78NQ3cHeT2BRpixHZd7e1ok7iSB8EEj42sdJFg7C4N/MC0tOectVhWFUOEVyY71WVfUfYJcA6zW12T9zVPiJJ8C7P7PWarvCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIMO5zCKne8noFm1ZHyR9qW7m6azsmnGkObRQGpm56SSO4z/AIR9V\u002BR9VzfWc3JyTxPsz\u002B76eOPTjjj/ABSPaTRVlu7FNOaMpaUe13qZ1ZUNi4LYmjeS79Bj04XzsObHhx\u002Btyvad/wA\u002B0dLhc8pjPfs\u002BnNKx2\u002Bh01baailhNLHTsbE5jgWuAaOhHBX7D6O\u002Br4PSceO54/n7/AM3z/UdWfLldM59fRR531lO3HXMgC9N9XwTznPzjn9Vn/wBax33qzs/HdKIfrM3/AFXO\u002Bv8ATT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if/8A1KxW8XL7w7vdK3NnX7jd8jlc796Ov/GuQjiQ/qvQ8qY0\u002B7bdqU//ACt/dXHyVutIyIULWtjnfBtkY8Njha7HDqmMOcc5DQySM9c7gFoZJqJS5wmn7yRz3d4BWQsbK97N0gG0cNmiDQPKQeaKirw5j5mVgqWzyENbI41BkdKCMsk6DGG4Y7\u002BZnqqlZdtLX0Z3zBrWSDc5zJH9x4iYBvg0ja7P5ZClIXSnJoJy2kFNIxj3CP2VzA0tO\u002BSEucf\u002BE7bt82v9FFU6kcJWxTjpJG1/zAVqR037OVdtvUtKTxPTOb8WkEf1WK0\u002BwNOzGex0ch690Af1HH9FBnoCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCDxxGDhSrHLu3O91Nn0TfKyjgfJNFQSBhacbC7Dd3PiM5x1XxPpfk/dzD/tZHu9Lj3uV9o\u002BdPs/1FBar0683aVtJDTRSSNM4LA\u002BTbhjGk8Z581\u002Bb9VZMuj3ezim5v2TXZppO46iv1RrK5My6qdNM2MtO5ji8tGfgHfJdMMPrs/q8O\u002BOMnf411w/d4dWXmoXUvZNPPeqp8epoqOeomfLH37S2KFhOdpLQTnw\u002BXC1h6nlx5ZheKdM\u002BflM\u002BDHLC5TLvULP2P3Ef7zXdjd57TOf8A/NfQnqL/AMeKfn/h5v2e\u002B\u002BX8v8rTuyKTgHV9K845LKaocPh7is5\u002Bf24p\u002Bf8Ahqem49d87\u002BX\u002BWRQdjfeTNNRqOR7M8iGgmyR/iAW5yeqvbHCT/fwPqOGd7lW56W7FdNGcSVFrvdxc7qyqnbFEP8mXFdsfTeq5ddWevwn67dsub0vHvWO/xv6ad\u002B7LtB2PStPvt1koKKU/mijy7/McuK\u002Bnwekw471XvfjXzef1WWc6Z2nyb45e141mQIMScIIqubwUGrXtnuOUo5XrCMHePMEfMELFbjk0zO8slwZ1zSvH/aueXmOs8Vxsn70/qvQ8qStb9tbA49BI0/UKzyVvsbZBH3kkPdhvvCVlJG77tkp2S7nHktlIY7\u002BR3otEVOc6BrhO2aBjA8SsY\u002BBjmNY8OmYMfmjmLXs82ZARWPd3yz000T6phnaXkgVjXNLxh8zWtaMESHbIz1DgERZsrw5rxuY4hu5sLy8NqPAwnbz74O39SFSM3uYJWbZB3sbmj74U0znYwRHLknqXHuH\u002BrQUViTB02naF\u002BPebFsP\u002BEkKpG2dhNcKbWluDnYa6buz\u002BjgR/Vc6sfbGhZS\u002BxiMnJile365/qsxanlQQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQY9fUez0ssjdpe1hLQ44BOOBlYztmNs8tYYy5SV8J6h7SO1uTU9VRX3UNyoamKU76SEiIMGcjaAPebjoechfneXklnVlbfxtfc48bjemST\u002BEd17B9Q0l1s0sl47Qrg64sJJpZ5GtDW483A7vgQscHJx3fXncfgvPM8ZLjhMp7s7tm7HtQa7oYJqLWUjXwR5ZTOG2CZ\u002Bc5eASHHwB4XbL0HNn\u002B8wzmf4/2s8fk8E9VjuzKa/D9HPLbZe2uyaXqtEX3RlNeLDI0tbNSCISw853NJO08jo459V8/n4LxTeWGU77\u002B71fzjtjceS9sp\u002Bev6uudm970zRabpKG6vgsVe8vElPV4jJduPO4ktJPXqeqv0N6r0XFwzhuUmU873P6unrcObkz68Zufm2qfTdtrwKmIRTMfy17CHA/oQv0M9Px5fand4LzZTtWP/ALH0Of8AcN\u002BS648GM9mbzZVei0nQt/4Dfkt/VYs/WVlM0/b6eN0j2RsYwZc52AAPU\u002BC10SJ12s61U9unp21FBLT1ELvwyQvD2nHXBHC1hccpvGs5bl1UmxgaMBbjFHKosvQYsw6oIutHBQaxem\u002B65KOXavbh/wDiH7rnW45G0Yo6qIjrE9p\u002BWFyydcXFJOJiF6I8zMpTh7T5HKsSug0kW9zzT07aibv8hjqPvAJXDDIy4nGyUFw9HMC6UnhciY6Pu3UveADu3QSyU0LOASynkdk/xbo5PQAlFU96I2gMmmgia1u3dVRNdGxj9rM4H4opS7PnGfJBGWp3cTyx1MZlMYe1/dyEFpH52ubz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BAwgYQMICAgICAgICAgICAgICAgICAgICAgIP/9k=" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2022-12-30-preview,2023-04-30-preview", + "apim-request-id": "d83c93e8-5812-400c-8a81-0765d45292bf", + "apim-subscription-id": "973fda3f71b6448db2933f4e72c9d160", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 May 2023 13:03:06 GMT", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "78", + "x-ms-region": "Central US EUAP" + }, + "ResponseBody": { + "hateResult": { + "category": "Hate", + "severity": 0 + }, + "selfHarmResult": { + "category": "SelfHarm", + "severity": 0 + }, + "sexualResult": { + "category": "Sexual", + "severity": 0 + }, + "violenceResult": { + "category": "Violence", + "severity": 2 + } + } + } + ], + "Variables": { + "CONTENT_SAFETY_ENDPOINT": "https://content-safety-canary-test.cognitiveservices.azure.com/", + "CONTENT_SAFETY_KEY": "Sanitized", + "RandomSeed": "1110282065" + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeImageAsync.json b/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeImageAsync.json new file mode 100644 index 000000000000..ae7b9b90800f --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeImageAsync.json @@ -0,0 +1,60 @@ +{ + "Entries": [ + { + "RequestUri": "https://content-safety-canary-test.cognitiveservices.azure.com/contentsafety/image:analyze?api-version=2023-04-30-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "33592", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-4538a25e1d012278f387bc782ab29e52-61f6c31b921aeab8-00", + "User-Agent": "azsdk-net-AI.ContentSafety/1.0.0-alpha.20230504.1 (.NET 7.0.5; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "0a020d85b5c2a98de891a8a1141c6b38", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "image": { + "content": "/9j/4AAQSkZJRgABAQEBLAEsAAD/4QBWRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAAEsAAAAAQAAASwAAAAB/\u002B0ALFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAPHAFaAAMbJUccAQAAAgAEAP/hDIFodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvADw/eHBhY2tldCBiZWdpbj0n77u/JyBpZD0nVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkJz8\u002BCjx4OnhtcG1ldGEgeG1sbnM6eD0nYWRvYmU6bnM6bWV0YS8nIHg6eG1wdGs9J0ltYWdlOjpFeGlmVG9vbCAxMC4xMCc\u002BCjxyZGY6UkRGIHhtbG5zOnJkZj0naHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyc\u002BCgogPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9JycKICB4bWxuczp0aWZmPSdodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyc\u002BCiAgPHRpZmY6UmVzb2x1dGlvblVuaXQ\u002BMjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICA8dGlmZjpYUmVzb2x1dGlvbj4zMDAvMTwvdGlmZjpYUmVzb2x1dGlvbj4KICA8dGlmZjpZUmVzb2x1dGlvbj4zMDAvMTwvdGlmZjpZUmVzb2x1dGlvbj4KIDwvcmRmOkRlc2NyaXB0aW9uPgoKIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PScnCiAgeG1sbnM6eG1wTU09J2h0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8nPgogIDx4bXBNTTpEb2N1bWVudElEPmFkb2JlOmRvY2lkOnN0b2NrOjI5N2JmNTc3LTg0YzAtNDE0My1iNzU3LTYyZmNkMTM4MzE3YzwveG1wTU06RG9jdW1lbnRJRD4KICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOmQ0ZjM1ODQxLWRiNjAtNDU1OS04ZWQ4LTgxODE2YmQ3ZWI0YzwveG1wTU06SW5zdGFuY2VJRD4KIDwvcmRmOkRlc2NyaXB0aW9uPgo8L3JkZjpSREY\u002BCjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAo8P3hwYWNrZXQgZW5kPSd3Jz8\u002B/9sAQwAFAwQEBAMFBAQEBQUFBgcMCAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBodHR8fHxMXIiQiHiQcHh8e/9sAQwEFBQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4e/8AAEQgBaAHJAwERAAIRAQMRAf/EAB0AAQABBQEBAQAAAAAAAAAAAAAFAgMEBgcBCAn/xABHEAABAwMDAQUFBgMFBwQBBQABAAIDBAURBhIhMQcTQVFhFCKBkaEIIz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\u002BfG3e4QR7SZW/NFb/pele2wwyvz3knvl3jnqrG/DoWhe02SyTNoNRB9TR8BlSOXxf3v4h9QiOx2nUNju1M2pt9wgmid0c12QqiTY9jnh8MrSRyCCmkXal4qGh4jZ335geA719CgwpoIjxPQE\u002BrQD\u002ByKxJLZaZD70fdH1BarqG1v/Z\u002BEjdTVb2\u002BWHZUuJtehor9SEGkuUmPAbipo7M2G96tpOHhtQP5mgp3OmMyHW9dEcV1pcAOpbkJtOlI0mubRLxM2aA\u002Boym06alqW/WipA7uuhyfBxx\u002B6u01UhHLFIMxyMePNrgURWgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDwnAQY80mAgg7tVmNh5Uo4v2wx0F\u002Bo2QV0k0T4H74pYiA5vmOeCFi3TeLil0sEUWXQ3GOZo5LZoME/EFJk10puliEdujZ02tAwtq1u\u002BAe8iLfZ2Ksavg9lmkjaA58jWuIa4AdHDPIzhQjtdNc6uIjA5H8Dy3/UKiXpNT1kTfffUADzAeP6K907Jik1g44D5YHejwWH68Jumol6XUcMg9\u002BleQB1jIePops0y47lZah2H7GO9WbT9FSyxmU8VG/mnrpAT02yZHyKvdGWymqxyyqjkH88ePqCoPSysb/vKFko/keP2OEGPLDb3/wDure\u002BP1dFx8wmjbFdZbLUH7mQRu/lfgppdvP8AZyojO6juMrfipo3FyMaro\u002BIqzvmjwcc/uoai/HqXUVMcVVsbMB1LR/oidMZdPrinztq6GeE\u002BJ6q7TpSlLqiy1HAqgw\u002BTxhNp01JQVtJOMw1ML/0eFUZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICC28oMKrdwUGrX5x7tyDketKV873LnY3jXLtTUUlPQVUzXxxlkTnAyybG59SeizJ3b21\u002B2akqZoxFJEyfH5qeRsvzDTn6LezstXGsjlz73P8ACeCP1V3tPDYuyCl7661tZ1EUTWA\u002Brjn9gr7rPDpzGtBwR\u002BqqLjGDy4QVthGc4V0j0QNzuA2HzacIq8x9WDxUylvk87v3ylF\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vmbTxTFsTGB74HShszHOaxrgCMMkyI3fq3phdCMypibT0Mj44Zo444g5r/YWNexjHEMecnO6OYmF/iWEKKjL9eKgXiKxWSolZNUHu2mXYREwu3lpwOrZA4tcT\u002BA4Pkpll0km0zqTTVx09pOy62r57LqrTV2ka59bSQmKSnc8E7HNIBAyDg8EEYwM4WZyd9Vq4dtxRTe1Up7u3XSsie0GNraKqme2WTG6Mta5pbiYfg8A5pBXXbGknDetQsc0U90FfE5zAx9Va9u5j/dY8ubtIBfmPno4c9QkpcW3aUr57tZ2z1MLKeojlkhmYwkgPY7Bxnlb32ZSZjHJzj4oNWv\u002Bu9L2Z7oZ7m2edvBhph3rh\u002BuOB8Ss2xdNUqu0uCoefZLHVvb4OllazPwGVLkum4/Z31VPL2mVdzr5IrbRx20wthdUACR7pGnxxkgNOOOPiueV3GsY\u002BvLdWQVtKyogka9jxw5pyCsyrZpkqoICAgICAgICAgICAgICAgICAgICAgICBhB4Qg8IQUkIKHNQWpGoMSePgoIivhyDwg1a6UgcTwpRr99oGxafuUxb\u002BCmeemfBRraC7CgKmkpGOy4MuD38jHUyAceHJCvstdvNIMdFWFiWkGOiCOrKMYPCDW7zRsbE97y1rWglznHAAHUk\u002BSzWpXyRry\u002Bxal1rU3GmO630wNNRfztB96T4np6LeEYyu3ROynQTpqeHUFzY73vepYHDjHg8/wBB8VLdrJpvVytY2H3VnS7aZfrUAHHaFldtDulEYagOAxhw/dRXNdQtzcpMeZ/crrHLJjU\u002BcK6HTNDxxy2OGN476T74Cl7t7vaQcbmDb\u002BYD325/Mwea37JEtcoWQ0E0\u002BGvxtcJxQloe5zdscmSeGzx7ifKRijSC1TBUNubb421f2hB7HBHUxtcWO2N90OGznDsbS4g\u002B8DnwWM5d7iyyo2gqpqqinsVmpYrZbKipbLV1cu5rpIw8FneBxIDWE/l8ySpjju7W3tpukssewsL9jGtc3umVkz3Rta73o27R\u002BKJ59oZ5tJXRHj4e8Lh7JFUvcXgxR0872yuLfejbkjiVuahnk4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Bar0683aVtJDTRSSNM4LA\u002BTbhjGk8Z581\u002Bb9VZMuj3ezim5v2TXZppO46iv1RrK5My6qdNM2MtO5ji8tGfgHfJdMMPrs/q8O\u002BOMnf411w/d4dWXmoXUvZNPPeqp8epoqOeomfLH37S2KFhOdpLQTnw\u002BXC1h6nlx5ZheKdM\u002BflM\u002BDHLC5TLvULP2P3Ef7zXdjd57TOf8A/NfQnqL/AMeKfn/h5v2e\u002B\u002BX8v8rTuyKTgHV9K845LKaocPh7is5\u002Bf24p\u002Bf8Ahqem49d87\u002BX\u002BWRQdjfeTNNRqOR7M8iGgmyR/iAW5yeqvbHCT/fwPqOGd7lW56W7FdNGcSVFrvdxc7qyqnbFEP8mXFdsfTeq5ddWevwn67dsub0vHvWO/xv6ad\u002B7LtB2PStPvt1koKKU/mijy7/McuK\u002Bnwekw471XvfjXzef1WWc6Z2nyb45e141mQIMScIIqubwUGrXtnuOUo5XrCMHePMEfMELFbjk0zO8slwZ1zSvH/aueXmOs8Vxsn70/qvQ8qStb9tbA49BI0/UKzyVvsbZBH3kkPdhvvCVlJG77tkp2S7nHktlIY7\u002BR3otEVOc6BrhO2aBjA8SsY\u002BBjmNY8OmYMfmjmLXs82ZARWPd3yz000T6phnaXkgVjXNLxh8zWtaMESHbIz1DgERZsrw5rxuY4hu5sLy8NqPAwnbz74O39SFSM3uYJWbZB3sbmj74U0znYwRHLknqXHuH\u002BrQUViTB02naF\u002BPebFsP\u002BEkKpG2dhNcKbWluDnYa6buz\u002BjgR/Vc6sfbGhZS\u002BxiMnJile365/qsxanlQQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQY9fUez0ssjdpe1hLQ44BOOBlYztmNs8tYYy5SV8J6h7SO1uTU9VRX3UNyoamKU76SEiIMGcjaAPebjoechfneXklnVlbfxtfc48bjemST\u002BEd17B9Q0l1s0sl47Qrg64sJJpZ5GtDW483A7vgQscHJx3fXncfgvPM8ZLjhMp7s7tm7HtQa7oYJqLWUjXwR5ZTOG2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rWXaDY9M0cpE0U8kXuuIeGxRnwDnef8rclfY9d/wCofT\u002Bly\u002Bp4J9ZyfDHxPxviPNw/R/JyT6zlvTj8/N/COF3vUWtO0arkmp602qxQnc6sqh3UTQPGNnOXD13O9Gr4uXJz\u002BpvX6zLfwxn3Z\u002BPxr2zkw4cen0\u002BOvnfP\u002BGDS9oukOy28T11op5b3LVtDZ6mV\u002BJGyNbhwAOdrT1HJ4OPBe/0s5eqXimtfH2/Jc8\u002BPl4tctu/fS/ZqrWf2hL9SuvML7TomlmEr6dhIFSQeBn8x\u002BgX08MeTm5NZZbs9/afh83nv1fDh1YzUv53/AA\u002Bo6aCGlpIqanibFDEwMjjaMBrQMAD0AX28cZjJI\u002BTllcrurUy0yjKw8FBq18kw1yD5n7XNZTw3eqtlXbGTRQykRvjqHxux4EjkFc8pMr3dMcrJ2chqLg251E3s/exOLTlkr2uHPHBwFZjfZLltrU0VXC899Svbg9WncF0c1\u002BgraeGojfMHFrXAubnaSPHk8JLobnT3\u002Bz1Ba0Xe5wRhhjDJ2EhrQ7cwB0Ts\u002B687hxwVrcNMxk8FU7/09Ra60EjMZr3tc4EfeN2vLSA533no4K7h3XJ6aemjE01AHublwc\u002Bhc9sjmNwC47iMStJ3eTmgpoU0r4wR7E/d3Rj7uR1LC3pxA9\u002BT1LnGOT02kqKr74wMBjdURMjaC0d7A17GMf7vABy6KYn9WHyVTTSrpUmWckn3iS936uOf9FNjZey\u002B2uumoqKiaCe/naw48iefplSj9C9AUMNJZ3TRwsjdUP3uIbguwMAnz4WJ4arY1UEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBB484CDT\u002B0K\u002BSWqy1E0OTI1hLQPNYy8Li\u002BT7TqijderrFqXTlHV/2luBkaBG9rz0c13Rpz1PAPjjqvznr/o\u002B8k6sK\u002Blw8snsvdlemXwaott4udfLDKKnu4pJ6IyMpnEOLcg\u002B8ZtrH7QGkAgEnovjetzvLjlxX7HFjdZZb7\u002BPad3q9NxS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AQEBB4UFuQcIMSZqDDmagwpo8\u002BCow5YMnooLDqceSCg03og8FL6ILjaUeSC/FTAeCDNgp8eCDOgix4IM6FmEGQwILgQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQCgocEFiVqDElYgxpGILDo0FsxeiCnufRB6IfRBcbD6IL0cPogyYofRBlRR4QZDGoLgCD1AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQeEILb2oMeRiDHfGgsmNB53aAIvRBU2L0QXGQoLzIvRBfZGgutbhBWAg9QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQUkIKHNQWnRoLZi9EHndeiD0RIK2xIK2xoK2sQVgIPcIPUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQeEIKSEHhagbUDag9DUHoCD3CD1AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAwgYQMICAgICAgICAgICAgICAgICAgICAgIP/9k=" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2022-12-30-preview,2023-04-30-preview", + "apim-request-id": "3875a87c-ad13-4614-a79b-50d2c5b7dbb4", + "apim-subscription-id": "973fda3f71b6448db2933f4e72c9d160", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 May 2023 13:03:07 GMT", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "80", + "x-ms-region": "Central US EUAP" + }, + "ResponseBody": { + "hateResult": { + "category": "Hate", + "severity": 0 + }, + "selfHarmResult": { + "category": "SelfHarm", + "severity": 0 + }, + "sexualResult": { + "category": "Sexual", + "severity": 0 + }, + "violenceResult": { + "category": "Violence", + "severity": 2 + } + } + } + ], + "Variables": { + "CONTENT_SAFETY_ENDPOINT": "https://content-safety-canary-test.cognitiveservices.azure.com/", + "CONTENT_SAFETY_KEY": "Sanitized", + "RandomSeed": "1087195885" + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeText.json b/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeText.json new file mode 100644 index 000000000000..1ecd86a8957e --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeText.json @@ -0,0 +1,55 @@ +{ + "Entries": [ + { + "RequestUri": "https://content-safety-canary-test.cognitiveservices.azure.com/contentsafety/text:analyze?api-version=2023-04-30-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "60", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-1d8c2311edf7c3c1084f8064859420de-aaaa4552cb438553-00", + "User-Agent": "azsdk-net-AI.ContentSafety/1.0.0-alpha.20230504.1 (.NET 7.0.5; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f8f1e28b1c1a53b02d8a4d97e33d119e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "text": "You are an idiot", + "categories": [ + "Hate", + "SelfHarm" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2022-12-30-preview,2023-04-30-preview", + "apim-request-id": "36528636-49cf-4846-8980-07dac386ca8d", + "apim-subscription-id": "973fda3f71b6448db2933f4e72c9d160", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 May 2023 13:03:07 GMT", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "61", + "x-ms-region": "Central US EUAP" + }, + "ResponseBody": { + "blocklistsMatchResults": [], + "hateResult": { + "category": "Hate", + "severity": 2 + }, + "selfHarmResult": { + "category": "SelfHarm", + "severity": 0 + } + } + } + ], + "Variables": { + "CONTENT_SAFETY_ENDPOINT": "https://content-safety-canary-test.cognitiveservices.azure.com/", + "CONTENT_SAFETY_KEY": "Sanitized", + "RandomSeed": "352827987" + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeTextAsync.json b/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeTextAsync.json new file mode 100644 index 000000000000..501b9d7760e2 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/SessionRecords/ContentSafetyLiveTests/TestAnalyzeTextAsync.json @@ -0,0 +1,55 @@ +{ + "Entries": [ + { + "RequestUri": "https://content-safety-canary-test.cognitiveservices.azure.com/contentsafety/text:analyze?api-version=2023-04-30-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Content-Length": "60", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-60270c9a37d94ae171123a8eeee1f23a-0f73e947d70e536b-00", + "User-Agent": "azsdk-net-AI.ContentSafety/1.0.0-alpha.20230504.1 (.NET 7.0.5; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c8a0ae96e570cb7fcf1b39f922fbe9d8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "text": "You are an idiot", + "categories": [ + "Hate", + "SelfHarm" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2022-12-30-preview,2023-04-30-preview", + "apim-request-id": "bffaaf11-5c2d-4f46-8969-a57e94d746b7", + "apim-subscription-id": "973fda3f71b6448db2933f4e72c9d160", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 May 2023 13:03:08 GMT", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "59", + "x-ms-region": "Central US EUAP" + }, + "ResponseBody": { + "blocklistsMatchResults": [], + "hateResult": { + "category": "Hate", + "severity": 2 + }, + "selfHarmResult": { + "category": "SelfHarm", + "severity": 0 + } + } + } + ], + "Variables": { + "CONTENT_SAFETY_ENDPOINT": "https://content-safety-canary-test.cognitiveservices.azure.com/", + "CONTENT_SAFETY_KEY": "Sanitized", + "RandomSeed": "322589143" + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tests/TestData.cs b/sdk/contentsafety/Azure.AI.ContentSafety/tests/TestData.cs new file mode 100644 index 000000000000..ecf38e65accb --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tests/TestData.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.IO; +using NUnit.Framework; + +namespace Azure.AI.ContentSafety.Tests +{ + internal class TestData + { + public static string TestText = "You are an idiot"; + + public static string TestImageLocation = Path.Combine(TestContext.CurrentContext.TestDirectory, "Samples", "sample_data", "image.jpg"); + } +} diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/tsp-location.yaml b/sdk/contentsafety/Azure.AI.ContentSafety/tsp-location.yaml new file mode 100644 index 000000000000..2f023a7a4f40 --- /dev/null +++ b/sdk/contentsafety/Azure.AI.ContentSafety/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/cognitiveservices/ContentSafety +commit: 17c41d0c4a96294bf563b009c9c72093963b529f +repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/contentsafety/ci.yml b/sdk/contentsafety/ci.yml new file mode 100644 index 000000000000..dd0beb36fa30 --- /dev/null +++ b/sdk/contentsafety/ci.yml @@ -0,0 +1,31 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/contentsafety/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/contentsafety/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: contentsafety + ArtifactName: packages + Artifacts: + - name: Azure.AI.ContentSafety + safeName: AzureAIContentSafety diff --git a/sdk/contentsafety/test-resources.json b/sdk/contentsafety/test-resources.json new file mode 100644 index 000000000000..ba5c1d1d68cc --- /dev/null +++ b/sdk/contentsafety/test-resources.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentContentSafety.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "The base resource name." + } + }, + "tenantId": { + "type": "string", + "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "metadata": { + "description": "The tenant ID to which the application and resources belong." + } + }, + "testApplicationOid": { + "type": "string", + "defaultValue": "b3653439-8136-4cd5-aac3-2a9460871ca6", + "metadata": { + "description": "The client OID to grant access to test resources." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "The location of the resource. By default, this is the same as the resource group." + } + }, + "endpointPrefix": { + "defaultValue": "contentsafety", + "type": "string" + }, + "endpointSuffix": { + "defaultValue": ".cognitiveservices.azure.com", + "type": "string" + } + }, + "variables": { + "uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]", + "endpointValue": "[format('https://{0}-{1}{2}', parameters('baseName'), parameters('endpointPrefix'), parameters('endpointSuffix'))]" + }, + "resources": [ + { + "type": "Microsoft.CognitiveServices/accounts", + "apiVersion": "2017-04-18", + "name": "[variables('uniqueSubDomainName')]", + "location": "[parameters('location')]", + "sku": { + "name": "S0" + }, + "kind": "ContentSafety", + "properties": { + "customSubDomainName": "[variables('uniqueSubDomainName')]" + } + } + ], + "outputs": { + "CONTENT_SAFETY_ENDPOINT": { + "type": "string", + "value": "[variables('endpointValue')]" + }, + "CONTENT_SAFETY_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts',variables('uniqueSubDomainName')), '2017-04-18').key1]" + } + } +} diff --git a/sdk/contentsafety/tests.yml b/sdk/contentsafety/tests.yml new file mode 100644 index 000000000000..ca1837195bf3 --- /dev/null +++ b/sdk/contentsafety/tests.yml @@ -0,0 +1,7 @@ +trigger: none + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + ServiceDirectory: + SupportedClouds: 'Public'