Class DataStream.Types.Header
main DataStream.Header that contains a oneof for specific headers
public sealed class DataStream.Types.Header : IMessage<DataStream.Types.Header>, IEquatable<DataStream.Types.Header>, IDeepCloneable<DataStream.Types.Header>, IBufferMessage, IMessage
- Inheritance
-
DataStream.Types.Header
- Implements
-
IBufferMessageIMessage
- Inherited Members
Constructors
Header()
public Header()
Header(Header)
public Header(DataStream.Types.Header other)
Parameters
otherDataStream.Types.Header
Fields
AttributesFieldNumber
Field number for the "attributes" field.
public const int AttributesFieldNumber = 8
Field Value
ByteHeaderFieldNumber
Field number for the "byte_header" field.
public const int ByteHeaderFieldNumber = 10
Field Value
EncryptionTypeFieldNumber
Field number for the "encryption_type" field.
public const int EncryptionTypeFieldNumber = 7
Field Value
MimeTypeFieldNumber
Field number for the "mime_type" field.
public const int MimeTypeFieldNumber = 4
Field Value
StreamIdFieldNumber
Field number for the "stream_id" field.
public const int StreamIdFieldNumber = 1
Field Value
TextHeaderFieldNumber
Field number for the "text_header" field.
public const int TextHeaderFieldNumber = 9
Field Value
TimestampFieldNumber
Field number for the "timestamp" field.
public const int TimestampFieldNumber = 2
Field Value
TopicFieldNumber
Field number for the "topic" field.
public const int TopicFieldNumber = 3
Field Value
TotalLengthFieldNumber
Field number for the "total_length" field.
public const int TotalLengthFieldNumber = 5
Field Value
Properties
Attributes
user defined attributes map that can carry additional info
public MapField<string, string> Attributes { get; }
Property Value
ByteHeader
public DataStream.Types.ByteHeader ByteHeader { get; set; }
Property Value
ContentHeaderCase
public DataStream.Types.Header.ContentHeaderOneofCase ContentHeaderCase { get; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
EncryptionType
this is set on the DataPacket
[Obsolete]
public Encryption.Types.Type EncryptionType { get; set; }
Property Value
HasTotalLength
Gets whether the "total_length" field is set
public bool HasTotalLength { get; }
Property Value
MimeType
public string MimeType { get; set; }
Property Value
Parser
public static MessageParser<DataStream.Types.Header> Parser { get; }
Property Value
- MessageParser<DataStream.Types.Header>
StreamId
unique identifier for this data stream
public string StreamId { get; set; }
Property Value
TextHeader
public DataStream.Types.TextHeader TextHeader { get; set; }
Property Value
Timestamp
using int64 for Unix timestamp
public long Timestamp { get; set; }
Property Value
Topic
public string Topic { get; set; }
Property Value
TotalLength
only populated for finite streams, if it's a stream of unknown size this stays empty
public ulong TotalLength { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
ClearContentHeader()
public void ClearContentHeader()
ClearTotalLength()
Clears the value of the "total_length" field
public void ClearTotalLength()
Clone()
Creates a deep clone of this object.
public DataStream.Types.Header Clone()
Returns
- DataStream.Types.Header
A deep clone of this object.
Equals(Header)
public bool Equals(DataStream.Types.Header other)
Parameters
otherDataStream.Types.Header
Returns
Equals(object)
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(Header)
Merges the given message into this one.
public void MergeFrom(DataStream.Types.Header other)
Parameters
otherDataStream.Types.Header
Remarks
See the user guide for precise merge semantics.
ToString()
public override string ToString()
Returns
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.