Package com.google.cloud.retail.v2alpha
Class PurchaseTransaction.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PurchaseTransaction.Builder>
com.google.cloud.retail.v2alpha.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.GeneratedMessage.Builder<PurchaseTransaction.Builder>
implements PurchaseTransactionOrBuilder
A transaction represents the entire purchase transaction.Protobuf type
google.cloud.retail.v2alpha.PurchaseTransaction-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()All the costs associated with the products.Required.clearId()The transaction ID with a length limit of 128 characters.Required.clearTax()All the taxes associated with the transaction.floatgetCost()All the costs associated with the products.Required.com.google.protobuf.ByteStringRequired.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetId()The transaction ID with a length limit of 128 characters.com.google.protobuf.ByteStringThe transaction ID with a length limit of 128 characters.floatRequired.floatgetTax()All the taxes associated with the transaction.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(PurchaseTransaction 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.setCurrencyCode(String value) Required.setCurrencyCodeBytes(com.google.protobuf.ByteString value) Required.The transaction ID with a length limit of 128 characters.setIdBytes(com.google.protobuf.ByteString value) The transaction ID with a length limit of 128 characters.setRevenue(float value) Required.setTax(float value) All the taxes associated with the transaction.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<PurchaseTransaction.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<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.GeneratedMessage.Builder<PurchaseTransaction.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<PurchaseTransaction.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.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
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
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
The transaction ID with a length limit of 128 characters.
string id = 1;- Returns:
- This builder for chaining.
-
setIdBytes
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
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
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
All the taxes associated with the transaction.
float tax = 3;- Parameters:
value- The tax to set.- Returns:
- This builder for chaining.
-
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.v2alpha.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2alpha.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2alpha.PurchaseTransaction.cost]
float cost = 4;- Specified by:
getCostin interfacePurchaseTransactionOrBuilder- 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 = [revenue][google.cloud.retail.v2alpha.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2alpha.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2alpha.PurchaseTransaction.cost]
float cost = 4;- 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 = [revenue][google.cloud.retail.v2alpha.PurchaseTransaction.revenue] - [tax][google.cloud.retail.v2alpha.PurchaseTransaction.tax] - [cost][google.cloud.retail.v2alpha.PurchaseTransaction.cost]
float cost = 4;- Returns:
- This builder for chaining.
-
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
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
Required. Currency code. Use three-character ISO-4217 code.
string currency_code = 5 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setCurrencyCodeBytes
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.
-