public static final class PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount extends GeneratedMessage implements PrivateOffer.SingleProductOffer.PriceModel.SkuDiscountOrBuilder
The discount for a specific SKU.
Protobuf type
google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount
Inherited Members
com.google.protobuf.GeneratedMessage.<ContainingT,T>newFileScopedGeneratedExtension(java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ContainingT,T>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class<?>,com.google.protobuf.Message)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessage.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessage.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessage.<V>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Boolean,V>,com.google.protobuf.MapEntry<java.lang.Boolean,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Integer,V>,com.google.protobuf.MapEntry<java.lang.Integer,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.Long,V>,com.google.protobuf.MapEntry<java.lang.Long,V>,int)
com.google.protobuf.GeneratedMessage.<V>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField<java.lang.String,V>,com.google.protobuf.MapEntry<java.lang.String,V>,int)
com.google.protobuf.GeneratedMessage.canUseUnsafe()
com.google.protobuf.GeneratedMessage.emptyBooleanList()
com.google.protobuf.GeneratedMessage.emptyDoubleList()
com.google.protobuf.GeneratedMessage.emptyFloatList()
com.google.protobuf.GeneratedMessage.emptyIntList()
com.google.protobuf.GeneratedMessage.emptyLongList()
com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object)
com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter)
com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int)
Static Fields
CLOUD_BILLING_SKU_FIELD_NUMBER
public static final int CLOUD_BILLING_SKU_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
DISCOUNT_PERCENT_FIELD_NUMBER
public static final int DISCOUNT_PERCENT_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
SKU_FIELD_NUMBER
public static final int SKU_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder newBuilder()
newBuilder(PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount prototype)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder newBuilder(PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount prototype)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseDelimitedFrom(InputStream input)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(byte[] data)
| Parameter |
| Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(CodedInputStream input)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(InputStream input)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
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()
getDiscountCase()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.DiscountCase getDiscountCase()
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.
|
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 |
|
getParserForType()
public Parser<PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
| Returns |
| Type |
Description |
int |
|
Overrides
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()
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()
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.
|
hashCode()
| Returns |
| Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder newBuilderForType()
newBuilderForType(AbstractMessage.BuilderParent parent)
protected PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Overrides
toBuilder()
public PrivateOffer.SingleProductOffer.PriceModel.SkuDiscount.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides