Class CopyAuthorization

java.lang.Object
com.azure.ai.formrecognizer.training.models.CopyAuthorization

public final class CopyAuthorization extends Object
The CopyAuthorization model.
  • Constructor Details

    • CopyAuthorization

      public CopyAuthorization(String modelId, String accessToken, String resourceId, String resourceRegion, long expiresOn)
      Create a CopyAuthorization object
      Parameters:
      modelId - The model identifier
      accessToken - The token used to authorize the request
      resourceId - The resource identifier
      resourceRegion - The region of the resource
      expiresOn - The expiry time of the token
  • Method Details

    • getModelId

      public String getModelId()
      Get the modelId property.
      Returns:
      the modelId value.
    • getAccessToken

      public String getAccessToken()
      Get the token claim used to authorize the request.
      Returns:
      the accessToken value.
    • getExpiresOn

      public OffsetDateTime getExpiresOn()
      Get the date-time when the access token expires.
      Returns:
      the date-time value when the access token expires.
    • getResourceId

      public String getResourceId()
      Get the Azure Resource Id of the target Form Recognizer resource where the model will be copied to.
      Returns:
      the resourceId value.
    • getResourceRegion

      public String getResourceRegion()
      Get the location of the target Form Recognizer resource.
      Returns:
      the resourceRegion value.
    • toJson

      public String 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

      public static CopyAuthorization fromJson(String copyAuthorization)
      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