Class LocalInventory.Builder (1.0.0)

public static final class LocalInventory.Builder extends GeneratedMessageV3.Builder<LocalInventory.Builder> implements LocalInventoryOrBuilder

Local inventory information for the product. Represents in-store information for a specific product at the store specified by storeCode. For a list of all accepted attribute values, see the local product inventory data specification.

Protobuf type google.shopping.merchant.inventories.v1.LocalInventory

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public LocalInventory.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LocalInventory.Builder
Overrides

build()

public LocalInventory build()
Returns
Type Description
LocalInventory

buildPartial()

public LocalInventory buildPartial()
Returns
Type Description
LocalInventory

clear()

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

clearAccount()

public LocalInventory.Builder clearAccount()

Output only. The account that owns the product. This field will be ignored if set by the client.

int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LocalInventory.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public LocalInventory.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
LocalInventory.Builder
Overrides

clearLocalInventoryAttributes()

public LocalInventory.Builder clearLocalInventoryAttributes()

Optional. A list of local inventory attributes.

.google.shopping.merchant.inventories.v1.LocalInventoryAttributes local_inventory_attributes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LocalInventory.Builder

clearName()

public LocalInventory.Builder clearName()

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LocalInventory.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public LocalInventory.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
LocalInventory.Builder
Overrides

clearStoreCode()

public LocalInventory.Builder clearStoreCode()

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

string store_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
LocalInventory.Builder

This builder for chaining.

clone()

public LocalInventory.Builder clone()
Returns
Type Description
LocalInventory.Builder
Overrides

getAccount()

public long getAccount()

Output only. The account that owns the product. This field will be ignored if set by the client.

int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The account.

getDefaultInstanceForType()

public LocalInventory getDefaultInstanceForType()
Returns
Type Description
LocalInventory

getDescriptorForType()

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

getLocalInventoryAttributes()

public LocalInventoryAttributes getLocalInventoryAttributes()

Optional. A list of local inventory attributes.

.google.shopping.merchant.inventories.v1.LocalInventoryAttributes local_inventory_attributes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LocalInventoryAttributes

The localInventoryAttributes.

getLocalInventoryAttributesBuilder()

public LocalInventoryAttributes.Builder getLocalInventoryAttributesBuilder()

Optional. A list of local inventory attributes.

.google.shopping.merchant.inventories.v1.LocalInventoryAttributes local_inventory_attributes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LocalInventoryAttributes.Builder

getLocalInventoryAttributesOrBuilder()

public LocalInventoryAttributesOrBuilder getLocalInventoryAttributesOrBuilder()

Optional. A list of local inventory attributes.

.google.shopping.merchant.inventories.v1.LocalInventoryAttributes local_inventory_attributes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LocalInventoryAttributesOrBuilder

getName()

public String getName()

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getStoreCode()

public String getStoreCode()

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

string store_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The storeCode.

getStoreCodeBytes()

public ByteString getStoreCodeBytes()

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

string store_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for storeCode.

hasLocalInventoryAttributes()

public boolean hasLocalInventoryAttributes()

Optional. A list of local inventory attributes.

.google.shopping.merchant.inventories.v1.LocalInventoryAttributes local_inventory_attributes = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the localInventoryAttributes field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(LocalInventory other)

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

mergeLocalInventoryAttributes(LocalInventoryAttributes value)

public LocalInventory.Builder mergeLocalInventoryAttributes(LocalInventoryAttributes value)

Optional. A list of local inventory attributes.

.google.shopping.merchant.inventories.v1.LocalInventoryAttributes local_inventory_attributes = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value LocalInventoryAttributes
Returns
Type Description
LocalInventory.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LocalInventory.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LocalInventory.Builder
Overrides

setAccount(long value)

public LocalInventory.Builder setAccount(long value)

Output only. The account that owns the product. This field will be ignored if set by the client.

int64 account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The account to set.

Returns
Type Description
LocalInventory.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public LocalInventory.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LocalInventory.Builder
Overrides

setLocalInventoryAttributes(LocalInventoryAttributes value)

public LocalInventory.Builder setLocalInventoryAttributes(LocalInventoryAttributes value)

Optional. A list of local inventory attributes.

.google.shopping.merchant.inventories.v1.LocalInventoryAttributes local_inventory_attributes = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value LocalInventoryAttributes
Returns
Type Description
LocalInventory.Builder

setLocalInventoryAttributes(LocalInventoryAttributes.Builder builderForValue)

public LocalInventory.Builder setLocalInventoryAttributes(LocalInventoryAttributes.Builder builderForValue)

Optional. A list of local inventory attributes.

.google.shopping.merchant.inventories.v1.LocalInventoryAttributes local_inventory_attributes = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue LocalInventoryAttributes.Builder
Returns
Type Description
LocalInventory.Builder

setName(String value)

public LocalInventory.Builder setName(String value)

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
LocalInventory.Builder

This builder for chaining.

setNameBytes(ByteString value)

public LocalInventory.Builder setNameBytes(ByteString value)

Output only. The name of the LocalInventory resource. Format: accounts/{account}/products/{product}/localInventories/{store_code}

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
LocalInventory.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public LocalInventory.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
LocalInventory.Builder
Overrides

setStoreCode(String value)

public LocalInventory.Builder setStoreCode(String value)

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

string store_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The storeCode to set.

Returns
Type Description
LocalInventory.Builder

This builder for chaining.

setStoreCodeBytes(ByteString value)

public LocalInventory.Builder setStoreCodeBytes(ByteString value)

Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.

string store_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for storeCode to set.

Returns
Type Description
LocalInventory.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final LocalInventory.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LocalInventory.Builder
Overrides