Show / Hide Table of Contents

Class LocalizedMessage

Provides a localized error message that is safe to return to the user which can be attached to an RPC error.

Inheritance
System.Object
LocalizedMessage
Implements
IMessage<LocalizedMessage>
IMessage
System.IEquatable<LocalizedMessage>
IDeepCloneable<LocalizedMessage>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Rpc
Assembly: Google.Api.CommonProtos.dll
Syntax
public sealed class LocalizedMessage : IMessage<LocalizedMessage>, IMessage, IEquatable<LocalizedMessage>, IDeepCloneable<LocalizedMessage>

Constructors

LocalizedMessage()

Declaration
public LocalizedMessage()

LocalizedMessage(LocalizedMessage)

Declaration
public LocalizedMessage(LocalizedMessage other)
Parameters
Type Name Description
LocalizedMessage other

Fields

LocaleFieldNumber

Field number for the "locale" field.

Declaration
public const int LocaleFieldNumber = 1
Field Value
Type Description
System.Int32

MessageFieldNumber

Field number for the "message" field.

Declaration
public const int MessageFieldNumber = 2
Field Value
Type Description
System.Int32

Properties

Descriptor

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

Locale

The locale used following the specification defined at http://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"

Declaration
public string Locale { get; set; }
Property Value
Type Description
System.String

Message

The localized error message in the above locale.

Declaration
public string Message { get; set; }
Property Value
Type Description
System.String

Parser

Declaration
public static MessageParser<LocalizedMessage> Parser { get; }
Property Value
Type Description
MessageParser<LocalizedMessage>

Methods

CalculateSize()

Declaration
public int CalculateSize()
Returns
Type Description
System.Int32
Implements
IMessage.CalculateSize()

Clone()

Declaration
public LocalizedMessage Clone()
Returns
Type Description
LocalizedMessage
Implements
IDeepCloneable<T>.Clone()

Equals(LocalizedMessage)

Declaration
public bool Equals(LocalizedMessage other)
Parameters
Type Name Description
LocalizedMessage other
Returns
Type Description
System.Boolean
Implements
System.IEquatable<T>.Equals(T)

Equals(Object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
System.Object other
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

MergeFrom(CodedInputStream)

Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Type Name Description
CodedInputStream input
Implements
IMessage.MergeFrom(CodedInputStream)

MergeFrom(LocalizedMessage)

Declaration
public void MergeFrom(LocalizedMessage other)
Parameters
Type Name Description
LocalizedMessage other
Implements
IMessage<T>.MergeFrom(T)

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

WriteTo(CodedOutputStream)

Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Type Name Description
CodedOutputStream output
Implements
IMessage.WriteTo(CodedOutputStream)

Explicit Interface Implementations

IMessage.Descriptor

Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Type Description
MessageDescriptor
Implements
IMessage.Descriptor
Back to top