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 Type
    Method
    Description
    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.
    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.
    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

      public String 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 interface LocalizedMessageOrBuilder
      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 interface LocalizedMessageOrBuilder
      Returns:
      The bytes for locale.
    • setLocale

      public LocalizedMessage.Builder setLocale(String value)
       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

      public LocalizedMessage.Builder 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

      public LocalizedMessage.Builder setLocaleBytes(com.google.protobuf.ByteString value)
       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

      public String getMessage()
       The localized error message in the above locale.
       
      string message = 2 [json_name = "message"];
      Specified by:
      getMessage in interface LocalizedMessageOrBuilder
      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 interface LocalizedMessageOrBuilder
      Returns:
      The bytes for message.
    • setMessage

      public LocalizedMessage.Builder setMessage(String value)
       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

      public LocalizedMessage.Builder clearMessage()
       The localized error message in the above locale.
       
      string message = 2 [json_name = "message"];
      Returns:
      This builder for chaining.
    • setMessageBytes

      public LocalizedMessage.Builder setMessageBytes(com.google.protobuf.ByteString value)
       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.