Class ModelCopyAuthorization
java.lang.Object
com.azure.ai.documentintelligence.models.ModelCopyAuthorization
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ModelCopyAuthorization>
public final class ModelCopyAuthorization
extends Object
implements com.azure.json.JsonSerializable<ModelCopyAuthorization>
Authorization to copy a document model to the specified target resource and
modelId.
-
Constructor Summary
ConstructorsConstructorDescriptionModelCopyAuthorization(String targetResourceId, String targetResourceRegion, String targetModelId, String targetModelLocation, String accessToken, OffsetDateTime expiresOn) Creates an instance of ModelCopyAuthorization class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelCopyAuthorizationfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ModelCopyAuthorization from the JsonReader.Get the accessToken property: Token used to authorize the request.Get the expiresOn property: Date/time when the access token expires.Get the targetModelId property: Identifier of the target document model.Get the targetModelLocation property: URL of the copied document model in the target account.Get the targetResourceId property: ID of the target Azure resource where the document model should be copied to.Get the targetResourceRegion property: Location of the target Azure resource where the document model should be copied to.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods 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
-
ModelCopyAuthorization
public ModelCopyAuthorization(String targetResourceId, String targetResourceRegion, String targetModelId, String targetModelLocation, String accessToken, OffsetDateTime expiresOn) Creates an instance of ModelCopyAuthorization class.- Parameters:
targetResourceId- the targetResourceId value to set.targetResourceRegion- the targetResourceRegion value to set.targetModelId- the targetModelId value to set.targetModelLocation- the targetModelLocation value to set.accessToken- the accessToken value to set.expiresOn- the expiresOn value to set.
-
-
Method Details
-
getTargetResourceId
Get the targetResourceId property: ID of the target Azure resource where the document model should be copied to.- Returns:
- the targetResourceId value.
-
getTargetResourceRegion
Get the targetResourceRegion property: Location of the target Azure resource where the document model should be copied to.- Returns:
- the targetResourceRegion value.
-
getTargetModelId
Get the targetModelId property: Identifier of the target document model.- Returns:
- the targetModelId value.
-
getTargetModelLocation
Get the targetModelLocation property: URL of the copied document model in the target account.- Returns:
- the targetModelLocation value.
-
getAccessToken
Get the accessToken property: Token used to authorize the request.- Returns:
- the accessToken value.
-
getExpiresOn
Get the expiresOn property: Date/time when the access token expires.- Returns:
- the expiresOn value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ModelCopyAuthorization>- Throws:
IOException
-
fromJson
public static ModelCopyAuthorization fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ModelCopyAuthorization from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ModelCopyAuthorization 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 ModelCopyAuthorization.
-