public sealed class CustomAttribute : IMessage<CustomAttribute>, IEquatable<CustomAttribute>, IDeepCloneable<CustomAttribute>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1beta API class CustomAttribute.
A custom attribute that is not explicitly modeled in a resource, e.g.
[UserEvent][google.cloud.discoveryengine.v1beta.UserEvent].
The numerical values of this custom attribute. For example, [2.3, 15.4]
when the key is "lengths_cm".
Exactly one of
[CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text]
or
[CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers]
should be set. Otherwise, an INVALID_ARGUMENT error is returned.
The textual values of this custom attribute. For example, ["yellow",
"green"] when the key is "color".
Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is
returned.
Exactly one of
[CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text]
or
[CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers]
should be set. Otherwise, an INVALID_ARGUMENT error is returned.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCustomAttribute\u003c/code\u003e class in the Discovery Engine v1beta API allows for defining custom attributes not explicitly modeled in a resource, such as within a \u003ccode\u003eUserEvent\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe 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, and inherits from \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCustomAttribute\u003c/code\u003e instances can be created using a default constructor or by copying an existing \u003ccode\u003eCustomAttribute\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eCustom attributes can contain either numerical values via the \u003ccode\u003eNumbers\u003c/code\u003e property, or textual values via the \u003ccode\u003eText\u003c/code\u003e property, but not both simultaneously.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eNumbers\u003c/code\u003e and \u003ccode\u003eText\u003c/code\u003e properties use the \u003ccode\u003eRepeatedField\u003c/code\u003e data type to manage their collections of values.\u003c/p\u003e\n"]]],[],null,[]]