Class SubscriptionCost (0.10.0)

public final class SubscriptionCost extends GeneratedMessageV3 implements SubscriptionCostOrBuilder

The SubscriptionCost of the product.

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

Static Fields

AMOUNT_FIELD_NUMBER

public static final int AMOUNT_FIELD_NUMBER
Field Value
Type Description
int

PERIOD_FIELD_NUMBER

public static final int PERIOD_FIELD_NUMBER
Field Value
Type Description
int

PERIOD_LENGTH_FIELD_NUMBER

public static final int PERIOD_LENGTH_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SubscriptionCost getDefaultInstance()
Returns
Type Description
SubscriptionCost

getDescriptor()

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

newBuilder()

public static SubscriptionCost.Builder newBuilder()
Returns
Type Description
SubscriptionCost.Builder

newBuilder(SubscriptionCost prototype)

public static SubscriptionCost.Builder newBuilder(SubscriptionCost prototype)
Parameter
Name Description
prototype SubscriptionCost
Returns
Type Description
SubscriptionCost.Builder

parseDelimitedFrom(InputStream input)

public static SubscriptionCost parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SubscriptionCost parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static SubscriptionCost parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SubscriptionCost parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SubscriptionCost parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SubscriptionCost parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SubscriptionCost parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SubscriptionCost parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static SubscriptionCost parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SubscriptionCost parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static SubscriptionCost parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SubscriptionCost parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SubscriptionCost
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<SubscriptionCost> parser()
Returns
Type Description
Parser<SubscriptionCost>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.

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

getParserForType()

public Parser<SubscriptionCost> getParserForType()
Returns
Type Description
Parser<SubscriptionCost>
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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public SubscriptionCost.Builder newBuilderForType()
Returns
Type Description
SubscriptionCost.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SubscriptionCost.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SubscriptionCost.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public SubscriptionCost.Builder toBuilder()
Returns
Type Description
SubscriptionCost.Builder

writeTo(CodedOutputStream output)

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