Google. Protobuf. WellKnownTypes. 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.
Summary
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.
Inheritance
Inherits from: pb::IMessage< 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
|
Public types
Properties
BoolValue
bool BoolValue
Represents a boolean value.
Descriptor
pbr::MessageDescriptor Descriptor
Descriptor
pbr::MessageDescriptor pb::IMessage. Descriptor
KindCase
KindOneofCase KindCase
NullValue
global::Google.Protobuf.WellKnownTypes.NullValue NullValue
Represents a null value.
NumberValue
double NumberValue
Represents a double value.
Parser
pb::MessageParser< Value > Parser
StringValue
string StringValue
Represents a string value.
StructValue
global::Google.Protobuf.WellKnownTypes.Struct StructValue
Represents a structured value.
Public attributes
NumberValueFieldNumber
const int NumberValueFieldNumber = 2
Field number for the "number_value" field.
StringValueFieldNumber
const int StringValueFieldNumber = 3
Field number for the "string_value" field.
StructValueFieldNumber
const int StructValueFieldNumber = 5
Field number for the "struct_value" field.
Public functions
CalculateSize
int CalculateSize()
ClearKind
void ClearKind()
Clone
Value Clone()
Equals
override bool Equals( object other )
Equals
bool Equals( Value other )
GetHashCode
override int GetHashCode()
MergeFrom
void MergeFrom( Value other )
MergeFrom
void MergeFrom( pb::CodedInputStream input )
ToString
override string ToString()
Value
Value()
Value
Value( Value other )
WriteTo
void WriteTo( pb::CodedOutputStream output )
Public static functions
ForBool
Value ForBool( bool value )
ForNull
Value ForNull()
ForNumber
Value ForNumber( double value )
ForString
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.
|