Class Offer (3.51.0)

public final class Offer extends GeneratedMessageV3 implements OfferOrBuilder

Represents an offer made to resellers for purchase. An offer is associated with a Sku, has a plan for payment, a price, and defines the constraints for buying.

Protobuf type google.cloud.channel.v1.Offer

Implements

OfferOrBuilder

Static Fields

CONSTRAINTS_FIELD_NUMBER

public static final int CONSTRAINTS_FIELD_NUMBER
Field Value
Type Description
int

DEAL_CODE_FIELD_NUMBER

public static final int DEAL_CODE_FIELD_NUMBER
Field Value
Type Description
int

END_TIME_FIELD_NUMBER

public static final int END_TIME_FIELD_NUMBER
Field Value
Type Description
int

MARKETING_INFO_FIELD_NUMBER

public static final int MARKETING_INFO_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PARAMETER_DEFINITIONS_FIELD_NUMBER

public static final int PARAMETER_DEFINITIONS_FIELD_NUMBER
Field Value
Type Description
int

PLAN_FIELD_NUMBER

public static final int PLAN_FIELD_NUMBER
Field Value
Type Description
int

PRICE_BY_RESOURCES_FIELD_NUMBER

public static final int PRICE_BY_RESOURCES_FIELD_NUMBER
Field Value
Type Description
int

SKU_FIELD_NUMBER

public static final int SKU_FIELD_NUMBER
Field Value
Type Description
int

START_TIME_FIELD_NUMBER

public static final int START_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Offer getDefaultInstance()
Returns
Type Description
Offer

getDescriptor()

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

newBuilder()

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

newBuilder(Offer prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getConstraints()

public Constraints getConstraints()

Constraints on transacting the Offer.

.google.cloud.channel.v1.Constraints constraints = 5;

Returns
Type Description
Constraints

The constraints.

getConstraintsOrBuilder()

public ConstraintsOrBuilder getConstraintsOrBuilder()

Constraints on transacting the Offer.

.google.cloud.channel.v1.Constraints constraints = 5;

Returns
Type Description
ConstraintsOrBuilder

getDealCode()

public String getDealCode()

The deal code of the offer to get a special promotion or discount.

string deal_code = 12;

Returns
Type Description
String

The dealCode.

getDealCodeBytes()

public ByteString getDealCodeBytes()

The deal code of the offer to get a special promotion or discount.

string deal_code = 12;

Returns
Type Description
ByteString

The bytes for dealCode.

getDefaultInstanceForType()

public Offer getDefaultInstanceForType()
Returns
Type Description
Offer

getEndTime()

public Timestamp getEndTime()

Output only. End of the Offer validity time.

.google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The endTime.

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

Output only. End of the Offer validity time.

.google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getMarketingInfo()

public MarketingInfo getMarketingInfo()

Marketing information for the Offer.

.google.cloud.channel.v1.MarketingInfo marketing_info = 2;

Returns
Type Description
MarketingInfo

The marketingInfo.

getMarketingInfoOrBuilder()

public MarketingInfoOrBuilder getMarketingInfoOrBuilder()

Marketing information for the Offer.

.google.cloud.channel.v1.MarketingInfo marketing_info = 2;

Returns
Type Description
MarketingInfoOrBuilder

getName()

public String getName()

Resource Name of the Offer. Format: accounts/{account_id}/offers/{offer_id}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource Name of the Offer. Format: accounts/{account_id}/offers/{offer_id}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParameterDefinitions(int index)

public ParameterDefinition getParameterDefinitions(int index)

Parameters required to use current Offer to purchase.

repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9;

Parameter
Name Description
index int
Returns
Type Description
ParameterDefinition

getParameterDefinitionsCount()

public int getParameterDefinitionsCount()

Parameters required to use current Offer to purchase.

repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9;

Returns
Type Description
int

getParameterDefinitionsList()

public List<ParameterDefinition> getParameterDefinitionsList()

Parameters required to use current Offer to purchase.

repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9;

Returns
Type Description
List<ParameterDefinition>

getParameterDefinitionsOrBuilder(int index)

public ParameterDefinitionOrBuilder getParameterDefinitionsOrBuilder(int index)

Parameters required to use current Offer to purchase.

repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9;

Parameter
Name Description
index int
Returns
Type Description
ParameterDefinitionOrBuilder

getParameterDefinitionsOrBuilderList()

public List<? extends ParameterDefinitionOrBuilder> getParameterDefinitionsOrBuilderList()

Parameters required to use current Offer to purchase.

repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9;

Returns
Type Description
List<? extends com.google.cloud.channel.v1.ParameterDefinitionOrBuilder>

getParserForType()

public Parser<Offer> getParserForType()
Returns
Type Description
Parser<Offer>
Overrides

getPlan()

public Plan getPlan()

Describes the payment plan for the Offer.

.google.cloud.channel.v1.Plan plan = 4;

Returns
Type Description
Plan

The plan.

getPlanOrBuilder()

public PlanOrBuilder getPlanOrBuilder()

Describes the payment plan for the Offer.

.google.cloud.channel.v1.Plan plan = 4;

Returns
Type Description
PlanOrBuilder

getPriceByResources(int index)

public PriceByResource getPriceByResources(int index)

Price for each monetizable resource type.

repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6;

Parameter
Name Description
index int
Returns
Type Description
PriceByResource

getPriceByResourcesCount()

public int getPriceByResourcesCount()

Price for each monetizable resource type.

repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6;

Returns
Type Description
int

getPriceByResourcesList()

public List<PriceByResource> getPriceByResourcesList()

Price for each monetizable resource type.

repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6;

Returns
Type Description
List<PriceByResource>

getPriceByResourcesOrBuilder(int index)

public PriceByResourceOrBuilder getPriceByResourcesOrBuilder(int index)

Price for each monetizable resource type.

repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6;

Parameter
Name Description
index int
Returns
Type Description
PriceByResourceOrBuilder

getPriceByResourcesOrBuilderList()

public List<? extends PriceByResourceOrBuilder> getPriceByResourcesOrBuilderList()

Price for each monetizable resource type.

repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6;

Returns
Type Description
List<? extends com.google.cloud.channel.v1.PriceByResourceOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSku()

public Sku getSku()

SKU the offer is associated with.

.google.cloud.channel.v1.Sku sku = 3;

Returns
Type Description
Sku

The sku.

getSkuOrBuilder()

public SkuOrBuilder getSkuOrBuilder()

SKU the offer is associated with.

.google.cloud.channel.v1.Sku sku = 3;

Returns
Type Description
SkuOrBuilder

getStartTime()

public Timestamp getStartTime()

Start of the Offer validity time.

.google.protobuf.Timestamp start_time = 7;

Returns
Type Description
Timestamp

The startTime.

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Start of the Offer validity time.

.google.protobuf.Timestamp start_time = 7;

Returns
Type Description
TimestampOrBuilder

hasConstraints()

public boolean hasConstraints()

Constraints on transacting the Offer.

.google.cloud.channel.v1.Constraints constraints = 5;

Returns
Type Description
boolean

Whether the constraints field is set.

hasEndTime()

public boolean hasEndTime()

Output only. End of the Offer validity time.

.google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the endTime field is set.

hasMarketingInfo()

public boolean hasMarketingInfo()

Marketing information for the Offer.

.google.cloud.channel.v1.MarketingInfo marketing_info = 2;

Returns
Type Description
boolean

Whether the marketingInfo field is set.

hasPlan()

public boolean hasPlan()

Describes the payment plan for the Offer.

.google.cloud.channel.v1.Plan plan = 4;

Returns
Type Description
boolean

Whether the plan field is set.

hasSku()

public boolean hasSku()

SKU the offer is associated with.

.google.cloud.channel.v1.Sku sku = 3;

Returns
Type Description
boolean

Whether the sku field is set.

hasStartTime()

public boolean hasStartTime()

Start of the Offer validity time.

.google.protobuf.Timestamp start_time = 7;

Returns
Type Description
boolean

Whether the startTime 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 Offer.Builder newBuilderForType()
Returns
Type Description
Offer.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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