
com.google.shopping.merchant.accounts.v1beta.Address Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/shopping/merchant/accounts/v1beta/shippingsettings.proto
// Protobuf Java Version: 3.25.5
package com.google.shopping.merchant.accounts.v1beta;
/**
*
*
*
* Shipping address of the warehouse.
*
*
* Protobuf type {@code google.shopping.merchant.accounts.v1beta.Address}
*/
public final class Address extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.shopping.merchant.accounts.v1beta.Address)
AddressOrBuilder {
private static final long serialVersionUID = 0L;
// Use Address.newBuilder() to construct.
private Address(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Address() {
streetAddress_ = "";
city_ = "";
administrativeArea_ = "";
postalCode_ = "";
regionCode_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Address();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_Address_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_Address_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.accounts.v1beta.Address.class,
com.google.shopping.merchant.accounts.v1beta.Address.Builder.class);
}
private int bitField0_;
public static final int STREET_ADDRESS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object streetAddress_ = "";
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @return Whether the streetAddress field is set.
*/
@java.lang.Override
public boolean hasStreetAddress() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @return The streetAddress.
*/
@java.lang.Override
public java.lang.String getStreetAddress() {
java.lang.Object ref = streetAddress_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
streetAddress_ = s;
return s;
}
}
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @return The bytes for streetAddress.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStreetAddressBytes() {
java.lang.Object ref = streetAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
streetAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CITY_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object city_ = "";
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the city field is set.
*/
@java.lang.Override
public boolean hasCity() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The city.
*/
@java.lang.Override
public java.lang.String getCity() {
java.lang.Object ref = city_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
city_ = s;
return s;
}
}
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for city.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCityBytes() {
java.lang.Object ref = city_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
city_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ADMINISTRATIVE_AREA_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object administrativeArea_ = "";
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the administrativeArea field is set.
*/
@java.lang.Override
public boolean hasAdministrativeArea() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The administrativeArea.
*/
@java.lang.Override
public java.lang.String getAdministrativeArea() {
java.lang.Object ref = administrativeArea_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
administrativeArea_ = s;
return s;
}
}
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for administrativeArea.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAdministrativeAreaBytes() {
java.lang.Object ref = administrativeArea_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
administrativeArea_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int POSTAL_CODE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object postalCode_ = "";
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the postalCode field is set.
*/
@java.lang.Override
public boolean hasPostalCode() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The postalCode.
*/
@java.lang.Override
public java.lang.String getPostalCode() {
java.lang.Object ref = postalCode_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
postalCode_ = s;
return s;
}
}
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for postalCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPostalCodeBytes() {
java.lang.Object ref = postalCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
postalCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REGION_CODE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object regionCode_ = "";
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the regionCode field is set.
*/
@java.lang.Override
public boolean hasRegionCode() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return The regionCode.
*/
@java.lang.Override
public java.lang.String getRegionCode() {
java.lang.Object ref = regionCode_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
regionCode_ = s;
return s;
}
}
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for regionCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRegionCodeBytes() {
java.lang.Object ref = regionCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
regionCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, streetAddress_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, city_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, administrativeArea_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, postalCode_);
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, regionCode_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, streetAddress_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, city_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, administrativeArea_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, postalCode_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, regionCode_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.shopping.merchant.accounts.v1beta.Address)) {
return super.equals(obj);
}
com.google.shopping.merchant.accounts.v1beta.Address other =
(com.google.shopping.merchant.accounts.v1beta.Address) obj;
if (hasStreetAddress() != other.hasStreetAddress()) return false;
if (hasStreetAddress()) {
if (!getStreetAddress().equals(other.getStreetAddress())) return false;
}
if (hasCity() != other.hasCity()) return false;
if (hasCity()) {
if (!getCity().equals(other.getCity())) return false;
}
if (hasAdministrativeArea() != other.hasAdministrativeArea()) return false;
if (hasAdministrativeArea()) {
if (!getAdministrativeArea().equals(other.getAdministrativeArea())) return false;
}
if (hasPostalCode() != other.hasPostalCode()) return false;
if (hasPostalCode()) {
if (!getPostalCode().equals(other.getPostalCode())) return false;
}
if (hasRegionCode() != other.hasRegionCode()) return false;
if (hasRegionCode()) {
if (!getRegionCode().equals(other.getRegionCode())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasStreetAddress()) {
hash = (37 * hash) + STREET_ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getStreetAddress().hashCode();
}
if (hasCity()) {
hash = (37 * hash) + CITY_FIELD_NUMBER;
hash = (53 * hash) + getCity().hashCode();
}
if (hasAdministrativeArea()) {
hash = (37 * hash) + ADMINISTRATIVE_AREA_FIELD_NUMBER;
hash = (53 * hash) + getAdministrativeArea().hashCode();
}
if (hasPostalCode()) {
hash = (37 * hash) + POSTAL_CODE_FIELD_NUMBER;
hash = (53 * hash) + getPostalCode().hashCode();
}
if (hasRegionCode()) {
hash = (37 * hash) + REGION_CODE_FIELD_NUMBER;
hash = (53 * hash) + getRegionCode().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.accounts.v1beta.Address parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.shopping.merchant.accounts.v1beta.Address prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Shipping address of the warehouse.
*
*
* Protobuf type {@code google.shopping.merchant.accounts.v1beta.Address}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.shopping.merchant.accounts.v1beta.Address)
com.google.shopping.merchant.accounts.v1beta.AddressOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_Address_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_Address_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.accounts.v1beta.Address.class,
com.google.shopping.merchant.accounts.v1beta.Address.Builder.class);
}
// Construct using com.google.shopping.merchant.accounts.v1beta.Address.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
streetAddress_ = "";
city_ = "";
administrativeArea_ = "";
postalCode_ = "";
regionCode_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.shopping.merchant.accounts.v1beta.ShippingSettingsProto
.internal_static_google_shopping_merchant_accounts_v1beta_Address_descriptor;
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.Address getDefaultInstanceForType() {
return com.google.shopping.merchant.accounts.v1beta.Address.getDefaultInstance();
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.Address build() {
com.google.shopping.merchant.accounts.v1beta.Address result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.Address buildPartial() {
com.google.shopping.merchant.accounts.v1beta.Address result =
new com.google.shopping.merchant.accounts.v1beta.Address(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.shopping.merchant.accounts.v1beta.Address result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.streetAddress_ = streetAddress_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.city_ = city_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.administrativeArea_ = administrativeArea_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.postalCode_ = postalCode_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.regionCode_ = regionCode_;
to_bitField0_ |= 0x00000010;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.shopping.merchant.accounts.v1beta.Address) {
return mergeFrom((com.google.shopping.merchant.accounts.v1beta.Address) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.shopping.merchant.accounts.v1beta.Address other) {
if (other == com.google.shopping.merchant.accounts.v1beta.Address.getDefaultInstance())
return this;
if (other.hasStreetAddress()) {
streetAddress_ = other.streetAddress_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasCity()) {
city_ = other.city_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasAdministrativeArea()) {
administrativeArea_ = other.administrativeArea_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasPostalCode()) {
postalCode_ = other.postalCode_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasRegionCode()) {
regionCode_ = other.regionCode_;
bitField0_ |= 0x00000010;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
streetAddress_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
city_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
administrativeArea_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
postalCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
regionCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object streetAddress_ = "";
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @return Whether the streetAddress field is set.
*/
public boolean hasStreetAddress() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @return The streetAddress.
*/
public java.lang.String getStreetAddress() {
java.lang.Object ref = streetAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
streetAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @return The bytes for streetAddress.
*/
public com.google.protobuf.ByteString getStreetAddressBytes() {
java.lang.Object ref = streetAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
streetAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @param value The streetAddress to set.
* @return This builder for chaining.
*/
public Builder setStreetAddress(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
streetAddress_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @return This builder for chaining.
*/
public Builder clearStreetAddress() {
streetAddress_ = getDefaultInstance().getStreetAddress();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Street-level part of the address. For example: `111w 31st Street`.
*
*
* optional string street_address = 1;
*
* @param value The bytes for streetAddress to set.
* @return This builder for chaining.
*/
public Builder setStreetAddressBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
streetAddress_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object city_ = "";
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the city field is set.
*/
public boolean hasCity() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The city.
*/
public java.lang.String getCity() {
java.lang.Object ref = city_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
city_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for city.
*/
public com.google.protobuf.ByteString getCityBytes() {
java.lang.Object ref = city_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
city_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The city to set.
* @return This builder for chaining.
*/
public Builder setCity(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
city_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearCity() {
city_ = getDefaultInstance().getCity();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. City, town or commune. May also include dependent localities or
* sublocalities (For example neighborhoods or suburbs).
*
*
* optional string city = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for city to set.
* @return This builder for chaining.
*/
public Builder setCityBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
city_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object administrativeArea_ = "";
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the administrativeArea field is set.
*/
public boolean hasAdministrativeArea() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The administrativeArea.
*/
public java.lang.String getAdministrativeArea() {
java.lang.Object ref = administrativeArea_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
administrativeArea_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The bytes for administrativeArea.
*/
public com.google.protobuf.ByteString getAdministrativeAreaBytes() {
java.lang.Object ref = administrativeArea_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
administrativeArea_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The administrativeArea to set.
* @return This builder for chaining.
*/
public Builder setAdministrativeArea(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
administrativeArea_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearAdministrativeArea() {
administrativeArea_ = getDefaultInstance().getAdministrativeArea();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Required. Top-level administrative subdivision of the country. For example,
* a state like California ("CA") or a province like Quebec ("QC").
*
*
* optional string administrative_area = 3 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The bytes for administrativeArea to set.
* @return This builder for chaining.
*/
public Builder setAdministrativeAreaBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
administrativeArea_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object postalCode_ = "";
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the postalCode field is set.
*/
public boolean hasPostalCode() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The postalCode.
*/
public java.lang.String getPostalCode() {
java.lang.Object ref = postalCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
postalCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for postalCode.
*/
public com.google.protobuf.ByteString getPostalCodeBytes() {
java.lang.Object ref = postalCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
postalCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The postalCode to set.
* @return This builder for chaining.
*/
public Builder setPostalCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
postalCode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearPostalCode() {
postalCode_ = getDefaultInstance().getPostalCode();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Required. Postal code or ZIP (For example "94043").
*
*
* optional string postal_code = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for postalCode to set.
* @return This builder for chaining.
*/
public Builder setPostalCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
postalCode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object regionCode_ = "";
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the regionCode field is set.
*/
public boolean hasRegionCode() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return The regionCode.
*/
public java.lang.String getRegionCode() {
java.lang.Object ref = regionCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
regionCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for regionCode.
*/
public com.google.protobuf.ByteString getRegionCodeBytes() {
java.lang.Object ref = regionCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
regionCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The regionCode to set.
* @return This builder for chaining.
*/
public Builder setRegionCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
regionCode_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearRegionCode() {
regionCode_ = getDefaultInstance().getRegionCode();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Required. [CLDR country
* code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)
* (For example "US").
*
*
* optional string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for regionCode to set.
* @return This builder for chaining.
*/
public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
regionCode_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.shopping.merchant.accounts.v1beta.Address)
}
// @@protoc_insertion_point(class_scope:google.shopping.merchant.accounts.v1beta.Address)
private static final com.google.shopping.merchant.accounts.v1beta.Address DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.shopping.merchant.accounts.v1beta.Address();
}
public static com.google.shopping.merchant.accounts.v1beta.Address getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Address parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.shopping.merchant.accounts.v1beta.Address getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy