public static final class PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder extends GeneratedMessage.Builder<PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder> implements PrivateOffer.SingleProductOffer.PriceModel.SkuDiscountOrBuilderThe discount for a specific SKU.
Protobuf type
google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount build()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount |
|
buildPartial()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount buildPartial()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount |
|
clear()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder clear()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
clearCloudBillingSku()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder clearCloudBillingSku()Optional. The name of a Google SKU from the Cloud Billing API.
Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.
Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.
Format: services/{service}/skus/{sku}
string cloud_billing_sku = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
This builder for chaining. |
clearDiscount()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder clearDiscount()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
clearDiscountPercent()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder clearDiscountPercent() Optional. The discount percent for the SKU.
For example, 10 means a discount of 10%. If the original SKU
price is $100/hour then the discounted price will be $90/hour.
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", and "". Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
clearSku()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder clearSku()Optional. The name of a partner SKU from this API.
Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.
Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.
Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}
string sku = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
This builder for chaining. |
clearTarget()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder clearTarget()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
getCloudBillingSku()
public String getCloudBillingSku()Optional. The name of a Google SKU from the Cloud Billing API.
Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.
Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.
Format: services/{service}/skus/{sku}
string cloud_billing_sku = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The cloudBillingSku. |
getCloudBillingSkuBytes()
public ByteString getCloudBillingSkuBytes()Optional. The name of a Google SKU from the Cloud Billing API.
Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.
Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.
Format: services/{service}/skus/{sku}
string cloud_billing_sku = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for cloudBillingSku. |
getDefaultInstanceForType()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDiscountCase()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.DiscountCase getDiscountCase()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.DiscountCase |
|
getDiscountPercent()
public Decimal getDiscountPercent() Optional. The discount percent for the SKU.
For example, 10 means a discount of 10%. If the original SKU
price is $100/hour then the discounted price will be $90/hour.
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", and "". Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Decimal |
The discountPercent. |
getDiscountPercentBuilder()
public Decimal.Builder getDiscountPercentBuilder() Optional. The discount percent for the SKU.
For example, 10 means a discount of 10%. If the original SKU
price is $100/hour then the discounted price will be $90/hour.
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", and "". Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.Decimal.Builder |
|
getDiscountPercentOrBuilder()
public DecimalOrBuilder getDiscountPercentOrBuilder() Optional. The discount percent for the SKU.
For example, 10 means a discount of 10%. If the original SKU
price is $100/hour then the discounted price will be $90/hour.
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", and "". Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
com.google.type.DecimalOrBuilder |
|
getSku()
public String getSku()Optional. The name of a partner SKU from this API.
Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.
Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.
Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}
string sku = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
String |
The sku. |
getSkuBytes()
public ByteString getSkuBytes()Optional. The name of a partner SKU from this API.
Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.
Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.
Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}
string sku = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for sku. |
getTargetCase()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.TargetCase getTargetCase()| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.TargetCase |
|
hasCloudBillingSku()
public boolean hasCloudBillingSku()Optional. The name of a Google SKU from the Cloud Billing API.
Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.
Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.
Format: services/{service}/skus/{sku}
string cloud_billing_sku = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the cloudBillingSku field is set. |
hasDiscountPercent()
public boolean hasDiscountPercent() Optional. The discount percent for the SKU.
For example, 10 means a discount of 10%. If the original SKU
price is $100/hour then the discounted price will be $90/hour.
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", and "". Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the discountPercent field is set. |
hasSku()
public boolean hasSku()Optional. The name of a partner SKU from this API.
Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.
Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.
Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}
string sku = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the sku field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeDiscountPercent(Decimal value)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder mergeDiscountPercent(Decimal value) Optional. The discount percent for the SKU.
For example, 10 means a discount of 10%. If the original SKU
price is $100/hour then the discounted price will be $90/hour.
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", and "". Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Decimal |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
mergeFrom(PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount other)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder mergeFrom(PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount other)| Parameter | |
|---|---|
| Name | Description |
other |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
setCloudBillingSku(String value)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder setCloudBillingSku(String value)Optional. The name of a Google SKU from the Cloud Billing API.
Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.
Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.
Format: services/{service}/skus/{sku}
string cloud_billing_sku = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe cloudBillingSku to set. |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
This builder for chaining. |
setCloudBillingSkuBytes(ByteString value)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder setCloudBillingSkuBytes(ByteString value)Optional. The name of a Google SKU from the Cloud Billing API.
Used for partner products sold by Google, such as Premium Operating System Images sold for use in Compute Engine. This is not common. SKUs of this type are not present on this API and can instead be found on the Cloud Billing API or at https://cloud.google.com/skus.
Must refer to a SKU in the price model of the base standard offer. Google SKUs are always referenced in standard offers via SkuGroups.
Format: services/{service}/skus/{sku}
string cloud_billing_sku = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for cloudBillingSku to set. |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
This builder for chaining. |
setDiscountPercent(Decimal value)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder setDiscountPercent(Decimal value) Optional. The discount percent for the SKU.
For example, 10 means a discount of 10%. If the original SKU
price is $100/hour then the discounted price will be $90/hour.
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", and "". Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
com.google.type.Decimal |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
setDiscountPercent(Decimal.Builder builderForValue)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder setDiscountPercent(Decimal.Builder builderForValue) Optional. The discount percent for the SKU.
For example, 10 means a discount of 10%. If the original SKU
price is $100/hour then the discounted price will be $90/hour.
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", and "". Must be present to publish the offer.
.google.type.Decimal discount_percent = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
com.google.type.Decimal.Builder |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
|
setSku(String value)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder setSku(String value)Optional. The name of a partner SKU from this API.
Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.
Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.
Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}
string sku = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe sku to set. |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
This builder for chaining. |
setSkuBytes(ByteString value)
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder setSkuBytes(ByteString value)Optional. The name of a partner SKU from this API.
Must refer to a SKU in the price model of the base standard offer. Inclusion in the base price model can occur either directly or indirectly via inclusion in an included SkuGroup.
Currently, standard offer price models include only partner SKUs in the same project as the standard offer. This may change.
Format: projects/{project}/locations/{location}/services/{service}/skus/{sku}
string sku = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for sku to set. |
| Returns | |
|---|---|
| Type | Description |
PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder |
This builder for chaining. |