GoogleCloudAiplatformV1GenerateContentResponsePromptFeedback.fromJson constructor

GoogleCloudAiplatformV1GenerateContentResponsePromptFeedback.fromJson(
  1. Map json_
)

Implementation

GoogleCloudAiplatformV1GenerateContentResponsePromptFeedback.fromJson(
    core.Map json_)
    : this(
        blockReason: json_.containsKey('blockReason')
            ? json_['blockReason'] as core.String
            : null,
        blockReasonMessage: json_.containsKey('blockReasonMessage')
            ? json_['blockReasonMessage'] as core.String
            : null,
        safetyRatings: json_.containsKey('safetyRatings')
            ? (json_['safetyRatings'] as core.List)
                .map((value) => GoogleCloudAiplatformV1SafetyRating.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );