Package com.google.rpc
Class LocalizedMessage.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<LocalizedMessage,LocalizedMessage.Builder>
com.google.rpc.LocalizedMessage.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,LocalizedMessageOrBuilder
,Cloneable
- Enclosing class:
- LocalizedMessage
public static final class LocalizedMessage.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<LocalizedMessage,LocalizedMessage.Builder>
implements LocalizedMessageOrBuilder
Provides a localized error message that is safe to return to the user which can be attached to an RPC error.Protobuf type
google.rpc.LocalizedMessage
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Method Summary
Modifier and TypeMethodDescriptionThe locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.The localized error message in the above locale.The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.com.google.protobuf.ByteString
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.The localized error message in the above locale.com.google.protobuf.ByteString
The localized error message in the above locale.The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.setLocaleBytes
(com.google.protobuf.ByteString value) The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt.setMessage
(String value) The localized error message in the above locale.setMessageBytes
(com.google.protobuf.ByteString value) The localized error message in the above locale.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getLocale
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
string locale = 1 [json_name = "locale"];
- Specified by:
getLocale
in interfaceLocalizedMessageOrBuilder
- Returns:
- The locale.
-
getLocaleBytes
public com.google.protobuf.ByteString getLocaleBytes()The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
string locale = 1 [json_name = "locale"];
- Specified by:
getLocaleBytes
in interfaceLocalizedMessageOrBuilder
- Returns:
- The bytes for locale.
-
setLocale
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
string locale = 1 [json_name = "locale"];
- Parameters:
value
- The locale to set.- Returns:
- This builder for chaining.
-
clearLocale
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
string locale = 1 [json_name = "locale"];
- Returns:
- This builder for chaining.
-
setLocaleBytes
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
string locale = 1 [json_name = "locale"];
- Parameters:
value
- The bytes for locale to set.- Returns:
- This builder for chaining.
-
getMessage
The localized error message in the above locale.
string message = 2 [json_name = "message"];
- Specified by:
getMessage
in interfaceLocalizedMessageOrBuilder
- Returns:
- The message.
-
getMessageBytes
public com.google.protobuf.ByteString getMessageBytes()The localized error message in the above locale.
string message = 2 [json_name = "message"];
- Specified by:
getMessageBytes
in interfaceLocalizedMessageOrBuilder
- Returns:
- The bytes for message.
-
setMessage
The localized error message in the above locale.
string message = 2 [json_name = "message"];
- Parameters:
value
- The message to set.- Returns:
- This builder for chaining.
-
clearMessage
The localized error message in the above locale.
string message = 2 [json_name = "message"];
- Returns:
- This builder for chaining.
-
setMessageBytes
The localized error message in the above locale.
string message = 2 [json_name = "message"];
- Parameters:
value
- The bytes for message to set.- Returns:
- This builder for chaining.
-