GoogleCloudAiplatformV1GenerateContentRequest.fromJson constructor

GoogleCloudAiplatformV1GenerateContentRequest.fromJson(
  1. Map json_
)

Implementation

GoogleCloudAiplatformV1GenerateContentRequest.fromJson(core.Map json_)
    : this(
        contents: json_.containsKey('contents')
            ? (json_['contents'] as core.List)
                .map((value) => GoogleCloudAiplatformV1Content.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        generationConfig: json_.containsKey('generationConfig')
            ? GoogleCloudAiplatformV1GenerationConfig.fromJson(
                json_['generationConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        safetySettings: json_.containsKey('safetySettings')
            ? (json_['safetySettings'] as core.List)
                .map((value) => GoogleCloudAiplatformV1SafetySetting.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        systemInstruction: json_.containsKey('systemInstruction')
            ? GoogleCloudAiplatformV1Content.fromJson(
                json_['systemInstruction']
                    as core.Map<core.String, core.dynamic>)
            : null,
        toolConfig: json_.containsKey('toolConfig')
            ? GoogleCloudAiplatformV1ToolConfig.fromJson(
                json_['toolConfig'] as core.Map<core.String, core.dynamic>)
            : null,
        tools: json_.containsKey('tools')
            ? (json_['tools'] as core.List)
                .map((value) => GoogleCloudAiplatformV1Tool.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );