public int getSafetyRatingsCount() {
      if (safetyRatingsBuilder_ == null) {
        return safetyRatings_.size();
      } else {
        return safetyRatingsBuilder_.getCount();
      }
    }
<pre>
Output only. List of ratings for the safety of a response candidate.

There is at most one rating per category.
</pre>

<code>
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
</code>
java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java