Class WebApiSkill
java.lang.Object
com.azure.search.documents.indexes.models.SearchIndexerSkill
com.azure.search.documents.indexes.models.WebApiSkill
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SearchIndexerSkill>
A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code.
-
Constructor Summary
ConstructorsConstructorDescriptionWebApiSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, String uri) Creates an instance of WebApiSkill class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebApiSkillfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of WebApiSkill from the JsonReader.Get the authIdentity property: The user-assigned managed identity used for outbound connections.Get the authResourceId property: Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations.Get the batchSize property: The desired batch size which indicates number of documents.Get the degreeOfParallelism property: If set, the number of parallel calls that can be made to the Web API.Get the httpHeaders property: The headers required to make the http request.Get the httpMethod property: The method for the http request.Get the odataType property: A URI fragment specifying the type of skill.Get the timeout property: The desired timeout for the request.getUri()Get the uri property: The url for the Web API.setAuthIdentity(SearchIndexerDataIdentity authIdentity) Set the authIdentity property: The user-assigned managed identity used for outbound connections.setAuthResourceId(String authResourceId) Set the authResourceId property: Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations.setBatchSize(Integer batchSize) Set the batchSize property: The desired batch size which indicates number of documents.setContext(String context) Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content).setDegreeOfParallelism(Integer degreeOfParallelism) Set the degreeOfParallelism property: If set, the number of parallel calls that can be made to the Web API.setDescription(String description) Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.setHttpHeaders(Map<String, String> httpHeaders) Set the httpHeaders property: The headers required to make the http request.setHttpMethod(String httpMethod) Set the httpMethod property: The method for the http request.Set the name property: The name of the skill which uniquely identifies it within the skillset.setTimeout(Duration timeout) Set the timeout property: The desired timeout for the request.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.search.documents.indexes.models.SearchIndexerSkill
getContext, getDescription, getInputs, getName, getOutputsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
WebApiSkill
public WebApiSkill(List<InputFieldMappingEntry> inputs, List<OutputFieldMappingEntry> outputs, String uri) Creates an instance of WebApiSkill class.- Parameters:
inputs- the inputs value to set.outputs- the outputs value to set.uri- the uri value to set.
-
-
Method Details
-
getOdataType
Get the odataType property: A URI fragment specifying the type of skill.- Overrides:
getOdataTypein classSearchIndexerSkill- Returns:
- the odataType value.
-
getUri
Get the uri property: The url for the Web API.- Returns:
- the uri value.
-
getHttpHeaders
Get the httpHeaders property: The headers required to make the http request.- Returns:
- the httpHeaders value.
-
setHttpHeaders
Set the httpHeaders property: The headers required to make the http request.- Parameters:
httpHeaders- the httpHeaders value to set.- Returns:
- the WebApiSkill object itself.
-
getHttpMethod
Get the httpMethod property: The method for the http request.- Returns:
- the httpMethod value.
-
setHttpMethod
Set the httpMethod property: The method for the http request.- Parameters:
httpMethod- the httpMethod value to set.- Returns:
- the WebApiSkill object itself.
-
getTimeout
Get the timeout property: The desired timeout for the request. Default is 30 seconds.- Returns:
- the timeout value.
-
setTimeout
Set the timeout property: The desired timeout for the request. Default is 30 seconds.- Parameters:
timeout- the timeout value to set.- Returns:
- the WebApiSkill object itself.
-
getBatchSize
Get the batchSize property: The desired batch size which indicates number of documents.- Returns:
- the batchSize value.
-
setBatchSize
Set the batchSize property: The desired batch size which indicates number of documents.- Parameters:
batchSize- the batchSize value to set.- Returns:
- the WebApiSkill object itself.
-
getDegreeOfParallelism
Get the degreeOfParallelism property: If set, the number of parallel calls that can be made to the Web API.- Returns:
- the degreeOfParallelism value.
-
setDegreeOfParallelism
Set the degreeOfParallelism property: If set, the number of parallel calls that can be made to the Web API.- Parameters:
degreeOfParallelism- the degreeOfParallelism value to set.- Returns:
- the WebApiSkill object itself.
-
getAuthResourceId
Get the authResourceId property: Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.- Returns:
- the authResourceId value.
-
setAuthResourceId
Set the authResourceId property: Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token.- Parameters:
authResourceId- the authResourceId value to set.- Returns:
- the WebApiSkill object itself.
-
getAuthIdentity
Get the authIdentity property: The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared.- Returns:
- the authIdentity value.
-
setAuthIdentity
Set the authIdentity property: The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared.- Parameters:
authIdentity- the authIdentity value to set.- Returns:
- the WebApiSkill object itself.
-
setName
Set the name property: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'.- Overrides:
setNamein classSearchIndexerSkill- Parameters:
name- the name value to set.- Returns:
- the SearchIndexerSkill object itself.
-
setDescription
Set the description property: The description of the skill which describes the inputs, outputs, and usage of the skill.- Overrides:
setDescriptionin classSearchIndexerSkill- Parameters:
description- the description value to set.- Returns:
- the SearchIndexerSkill object itself.
-
setContext
Set the context property: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document.- Overrides:
setContextin classSearchIndexerSkill- Parameters:
context- the context value to set.- Returns:
- the SearchIndexerSkill object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SearchIndexerSkill>- Overrides:
toJsonin classSearchIndexerSkill- Throws:
IOException
-
fromJson
Reads an instance of WebApiSkill from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of WebApiSkill if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the WebApiSkill.
-