Class CopyAuthorization

java.lang.Object
com.azure.ai.documentintelligence.models.CopyAuthorization
All Implemented Interfaces:
com.azure.json.JsonSerializable<CopyAuthorization>

public final class CopyAuthorization extends Object implements com.azure.json.JsonSerializable<CopyAuthorization>
Authorization to copy a document model to the specified target resource and modelId.
  • Constructor Details

    • CopyAuthorization

      public CopyAuthorization(String targetResourceId, String targetResourceRegion, String targetModelId, String targetModelLocation, String accessToken, OffsetDateTime expirationDateTime)
      Creates an instance of CopyAuthorization 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.
      expirationDateTime - the expirationDateTime value to set.
  • Method Details

    • 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.
    • 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.
    • getAccessToken

      public String getAccessToken()
      Get the accessToken property: Token used to authorize the request.
      Returns:
      the accessToken value.
    • getExpirationDateTime

      public OffsetDateTime getExpirationDateTime()
      Get the expirationDateTime property: Date/time when the access token expires.
      Returns:
      the expirationDateTime value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<CopyAuthorization>
      Throws:
      IOException
    • fromJson

      public static CopyAuthorization fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of CopyAuthorization from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of CopyAuthorization 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 CopyAuthorization.