Class PhoneNumber.ShortCode.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<PhoneNumber.ShortCode,PhoneNumber.ShortCode.Builder>
com.google.type.PhoneNumber.ShortCode.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, PhoneNumber.ShortCodeOrBuilder, Cloneable
Enclosing class:
PhoneNumber.ShortCode

public static final class PhoneNumber.ShortCode.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<PhoneNumber.ShortCode,PhoneNumber.ShortCode.Builder> implements PhoneNumber.ShortCodeOrBuilder
 An object representing a short code, which is a phone number that is
 typically much shorter than regular phone numbers and can be used to
 address messages in MMS and SMS systems, as well as for abbreviated dialing
 (e.g. "Text 611 to see how many minutes you have remaining on your plan.").

 Short codes are restricted to a region and are not internationally
 dialable, which means the same short code can exist in different regions,
 with different usage and pricing, even if those regions share the same
 country calling code (e.g. US and CA).
 
Protobuf type google.type.PhoneNumber.ShortCode
  • Method Details

    • getRegionCode

      public String getRegionCode()
       Required. The BCP-47 region code of the location where calls to this
       short code can be made, such as "US" and "BB".
      
       Reference(s):
       - http://www.unicode.org/reports/tr35/#unicode_region_subtag
       
      string region_code = 1 [json_name = "regionCode"];
      Specified by:
      getRegionCode in interface PhoneNumber.ShortCodeOrBuilder
      Returns:
      The regionCode.
    • getRegionCodeBytes

      public com.google.protobuf.ByteString getRegionCodeBytes()
       Required. The BCP-47 region code of the location where calls to this
       short code can be made, such as "US" and "BB".
      
       Reference(s):
       - http://www.unicode.org/reports/tr35/#unicode_region_subtag
       
      string region_code = 1 [json_name = "regionCode"];
      Specified by:
      getRegionCodeBytes in interface PhoneNumber.ShortCodeOrBuilder
      Returns:
      The bytes for regionCode.
    • setRegionCode

      public PhoneNumber.ShortCode.Builder setRegionCode(String value)
       Required. The BCP-47 region code of the location where calls to this
       short code can be made, such as "US" and "BB".
      
       Reference(s):
       - http://www.unicode.org/reports/tr35/#unicode_region_subtag
       
      string region_code = 1 [json_name = "regionCode"];
      Parameters:
      value - The regionCode to set.
      Returns:
      This builder for chaining.
    • clearRegionCode

      public PhoneNumber.ShortCode.Builder clearRegionCode()
       Required. The BCP-47 region code of the location where calls to this
       short code can be made, such as "US" and "BB".
      
       Reference(s):
       - http://www.unicode.org/reports/tr35/#unicode_region_subtag
       
      string region_code = 1 [json_name = "regionCode"];
      Returns:
      This builder for chaining.
    • setRegionCodeBytes

      public PhoneNumber.ShortCode.Builder setRegionCodeBytes(com.google.protobuf.ByteString value)
       Required. The BCP-47 region code of the location where calls to this
       short code can be made, such as "US" and "BB".
      
       Reference(s):
       - http://www.unicode.org/reports/tr35/#unicode_region_subtag
       
      string region_code = 1 [json_name = "regionCode"];
      Parameters:
      value - The bytes for regionCode to set.
      Returns:
      This builder for chaining.
    • getNumber

      public String getNumber()
       Required. The short code digits, without a leading plus ('+') or country
       calling code, e.g. "611".
       
      string number = 2 [json_name = "number"];
      Specified by:
      getNumber in interface PhoneNumber.ShortCodeOrBuilder
      Returns:
      The number.
    • getNumberBytes

      public com.google.protobuf.ByteString getNumberBytes()
       Required. The short code digits, without a leading plus ('+') or country
       calling code, e.g. "611".
       
      string number = 2 [json_name = "number"];
      Specified by:
      getNumberBytes in interface PhoneNumber.ShortCodeOrBuilder
      Returns:
      The bytes for number.
    • setNumber

      public PhoneNumber.ShortCode.Builder setNumber(String value)
       Required. The short code digits, without a leading plus ('+') or country
       calling code, e.g. "611".
       
      string number = 2 [json_name = "number"];
      Parameters:
      value - The number to set.
      Returns:
      This builder for chaining.
    • clearNumber

      public PhoneNumber.ShortCode.Builder clearNumber()
       Required. The short code digits, without a leading plus ('+') or country
       calling code, e.g. "611".
       
      string number = 2 [json_name = "number"];
      Returns:
      This builder for chaining.
    • setNumberBytes

      public PhoneNumber.ShortCode.Builder setNumberBytes(com.google.protobuf.ByteString value)
       Required. The short code digits, without a leading plus ('+') or country
       calling code, e.g. "611".
       
      string number = 2 [json_name = "number"];
      Parameters:
      value - The bytes for number to set.
      Returns:
      This builder for chaining.