Class PurchaseTransaction.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
- com.google.cloud.recommendationengine.v1beta1.PurchaseTransaction.Builder
-
- All Implemented Interfaces:
PurchaseTransactionOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- PurchaseTransaction
public static final class PurchaseTransaction.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder> implements PurchaseTransactionOrBuilder
A transaction represents the entire purchase transaction.
Protobuf typegoogle.cloud.recommendationengine.v1beta1.PurchaseTransaction
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
clear
public PurchaseTransaction.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
getDefaultInstanceForType
public PurchaseTransaction getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public PurchaseTransaction build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public PurchaseTransaction buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public PurchaseTransaction.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
setField
public PurchaseTransaction.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
clearField
public PurchaseTransaction.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
clearOneof
public PurchaseTransaction.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
setRepeatedField
public PurchaseTransaction.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
addRepeatedField
public PurchaseTransaction.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
mergeFrom
public PurchaseTransaction.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<PurchaseTransaction.Builder>
-
mergeFrom
public PurchaseTransaction.Builder mergeFrom(PurchaseTransaction other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
mergeFrom
public PurchaseTransaction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<PurchaseTransaction.Builder>
- Throws:
IOException
-
getId
public String getId()
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getId
in interfacePurchaseTransactionOrBuilder
- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getIdBytes
in interfacePurchaseTransactionOrBuilder
- Returns:
- The bytes for id.
-
setId
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];
- Parameters:
value
- The id to set.- Returns:
- This builder for chaining.
-
clearId
public PurchaseTransaction.Builder clearId()
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
setIdBytes
public PurchaseTransaction.Builder setIdBytes(com.google.protobuf.ByteString value)
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The bytes for id to set.- Returns:
- This builder for chaining.
-
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];
- Specified by:
getRevenue
in interfacePurchaseTransactionOrBuilder
- Returns:
- The revenue.
-
setRevenue
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];
- Parameters:
value
- The revenue to set.- Returns:
- This builder for chaining.
-
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];
- Returns:
- This builder for chaining.
-
getTaxesCount
public int getTaxesCount()
Description copied from interface:PurchaseTransactionOrBuilder
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getTaxesCount
in interfacePurchaseTransactionOrBuilder
-
containsTaxes
public boolean containsTaxes(String key)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
containsTaxes
in interfacePurchaseTransactionOrBuilder
-
getTaxes
@Deprecated public Map<String,Float> getTaxes()
Deprecated.UsegetTaxesMap()
instead.- Specified by:
getTaxes
in interfacePurchaseTransactionOrBuilder
-
getTaxesMap
public Map<String,Float> getTaxesMap()
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getTaxesMap
in interfacePurchaseTransactionOrBuilder
-
getTaxesOrDefault
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];
- Specified by:
getTaxesOrDefault
in interfacePurchaseTransactionOrBuilder
-
getTaxesOrThrow
public float getTaxesOrThrow(String key)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getTaxesOrThrow
in interfacePurchaseTransactionOrBuilder
-
clearTaxes
public PurchaseTransaction.Builder clearTaxes()
-
removeTaxes
public PurchaseTransaction.Builder removeTaxes(String key)
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];
-
getMutableTaxes
@Deprecated public Map<String,Float> getMutableTaxes()
Deprecated.Use alternate mutation accessors instead.
-
putTaxes
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];
-
putAllTaxes
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];
-
getCostsCount
public int getCostsCount()
Description copied from interface:PurchaseTransactionOrBuilder
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];
- Specified by:
getCostsCount
in interfacePurchaseTransactionOrBuilder
-
containsCosts
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];
- Specified by:
containsCosts
in interfacePurchaseTransactionOrBuilder
-
getCosts
@Deprecated public Map<String,Float> getCosts()
Deprecated.UsegetCostsMap()
instead.- Specified by:
getCosts
in interfacePurchaseTransactionOrBuilder
-
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];
- Specified by:
getCostsMap
in interfacePurchaseTransactionOrBuilder
-
getCostsOrDefault
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];
- Specified by:
getCostsOrDefault
in interfacePurchaseTransactionOrBuilder
-
getCostsOrThrow
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];
- Specified by:
getCostsOrThrow
in interfacePurchaseTransactionOrBuilder
-
clearCosts
public PurchaseTransaction.Builder clearCosts()
-
removeCosts
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];
-
getMutableCosts
@Deprecated public Map<String,Float> getMutableCosts()
Deprecated.Use alternate mutation accessors instead.
-
putCosts
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];
-
putAllCosts
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];
-
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];
- Specified by:
getCurrencyCode
in interfacePurchaseTransactionOrBuilder
- Returns:
- The currencyCode.
-
getCurrencyCodeBytes
public com.google.protobuf.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];
- Specified by:
getCurrencyCodeBytes
in interfacePurchaseTransactionOrBuilder
- Returns:
- The bytes for currencyCode.
-
setCurrencyCode
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];
- Parameters:
value
- The currencyCode to set.- Returns:
- This builder for chaining.
-
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];
- Returns:
- This builder for chaining.
-
setCurrencyCodeBytes
public PurchaseTransaction.Builder setCurrencyCodeBytes(com.google.protobuf.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];
- Parameters:
value
- The bytes for currencyCode to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final PurchaseTransaction.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
mergeUnknownFields
public final PurchaseTransaction.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
-