class_docstr: The result returned by `generativeai.generate_text`.
  
  Use `GenerateTextResponse.candidates` to access all the completions generated by the model.
  
  Attributes:
      candidates: A list of candidate text completions generated by the model.
      result: The output of the first candidate,
      filters: Indicates the reasons why content may have been blocked.
        See `types.BlockedReason`.
      safety_feedback: Indicates which safety settings blocked content in this result.
class_docstr_tok: ["The","result","returned","by","`","generativeai.generate_text","`",".","Use","`","GenerateTextResponse.candidates","`","to","access","all","the","completions","generated","by","the","model",".","Attributes",":","candidates",":","A","list","of","candidate","text","completions","generated","by","the","model",".","result",":","The","output","of","the","first","candidate",",","filters",":","Indicates","the","reasons","why","content","may","have","been","blocked",".","See","`","types.BlockedReason","`",".","safety_feedback",":","Indicates","which","safety","settings","blocked","content","in","this","result","."]
code: def to_dict(self) -> Dict[str, Any]:
      result = {
          "candidates": self.candidates,
          "filters": self.filters,
          "safety_feedback": self.safety_feedback,
      }
      return result
  
file_path: generative-ai-python/google/generativeai/types/text_types.py
imports: from __future__ import annotations
  import sys
  import abc
  import dataclasses
  from typing import Any, Dict, List
  from typing_extensions import TypedDict
  from google.generativeai import string_utils
  from google.generativeai.types import safety_types
  from google.generativeai.types import citation_types
label_desc: Use image node_id 1 for calling the Completion obj's underlying member method code with example usage: obj.to_dict() and returns: result