BatchTranslateTextRequest.fromJson constructor

BatchTranslateTextRequest.fromJson(
  1. Map json_
)

Implementation

BatchTranslateTextRequest.fromJson(core.Map json_)
    : this(
        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) => InputConfig.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : 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,
        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')
            ? OutputConfig.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,
      );