TranslateDocumentRequest.fromJson constructor

TranslateDocumentRequest.fromJson(
  1. Map json_
)

Implementation

TranslateDocumentRequest.fromJson(core.Map json_)
    : this(
        customizedAttribution: json_.containsKey('customizedAttribution')
            ? json_['customizedAttribution'] as core.String
            : null,
        documentInputConfig: json_.containsKey('documentInputConfig')
            ? DocumentInputConfig.fromJson(json_['documentInputConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        documentOutputConfig: json_.containsKey('documentOutputConfig')
            ? DocumentOutputConfig.fromJson(json_['documentOutputConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        enableRotationCorrection:
            json_.containsKey('enableRotationCorrection')
                ? json_['enableRotationCorrection'] as core.bool
                : null,
        enableShadowRemovalNativePdf:
            json_.containsKey('enableShadowRemovalNativePdf')
                ? json_['enableShadowRemovalNativePdf'] as core.bool
                : null,
        glossaryConfig: json_.containsKey('glossaryConfig')
            ? TranslateTextGlossaryConfig.fromJson(json_['glossaryConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        isTranslateNativePdfOnly:
            json_.containsKey('isTranslateNativePdfOnly')
                ? json_['isTranslateNativePdfOnly'] as core.bool
                : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        model:
            json_.containsKey('model') ? json_['model'] as core.String : null,
        sourceLanguageCode: json_.containsKey('sourceLanguageCode')
            ? json_['sourceLanguageCode'] as core.String
            : null,
        targetLanguageCode: json_.containsKey('targetLanguageCode')
            ? json_['targetLanguageCode'] as core.String
            : null,
      );