public static final class PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder extends GeneratedMessage.Builder<PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder> implements PrivateOffer.SingleProductOffer.PriceModel.UsageOrBuilderThe price for the usage SKUs.
Protobuf type
google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.Usage
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > PrivateOffer.SingleProductOffer.PriceModel.Usage.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllSkuDiscounts(Iterable<? extends PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount> values)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder addAllSkuDiscounts(Iterable<? extends PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount> values) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount> |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
addSkuDiscounts(PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount value)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder addSkuDiscounts(PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount value) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
addSkuDiscounts(PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder builderForValue)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder addSkuDiscounts(PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder builderForValue) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
addSkuDiscounts(int index, PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount value)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder addSkuDiscounts(int index, PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount value) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
addSkuDiscounts(int index, PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder builderForValue)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder addSkuDiscounts(int index, PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder builderForValue) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
addSkuDiscountsBuilder()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder addSkuDiscountsBuilder() Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
addSkuDiscountsBuilder(int index)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder addSkuDiscountsBuilder(int index) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
build()
public PrivateOffer.SingleProductOffer.PriceModel.Usage build()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage |
|
buildPartial()
public PrivateOffer.SingleProductOffer.PriceModel.Usage buildPartial()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage |
|
clear()
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder clear()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
clearDefaultDiscountPercent()
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder clearDefaultDiscountPercent()Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
.google.type.Decimal default_discount_percent = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
clearSkuDiscounts()
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder clearSkuDiscounts() Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
getDefaultDiscountPercent()
public Decimal getDefaultDiscountPercent()Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
.google.type.Decimal default_discount_percent = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Decimal |
The defaultDiscountPercent. |
getDefaultDiscountPercentBuilder()
public Decimal.Builder getDefaultDiscountPercentBuilder()Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
.google.type.Decimal default_discount_percent = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Decimal.Builder |
|
getDefaultDiscountPercentOrBuilder()
public DecimalOrBuilder getDefaultDiscountPercentOrBuilder()Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
.google.type.Decimal default_discount_percent = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.DecimalOrBuilder |
|
getDefaultInstanceForType()
public PrivateOffer.SingleProductOffer.PriceModel.Usage getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getSkuDiscounts(int index)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount getSkuDiscounts(int index) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount |
|
getSkuDiscountsBuilder(int index)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder getSkuDiscountsBuilder(int index) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
getSkuDiscountsBuilderList()
public List<PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder> getSkuDiscountsBuilderList() Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getSkuDiscountsCount()
public int getSkuDiscountsCount() Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getSkuDiscountsList()
public List<PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount> getSkuDiscountsList() Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<SkuDiscount> |
|
getSkuDiscountsOrBuilder(int index)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscountOrBuilder getSkuDiscountsOrBuilder(int index) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscountOrBuilder |
|
getSkuDiscountsOrBuilderList()
public List<? extends PrivateOffer.SingleProductOffer.PriceModel.SkuDiscountOrBuilder> getSkuDiscountsOrBuilderList() Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscountOrBuilder> |
|
hasDefaultDiscountPercent()
public boolean hasDefaultDiscountPercent()Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
.google.type.Decimal default_discount_percent = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the defaultDiscountPercent field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeDefaultDiscountPercent(Decimal value)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder mergeDefaultDiscountPercent(Decimal value)Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
.google.type.Decimal default_discount_percent = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Decimal |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
mergeFrom(PrivateOffer.SingleProductOffer.PriceModel.Usage other)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder mergeFrom(PrivateOffer.SingleProductOffer.PriceModel.Usage other)| Parameter | |
|---|---|
| Name | Description |
other |
PrivateOffer.SingleProductOffer.PriceModel.Usage |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
removeSkuDiscounts(int index)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder removeSkuDiscounts(int index) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
setDefaultDiscountPercent(Decimal value)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder setDefaultDiscountPercent(Decimal value)Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
.google.type.Decimal default_discount_percent = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Decimal |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
setDefaultDiscountPercent(Decimal.Builder builderForValue)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder setDefaultDiscountPercent(Decimal.Builder builderForValue)Optional. The default discount percent for usage SKUs. An unset default discount percent is equivalent to 0 (no discount).
Must be between 0 and 100 inclusive, with precision up to 2 decimal
places. If this field is set, then the allowed pattern for 'value'
is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$.
Examples of valid values: "0", "100.0", "12.34", "40.0".
Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".
.google.type.Decimal default_discount_percent = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
com.google.type.Decimal.Builder |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
setSkuDiscounts(int index, PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount value)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder setSkuDiscounts(int index, PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount value) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|
setSkuDiscounts(int index, PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder builderForValue)
public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder setSkuDiscounts(int index, PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder builderForValue) Optional. The discounts for the specific SKUs that override the
default_discount_percent.
repeated .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount sku_discounts = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder |
|