implements
// @@protoc_insertion_point(builder_implements:google.type.PostalAddress)
com.google.type.PostalAddressOrBuilder {
public static final com.google.proto4pingcap.Descriptors.Descriptor
getDescriptor() {
return com.google.type.PostalAddressProto.internal_static_google_type_PostalAddress_descriptor;
}
protected com.google.proto4pingcap.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.type.PostalAddressProto.internal_static_google_type_PostalAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.type.PostalAddress.class, com.google.type.PostalAddress.Builder.class);
}
// Construct using com.google.type.PostalAddress.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.proto4pingcap.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.proto4pingcap.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
revision_ = 0;
regionCode_ = "";
languageCode_ = "";
postalCode_ = "";
sortingCode_ = "";
administrativeArea_ = "";
locality_ = "";
sublocality_ = "";
addressLines_ = com.google.proto4pingcap.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000100);
recipients_ = com.google.proto4pingcap.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000200);
organization_ = "";
return this;
}
public com.google.proto4pingcap.Descriptors.Descriptor
getDescriptorForType() {
return com.google.type.PostalAddressProto.internal_static_google_type_PostalAddress_descriptor;
}
public com.google.type.PostalAddress getDefaultInstanceForType() {
return com.google.type.PostalAddress.getDefaultInstance();
}
public com.google.type.PostalAddress build() {
com.google.type.PostalAddress result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.type.PostalAddress buildPartial() {
com.google.type.PostalAddress result = new com.google.type.PostalAddress(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.revision_ = revision_;
result.regionCode_ = regionCode_;
result.languageCode_ = languageCode_;
result.postalCode_ = postalCode_;
result.sortingCode_ = sortingCode_;
result.administrativeArea_ = administrativeArea_;
result.locality_ = locality_;
result.sublocality_ = sublocality_;
if (((bitField0_ & 0x00000100) == 0x00000100)) {
addressLines_ = addressLines_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000100);
}
result.addressLines_ = addressLines_;
if (((bitField0_ & 0x00000200) == 0x00000200)) {
recipients_ = recipients_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000200);
}
result.recipients_ = recipients_;
result.organization_ = organization_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.proto4pingcap.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.proto4pingcap.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.proto4pingcap.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.proto4pingcap.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.proto4pingcap.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.proto4pingcap.Message other) {
if (other instanceof com.google.type.PostalAddress) {
return mergeFrom((com.google.type.PostalAddress)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.type.PostalAddress other) {
if (other == com.google.type.PostalAddress.getDefaultInstance()) return this;
if (other.getRevision() != 0) {
setRevision(other.getRevision());
}
if (!other.getRegionCode().isEmpty()) {
regionCode_ = other.regionCode_;
onChanged();
}
if (!other.getLanguageCode().isEmpty()) {
languageCode_ = other.languageCode_;
onChanged();
}
if (!other.getPostalCode().isEmpty()) {
postalCode_ = other.postalCode_;
onChanged();
}
if (!other.getSortingCode().isEmpty()) {
sortingCode_ = other.sortingCode_;
onChanged();
}
if (!other.getAdministrativeArea().isEmpty()) {
administrativeArea_ = other.administrativeArea_;
onChanged();
}
if (!other.getLocality().isEmpty()) {
locality_ = other.locality_;
onChanged();
}
if (!other.getSublocality().isEmpty()) {
sublocality_ = other.sublocality_;
onChanged();
}
if (!other.addressLines_.isEmpty()) {
if (addressLines_.isEmpty()) {
addressLines_ = other.addressLines_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureAddressLinesIsMutable();
addressLines_.addAll(other.addressLines_);
}
onChanged();
}
if (!other.recipients_.isEmpty()) {
if (recipients_.isEmpty()) {
recipients_ = other.recipients_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureRecipientsIsMutable();
recipients_.addAll(other.recipients_);
}
onChanged();
}
if (!other.getOrganization().isEmpty()) {
organization_ = other.organization_;
onChanged();
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.proto4pingcap.CodedInputStream input,
com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.type.PostalAddress parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.proto4pingcap.InvalidProtocolBufferException e) {
parsedMessage = (com.google.type.PostalAddress) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int revision_ ;
/**
*
* The schema revision of the `PostalAddress`.
* All new revisions **must** be backward compatible with old revisions.
*
*
* int32 revision = 1;
*/
public int getRevision() {
return revision_;
}
/**
*
* The schema revision of the `PostalAddress`.
* All new revisions **must** be backward compatible with old revisions.
*
*
* int32 revision = 1;
*/
public Builder setRevision(int value) {
revision_ = value;
onChanged();
return this;
}
/**
*
* The schema revision of the `PostalAddress`.
* All new revisions **must** be backward compatible with old revisions.
*
*
* int32 revision = 1;
*/
public Builder clearRevision() {
revision_ = 0;
onChanged();
return this;
}
private java.lang.Object regionCode_ = "";
/**
*
* Required. CLDR region code of the country/region of the address. This
* is never inferred and it is up to the user to ensure the value is
* correct. See http://cldr.unicode.org/ and
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
* for details. Example: "CH" for Switzerland.
*
*
* string region_code = 2;
*/
public java.lang.String getRegionCode() {
java.lang.Object ref = regionCode_;
if (!(ref instanceof java.lang.String)) {
com.google.proto4pingcap.ByteString bs =
(com.google.proto4pingcap.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
regionCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. CLDR region code of the country/region of the address. This
* is never inferred and it is up to the user to ensure the value is
* correct. See http://cldr.unicode.org/ and
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
* for details. Example: "CH" for Switzerland.
*
*
* string region_code = 2;
*/
public com.google.proto4pingcap.ByteString
getRegionCodeBytes() {
java.lang.Object ref = regionCode_;
if (ref instanceof String) {
com.google.proto4pingcap.ByteString b =
com.google.proto4pingcap.ByteString.copyFromUtf8(
(java.lang.String) ref);
regionCode_ = b;
return b;
} else {
return (com.google.proto4pingcap.ByteString) ref;
}
}
/**
*
* Required. CLDR region code of the country/region of the address. This
* is never inferred and it is up to the user to ensure the value is
* correct. See http://cldr.unicode.org/ and
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
* for details. Example: "CH" for Switzerland.
*
*
* string region_code = 2;
*/
public Builder setRegionCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
regionCode_ = value;
onChanged();
return this;
}
/**
*
* Required. CLDR region code of the country/region of the address. This
* is never inferred and it is up to the user to ensure the value is
* correct. See http://cldr.unicode.org/ and
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
* for details. Example: "CH" for Switzerland.
*
*
* string region_code = 2;
*/
public Builder clearRegionCode() {
regionCode_ = getDefaultInstance().getRegionCode();
onChanged();
return this;
}
/**
*
* Required. CLDR region code of the country/region of the address. This
* is never inferred and it is up to the user to ensure the value is
* correct. See http://cldr.unicode.org/ and
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
* for details. Example: "CH" for Switzerland.
*
*
* string region_code = 2;
*/
public Builder setRegionCodeBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
regionCode_ = value;
onChanged();
return this;
}
private java.lang.Object languageCode_ = "";
/**
*
* Optional. BCP-47 language code of the contents of this address (if
* known). This is often the UI language of the input form or is expected
* to match one of the languages used in the address' country/region, or their
* transliterated equivalents.
* This can affect formatting in certain countries, but is not critical
* to the correctness of the data and will never affect any validation or
* other non-formatting related operations.
* If this value is not known, it should be omitted (rather than specifying a
* possibly incorrect default).
* Examples: "zh-Hant", "ja", "ja-Latn", "en".
*
*
* string language_code = 3;
*/
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
if (!(ref instanceof java.lang.String)) {
com.google.proto4pingcap.ByteString bs =
(com.google.proto4pingcap.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
languageCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. BCP-47 language code of the contents of this address (if
* known). This is often the UI language of the input form or is expected
* to match one of the languages used in the address' country/region, or their
* transliterated equivalents.
* This can affect formatting in certain countries, but is not critical
* to the correctness of the data and will never affect any validation or
* other non-formatting related operations.
* If this value is not known, it should be omitted (rather than specifying a
* possibly incorrect default).
* Examples: "zh-Hant", "ja", "ja-Latn", "en".
*
*
* string language_code = 3;
*/
public com.google.proto4pingcap.ByteString
getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof String) {
com.google.proto4pingcap.ByteString b =
com.google.proto4pingcap.ByteString.copyFromUtf8(
(java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.proto4pingcap.ByteString) ref;
}
}
/**
*
* Optional. BCP-47 language code of the contents of this address (if
* known). This is often the UI language of the input form or is expected
* to match one of the languages used in the address' country/region, or their
* transliterated equivalents.
* This can affect formatting in certain countries, but is not critical
* to the correctness of the data and will never affect any validation or
* other non-formatting related operations.
* If this value is not known, it should be omitted (rather than specifying a
* possibly incorrect default).
* Examples: "zh-Hant", "ja", "ja-Latn", "en".
*
*
* string language_code = 3;
*/
public Builder setLanguageCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
languageCode_ = value;
onChanged();
return this;
}
/**
*
* Optional. BCP-47 language code of the contents of this address (if
* known). This is often the UI language of the input form or is expected
* to match one of the languages used in the address' country/region, or their
* transliterated equivalents.
* This can affect formatting in certain countries, but is not critical
* to the correctness of the data and will never affect any validation or
* other non-formatting related operations.
* If this value is not known, it should be omitted (rather than specifying a
* possibly incorrect default).
* Examples: "zh-Hant", "ja", "ja-Latn", "en".
*
*
* string language_code = 3;
*/
public Builder clearLanguageCode() {
languageCode_ = getDefaultInstance().getLanguageCode();
onChanged();
return this;
}
/**
*
* Optional. BCP-47 language code of the contents of this address (if
* known). This is often the UI language of the input form or is expected
* to match one of the languages used in the address' country/region, or their
* transliterated equivalents.
* This can affect formatting in certain countries, but is not critical
* to the correctness of the data and will never affect any validation or
* other non-formatting related operations.
* If this value is not known, it should be omitted (rather than specifying a
* possibly incorrect default).
* Examples: "zh-Hant", "ja", "ja-Latn", "en".
*
*
* string language_code = 3;
*/
public Builder setLanguageCodeBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
languageCode_ = value;
onChanged();
return this;
}
private java.lang.Object postalCode_ = "";
/**
*
* Optional. Postal code of the address. Not all countries use or require
* postal codes to be present, but where they are used, they may trigger
* additional validation with other parts of the address (e.g. state/zip
* validation in the U.S.A.).
*
*
* string postal_code = 4;
*/
public java.lang.String getPostalCode() {
java.lang.Object ref = postalCode_;
if (!(ref instanceof java.lang.String)) {
com.google.proto4pingcap.ByteString bs =
(com.google.proto4pingcap.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
postalCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. Postal code of the address. Not all countries use or require
* postal codes to be present, but where they are used, they may trigger
* additional validation with other parts of the address (e.g. state/zip
* validation in the U.S.A.).
*
*
* string postal_code = 4;
*/
public com.google.proto4pingcap.ByteString
getPostalCodeBytes() {
java.lang.Object ref = postalCode_;
if (ref instanceof String) {
com.google.proto4pingcap.ByteString b =
com.google.proto4pingcap.ByteString.copyFromUtf8(
(java.lang.String) ref);
postalCode_ = b;
return b;
} else {
return (com.google.proto4pingcap.ByteString) ref;
}
}
/**
*
* Optional. Postal code of the address. Not all countries use or require
* postal codes to be present, but where they are used, they may trigger
* additional validation with other parts of the address (e.g. state/zip
* validation in the U.S.A.).
*
*
* string postal_code = 4;
*/
public Builder setPostalCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
postalCode_ = value;
onChanged();
return this;
}
/**
*
* Optional. Postal code of the address. Not all countries use or require
* postal codes to be present, but where they are used, they may trigger
* additional validation with other parts of the address (e.g. state/zip
* validation in the U.S.A.).
*
*
* string postal_code = 4;
*/
public Builder clearPostalCode() {
postalCode_ = getDefaultInstance().getPostalCode();
onChanged();
return this;
}
/**
*
* Optional. Postal code of the address. Not all countries use or require
* postal codes to be present, but where they are used, they may trigger
* additional validation with other parts of the address (e.g. state/zip
* validation in the U.S.A.).
*
*
* string postal_code = 4;
*/
public Builder setPostalCodeBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
postalCode_ = value;
onChanged();
return this;
}
private java.lang.Object sortingCode_ = "";
/**
*
* Optional. Additional, country-specific, sorting code. This is not used
* in most regions. Where it is used, the value is either a string like
* "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
* alone, representing the "sector code" (Jamaica), "delivery area indicator"
* (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
*
*
* string sorting_code = 5;
*/
public java.lang.String getSortingCode() {
java.lang.Object ref = sortingCode_;
if (!(ref instanceof java.lang.String)) {
com.google.proto4pingcap.ByteString bs =
(com.google.proto4pingcap.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sortingCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. Additional, country-specific, sorting code. This is not used
* in most regions. Where it is used, the value is either a string like
* "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
* alone, representing the "sector code" (Jamaica), "delivery area indicator"
* (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
*
*
* string sorting_code = 5;
*/
public com.google.proto4pingcap.ByteString
getSortingCodeBytes() {
java.lang.Object ref = sortingCode_;
if (ref instanceof String) {
com.google.proto4pingcap.ByteString b =
com.google.proto4pingcap.ByteString.copyFromUtf8(
(java.lang.String) ref);
sortingCode_ = b;
return b;
} else {
return (com.google.proto4pingcap.ByteString) ref;
}
}
/**
*
* Optional. Additional, country-specific, sorting code. This is not used
* in most regions. Where it is used, the value is either a string like
* "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
* alone, representing the "sector code" (Jamaica), "delivery area indicator"
* (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
*
*
* string sorting_code = 5;
*/
public Builder setSortingCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sortingCode_ = value;
onChanged();
return this;
}
/**
*
* Optional. Additional, country-specific, sorting code. This is not used
* in most regions. Where it is used, the value is either a string like
* "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
* alone, representing the "sector code" (Jamaica), "delivery area indicator"
* (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
*
*
* string sorting_code = 5;
*/
public Builder clearSortingCode() {
sortingCode_ = getDefaultInstance().getSortingCode();
onChanged();
return this;
}
/**
*
* Optional. Additional, country-specific, sorting code. This is not used
* in most regions. Where it is used, the value is either a string like
* "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
* alone, representing the "sector code" (Jamaica), "delivery area indicator"
* (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
*
*
* string sorting_code = 5;
*/
public Builder setSortingCodeBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sortingCode_ = value;
onChanged();
return this;
}
private java.lang.Object administrativeArea_ = "";
/**
*
* Optional. Highest administrative subdivision which is used for postal
* addresses of a country or region.
* For example, this can be a state, a province, an oblast, or a prefecture.
* Specifically, for Spain this is the province and not the autonomous
* community (e.g. "Barcelona" and not "Catalonia").
* Many countries don't use an administrative area in postal addresses. E.g.
* in Switzerland this should be left unpopulated.
*
*
* string administrative_area = 6;
*/
public java.lang.String getAdministrativeArea() {
java.lang.Object ref = administrativeArea_;
if (!(ref instanceof java.lang.String)) {
com.google.proto4pingcap.ByteString bs =
(com.google.proto4pingcap.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
administrativeArea_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. Highest administrative subdivision which is used for postal
* addresses of a country or region.
* For example, this can be a state, a province, an oblast, or a prefecture.
* Specifically, for Spain this is the province and not the autonomous
* community (e.g. "Barcelona" and not "Catalonia").
* Many countries don't use an administrative area in postal addresses. E.g.
* in Switzerland this should be left unpopulated.
*
*
* string administrative_area = 6;
*/
public com.google.proto4pingcap.ByteString
getAdministrativeAreaBytes() {
java.lang.Object ref = administrativeArea_;
if (ref instanceof String) {
com.google.proto4pingcap.ByteString b =
com.google.proto4pingcap.ByteString.copyFromUtf8(
(java.lang.String) ref);
administrativeArea_ = b;
return b;
} else {
return (com.google.proto4pingcap.ByteString) ref;
}
}
/**
*
* Optional. Highest administrative subdivision which is used for postal
* addresses of a country or region.
* For example, this can be a state, a province, an oblast, or a prefecture.
* Specifically, for Spain this is the province and not the autonomous
* community (e.g. "Barcelona" and not "Catalonia").
* Many countries don't use an administrative area in postal addresses. E.g.
* in Switzerland this should be left unpopulated.
*
*
* string administrative_area = 6;
*/
public Builder setAdministrativeArea(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
administrativeArea_ = value;
onChanged();
return this;
}
/**
*
* Optional. Highest administrative subdivision which is used for postal
* addresses of a country or region.
* For example, this can be a state, a province, an oblast, or a prefecture.
* Specifically, for Spain this is the province and not the autonomous
* community (e.g. "Barcelona" and not "Catalonia").
* Many countries don't use an administrative area in postal addresses. E.g.
* in Switzerland this should be left unpopulated.
*
*
* string administrative_area = 6;
*/
public Builder clearAdministrativeArea() {
administrativeArea_ = getDefaultInstance().getAdministrativeArea();
onChanged();
return this;
}
/**
*
* Optional. Highest administrative subdivision which is used for postal
* addresses of a country or region.
* For example, this can be a state, a province, an oblast, or a prefecture.
* Specifically, for Spain this is the province and not the autonomous
* community (e.g. "Barcelona" and not "Catalonia").
* Many countries don't use an administrative area in postal addresses. E.g.
* in Switzerland this should be left unpopulated.
*
*
* string administrative_area = 6;
*/
public Builder setAdministrativeAreaBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
administrativeArea_ = value;
onChanged();
return this;
}
private java.lang.Object locality_ = "";
/**
*
* Optional. Generally refers to the city/town portion of the address.
* Examples: US city, IT comune, UK post town.
* In regions of the world where localities are not well defined or do not fit
* into this structure well, leave locality empty and use address_lines.
*
*
* string locality = 7;
*/
public java.lang.String getLocality() {
java.lang.Object ref = locality_;
if (!(ref instanceof java.lang.String)) {
com.google.proto4pingcap.ByteString bs =
(com.google.proto4pingcap.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
locality_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. Generally refers to the city/town portion of the address.
* Examples: US city, IT comune, UK post town.
* In regions of the world where localities are not well defined or do not fit
* into this structure well, leave locality empty and use address_lines.
*
*
* string locality = 7;
*/
public com.google.proto4pingcap.ByteString
getLocalityBytes() {
java.lang.Object ref = locality_;
if (ref instanceof String) {
com.google.proto4pingcap.ByteString b =
com.google.proto4pingcap.ByteString.copyFromUtf8(
(java.lang.String) ref);
locality_ = b;
return b;
} else {
return (com.google.proto4pingcap.ByteString) ref;
}
}
/**
*
* Optional. Generally refers to the city/town portion of the address.
* Examples: US city, IT comune, UK post town.
* In regions of the world where localities are not well defined or do not fit
* into this structure well, leave locality empty and use address_lines.
*
*
* string locality = 7;
*/
public Builder setLocality(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
locality_ = value;
onChanged();
return this;
}
/**
*
* Optional. Generally refers to the city/town portion of the address.
* Examples: US city, IT comune, UK post town.
* In regions of the world where localities are not well defined or do not fit
* into this structure well, leave locality empty and use address_lines.
*
*
* string locality = 7;
*/
public Builder clearLocality() {
locality_ = getDefaultInstance().getLocality();
onChanged();
return this;
}
/**
*
* Optional. Generally refers to the city/town portion of the address.
* Examples: US city, IT comune, UK post town.
* In regions of the world where localities are not well defined or do not fit
* into this structure well, leave locality empty and use address_lines.
*
*
* string locality = 7;
*/
public Builder setLocalityBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
locality_ = value;
onChanged();
return this;
}
private java.lang.Object sublocality_ = "";
/**
*
* Optional. Sublocality of the address.
* For example, this can be neighborhoods, boroughs, districts.
*
*
* string sublocality = 8;
*/
public java.lang.String getSublocality() {
java.lang.Object ref = sublocality_;
if (!(ref instanceof java.lang.String)) {
com.google.proto4pingcap.ByteString bs =
(com.google.proto4pingcap.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sublocality_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. Sublocality of the address.
* For example, this can be neighborhoods, boroughs, districts.
*
*
* string sublocality = 8;
*/
public com.google.proto4pingcap.ByteString
getSublocalityBytes() {
java.lang.Object ref = sublocality_;
if (ref instanceof String) {
com.google.proto4pingcap.ByteString b =
com.google.proto4pingcap.ByteString.copyFromUtf8(
(java.lang.String) ref);
sublocality_ = b;
return b;
} else {
return (com.google.proto4pingcap.ByteString) ref;
}
}
/**
*
* Optional. Sublocality of the address.
* For example, this can be neighborhoods, boroughs, districts.
*
*
* string sublocality = 8;
*/
public Builder setSublocality(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sublocality_ = value;
onChanged();
return this;
}
/**
*
* Optional. Sublocality of the address.
* For example, this can be neighborhoods, boroughs, districts.
*
*
* string sublocality = 8;
*/
public Builder clearSublocality() {
sublocality_ = getDefaultInstance().getSublocality();
onChanged();
return this;
}
/**
*
* Optional. Sublocality of the address.
* For example, this can be neighborhoods, boroughs, districts.
*
*
* string sublocality = 8;
*/
public Builder setSublocalityBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sublocality_ = value;
onChanged();
return this;
}
private com.google.proto4pingcap.LazyStringList addressLines_ = com.google.proto4pingcap.LazyStringArrayList.EMPTY;
private void ensureAddressLinesIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
addressLines_ = new com.google.proto4pingcap.LazyStringArrayList(addressLines_);
bitField0_ |= 0x00000100;
}
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public com.google.proto4pingcap.ProtocolStringList
getAddressLinesList() {
return addressLines_.getUnmodifiableView();
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public int getAddressLinesCount() {
return addressLines_.size();
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public java.lang.String getAddressLines(int index) {
return addressLines_.get(index);
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public com.google.proto4pingcap.ByteString
getAddressLinesBytes(int index) {
return addressLines_.getByteString(index);
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public Builder setAddressLines(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAddressLinesIsMutable();
addressLines_.set(index, value);
onChanged();
return this;
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public Builder addAddressLines(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAddressLinesIsMutable();
addressLines_.add(value);
onChanged();
return this;
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public Builder addAllAddressLines(
java.lang.Iterable values) {
ensureAddressLinesIsMutable();
com.google.proto4pingcap.AbstractMessageLite.Builder.addAll(
values, addressLines_);
onChanged();
return this;
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public Builder clearAddressLines() {
addressLines_ = com.google.proto4pingcap.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
* Unstructured address lines describing the lower levels of an address.
* Because values in address_lines do not have type information and may
* sometimes contain multiple values in a single field (e.g.
* "Austin, TX"), it is important that the line order is clear. The order of
* address lines should be "envelope order" for the country/region of the
* address. In places where this can vary (e.g. Japan), address_language is
* used to make it explicit (e.g. "ja" for large-to-small ordering and
* "ja-Latn" or "en" for small-to-large). This way, the most specific line of
* an address can be selected based on the language.
* The minimum permitted structural representation of an address consists
* of a region_code with all remaining information placed in the
* address_lines. It would be possible to format such an address very
* approximately without geocoding, but no semantic reasoning could be
* made about any of the address components until it was at least
* partially resolved.
* Creating an address only containing a region_code and address_lines, and
* then geocoding is the recommended way to handle completely unstructured
* addresses (as opposed to guessing which parts of the address should be
* localities or administrative areas).
*
*
* repeated string address_lines = 9;
*/
public Builder addAddressLinesBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureAddressLinesIsMutable();
addressLines_.add(value);
onChanged();
return this;
}
private com.google.proto4pingcap.LazyStringList recipients_ = com.google.proto4pingcap.LazyStringArrayList.EMPTY;
private void ensureRecipientsIsMutable() {
if (!((bitField0_ & 0x00000200) == 0x00000200)) {
recipients_ = new com.google.proto4pingcap.LazyStringArrayList(recipients_);
bitField0_ |= 0x00000200;
}
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public com.google.proto4pingcap.ProtocolStringList
getRecipientsList() {
return recipients_.getUnmodifiableView();
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public int getRecipientsCount() {
return recipients_.size();
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public java.lang.String getRecipients(int index) {
return recipients_.get(index);
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public com.google.proto4pingcap.ByteString
getRecipientsBytes(int index) {
return recipients_.getByteString(index);
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public Builder setRecipients(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRecipientsIsMutable();
recipients_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public Builder addRecipients(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRecipientsIsMutable();
recipients_.add(value);
onChanged();
return this;
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public Builder addAllRecipients(
java.lang.Iterable values) {
ensureRecipientsIsMutable();
com.google.proto4pingcap.AbstractMessageLite.Builder.addAll(
values, recipients_);
onChanged();
return this;
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public Builder clearRecipients() {
recipients_ = com.google.proto4pingcap.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
* Optional. The recipient at the address.
* This field may, under certain circumstances, contain multiline information.
* For example, it might contain "care of" information.
*
*
* repeated string recipients = 10;
*/
public Builder addRecipientsBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureRecipientsIsMutable();
recipients_.add(value);
onChanged();
return this;
}
private java.lang.Object organization_ = "";
/**
*
* Optional. The name of the organization at the address.
*
*
* string organization = 11;
*/
public java.lang.String getOrganization() {
java.lang.Object ref = organization_;
if (!(ref instanceof java.lang.String)) {
com.google.proto4pingcap.ByteString bs =
(com.google.proto4pingcap.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
organization_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The name of the organization at the address.
*
*
* string organization = 11;
*/
public com.google.proto4pingcap.ByteString
getOrganizationBytes() {
java.lang.Object ref = organization_;
if (ref instanceof String) {
com.google.proto4pingcap.ByteString b =
com.google.proto4pingcap.ByteString.copyFromUtf8(
(java.lang.String) ref);
organization_ = b;
return b;
} else {
return (com.google.proto4pingcap.ByteString) ref;
}
}
/**
*
* Optional. The name of the organization at the address.
*
*
* string organization = 11;
*/
public Builder setOrganization(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
organization_ = value;
onChanged();
return this;
}
/**
*
* Optional. The name of the organization at the address.
*
*
* string organization = 11;
*/
public Builder clearOrganization() {
organization_ = getDefaultInstance().getOrganization();
onChanged();
return this;
}
/**
*
* Optional. The name of the organization at the address.
*
*
* string organization = 11;
*/
public Builder setOrganizationBytes(
com.google.proto4pingcap.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
organization_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.proto4pingcap.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.proto4pingcap.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:google.type.PostalAddress)
}
// @@protoc_insertion_point(class_scope:google.type.PostalAddress)
private static final com.google.type.PostalAddress DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.type.PostalAddress();
}
public static com.google.type.PostalAddress getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.proto4pingcap.Parser
PARSER = new com.google.proto4pingcap.AbstractParser() {
public PostalAddress parsePartialFrom(
com.google.proto4pingcap.CodedInputStream input,
com.google.proto4pingcap.ExtensionRegistryLite extensionRegistry)
throws com.google.proto4pingcap.InvalidProtocolBufferException {
return new PostalAddress(input, extensionRegistry);
}
};
public static com.google.proto4pingcap.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.proto4pingcap.Parser getParserForType() {
return PARSER;
}
public com.google.type.PostalAddress getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}