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 that variants, absence of any variant indicates an error.
The JSON representation for Value
is JSON value.
Constructors and Destructors |
|
---|---|
Value()
|
|
Value(Value other)
|
Public types |
|
---|---|
KindOneofCase
|
enum Enum of possible cases for the "kind" oneof. |
Properties |
|
---|---|
BoolValue
|
bool
Represents a boolean value.
|
Descriptor
|
pbr::MessageDescriptor
|
Descriptor
|
pbr::MessageDescriptor pb::IMessage.
|
KindCase
|
|
ListValue
|
global::Google.Protobuf.WellKnownTypes.ListValue
Represents a repeated
Value . |
NullValue
|
global::Google.Protobuf.WellKnownTypes.NullValue
Represents a null value.
|
NumberValue
|
double
Represents a double value.
|
Parser
|
pb::MessageParser< Value >
|
StringValue
|
string
Represents a string value.
|
StructValue
|
global::Google.Protobuf.WellKnownTypes.Struct
Represents a structured value.
|
Public attributes |
|
---|---|
BoolValueFieldNumber = 4
|
const int
Field number for the "bool_value" field.
|
ListValueFieldNumber = 6
|
const int
Field number for the "list_value" field.
|
NullValueFieldNumber = 1
|
const int
Field number for the "null_value" field.
|
NumberValueFieldNumber = 2
|
const int
Field number for the "number_value" field.
|
StringValueFieldNumber = 3
|
const int
Field number for the "string_value" field.
|
StructValueFieldNumber = 5
|
const int
Field number for the "struct_value" field.
|
Public functions |
|
---|---|
CalculateSize()
|
int
|
ClearKind()
|
void
|
Clone()
|
|
Equals(object other)
|
override bool
|
Equals(Value other)
|
bool
|
GetHashCode()
|
override int
|
MergeFrom(Value other)
|
void
|
MergeFrom(pb::CodedInputStream input)
|
void
|
ToString()
|
override string
|
WriteTo(pb::CodedOutputStream output)
|
void
|
Public static functions |
|
---|---|
ForBool(bool value)
|
Convenience method to create a Value message with a Boolean value.
|
ForList(params Value[] values)
|
Convenience method to create a Value message with an initial list of values.
|
ForNull()
|
Convenience method to create a Value message with a null initial value.
|
ForNumber(double value)
|
Convenience method to create a Value message with a number value.
|
ForString(string value)
|
Convenience method to create a Value message with a string value.
|
ForStruct(Struct value)
|
Convenience method to create a Value message with an initial struct value
|
bool BoolValue
Represents a boolean value.
pbr::MessageDescriptor Descriptor
pbr::MessageDescriptor pb::IMessage. Descriptor
KindOneofCase KindCase
global::Google.Protobuf.WellKnownTypes.NullValue NullValue
Represents a null value.
double NumberValue
Represents a double value.
pb::MessageParser< Value > Parser
string StringValue
Represents a string value.
global::Google.Protobuf.WellKnownTypes.Struct StructValue
Represents a structured value.
const int NumberValueFieldNumber = 2
Field number for the "number_value" field.
const int StringValueFieldNumber = 3
Field number for the "string_value" field.
const int StructValueFieldNumber = 5
Field number for the "struct_value" field.
int CalculateSize()
void ClearKind()
Value Clone()
override bool Equals( object other )
bool Equals( Value other )
override int GetHashCode()
void MergeFrom( Value other )
void MergeFrom( pb::CodedInputStream input )
override string ToString()
Value()
Value( Value other )
void WriteTo( pb::CodedOutputStream output )
Value ForBool( bool value )
Value ForNull()
Value ForNumber( double value )
Value ForString( string value )
Convenience method to create a Value message with a string value.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A newly-created Value message with the given value.
|