Class PrivateOffer.SingleProductOffer.PriceModel.Builder (0.1.0)

public static final class PrivateOffer.SingleProductOffer.PriceModel.Builder extends GeneratedMessage.Builder<PrivateOffer.SingleProductOffer.PriceModel.Builder> 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

Static Methods

getDescriptor()

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

Methods

build()

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

buildPartial()

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

clear()

public PrivateOffer.SingleProductOffer.PriceModel.Builder clear()
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder
Overrides

clearCommitment()

public PrivateOffer.SingleProductOffer.PriceModel.Builder clearCommitment()

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.Builder

clearFlatFee()

public PrivateOffer.SingleProductOffer.PriceModel.Builder clearFlatFee()

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.Builder

clearSubscription()

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

clearUsage()

public PrivateOffer.SingleProductOffer.PriceModel.Builder clearUsage()

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.Builder

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.

getCommitmentBuilder()

public PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder getCommitmentBuilder()

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.Builder

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

getFlatFeeBuilder()

public PrivateOffer.SingleProductOffer.PriceModel.FlatFee.Builder getFlatFeeBuilder()

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.Builder

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

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.

getUsageBuilder()

public PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder getUsageBuilder()

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.Builder

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCommitment(PrivateOffer.SingleProductOffer.PriceModel.Commitment value)

public PrivateOffer.SingleProductOffer.PriceModel.Builder mergeCommitment(PrivateOffer.SingleProductOffer.PriceModel.Commitment value)

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];

Parameter
Name Description
value PrivateOffer.SingleProductOffer.PriceModel.Commitment
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

mergeFlatFee(PrivateOffer.SingleProductOffer.PriceModel.FlatFee value)

public PrivateOffer.SingleProductOffer.PriceModel.Builder mergeFlatFee(PrivateOffer.SingleProductOffer.PriceModel.FlatFee value)

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];

Parameter
Name Description
value PrivateOffer.SingleProductOffer.PriceModel.FlatFee
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

mergeFrom(PrivateOffer.SingleProductOffer.PriceModel other)

public PrivateOffer.SingleProductOffer.PriceModel.Builder mergeFrom(PrivateOffer.SingleProductOffer.PriceModel other)
Parameter
Name Description
other PrivateOffer.SingleProductOffer.PriceModel
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PrivateOffer.SingleProductOffer.PriceModel.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public PrivateOffer.SingleProductOffer.PriceModel.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder
Overrides

mergeUsage(PrivateOffer.SingleProductOffer.PriceModel.Usage value)

public PrivateOffer.SingleProductOffer.PriceModel.Builder mergeUsage(PrivateOffer.SingleProductOffer.PriceModel.Usage value)

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];

Parameter
Name Description
value PrivateOffer.SingleProductOffer.PriceModel.Usage
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

setCommitment(PrivateOffer.SingleProductOffer.PriceModel.Commitment value)

public PrivateOffer.SingleProductOffer.PriceModel.Builder setCommitment(PrivateOffer.SingleProductOffer.PriceModel.Commitment value)

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];

Parameter
Name Description
value PrivateOffer.SingleProductOffer.PriceModel.Commitment
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

setCommitment(PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder builderForValue)

public PrivateOffer.SingleProductOffer.PriceModel.Builder setCommitment(PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder builderForValue)

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];

Parameter
Name Description
builderForValue PrivateOffer.SingleProductOffer.PriceModel.Commitment.Builder
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

setFlatFee(PrivateOffer.SingleProductOffer.PriceModel.FlatFee value)

public PrivateOffer.SingleProductOffer.PriceModel.Builder setFlatFee(PrivateOffer.SingleProductOffer.PriceModel.FlatFee value)

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];

Parameter
Name Description
value PrivateOffer.SingleProductOffer.PriceModel.FlatFee
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

setFlatFee(PrivateOffer.SingleProductOffer.PriceModel.FlatFee.Builder builderForValue)

public PrivateOffer.SingleProductOffer.PriceModel.Builder setFlatFee(PrivateOffer.SingleProductOffer.PriceModel.FlatFee.Builder builderForValue)

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];

Parameter
Name Description
builderForValue PrivateOffer.SingleProductOffer.PriceModel.FlatFee.Builder
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

setUsage(PrivateOffer.SingleProductOffer.PriceModel.Usage value)

public PrivateOffer.SingleProductOffer.PriceModel.Builder setUsage(PrivateOffer.SingleProductOffer.PriceModel.Usage value)

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];

Parameter
Name Description
value PrivateOffer.SingleProductOffer.PriceModel.Usage
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder

setUsage(PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder builderForValue)

public PrivateOffer.SingleProductOffer.PriceModel.Builder setUsage(PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder builderForValue)

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];

Parameter
Name Description
builderForValue PrivateOffer.SingleProductOffer.PriceModel.Usage.Builder
Returns
Type Description
PrivateOffer.SingleProductOffer.PriceModel.Builder