Class PrivateOffer.SingleProductOffer.PriceModel (0.1.0)

public static final class PrivateOffer.SingleProductOffer.PriceModel extends GeneratedMessage implements PrivateOffer.SingleProductOffer.PriceModelOrBuilder

The price model of the private offer.

Private offers are referred to as having different kinds of price models based on the combination of fields set in the price model. The following terminology is used in documentation and other reference material.

  • Usage-based: the price model does not set flat_fee
  • Usage-only: the price model sets only usage
  • CUD (committed use discount): the price model sets commitment
  • Commitment discount with additional usage at list price: The price model sets commitment and not usage.
  • Commitment with all usage discounted: The price model sets commitment and usage.
  • Flat fee: the price model sets only flat_fee
  • Flat fee with usage: the price model sets flat_fee and usage

    See https://docs.cloud.google.com/marketplace/docs/partners/offers/select-pricing-model#CUD for the price models.

Protobuf type google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > PrivateOffer.SingleProductOffer.PriceModel

Static Fields

COMMITMENT_FIELD_NUMBER

public static final int COMMITMENT_FIELD_NUMBER
Field Value
Type Description
int

FLAT_FEE_FIELD_NUMBER

public static final int FLAT_FEE_FIELD_NUMBER
Field Value
Type Description
int

USAGE_FIELD_NUMBER

public static final int USAGE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static PrivateOffer.SingleProductOffer.PriceModel getDefaultInstance()
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static PrivateOffer.SingleProductOffer.PriceModel.Builder newBuilder()
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

newBuilder(PrivateOffer.SingleProductOffer.PriceModel prototype)

public static PrivateOffer.SingleProductOffer.PriceModel.Builder newBuilder(PrivateOffer.SingleProductOffer.PriceModel prototype)
Parameter
Name Description
prototype PrivateOffer.SingleProductOffer.PriceModel
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

parseDelimitedFrom(InputStream input)

public static PrivateOffer.SingleProductOffer.PriceModel parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PrivateOffer.SingleProductOffer.PriceModel parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PrivateOffer.SingleProductOffer.PriceModel parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<PrivateOffer.SingleProductOffer.PriceModel> parser()
Returns
Type Description
Parser<PriceModel>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCommitment()

public PrivateOffer.SingleProductOffer.PriceModel.Commitment getCommitment()

Optional. The price configurations for the commitment based subscription. Must be unset when the base standard offer's price model includes subscription SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.Commitment commitment = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Commitment

The commitment.

getCommitmentOrBuilder()

public PrivateOffer.SingleProductOffer.PriceModel.CommitmentOrBuilder getCommitmentOrBuilder()

Optional. The price configurations for the commitment based subscription. Must be unset when the base standard offer's price model includes subscription SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.Commitment commitment = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.CommitmentOrBuilder

getDefaultInstanceForType()

public PrivateOffer.SingleProductOffer.PriceModel getDefaultInstanceForType()
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel

getFlatFee()

public PrivateOffer.SingleProductOffer.PriceModel.FlatFee getFlatFee()

Optional. The price configurations for the flat fee subscription. Must be unset when the base standard offer's price model does not include subscription SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.FlatFee flat_fee = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.FlatFee

The flatFee.

getFlatFeeOrBuilder()

public PrivateOffer.SingleProductOffer.PriceModel.FlatFeeOrBuilder getFlatFeeOrBuilder()

Optional. The price configurations for the flat fee subscription. Must be unset when the base standard offer's price model does not include subscription SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.FlatFee flat_fee = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.FlatFeeOrBuilder

getParserForType()

public Parser<PrivateOffer.SingleProductOffer.PriceModel> getParserForType()
Returns
Type Description
Parser<PriceModel>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSubscriptionCase()

public PrivateOffer.SingleProductOffer.PriceModel.SubscriptionCase getSubscriptionCase()
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.SubscriptionCase

getUsage()

public PrivateOffer.SingleProductOffer.PriceModel.Usage getUsage()

Optional. The price configurations for the usage part. If this field is set, the Commitment.discount_percent must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both. Must be unset when the base standard offer's price model includes no usage SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.Usage usage = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Usage

The usage.

getUsageOrBuilder()

public PrivateOffer.SingleProductOffer.PriceModel.UsageOrBuilder getUsageOrBuilder()

Optional. The price configurations for the usage part. If this field is set, the Commitment.discount_percent must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both. Must be unset when the base standard offer's price model includes no usage SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.Usage usage = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.UsageOrBuilder

hasCommitment()

public boolean hasCommitment()

Optional. The price configurations for the commitment based subscription. Must be unset when the base standard offer's price model includes subscription SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.Commitment commitment = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the commitment field is set.

hasFlatFee()

public boolean hasFlatFee()

Optional. The price configurations for the flat fee subscription. Must be unset when the base standard offer's price model does not include subscription SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.FlatFee flat_fee = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the flatFee field is set.

hasUsage()

public boolean hasUsage()

Optional. The price configurations for the usage part. If this field is set, the Commitment.discount_percent must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both. Must be unset when the base standard offer's price model includes no usage SKUs.

.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.Usage usage = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the usage field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public PrivateOffer.SingleProductOffer.PriceModel.Builder newBuilderForType()
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected PrivateOffer.SingleProductOffer.PriceModel.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder
Overrides

toBuilder()

public PrivateOffer.SingleProductOffer.PriceModel.Builder toBuilder()
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException