BatchTranslateDocumentRequest.fromJson constructor

BatchTranslateDocumentRequest.fromJson(
  1. Map json_
)

Implementation

BatchTranslateDocumentRequest.fromJson(core.Map json_)
    : this(
        customizedAttribution: json_.containsKey('customizedAttribution')
            ? json_['customizedAttribution'] as core.String
            : null,
        enableRotationCorrection:
            json_.containsKey('enableRotationCorrection')
                ? json_['enableRotationCorrection'] as core.bool
                : null,
        enableShadowRemovalNativePdf:
            json_.containsKey('enableShadowRemovalNativePdf')
                ? json_['enableShadowRemovalNativePdf'] as core.bool
                : null,
        formatConversions: json_.containsKey('formatConversions')
            ? (json_['formatConversions']
                    as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        glossaries: json_.containsKey('glossaries')
            ? (json_['glossaries'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  TranslateTextGlossaryConfig.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        inputConfigs: json_.containsKey('inputConfigs')
            ? (json_['inputConfigs'] as core.List)
                .map((value) => BatchDocumentInputConfig.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        models: json_.containsKey('models')
            ? (json_['models'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        outputConfig: json_.containsKey('outputConfig')
            ? BatchDocumentOutputConfig.fromJson(
                json_['outputConfig'] as core.Map<core.String, core.dynamic>)
            : null,
        sourceLanguageCode: json_.containsKey('sourceLanguageCode')
            ? json_['sourceLanguageCode'] as core.String
            : null,
        targetLanguageCodes: json_.containsKey('targetLanguageCodes')
            ? (json_['targetLanguageCodes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
      );