{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-translate/json-schema/amazon-translate-translate-document-response-schema.json",
  "title": "TranslateDocumentResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-translate-operations-api-openapi.yml#/components/schemas/TranslateDocumentResponse",
  "type": "object",
  "properties": {
    "TranslatedDocument": {
      "$ref": "#/$defs/TranslatedDocument"
    },
    "SourceLanguageCode": {
      "type": "string",
      "description": "The language code of the source document."
    },
    "TargetLanguageCode": {
      "type": "string",
      "description": "The language code of the translated document."
    },
    "AppliedTerminologies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AppliedTerminology"
      },
      "description": "The names of the custom terminologies applied to the input text by Amazon Translate to produce the translated text document."
    },
    "AppliedSettings": {
      "$ref": "#/$defs/TranslationSettings"
    }
  },
  "required": [
    "TranslatedDocument",
    "SourceLanguageCode",
    "TargetLanguageCode"
  ],
  "$defs": {
    "AppliedTerminology": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the custom terminology applied to the input text by Amazon Translate for the translated text response."
        },
        "Terms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Term"
          },
          "description": "The specific terms of the custom terminology applied to the input text by Amazon Translate for the translated text response. A maximum of 250 terms will be returned, and the specific terms applied will be the first 250 terms in the source text."
        }
      }
    },
    "Term": {
      "type": "object",
      "properties": {
        "SourceText": {
          "type": "string",
          "description": "The source text of the term being translated by the custom terminology."
        },
        "TargetText": {
          "type": "string",
          "description": "The target text of the term being translated by the custom terminology."
        }
      }
    },
    "TranslatedDocument": {
      "type": "object",
      "properties": {
        "Content": {
          "type": "string",
          "format": "byte",
          "description": "The document containing the translated content."
        }
      },
      "required": [
        "Content"
      ]
    },
    "TranslationSettings": {
      "type": "object",
      "properties": {
        "Formality": {
          "type": "string",
          "enum": [
            "FORMAL",
            "INFORMAL"
          ],
          "description": "You can specify the desired level of formality for translations to supported target languages. The formality setting controls the level of formal language usage (also known as register) in the translation output. You can set the value to informal or formal. If you don't specify a value for formality, or if the target language doesn't support formality, the translation will ignore the formality setting. If you specify multiple target languages for the job, translate ignores the formality setting for any unsupported target language. For a list of target languages that support formality, see Supp"
        },
        "Profanity": {
          "type": "string",
          "enum": [
            "MASK"
          ],
          "description": "You can enable the profanity setting if you want to mask profane words and phrases in your translation output. To mask profane words and phrases, Amazon Translate replaces them with the grawlix string “?$#@$“. This 5-character sequence is used for each profane word or phrase, regardless of the length or number of words. Amazon Translate doesn't detect profanity in all of its supported languages. For languages that don't support profanity detection, see Unsupported languages in the Amazon Translate Developer Guide. If you specify multiple target languages for the job, all the target languages m"
        },
        "Brevity": {
          "type": "string",
          "enum": [
            "ON"
          ],
          "description": "When you turn on brevity, Amazon Translate reduces the length of the translation output for most translations (when compared with the same translation with brevity turned off). By default, brevity is turned off. If you turn on brevity for a translation request with an unsupported language pair, the translation proceeds with the brevity setting turned off. For the language pairs that brevity supports, see Using brevity in the Amazon Translate Developer Guide."
        }
      }
    }
  }
}