public sealed class AnalyzerOrgPolicyConstraint.Types.Constraint : IMessage<AnalyzerOrgPolicyConstraint.Types.Constraint>, IEquatable<AnalyzerOrgPolicyConstraint.Types.Constraint>, IDeepCloneable<AnalyzerOrgPolicyConstraint.Types.Constraint>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class AnalyzerOrgPolicyConstraint.Types.Constraint.
[[["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 webpage provides reference documentation for the \u003ccode\u003eAnalyzerOrgPolicyConstraint.Types.Constraint\u003c/code\u003e class within the Google Cloud Asset Inventory v1 API, offering details on its structure and implementation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAnalyzerOrgPolicyConstraint.Types.Constraint\u003c/code\u003e class is a sealed class that 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.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation available is 3.12.0, and it also lists documentation for previous versions, ranging back to version 2.7.0, including various versions in between.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eConstraint\u003c/code\u003e class include \u003ccode\u003eBooleanConstraint\u003c/code\u003e, \u003ccode\u003eConstraintDefault\u003c/code\u003e, \u003ccode\u003eConstraintTypeCase\u003c/code\u003e, \u003ccode\u003eDescription\u003c/code\u003e, \u003ccode\u003eDisplayName\u003c/code\u003e, \u003ccode\u003eListConstraint\u003c/code\u003e, and \u003ccode\u003eName\u003c/code\u003e, each serving specific purposes in defining and managing constraints.\u003c/p\u003e\n"],["\u003cp\u003eThe content defines the constraint as being part of the namespace \u003ccode\u003eGoogle.Cloud.Asset.V1\u003c/code\u003e and the assembly \u003ccode\u003eGoogle.Cloud.Asset.V1.dll\u003c/code\u003e, also providing constructor overloads for it.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Asset Inventory v1 API - Class AnalyzerOrgPolicyConstraint.Types.Constraint (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.12.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.11.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.10.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.9.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.8.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.7.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.6.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.5.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.4.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.3.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.2.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.1.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.0.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.11.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.10.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.9.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.8.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.7.0/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint) \n\n public sealed class AnalyzerOrgPolicyConstraint.Types.Constraint : IMessage\u003cAnalyzerOrgPolicyConstraint.Types.Constraint\u003e, IEquatable\u003cAnalyzerOrgPolicyConstraint.Types.Constraint\u003e, IDeepCloneable\u003cAnalyzerOrgPolicyConstraint.Types.Constraint\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Asset Inventory v1 API class AnalyzerOrgPolicyConstraint.Types.Constraint.\n\nThe definition of a constraint. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AnalyzerOrgPolicyConstraint.Types.Constraint \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AnalyzerOrgPolicyConstraint](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint)[Types](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types)[Constraint](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AnalyzerOrgPolicyConstraint](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint)[Types](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types)[Constraint](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AnalyzerOrgPolicyConstraint](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint)[Types](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types)[Constraint](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.AnalyzerOrgPolicyConstraint.Types.Constraint), [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.Asset.V1](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Asset.V1.dll\n\nConstructors\n------------\n\n### Constraint()\n\n public Constraint()\n\n### Constraint(Constraint)\n\n public Constraint(AnalyzerOrgPolicyConstraint.Types.Constraint other)\n\nProperties\n----------\n\n### BooleanConstraint\n\n public AnalyzerOrgPolicyConstraint.Types.Constraint.Types.BooleanConstraint BooleanConstraint { get; set; }\n\nDefines this constraint as being a BooleanConstraint.\n\n### ConstraintDefault\n\n public AnalyzerOrgPolicyConstraint.Types.Constraint.Types.ConstraintDefault ConstraintDefault { get; set; }\n\nThe evaluation behavior of this constraint in the absence of 'Policy'.\n\n### ConstraintTypeCase\n\n public AnalyzerOrgPolicyConstraint.Types.Constraint.ConstraintTypeOneofCase ConstraintTypeCase { get; }\n\n### Description\n\n public string Description { get; set; }\n\nDetailed description of what this `Constraint` controls as well as how\nand where it is enforced.\n\n### DisplayName\n\n public string DisplayName { get; set; }\n\nThe human readable name of the constraint.\n\n### ListConstraint\n\n public AnalyzerOrgPolicyConstraint.Types.Constraint.Types.ListConstraint ListConstraint { get; set; }\n\nDefines this constraint as being a ListConstraint.\n\n### Name\n\n public string Name { get; set; }\n\nThe unique name of the constraint. Format of the name should be\n\n- `constraints/{constraint_name}`\n\nFor example, `constraints/compute.disableSerialPortAccess`."]]