Class PurchaseTransaction.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<PurchaseTransaction.Builder>
implements PurchaseTransactionOrBuilder
A transaction represents the entire purchase transaction.Protobuf type
google.cloud.recommendationengine.v1beta1.PurchaseTransaction-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Required.clearId()Optional.Required.booleancontainsCosts(String key) Optional.booleancontainsTaxes(String key) Optional.getCosts()Deprecated.intOptional.Optional.floatgetCostsOrDefault(String key, float defaultValue) Optional.floatgetCostsOrThrow(String key) Optional.Required.com.google.protobuf.ByteStringRequired.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetId()Optional.com.google.protobuf.ByteStringOptional.Deprecated.Deprecated.floatRequired.getTaxes()Deprecated.intOptional.Optional.floatgetTaxesOrDefault(String key, float defaultValue) Optional.floatgetTaxesOrThrow(String key) Optional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(PurchaseTransaction other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) putAllCosts(Map<String, Float> values) Optional.putAllTaxes(Map<String, Float> values) Optional.Optional.Optional.removeCosts(String key) Optional.removeTaxes(String key) Optional.setCurrencyCode(String value) Required.setCurrencyCodeBytes(com.google.protobuf.ByteString value) Required.Optional.setIdBytes(com.google.protobuf.ByteString value) Optional.setRevenue(float value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<PurchaseTransaction.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<PurchaseTransaction.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<PurchaseTransaction.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<PurchaseTransaction.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<PurchaseTransaction.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PurchaseTransaction.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<PurchaseTransaction.Builder>
-
mergeFrom
public PurchaseTransaction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PurchaseTransaction.Builder>- Throws:
IOException
-
getId
Optional. The transaction ID with a length limit of 128 bytes.
string id = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getIdin 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:
getIdBytesin interfacePurchaseTransactionOrBuilder- Returns:
- The bytes for id.
-
setId
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
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
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:
getRevenuein interfacePurchaseTransactionOrBuilder- Returns:
- The revenue.
-
setRevenue
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
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:PurchaseTransactionOrBuilderOptional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTaxesCountin interfacePurchaseTransactionOrBuilder
-
containsTaxes
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
containsTaxesin interfacePurchaseTransactionOrBuilder
-
getTaxes
Deprecated.UsegetTaxesMap()instead.- Specified by:
getTaxesin interfacePurchaseTransactionOrBuilder
-
getTaxesMap
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTaxesMapin interfacePurchaseTransactionOrBuilder
-
getTaxesOrDefault
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTaxesOrDefaultin interfacePurchaseTransactionOrBuilder
-
getTaxesOrThrow
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getTaxesOrThrowin interfacePurchaseTransactionOrBuilder
-
clearTaxes
-
removeTaxes
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL]; -
getMutableTaxes
Deprecated.Use alternate mutation accessors instead. -
putTaxes
Optional. All the taxes associated with the transaction.
map<string, float> taxes = 3 [(.google.api.field_behavior) = OPTIONAL]; -
putAllTaxes
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:PurchaseTransactionOrBuilderOptional. 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:
getCostsCountin interfacePurchaseTransactionOrBuilder
-
containsCosts
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:
containsCostsin interfacePurchaseTransactionOrBuilder
-
getCosts
Deprecated.UsegetCostsMap()instead.- Specified by:
getCostsin interfacePurchaseTransactionOrBuilder
-
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:
getCostsMapin interfacePurchaseTransactionOrBuilder
-
getCostsOrDefault
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:
getCostsOrDefaultin interfacePurchaseTransactionOrBuilder
-
getCostsOrThrow
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:
getCostsOrThrowin interfacePurchaseTransactionOrBuilder
-
clearCosts
-
removeCosts
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.Use alternate mutation accessors instead. -
putCosts
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
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
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:
getCurrencyCodein 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:
getCurrencyCodeBytesin interfacePurchaseTransactionOrBuilder- Returns:
- The bytes for currencyCode.
-
setCurrencyCode
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
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
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.
-