Class VisionServiceOptions
- java.lang.Object
-
- com.azure.android.ai.vision.common.VisionServiceOptions
-
- All Implemented Interfaces:
AutoCloseable
public final class VisionServiceOptions extends Object implements AutoCloseable
VisionServiceOptions class represents the Vision service options.Note: close() must be called in order to release underlying resources held by the object.
-
-
Constructor Summary
Constructors Constructor Description VisionServiceOptions(TokenCredential credential)
Initializes a new instance of Vision service options.VisionServiceOptions(URL url)
Initializes a new instance of Vision service optionsVisionServiceOptions(URL url, VisionServiceAdvancedOptions options)
Initializes a new instance of Vision service options.VisionServiceOptions(URL url, TokenCredential credential)
Initializes a new instance of Vision service options.VisionServiceOptions(URL url, TokenCredential credential, VisionServiceAdvancedOptions options)
Initializes a new instance of Vision service options.VisionServiceOptions(URL url, String key)
Initializes a new instance of Vision service options.VisionServiceOptions(URL url, String key, VisionServiceAdvancedOptions options)
Initializes a new instance of Vision service options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Dispose of associated resources.VisionServiceAdvancedOptions
getAdvanced()
Gets the advanced options of the vision service options.TokenCredential
getTokenCredential()
Gets a token credential objectvoid
setTokenCredential(TokenCredential value)
Sets a token credential object to refresh auth tokens
-
-
-
Constructor Detail
-
VisionServiceOptions
public VisionServiceOptions(URL url)
Initializes a new instance of Vision service options- Parameters:
url
- An endpoint url to the service
-
VisionServiceOptions
public VisionServiceOptions(URL url, VisionServiceAdvancedOptions options)
Initializes a new instance of Vision service options.- Parameters:
url
- An endpoint url to the serviceoptions
- A type of theVisionServiceAdvancedOptions
options.
-
VisionServiceOptions
public VisionServiceOptions(URL url, String key)
Initializes a new instance of Vision service options.- Parameters:
url
- An endpoint url to the servicekey
- A key to the service
-
VisionServiceOptions
public VisionServiceOptions(URL url, String key, VisionServiceAdvancedOptions options)
Initializes a new instance of Vision service options.- Parameters:
url
- An endpoint url to the servicekey
- A key to the serviceoptions
- A type of theVisionServiceAdvancedOptions
options.
-
VisionServiceOptions
public VisionServiceOptions(URL url, TokenCredential credential)
Initializes a new instance of Vision service options.- Parameters:
url
- An endpoint url to the servicecredential
- A TokenCredential to generate AccessToken on demand
-
VisionServiceOptions
public VisionServiceOptions(TokenCredential credential)
Initializes a new instance of Vision service options.- Parameters:
url
- An endpoint url to the servicecredential
- A TokenCredential to generate AccessToken on demand
-
VisionServiceOptions
public VisionServiceOptions(URL url, TokenCredential credential, VisionServiceAdvancedOptions options)
Initializes a new instance of Vision service options.- Parameters:
url
- An endpoint url to the servicecredential
- A TokenCredential to generate AccessToken on demandoptions
- A type of theVisionServiceAdvancedOptions
options.
-
-
Method Detail
-
getTokenCredential
public final TokenCredential getTokenCredential()
Gets a token credential object- Returns:
- TokenCredential object for this
VisionServiceAdvancedOptions
instance
-
setTokenCredential
public final void setTokenCredential(TokenCredential value)
Sets a token credential object to refresh auth tokens- Parameters:
value
- as TokenCredential object
-
getAdvanced
public final VisionServiceAdvancedOptions getAdvanced()
Gets the advanced options of the vision service options.- Returns:
- The VisionServiceAdvancedOptions object.
-
close
public final void close()
Dispose of associated resources. Note: close() must be called in order to release underlying resources held by the object.- Specified by:
close
in interfaceAutoCloseable
-
-