Skip to content
Open
99 changes: 95 additions & 4 deletions sdk/contentsafety/azure-ai-contentsafety/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,105 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.1.0-beta.1 (2026-07-30)

### Features Added

### Breaking Changes
* `models.ProvenanceDetectOperation` was added

### Bugs Fixed
* `ContentProvenanceClientBuilder` was added

### Other Changes
* `models.DetectOutcome` was added

* `models.ProvenanceOperationKind` was added

* `models.OperationState` was added

* `models.DetectProvenanceResult` was added

* `ContentProvenanceAsyncClient` was added

* `models.DetectedProvenance` was added

* `ContentProvenanceClient` was added

* `models.DetectedProvenanceType` was added

* `models.DetectProvenanceOptions` was added

* `models.ProvenanceContent` was added

#### `models.AddOrUpdateTextBlocklistItemsResult` was modified

* `toJson(com.azure.json.JsonWriter)` was added
* `fromJson(com.azure.json.JsonReader)` was added

#### `BlocklistAsyncClient` was modified

* `createOrUpdateTextBlocklist(java.lang.String,models.TextBlocklist)` was added

#### `models.AnalyzeTextResult` was modified

* `fromJson(com.azure.json.JsonReader)` was added
* `toJson(com.azure.json.JsonWriter)` was added

#### `models.TextBlocklistMatch` was modified

* `fromJson(com.azure.json.JsonReader)` was added
* `toJson(com.azure.json.JsonWriter)` was added

#### `models.AnalyzeImageOptions` was modified

* `fromJson(com.azure.json.JsonReader)` was added
* `toJson(com.azure.json.JsonWriter)` was added

#### `models.TextBlocklistItem` was modified

* `toJson(com.azure.json.JsonWriter)` was added
* `fromJson(com.azure.json.JsonReader)` was added

#### `models.RemoveTextBlocklistItemsOptions` was modified

* `fromJson(com.azure.json.JsonReader)` was added
* `toJson(com.azure.json.JsonWriter)` was added

#### `models.TextBlocklist` was modified

* `fromJson(com.azure.json.JsonReader)` was added
* `toJson(com.azure.json.JsonWriter)` was added

#### `models.AnalyzeTextOptions` was modified

* `toJson(com.azure.json.JsonWriter)` was added
* `fromJson(com.azure.json.JsonReader)` was added

#### `models.ImageCategoriesAnalysis` was modified

* `toJson(com.azure.json.JsonWriter)` was added
* `fromJson(com.azure.json.JsonReader)` was added

#### `models.AnalyzeImageResult` was modified

* `fromJson(com.azure.json.JsonReader)` was added
* `toJson(com.azure.json.JsonWriter)` was added

#### `models.AddOrUpdateTextBlocklistItemsOptions` was modified

* `toJson(com.azure.json.JsonWriter)` was added
* `fromJson(com.azure.json.JsonReader)` was added

#### `models.ContentSafetyImageData` was modified

* `toJson(com.azure.json.JsonWriter)` was added
* `fromJson(com.azure.json.JsonReader)` was added

#### `models.TextCategoriesAnalysis` was modified

* `fromJson(com.azure.json.JsonReader)` was added
* `toJson(com.azure.json.JsonWriter)` was added

#### `BlocklistClient` was modified

* `createOrUpdateTextBlocklist(java.lang.String,models.TextBlocklist)` was added

## 1.0.19 (2026-07-01)

Expand Down
2 changes: 1 addition & 1 deletion sdk/contentsafety/azure-ai-contentsafety/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo" : "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath" : "java",
"TagPrefix" : "java/contentsafety/azure-ai-contentsafety",
"Tag" : "java/contentsafety/azure-ai-contentsafety_b28078ece6"
"Tag" : "java/contentsafety/azure-ai-contentsafety_2802adcd08"
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public final class BlocklistAsyncClient {
* blocklistItemId: String (Required)
* description: String (Optional)
* text: String (Required)
* isRegex: Boolean (Optional)
* }
* ]
* }
Expand All @@ -79,6 +80,7 @@ public final class BlocklistAsyncClient {
* blocklistItemId: String (Required)
* description: String (Optional)
* text: String (Required)
* isRegex: Boolean (Optional)
* }
* ]
* }
Expand Down Expand Up @@ -206,6 +208,7 @@ public Mono<Response<BinaryData>> getTextBlocklistWithResponse(String name, Requ
* blocklistItemId: String (Required)
* description: String (Optional)
* text: String (Required)
* isRegex: Boolean (Optional)
* }
* }
* </pre>
Expand Down Expand Up @@ -250,6 +253,7 @@ public Mono<Response<BinaryData>> getTextBlocklistItemWithResponse(String name,
* blocklistItemId: String (Required)
* description: String (Optional)
* text: String (Required)
* isRegex: Boolean (Optional)
* }
* }
* </pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public final class BlocklistClient {
* blocklistItemId: String (Required)
* description: String (Optional)
* text: String (Required)
* isRegex: Boolean (Optional)
* }
* ]
* }
Expand All @@ -73,6 +74,7 @@ public final class BlocklistClient {
* blocklistItemId: String (Required)
* description: String (Optional)
* text: String (Required)
* isRegex: Boolean (Optional)
* }
* ]
* }
Expand Down Expand Up @@ -199,6 +201,7 @@ public Response<BinaryData> getTextBlocklistWithResponse(String name, RequestOpt
* blocklistItemId: String (Required)
* description: String (Optional)
* text: String (Required)
* isRegex: Boolean (Optional)
* }
* }
* </pre>
Expand Down Expand Up @@ -242,6 +245,7 @@ public Response<BinaryData> getTextBlocklistItemWithResponse(String name, String
* blocklistItemId: String (Required)
* description: String (Optional)
* text: String (Required)
* isRegex: Boolean (Optional)
* }
* }
* </pre>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.ai.contentsafety;

import com.azure.ai.contentsafety.implementation.ContentProvenanceClientImpl;
import com.azure.ai.contentsafety.models.DetectProvenanceOptions;
import com.azure.ai.contentsafety.models.DetectProvenanceResult;
import com.azure.ai.contentsafety.models.ProvenanceDetectOperation;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.polling.PollOperationDetails;
import com.azure.core.util.polling.PollerFlux;
import reactor.core.publisher.Mono;

/**
* Initializes a new instance of the asynchronous ContentProvenanceClient type.
*/
@ServiceClient(builder = ContentProvenanceClientBuilder.class, isAsync = true)
public final class ContentProvenanceAsyncClient {

@Generated
private final ContentProvenanceClientImpl serviceClient;

/**
* Initializes an instance of ContentProvenanceAsyncClient class.
*
* @param serviceClient the service client implementation.
*/
@Generated
ContentProvenanceAsyncClient(ContentProvenanceClientImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* Start Content Provenance Detection
*
* Starts an asynchronous Content Provenance Detection operation that inspects the supplied media for
* Microsoft-issued C2PA and imperceptible watermark signals indicating the content was created or modified using
* AI.
* <p><strong>Request Body Schema</strong></p>
*
* <pre>
* {@code
* {
* content (Required): {
* uri: String (Required)
* }
* }
* }
* </pre>
*
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* {
* id: String (Required)
* status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
* error (Optional): {
* error (Required): (recursive schema, see error above)
* }
* result (Optional): {
* outcome: String(NoProvenanceDetected/ProvenanceDetected) (Required)
* results (Optional): [
* (Optional){
* type: String(C2PA/Watermark) (Optional)
* provider: String (Optional)
* modelName: String (Optional)
* timestamp: OffsetDateTime (Optional)
* }
* ]
* }
* }
* }
* </pre>
*
* @param options Options describing the media to inspect using Content Provenance Detection.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the {@link PollerFlux} for polling of provides status details for long running operations.
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public PollerFlux<BinaryData, BinaryData> beginDetect(BinaryData options, RequestOptions requestOptions) {
return this.serviceClient.beginDetectAsync(options, requestOptions);
}

/**
* Get Content Provenance Detection Status
*
* Gets the status, result, or error of an asynchronous Content Provenance Detection operation.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* {
* id: String (Required)
* status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
* error (Optional): {
* error (Required): (recursive schema, see error above)
* }
* result (Optional): {
* outcome: String(NoProvenanceDetected/ProvenanceDetected) (Required)
* results (Optional): [
* (Optional){
* type: String(C2PA/Watermark) (Optional)
* provider: String (Optional)
* modelName: String (Optional)
* timestamp: OffsetDateTime (Optional)
* }
* ]
* }
* kind: String(Detect) (Required)
* createdAt: OffsetDateTime (Optional)
* lastUpdatedAt: OffsetDateTime (Optional)
* }
* }
* </pre>
*
* @param operationId The unique ID of the operation.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return content Provenance Detection Status
*
* Gets the status, result, or error of an asynchronous Content Provenance Detection operation along with
* {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getOperationStatusWithResponse(String operationId,
RequestOptions requestOptions) {
return this.serviceClient.getOperationStatusWithResponseAsync(operationId, requestOptions);
}

/**
* Start Content Provenance Detection
*
* Starts an asynchronous Content Provenance Detection operation that inspects the supplied media for
* Microsoft-issued C2PA and imperceptible watermark signals indicating the content was created or modified using
* AI.
*
* @param options Options describing the media to inspect using Content Provenance Detection.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link PollerFlux} for polling of provides status details for long running operations.
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public PollerFlux<PollOperationDetails, DetectProvenanceResult> beginDetect(DetectProvenanceOptions options) {
// Generated convenience method for beginDetectWithModel
RequestOptions requestOptions = new RequestOptions();
return serviceClient.beginDetectWithModelAsync(BinaryData.fromObject(options), requestOptions);
}

/**
* Get Content Provenance Detection Status
*
* Gets the status, result, or error of an asynchronous Content Provenance Detection operation.
*
* @param operationId The unique ID of the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return content Provenance Detection Status
*
* Gets the status, result, or error of an asynchronous Content Provenance Detection operation on successful
* completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ProvenanceDetectOperation> getOperationStatus(String operationId) {
// Generated convenience method for getOperationStatusWithResponse
RequestOptions requestOptions = new RequestOptions();
return getOperationStatusWithResponse(operationId, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(ProvenanceDetectOperation.class));
}
}
Loading
Loading