Send feedback
Class FeatureSet (3.27.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
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()
FeatureSet(FeatureSet)
public FeatureSet(FeatureSet other)
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
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; }
EnumType
public FeatureSet.Types.EnumType EnumType { get; set; }
FieldPresence
public FeatureSet.Types.FieldPresence FieldPresence { get; set; }
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
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
public FeatureSet.Types.JsonFormat JsonFormat { get; set; }
MessageEncoding
public FeatureSet.Types.MessageEncoding MessageEncoding { get; set; }
Parser
public static MessageParser<FeatureSet> Parser { get; }
RepeatedFieldEncoding
public FeatureSet.Types.RepeatedFieldEncoding RepeatedFieldEncoding { get; set; }
Utf8Validation
public FeatureSet.Types.Utf8Validation Utf8Validation { get; set; }
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
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
Type Parameter
Name
Description
TValue
ClearFieldPresence()
public void ClearFieldPresence()
Clears the value of the "field_presence" field
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)
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
Returns
Type
Description
TValue
Type Parameter
Name
Description
TValue
GetExtension<TValue>(RepeatedExtension<FeatureSet, TValue>)
public RepeatedField<TValue> GetExtension<TValue>(RepeatedExtension<FeatureSet, TValue> extension)
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.
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
Returns
Type
Description
bool
Type Parameter
Name
Description
TValue
public void MergeFrom(CodedInputStream input)
Merges the data from the specified coded input stream with the current message.
Remarks
MergeFrom(FeatureSet)
public void MergeFrom(FeatureSet other)
Merges the given message into this one.
Remarks
SetExtension<TValue>(Extension<FeatureSet, TValue>, TValue)
public void SetExtension<TValue>(Extension<FeatureSet, TValue> extension, TValue value)
Sets the value of the specified extension
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
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
Need to tell us more?
[[["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-01-28 UTC."],[],[]]