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.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TransactionInfo
build()
TransactionInfo
buildPartial()
TransactionInfo.Builder
clear()
TransactionInfo.Builder
clearCost()
All the costs associated with the products.TransactionInfo.Builder
clearCurrency()
Required.TransactionInfo.Builder
clearDiscountValue()
The total discount(s) value applied to this transaction.TransactionInfo.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
TransactionInfo.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
TransactionInfo.Builder
clearTax()
All the taxes associated with the transaction.TransactionInfo.Builder
clearTransactionId()
The transaction ID with a length limit of 128 characters.TransactionInfo.Builder
clearValue()
Required.TransactionInfo.Builder
clone()
float
getCost()
All the costs associated with the products.String
getCurrency()
Required.com.google.protobuf.ByteString
getCurrencyBytes()
Required.TransactionInfo
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
float
getDiscountValue()
The total discount(s) value applied to this transaction.float
getTax()
All the taxes associated with the transaction.String
getTransactionId()
The transaction ID with a length limit of 128 characters.com.google.protobuf.ByteString
getTransactionIdBytes()
The transaction ID with a length limit of 128 characters.float
getValue()
Required.boolean
hasCost()
All the costs associated with the products.boolean
hasDiscountValue()
The total discount(s) value applied to this transaction.boolean
hasTax()
All the taxes associated with the transaction.boolean
hasValue()
Required.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
TransactionInfo.Builder
mergeFrom(TransactionInfo other)
TransactionInfo.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
TransactionInfo.Builder
mergeFrom(com.google.protobuf.Message other)
TransactionInfo.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
TransactionInfo.Builder
setCost(float value)
All the costs associated with the products.TransactionInfo.Builder
setCurrency(String value)
Required.TransactionInfo.Builder
setCurrencyBytes(com.google.protobuf.ByteString value)
Required.TransactionInfo.Builder
setDiscountValue(float value)
The total discount(s) value applied to this transaction.TransactionInfo.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
TransactionInfo.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
TransactionInfo.Builder
setTax(float value)
All the taxes associated with the transaction.TransactionInfo.Builder
setTransactionId(String value)
The transaction ID with a length limit of 128 characters.TransactionInfo.Builder
setTransactionIdBytes(com.google.protobuf.ByteString value)
The transaction ID with a length limit of 128 characters.TransactionInfo.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
TransactionInfo.Builder
setValue(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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
clear
public TransactionInfo.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<TransactionInfo.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<TransactionInfo.Builder>
-
getDefaultInstanceForType
public TransactionInfo getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public TransactionInfo build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public TransactionInfo buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public TransactionInfo.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<TransactionInfo.Builder>
-
setField
public TransactionInfo.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<TransactionInfo.Builder>
-
clearField
public TransactionInfo.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<TransactionInfo.Builder>
-
clearOneof
public TransactionInfo.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<TransactionInfo.Builder>
-
setRepeatedField
public TransactionInfo.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<TransactionInfo.Builder>
-
addRepeatedField
public TransactionInfo.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<TransactionInfo.Builder>
-
mergeFrom
public TransactionInfo.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<TransactionInfo.Builder>
-
mergeFrom
public TransactionInfo.Builder mergeFrom(TransactionInfo other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
hasValue
in 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:
getValue
in 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:
getCurrency
in 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:
getCurrencyBytes
in 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:
getTransactionId
in 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:
getTransactionIdBytes
in 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:
hasTax
in 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:
getTax
in 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:
hasCost
in 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:
getCost
in 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:
hasDiscountValue
in 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:
getDiscountValue
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
mergeUnknownFields
public final TransactionInfo.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<TransactionInfo.Builder>
-
-