Class AddressInfo.Builder (0.3.0)

public static final class AddressInfo.Builder extends GeneratedMessage.Builder<AddressInfo.Builder> implements AddressInfoOrBuilder

Represents a customer’s physical address.

Protobuf type google.shopping.merchant.loyaltycustomers.v1.AddressInfo

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public AddressInfo build()
Returns
Type Description
AddressInfo

buildPartial()

public AddressInfo buildPartial()
Returns
Type Description
AddressInfo

clear()

public AddressInfo.Builder clear()
Returns
Type Description
AddressInfo.Builder
Overrides

clearCity()

public AddressInfo.Builder clearCity()

Optional. The city of the customer.

string city = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

clearFamilyName()

public AddressInfo.Builder clearFamilyName()

Optional. The family name of the customer.

string family_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

clearGivenName()

public AddressInfo.Builder clearGivenName()

Optional. The given name of the customer.

string given_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

clearPostalCode()

public AddressInfo.Builder clearPostalCode()

Optional. The postal code (zip code) of the customer.

Format Rules:

  • United States: 5-digit zip codes (e.g., "94108").

string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

clearRegionCode()

public AddressInfo.Builder clearRegionCode()

Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This field is case-insensitive. For more information, see https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html.

string region_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

clearState()

public AddressInfo.Builder clearState()

Optional. The state or province of the customer.

string state = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

getCity()

public String getCity()

Optional. The city of the customer.

string city = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The city.

getCityBytes()

public ByteString getCityBytes()

Optional. The city of the customer.

string city = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for city.

getDefaultInstanceForType()

public AddressInfo getDefaultInstanceForType()
Returns
Type Description
AddressInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFamilyName()

public String getFamilyName()

Optional. The family name of the customer.

string family_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The familyName.

getFamilyNameBytes()

public ByteString getFamilyNameBytes()

Optional. The family name of the customer.

string family_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for familyName.

getGivenName()

public String getGivenName()

Optional. The given name of the customer.

string given_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The givenName.

getGivenNameBytes()

public ByteString getGivenNameBytes()

Optional. The given name of the customer.

string given_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for givenName.

getPostalCode()

public String getPostalCode()

Optional. The postal code (zip code) of the customer.

Format Rules:

  • United States: 5-digit zip codes (e.g., "94108").

string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The postalCode.

getPostalCodeBytes()

public ByteString getPostalCodeBytes()

Optional. The postal code (zip code) of the customer.

Format Rules:

  • United States: 5-digit zip codes (e.g., "94108").

string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for postalCode.

getRegionCode()

public String getRegionCode()

Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This field is case-insensitive. For more information, see https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html.

string region_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The regionCode.

getRegionCodeBytes()

public ByteString getRegionCodeBytes()

Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This field is case-insensitive. For more information, see https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html.

string region_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for regionCode.

getState()

public String getState()

Optional. The state or province of the customer.

string state = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The state.

getStateBytes()

public ByteString getStateBytes()

Optional. The state or province of the customer.

string state = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for state.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AddressInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AddressInfo.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AddressInfo.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AddressInfo.Builder
Overrides

mergeFrom(AddressInfo other)

public AddressInfo.Builder mergeFrom(AddressInfo other)
Parameter
Name Description
other AddressInfo
Returns
Type Description
AddressInfo.Builder

setCity(String value)

public AddressInfo.Builder setCity(String value)

Optional. The city of the customer.

string city = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The city to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setCityBytes(ByteString value)

public AddressInfo.Builder setCityBytes(ByteString value)

Optional. The city of the customer.

string city = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for city to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setFamilyName(String value)

public AddressInfo.Builder setFamilyName(String value)

Optional. The family name of the customer.

string family_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The familyName to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setFamilyNameBytes(ByteString value)

public AddressInfo.Builder setFamilyNameBytes(ByteString value)

Optional. The family name of the customer.

string family_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for familyName to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setGivenName(String value)

public AddressInfo.Builder setGivenName(String value)

Optional. The given name of the customer.

string given_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The givenName to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setGivenNameBytes(ByteString value)

public AddressInfo.Builder setGivenNameBytes(ByteString value)

Optional. The given name of the customer.

string given_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for givenName to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setPostalCode(String value)

public AddressInfo.Builder setPostalCode(String value)

Optional. The postal code (zip code) of the customer.

Format Rules:

  • United States: 5-digit zip codes (e.g., "94108").

string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The postalCode to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setPostalCodeBytes(ByteString value)

public AddressInfo.Builder setPostalCodeBytes(ByteString value)

Optional. The postal code (zip code) of the customer.

Format Rules:

  • United States: 5-digit zip codes (e.g., "94108").

string postal_code = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for postalCode to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setRegionCode(String value)

public AddressInfo.Builder setRegionCode(String value)

Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This field is case-insensitive. For more information, see https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html.

string region_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The regionCode to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setRegionCodeBytes(ByteString value)

public AddressInfo.Builder setRegionCodeBytes(ByteString value)

Optional. The Unicode country/region code (CLDR) of the customer, such as "US" or "CH". This field is case-insensitive. For more information, see https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html.

string region_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for regionCode to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setState(String value)

public AddressInfo.Builder setState(String value)

Optional. The state or province of the customer.

string state = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The state to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.

setStateBytes(ByteString value)

public AddressInfo.Builder setStateBytes(ByteString value)

Optional. The state or province of the customer.

string state = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for state to set.

Returns
Type Description
AddressInfo.Builder

This builder for chaining.