Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health Data AI Service GA release #46998

Merged
merged 81 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
2f11bab
Regenerated with customization-options typespec
Nov 2, 2024
0871c0a
Fixes + pagedDocumentDetails
Nov 5, 2024
eb8e384
Revert pagedDocumentDetails
Nov 5, 2024
00e0916
nextLink in DocumentDetails
Nov 5, 2024
8c110d1
DocumentDetail
Nov 5, 2024
82f194c
Regenerated with no continuationToken
Nov 5, 2024
f37ca92
OperationType
Nov 5, 2024
6937f98
CustomizationOptions and suppression
Nov 6, 2024
06ba6c0
Change Config to Options
Nov 6, 2024
f75627b
Regenerated after marking ListJobs and ListJobDocuments as internal
Nov 7, 2024
4c64491
Customizations to remove continuationToken
Nov 7, 2024
f305ca1
Update tests and samples for new API version
Nov 9, 2024
57c60a4
Samples
Nov 9, 2024
ef59807
Updating tests for new API version
Nov 12, 2024
5067ed6
Enable local testing
Nov 12, 2024
b7380a8
Add sanitizers
Nov 13, 2024
199f464
Update tests and sanitizers
Nov 13, 2024
e8e9985
Rename "body" to "content"
Nov 14, 2024
623f9ff
Merge branch 'main' into healthdataaiservices/stable
alexathomases Nov 14, 2024
eb6753c
Tests working in all modes
Nov 14, 2024
e490678
Merge branch 'healthdataaiservices/stable' of https://github.com/alex…
Nov 14, 2024
134976c
Update commit in tsp-location.yaml
Nov 15, 2024
bf8e765
Updated serialization with dotnet build codegen
Nov 15, 2024
7ba7c42
Version 1.0.0
Nov 15, 2024
e52e6f5
GA installation instructions
Nov 15, 2024
d7e9a30
Use Deidentification prefix naming convention
Nov 15, 2024
62e2a71
Update tsp-location.yaml commit
Nov 15, 2024
ac4e2ca
Updates tests and samples with new prefix
Nov 15, 2024
142c9b1
Ran dotnet build /t:GenerateCode
Nov 16, 2024
8152401
Deidentification prefix for CustomizationOptions
Nov 18, 2024
0131961
Update tsp-location.yaml
Nov 18, 2024
61d91cb
Improve samples
Nov 20, 2024
9246bee
Update commit in tsp-location
Nov 20, 2024
07eaa32
Update commit again
Nov 20, 2024
7fb69d2
Update README sample
Nov 20, 2024
12f0438
Regenerated with customization-options typespec
Nov 2, 2024
f2c431d
Fixes + pagedDocumentDetails
Nov 5, 2024
8307736
Revert pagedDocumentDetails
Nov 5, 2024
e37663d
nextLink in DocumentDetails
Nov 5, 2024
d9eb65c
DocumentDetail
Nov 5, 2024
f33da6e
Regenerated with no continuationToken
Nov 5, 2024
7b8eb7d
OperationType
Nov 5, 2024
9785c66
CustomizationOptions and suppression
Nov 6, 2024
3515140
Change Config to Options
Nov 6, 2024
0538d3a
Regenerated after marking ListJobs and ListJobDocuments as internal
Nov 7, 2024
6fb16bb
Customizations to remove continuationToken
Nov 7, 2024
a222446
Update tests and samples for new API version
Nov 9, 2024
616cd32
Samples
Nov 9, 2024
3fe7be6
Updating tests for new API version
Nov 12, 2024
c5d3ce6
Enable local testing
Nov 12, 2024
a96760d
Add sanitizers
Nov 13, 2024
3f78d55
Update tests and sanitizers
Nov 13, 2024
116c7ee
Rename "body" to "content"
Nov 14, 2024
3d830f6
Tests working in all modes
Nov 14, 2024
4463ec7
Update commit in tsp-location.yaml
Nov 15, 2024
16394d2
Updated serialization with dotnet build codegen
Nov 15, 2024
7d3b8ac
Version 1.0.0
Nov 15, 2024
e75e82a
GA installation instructions
Nov 15, 2024
6d6ef8a
Use Deidentification prefix naming convention
Nov 15, 2024
58c00a4
Update tsp-location.yaml commit
Nov 15, 2024
242223e
Updates tests and samples with new prefix
Nov 15, 2024
d516e24
Ran dotnet build /t:GenerateCode
Nov 16, 2024
2f1413f
Deidentification prefix for CustomizationOptions
Nov 18, 2024
2051357
Update tsp-location.yaml
Nov 18, 2024
7fcdc72
Improve samples
Nov 20, 2024
ddb76f4
Update commit in tsp-location
Nov 20, 2024
b6f9d0b
Update commit again
Nov 20, 2024
123161d
Update README sample
Nov 20, 2024
e5c2553
Merge branch 'healthdataaiservices/stable' of https://github.com/alex…
Nov 20, 2024
1fe5b90
Export API
Nov 20, 2024
770c98d
Switch back to ResourceList
Nov 22, 2024
8ee84f1
Update commit hash
Nov 23, 2024
6f51847
New tests with overwrite
Nov 23, 2024
e0a0200
Use public setter for overwrite
Nov 24, 2024
21c4469
Regenerated after removing PartialFailed
Nov 26, 2024
272ed13
Rm DeidentificationJobStatus from tests
Nov 26, 2024
f999515
Regenerated with merged typespec
Dec 7, 2024
7999c11
Update changelog.md
Dec 8, 2024
ec2fd4c
Merge branch 'main' into healthdataaiservices/stable
alexathomases Jan 3, 2025
149ad78
Updating generated code
Jan 3, 2025
3d442bf
Update changelog
Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0 (2025-01-14)

### Features Added

### Breaking Changes
- Introduced `DeidentificationCustomizationOptions` and `DeidentificationJobCustomizationOptions` models
- Created `SurrogateLocale` field in these models
- Moved `RedactionFormat` field into these models
- Introduced `Overwrite` flag in `TargetStorageLocation` model

### Bugs Fixed
### Breaking Changes

### Other Changes
- Changed `outputPrefix` behavior from including `jobName` to prefix replacement method
- Changed `Path` field to `Location` in `SourceStorageLocation` and `TargetStorageLocation`
- Deprecated `DocumentDataType`
- Deprecated `Path` and `Location` from `TaggerResult` model

## 1.0.0-beta.1 (2024-08-15)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Azure.Health.Deidentification is a managed service that enables users to tag, re
Install the client library for .NET with [NuGet](https://www.nuget.org/ ):

```dotnetcli
dotnet add package Azure.Health.Deidentification --prerelease
dotnet add package Azure.Health.Deidentification
```

### Prerequisites
Expand All @@ -40,9 +40,9 @@ Basic code snippet to create your Deidentification Client and Deidentify a strin
new DeidentificationClientOptions()
);

DeidentificationContent content = new("Hello, John!", OperationType.Surrogate, DocumentDataType.Plaintext);
DeidentificationContent content = new("Hello, John!");

Response<DeidentificationResult> result = client.Deidentify(content);
Response<DeidentificationResult> result = client.DeidentifyText(content);
string outputString = result.Value.OutputText;
Console.WriteLine(outputString); // Hello, Tom!
```
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/healthdataaiservices/Azure.Health.Deidentification",
"Tag": "net/healthdataaiservices/Azure.Health.Deidentification_d8c55b7fa6"
"Tag": "net/healthdataaiservices/Azure.Health.Deidentification_dd33e2c279"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ DeidentificationClient client = new(
## Build Request and Call Function

```C# Snippet:AzHealthDeidSample1_CreateRequest
DeidentificationContent content = new("Hello, John!", OperationType.Surrogate, DocumentDataType.Plaintext, null, null);
DeidentificationContent content = new("Hello, John!");

Response<DeidentificationResult> result = client.Deidentify(content);
Response<DeidentificationResult> result = client.DeidentifyText(content);
string outputString = result.Value.OutputText;
Console.WriteLine(outputString); // Hello, Tom!
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ DeidentificationClient client = new(
## Build Request and Call Function

```C# Snippet:AzHealthDeidSample1Async_CreateRequest
DeidentificationContent content = new("Hello, John!", OperationType.Surrogate, DocumentDataType.Plaintext, null, null);
DeidentificationContent content = new("Hello, John!");

Response<DeidentificationResult> result = await client.DeidentifyAsync(content);
Response<DeidentificationResult> result = await client.DeidentifyTextAsync(content);
string outputString = result.Value.OutputText;
Console.WriteLine(outputString); // Hello, Tom!
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ This sample demonstrates how to create a job which will deidentify all files wit
DeidentificationJob job = new()
{
SourceLocation = new SourceStorageLocation(new Uri(storageAccountUrl), "folder1/"),
TargetLocation = new TargetStorageLocation(new Uri(storageAccountUrl), "output_path"),
DataType = DocumentDataType.Plaintext,
Operation = OperationType.Surrogate
TargetLocation = new TargetStorageLocation(new Uri(storageAccountUrl), "output_folder1/"),
Operation = DeidentificationOperationType.Redact,
};

job = client.CreateJob(WaitUntil.Started, "my-job-1", job).Value;
job = client.DeidentifyDocuments(WaitUntil.Started, "my-job-1", job).Value;
Console.WriteLine($"Job status: {job.Status}"); // Job status: NotStarted
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ This sample demonstrates how to create a job which will deidentify all files wit
DeidentificationJob job = new()
{
SourceLocation = new SourceStorageLocation(new Uri(storageAccountUrl), "folder1/"),
TargetLocation = new TargetStorageLocation(new Uri(storageAccountUrl), "output_path"),
DataType = DocumentDataType.Plaintext,
Operation = OperationType.Surrogate
TargetLocation = new TargetStorageLocation(new Uri(storageAccountUrl), "output_folder1/"),
Operation = DeidentificationOperationType.Redact,
};

job = (await client.CreateJobAsync(WaitUntil.Completed, "my-job-1", job)).Value;
job = (await client.DeidentifyDocumentsAsync(WaitUntil.Completed, "my-job-1", job)).Value;
Console.WriteLine($"Job Status: {job.Status}"); // Job Status: Completed
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ This sample demonstrates how to list files that were completed by a job.
## List Completed Files and iterate over in a for loop

```C# Snippet:AzHealthDeidSample4_ListCompletedFiles
Pageable<DocumentDetails> files = client.GetJobDocuments("job-name-1");
Pageable<DeidentificationDocumentDetails> files = client.GetJobDocuments("job-name-1");

foreach (DocumentDetails file in files)
foreach (DeidentificationDocumentDetails file in files)
{
Console.WriteLine($"File Name: {file.Input.Path}");
Console.WriteLine($"File Name: {file.Input.Location}");
Console.WriteLine($"File Status: {file.Status}");
Console.WriteLine($"File Output Path: {file.Output.Path}");
Console.WriteLine($"File Output Path: {file.Output.Location}");
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ This sample demonstrates how to list files that were completed by a job.
## List Completed Files and iterate over in a for loop

```C# Snippet:AzHealthDeidSample4Async_ListCompletedFiles
AsyncPageable<DocumentDetails> files = client.GetJobDocumentsAsync("job-name-1");
AsyncPageable<DeidentificationDocumentDetails> files = client.GetJobDocumentsAsync("job-name-1");

await foreach (DocumentDetails file in files)
await foreach (DeidentificationDocumentDetails file in files)
{
Console.WriteLine($"File Name: {file.Input.Path}");
Console.WriteLine($"File Name: {file.Input.Location}");
Console.WriteLine($"File Status: {file.Status}");
Console.WriteLine($"File Output Path: {file.Output.Path}");
Console.WriteLine($"File Output Path: {file.Output.Location}");
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>This is the Azure.Health.Deidentification client library for developing .NET applications with rich experience.</Description>
<AssemblyTitle>Azure SDK Code Generation Azure.Health.Deidentification for Azure Data Plane</AssemblyTitle>
<Version>1.0.0-beta.2</Version>
<Version>1.0.0</Version>
<PackageTags>Azure.Health.Deidentification</PackageTags>
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
<IncludeOperationsSharedSource>true</IncludeOperationsSharedSource>
Expand All @@ -11,6 +11,7 @@

<ItemGroup>
<Compile Include="$(AzureCoreSharedSources)AzureResourceProviderNamespaceAttribute.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ForwardsClientCallsAttribute.cs" LinkBase="Shared/Core" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Threading;
using System.Threading.Tasks;
using Autorest.CSharp.Core;
using Azure.Core;
using Azure.Core.Pipeline;

namespace Azure.Health.Deidentification
{
// Data plane customized client.
/// <summary> The Deidentification service client. </summary>
public partial class DeidentificationClient
{
/// <summary> List de-identification jobs. </summary>
/// <param name="maxpagesize"> The maximum number of result items per page. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <remarks> Resource list operation template. </remarks>
[ForwardsClientCalls]
public virtual AsyncPageable<DeidentificationJob> GetJobsAsync(int? maxpagesize = null, CancellationToken cancellationToken = default)
{
using var scope = ClientDiagnostics.CreateScope("DeidentificationClient.GetJobs");
scope.Start();
return GetJobsInternalsAsync(maxpagesize, null, cancellationToken);
}

/// <summary> List de-identification jobs. </summary>
/// <param name="maxpagesize"> The maximum number of result items per page. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <remarks> Resource list operation template. </remarks>
[ForwardsClientCalls]
public virtual Pageable<DeidentificationJob> GetJobs(int? maxpagesize = null, CancellationToken cancellationToken = default)
{
using var scope = ClientDiagnostics.CreateScope("DeidentificationClient.GetJobs");
scope.Start();
return GetJobsInternals(maxpagesize, null, cancellationToken);
}

/// <summary>
/// [Protocol Method] List de-identification jobs.
/// <list type="bullet">
/// <item>
/// <description>
/// This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
/// </description>
/// </item>
/// <item>
/// <description>
/// Please try the simpler <see cref="GetJobsAsync(int?,CancellationToken)"/> convenience overload with strongly typed models first.
/// </description>
/// </item>
/// </list>
/// </summary>
/// <param name="maxpagesize"> The maximum number of result items per page. </param>
/// <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
/// <exception cref="RequestFailedException"> Service returned a non-success status code. </exception>
/// <returns> The <see cref="AsyncPageable{T}"/> from the service containing a list of <see cref="BinaryData"/> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns>
[ForwardsClientCalls]
public virtual AsyncPageable<BinaryData> GetJobsAsync(int? maxpagesize, RequestContext context)
{
using var scope = ClientDiagnostics.CreateScope("DeidentificationClient.GetJobs");
scope.Start();
return GetJobsInternalsAsync(maxpagesize, null, context);
}

/// <summary>
/// [Protocol Method] List de-identification jobs.
/// <list type="bullet">
/// <item>
/// <description>
/// This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
/// </description>
/// </item>
/// <item>
/// <description>
/// Please try the simpler <see cref="GetJobs(int?,CancellationToken)"/> convenience overload with strongly typed models first.
/// </description>
/// </item>
/// </list>
/// </summary>
/// <param name="maxpagesize"> The maximum number of result items per page. </param>
/// <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
/// <exception cref="RequestFailedException"> Service returned a non-success status code. </exception>
/// <returns> The <see cref="Pageable{T}"/> from the service containing a list of <see cref="BinaryData"/> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns>
[ForwardsClientCalls]
public virtual Pageable<BinaryData> GetJobs(int? maxpagesize, RequestContext context)
{
using var scope = ClientDiagnostics.CreateScope("DeidentificationClient.GetJobs");
scope.Start();
return GetJobsInternals(maxpagesize, null, context);
}

/// <summary> List processed documents within a job. </summary>
/// <param name="jobName"> The name of a job. </param>
/// <param name="maxpagesize"> The maximum number of result items per page. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="jobName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="jobName"/> is an empty string, and was expected to be non-empty. </exception>
/// <remarks> The most basic operation. </remarks>
[ForwardsClientCalls]
public virtual AsyncPageable<DeidentificationDocumentDetails> GetJobDocumentsAsync(string jobName, int? maxpagesize = null, CancellationToken cancellationToken = default)
{
using var scope = ClientDiagnostics.CreateScope("DeidentificationClient.GetJobDocuments");
scope.Start();
return GetJobDocumentsInternalsAsync(jobName, maxpagesize, null, cancellationToken);
}

/// <summary> List processed documents within a job. </summary>
/// <param name="jobName"> The name of a job. </param>
/// <param name="maxpagesize"> The maximum number of result items per page. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="jobName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="jobName"/> is an empty string, and was expected to be non-empty. </exception>
/// <remarks> The most basic operation. </remarks>
[ForwardsClientCalls]
public virtual Pageable<DeidentificationDocumentDetails> GetJobDocuments(string jobName, int? maxpagesize = null, CancellationToken cancellationToken = default)
{
using var scope = ClientDiagnostics.CreateScope("DeidentificationClient.GetJobDocuments");
scope.Start();
return GetJobDocumentsInternals(jobName, maxpagesize, null, cancellationToken);
}

/// <summary>
/// [Protocol Method] List processed documents within a job.
/// <list type="bullet">
/// <item>
/// <description>
/// This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
/// </description>
/// </item>
/// <item>
/// <description>
/// Please try the simpler <see cref="GetJobDocumentsAsync(string,int?,CancellationToken)"/> convenience overload with strongly typed models first.
/// </description>
/// </item>
/// </list>
/// </summary>
/// <param name="jobName"> The name of a job. </param>
/// <param name="maxpagesize"> The maximum number of result items per page. </param>
/// <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
/// <exception cref="ArgumentNullException"> <paramref name="jobName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="jobName"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="RequestFailedException"> Service returned a non-success status code. </exception>
/// <returns> The <see cref="AsyncPageable{T}"/> from the service containing a list of <see cref="BinaryData"/> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns>
[ForwardsClientCalls]
public virtual AsyncPageable<BinaryData> GetJobDocumentsAsync(string jobName, int? maxpagesize, RequestContext context)
{
using var scope = ClientDiagnostics.CreateScope("DeidentificationClient.GetJobDocuments");
scope.Start();
return GetJobDocumentsInternalsAsync(jobName, maxpagesize, null, context);
}

/// <summary>
/// [Protocol Method] List processed documents within a job.
/// <list type="bullet">
/// <item>
/// <description>
/// This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
/// </description>
/// </item>
/// <item>
/// <description>
/// Please try the simpler <see cref="GetJobDocuments(string,int?,CancellationToken)"/> convenience overload with strongly typed models first.
/// </description>
/// </item>
/// </list>
/// </summary>
/// <param name="jobName"> The name of a job. </param>
/// <param name="maxpagesize"> The maximum number of result items per page. </param>
/// <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
/// <exception cref="ArgumentNullException"> <paramref name="jobName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="jobName"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="RequestFailedException"> Service returned a non-success status code. </exception>
/// <returns> The <see cref="Pageable{T}"/> from the service containing a list of <see cref="BinaryData"/> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns>
[ForwardsClientCalls]
public virtual Pageable<BinaryData> GetJobDocuments(string jobName, int? maxpagesize, RequestContext context)
{
using var scope = ClientDiagnostics.CreateScope("DeidentificationClient.GetJobDocuments");
scope.Start();
return GetJobDocumentsInternals(jobName, maxpagesize, null, context);
}
}
}
Loading
Loading