Class TransactionInfo.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TransactionInfo.Builder>
com.google.cloud.discoveryengine.v1beta.TransactionInfo.Builder
- All Implemented Interfaces:
TransactionInfoOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- TransactionInfo
public static final class TransactionInfo.Builder
extends com.google.protobuf.GeneratedMessage.Builder<TransactionInfo.Builder>
implements TransactionInfoOrBuilder
A transaction represents the entire purchase transaction.Protobuf type
google.cloud.discoveryengine.v1beta.TransactionInfo-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()All the costs associated with the products.Required.The total discount(s) value applied to this transaction.clearTax()All the taxes associated with the transaction.The transaction ID with a length limit of 128 characters.Required.floatgetCost()All the costs associated with the products.Required.com.google.protobuf.ByteStringRequired.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorfloatThe total discount(s) value applied to this transaction.floatgetTax()All the taxes associated with the transaction.The transaction ID with a length limit of 128 characters.com.google.protobuf.ByteStringThe transaction ID with a length limit of 128 characters.floatgetValue()Required.booleanhasCost()All the costs associated with the products.booleanThe total discount(s) value applied to this transaction.booleanhasTax()All the taxes associated with the transaction.booleanhasValue()Required.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(TransactionInfo other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCost(float value) All the costs associated with the products.setCurrency(String value) Required.setCurrencyBytes(com.google.protobuf.ByteString value) Required.setDiscountValue(float value) The total discount(s) value applied to this transaction.setTax(float value) All the taxes associated with the transaction.setTransactionId(String value) The transaction ID with a length limit of 128 characters.setTransactionIdBytes(com.google.protobuf.ByteString value) The transaction ID with a length limit of 128 characters.setValue(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, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<TransactionInfo.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<TransactionInfo.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<TransactionInfo.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<TransactionInfo.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<TransactionInfo.Builder>
-
mergeFrom
public TransactionInfo.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<TransactionInfo.Builder>- Throws:
IOException
-
hasValue
public boolean hasValue()Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.
optional float value = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
hasValuein interfaceTransactionInfoOrBuilder- Returns:
- Whether the value field is set.
-
getValue
public float getValue()Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.
optional float value = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getValuein interfaceTransactionInfoOrBuilder- Returns:
- The value.
-
setValue
Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.
optional float value = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The value to set.- Returns:
- This builder for chaining.
-
clearValue
Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.
optional float value = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
getCurrency
Required. Currency code. Use three-character ISO-4217 code.
string currency = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getCurrencyin interfaceTransactionInfoOrBuilder- Returns:
- The currency.
-
getCurrencyBytes
public com.google.protobuf.ByteString getCurrencyBytes()Required. Currency code. Use three-character ISO-4217 code.
string currency = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getCurrencyBytesin interfaceTransactionInfoOrBuilder- Returns:
- The bytes for currency.
-
setCurrency
Required. Currency code. Use three-character ISO-4217 code.
string currency = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The currency to set.- Returns:
- This builder for chaining.
-
clearCurrency
Required. Currency code. Use three-character ISO-4217 code.
string currency = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setCurrencyBytes
Required. Currency code. Use three-character ISO-4217 code.
string currency = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for currency to set.- Returns:
- This builder for chaining.
-
getTransactionId
The transaction ID with a length limit of 128 characters.
string transaction_id = 3;- Specified by:
getTransactionIdin interfaceTransactionInfoOrBuilder- Returns:
- The transactionId.
-
getTransactionIdBytes
public com.google.protobuf.ByteString getTransactionIdBytes()The transaction ID with a length limit of 128 characters.
string transaction_id = 3;- Specified by:
getTransactionIdBytesin interfaceTransactionInfoOrBuilder- Returns:
- The bytes for transactionId.
-
setTransactionId
The transaction ID with a length limit of 128 characters.
string transaction_id = 3;- Parameters:
value- The transactionId to set.- Returns:
- This builder for chaining.
-
clearTransactionId
The transaction ID with a length limit of 128 characters.
string transaction_id = 3;- Returns:
- This builder for chaining.
-
setTransactionIdBytes
The transaction ID with a length limit of 128 characters.
string transaction_id = 3;- Parameters:
value- The bytes for transactionId to set.- Returns:
- This builder for chaining.
-
hasTax
public boolean hasTax()All the taxes associated with the transaction.
optional float tax = 4;- Specified by:
hasTaxin interfaceTransactionInfoOrBuilder- Returns:
- Whether the tax field is set.
-
getTax
public float getTax()All the taxes associated with the transaction.
optional float tax = 4;- Specified by:
getTaxin interfaceTransactionInfoOrBuilder- Returns:
- The tax.
-
setTax
All the taxes associated with the transaction.
optional float tax = 4;- Parameters:
value- The tax to set.- Returns:
- This builder for chaining.
-
clearTax
All the taxes associated with the transaction.
optional float tax = 4;- Returns:
- This builder for chaining.
-
hasCost
public boolean hasCost()All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float cost = 5;- Specified by:
hasCostin interfaceTransactionInfoOrBuilder- Returns:
- Whether the cost field is set.
-
getCost
public float getCost()All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float cost = 5;- Specified by:
getCostin interfaceTransactionInfoOrBuilder- Returns:
- The cost.
-
setCost
All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float cost = 5;- Parameters:
value- The cost to set.- Returns:
- This builder for chaining.
-
clearCost
All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float cost = 5;- Returns:
- This builder for chaining.
-
hasDiscountValue
public boolean hasDiscountValue()The total discount(s) value applied to this transaction. This figure should be excluded from [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] This means that profit is calculated the same way, regardless of the discount value, and that [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float discount_value = 6;- Specified by:
hasDiscountValuein interfaceTransactionInfoOrBuilder- Returns:
- Whether the discountValue field is set.
-
getDiscountValue
public float getDiscountValue()The total discount(s) value applied to this transaction. This figure should be excluded from [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] This means that profit is calculated the same way, regardless of the discount value, and that [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float discount_value = 6;- Specified by:
getDiscountValuein interfaceTransactionInfoOrBuilder- Returns:
- The discountValue.
-
setDiscountValue
The total discount(s) value applied to this transaction. This figure should be excluded from [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] This means that profit is calculated the same way, regardless of the discount value, and that [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float discount_value = 6;- Parameters:
value- The discountValue to set.- Returns:
- This builder for chaining.
-
clearDiscountValue
The total discount(s) value applied to this transaction. This figure should be excluded from [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] This means that profit is calculated the same way, regardless of the discount value, and that [TransactionInfo.discount_value][google.cloud.discoveryengine.v1beta.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1beta.TransactionInfo.value]: * Profit = [value][google.cloud.discoveryengine.v1beta.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1beta.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1beta.TransactionInfo.cost]
optional float discount_value = 6;- Returns:
- This builder for chaining.
-