Class ShipmentTypeIncompatibility.Builder

  • All Implemented Interfaces:
    ShipmentTypeIncompatibilityOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    ShipmentTypeIncompatibility

    public static final class ShipmentTypeIncompatibility.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeIncompatibility.Builder>
    implements ShipmentTypeIncompatibilityOrBuilder
     Specifies incompatibilties between shipments depending on their
     shipment_type. The appearance of incompatible shipments on the same route is
     restricted based on the incompatibility mode.
     
    Protobuf type google.cloud.optimization.v1.ShipmentTypeIncompatibility
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeIncompatibility.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.GeneratedMessageV3.Builder<ShipmentTypeIncompatibility.Builder>
      • getDefaultInstanceForType

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

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

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

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

        public ShipmentTypeIncompatibility.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<ShipmentTypeIncompatibility.Builder>
        Throws:
        IOException
      • getTypesList

        public com.google.protobuf.ProtocolStringList getTypesList()
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Specified by:
        getTypesList in interface ShipmentTypeIncompatibilityOrBuilder
        Returns:
        A list containing the types.
      • getTypesCount

        public int getTypesCount()
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Specified by:
        getTypesCount in interface ShipmentTypeIncompatibilityOrBuilder
        Returns:
        The count of types.
      • getTypes

        public String getTypes​(int index)
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Specified by:
        getTypes in interface ShipmentTypeIncompatibilityOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The types at the given index.
      • getTypesBytes

        public com.google.protobuf.ByteString getTypesBytes​(int index)
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Specified by:
        getTypesBytes in interface ShipmentTypeIncompatibilityOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the types at the given index.
      • setTypes

        public ShipmentTypeIncompatibility.Builder setTypes​(int index,
                                                            String value)
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Parameters:
        index - The index to set the value at.
        value - The types to set.
        Returns:
        This builder for chaining.
      • addTypes

        public ShipmentTypeIncompatibility.Builder addTypes​(String value)
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Parameters:
        value - The types to add.
        Returns:
        This builder for chaining.
      • addAllTypes

        public ShipmentTypeIncompatibility.Builder addAllTypes​(Iterable<String> values)
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Parameters:
        values - The types to add.
        Returns:
        This builder for chaining.
      • clearTypes

        public ShipmentTypeIncompatibility.Builder clearTypes()
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Returns:
        This builder for chaining.
      • addTypesBytes

        public ShipmentTypeIncompatibility.Builder addTypesBytes​(com.google.protobuf.ByteString value)
         List of incompatible types. Two shipments having different `shipment_types`
         among those listed are "incompatible".
         
        repeated string types = 1;
        Parameters:
        value - The bytes of the types to add.
        Returns:
        This builder for chaining.
      • getIncompatibilityModeValue

        public int getIncompatibilityModeValue()
         Mode applied to the incompatibility.
         
        .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2;
        Specified by:
        getIncompatibilityModeValue in interface ShipmentTypeIncompatibilityOrBuilder
        Returns:
        The enum numeric value on the wire for incompatibilityMode.
      • setIncompatibilityModeValue

        public ShipmentTypeIncompatibility.Builder setIncompatibilityModeValue​(int value)
         Mode applied to the incompatibility.
         
        .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2;
        Parameters:
        value - The enum numeric value on the wire for incompatibilityMode to set.
        Returns:
        This builder for chaining.
      • clearIncompatibilityMode

        public ShipmentTypeIncompatibility.Builder clearIncompatibilityMode()
         Mode applied to the incompatibility.
         
        .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2;
        Returns:
        This builder for chaining.
      • mergeUnknownFields

        public final ShipmentTypeIncompatibility.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeIncompatibility.Builder>