public sealed class Document.Types.EntityRelation : IMessage<Document.Types.EntityRelation>, IEquatable<Document.Types.EntityRelation>, IDeepCloneable<Document.Types.EntityRelation>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Document AI v1beta3 API class Document.Types.EntityRelation.
Relationship between
[Entities][google.cloud.documentai.v1beta3.Document.Entity].
[[["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-07 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eDocument.Types.EntityRelation\u003c/code\u003e class within the Google Cloud Document AI v1beta3 API, focusing on its structure and functionality.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEntityRelation\u003c/code\u003e class, found in the \u003ccode\u003eGoogle.Cloud.DocumentAI.V1Beta3\u003c/code\u003e namespace, represents a relationship between entities and implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere are two constructors for \u003ccode\u003eEntityRelation\u003c/code\u003e, one that is parameterless, and one that allows you to pass another \u003ccode\u003eEntityRelation\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eEntityRelation\u003c/code\u003e class include \u003ccode\u003eObjectId\u003c/code\u003e, \u003ccode\u003eRelation\u003c/code\u003e, and \u003ccode\u003eSubjectId\u003c/code\u003e, each represented as a string and representing the object entity ID, a description of the relationship and the subject entity ID respectively.\u003c/p\u003e\n"],["\u003cp\u003eThis \u003ccode\u003eEntityRelation\u003c/code\u003e class has 3 available versions \u003ccode\u003e2.0.0-beta23\u003c/code\u003e, \u003ccode\u003e2.0.0-beta22\u003c/code\u003e, and \u003ccode\u003e1.0.0-beta04\u003c/code\u003e, with \u003ccode\u003e2.0.0-beta23\u003c/code\u003e being the most recent.\u003c/p\u003e\n"]]],[],null,["# Cloud Document AI v1beta3 API - Class Document.Types.EntityRelation (2.0.0-beta26)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta26 (latest)](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types.EntityRelation)\n- [2.0.0-beta25](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/2.0.0-beta25/Google.Cloud.DocumentAI.V1Beta3.Document.Types.EntityRelation)\n- [1.0.0-beta04](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/1.0.0-beta04/Google.Cloud.DocumentAI.V1Beta3.Document.Types.EntityRelation) \n\n public sealed class Document.Types.EntityRelation : IMessage\u003cDocument.Types.EntityRelation\u003e, IEquatable\u003cDocument.Types.EntityRelation\u003e, IDeepCloneable\u003cDocument.Types.EntityRelation\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Document AI v1beta3 API class Document.Types.EntityRelation.\n\nRelationship between\n\\[Entities\\]\\[google.cloud.documentai.v1beta3.Document.Entity\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Document.Types.EntityRelation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Document](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document)[Types](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types)[EntityRelation](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types.EntityRelation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Document](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document)[Types](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types)[EntityRelation](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types.EntityRelation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Document](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document)[Types](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types)[EntityRelation](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.Document.Types.EntityRelation), [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.DocumentAI.V1Beta3](/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3)\n\nAssembly\n--------\n\nGoogle.Cloud.DocumentAI.V1Beta3.dll\n\nConstructors\n------------\n\n### EntityRelation()\n\n public EntityRelation()\n\n### EntityRelation(EntityRelation)\n\n public EntityRelation(Document.Types.EntityRelation other)\n\nProperties\n----------\n\n### ObjectId\n\n public string ObjectId { get; set; }\n\nObject entity id.\n\n### Relation\n\n public string Relation { get; set; }\n\nRelationship description.\n\n### SubjectId\n\n public string SubjectId { get; set; }\n\nSubject entity id."]]