diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CommunicationJobRouterClientBuilderExtensions.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CommunicationJobRouterClientBuilderExtensions.cs
index 87d5e0cfe1b4..e0d40560226c 100644
--- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/CommunicationJobRouterClientBuilderExtensions.cs
+++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/CommunicationJobRouterClientBuilderExtensions.cs
@@ -17,18 +17,18 @@ internal static partial class CommunicationJobRouterClientBuilderExtensions
/// The builder to register with.
/// Uri of your Communication resource.
public static IAzureClientBuilder AddJobRouterAdministrationClient(this TBuilder builder, Uri endpoint)
- where TBuilder : IAzureClientFactoryBuilder
+ where TBuilder : IAzureClientFactoryBuilderWithCredential
{
- return builder.RegisterClientFactory((options) => new JobRouterAdministrationClient(endpoint, options));
+ return builder.RegisterClientFactory((options, cred) => new JobRouterAdministrationClient(endpoint, cred, options));
}
/// Registers a instance.
/// The builder to register with.
/// Uri of your Communication resource.
public static IAzureClientBuilder AddJobRouterClient(this TBuilder builder, Uri endpoint)
- where TBuilder : IAzureClientFactoryBuilder
+ where TBuilder : IAzureClientFactoryBuilderWithCredential
{
- return builder.RegisterClientFactory((options) => new JobRouterClient(endpoint, options));
+ return builder.RegisterClientFactory((options, cred) => new JobRouterClient(endpoint, cred, options));
}
/// Registers a instance.
diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Docs/JobRouterAdministrationClient.xml b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Docs/JobRouterAdministrationClient.xml
new file mode 100644
index 000000000000..4412ef4cf06a
--- /dev/null
+++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Docs/JobRouterAdministrationClient.xml
@@ -0,0 +1,317 @@
+
+
+
+
+
+This sample shows how to call GetDistributionPolicyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.GetDistributionPolicyAsync("MainDistributionPolicy");
+]]>
+
+
+
+This sample shows how to call GetDistributionPolicy.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.GetDistributionPolicy("MainDistributionPolicy");
+]]>
+
+
+
+This sample shows how to call GetDistributionPolicyAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.GetDistributionPolicyAsync("MainDistributionPolicy", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call GetDistributionPolicy and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.GetDistributionPolicy("MainDistributionPolicy", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteDistributionPolicyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.DeleteDistributionPolicyAsync("MainDistributionPolicy");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteDistributionPolicy.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.DeleteDistributionPolicy("MainDistributionPolicy");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetClassificationPolicyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.GetClassificationPolicyAsync("MainClassificationPolicy");
+]]>
+
+
+
+This sample shows how to call GetClassificationPolicy.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.GetClassificationPolicy("MainClassificationPolicy");
+]]>
+
+
+
+This sample shows how to call GetClassificationPolicyAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.GetClassificationPolicyAsync("MainClassificationPolicy", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call GetClassificationPolicy and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.GetClassificationPolicy("MainClassificationPolicy", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteClassificationPolicyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.DeleteClassificationPolicyAsync("MainClassificationPolicy");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteClassificationPolicy.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.DeleteClassificationPolicy("MainClassificationPolicy");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetExceptionPolicyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.GetExceptionPolicyAsync("MainExceptionPolicy");
+]]>
+
+
+
+This sample shows how to call GetExceptionPolicy.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.GetExceptionPolicy("MainExceptionPolicy");
+]]>
+
+
+
+This sample shows how to call GetExceptionPolicyAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.GetExceptionPolicyAsync("MainExceptionPolicy", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call GetExceptionPolicy and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.GetExceptionPolicy("MainExceptionPolicy", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteExceptionPolicyAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.DeleteExceptionPolicyAsync("MainExceptionPolicy");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteExceptionPolicy.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.DeleteExceptionPolicy("MainExceptionPolicy");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetQueueAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.GetQueueAsync("MainQueue");
+]]>
+
+
+
+This sample shows how to call GetQueue.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.GetQueue("MainQueue");
+]]>
+
+
+
+This sample shows how to call GetQueueAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.GetQueueAsync("MainQueue", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call GetQueue and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.GetQueue("MainQueue", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteQueueAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = await client.DeleteQueueAsync("MainQueue");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteQueue.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+Response response = client.DeleteQueue("MainQueue");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/Docs/JobRouterClient.xml b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Docs/JobRouterClient.xml
new file mode 100644
index 000000000000..8b3266aee793
--- /dev/null
+++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/Docs/JobRouterClient.xml
@@ -0,0 +1,325 @@
+
+
+
+
+
+This sample shows how to call GetJobAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.GetJobAsync("8780b28c-7079-4de1-9143-4d369289e958");
+]]>
+
+
+
+This sample shows how to call GetJob.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.GetJob("8780b28c-7079-4de1-9143-4d369289e958");
+]]>
+
+
+
+This sample shows how to call GetJobAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.GetJobAsync("8780b28c-7079-4de1-9143-4d369289e958", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call GetJob and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.GetJob("8780b28c-7079-4de1-9143-4d369289e958", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteJobAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.DeleteJobAsync("8780b28c-7079-4de1-9143-4d369289e958");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteJob.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.DeleteJob("8780b28c-7079-4de1-9143-4d369289e958");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call GetQueuePositionAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.GetQueuePositionAsync("8780b28c-7079-4de1-9143-4d369289e958");
+]]>
+
+
+
+This sample shows how to call GetQueuePosition.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.GetQueuePosition("8780b28c-7079-4de1-9143-4d369289e958");
+]]>
+
+
+
+This sample shows how to call GetQueuePositionAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.GetQueuePositionAsync("8780b28c-7079-4de1-9143-4d369289e958", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("jobId").ToString());
+Console.WriteLine(result.GetProperty("position").ToString());
+Console.WriteLine(result.GetProperty("queueId").ToString());
+Console.WriteLine(result.GetProperty("queueLength").ToString());
+Console.WriteLine(result.GetProperty("estimatedWaitTimeMinutes").ToString());
+]]>
+
+
+
+This sample shows how to call GetQueuePosition and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.GetQueuePosition("8780b28c-7079-4de1-9143-4d369289e958", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("jobId").ToString());
+Console.WriteLine(result.GetProperty("position").ToString());
+Console.WriteLine(result.GetProperty("queueId").ToString());
+Console.WriteLine(result.GetProperty("queueLength").ToString());
+Console.WriteLine(result.GetProperty("estimatedWaitTimeMinutes").ToString());
+]]>
+
+
+
+This sample shows how to call AcceptJobOfferAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.AcceptJobOfferAsync("DefaultWorker", "1d5896f3-8b54-40be-82d3-910323f5e2af");
+]]>
+
+
+
+This sample shows how to call AcceptJobOffer.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.AcceptJobOffer("DefaultWorker", "1d5896f3-8b54-40be-82d3-910323f5e2af");
+]]>
+
+
+
+This sample shows how to call AcceptJobOfferAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.AcceptJobOfferAsync("DefaultWorker", "1d5896f3-8b54-40be-82d3-910323f5e2af", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("assignmentId").ToString());
+Console.WriteLine(result.GetProperty("jobId").ToString());
+Console.WriteLine(result.GetProperty("workerId").ToString());
+]]>
+
+
+
+This sample shows how to call AcceptJobOffer and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.AcceptJobOffer("DefaultWorker", "1d5896f3-8b54-40be-82d3-910323f5e2af", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("assignmentId").ToString());
+Console.WriteLine(result.GetProperty("jobId").ToString());
+Console.WriteLine(result.GetProperty("workerId").ToString());
+]]>
+
+
+
+This sample shows how to call GetQueueStatisticsAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.GetQueueStatisticsAsync("MainQueue");
+]]>
+
+
+
+This sample shows how to call GetQueueStatistics.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.GetQueueStatistics("MainQueue");
+]]>
+
+
+
+This sample shows how to call GetQueueStatisticsAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.GetQueueStatisticsAsync("MainQueue", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("queueId").ToString());
+Console.WriteLine(result.GetProperty("length").ToString());
+]]>
+
+
+
+This sample shows how to call GetQueueStatistics and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.GetQueueStatistics("MainQueue", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("queueId").ToString());
+Console.WriteLine(result.GetProperty("length").ToString());
+]]>
+
+
+
+This sample shows how to call GetWorkerAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.GetWorkerAsync("DefaultWorker");
+]]>
+
+
+
+This sample shows how to call GetWorker.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.GetWorker("DefaultWorker");
+]]>
+
+
+
+This sample shows how to call GetWorkerAsync and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.GetWorkerAsync("DefaultWorker", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call GetWorker and parse the result.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.GetWorker("DefaultWorker", null);
+
+JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+Console.WriteLine(result.GetProperty("etag").ToString());
+Console.WriteLine(result.GetProperty("id").ToString());
+]]>
+
+
+
+This sample shows how to call DeleteWorkerAsync.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = await client.DeleteWorkerAsync("DefaultWorker");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
+This sample shows how to call DeleteWorker.
+");
+TokenCredential credential = new DefaultAzureCredential();
+JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+Response response = client.DeleteWorker("DefaultWorker");
+
+Console.WriteLine(response.Status);
+]]>
+
+
+
\ No newline at end of file
diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterAdministrationClient.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterAdministrationClient.cs
index 40ca039656c1..88c12de1c667 100644
--- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterAdministrationClient.cs
+++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterAdministrationClient.cs
@@ -18,6 +18,8 @@ namespace Azure.Communication.JobRouter
/// The JobRouterAdministration service client.
public partial class JobRouterAdministrationClient
{
+ private static readonly string[] AuthorizationScopes = new string[] { "https://communication.azure.com/.default" };
+ private readonly TokenCredential _tokenCredential;
private readonly HttpPipeline _pipeline;
private readonly Uri _endpoint;
private readonly string _apiVersion;
@@ -28,6 +30,14 @@ public partial class JobRouterAdministrationClient
/// The HTTP pipeline for sending and receiving REST requests and responses.
public virtual HttpPipeline Pipeline => _pipeline;
+ /// Initializes a new instance of JobRouterAdministrationClient.
+ /// Uri of your Communication resource.
+ /// A credential used to authenticate to an Azure Service.
+ /// or is null.
+ public JobRouterAdministrationClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new JobRouterClientOptions())
+ {
+ }
+
///
/// [Protocol Method] Creates or updates a distribution policy.
///
@@ -125,6 +135,7 @@ internal virtual Response UpsertDistributionPolicy(string distributionPolicyId,
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> GetDistributionPolicyAsync(string distributionPolicyId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(distributionPolicyId, nameof(distributionPolicyId));
@@ -139,6 +150,7 @@ public virtual async Task> GetDistributionPolicyAsy
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual Response GetDistributionPolicy(string distributionPolicyId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(distributionPolicyId, nameof(distributionPolicyId));
@@ -169,6 +181,7 @@ public virtual Response GetDistributionPolicy(string distrib
/// 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 GetDistributionPolicyAsync(string distributionPolicyId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(distributionPolicyId, nameof(distributionPolicyId));
@@ -208,6 +221,7 @@ public virtual async Task GetDistributionPolicyAsync(string distributi
/// 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 GetDistributionPolicy(string distributionPolicyId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(distributionPolicyId, nameof(distributionPolicyId));
@@ -243,6 +257,7 @@ public virtual Response GetDistributionPolicy(string distributionPolicyId, Reque
/// is an empty string, and was expected to be non-empty.
/// Service returned a non-success status code.
/// The response returned from the service.
+ ///
public virtual async Task DeleteDistributionPolicyAsync(string distributionPolicyId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(distributionPolicyId, nameof(distributionPolicyId));
@@ -278,6 +293,7 @@ public virtual async Task DeleteDistributionPolicyAsync(string distrib
/// 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 DeleteDistributionPolicy(string distributionPolicyId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(distributionPolicyId, nameof(distributionPolicyId));
@@ -393,6 +409,7 @@ internal virtual Response UpsertClassificationPolicy(string classificationPolicy
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> GetClassificationPolicyAsync(string classificationPolicyId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(classificationPolicyId, nameof(classificationPolicyId));
@@ -407,6 +424,7 @@ public virtual async Task> GetClassificationPolic
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual Response GetClassificationPolicy(string classificationPolicyId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(classificationPolicyId, nameof(classificationPolicyId));
@@ -437,6 +455,7 @@ public virtual Response GetClassificationPolicy(string cla
/// 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 GetClassificationPolicyAsync(string classificationPolicyId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(classificationPolicyId, nameof(classificationPolicyId));
@@ -476,6 +495,7 @@ public virtual async Task GetClassificationPolicyAsync(string classifi
/// 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 GetClassificationPolicy(string classificationPolicyId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(classificationPolicyId, nameof(classificationPolicyId));
@@ -511,6 +531,7 @@ public virtual Response GetClassificationPolicy(string classificationPolicyId, R
/// 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 DeleteClassificationPolicyAsync(string classificationPolicyId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(classificationPolicyId, nameof(classificationPolicyId));
@@ -546,6 +567,7 @@ public virtual async Task DeleteClassificationPolicyAsync(string class
/// 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 DeleteClassificationPolicy(string classificationPolicyId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(classificationPolicyId, nameof(classificationPolicyId));
@@ -661,6 +683,7 @@ internal virtual Response UpsertExceptionPolicy(string exceptionPolicyId, Reques
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> GetExceptionPolicyAsync(string exceptionPolicyId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(exceptionPolicyId, nameof(exceptionPolicyId));
@@ -675,6 +698,7 @@ public virtual async Task> GetExceptionPolicyAsync(str
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual Response GetExceptionPolicy(string exceptionPolicyId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(exceptionPolicyId, nameof(exceptionPolicyId));
@@ -705,6 +729,7 @@ public virtual Response GetExceptionPolicy(string exceptionPoli
/// 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 GetExceptionPolicyAsync(string exceptionPolicyId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(exceptionPolicyId, nameof(exceptionPolicyId));
@@ -744,6 +769,7 @@ public virtual async Task GetExceptionPolicyAsync(string exceptionPoli
/// 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 GetExceptionPolicy(string exceptionPolicyId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(exceptionPolicyId, nameof(exceptionPolicyId));
@@ -779,6 +805,7 @@ public virtual Response GetExceptionPolicy(string exceptionPolicyId, RequestCont
/// 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 DeleteExceptionPolicyAsync(string exceptionPolicyId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(exceptionPolicyId, nameof(exceptionPolicyId));
@@ -814,6 +841,7 @@ public virtual async Task DeleteExceptionPolicyAsync(string exceptionP
/// 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 DeleteExceptionPolicy(string exceptionPolicyId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(exceptionPolicyId, nameof(exceptionPolicyId));
@@ -929,6 +957,7 @@ internal virtual Response UpsertQueue(string queueId, RequestContent content, Re
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> GetQueueAsync(string queueId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -943,6 +972,7 @@ public virtual async Task> GetQueueAsync(string queueId, C
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual Response GetQueue(string queueId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -973,6 +1003,7 @@ public virtual Response GetQueue(string queueId, CancellationToken
/// 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 GetQueueAsync(string queueId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -1012,6 +1043,7 @@ public virtual async Task GetQueueAsync(string queueId, RequestContext
/// 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 GetQueue(string queueId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -1047,6 +1079,7 @@ public virtual Response GetQueue(string queueId, RequestContext context)
/// is an empty string, and was expected to be non-empty.
/// Service returned a non-success status code.
/// The response returned from the service.
+ ///
public virtual async Task DeleteQueueAsync(string queueId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -1082,6 +1115,7 @@ public virtual async Task DeleteQueueAsync(string queueId, RequestCont
/// 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 DeleteQueue(string queueId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterClient.cs b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterClient.cs
index af9362d7bf7f..f59a43728e17 100644
--- a/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterClient.cs
+++ b/sdk/communication/Azure.Communication.JobRouter/src/Generated/JobRouterClient.cs
@@ -18,6 +18,8 @@ namespace Azure.Communication.JobRouter
/// The JobRouter service client.
public partial class JobRouterClient
{
+ private static readonly string[] AuthorizationScopes = new string[] { "https://communication.azure.com/.default" };
+ private readonly TokenCredential _tokenCredential;
private readonly HttpPipeline _pipeline;
private readonly Uri _endpoint;
private readonly string _apiVersion;
@@ -28,6 +30,14 @@ public partial class JobRouterClient
/// The HTTP pipeline for sending and receiving REST requests and responses.
public virtual HttpPipeline Pipeline => _pipeline;
+ /// Initializes a new instance of JobRouterClient.
+ /// Uri of your Communication resource.
+ /// A credential used to authenticate to an Azure Service.
+ /// or is null.
+ public JobRouterClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new JobRouterClientOptions())
+ {
+ }
+
///
/// [Protocol Method] Creates or updates a router job.
///
@@ -125,6 +135,7 @@ internal virtual Response UpsertJob(string jobId, RequestContent content, Reques
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> GetJobAsync(string jobId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -139,6 +150,7 @@ public virtual async Task> GetJobAsync(string jobId, Cancell
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual Response GetJob(string jobId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -169,6 +181,7 @@ public virtual Response GetJob(string jobId, CancellationToken cancel
/// 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 GetJobAsync(string jobId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -208,6 +221,7 @@ public virtual async Task GetJobAsync(string jobId, RequestContext con
/// 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 GetJob(string jobId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -243,6 +257,7 @@ public virtual Response GetJob(string jobId, RequestContext context)
/// is an empty string, and was expected to be non-empty.
/// Service returned a non-success status code.
/// The response returned from the service.
+ ///
public virtual async Task DeleteJobAsync(string jobId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -278,6 +293,7 @@ public virtual async Task DeleteJobAsync(string jobId, RequestContext
/// 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 DeleteJob(string jobId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -437,6 +453,7 @@ internal virtual Response CloseJob(string jobId, string assignme
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> GetQueuePositionAsync(string jobId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -451,6 +468,7 @@ public virtual async Task> GetQueuePositionAs
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual Response GetQueuePosition(string jobId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -481,6 +499,7 @@ public virtual Response GetQueuePosition(string jobId,
/// 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 GetQueuePositionAsync(string jobId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -520,6 +539,7 @@ public virtual async Task GetQueuePositionAsync(string jobId, RequestC
/// is an empty string, and was expected to be non-empty.
/// Service returned a non-success status code.
/// The response returned from the service.
+ ///
public virtual Response GetQueuePosition(string jobId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(jobId, nameof(jobId));
@@ -580,6 +600,7 @@ internal virtual Response UnassignJob(string jobId, string as
/// The cancellation token to use.
/// or is null.
/// or is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> AcceptJobOfferAsync(string workerId, string offerId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -596,6 +617,7 @@ public virtual async Task> AcceptJobOfferAsync(st
/// The cancellation token to use.
/// or is null.
/// or is an empty string, and was expected to be non-empty.
+ ///
public virtual Response AcceptJobOffer(string workerId, string offerId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -628,6 +650,7 @@ public virtual Response AcceptJobOffer(string workerId, st
/// 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 AcceptJobOfferAsync(string workerId, string offerId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -669,6 +692,7 @@ public virtual async Task AcceptJobOfferAsync(string workerId, string
/// 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 AcceptJobOffer(string workerId, string offerId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -729,6 +753,7 @@ internal virtual Response DeclineJobOffer(string workerId
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> GetQueueStatisticsAsync(string queueId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -743,6 +768,7 @@ public virtual async Task> GetQueueStatisticsAsy
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual Response GetQueueStatistics(string queueId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -773,6 +799,7 @@ public virtual Response GetQueueStatistics(string queueId
/// 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 GetQueueStatisticsAsync(string queueId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -812,6 +839,7 @@ public virtual async Task GetQueueStatisticsAsync(string queueId, Requ
/// 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 GetQueueStatistics(string queueId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(queueId, nameof(queueId));
@@ -927,6 +955,7 @@ internal virtual Response UpsertWorker(string workerId, RequestContent content,
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual async Task> GetWorkerAsync(string workerId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -941,6 +970,7 @@ public virtual async Task> GetWorkerAsync(string workerId
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
+ ///
public virtual Response GetWorker(string workerId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -971,6 +1001,7 @@ public virtual Response GetWorker(string workerId, CancellationTok
/// is an empty string, and was expected to be non-empty.
/// Service returned a non-success status code.
/// The response returned from the service.
+ ///
public virtual async Task GetWorkerAsync(string workerId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -1010,6 +1041,7 @@ public virtual async Task GetWorkerAsync(string workerId, RequestConte
/// 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 GetWorker(string workerId, RequestContext context)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -1045,6 +1077,7 @@ public virtual Response GetWorker(string workerId, RequestContext context)
/// is an empty string, and was expected to be non-empty.
/// Service returned a non-success status code.
/// The response returned from the service.
+ ///
public virtual async Task DeleteWorkerAsync(string workerId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
@@ -1080,6 +1113,7 @@ public virtual async Task DeleteWorkerAsync(string workerId, RequestCo
/// 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 DeleteWorker(string workerId, RequestContext context = null)
{
Argument.AssertNotNullOrEmpty(workerId, nameof(workerId));
diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/Generated/Samples/Samples_JobRouterAdministrationClient.cs b/sdk/communication/Azure.Communication.JobRouter/tests/Generated/Samples/Samples_JobRouterAdministrationClient.cs
new file mode 100644
index 000000000000..e2d8e1cfe3c2
--- /dev/null
+++ b/sdk/communication/Azure.Communication.JobRouter/tests/Generated/Samples/Samples_JobRouterAdministrationClient.cs
@@ -0,0 +1,331 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.Communication.JobRouter.Samples
+{
+ public partial class Samples_JobRouterAdministrationClient
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_DistributionPolicy_GetDistributionPolicy_RetrievesAnExistingDistributionPolicyById()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.GetDistributionPolicy("MainDistributionPolicy", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DistributionPolicy_GetDistributionPolicy_RetrievesAnExistingDistributionPolicyById_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.GetDistributionPolicyAsync("MainDistributionPolicy", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_DistributionPolicy_GetDistributionPolicy_RetrievesAnExistingDistributionPolicyById_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.GetDistributionPolicy("MainDistributionPolicy");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DistributionPolicy_GetDistributionPolicy_RetrievesAnExistingDistributionPolicyById_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.GetDistributionPolicyAsync("MainDistributionPolicy");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_DistributionPolicy_DeleteDistributionPolicy_DeleteADistributionPolicy()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.DeleteDistributionPolicy("MainDistributionPolicy");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_DistributionPolicy_DeleteDistributionPolicy_DeleteADistributionPolicy_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.DeleteDistributionPolicyAsync("MainDistributionPolicy");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_ClassificationPolicy_GetClassificationPolicy_RetrievesAnExistingClassificationPolicyById()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.GetClassificationPolicy("MainClassificationPolicy", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_ClassificationPolicy_GetClassificationPolicy_RetrievesAnExistingClassificationPolicyById_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.GetClassificationPolicyAsync("MainClassificationPolicy", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_ClassificationPolicy_GetClassificationPolicy_RetrievesAnExistingClassificationPolicyById_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.GetClassificationPolicy("MainClassificationPolicy");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_ClassificationPolicy_GetClassificationPolicy_RetrievesAnExistingClassificationPolicyById_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.GetClassificationPolicyAsync("MainClassificationPolicy");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_ClassificationPolicy_DeleteClassificationPolicy_DeleteAClassificationPolicy()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.DeleteClassificationPolicy("MainClassificationPolicy");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_ClassificationPolicy_DeleteClassificationPolicy_DeleteAClassificationPolicy_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.DeleteClassificationPolicyAsync("MainClassificationPolicy");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_ExceptionPolicy_GetExceptionPolicy_RetrievesAnExistingExceptionPolicyById()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.GetExceptionPolicy("MainExceptionPolicy", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_ExceptionPolicy_GetExceptionPolicy_RetrievesAnExistingExceptionPolicyById_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.GetExceptionPolicyAsync("MainExceptionPolicy", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_ExceptionPolicy_GetExceptionPolicy_RetrievesAnExistingExceptionPolicyById_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.GetExceptionPolicy("MainExceptionPolicy");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_ExceptionPolicy_GetExceptionPolicy_RetrievesAnExistingExceptionPolicyById_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.GetExceptionPolicyAsync("MainExceptionPolicy");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_ExceptionPolicy_DeleteExceptionPolicy_DeletesAExceptionPolicy()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.DeleteExceptionPolicy("MainExceptionPolicy");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_ExceptionPolicy_DeleteExceptionPolicy_DeletesAExceptionPolicy_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.DeleteExceptionPolicyAsync("MainExceptionPolicy");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterQueue_GetQueue_RetrievesAnExistingQueueById()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.GetQueue("MainQueue", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterQueue_GetQueue_RetrievesAnExistingQueueById_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.GetQueueAsync("MainQueue", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterQueue_GetQueue_RetrievesAnExistingQueueById_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.GetQueue("MainQueue");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterQueue_GetQueue_RetrievesAnExistingQueueById_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.GetQueueAsync("MainQueue");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterQueue_DeleteQueue_DeletesAQueue()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = client.DeleteQueue("MainQueue");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterQueue_DeleteQueue_DeletesAQueue_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterAdministrationClient client = new JobRouterAdministrationClient(endpoint, credential);
+
+ Response response = await client.DeleteQueueAsync("MainQueue");
+
+ Console.WriteLine(response.Status);
+ }
+ }
+}
diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/Generated/Samples/Samples_JobRouterClient.cs b/sdk/communication/Azure.Communication.JobRouter/tests/Generated/Samples/Samples_JobRouterClient.cs
new file mode 100644
index 000000000000..ffff2e307b4c
--- /dev/null
+++ b/sdk/communication/Azure.Communication.JobRouter/tests/Generated/Samples/Samples_JobRouterClient.cs
@@ -0,0 +1,339 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.Communication.JobRouter.Samples
+{
+ public partial class Samples_JobRouterClient
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterJob_GetJob_RetrievesAnExistingJobById()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.GetJob("8780b28c-7079-4de1-9143-4d369289e958", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterJob_GetJob_RetrievesAnExistingJobById_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.GetJobAsync("8780b28c-7079-4de1-9143-4d369289e958", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterJob_GetJob_RetrievesAnExistingJobById_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.GetJob("8780b28c-7079-4de1-9143-4d369289e958");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterJob_GetJob_RetrievesAnExistingJobById_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.GetJobAsync("8780b28c-7079-4de1-9143-4d369289e958");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterJob_DeleteJob_DeletesAJobAndAllOfItsTraces()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.DeleteJob("8780b28c-7079-4de1-9143-4d369289e958");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterJob_DeleteJob_DeletesAJobAndAllOfItsTraces_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.DeleteJobAsync("8780b28c-7079-4de1-9143-4d369289e958");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_JobRouterRestClient_GetQueuePosition_GetsAJobSPositionDetails()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.GetQueuePosition("8780b28c-7079-4de1-9143-4d369289e958", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("jobId").ToString());
+ Console.WriteLine(result.GetProperty("position").ToString());
+ Console.WriteLine(result.GetProperty("queueId").ToString());
+ Console.WriteLine(result.GetProperty("queueLength").ToString());
+ Console.WriteLine(result.GetProperty("estimatedWaitTimeMinutes").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_JobRouterRestClient_GetQueuePosition_GetsAJobSPositionDetails_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.GetQueuePositionAsync("8780b28c-7079-4de1-9143-4d369289e958", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("jobId").ToString());
+ Console.WriteLine(result.GetProperty("position").ToString());
+ Console.WriteLine(result.GetProperty("queueId").ToString());
+ Console.WriteLine(result.GetProperty("queueLength").ToString());
+ Console.WriteLine(result.GetProperty("estimatedWaitTimeMinutes").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_JobRouterRestClient_GetQueuePosition_GetsAJobSPositionDetails_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.GetQueuePosition("8780b28c-7079-4de1-9143-4d369289e958");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_JobRouterRestClient_GetQueuePosition_GetsAJobSPositionDetails_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.GetQueuePositionAsync("8780b28c-7079-4de1-9143-4d369289e958");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_JobRouterRestClient_AcceptJobOffer_AcceptsAnOfferToWorkOnAJob()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.AcceptJobOffer("DefaultWorker", "1d5896f3-8b54-40be-82d3-910323f5e2af", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("assignmentId").ToString());
+ Console.WriteLine(result.GetProperty("jobId").ToString());
+ Console.WriteLine(result.GetProperty("workerId").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_JobRouterRestClient_AcceptJobOffer_AcceptsAnOfferToWorkOnAJob_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.AcceptJobOfferAsync("DefaultWorker", "1d5896f3-8b54-40be-82d3-910323f5e2af", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("assignmentId").ToString());
+ Console.WriteLine(result.GetProperty("jobId").ToString());
+ Console.WriteLine(result.GetProperty("workerId").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_JobRouterRestClient_AcceptJobOffer_AcceptsAnOfferToWorkOnAJob_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.AcceptJobOffer("DefaultWorker", "1d5896f3-8b54-40be-82d3-910323f5e2af");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_JobRouterRestClient_AcceptJobOffer_AcceptsAnOfferToWorkOnAJob_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.AcceptJobOfferAsync("DefaultWorker", "1d5896f3-8b54-40be-82d3-910323f5e2af");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_JobRouterRestClient_GetQueueStatistics_RetrievesAQueueSStatistics()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.GetQueueStatistics("MainQueue", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("queueId").ToString());
+ Console.WriteLine(result.GetProperty("length").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_JobRouterRestClient_GetQueueStatistics_RetrievesAQueueSStatistics_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.GetQueueStatisticsAsync("MainQueue", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("queueId").ToString());
+ Console.WriteLine(result.GetProperty("length").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_JobRouterRestClient_GetQueueStatistics_RetrievesAQueueSStatistics_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.GetQueueStatistics("MainQueue");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_JobRouterRestClient_GetQueueStatistics_RetrievesAQueueSStatistics_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.GetQueueStatisticsAsync("MainQueue");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterWorker_GetWorker_RetrievesAnExistingWorkerById()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.GetWorker("DefaultWorker", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterWorker_GetWorker_RetrievesAnExistingWorkerById_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.GetWorkerAsync("DefaultWorker", null);
+
+ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
+ Console.WriteLine(result.GetProperty("etag").ToString());
+ Console.WriteLine(result.GetProperty("id").ToString());
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterWorker_GetWorker_RetrievesAnExistingWorkerById_Convenience()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.GetWorker("DefaultWorker");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterWorker_GetWorker_RetrievesAnExistingWorkerById_Convenience_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.GetWorkerAsync("DefaultWorker");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public void Example_RouterWorker_DeleteWorker_DeletesAWorkerAndAllOfItsTraces()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = client.DeleteWorker("DefaultWorker");
+
+ Console.WriteLine(response.Status);
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Example_RouterWorker_DeleteWorker_DeletesAWorkerAndAllOfItsTraces_Async()
+ {
+ Uri endpoint = new Uri("");
+ TokenCredential credential = new DefaultAzureCredential();
+ JobRouterClient client = new JobRouterClient(endpoint, credential);
+
+ Response response = await client.DeleteWorkerAsync("DefaultWorker");
+
+ Console.WriteLine(response.Status);
+ }
+ }
+}
diff --git a/sdk/communication/Azure.Communication.JobRouter/tsp-location.yaml b/sdk/communication/Azure.Communication.JobRouter/tsp-location.yaml
index 3d71082e5561..61e22ac9e20d 100644
--- a/sdk/communication/Azure.Communication.JobRouter/tsp-location.yaml
+++ b/sdk/communication/Azure.Communication.JobRouter/tsp-location.yaml
@@ -1,5 +1,4 @@
-commit: 327984bd2b2fca0d32b1018d7d4a36d1f4eb65ce
directory: specification/communication/Communication.JobRouter
-additionalDirectories: []
+commit: 31eac9a599f5a989de3ef963779c53d140f1135a
repo: Azure/azure-rest-api-specs
-
+additionalDirectories:
diff --git a/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.net8.0.cs b/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.net8.0.cs
index 95ac87b95a31..ab24be9726e5 100644
--- a/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.net8.0.cs
+++ b/sdk/contentsafety/Azure.AI.ContentSafety/api/Azure.AI.ContentSafety.net8.0.cs
@@ -167,13 +167,22 @@ public ContentSafetyClient(System.Uri endpoint, Azure.Core.TokenCredential crede
public virtual System.Threading.Tasks.Task> AnalyzeTextAsync(Azure.AI.ContentSafety.AnalyzeTextOptions options, 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 System.Threading.Tasks.Task> AnalyzeTextAsync(string text, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response DetectTextProtectedMaterial(Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response DetectTextProtectedMaterial(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> DetectTextProtectedMaterialAsync(Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DetectTextProtectedMaterialAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual Azure.Response ShieldPrompt(Azure.AI.ContentSafety.ShieldPromptOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response ShieldPrompt(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> ShieldPromptAsync(Azure.AI.ContentSafety.ShieldPromptOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task ShieldPromptAsync(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_10_01) { }
+ public ContentSafetyClientOptions(Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion version = Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion.V2024_09_01) { }
public enum ServiceVersion
{
V2023_10_01 = 1,
+ V2024_09_01 = 2,
}
}
public partial class ContentSafetyImageData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
@@ -195,11 +204,49 @@ public static partial class ContentSafetyModelFactory
public static Azure.AI.ContentSafety.AnalyzeImageResult AnalyzeImageResult(System.Collections.Generic.IEnumerable categoriesAnalysis = null) { throw null; }
public static Azure.AI.ContentSafety.AnalyzeTextOptions AnalyzeTextOptions(string text = null, System.Collections.Generic.IEnumerable categories = null, System.Collections.Generic.IEnumerable blocklistNames = null, bool? haltOnBlocklistHit = default(bool?), Azure.AI.ContentSafety.AnalyzeTextOutputType? outputType = default(Azure.AI.ContentSafety.AnalyzeTextOutputType?)) { throw null; }
public static Azure.AI.ContentSafety.AnalyzeTextResult AnalyzeTextResult(System.Collections.Generic.IEnumerable blocklistsMatch = null, System.Collections.Generic.IEnumerable categoriesAnalysis = null) { throw null; }
+ public static Azure.AI.ContentSafety.DetectTextProtectedMaterialResult DetectTextProtectedMaterialResult(Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult protectedMaterialAnalysis = null) { throw null; }
+ public static Azure.AI.ContentSafety.DocumentInjectionAnalysisResult DocumentInjectionAnalysisResult(bool attackDetected = false) { throw null; }
public static Azure.AI.ContentSafety.ImageCategoriesAnalysis ImageCategoriesAnalysis(Azure.AI.ContentSafety.ImageCategory category = default(Azure.AI.ContentSafety.ImageCategory), int? severity = default(int?)) { throw null; }
+ public static Azure.AI.ContentSafety.ShieldPromptResult ShieldPromptResult(Azure.AI.ContentSafety.UserPromptInjectionAnalysisResult userPromptAnalysis = null, System.Collections.Generic.IEnumerable documentsAnalysis = null) { throw null; }
public static Azure.AI.ContentSafety.TextBlocklist TextBlocklist(string name = null, string description = null) { throw null; }
- public static Azure.AI.ContentSafety.TextBlocklistItem TextBlocklistItem(string blocklistItemId = null, string description = null, string text = null) { throw null; }
+ public static Azure.AI.ContentSafety.TextBlocklistItem TextBlocklistItem(string blocklistItemId = null, string description = null, string text = null, bool? isRegex = default(bool?)) { throw null; }
public static Azure.AI.ContentSafety.TextBlocklistMatch TextBlocklistMatch(string blocklistName = null, string blocklistItemId = null, string blocklistItemText = null) { throw null; }
public static Azure.AI.ContentSafety.TextCategoriesAnalysis TextCategoriesAnalysis(Azure.AI.ContentSafety.TextCategory category = default(Azure.AI.ContentSafety.TextCategory), int? severity = default(int?)) { throw null; }
+ public static Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult TextProtectedMaterialAnalysisResult(bool detected = false) { throw null; }
+ public static Azure.AI.ContentSafety.UserPromptInjectionAnalysisResult UserPromptInjectionAnalysisResult(bool attackDetected = false) { throw null; }
+ }
+ public partial class DetectTextProtectedMaterialOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public DetectTextProtectedMaterialOptions(string text) { }
+ public string Text { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class DetectTextProtectedMaterialResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal DetectTextProtectedMaterialResult() { }
+ public Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult ProtectedMaterialAnalysis { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DetectTextProtectedMaterialResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DetectTextProtectedMaterialResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class DocumentInjectionAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal DocumentInjectionAnalysisResult() { }
+ public bool AttackDetected { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DocumentInjectionAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DocumentInjectionAnalysisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
}
public partial class ImageCategoriesAnalysis : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
@@ -244,6 +291,30 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
}
+ public partial class ShieldPromptOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public ShieldPromptOptions() { }
+ public System.Collections.Generic.IList Documents { get { throw null; } }
+ public string UserPrompt { get { throw null; } set { } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.ShieldPromptOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.ShieldPromptOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class ShieldPromptResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal ShieldPromptResult() { }
+ public System.Collections.Generic.IReadOnlyList DocumentsAnalysis { get { throw null; } }
+ public Azure.AI.ContentSafety.UserPromptInjectionAnalysisResult UserPromptAnalysis { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.ShieldPromptResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.ShieldPromptResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
public partial class TextBlocklist : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
{
internal TextBlocklist() { }
@@ -261,6 +332,7 @@ public partial class TextBlocklistItem : System.ClientModel.Primitives.IJsonMode
public TextBlocklistItem(string text) { }
public string BlocklistItemId { get { throw null; } }
public string Description { get { throw null; } set { } }
+ public bool? IsRegex { get { throw null; } set { } }
public string Text { get { throw null; } set { } }
protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
Azure.AI.ContentSafety.TextBlocklistItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
@@ -314,6 +386,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
public static bool operator !=(Azure.AI.ContentSafety.TextCategory left, Azure.AI.ContentSafety.TextCategory right) { throw null; }
public override string ToString() { throw null; }
}
+ public partial class TextProtectedMaterialAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal TextProtectedMaterialAnalysisResult() { }
+ public bool Detected { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class UserPromptInjectionAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal UserPromptInjectionAnalysisResult() { }
+ public bool AttackDetected { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.UserPromptInjectionAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.UserPromptInjectionAnalysisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
}
namespace Microsoft.Extensions.Azure
{
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
index 95ac87b95a31..ab24be9726e5 100644
--- 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
@@ -167,13 +167,22 @@ public ContentSafetyClient(System.Uri endpoint, Azure.Core.TokenCredential crede
public virtual System.Threading.Tasks.Task> AnalyzeTextAsync(Azure.AI.ContentSafety.AnalyzeTextOptions options, 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 System.Threading.Tasks.Task> AnalyzeTextAsync(string text, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response DetectTextProtectedMaterial(Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response DetectTextProtectedMaterial(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> DetectTextProtectedMaterialAsync(Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DetectTextProtectedMaterialAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual Azure.Response ShieldPrompt(Azure.AI.ContentSafety.ShieldPromptOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response ShieldPrompt(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; }
+ public virtual System.Threading.Tasks.Task> ShieldPromptAsync(Azure.AI.ContentSafety.ShieldPromptOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task ShieldPromptAsync(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_10_01) { }
+ public ContentSafetyClientOptions(Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion version = Azure.AI.ContentSafety.ContentSafetyClientOptions.ServiceVersion.V2024_09_01) { }
public enum ServiceVersion
{
V2023_10_01 = 1,
+ V2024_09_01 = 2,
}
}
public partial class ContentSafetyImageData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
@@ -195,11 +204,49 @@ public static partial class ContentSafetyModelFactory
public static Azure.AI.ContentSafety.AnalyzeImageResult AnalyzeImageResult(System.Collections.Generic.IEnumerable categoriesAnalysis = null) { throw null; }
public static Azure.AI.ContentSafety.AnalyzeTextOptions AnalyzeTextOptions(string text = null, System.Collections.Generic.IEnumerable categories = null, System.Collections.Generic.IEnumerable blocklistNames = null, bool? haltOnBlocklistHit = default(bool?), Azure.AI.ContentSafety.AnalyzeTextOutputType? outputType = default(Azure.AI.ContentSafety.AnalyzeTextOutputType?)) { throw null; }
public static Azure.AI.ContentSafety.AnalyzeTextResult AnalyzeTextResult(System.Collections.Generic.IEnumerable blocklistsMatch = null, System.Collections.Generic.IEnumerable categoriesAnalysis = null) { throw null; }
+ public static Azure.AI.ContentSafety.DetectTextProtectedMaterialResult DetectTextProtectedMaterialResult(Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult protectedMaterialAnalysis = null) { throw null; }
+ public static Azure.AI.ContentSafety.DocumentInjectionAnalysisResult DocumentInjectionAnalysisResult(bool attackDetected = false) { throw null; }
public static Azure.AI.ContentSafety.ImageCategoriesAnalysis ImageCategoriesAnalysis(Azure.AI.ContentSafety.ImageCategory category = default(Azure.AI.ContentSafety.ImageCategory), int? severity = default(int?)) { throw null; }
+ public static Azure.AI.ContentSafety.ShieldPromptResult ShieldPromptResult(Azure.AI.ContentSafety.UserPromptInjectionAnalysisResult userPromptAnalysis = null, System.Collections.Generic.IEnumerable documentsAnalysis = null) { throw null; }
public static Azure.AI.ContentSafety.TextBlocklist TextBlocklist(string name = null, string description = null) { throw null; }
- public static Azure.AI.ContentSafety.TextBlocklistItem TextBlocklistItem(string blocklistItemId = null, string description = null, string text = null) { throw null; }
+ public static Azure.AI.ContentSafety.TextBlocklistItem TextBlocklistItem(string blocklistItemId = null, string description = null, string text = null, bool? isRegex = default(bool?)) { throw null; }
public static Azure.AI.ContentSafety.TextBlocklistMatch TextBlocklistMatch(string blocklistName = null, string blocklistItemId = null, string blocklistItemText = null) { throw null; }
public static Azure.AI.ContentSafety.TextCategoriesAnalysis TextCategoriesAnalysis(Azure.AI.ContentSafety.TextCategory category = default(Azure.AI.ContentSafety.TextCategory), int? severity = default(int?)) { throw null; }
+ public static Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult TextProtectedMaterialAnalysisResult(bool detected = false) { throw null; }
+ public static Azure.AI.ContentSafety.UserPromptInjectionAnalysisResult UserPromptInjectionAnalysisResult(bool attackDetected = false) { throw null; }
+ }
+ public partial class DetectTextProtectedMaterialOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public DetectTextProtectedMaterialOptions(string text) { }
+ public string Text { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DetectTextProtectedMaterialOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class DetectTextProtectedMaterialResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ internal DetectTextProtectedMaterialResult() { }
+ public Azure.AI.ContentSafety.TextProtectedMaterialAnalysisResult ProtectedMaterialAnalysis { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DetectTextProtectedMaterialResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.AI.ContentSafety.DetectTextProtectedMaterialResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class DocumentInjectionAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel