Reference documentation and code samples for the Security Command Center V2 API class Google::Protobuf::Value.
Value represents a dynamically typed value which can be either
null, a number, a string, a boolean, a recursive struct value, or a
list of values. A producer of value is expected to set one of these
variants. Absence of any variant indicates an error.
Note: The following fields are mutually exclusive: bool_value, null_value, number_value, string_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
#bool_value=
defbool_value=(value)->::Boolean
Parameter
value (::Boolean) — Represents a boolean value.
Note: The following fields are mutually exclusive: bool_value, null_value, number_value, string_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::Boolean) — Represents a boolean value.
Note: The following fields are mutually exclusive: bool_value, null_value, number_value, string_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: list_value, null_value, number_value, string_value, bool_value, struct_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: list_value, null_value, number_value, string_value, bool_value, struct_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: list_value, null_value, number_value, string_value, bool_value, struct_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: null_value, number_value, string_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: null_value, number_value, string_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: null_value, number_value, string_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
#number_value
defnumber_value()->::Float
Returns
(::Float) — Represents a double value.
Note: The following fields are mutually exclusive: number_value, null_value, string_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
#number_value=
defnumber_value=(value)->::Float
Parameter
value (::Float) — Represents a double value.
Note: The following fields are mutually exclusive: number_value, null_value, string_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::Float) — Represents a double value.
Note: The following fields are mutually exclusive: number_value, null_value, string_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
#string_value
defstring_value()->::String
Returns
(::String) — Represents a string value.
Note: The following fields are mutually exclusive: string_value, null_value, number_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
#string_value=
defstring_value=(value)->::String
Parameter
value (::String) — Represents a string value.
Note: The following fields are mutually exclusive: string_value, null_value, number_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — Represents a string value.
Note: The following fields are mutually exclusive: string_value, null_value, number_value, bool_value, struct_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: struct_value, null_value, number_value, string_value, bool_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: struct_value, null_value, number_value, string_value, bool_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: struct_value, null_value, number_value, string_value, bool_value, list_value. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["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-09-09 UTC."],[],[],null,["# Security Command Center V2 API - Class Google::Protobuf::Value (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-security_center-v2/latest/Google-Protobuf-Value)\n- [1.2.0](/ruby/docs/reference/google-cloud-security_center-v2/1.2.0/Google-Protobuf-Value)\n- [1.1.1](/ruby/docs/reference/google-cloud-security_center-v2/1.1.1/Google-Protobuf-Value)\n- [1.0.0](/ruby/docs/reference/google-cloud-security_center-v2/1.0.0/Google-Protobuf-Value)\n- [0.6.0](/ruby/docs/reference/google-cloud-security_center-v2/0.6.0/Google-Protobuf-Value)\n- [0.5.0](/ruby/docs/reference/google-cloud-security_center-v2/0.5.0/Google-Protobuf-Value)\n- [0.4.1](/ruby/docs/reference/google-cloud-security_center-v2/0.4.1/Google-Protobuf-Value)\n- [0.3.0](/ruby/docs/reference/google-cloud-security_center-v2/0.3.0/Google-Protobuf-Value)\n- [0.2.0](/ruby/docs/reference/google-cloud-security_center-v2/0.2.0/Google-Protobuf-Value)\n- [0.1.0](/ruby/docs/reference/google-cloud-security_center-v2/0.1.0/Google-Protobuf-Value) \nReference documentation and code samples for the Security Command Center V2 API class Google::Protobuf::Value.\n\n`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of these\nvariants. Absence of any variant indicates an error.\n\n\n\u003cbr /\u003e\n\nThe JSON representation for `Value` is JSON value. \n\nInherits\n--------\n\n- [Object](./Google-Cloud-SecurityCenter-V2-Kubernetes-Object) \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #bool_value\n\n def bool_value() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Represents a boolean value.\n\n Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #bool_value=\n\n def bool_value=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Represents a boolean value.\n\n\nNote: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::Boolean) --- Represents a boolean value.\n\n Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #list_value\n\n def list_value() -\u003e ::Google::Protobuf::ListValue\n\n**Returns**\n\n- ([::Google::Protobuf::ListValue](./Google-Protobuf-ListValue)) --- Represents a repeated `Value`.\n\n\n Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #list_value=\n\n def list_value=(value) -\u003e ::Google::Protobuf::ListValue\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::ListValue](./Google-Protobuf-ListValue)) --- Represents a repeated `Value`.\n\n\nNote: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Protobuf::ListValue](./Google-Protobuf-ListValue)) --- Represents a repeated `Value`.\n\n\n Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #null_value\n\n def null_value() -\u003e ::Google::Protobuf::NullValue\n\n**Returns**\n\n- ([::Google::Protobuf::NullValue](./Google-Protobuf-NullValue)) --- Represents a null value.\n\n\n Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #null_value=\n\n def null_value=(value) -\u003e ::Google::Protobuf::NullValue\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::NullValue](./Google-Protobuf-NullValue)) --- Represents a null value.\n\n\nNote: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Protobuf::NullValue](./Google-Protobuf-NullValue)) --- Represents a null value.\n\n\n Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #number_value\n\n def number_value() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- Represents a double value.\n\n Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #number_value=\n\n def number_value=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::Float) --- Represents a double value.\n\n\nNote: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::Float) --- Represents a double value.\n\n Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #string_value\n\n def string_value() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Represents a string value.\n\n Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #string_value=\n\n def string_value=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Represents a string value.\n\n\nNote: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- Represents a string value.\n\n Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #struct_value\n\n def struct_value() -\u003e ::Google::Protobuf::Struct\n\n**Returns**\n\n- ([::Google::Protobuf::Struct](./Google-Protobuf-Struct)) --- Represents a structured value.\n\n\n Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #struct_value=\n\n def struct_value=(value) -\u003e ::Google::Protobuf::Struct\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Struct](./Google-Protobuf-Struct)) --- Represents a structured value.\n\n\nNote: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Protobuf::Struct](./Google-Protobuf-Struct)) --- Represents a structured value.\n\n\n Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]