Class SubscriptionCost.Builder (0.3.0)

public static final class SubscriptionCost.Builder extends GeneratedMessageV3.Builder<SubscriptionCost.Builder> implements SubscriptionCostOrBuilder

The SubscriptionCost of the product.

Protobuf type google.shopping.merchant.products.v1beta.SubscriptionCost

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SubscriptionCost.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SubscriptionCost.Builder
Overrides

build()

public SubscriptionCost build()
Returns
Type Description
SubscriptionCost

buildPartial()

public SubscriptionCost buildPartial()
Returns
Type Description
SubscriptionCost

clear()

public SubscriptionCost.Builder clear()
Returns
Type Description
SubscriptionCost.Builder
Overrides

clearAmount()

public SubscriptionCost.Builder clearAmount()

The amount the buyer has to pay per subscription period.

.google.shopping.type.Price amount = 3;

Returns
Type Description
SubscriptionCost.Builder

clearField(Descriptors.FieldDescriptor field)

public SubscriptionCost.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SubscriptionCost.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SubscriptionCost.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SubscriptionCost.Builder
Overrides

clearPeriod()

public SubscriptionCost.Builder clearPeriod()

The type of subscription period. Supported values are:

  • "month"
  • "year"

.google.shopping.merchant.products.v1beta.SubscriptionPeriod period = 1;

Returns
Type Description
SubscriptionCost.Builder

This builder for chaining.

clearPeriodLength()

public SubscriptionCost.Builder clearPeriodLength()

The number of subscription periods the buyer has to pay.

int64 period_length = 2;

Returns
Type Description
SubscriptionCost.Builder

This builder for chaining.

clone()

public SubscriptionCost.Builder clone()
Returns
Type Description
SubscriptionCost.Builder
Overrides

getAmount()

public Price getAmount()

The amount the buyer has to pay per subscription period.

.google.shopping.type.Price amount = 3;

Returns
Type Description
com.google.shopping.type.Price

The amount.

getAmountBuilder()

public Price.Builder getAmountBuilder()

The amount the buyer has to pay per subscription period.

.google.shopping.type.Price amount = 3;

Returns
Type Description
com.google.shopping.type.Price.Builder

getAmountOrBuilder()

public PriceOrBuilder getAmountOrBuilder()

The amount the buyer has to pay per subscription period.

.google.shopping.type.Price amount = 3;

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getDefaultInstanceForType()

public SubscriptionCost getDefaultInstanceForType()
Returns
Type Description
SubscriptionCost

getDescriptorForType()

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

getPeriod()

public SubscriptionPeriod getPeriod()

The type of subscription period. Supported values are:

  • "month"
  • "year"

.google.shopping.merchant.products.v1beta.SubscriptionPeriod period = 1;

Returns
Type Description
SubscriptionPeriod

The period.

getPeriodLength()

public long getPeriodLength()

The number of subscription periods the buyer has to pay.

int64 period_length = 2;

Returns
Type Description
long

The periodLength.

getPeriodValue()

public int getPeriodValue()

The type of subscription period. Supported values are:

  • "month"
  • "year"

.google.shopping.merchant.products.v1beta.SubscriptionPeriod period = 1;

Returns
Type Description
int

The enum numeric value on the wire for period.

hasAmount()

public boolean hasAmount()

The amount the buyer has to pay per subscription period.

.google.shopping.type.Price amount = 3;

Returns
Type Description
boolean

Whether the amount field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAmount(Price value)

public SubscriptionCost.Builder mergeAmount(Price value)

The amount the buyer has to pay per subscription period.

.google.shopping.type.Price amount = 3;

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
SubscriptionCost.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public SubscriptionCost.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SubscriptionCost.Builder
Overrides

mergeFrom(SubscriptionCost other)

public SubscriptionCost.Builder mergeFrom(SubscriptionCost other)
Parameter
Name Description
other SubscriptionCost
Returns
Type Description
SubscriptionCost.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SubscriptionCost.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SubscriptionCost.Builder
Overrides

setAmount(Price value)

public SubscriptionCost.Builder setAmount(Price value)

The amount the buyer has to pay per subscription period.

.google.shopping.type.Price amount = 3;

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
SubscriptionCost.Builder

setAmount(Price.Builder builderForValue)

public SubscriptionCost.Builder setAmount(Price.Builder builderForValue)

The amount the buyer has to pay per subscription period.

.google.shopping.type.Price amount = 3;

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
SubscriptionCost.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SubscriptionCost.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SubscriptionCost.Builder
Overrides

setPeriod(SubscriptionPeriod value)

public SubscriptionCost.Builder setPeriod(SubscriptionPeriod value)

The type of subscription period. Supported values are:

  • "month"
  • "year"

.google.shopping.merchant.products.v1beta.SubscriptionPeriod period = 1;

Parameter
Name Description
value SubscriptionPeriod

The period to set.

Returns
Type Description
SubscriptionCost.Builder

This builder for chaining.

setPeriodLength(long value)

public SubscriptionCost.Builder setPeriodLength(long value)

The number of subscription periods the buyer has to pay.

int64 period_length = 2;

Parameter
Name Description
value long

The periodLength to set.

Returns
Type Description
SubscriptionCost.Builder

This builder for chaining.

setPeriodValue(int value)

public SubscriptionCost.Builder setPeriodValue(int value)

The type of subscription period. Supported values are:

  • "month"
  • "year"

.google.shopping.merchant.products.v1beta.SubscriptionPeriod period = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for period to set.

Returns
Type Description
SubscriptionCost.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SubscriptionCost.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SubscriptionCost.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SubscriptionCost.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SubscriptionCost.Builder
Overrides