Table of Contents

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>
IBufferMessage
IMessage
Inherited Members

Constructors

ProtocolMessage()

public ProtocolMessage()

ProtocolMessage(ProtocolMessage)

public ProtocolMessage(ProtocolMessage other)

Parameters

other ProtocolMessage

Fields

AuthenticationTokenFieldNumber

Field number for the "authenticationToken" field.

public const int AuthenticationTokenFieldNumber = 3

Field Value

int

ErrorCodeFieldNumber

Field number for the "errorCode" field.

public const int ErrorCodeFieldNumber = 4

Field Value

int

ErrorDescriptionFieldNumber

Field number for the "errorDescription" field.

public const int ErrorDescriptionFieldNumber = 78

Field Value

int

IdentifierFieldNumber

Field number for the "identifier" field.

public const int IdentifierFieldNumber = 2

Field Value

int

TimestampFieldNumber

Field number for the "timestamp" field.

public const int TimestampFieldNumber = 5

Field Value

int

TypeFieldNumber

Field number for the "type" field.

public const int TypeFieldNumber = 1

Field Value

int

UniqueIdentifierFieldNumber

Field number for the "uniqueIdentifier" field.

public const int UniqueIdentifierFieldNumber = 85

Field Value

int

Properties

AuthenticationToken

public string AuthenticationToken { get; set; }

Property Value

string

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

ErrorCode

public ErrorCode.Types.Enum ErrorCode { get; set; }

Property Value

ErrorCode.Types.Enum

ErrorDescription

public string ErrorDescription { get; set; }

Property Value

string

HasAuthenticationToken

Gets whether the "authenticationToken" field is set

public bool HasAuthenticationToken { get; }

Property Value

bool

HasErrorCode

Gets whether the "errorCode" field is set

public bool HasErrorCode { get; }

Property Value

bool

HasErrorDescription

Gets whether the "errorDescription" field is set

public bool HasErrorDescription { get; }

Property Value

bool

HasIdentifier

Gets whether the "identifier" field is set

public bool HasIdentifier { get; }

Property Value

bool

HasTimestamp

Gets whether the "timestamp" field is set

public bool HasTimestamp { get; }

Property Value

bool

HasType

Gets whether the "type" field is set

public bool HasType { get; }

Property Value

bool

HasUniqueIdentifier

Gets whether the "uniqueIdentifier" field is set

public bool HasUniqueIdentifier { get; }

Property Value

bool

Identifier

public string Identifier { get; set; }

Property Value

string

Parser

public static MessageParser<ProtocolMessage> Parser { get; }

Property Value

MessageParser<ProtocolMessage>

Timestamp

public ulong Timestamp { get; set; }

Property Value

ulong

Type

Identifies which underlying message is filled in.

public ProtocolMessage.Types.Type Type { get; set; }

Property Value

ProtocolMessage.Types.Type

UniqueIdentifier

public string UniqueIdentifier { get; set; }

Property Value

string

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

extension Extension<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

extension RepeatedExtension<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

other ProtocolMessage

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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

Gets the value of the specified extension

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

Parameters

extension Extension<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

extension RepeatedExtension<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

extension RepeatedExtension<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

extension Extension<ProtocolMessage, TValue>

Returns

bool

Type Parameters

TValue

MergeFrom(ProtocolMessage)

Merges the given message into this one.

public void MergeFrom(ProtocolMessage other)

Parameters

other ProtocolMessage

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

input CodedInputStream

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

extension Extension<ProtocolMessage, TValue>
value TValue

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

output CodedOutputStream

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