public sealed class GenerateContentResponse : IMessage<GenerateContentResponse>, IEquatable<GenerateContentResponse>, IDeepCloneable<GenerateContentResponse>, IBufferMessage, IMessage
Reference documentation and code samples for the Vertex AI v1beta1 API class GenerateContentResponse.
Response message for [PredictionService.GenerateContent].
public GenerateContentResponse.Types.PromptFeedback PromptFeedback { get; set; }
Output only. Content filter results for a prompt sent in the request.
Note: Sent only in the first stream chunk.
Only happens when no candidates were generated due to content violations.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThis documentation details the \u003ccode\u003eGenerateContentResponse\u003c/code\u003e class, which is part of the Google Cloud AI Platform Vertex AI v1beta1 API, specifically for handling the response from a \u003ccode\u003ePredictionService.GenerateContent\u003c/code\u003e request.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGenerateContentResponse\u003c/code\u003e class implements multiple interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing various capabilities for message handling and manipulation.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eGenerateContentResponse\u003c/code\u003e class include \u003ccode\u003eCandidates\u003c/code\u003e (generated output), \u003ccode\u003eCreateTime\u003c/code\u003e (request timestamp), \u003ccode\u003eModelVersion\u003c/code\u003e (model used), \u003ccode\u003ePromptFeedback\u003c/code\u003e (content filter results), \u003ccode\u003eResponseId\u003c/code\u003e (unique response identifier), and \u003ccode\u003eUsageMetadata\u003c/code\u003e (usage data).\u003c/p\u003e\n"],["\u003cp\u003eThe class offers two constructors: a default constructor \u003ccode\u003eGenerateContentResponse()\u003c/code\u003e and another \u003ccode\u003eGenerateContentResponse(GenerateContentResponse other)\u003c/code\u003e to allow the creation of a new response based on another one.\u003c/p\u003e\n"]]],[],null,["# Vertex AI v1beta1 API - Class GenerateContentResponse (1.0.0-beta47)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta47 (latest)](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.GenerateContentResponse)\n- [1.0.0-beta46](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/1.0.0-beta46/Google.Cloud.AIPlatform.V1Beta1.GenerateContentResponse) \n\n public sealed class GenerateContentResponse : IMessage\u003cGenerateContentResponse\u003e, IEquatable\u003cGenerateContentResponse\u003e, IDeepCloneable\u003cGenerateContentResponse\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Vertex AI v1beta1 API class GenerateContentResponse.\n\nResponse message for \\[PredictionService.GenerateContent\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GenerateContentResponse \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GenerateContentResponse](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.GenerateContentResponse), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GenerateContentResponse](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.GenerateContentResponse), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GenerateContentResponse](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.GenerateContentResponse), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.AIPlatform.V1Beta1](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.AIPlatform.V1Beta1.dll\n\nConstructors\n------------\n\n### GenerateContentResponse()\n\n public GenerateContentResponse()\n\n### GenerateContentResponse(GenerateContentResponse)\n\n public GenerateContentResponse(GenerateContentResponse other)\n\nProperties\n----------\n\n### Candidates\n\n public RepeatedField\u003cCandidate\u003e Candidates { get; }\n\nOutput only. Generated candidates.\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. Timestamp when the request is made to the server.\n\n### ModelVersion\n\n public string ModelVersion { get; set; }\n\nOutput only. The model version used to generate the response.\n\n### PromptFeedback\n\n public GenerateContentResponse.Types.PromptFeedback PromptFeedback { get; set; }\n\nOutput only. Content filter results for a prompt sent in the request.\nNote: Sent only in the first stream chunk.\nOnly happens when no candidates were generated due to content violations.\n\n### ResponseId\n\n public string ResponseId { get; set; }\n\nOutput only. response_id is used to identify each response. It is the\nencoding of the event_id.\n\n### UsageMetadata\n\n public GenerateContentResponse.Types.UsageMetadata UsageMetadata { get; set; }\n\nUsage metadata about the response(s)."]]