Class LineItem.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<LineItem.Builder>
com.google.cloud.commerce.consumer.procurement.v1.LineItem.Builder
All Implemented Interfaces:
LineItemOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
LineItem

public static final class LineItem.Builder extends com.google.protobuf.GeneratedMessage.Builder<LineItem.Builder> implements LineItemOrBuilder
 A single item within an order.
 
Protobuf type google.cloud.commerce.consumer.procurement.v1.LineItem
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<LineItem.Builder>
    • clear

      public LineItem.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<LineItem.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<LineItem.Builder>
    • getDefaultInstanceForType

      public LineItem getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public LineItem build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public LineItem buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public LineItem.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LineItem.Builder>
    • mergeFrom

      public LineItem.Builder mergeFrom(LineItem other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<LineItem.Builder>
    • mergeFrom

      public LineItem.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LineItem.Builder>
      Throws:
      IOException
    • getLineItemId

      public String getLineItemId()
       Output only. Line item ID.
       
      string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLineItemId in interface LineItemOrBuilder
      Returns:
      The lineItemId.
    • getLineItemIdBytes

      public com.google.protobuf.ByteString getLineItemIdBytes()
       Output only. Line item ID.
       
      string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLineItemIdBytes in interface LineItemOrBuilder
      Returns:
      The bytes for lineItemId.
    • setLineItemId

      public LineItem.Builder setLineItemId(String value)
       Output only. Line item ID.
       
      string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The lineItemId to set.
      Returns:
      This builder for chaining.
    • clearLineItemId

      public LineItem.Builder clearLineItemId()
       Output only. Line item ID.
       
      string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setLineItemIdBytes

      public LineItem.Builder setLineItemIdBytes(com.google.protobuf.ByteString value)
       Output only. Line item ID.
       
      string line_item_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for lineItemId to set.
      Returns:
      This builder for chaining.
    • 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.v1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasLineItemInfo in interface LineItemOrBuilder
      Returns:
      Whether the lineItemInfo field is set.
    • 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.v1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLineItemInfo in interface LineItemOrBuilder
      Returns:
      The lineItemInfo.
    • setLineItemInfo

      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.v1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setLineItemInfo

      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.v1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeLineItemInfo

      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.v1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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.v1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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.v1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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.v1.LineItemInfo line_item_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLineItemInfoOrBuilder in interface LineItemOrBuilder
    • 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.v1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasPendingChange in interface LineItemOrBuilder
      Returns:
      Whether the pendingChange field is set.
    • 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.v1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPendingChange in interface LineItemOrBuilder
      Returns:
      The pendingChange.
    • setPendingChange

      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.v1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setPendingChange

      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.v1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergePendingChange

      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.v1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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.v1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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.v1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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.v1.LineItemChange pending_change = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPendingChangeOrBuilder in interface LineItemOrBuilder
    • 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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChangeHistoryList in interface LineItemOrBuilder
    • 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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChangeHistoryCount in interface LineItemOrBuilder
    • getChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChangeHistory in interface LineItemOrBuilder
    • setChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addAllChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • removeChangeHistory

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getChangeHistoryBuilder

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getChangeHistoryOrBuilder

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChangeHistoryOrBuilder in interface LineItemOrBuilder
    • 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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getChangeHistoryOrBuilderList in interface LineItemOrBuilder
    • 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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • addChangeHistoryBuilder

      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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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.v1.LineItemChange change_history = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];