Package com.google.cloud.retail.v2beta
Class PurchaseTransaction.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
- com.google.cloud.retail.v2beta.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.GeneratedMessageV3.Builder<PurchaseTransaction.Builder> implements PurchaseTransactionOrBuilder
A transaction represents the entire purchase transaction.
Protobuf typegoogle.cloud.retail.v2beta.PurchaseTransaction
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PurchaseTransaction.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)PurchaseTransactionbuild()PurchaseTransactionbuildPartial()PurchaseTransaction.Builderclear()PurchaseTransaction.BuilderclearCost()All the costs associated with the products.PurchaseTransaction.BuilderclearCurrencyCode()Required.PurchaseTransaction.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)PurchaseTransaction.BuilderclearId()The transaction ID with a length limit of 128 characters.PurchaseTransaction.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)PurchaseTransaction.BuilderclearRevenue()Required.PurchaseTransaction.BuilderclearTax()All the taxes associated with the transaction.PurchaseTransaction.Builderclone()floatgetCost()All the costs associated with the products.StringgetCurrencyCode()Required.com.google.protobuf.ByteStringgetCurrencyCodeBytes()Required.PurchaseTransactiongetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetId()The transaction ID with a length limit of 128 characters.com.google.protobuf.ByteStringgetIdBytes()The transaction ID with a length limit of 128 characters.floatgetRevenue()Required.floatgetTax()All the taxes associated with the transaction.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()PurchaseTransaction.BuildermergeFrom(PurchaseTransaction other)PurchaseTransaction.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)PurchaseTransaction.BuildermergeFrom(com.google.protobuf.Message other)PurchaseTransaction.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)PurchaseTransaction.BuildersetCost(float value)All the costs associated with the products.PurchaseTransaction.BuildersetCurrencyCode(String value)Required.PurchaseTransaction.BuildersetCurrencyCodeBytes(com.google.protobuf.ByteString value)Required.PurchaseTransaction.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)PurchaseTransaction.BuildersetId(String value)The transaction ID with a length limit of 128 characters.PurchaseTransaction.BuildersetIdBytes(com.google.protobuf.ByteString value)The transaction ID with a length limit of 128 characters.PurchaseTransaction.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)PurchaseTransaction.BuildersetRevenue(float value)Required.PurchaseTransaction.BuildersetTax(float value)All the taxes associated with the transaction.PurchaseTransaction.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
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<PurchaseTransaction.Builder>
-
clear
public PurchaseTransaction.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<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.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
getDefaultInstanceForType
public PurchaseTransaction getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public PurchaseTransaction build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public PurchaseTransaction buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public PurchaseTransaction.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<PurchaseTransaction.Builder>
-
setField
public PurchaseTransaction.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<PurchaseTransaction.Builder>
-
clearField
public PurchaseTransaction.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
clearOneof
public PurchaseTransaction.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
setRepeatedField
public PurchaseTransaction.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<PurchaseTransaction.Builder>
-
addRepeatedField
public PurchaseTransaction.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<PurchaseTransaction.Builder>
-
mergeFrom
public PurchaseTransaction.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PurchaseTransaction.Builder>
-
mergeFrom
public PurchaseTransaction.Builder mergeFrom(PurchaseTransaction other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.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
public String getId()
The transaction ID with a length limit of 128 characters.
string id = 1;- Specified by:
getIdin interfacePurchaseTransactionOrBuilder- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()
The transaction ID with a length limit of 128 characters.
string id = 1;- Specified by:
getIdBytesin interfacePurchaseTransactionOrBuilder- Returns:
- The bytes for id.
-
setId
public PurchaseTransaction.Builder setId(String value)
The transaction ID with a length limit of 128 characters.
string id = 1;- Parameters:
value- The id to set.- Returns:
- This builder for chaining.
-
clearId
public PurchaseTransaction.Builder clearId()
The transaction ID with a length limit of 128 characters.
string id = 1;- Returns:
- This builder for chaining.
-
setIdBytes
public PurchaseTransaction.Builder setIdBytes(com.google.protobuf.ByteString value)
The transaction ID with a length limit of 128 characters.
string id = 1;- Parameters:
value- The bytes for id to set.- Returns:
- This builder for chaining.
-
getRevenue
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];- Specified by:
getRevenuein interfacePurchaseTransactionOrBuilder- Returns:
- The revenue.
-
setRevenue
public 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];- Parameters:
value- The revenue to set.- Returns:
- This builder for chaining.
-
clearRevenue
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];- Returns:
- This builder for chaining.
-
getTax
public float getTax()
All the taxes associated with the transaction.
float tax = 3;- Specified by:
getTaxin interfacePurchaseTransactionOrBuilder- Returns:
- The tax.
-
setTax
public PurchaseTransaction.Builder setTax(float value)
All the taxes associated with the transaction.
float tax = 3;- Parameters:
value- The tax to set.- Returns:
- This builder for chaining.
-
clearTax
public PurchaseTransaction.Builder clearTax()
All the taxes associated with the transaction.
float tax = 3;- Returns:
- This builder for chaining.
-
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 = [revenue][google.cloud.retail.v2beta.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2beta.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2beta.PurchaseTransaction.cost]
float cost = 4;- Specified by:
getCostin interfacePurchaseTransactionOrBuilder- Returns:
- The cost.
-
setCost
public 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.v2beta.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2beta.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2beta.PurchaseTransaction.cost]
float cost = 4;- Parameters:
value- The cost to set.- Returns:
- This builder for chaining.
-
clearCost
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.v2beta.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2beta.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2beta.PurchaseTransaction.cost]
float cost = 4;- Returns:
- This builder for chaining.
-
getCurrencyCode
public String getCurrencyCode()
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.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.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getCurrencyCodeBytesin interfacePurchaseTransactionOrBuilder- Returns:
- The bytes for currencyCode.
-
setCurrencyCode
public PurchaseTransaction.Builder setCurrencyCode(String value)
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The currencyCode to set.- Returns:
- This builder for chaining.
-
clearCurrencyCode
public PurchaseTransaction.Builder clearCurrencyCode()
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setCurrencyCodeBytes
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];- Parameters:
value- The bytes for currencyCode to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final PurchaseTransaction.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
mergeUnknownFields
public final PurchaseTransaction.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<PurchaseTransaction.Builder>
-
-