public final class DiscountComponent extends GeneratedMessage implements DiscountComponentOrBuilderRepresents a single component of the total discount applicable on a Price.
Protobuf type google.cloud.channel.v1.DiscountComponent
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > DiscountComponentImplements
DiscountComponentOrBuilderStatic Fields
DISCOUNT_ABSOLUTE_FIELD_NUMBER
public static final int DISCOUNT_ABSOLUTE_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
DISCOUNT_PERCENTAGE_FIELD_NUMBER
public static final int DISCOUNT_PERCENTAGE_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
DISCOUNT_TYPE_FIELD_NUMBER
public static final int DISCOUNT_TYPE_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
Static Methods
getDefaultInstance()
public static DiscountComponent getDefaultInstance()| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
newBuilder()
public static DiscountComponent.Builder newBuilder()| Returns | |
|---|---|
| Type | Description |
DiscountComponent.Builder |
|
newBuilder(DiscountComponent prototype)
public static DiscountComponent.Builder newBuilder(DiscountComponent prototype)| Parameter | |
|---|---|
| Name | Description |
prototype |
DiscountComponent |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent.Builder |
|
parseDelimitedFrom(InputStream input)
public static DiscountComponent parseDelimitedFrom(InputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static DiscountComponent parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(byte[] data)
public static DiscountComponent parseFrom(byte[] data)| Parameter | |
|---|---|
| Name | Description |
data |
byte[] |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static DiscountComponent parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data)
public static DiscountComponent parseFrom(ByteString data)| Parameter | |
|---|---|
| Name | Description |
data |
ByteString |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static DiscountComponent parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(CodedInputStream input)
public static DiscountComponent parseFrom(CodedInputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
CodedInputStream |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static DiscountComponent parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input)
public static DiscountComponent parseFrom(InputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static DiscountComponent parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(ByteBuffer data)
public static DiscountComponent parseFrom(ByteBuffer data)| Parameter | |
|---|---|
| Name | Description |
data |
ByteBuffer |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static DiscountComponent parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parser()
public static Parser<DiscountComponent> parser()| Returns | |
|---|---|
| Type | Description |
Parser<DiscountComponent> |
|
Methods
equals(Object obj)
public boolean equals(Object obj)| Parameter | |
|---|---|
| Name | Description |
obj |
Object |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
public DiscountComponent getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
DiscountComponent |
|
getDiscountAbsolute()
public Money getDiscountAbsolute()Fixed value discount.
.google.type.Money discount_absolute = 4;
| Returns | |
|---|---|
| Type | Description |
com.google.type.Money |
The discountAbsolute. |
getDiscountAbsoluteOrBuilder()
public MoneyOrBuilder getDiscountAbsoluteOrBuilder()Fixed value discount.
.google.type.Money discount_absolute = 4;
| Returns | |
|---|---|
| Type | Description |
com.google.type.MoneyOrBuilder |
|
getDiscountPercentage()
public double getDiscountPercentage()Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
double discount_percentage = 3;
| Returns | |
|---|---|
| Type | Description |
double |
The discountPercentage. |
getDiscountType()
public DiscountType getDiscountType()Type of the discount.
.google.cloud.channel.v1.DiscountType discount_type = 2;
| Returns | |
|---|---|
| Type | Description |
DiscountType |
The discountType. |
getDiscountTypeValue()
public int getDiscountTypeValue()Type of the discount.
.google.cloud.channel.v1.DiscountType discount_type = 2;
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for discountType. |
getDiscountValueCase()
public DiscountComponent.DiscountValueCase getDiscountValueCase()| Returns | |
|---|---|
| Type | Description |
DiscountComponent.DiscountValueCase |
|
getParserForType()
public Parser<DiscountComponent> getParserForType()| Returns | |
|---|---|
| Type | Description |
Parser<DiscountComponent> |
|
getSerializedSize()
public int getSerializedSize()| Returns | |
|---|---|
| Type | Description |
int |
|
hasDiscountAbsolute()
public boolean hasDiscountAbsolute()Fixed value discount.
.google.type.Money discount_absolute = 4;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the discountAbsolute field is set. |
hasDiscountPercentage()
public boolean hasDiscountPercentage()Discount percentage, represented as decimal. For example, a 20% discount will be represented as 0.2.
double discount_percentage = 3;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the discountPercentage field is set. |
hashCode()
public int hashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
newBuilderForType()
public DiscountComponent.Builder newBuilderForType()| Returns | |
|---|---|
| Type | Description |
DiscountComponent.Builder |
|
newBuilderForType(AbstractMessage.BuilderParent parent)
protected DiscountComponent.Builder newBuilderForType(AbstractMessage.BuilderParent parent)| Parameter | |
|---|---|
| Name | Description |
parent |
BuilderParent |
| Returns | |
|---|---|
| Type | Description |
DiscountComponent.Builder |
|
toBuilder()
public DiscountComponent.Builder toBuilder()| Returns | |
|---|---|
| Type | Description |
DiscountComponent.Builder |
|
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)| Parameter | |
|---|---|
| Name | Description |
output |
CodedOutputStream |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|