CognitiveServicesAccountKey Class

public final class CognitiveServicesAccountKey
extends CognitiveServicesAccount

The multi-region account key of an Azure AI service resource that's attached to a skillset.

Constructor Summary

Constructor Description
CognitiveServicesAccountKey(String key)

Creates an instance of CognitiveServicesAccountKey class.

Method Summary

Modifier and Type Method and Description
static CognitiveServicesAccountKey fromJson(JsonReader jsonReader)

Reads an instance of CognitiveServicesAccountKey from the JsonReader.

String getKey()

Get the key property: The key used to provision the Azure AI service resource attached to a skillset.

String getOdataType()

Get the odataType property: A URI fragment specifying the type of Azure AI service resource attached to a skillset.

CognitiveServicesAccountKey setDescription(String description)

Set the description property: Description of the Azure AI service resource attached to a skillset.

CognitiveServicesAccountKey setKey(String key)

Set the key property: The key used to provision the cognitive service resource attached to a skillset.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from CognitiveServicesAccount

Methods inherited from java.lang.Object

Constructor Details

CognitiveServicesAccountKey

public CognitiveServicesAccountKey(String key)

Creates an instance of CognitiveServicesAccountKey class.

Parameters:

key - the key value to set.

Method Details

fromJson

public static CognitiveServicesAccountKey fromJson(JsonReader jsonReader)

Reads an instance of CognitiveServicesAccountKey from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CognitiveServicesAccountKey if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getKey

public String getKey()

Get the key property: The key used to provision the Azure AI service resource attached to a skillset.

Returns:

the key value.

getOdataType

public String getOdataType()

Get the odataType property: A URI fragment specifying the type of Azure AI service resource attached to a skillset.

Overrides:

CognitiveServicesAccountKey.getOdataType()

Returns:

the odataType value.

setDescription

public CognitiveServicesAccountKey setDescription(String description)

Set the description property: Description of the Azure AI service resource attached to a skillset.

Overrides:

CognitiveServicesAccountKey.setDescription(String description)

Parameters:

description

setKey

public CognitiveServicesAccountKey setKey(String key)

Set the key property: The key used to provision the cognitive service resource attached to a skillset.

Parameters:

key - the key value to set.

Returns:

the CognitiveServicesAccountKey object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

CognitiveServicesAccountKey.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to