@azure-rest/ai-content-safety package

Interfaces

AddBlockItems
AddBlockItems200Response

The request has succeeded.

AddBlockItemsBodyParam
AddBlockItemsDefaultHeaders
AddBlockItemsDefaultResponse
AddBlockItemsOptions

The request of adding blockItems to text blocklist.

AddBlockItemsResultOutput

The response of adding blockItems to text blocklist.

AnalyzeImage
AnalyzeImage200Response

The request has succeeded.

AnalyzeImageBodyParam
AnalyzeImageDefaultHeaders
AnalyzeImageDefaultResponse
AnalyzeImageOptions

The analysis request of the image.

AnalyzeImageOptionsOutput

The analysis request of the image.

AnalyzeImageResultOutput

The analysis response of the image.

AnalyzeText
AnalyzeText200Response

The request has succeeded.

AnalyzeTextBodyParam
AnalyzeTextDefaultHeaders
AnalyzeTextDefaultResponse
AnalyzeTextOptions

The analysis request of the text.

AnalyzeTextOptionsOutput

The analysis request of the text.

AnalyzeTextResultOutput

The analysis response of the text

CreateOrUpdateTextBlocklist200Response

The request has succeeded.

CreateOrUpdateTextBlocklist201Response

The request has succeeded and a new resource has been created as a result.

CreateOrUpdateTextBlocklistBodyParam
CreateOrUpdateTextBlocklistDefaultHeaders
CreateOrUpdateTextBlocklistDefaultResponse
CreateOrUpdateTextBlocklistMediaTypesParam
DeleteTextBlocklist204Response

There is no content to send for this request, but the headers may be useful.

DeleteTextBlocklistDefaultHeaders
DeleteTextBlocklistDefaultResponse
GetTextBlocklist
GetTextBlocklist200Response

The request has succeeded.

GetTextBlocklistDefaultHeaders
GetTextBlocklistDefaultResponse
GetTextBlocklistItem
GetTextBlocklistItem200Response

The request has succeeded.

GetTextBlocklistItemDefaultHeaders
GetTextBlocklistItemDefaultResponse
ImageAnalyzeSeverityResultOutput

Image analysis result.

ImageData

The content or blob url of image, could be base64 encoding bytes or blob url. If both are given, the request will be refused. The maximum size of image is 2048 pixels * 2048 pixels, no larger than 4MB at the same time. The minimum size of image is 50 pixels * 50 pixels.

ImageDataOutput

The content or blob url of image, could be base64 encoding bytes or blob url. If both are given, the request will be refused. The maximum size of image is 2048 pixels * 2048 pixels, no larger than 4MB at the same time. The minimum size of image is 50 pixels * 50 pixels.

ListTextBlocklistItems
ListTextBlocklistItems200Response

The request has succeeded.

ListTextBlocklistItemsDefaultHeaders
ListTextBlocklistItemsDefaultResponse
ListTextBlocklistItemsQueryParam
ListTextBlocklistItemsQueryParamProperties
ListTextBlocklists
ListTextBlocklists200Response

The request has succeeded.

ListTextBlocklistsDefaultHeaders
ListTextBlocklistsDefaultResponse
PagingOptions

Options for the paging helper

RemoveBlockItems
RemoveBlockItems204Response

There is no content to send for this request, but the headers may be useful.

RemoveBlockItemsBodyParam
RemoveBlockItemsDefaultHeaders
RemoveBlockItemsDefaultResponse
RemoveBlockItemsOptions

The request of removing blockItems from text blocklist.

Routes
TextAnalyzeSeverityResultOutput

Text analysis result.

TextBlockItemInfo

Block item info in text blocklist.

TextBlockItemOutput

Item in TextBlocklist.

TextBlocklist

Text Blocklist.

TextBlocklistMatchResultOutput

The result of blocklist match.

TextBlocklistOutput

Text Blocklist.

Type Aliases

AddBlockItemsParameters
AnalyzeImageParameters
AnalyzeTextParameters
ContentSafetyClient
CreateOrUpdateTextBlocklistParameters
DeleteTextBlocklistParameters
GetArrayType

Helper type to extract the type of an array

GetPage

The type of a custom function that defines how to get a page and a link to the next one if any.

GetTextBlocklistItemParameters
GetTextBlocklistParameters
ListTextBlocklistItemsParameters
ListTextBlocklistsParameters
PaginateReturn

Helper type to infer the Type of the paged elements from the response type This type is generated based on the swagger information for x-ms-pageable specifically on the itemName property which indicates the property of the response where the page items are found. The default value is value. This type will allow us to provide strongly typed Iterator based on the response we get as second parameter

RemoveBlockItemsParameters
TextBlockItemListOutput

Paged collection of TextBlockItem items

TextBlocklistListOutput

Paged collection of TextBlocklist items

TextBlocklistResourceMergeAndPatch

The resource instance.

Functions

default(string, KeyCredential, ClientOptions)

Initialize a new instance of ContentSafetyClient

isUnexpected(AnalyzeText200Response | AnalyzeTextDefaultResponse)
isUnexpected(AnalyzeImage200Response | AnalyzeImageDefaultResponse)
isUnexpected(GetTextBlocklist200Response | GetTextBlocklistDefaultResponse)
isUnexpected(CreateOrUpdateTextBlocklist200Response | CreateOrUpdateTextBlocklist201Response | CreateOrUpdateTextBlocklistDefaultResponse)
isUnexpected(DeleteTextBlocklist204Response | DeleteTextBlocklistDefaultResponse)
isUnexpected(ListTextBlocklists200Response | ListTextBlocklistsDefaultResponse)
isUnexpected(AddBlockItems200Response | AddBlockItemsDefaultResponse)
isUnexpected(RemoveBlockItems204Response | RemoveBlockItemsDefaultResponse)
isUnexpected(GetTextBlocklistItem200Response | GetTextBlocklistItemDefaultResponse)
isUnexpected(ListTextBlocklistItems200Response | ListTextBlocklistItemsDefaultResponse)
paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)

Helper to paginate results from an initial response that follows the specification of Autorest x-ms-pageable extension

Function Details

default(string, KeyCredential, ClientOptions)

Initialize a new instance of ContentSafetyClient

function default(endpoint: string, credentials: KeyCredential, options?: ClientOptions): ContentSafetyClient

Parameters

endpoint

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://.cognitiveservices.azure.com).

credentials
KeyCredential

uniquely identify client credential

options
ClientOptions

the parameter for all optional parameters

Returns

isUnexpected(AnalyzeText200Response | AnalyzeTextDefaultResponse)

function isUnexpected(response: AnalyzeText200Response | AnalyzeTextDefaultResponse): response

Parameters

Returns

response

isUnexpected(AnalyzeImage200Response | AnalyzeImageDefaultResponse)

function isUnexpected(response: AnalyzeImage200Response | AnalyzeImageDefaultResponse): response

Parameters

Returns

response

isUnexpected(GetTextBlocklist200Response | GetTextBlocklistDefaultResponse)

function isUnexpected(response: GetTextBlocklist200Response | GetTextBlocklistDefaultResponse): response

Parameters

Returns

response

isUnexpected(CreateOrUpdateTextBlocklist200Response | CreateOrUpdateTextBlocklist201Response | CreateOrUpdateTextBlocklistDefaultResponse)

function isUnexpected(response: CreateOrUpdateTextBlocklist200Response | CreateOrUpdateTextBlocklist201Response | CreateOrUpdateTextBlocklistDefaultResponse): response

Parameters

Returns

response

isUnexpected(DeleteTextBlocklist204Response | DeleteTextBlocklistDefaultResponse)

function isUnexpected(response: DeleteTextBlocklist204Response | DeleteTextBlocklistDefaultResponse): response

Parameters

Returns

response

isUnexpected(ListTextBlocklists200Response | ListTextBlocklistsDefaultResponse)

function isUnexpected(response: ListTextBlocklists200Response | ListTextBlocklistsDefaultResponse): response

Parameters

Returns

response

isUnexpected(AddBlockItems200Response | AddBlockItemsDefaultResponse)

function isUnexpected(response: AddBlockItems200Response | AddBlockItemsDefaultResponse): response

Parameters

Returns

response

isUnexpected(RemoveBlockItems204Response | RemoveBlockItemsDefaultResponse)

function isUnexpected(response: RemoveBlockItems204Response | RemoveBlockItemsDefaultResponse): response

Parameters

Returns

response

isUnexpected(GetTextBlocklistItem200Response | GetTextBlocklistItemDefaultResponse)

function isUnexpected(response: GetTextBlocklistItem200Response | GetTextBlocklistItemDefaultResponse): response

Parameters

Returns

response

isUnexpected(ListTextBlocklistItems200Response | ListTextBlocklistItemsDefaultResponse)

function isUnexpected(response: ListTextBlocklistItems200Response | ListTextBlocklistItemsDefaultResponse): response

Parameters

Returns

response

paginate<TResponse>(Client, TResponse, PagingOptions<TResponse>)

Helper to paginate results from an initial response that follows the specification of Autorest x-ms-pageable extension

function paginate<TResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>

Parameters

client
Client

Client to use for sending the next page requests

initialResponse

TResponse

Initial response containing the nextLink and current page of elements

options

PagingOptions<TResponse>

Returns

  • PagedAsyncIterableIterator to iterate the elements