public static final class PurchaseTransaction.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder> implements PurchaseTransactionOrBuilder
A transaction represents the entire purchase transaction.Protobuf type
google.cloud.retail.v2alpha.PurchaseTransaction| Modifier and Type | Method and Description |
|---|---|
PurchaseTransaction.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
PurchaseTransaction |
build() |
PurchaseTransaction |
buildPartial() |
PurchaseTransaction.Builder |
clear() |
PurchaseTransaction.Builder |
clearCost()
All the costs associated with the products.
|
PurchaseTransaction.Builder |
clearCurrencyCode()
Required.
|
PurchaseTransaction.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
PurchaseTransaction.Builder |
clearId()
The transaction ID with a length limit of 128 characters.
|
PurchaseTransaction.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
PurchaseTransaction.Builder |
clearRevenue()
Required.
|
PurchaseTransaction.Builder |
clearTax()
All the taxes associated with the transaction.
|
PurchaseTransaction.Builder |
clone() |
float |
getCost()
All the costs associated with the products.
|
String |
getCurrencyCode()
Required.
|
com.google.protobuf.ByteString |
getCurrencyCodeBytes()
Required.
|
PurchaseTransaction |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getId()
The transaction ID with a length limit of 128 characters.
|
com.google.protobuf.ByteString |
getIdBytes()
The transaction ID with a length limit of 128 characters.
|
float |
getRevenue()
Required.
|
float |
getTax()
All the taxes associated with the transaction.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
PurchaseTransaction.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
PurchaseTransaction.Builder |
mergeFrom(com.google.protobuf.Message other) |
PurchaseTransaction.Builder |
mergeFrom(PurchaseTransaction other) |
PurchaseTransaction.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
PurchaseTransaction.Builder |
setCost(float value)
All the costs associated with the products.
|
PurchaseTransaction.Builder |
setCurrencyCode(String value)
Required.
|
PurchaseTransaction.Builder |
setCurrencyCodeBytes(com.google.protobuf.ByteString value)
Required.
|
PurchaseTransaction.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
PurchaseTransaction.Builder |
setId(String value)
The transaction ID with a length limit of 128 characters.
|
PurchaseTransaction.Builder |
setIdBytes(com.google.protobuf.ByteString value)
The transaction ID with a length limit of 128 characters.
|
PurchaseTransaction.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
PurchaseTransaction.Builder |
setRevenue(float value)
Required.
|
PurchaseTransaction.Builder |
setTax(float value)
All the taxes associated with the transaction.
|
PurchaseTransaction.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic PurchaseTransaction build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic PurchaseTransaction buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic PurchaseTransaction.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder mergeFrom(PurchaseTransaction other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public PurchaseTransaction.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<PurchaseTransaction.Builder>IOExceptionpublic String getId()
The transaction ID with a length limit of 128 characters.
string id = 1;getId in interface PurchaseTransactionOrBuilderpublic com.google.protobuf.ByteString getIdBytes()
The transaction ID with a length limit of 128 characters.
string id = 1;getIdBytes in interface PurchaseTransactionOrBuilderpublic PurchaseTransaction.Builder setId(String value)
The transaction ID with a length limit of 128 characters.
string id = 1;value - The id to set.public PurchaseTransaction.Builder clearId()
The transaction ID with a length limit of 128 characters.
string id = 1;public PurchaseTransaction.Builder setIdBytes(com.google.protobuf.ByteString value)
The transaction ID with a length limit of 128 characters.
string id = 1;value - The bytes for id to set.public float getRevenue()
Required. Total non-zero 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.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];getRevenue in interface PurchaseTransactionOrBuilderpublic PurchaseTransaction.Builder setRevenue(float value)
Required. Total non-zero 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.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];value - The revenue to set.public PurchaseTransaction.Builder clearRevenue()
Required. Total non-zero 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.
float revenue = 2 [(.google.api.field_behavior) = REQUIRED];public float getTax()
All the taxes associated with the transaction.
float tax = 3;getTax in interface PurchaseTransactionOrBuilderpublic PurchaseTransaction.Builder setTax(float value)
All the taxes associated with the transaction.
float tax = 3;value - The tax to set.public PurchaseTransaction.Builder clearTax()
All the taxes associated with the transaction.
float tax = 3;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 = [revenue][google.cloud.retail.v2alpha.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2alpha.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2alpha.PurchaseTransaction.cost]
float cost = 4;getCost in interface PurchaseTransactionOrBuilderpublic PurchaseTransaction.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 = [revenue][google.cloud.retail.v2alpha.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2alpha.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2alpha.PurchaseTransaction.cost]
float cost = 4;value - The cost to set.public PurchaseTransaction.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 = [revenue][google.cloud.retail.v2alpha.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2alpha.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2alpha.PurchaseTransaction.cost]
float cost = 4;public String getCurrencyCode()
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];getCurrencyCode in interface PurchaseTransactionOrBuilderpublic com.google.protobuf.ByteString getCurrencyCodeBytes()
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];getCurrencyCodeBytes in interface PurchaseTransactionOrBuilderpublic PurchaseTransaction.Builder setCurrencyCode(String value)
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];value - The currencyCode to set.public PurchaseTransaction.Builder clearCurrencyCode()
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];public PurchaseTransaction.Builder setCurrencyCodeBytes(com.google.protobuf.ByteString value)
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];value - The bytes for currencyCode to set.public final PurchaseTransaction.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>public final PurchaseTransaction.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>Copyright © 2024 Google LLC. All rights reserved.