Class ProtocolMessage
- Namespace
- AppleTvControlLibrary.Mrp.Protobuf
- Assembly
- AppleTvControlLibrary.Mrp.dll
public sealed class ProtocolMessage : IExtendableMessage<ProtocolMessage>, IMessage<ProtocolMessage>, IEquatable<ProtocolMessage>, IDeepCloneable<ProtocolMessage>, IBufferMessage, IMessage
- Inheritance
-
ProtocolMessage
- Implements
-
IExtendableMessage<ProtocolMessage>IMessage<ProtocolMessage>IDeepCloneable<ProtocolMessage>IBufferMessageIMessage
- Inherited Members
Constructors
ProtocolMessage()
public ProtocolMessage()
ProtocolMessage(ProtocolMessage)
public ProtocolMessage(ProtocolMessage other)
Parameters
otherProtocolMessage
Fields
AuthenticationTokenFieldNumber
Field number for the "authenticationToken" field.
public const int AuthenticationTokenFieldNumber = 3
Field Value
ErrorCodeFieldNumber
Field number for the "errorCode" field.
public const int ErrorCodeFieldNumber = 4
Field Value
ErrorDescriptionFieldNumber
Field number for the "errorDescription" field.
public const int ErrorDescriptionFieldNumber = 78
Field Value
IdentifierFieldNumber
Field number for the "identifier" field.
public const int IdentifierFieldNumber = 2
Field Value
TimestampFieldNumber
Field number for the "timestamp" field.
public const int TimestampFieldNumber = 5
Field Value
TypeFieldNumber
Field number for the "type" field.
public const int TypeFieldNumber = 1
Field Value
UniqueIdentifierFieldNumber
Field number for the "uniqueIdentifier" field.
public const int UniqueIdentifierFieldNumber = 85
Field Value
Properties
AuthenticationToken
public string AuthenticationToken { get; set; }
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
ErrorCode
public ErrorCode.Types.Enum ErrorCode { get; set; }
Property Value
ErrorDescription
public string ErrorDescription { get; set; }
Property Value
HasAuthenticationToken
Gets whether the "authenticationToken" field is set
public bool HasAuthenticationToken { get; }
Property Value
HasErrorCode
Gets whether the "errorCode" field is set
public bool HasErrorCode { get; }
Property Value
HasErrorDescription
Gets whether the "errorDescription" field is set
public bool HasErrorDescription { get; }
Property Value
HasIdentifier
Gets whether the "identifier" field is set
public bool HasIdentifier { get; }
Property Value
HasTimestamp
Gets whether the "timestamp" field is set
public bool HasTimestamp { get; }
Property Value
HasType
Gets whether the "type" field is set
public bool HasType { get; }
Property Value
HasUniqueIdentifier
Gets whether the "uniqueIdentifier" field is set
public bool HasUniqueIdentifier { get; }
Property Value
Identifier
public string Identifier { get; set; }
Property Value
Parser
public static MessageParser<ProtocolMessage> Parser { get; }
Property Value
- MessageParser<ProtocolMessage>
Timestamp
public ulong Timestamp { get; set; }
Property Value
Type
Identifies which underlying message is filled in.
public ProtocolMessage.Types.Type Type { get; set; }
Property Value
UniqueIdentifier
public string UniqueIdentifier { 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.
ClearAuthenticationToken()
Clears the value of the "authenticationToken" field
public void ClearAuthenticationToken()
ClearErrorCode()
Clears the value of the "errorCode" field
public void ClearErrorCode()
ClearErrorDescription()
Clears the value of the "errorDescription" field
public void ClearErrorDescription()
ClearExtension<TValue>(Extension<ProtocolMessage, TValue>)
Clears the value of the specified extension
public void ClearExtension<TValue>(Extension<ProtocolMessage, TValue> extension)
Parameters
extensionExtension<ProtocolMessage, TValue>
Type Parameters
TValue
ClearExtension<TValue>(RepeatedExtension<ProtocolMessage, TValue>)
Clears the value of the specified repeated extension
public void ClearExtension<TValue>(RepeatedExtension<ProtocolMessage, TValue> extension)
Parameters
extensionRepeatedExtension<ProtocolMessage, TValue>
Type Parameters
TValue
ClearIdentifier()
Clears the value of the "identifier" field
public void ClearIdentifier()
ClearTimestamp()
Clears the value of the "timestamp" field
public void ClearTimestamp()
ClearType()
Clears the value of the "type" field
public void ClearType()
ClearUniqueIdentifier()
Clears the value of the "uniqueIdentifier" field
public void ClearUniqueIdentifier()
Clone()
Creates a deep clone of this object.
public ProtocolMessage Clone()
Returns
- ProtocolMessage
A deep clone of this object.
Equals(ProtocolMessage)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ProtocolMessage other)
Parameters
otherProtocolMessageAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetExtension<TValue>(Extension<ProtocolMessage, TValue>)
Gets the value of the specified extension
public TValue GetExtension<TValue>(Extension<ProtocolMessage, TValue> extension)
Parameters
extensionExtension<ProtocolMessage, TValue>
Returns
- TValue
Type Parameters
TValue
GetExtension<TValue>(RepeatedExtension<ProtocolMessage, TValue>)
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 Google.Protobuf.IExtendableMessage<T>.GetOrInitializeExtension<TValue>(Google.Protobuf.RepeatedExtension<T, TValue>)
public RepeatedField<TValue> GetExtension<TValue>(RepeatedExtension<ProtocolMessage, TValue> extension)
Parameters
extensionRepeatedExtension<ProtocolMessage, TValue>
Returns
- RepeatedField<TValue>
Type Parameters
TValue
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetOrInitializeExtension<TValue>(RepeatedExtension<ProtocolMessage, TValue>)
Gets the value of the specified repeated extension, registering it if it hasn't already been registered.
public RepeatedField<TValue> GetOrInitializeExtension<TValue>(RepeatedExtension<ProtocolMessage, TValue> extension)
Parameters
extensionRepeatedExtension<ProtocolMessage, TValue>
Returns
- RepeatedField<TValue>
Type Parameters
TValue
HasExtension<TValue>(Extension<ProtocolMessage, TValue>)
Gets whether the value of the specified extension is set
public bool HasExtension<TValue>(Extension<ProtocolMessage, TValue> extension)
Parameters
extensionExtension<ProtocolMessage, TValue>
Returns
Type Parameters
TValue
MergeFrom(ProtocolMessage)
Merges the given message into this one.
public void MergeFrom(ProtocolMessage other)
Parameters
otherProtocolMessage
Remarks
See the user guide for precise merge semantics.
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.
SetExtension<TValue>(Extension<ProtocolMessage, TValue>, TValue)
Sets the value of the specified extension
public void SetExtension<TValue>(Extension<ProtocolMessage, TValue> extension, TValue value)
Parameters
extensionExtension<ProtocolMessage, TValue>valueTValue
Type Parameters
TValue
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
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.