Class Offer (3.25.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
TypeDescription
int

DEAL_CODE_FIELD_NUMBER

public static final int DEAL_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

END_TIME_FIELD_NUMBER

public static final int END_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

MARKETING_INFO_FIELD_NUMBER

public static final int MARKETING_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PARAMETER_DEFINITIONS_FIELD_NUMBER

public static final int PARAMETER_DEFINITIONS_FIELD_NUMBER
Field Value
TypeDescription
int

PLAN_FIELD_NUMBER

public static final int PLAN_FIELD_NUMBER
Field Value
TypeDescription
int

PRICE_BY_RESOURCES_FIELD_NUMBER

public static final int PRICE_BY_RESOURCES_FIELD_NUMBER
Field Value
TypeDescription
int

SKU_FIELD_NUMBER

public static final int SKU_FIELD_NUMBER
Field Value
TypeDescription
int

START_TIME_FIELD_NUMBER

public static final int START_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Offer getDefaultInstance()
Returns
TypeDescription
Offer

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Offer.Builder newBuilder()
Returns
TypeDescription
Offer.Builder

newBuilder(Offer prototype)

public static Offer.Builder newBuilder(Offer prototype)
Parameter
NameDescription
prototypeOffer
Returns
TypeDescription
Offer.Builder

parseDelimitedFrom(InputStream input)

public static Offer parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Offer
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Offer parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Offer
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Offer parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Offer
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Offer parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Offer
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Offer parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Offer
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Offer parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Offer
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Offer parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Offer
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Offer parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Offer
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Offer parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Offer
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Offer parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Offer
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Offer parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Offer
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Offer parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Offer
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Offer> parser()
Returns
TypeDescription
Parser<Offer>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getConstraints()

public Constraints getConstraints()

Constraints on transacting the Offer.

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

Returns
TypeDescription
Constraints

The constraints.

getConstraintsOrBuilder()

public ConstraintsOrBuilder getConstraintsOrBuilder()

Constraints on transacting the Offer.

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

Returns
TypeDescription
ConstraintsOrBuilder

getDealCode()

public String getDealCode()

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

string deal_code = 12;

Returns
TypeDescription
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
TypeDescription
ByteString

The bytes for dealCode.

getDefaultInstanceForType()

public Offer getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getMarketingInfo()

public MarketingInfo getMarketingInfo()

Marketing information for the Offer.

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

Returns
TypeDescription
MarketingInfo

The marketingInfo.

getMarketingInfoOrBuilder()

public MarketingInfoOrBuilder getMarketingInfoOrBuilder()

Marketing information for the Offer.

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

Returns
TypeDescription
MarketingInfoOrBuilder

getName()

public String getName()

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

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 1;

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ParameterDefinition

getParameterDefinitionsCount()

public int getParameterDefinitionsCount()

Parameters required to use current Offer to purchase.

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

Returns
TypeDescription
int

getParameterDefinitionsList()

public List<ParameterDefinition> getParameterDefinitionsList()

Parameters required to use current Offer to purchase.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.channel.v1.ParameterDefinitionOrBuilder>

getParserForType()

public Parser<Offer> getParserForType()
Returns
TypeDescription
Parser<Offer>
Overrides

getPlan()

public Plan getPlan()

Describes the payment plan for the Offer.

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

Returns
TypeDescription
Plan

The plan.

getPlanOrBuilder()

public PlanOrBuilder getPlanOrBuilder()

Describes the payment plan for the Offer.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PriceByResource

getPriceByResourcesCount()

public int getPriceByResourcesCount()

Price for each monetizable resource type.

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

Returns
TypeDescription
int

getPriceByResourcesList()

public List<PriceByResource> getPriceByResourcesList()

Price for each monetizable resource type.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PriceByResourceOrBuilder

getPriceByResourcesOrBuilderList()

public List<? extends PriceByResourceOrBuilder> getPriceByResourcesOrBuilderList()

Price for each monetizable resource type.

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

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSku()

public Sku getSku()

SKU the offer is associated with.

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

Returns
TypeDescription
Sku

The sku.

getSkuOrBuilder()

public SkuOrBuilder getSkuOrBuilder()

SKU the offer is associated with.

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

Returns
TypeDescription
SkuOrBuilder

getStartTime()

public Timestamp getStartTime()

Start of the Offer validity time.

.google.protobuf.Timestamp start_time = 7;

Returns
TypeDescription
Timestamp

The startTime.

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Start of the Offer validity time.

.google.protobuf.Timestamp start_time = 7;

Returns
TypeDescription
TimestampOrBuilder

hasConstraints()

public boolean hasConstraints()

Constraints on transacting the Offer.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the sku field is set.

hasStartTime()

public boolean hasStartTime()

Start of the Offer validity time.

.google.protobuf.Timestamp start_time = 7;

Returns
TypeDescription
boolean

Whether the startTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Offer.Builder newBuilderForType()
Returns
TypeDescription
Offer.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Offer.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Offer.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Offer.Builder toBuilder()
Returns
TypeDescription
Offer.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException