Class LineItem.Builder (0.5.0)

public static final class LineItem.Builder extends GeneratedMessageV3.Builder<LineItem.Builder> implements LineItemOrBuilder

A single item within an order.

Protobuf type google.cloud.commerce.consumer.procurement.v1alpha1.LineItem

Implements

LineItemOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllChangeHistory(Iterable<? extends LineItemChange> values)

public LineItem.Builder addAllChangeHistory(Iterable<? extends LineItemChange> values)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange>
Returns
TypeDescription
LineItem.Builder

addChangeHistory(LineItemChange value)

public LineItem.Builder addChangeHistory(LineItemChange value)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueLineItemChange
Returns
TypeDescription
LineItem.Builder

addChangeHistory(LineItemChange.Builder builderForValue)

public LineItem.Builder addChangeHistory(LineItemChange.Builder builderForValue)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueLineItemChange.Builder
Returns
TypeDescription
LineItem.Builder

addChangeHistory(int index, LineItemChange value)

public LineItem.Builder addChangeHistory(int index, LineItemChange value)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
valueLineItemChange
Returns
TypeDescription
LineItem.Builder

addChangeHistory(int index, LineItemChange.Builder builderForValue)

public LineItem.Builder addChangeHistory(int index, LineItemChange.Builder builderForValue)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
builderForValueLineItemChange.Builder
Returns
TypeDescription
LineItem.Builder

addChangeHistoryBuilder()

public LineItemChange.Builder addChangeHistoryBuilder()

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItemChange.Builder

addChangeHistoryBuilder(int index)

public LineItemChange.Builder addChangeHistoryBuilder(int index)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
LineItemChange.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public LineItem.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
LineItem.Builder
Overrides

build()

public LineItem build()
Returns
TypeDescription
LineItem

buildPartial()

public LineItem buildPartial()
Returns
TypeDescription
LineItem

clear()

public LineItem.Builder clear()
Returns
TypeDescription
LineItem.Builder
Overrides

clearChangeHistory()

public LineItem.Builder clearChangeHistory()

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItem.Builder

clearField(Descriptors.FieldDescriptor field)

public LineItem.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
LineItem.Builder
Overrides

clearLineItemId()

public LineItem.Builder clearLineItemId()

Output only. Line item ID.

string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItem.Builder

This builder for chaining.

clearLineItemInfo()

public LineItem.Builder clearLineItemInfo()

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItem.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public LineItem.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
LineItem.Builder
Overrides

clearPendingChange()

public LineItem.Builder clearPendingChange()

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItem.Builder

clone()

public LineItem.Builder clone()
Returns
TypeDescription
LineItem.Builder
Overrides

getChangeHistory(int index)

public LineItemChange getChangeHistory(int index)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
LineItemChange

getChangeHistoryBuilder(int index)

public LineItemChange.Builder getChangeHistoryBuilder(int index)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
LineItemChange.Builder

getChangeHistoryBuilderList()

public List<LineItemChange.Builder> getChangeHistoryBuilderList()

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<Builder>

getChangeHistoryCount()

public int getChangeHistoryCount()

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getChangeHistoryList()

public List<LineItemChange> getChangeHistoryList()

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<LineItemChange>

getChangeHistoryOrBuilder(int index)

public LineItemChangeOrBuilder getChangeHistoryOrBuilder(int index)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
LineItemChangeOrBuilder

getChangeHistoryOrBuilderList()

public List<? extends LineItemChangeOrBuilder> getChangeHistoryOrBuilderList()

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<? extends com.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeOrBuilder>

getDefaultInstanceForType()

public LineItem getDefaultInstanceForType()
Returns
TypeDescription
LineItem

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLineItemId()

public String getLineItemId()

Output only. Line item ID.

string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The lineItemId.

getLineItemIdBytes()

public ByteString getLineItemIdBytes()

Output only. Line item ID.

string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for lineItemId.

getLineItemInfo()

public LineItemInfo getLineItemInfo()

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItemInfo

The lineItemInfo.

getLineItemInfoBuilder()

public LineItemInfo.Builder getLineItemInfoBuilder()

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItemInfo.Builder

getLineItemInfoOrBuilder()

public LineItemInfoOrBuilder getLineItemInfoOrBuilder()

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItemInfoOrBuilder

getPendingChange()

public LineItemChange getPendingChange()

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItemChange

The pendingChange.

getPendingChangeBuilder()

public LineItemChange.Builder getPendingChangeBuilder()

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItemChange.Builder

getPendingChangeOrBuilder()

public LineItemChangeOrBuilder getPendingChangeOrBuilder()

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
LineItemChangeOrBuilder

hasLineItemInfo()

public boolean hasLineItemInfo()

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the lineItemInfo field is set.

hasPendingChange()

public boolean hasPendingChange()

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the pendingChange field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(LineItem other)

public LineItem.Builder mergeFrom(LineItem other)
Parameter
NameDescription
otherLineItem
Returns
TypeDescription
LineItem.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public LineItem.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LineItem.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public LineItem.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
LineItem.Builder
Overrides

mergeLineItemInfo(LineItemInfo value)

public LineItem.Builder mergeLineItemInfo(LineItemInfo value)

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueLineItemInfo
Returns
TypeDescription
LineItem.Builder

mergePendingChange(LineItemChange value)

public LineItem.Builder mergePendingChange(LineItemChange value)

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueLineItemChange
Returns
TypeDescription
LineItem.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LineItem.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
LineItem.Builder
Overrides

removeChangeHistory(int index)

public LineItem.Builder removeChangeHistory(int index)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
LineItem.Builder

setChangeHistory(int index, LineItemChange value)

public LineItem.Builder setChangeHistory(int index, LineItemChange value)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
valueLineItemChange
Returns
TypeDescription
LineItem.Builder

setChangeHistory(int index, LineItemChange.Builder builderForValue)

public LineItem.Builder setChangeHistory(int index, LineItemChange.Builder builderForValue)

Output only. Changes made on the item that are not pending anymore which might be because they already took effect, were reverted by the customer, or were rejected by the partner. No more operations are allowed on these changes.

repeated .google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
builderForValueLineItemChange.Builder
Returns
TypeDescription
LineItem.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public LineItem.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
LineItem.Builder
Overrides

setLineItemId(String value)

public LineItem.Builder setLineItemId(String value)

Output only. Line item ID.

string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The lineItemId to set.

Returns
TypeDescription
LineItem.Builder

This builder for chaining.

setLineItemIdBytes(ByteString value)

public LineItem.Builder setLineItemIdBytes(ByteString value)

Output only. Line item ID.

string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for lineItemId to set.

Returns
TypeDescription
LineItem.Builder

This builder for chaining.

setLineItemInfo(LineItemInfo value)

public LineItem.Builder setLineItemInfo(LineItemInfo value)

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueLineItemInfo
Returns
TypeDescription
LineItem.Builder

setLineItemInfo(LineItemInfo.Builder builderForValue)

public LineItem.Builder setLineItemInfo(LineItemInfo.Builder builderForValue)

Output only. Current state and information of this item. It tells what, e.g. which offer, is currently effective.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueLineItemInfo.Builder
Returns
TypeDescription
LineItem.Builder

setPendingChange(LineItemChange value)

public LineItem.Builder setPendingChange(LineItemChange value)

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueLineItemChange
Returns
TypeDescription
LineItem.Builder

setPendingChange(LineItemChange.Builder builderForValue)

public LineItem.Builder setPendingChange(LineItemChange.Builder builderForValue)

Output only. A change made on the item which is pending and not yet effective. Absence of this field indicates the line item is not undergoing a change.

.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueLineItemChange.Builder
Returns
TypeDescription
LineItem.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public LineItem.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
LineItem.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final LineItem.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
LineItem.Builder
Overrides