GoogleCloudAiplatformV1Candidate.fromJson constructor

GoogleCloudAiplatformV1Candidate.fromJson(
  1. Map json_
)

Implementation

GoogleCloudAiplatformV1Candidate.fromJson(core.Map json_)
    : this(
        citationMetadata: json_.containsKey('citationMetadata')
            ? GoogleCloudAiplatformV1CitationMetadata.fromJson(
                json_['citationMetadata']
                    as core.Map<core.String, core.dynamic>)
            : null,
        content: json_.containsKey('content')
            ? GoogleCloudAiplatformV1Content.fromJson(
                json_['content'] as core.Map<core.String, core.dynamic>)
            : null,
        finishMessage: json_.containsKey('finishMessage')
            ? json_['finishMessage'] as core.String
            : null,
        finishReason: json_.containsKey('finishReason')
            ? json_['finishReason'] as core.String
            : null,
        groundingMetadata: json_.containsKey('groundingMetadata')
            ? GoogleCloudAiplatformV1GroundingMetadata.fromJson(
                json_['groundingMetadata']
                    as core.Map<core.String, core.dynamic>)
            : null,
        index: json_.containsKey('index') ? json_['index'] as core.int : null,
        safetyRatings: json_.containsKey('safetyRatings')
            ? (json_['safetyRatings'] as core.List)
                .map((value) => GoogleCloudAiplatformV1SafetyRating.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );