Class TransactionInfo.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
- com.google.cloud.discoveryengine.v1.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.GeneratedMessageV3.Builder<TransactionInfo.Builder> implements TransactionInfoOrBuilder
A transaction represents the entire purchase transaction.
Protobuf typegoogle.cloud.discoveryengine.v1.TransactionInfo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionInfo.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)TransactionInfobuild()TransactionInfobuildPartial()TransactionInfo.Builderclear()TransactionInfo.BuilderclearCost()All the costs associated with the products.TransactionInfo.BuilderclearCurrency()Required.TransactionInfo.BuilderclearDiscountValue()The total discount(s) value applied to this transaction.TransactionInfo.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)TransactionInfo.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)TransactionInfo.BuilderclearTax()All the taxes associated with the transaction.TransactionInfo.BuilderclearTransactionId()The transaction ID with a length limit of 128 characters.TransactionInfo.BuilderclearValue()Required.TransactionInfo.Builderclone()floatgetCost()All the costs associated with the products.StringgetCurrency()Required.com.google.protobuf.ByteStringgetCurrencyBytes()Required.TransactionInfogetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()floatgetDiscountValue()The total discount(s) value applied to this transaction.floatgetTax()All the taxes associated with the transaction.StringgetTransactionId()The transaction ID with a length limit of 128 characters.com.google.protobuf.ByteStringgetTransactionIdBytes()The transaction ID with a length limit of 128 characters.floatgetValue()Required.booleanhasCost()All the costs associated with the products.booleanhasDiscountValue()The total discount(s) value applied to this transaction.booleanhasTax()All the taxes associated with the transaction.booleanhasValue()Required.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()TransactionInfo.BuildermergeFrom(TransactionInfo other)TransactionInfo.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)TransactionInfo.BuildermergeFrom(com.google.protobuf.Message other)TransactionInfo.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)TransactionInfo.BuildersetCost(float value)All the costs associated with the products.TransactionInfo.BuildersetCurrency(String value)Required.TransactionInfo.BuildersetCurrencyBytes(com.google.protobuf.ByteString value)Required.TransactionInfo.BuildersetDiscountValue(float value)The total discount(s) value applied to this transaction.TransactionInfo.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)TransactionInfo.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)TransactionInfo.BuildersetTax(float value)All the taxes associated with the transaction.TransactionInfo.BuildersetTransactionId(String value)The transaction ID with a length limit of 128 characters.TransactionInfo.BuildersetTransactionIdBytes(com.google.protobuf.ByteString value)The transaction ID with a length limit of 128 characters.TransactionInfo.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)TransactionInfo.BuildersetValue(float value)Required.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, 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()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
clear
public TransactionInfo.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
getDefaultInstanceForType
public TransactionInfo getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public TransactionInfo build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TransactionInfo buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TransactionInfo.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
setField
public TransactionInfo.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
clearField
public TransactionInfo.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
clearOneof
public TransactionInfo.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
setRepeatedField
public TransactionInfo.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
addRepeatedField
public TransactionInfo.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
mergeFrom
public TransactionInfo.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<TransactionInfo.Builder>
-
mergeFrom
public TransactionInfo.Builder mergeFrom(TransactionInfo other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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
public TransactionInfo.Builder setValue(float value)
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
public TransactionInfo.Builder 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
public String 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
public TransactionInfo.Builder setCurrency(String value)
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
public TransactionInfo.Builder clearCurrency()
Required. Currency code. Use three-character ISO-4217 code.
string currency = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setCurrencyBytes
public TransactionInfo.Builder setCurrencyBytes(com.google.protobuf.ByteString value)
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
public String 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
public TransactionInfo.Builder setTransactionId(String value)
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
public TransactionInfo.Builder clearTransactionId()
The transaction ID with a length limit of 128 characters.
string transaction_id = 3;- Returns:
- This builder for chaining.
-
setTransactionIdBytes
public TransactionInfo.Builder setTransactionIdBytes(com.google.protobuf.ByteString value)
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
public TransactionInfo.Builder setTax(float value)
All the taxes associated with the transaction.
optional float tax = 4;- Parameters:
value- The tax to set.- Returns:
- This builder for chaining.
-
clearTax
public TransactionInfo.Builder 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.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.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.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost]
optional float cost = 5;- Specified by:
getCostin interfaceTransactionInfoOrBuilder- Returns:
- The cost.
-
setCost
public TransactionInfo.Builder setCost(float value)
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.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost]
optional float cost = 5;- Parameters:
value- The cost to set.- Returns:
- This builder for chaining.
-
clearCost
public TransactionInfo.Builder 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.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.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.v1.TransactionInfo.value] For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.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.v1.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.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.v1.TransactionInfo.value] For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.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.v1.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost]
optional float discount_value = 6;- Specified by:
getDiscountValuein interfaceTransactionInfoOrBuilder- Returns:
- The discountValue.
-
setDiscountValue
public TransactionInfo.Builder setDiscountValue(float value)
The total discount(s) value applied to this transaction. This figure should be excluded from [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.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.v1.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost]
optional float discount_value = 6;- Parameters:
value- The discountValue to set.- Returns:
- This builder for chaining.
-
clearDiscountValue
public TransactionInfo.Builder clearDiscountValue()
The total discount(s) value applied to this transaction. This figure should be excluded from [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] For example, if a user paid [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] amount, then nominal (pre-discount) value of the transaction is the sum of [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value] and [TransactionInfo.discount_value][google.cloud.discoveryengine.v1.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.v1.TransactionInfo.discount_value] can be larger than [TransactionInfo.value][google.cloud.discoveryengine.v1.TransactionInfo.value]: * Profit = [value][google.cloud.discoveryengine.v1.TransactionInfo.value] - [tax][google.cloud.discoveryengine.v1.TransactionInfo.tax] - [cost][google.cloud.discoveryengine.v1.TransactionInfo.cost]
optional float discount_value = 6;- Returns:
- This builder for chaining.
-
setUnknownFields
public final TransactionInfo.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
mergeUnknownFields
public final TransactionInfo.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
-