public static final class ProductSustainabilityIncentive.Builder extends GeneratedMessage.Builder<ProductSustainabilityIncentive.Builder> implements ProductSustainabilityIncentiveOrBuilderInformation regarding sustainability-related incentive programs such as rebates or tax relief.
Protobuf type google.shopping.merchant.products.v1.ProductSustainabilityIncentive
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > ProductSustainabilityIncentive.BuilderImplements
ProductSustainabilityIncentiveOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
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 |
|
clearAmount()
public ProductSustainabilityIncentive.Builder clearAmount()The fixed amount of the incentive.
.google.shopping.type.Price amount = 2;
| Returns | |
|---|---|
| Type | Description |
ProductSustainabilityIncentive.Builder |
|
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.v1.ProductSustainabilityIncentive.Type type = 1;
| Returns | |
|---|---|
| Type | Description |
ProductSustainabilityIncentive.Builder |
This builder for chaining. |
clearValue()
public ProductSustainabilityIncentive.Builder clearValue()| Returns | |
|---|---|
| Type | Description |
ProductSustainabilityIncentive.Builder |
|
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 |
|
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.v1.ProductSustainabilityIncentive.Type type = 1;
| Returns | |
|---|---|
| Type | Description |
ProductSustainabilityIncentive.Type |
The type. |
getTypeValue()
public int getTypeValue()Sustainability incentive program.
optional .google.shopping.merchant.products.v1.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.v1.ProductSustainabilityIncentive.Type type = 1;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the type field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public ProductSustainabilityIncentive.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
ProductSustainabilityIncentive.Builder |
|
mergeFrom(ProductSustainabilityIncentive other)
public ProductSustainabilityIncentive.Builder mergeFrom(ProductSustainabilityIncentive other)| Parameter | |
|---|---|
| Name | Description |
other |
ProductSustainabilityIncentive |
| Returns | |
|---|---|
| Type | Description |
ProductSustainabilityIncentive.Builder |
|
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 |
|
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 |
doubleThe percentage to set. |
| Returns | |
|---|---|
| Type | Description |
ProductSustainabilityIncentive.Builder |
This builder for chaining. |
setType(ProductSustainabilityIncentive.Type value)
public ProductSustainabilityIncentive.Builder setType(ProductSustainabilityIncentive.Type value)Sustainability incentive program.
optional .google.shopping.merchant.products.v1.ProductSustainabilityIncentive.Type type = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ProductSustainabilityIncentive.TypeThe 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.v1.ProductSustainabilityIncentive.Type type = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for type to set. |
| Returns | |
|---|---|
| Type | Description |
ProductSustainabilityIncentive.Builder |
This builder for chaining. |