public sealed class ConstraintEntity : IMessage<ConstraintEntity>, IEquatable<ConstraintEntity>, IDeepCloneable<ConstraintEntity>, IBufferMessage, IMessage
Reference documentation and code samples for the Database Migration v1 API class ConstraintEntity.
Constraint is not used as an independent entity, it is retrieved
as part of another entity such as Table or View.
public RepeatedField<string> ReferenceColumns { get; }
Reference columns which may be associated with the constraint. For example,
if the constraint is a FOREIGN_KEY, this represents the list of full names
of referenced columns by the foreign key.
Reference table which may be associated with the constraint. For example,
if the constraint is a FOREIGN_KEY, this represents the list of full name
of the referenced table by the foreign key.
Table which is associated with the constraint. In case the constraint
is defined on a table, this field is left empty as this information is
stored in parent_name. However, if constraint is defined on a view, this
field stores the table name on which the view is defined.
[[["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 documentation for the \u003ccode\u003eConstraintEntity\u003c/code\u003e class within the Google Cloud Database Migration v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eConstraintEntity\u003c/code\u003e is 2.5.0, with multiple prior versions listed, ranging down to version 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eConstraintEntity\u003c/code\u003e is used as a component of other entities like \u003ccode\u003eTable\u003c/code\u003e or \u003ccode\u003eView\u003c/code\u003e and contains details such as constraint name, type, and associated table and columns.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConstraintEntity\u003c/code\u003e class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements 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\u003eThe class offers properties such as \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eType\u003c/code\u003e, \u003ccode\u003eReferenceColumns\u003c/code\u003e, \u003ccode\u003eReferenceTable\u003c/code\u003e, \u003ccode\u003eTableColumns\u003c/code\u003e, and \u003ccode\u003eTableName\u003c/code\u003e, along with a \u003ccode\u003eCustomFeatures\u003c/code\u003e property for engine-specific configurations.\u003c/p\u003e\n"]]],[],null,["# Database Migration v1 API - Class ConstraintEntity (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.ConstraintEntity)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.4.0/Google.Cloud.CloudDms.V1.ConstraintEntity)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.3.0/Google.Cloud.CloudDms.V1.ConstraintEntity)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.2.0/Google.Cloud.CloudDms.V1.ConstraintEntity)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.1.0/Google.Cloud.CloudDms.V1.ConstraintEntity)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.0.0/Google.Cloud.CloudDms.V1.ConstraintEntity)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/1.2.0/Google.Cloud.CloudDms.V1.ConstraintEntity)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/1.1.0/Google.Cloud.CloudDms.V1.ConstraintEntity)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/1.0.0/Google.Cloud.CloudDms.V1.ConstraintEntity) \n\n public sealed class ConstraintEntity : IMessage\u003cConstraintEntity\u003e, IEquatable\u003cConstraintEntity\u003e, IDeepCloneable\u003cConstraintEntity\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Database Migration v1 API class ConstraintEntity.\n\nConstraint is not used as an independent entity, it is retrieved\nas part of another entity such as Table or View. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ConstraintEntity \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ConstraintEntity](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.ConstraintEntity), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ConstraintEntity](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.ConstraintEntity), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ConstraintEntity](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.ConstraintEntity), [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.CloudDms.V1](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.CloudDms.V1.dll\n\nConstructors\n------------\n\n### ConstraintEntity()\n\n public ConstraintEntity()\n\n### ConstraintEntity(ConstraintEntity)\n\n public ConstraintEntity(ConstraintEntity other)\n\nProperties\n----------\n\n### CustomFeatures\n\n public Struct CustomFeatures { get; set; }\n\nCustom engine specific features.\n\n### Name\n\n public string Name { get; set; }\n\nThe name of the table constraint.\n\n### ReferenceColumns\n\n public RepeatedField\u003cstring\u003e ReferenceColumns { get; }\n\nReference columns which may be associated with the constraint. For example,\nif the constraint is a FOREIGN_KEY, this represents the list of full names\nof referenced columns by the foreign key.\n\n### ReferenceTable\n\n public string ReferenceTable { get; set; }\n\nReference table which may be associated with the constraint. For example,\nif the constraint is a FOREIGN_KEY, this represents the list of full name\nof the referenced table by the foreign key.\n\n### TableColumns\n\n public RepeatedField\u003cstring\u003e TableColumns { get; }\n\nTable columns used as part of the Constraint, for example primary key\nconstraint should list the columns which constitutes the key.\n\n### TableName\n\n public string TableName { get; set; }\n\nTable which is associated with the constraint. In case the constraint\nis defined on a table, this field is left empty as this information is\nstored in parent_name. However, if constraint is defined on a view, this\nfield stores the table name on which the view is defined.\n\n### Type\n\n public string Type { get; set; }\n\nType of constraint, for example unique, primary key, foreign key (currently\nonly primary key is supported)."]]