Class ProductSustainabilityIncentive.Builder (0.18.0)

public static final class ProductSustainabilityIncentive.Builder extends GeneratedMessageV3.Builder<ProductSustainabilityIncentive.Builder> implements ProductSustainabilityIncentiveOrBuilder

Information regarding sustainability-related incentive programs such as rebates or tax relief.

Protobuf type google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ProductSustainabilityIncentive build()
Returns
Type Description
ProductSustainabilityIncentive

buildPartial()

public ProductSustainabilityIncentive buildPartial()
Returns
Type Description
ProductSustainabilityIncentive

clear()

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

clearAmount()

public ProductSustainabilityIncentive.Builder clearAmount()

The fixed amount of the incentive.

.google.shopping.type.Price amount = 2;

Returns
Type Description
ProductSustainabilityIncentive.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPercentage()

public ProductSustainabilityIncentive.Builder clearPercentage()

The percentage of the sale price that the incentive is applied to.

double percentage = 3;

Returns
Type Description
ProductSustainabilityIncentive.Builder

This builder for chaining.

clearType()

public ProductSustainabilityIncentive.Builder clearType()

Sustainability incentive program.

optional .google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type type = 1;

Returns
Type Description
ProductSustainabilityIncentive.Builder

This builder for chaining.

clearValue()

public ProductSustainabilityIncentive.Builder clearValue()
Returns
Type Description
ProductSustainabilityIncentive.Builder

clone()

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

getAmount()

public Price getAmount()

The fixed amount of the incentive.

.google.shopping.type.Price amount = 2;

Returns
Type Description
com.google.shopping.type.Price

The amount.

getAmountBuilder()

public Price.Builder getAmountBuilder()

The fixed amount of the incentive.

.google.shopping.type.Price amount = 2;

Returns
Type Description
com.google.shopping.type.Price.Builder

getAmountOrBuilder()

public PriceOrBuilder getAmountOrBuilder()

The fixed amount of the incentive.

.google.shopping.type.Price amount = 2;

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getDefaultInstanceForType()

public ProductSustainabilityIncentive getDefaultInstanceForType()
Returns
Type Description
ProductSustainabilityIncentive

getDescriptorForType()

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

getPercentage()

public double getPercentage()

The percentage of the sale price that the incentive is applied to.

double percentage = 3;

Returns
Type Description
double

The percentage.

getType()

public ProductSustainabilityIncentive.Type getType()

Sustainability incentive program.

optional .google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type type = 1;

Returns
Type Description
ProductSustainabilityIncentive.Type

The type.

getTypeValue()

public int getTypeValue()

Sustainability incentive program.

optional .google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type type = 1;

Returns
Type Description
int

The enum numeric value on the wire for type.

getValueCase()

public ProductSustainabilityIncentive.ValueCase getValueCase()
Returns
Type Description
ProductSustainabilityIncentive.ValueCase

hasAmount()

public boolean hasAmount()

The fixed amount of the incentive.

.google.shopping.type.Price amount = 2;

Returns
Type Description
boolean

Whether the amount field is set.

hasPercentage()

public boolean hasPercentage()

The percentage of the sale price that the incentive is applied to.

double percentage = 3;

Returns
Type Description
boolean

Whether the percentage field is set.

hasType()

public boolean hasType()

Sustainability incentive program.

optional .google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type type = 1;

Returns
Type Description
boolean

Whether the type field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAmount(Price value)

public ProductSustainabilityIncentive.Builder mergeAmount(Price value)

The fixed amount of the incentive.

.google.shopping.type.Price amount = 2;

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
ProductSustainabilityIncentive.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ProductSustainabilityIncentive other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAmount(Price value)

public ProductSustainabilityIncentive.Builder setAmount(Price value)

The fixed amount of the incentive.

.google.shopping.type.Price amount = 2;

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
ProductSustainabilityIncentive.Builder

setAmount(Price.Builder builderForValue)

public ProductSustainabilityIncentive.Builder setAmount(Price.Builder builderForValue)

The fixed amount of the incentive.

.google.shopping.type.Price amount = 2;

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
ProductSustainabilityIncentive.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPercentage(double value)

public ProductSustainabilityIncentive.Builder setPercentage(double value)

The percentage of the sale price that the incentive is applied to.

double percentage = 3;

Parameter
Name Description
value double

The percentage to set.

Returns
Type Description
ProductSustainabilityIncentive.Builder

This builder for chaining.

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

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

setType(ProductSustainabilityIncentive.Type value)

public ProductSustainabilityIncentive.Builder setType(ProductSustainabilityIncentive.Type value)

Sustainability incentive program.

optional .google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type type = 1;

Parameter
Name Description
value ProductSustainabilityIncentive.Type

The type to set.

Returns
Type Description
ProductSustainabilityIncentive.Builder

This builder for chaining.

setTypeValue(int value)

public ProductSustainabilityIncentive.Builder setTypeValue(int value)

Sustainability incentive program.

optional .google.shopping.merchant.products.v1beta.ProductSustainabilityIncentive.Type type = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for type to set.

Returns
Type Description
ProductSustainabilityIncentive.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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