Module Values.TranslateDocumentResponseSource

Translates the input document from the source language to the target language. This synchronous operation supports text, HTML, or Word documents as the input document. TranslateDocument supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as β€œen” (English). If you set the Formality parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see Setting formality.

Sourcetype nonrec t = {
  1. translatedDocument : TranslatedDocument.t option;
    (*

    The document containing the translated content. The document format matches the source document format.

    *)
  2. sourceLanguageCode : LanguageCodeString.t option;
    (*

    The language code of the source document.

    *)
  3. targetLanguageCode : LanguageCodeString.t option;
    (*

    The language code of the translated document.

    *)
  4. appliedTerminologies : AppliedTerminologyList.t option;
    (*

    The names of the custom terminologies applied to the input text by Amazon Translate to produce the translated text document.

    *)
  5. appliedSettings : TranslationSettings.t option;
}
Sourcetype nonrec error = [
  1. | `InternalServerException of InternalServerException.t
  2. | `InvalidRequestException of InvalidRequestException.t
  3. | `LimitExceededException of LimitExceededException.t
  4. | `ResourceNotFoundException of ResourceNotFoundException.t
  5. | `ServiceUnavailableException of ServiceUnavailableException.t
  6. | `TooManyRequestsException of TooManyRequestsException.t
  7. | `UnsupportedLanguagePairException of UnsupportedLanguagePairException.t
  8. | `Unknown_operation_error of string * string option
]
Sourceval make : ?translatedDocument:??? -> ?sourceLanguageCode:??? -> ?targetLanguageCode:??? -> ?appliedTerminologies:??? -> ?appliedSettings:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `InternalServerException of InternalServerException.t | `InvalidRequestException of InvalidRequestException.t | `LimitExceededException of LimitExceededException.t | `ResourceNotFoundException of ResourceNotFoundException.t | `ServiceUnavailableException of ServiceUnavailableException.t | `TooManyRequestsException of TooManyRequestsException.t | `Unknown_operation_error of string * string option | `UnsupportedLanguagePairException of UnsupportedLanguagePairException.t ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `InternalServerException of InternalServerException.t | `InvalidRequestException of InvalidRequestException.t | `LimitExceededException of LimitExceededException.t | `ResourceNotFoundException of ResourceNotFoundException.t | `ServiceUnavailableException of ServiceUnavailableException.t | `TooManyRequestsException of TooManyRequestsException.t | `Unknown_operation_error of string * string option | `UnsupportedLanguagePairException of UnsupportedLanguagePairException.t ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval to_value : t -> [> `Structure of (string * [> `List of [> `Structure of (string * [> `List of [> `Structure of (string * [> `String of String_.t ]) list ] list | `String of ResourceName.t ]) list ] list | `String of LanguageCodeString.t | `Structure of (string * [> `Blob of TranslatedDocumentContent.t | `Enum of string ]) list ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t