Class CopyAuthorization
java.lang.Object
com.azure.ai.formrecognizer.training.models.CopyAuthorization
The CopyAuthorization model.
-
Constructor Summary
ConstructorDescriptionCopyAuthorization
(String modelId, String accessToken, String resourceId, String resourceRegion, long expiresOn) Create a CopyAuthorization object -
Method Summary
Modifier and TypeMethodDescriptionstatic CopyAuthorization
Converts the json string representation to its equivalent CopyAuthorization object.Get the token claim used to authorize the request.Get the date-time when the access token expires.Get the modelId property.Get the Azure Resource Id of the target Form Recognizer resource where the model will be copied to.Get the location of the target Form Recognizer resource.toJson()
Converts the CopyAuthorization object to its equivalent json string representation.
-
Constructor Details
-
CopyAuthorization
public CopyAuthorization(String modelId, String accessToken, String resourceId, String resourceRegion, long expiresOn) Create a CopyAuthorization object- Parameters:
modelId
- The model identifieraccessToken
- The token used to authorize the requestresourceId
- The resource identifierresourceRegion
- The region of the resourceexpiresOn
- The expiry time of the token
-
-
Method Details
-
getModelId
Get the modelId property.- Returns:
- the
modelId
value.
-
getAccessToken
Get the token claim used to authorize the request.- Returns:
- the
accessToken
value.
-
getExpiresOn
Get the date-time when the access token expires.- Returns:
- the date-time value when the access token expires.
-
getResourceId
Get the Azure Resource Id of the target Form Recognizer resource where the model will be copied to.- Returns:
- the
resourceId
value.
-
getResourceRegion
Get the location of the target Form Recognizer resource.- Returns:
- the
resourceRegion
value.
-
toJson
Converts the CopyAuthorization object to its equivalent json string representation.- Returns:
- the json string representation of the CopyAuthorization object.
- Throws:
IllegalStateException
- exception if the serialization failed
-
fromJson
Converts the json string representation to its equivalent CopyAuthorization object.- Parameters:
copyAuthorization
- the json string representation of the object.- Returns:
- the CopyAuthorization object equivalent of the json string.
- Throws:
IllegalStateException
- exception if the deserialization failed
-