public sealed class Label : IMessage<Label>, IEquatable<Label>, IDeepCloneable<Label>, IBufferMessage, IMessage
Reference documentation and code samples for the Security Command Center v2 API class Label.
Represents a generic name-value label. A label has separate name and value
fields to support filtering with the contains() function. For more
information, see Filtering on array-type
fields.
[[["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\u003eThe \u003ccode\u003eLabel\u003c/code\u003e class in the Security Command Center v2 API represents a generic name-value label, supporting filtering with the \u003ccode\u003econtains()\u003c/code\u003e function.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLabel\u003c/code\u003e class inherits from \u003ccode\u003eobject\u003c/code\u003e 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, as well as \u003ccode\u003eIMessage<Label>\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eLabel\u003c/code\u003e class is 1.1.0, with an older version available at 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLabel\u003c/code\u003e class has two constructors: a default constructor \u003ccode\u003eLabel()\u003c/code\u003e and a copy constructor \u003ccode\u003eLabel(Label other)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLabel\u003c/code\u003e class includes two properties, \u003ccode\u003eName\u003c/code\u003e and \u003ccode\u003eValue\u003c/code\u003e, both of which are strings and are used to define the label's name and corresponding value.\u003c/p\u003e\n"]]],[],null,["# Security Command Center v2 API - Class Label (1.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.Label)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/1.1.0/Google.Cloud.SecurityCenter.V2.Label)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/1.0.0/Google.Cloud.SecurityCenter.V2.Label) \n\n public sealed class Label : IMessage\u003cLabel\u003e, IEquatable\u003cLabel\u003e, IDeepCloneable\u003cLabel\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Security Command Center v2 API class Label.\n\nRepresents a generic name-value label. A label has separate name and value\nfields to support filtering with the `contains()` function. For more\ninformation, see [Filtering on array-type\nfields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering). \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Label \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Label](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.Label), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Label](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.Label), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Label](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.Label), [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.SecurityCenter.V2](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.SecurityCenter.V2.dll\n\nConstructors\n------------\n\n### Label()\n\n public Label()\n\n### Label(Label)\n\n public Label(Label other)\n\nProperties\n----------\n\n### Name\n\n public string Name { get; set; }\n\nName of the label.\n\n### Value\n\n public string Value { get; set; }\n\nValue that corresponds to the label's name."]]