Class FeatureSet (3.27.1)

public sealed class FeatureSet : IExtendableMessage<FeatureSet>, IMessage<FeatureSet>, IEquatable<FeatureSet>, IDeepCloneable<FeatureSet>, IBufferMessage, IMessage

TODO Enums in C++ gencode (and potentially other languages) are not well scoped. This means that each of the feature enums below can clash with each other. The short names we've chosen maximize call-site readability, but leave us very open to this scenario. A future feature will be designed and implemented to handle this, hopefully before we ever hit a conflict here.

Inheritance

object > FeatureSet

Namespace

Google.Protobuf.Reflection

Assembly

Google.Protobuf.dll

Constructors

FeatureSet()

public FeatureSet()

FeatureSet(FeatureSet)

public FeatureSet(FeatureSet other)
Parameter
Name Description
other FeatureSet

Fields

EnumTypeFieldNumber

public const int EnumTypeFieldNumber = 2

Field number for the "enum_type" field.

Field Value
Type Description
int

FieldPresenceFieldNumber

public const int FieldPresenceFieldNumber = 1

Field number for the "field_presence" field.

Field Value
Type Description
int

JsonFormatFieldNumber

public const int JsonFormatFieldNumber = 6

Field number for the "json_format" field.

Field Value
Type Description
int

MessageEncodingFieldNumber

public const int MessageEncodingFieldNumber = 5

Field number for the "message_encoding" field.

Field Value
Type Description
int

RepeatedFieldEncodingFieldNumber

public const int RepeatedFieldEncodingFieldNumber = 3

Field number for the "repeated_field_encoding" field.

Field Value
Type Description
int

Utf8ValidationFieldNumber

public const int Utf8ValidationFieldNumber = 4

Field number for the "utf8_validation" field.

Field Value
Type Description
int

Properties

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

EnumType

public FeatureSet.Types.EnumType EnumType { get; set; }
Property Value
Type Description
FeatureSetTypesEnumType

FieldPresence

public FeatureSet.Types.FieldPresence FieldPresence { get; set; }
Property Value
Type Description
FeatureSetTypesFieldPresence

HasEnumType

public bool HasEnumType { get; }

Gets whether the "enum_type" field is set

Property Value
Type Description
bool

HasFieldPresence

public bool HasFieldPresence { get; }

Gets whether the "field_presence" field is set

Property Value
Type Description
bool

HasJsonFormat

public bool HasJsonFormat { get; }

Gets whether the "json_format" field is set

Property Value
Type Description
bool

HasMessageEncoding

public bool HasMessageEncoding { get; }

Gets whether the "message_encoding" field is set

Property Value
Type Description
bool

HasRepeatedFieldEncoding

public bool HasRepeatedFieldEncoding { get; }

Gets whether the "repeated_field_encoding" field is set

Property Value
Type Description
bool

HasUtf8Validation

public bool HasUtf8Validation { get; }

Gets whether the "utf8_validation" field is set

Property Value
Type Description
bool

JsonFormat

public FeatureSet.Types.JsonFormat JsonFormat { get; set; }
Property Value
Type Description
FeatureSetTypesJsonFormat

MessageEncoding

public FeatureSet.Types.MessageEncoding MessageEncoding { get; set; }
Property Value
Type Description
FeatureSetTypesMessageEncoding

Parser

public static MessageParser<FeatureSet> Parser { get; }
Property Value
Type Description
MessageParserFeatureSet

RepeatedFieldEncoding

public FeatureSet.Types.RepeatedFieldEncoding RepeatedFieldEncoding { get; set; }
Property Value
Type Description
FeatureSetTypesRepeatedFieldEncoding

Utf8Validation

public FeatureSet.Types.Utf8Validation Utf8Validation { get; set; }
Property Value
Type Description
FeatureSetTypesUtf8Validation

Methods

CalculateSize()

public int CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

Returns
Type Description
int

The number of bytes required to write this message to a coded output stream.

ClearEnumType()

public void ClearEnumType()

Clears the value of the "enum_type" field

ClearExtension<TValue>(Extension<FeatureSet, TValue>)

public void ClearExtension<TValue>(Extension<FeatureSet, TValue> extension)

Clears the value of the specified extension

Parameter
Name Description
extension ExtensionFeatureSet
Type Parameter
Name Description
TValue

ClearExtension<TValue>(RepeatedExtension<FeatureSet, TValue>)

public void ClearExtension<TValue>(RepeatedExtension<FeatureSet, TValue> extension)

Clears the value of the specified repeated extension

Parameter
Name Description
extension RepeatedExtensionFeatureSet
Type Parameter
Name Description
TValue

ClearFieldPresence()

public void ClearFieldPresence()

Clears the value of the "field_presence" field

ClearJsonFormat()

public void ClearJsonFormat()

Clears the value of the "json_format" field

ClearMessageEncoding()

public void ClearMessageEncoding()

Clears the value of the "message_encoding" field

ClearRepeatedFieldEncoding()

public void ClearRepeatedFieldEncoding()

Clears the value of the "repeated_field_encoding" field

ClearUtf8Validation()

public void ClearUtf8Validation()

Clears the value of the "utf8_validation" field

Clone()

public FeatureSet Clone()

Creates a deep clone of this object.

Returns
Type Description
FeatureSet

A deep clone of this object.

Equals(FeatureSet)

public bool Equals(FeatureSet other)
Parameter
Name Description
other FeatureSet
Returns
Type Description
bool

Equals(object)

public override bool Equals(object other)
Parameter
Name Description
other object
Returns
Type Description
bool
Overrides

GetExtension<TValue>(Extension<FeatureSet, TValue>)

public TValue GetExtension<TValue>(Extension<FeatureSet, TValue> extension)

Gets the value of the specified extension

Parameter
Name Description
extension ExtensionFeatureSet
Returns
Type Description
TValue
Type Parameter
Name Description
TValue

GetExtension<TValue>(RepeatedExtension<FeatureSet, TValue>)

public RepeatedField<TValue> GetExtension<TValue>(RepeatedExtension<FeatureSet, TValue> extension)

Gets the value of the specified repeated extension or null if the extension isn't registered in this set. For a version of this method that never returns null, use GetOrInitializeExtension<TValue>(RepeatedExtension<T, TValue>)

Parameter
Name Description
extension RepeatedExtensionFeatureSet
Returns
Type Description
RepeatedField
Type Parameter
Name Description
TValue

GetHashCode()

public override int GetHashCode()
Returns
Type Description
int
Overrides

GetOrInitializeExtension<TValue>(RepeatedExtension<FeatureSet, TValue>)

public RepeatedField<TValue> GetOrInitializeExtension<TValue>(RepeatedExtension<FeatureSet, TValue> extension)

Gets the value of the specified repeated extension, registering it if it hasn't already been registered.

Parameter
Name Description
extension RepeatedExtensionFeatureSet
Returns
Type Description
RepeatedField
Type Parameter
Name Description
TValue

HasExtension<TValue>(Extension<FeatureSet, TValue>)

public bool HasExtension<TValue>(Extension<FeatureSet, TValue> extension)

Gets whether the value of the specified extension is set

Parameter
Name Description
extension ExtensionFeatureSet
Returns
Type Description
bool
Type Parameter
Name Description
TValue

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)

Merges the data from the specified coded input stream with the current message.

Parameter
Name Description
input CodedInputStream
Remarks

See the user guide for precise merge semantics.

MergeFrom(FeatureSet)

public void MergeFrom(FeatureSet other)

Merges the given message into this one.

Parameter
Name Description
other FeatureSet
Remarks

See the user guide for precise merge semantics.

SetExtension<TValue>(Extension<FeatureSet, TValue>, TValue)

public void SetExtension<TValue>(Extension<FeatureSet, TValue> extension, TValue value)

Sets the value of the specified extension

Parameters
Name Description
extension ExtensionFeatureSet
value TValue
Type Parameter
Name Description
TValue

ToString()

public override string ToString()
Returns
Type Description
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)

Writes the data to the given coded output stream.

Parameter
Name Description
output CodedOutputStream

Coded output stream to write the data to. Must not be null.

Extension Methods