public static final class PurchaseTransaction.Builder extends GeneratedMessageV3.Builder<PurchaseTransaction.Builder> implements PurchaseTransactionOrBuilder
A transaction represents the entire purchase transaction.
Protobuf type google.cloud.recommendationengine.v1beta1.PurchaseTransaction
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PurchaseTransaction.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public PurchaseTransaction build()
buildPartial()
public PurchaseTransaction buildPartial()
clear()
public PurchaseTransaction.Builder clear()
Overrides
clearCosts()
public PurchaseTransaction.Builder clearCosts()
clearCurrencyCode()
public PurchaseTransaction.Builder clearCurrencyCode()
Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund
.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
clearField(Descriptors.FieldDescriptor field)
public PurchaseTransaction.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearId()
public PurchaseTransaction.Builder clearId()
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
clearOneof(Descriptors.OneofDescriptor oneof)
public PurchaseTransaction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearRevenue()
public PurchaseTransaction.Builder clearRevenue()
Required. Total revenue or grand total associated with the transaction.
This value include shipping, tax, or other adjustments to total revenue
that you want to include as part of your revenue calculations. This field
is not required if the event type is refund
.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];
clearTaxes()
public PurchaseTransaction.Builder clearTaxes()
clone()
public PurchaseTransaction.Builder clone()
Overrides
containsCosts(String key)
public boolean containsCosts(String key)
Optional. All the costs associated with the product. These can be
manufacturing costs, shipping expenses not borne by the end user, or any
other costs.
Total product cost such that
profit = revenue - (sum(taxes) + sum(costs))
If product_cost is not set, then
profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
key | String
|
containsTaxes(String key)
public boolean containsTaxes(String key)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
key | String
|
getCosts()
public Map<String,Float> getCosts()
getCostsCount()
public int getCostsCount()
Optional. All the costs associated with the product. These can be
manufacturing costs, shipping expenses not borne by the end user, or any
other costs.
Total product cost such that
profit = revenue - (sum(taxes) + sum(costs))
If product_cost is not set, then
profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
int | |
getCostsMap()
public Map<String,Float> getCostsMap()
Optional. All the costs associated with the product. These can be
manufacturing costs, shipping expenses not borne by the end user, or any
other costs.
Total product cost such that
profit = revenue - (sum(taxes) + sum(costs))
If product_cost is not set, then
profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
getCostsOrDefault(String key, float defaultValue)
public float getCostsOrDefault(String key, float defaultValue)
Optional. All the costs associated with the product. These can be
manufacturing costs, shipping expenses not borne by the end user, or any
other costs.
Total product cost such that
profit = revenue - (sum(taxes) + sum(costs))
If product_cost is not set, then
profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
float | |
getCostsOrThrow(String key)
public float getCostsOrThrow(String key)
Optional. All the costs associated with the product. These can be
manufacturing costs, shipping expenses not borne by the end user, or any
other costs.
Total product cost such that
profit = revenue - (sum(taxes) + sum(costs))
If product_cost is not set, then
profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
key | String
|
Returns |
---|
Type | Description |
float | |
getCurrencyCode()
public String getCurrencyCode()
Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund
.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
String | The currencyCode.
|
getCurrencyCodeBytes()
public ByteString getCurrencyCodeBytes()
Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund
.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
ByteString | The bytes for currencyCode.
|
getDefaultInstanceForType()
public PurchaseTransaction getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getId()
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
String | The id.
|
getIdBytes()
public ByteString getIdBytes()
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
getMutableCosts()
public Map<String,Float> getMutableCosts()
Use alternate mutation accessors instead.
getMutableTaxes()
public Map<String,Float> getMutableTaxes()
Use alternate mutation accessors instead.
getRevenue()
public float getRevenue()
Required. Total revenue or grand total associated with the transaction.
This value include shipping, tax, or other adjustments to total revenue
that you want to include as part of your revenue calculations. This field
is not required if the event type is refund
.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
---|
Type | Description |
float | The revenue.
|
getTaxes()
public Map<String,Float> getTaxes()
getTaxesCount()
public int getTaxesCount()
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
int | |
getTaxesMap()
public Map<String,Float> getTaxesMap()
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
getTaxesOrDefault(String key, float defaultValue)
public float getTaxesOrDefault(String key, float defaultValue)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
---|
Type | Description |
float | |
getTaxesOrThrow(String key)
public float getTaxesOrThrow(String key)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
key | String
|
Returns |
---|
Type | Description |
float | |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(PurchaseTransaction other)
public PurchaseTransaction.Builder mergeFrom(PurchaseTransaction other)
public PurchaseTransaction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public PurchaseTransaction.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PurchaseTransaction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
putAllCosts(Map<String,Float> values)
public PurchaseTransaction.Builder putAllCosts(Map<String,Float> values)
Optional. All the costs associated with the product. These can be
manufacturing costs, shipping expenses not borne by the end user, or any
other costs.
Total product cost such that
profit = revenue - (sum(taxes) + sum(costs))
If product_cost is not set, then
profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
putAllTaxes(Map<String,Float> values)
public PurchaseTransaction.Builder putAllTaxes(Map<String,Float> values)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
putCosts(String key, float value)
public PurchaseTransaction.Builder putCosts(String key, float value)
Optional. All the costs associated with the product. These can be
manufacturing costs, shipping expenses not borne by the end user, or any
other costs.
Total product cost such that
profit = revenue - (sum(taxes) + sum(costs))
If product_cost is not set, then
profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
putTaxes(String key, float value)
public PurchaseTransaction.Builder putTaxes(String key, float value)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
removeCosts(String key)
public PurchaseTransaction.Builder removeCosts(String key)
Optional. All the costs associated with the product. These can be
manufacturing costs, shipping expenses not borne by the end user, or any
other costs.
Total product cost such that
profit = revenue - (sum(taxes) + sum(costs))
If product_cost is not set, then
profit = revenue - tax - shipping - sum(CatalogItem.costs).
If CatalogItem.cost is not specified for one of the items, CatalogItem.cost
based profit cannot be calculated for this Transaction.
map<string, float> costs = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
key | String
|
removeTaxes(String key)
public PurchaseTransaction.Builder removeTaxes(String key)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
key | String
|
setCurrencyCode(String value)
public PurchaseTransaction.Builder setCurrencyCode(String value)
Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund
.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
Parameter |
---|
Name | Description |
value | String
The currencyCode to set.
|
setCurrencyCodeBytes(ByteString value)
public PurchaseTransaction.Builder setCurrencyCodeBytes(ByteString value)
Required. Currency code. Use three-character ISO-4217 code. This field
is not required if the event type is refund
.
string currency_code = 6 [(.google.api.field_behavior) = REQUIRED];
Parameter |
---|
Name | Description |
value | ByteString
The bytes for currencyCode to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public PurchaseTransaction.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setId(String value)
public PurchaseTransaction.Builder setId(String value)
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
value | String
The id to set.
|
setIdBytes(ByteString value)
public PurchaseTransaction.Builder setIdBytes(ByteString value)
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
---|
Name | Description |
value | ByteString
The bytes for id to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PurchaseTransaction.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setRevenue(float value)
public PurchaseTransaction.Builder setRevenue(float value)
Required. Total revenue or grand total associated with the transaction.
This value include shipping, tax, or other adjustments to total revenue
that you want to include as part of your revenue calculations. This field
is not required if the event type is refund
.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter |
---|
Name | Description |
value | float
The revenue to set.
|
setUnknownFields(UnknownFieldSet unknownFields)
public final PurchaseTransaction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides