Partager via


ModelCopyAuthorization Class

  • java.lang.Object
    • com.azure.ai.documentintelligence.models.ModelCopyAuthorization

Implements

public final class ModelCopyAuthorization
implements JsonSerializable<ModelCopyAuthorization>

Authorization to copy a document model to the specified target resource and modelId.

Constructor Summary

Constructor Description
ModelCopyAuthorization(String targetResourceId, String targetResourceRegion, String targetModelId, String targetModelLocation, String accessToken, OffsetDateTime expiresOn)

Creates an instance of ModelCopyAuthorization class.

Method Summary

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

Reads an instance of ModelCopyAuthorization from the JsonReader.

String getAccessToken()

Get the accessToken property: Token used to authorize the request.

OffsetDateTime getExpiresOn()

Get the expiresOn property: Date/time when the access token expires.

String getTargetModelId()

Get the targetModelId property: Identifier of the target document model.

String getTargetModelLocation()

Get the targetModelLocation property: URL of the copied document model in the target account.

String getTargetResourceId()

Get the targetResourceId property: ID of the target Azure resource where the document model should be copied to.

String getTargetResourceRegion()

Get the targetResourceRegion property: Location of the target Azure resource where the document model should be copied to.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

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

fromJson

public static ModelCopyAuthorization fromJson(JsonReader jsonReader)

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:

IOException

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

getAccessToken

public String getAccessToken()

Get the accessToken property: Token used to authorize the request.

Returns:

the accessToken value.

getExpiresOn

public OffsetDateTime getExpiresOn()

Get the expiresOn property: Date/time when the access token expires.

Returns:

the expiresOn value.

getTargetModelId

public String getTargetModelId()

Get the targetModelId property: Identifier of the target document model.

Returns:

the targetModelId value.

getTargetModelLocation

public String getTargetModelLocation()

Get the targetModelLocation property: URL of the copied document model in the target account.

Returns:

the targetModelLocation value.

getTargetResourceId

public String getTargetResourceId()

Get the targetResourceId property: ID of the target Azure resource where the document model should be copied to.

Returns:

the targetResourceId value.

getTargetResourceRegion

public String getTargetResourceRegion()

Get the targetResourceRegion property: Location of the target Azure resource where the document model should be copied to.

Returns:

the targetResourceRegion value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to