Class SkippedShipment.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SkippedShipment.Builder>
com.google.cloud.optimization.v1.SkippedShipment.Builder
All Implemented Interfaces:
SkippedShipmentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SkippedShipment

public static final class SkippedShipment.Builder extends com.google.protobuf.GeneratedMessage.Builder<SkippedShipment.Builder> implements SkippedShipmentOrBuilder
 Specifies details of unperformed shipments in a solution. For trivial cases
 and/or if we are able to identify the cause for skipping, we report the
 reason here.
 
Protobuf type google.cloud.optimization.v1.SkippedShipment
  • 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<SkippedShipment.Builder>
    • clear

      public SkippedShipment.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<SkippedShipment.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<SkippedShipment.Builder>
    • getDefaultInstanceForType

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

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

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

      public SkippedShipment.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<SkippedShipment.Builder>
    • mergeFrom

      public SkippedShipment.Builder mergeFrom(SkippedShipment other)
    • isInitialized

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

      public SkippedShipment.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<SkippedShipment.Builder>
      Throws:
      IOException
    • getIndex

      public int getIndex()
       The index corresponds to the index of the shipment in the source
       `ShipmentModel`.
       
      int32 index = 1;
      Specified by:
      getIndex in interface SkippedShipmentOrBuilder
      Returns:
      The index.
    • setIndex

      public SkippedShipment.Builder setIndex(int value)
       The index corresponds to the index of the shipment in the source
       `ShipmentModel`.
       
      int32 index = 1;
      Parameters:
      value - The index to set.
      Returns:
      This builder for chaining.
    • clearIndex

      public SkippedShipment.Builder clearIndex()
       The index corresponds to the index of the shipment in the source
       `ShipmentModel`.
       
      int32 index = 1;
      Returns:
      This builder for chaining.
    • getLabel

      public String getLabel()
       Copy of the corresponding
       [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified
       in the `Shipment`.
       
      string label = 2;
      Specified by:
      getLabel in interface SkippedShipmentOrBuilder
      Returns:
      The label.
    • getLabelBytes

      public com.google.protobuf.ByteString getLabelBytes()
       Copy of the corresponding
       [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified
       in the `Shipment`.
       
      string label = 2;
      Specified by:
      getLabelBytes in interface SkippedShipmentOrBuilder
      Returns:
      The bytes for label.
    • setLabel

      public SkippedShipment.Builder setLabel(String value)
       Copy of the corresponding
       [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified
       in the `Shipment`.
       
      string label = 2;
      Parameters:
      value - The label to set.
      Returns:
      This builder for chaining.
    • clearLabel

      public SkippedShipment.Builder clearLabel()
       Copy of the corresponding
       [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified
       in the `Shipment`.
       
      string label = 2;
      Returns:
      This builder for chaining.
    • setLabelBytes

      public SkippedShipment.Builder setLabelBytes(com.google.protobuf.ByteString value)
       Copy of the corresponding
       [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified
       in the `Shipment`.
       
      string label = 2;
      Parameters:
      value - The bytes for label to set.
      Returns:
      This builder for chaining.
    • getReasonsList

      public List<SkippedShipment.Reason> getReasonsList()
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
      Specified by:
      getReasonsList in interface SkippedShipmentOrBuilder
    • getReasonsCount

      public int getReasonsCount()
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
      Specified by:
      getReasonsCount in interface SkippedShipmentOrBuilder
    • getReasons

      public SkippedShipment.Reason getReasons(int index)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
      Specified by:
      getReasons in interface SkippedShipmentOrBuilder
    • setReasons

      public SkippedShipment.Builder setReasons(int index, SkippedShipment.Reason value)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • setReasons

      public SkippedShipment.Builder setReasons(int index, SkippedShipment.Reason.Builder builderForValue)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • addReasons

       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • addReasons

      public SkippedShipment.Builder addReasons(int index, SkippedShipment.Reason value)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • addReasons

      public SkippedShipment.Builder addReasons(SkippedShipment.Reason.Builder builderForValue)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • addReasons

      public SkippedShipment.Builder addReasons(int index, SkippedShipment.Reason.Builder builderForValue)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • addAllReasons

      public SkippedShipment.Builder addAllReasons(Iterable<? extends SkippedShipment.Reason> values)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • clearReasons

      public SkippedShipment.Builder clearReasons()
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • removeReasons

      public SkippedShipment.Builder removeReasons(int index)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • getReasonsBuilder

      public SkippedShipment.Reason.Builder getReasonsBuilder(int index)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • getReasonsOrBuilder

      public SkippedShipment.ReasonOrBuilder getReasonsOrBuilder(int index)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
      Specified by:
      getReasonsOrBuilder in interface SkippedShipmentOrBuilder
    • getReasonsOrBuilderList

      public List<? extends SkippedShipment.ReasonOrBuilder> getReasonsOrBuilderList()
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
      Specified by:
      getReasonsOrBuilderList in interface SkippedShipmentOrBuilder
    • addReasonsBuilder

      public SkippedShipment.Reason.Builder addReasonsBuilder()
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • addReasonsBuilder

      public SkippedShipment.Reason.Builder addReasonsBuilder(int index)
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;
    • getReasonsBuilderList

      public List<SkippedShipment.Reason.Builder> getReasonsBuilderList()
       A list of reasons that explain why the shipment was skipped. See comment
       above `Reason`.
       
      repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3;