Class OptimizeToursResponse

  • All Implemented Interfaces:
    OptimizeToursResponseOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class OptimizeToursResponse
    extends com.google.protobuf.GeneratedMessageV3
    implements OptimizeToursResponseOrBuilder
     Response after solving a tour optimization problem containing the routes
     followed by each vehicle, the shipments which have been skipped and the
     overall cost of the solution.
     
    Protobuf type google.cloud.optimization.v1.OptimizeToursResponse
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • getRoutesCount

        public int getRoutesCount()
         Routes computed for each vehicle; the i-th route corresponds to the i-th
         vehicle in the model.
         
        repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
        Specified by:
        getRoutesCount in interface OptimizeToursResponseOrBuilder
      • getRoutes

        public ShipmentRoute getRoutes​(int index)
         Routes computed for each vehicle; the i-th route corresponds to the i-th
         vehicle in the model.
         
        repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
        Specified by:
        getRoutes in interface OptimizeToursResponseOrBuilder
      • getRequestLabel

        public String getRequestLabel()
         Copy of the
         [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label],
         if a label was specified in the request.
         
        string request_label = 3;
        Specified by:
        getRequestLabel in interface OptimizeToursResponseOrBuilder
        Returns:
        The requestLabel.
      • getRequestLabelBytes

        public com.google.protobuf.ByteString getRequestLabelBytes()
         Copy of the
         [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label],
         if a label was specified in the request.
         
        string request_label = 3;
        Specified by:
        getRequestLabelBytes in interface OptimizeToursResponseOrBuilder
        Returns:
        The bytes for requestLabel.
      • getValidationErrorsList

        public List<OptimizeToursValidationError> getValidationErrorsList()
         List of all the validation errors that we were able to detect
         independently. See the "MULTIPLE ERRORS" explanation for the
         [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError]
         message.
         
        repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
        Specified by:
        getValidationErrorsList in interface OptimizeToursResponseOrBuilder
      • getValidationErrorsOrBuilderList

        public List<? extends OptimizeToursValidationErrorOrBuilder> getValidationErrorsOrBuilderList()
         List of all the validation errors that we were able to detect
         independently. See the "MULTIPLE ERRORS" explanation for the
         [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError]
         message.
         
        repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
        Specified by:
        getValidationErrorsOrBuilderList in interface OptimizeToursResponseOrBuilder
      • getValidationErrorsCount

        public int getValidationErrorsCount()
         List of all the validation errors that we were able to detect
         independently. See the "MULTIPLE ERRORS" explanation for the
         [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError]
         message.
         
        repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
        Specified by:
        getValidationErrorsCount in interface OptimizeToursResponseOrBuilder
      • getValidationErrors

        public OptimizeToursValidationError getValidationErrors​(int index)
         List of all the validation errors that we were able to detect
         independently. See the "MULTIPLE ERRORS" explanation for the
         [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError]
         message.
         
        repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
        Specified by:
        getValidationErrors in interface OptimizeToursResponseOrBuilder
      • getValidationErrorsOrBuilder

        public OptimizeToursValidationErrorOrBuilder getValidationErrorsOrBuilder​(int index)
         List of all the validation errors that we were able to detect
         independently. See the "MULTIPLE ERRORS" explanation for the
         [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError]
         message.
         
        repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
        Specified by:
        getValidationErrorsOrBuilder in interface OptimizeToursResponseOrBuilder
      • hasMetrics

        public boolean hasMetrics()
         Duration, distance and usage metrics for this solution.
         
        .google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;
        Specified by:
        hasMetrics in interface OptimizeToursResponseOrBuilder
        Returns:
        Whether the metrics field is set.
      • getTotalCost

        @Deprecated
        public double getTotalCost()
        Deprecated.
        google.cloud.optimization.v1.OptimizeToursResponse.total_cost is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=433
         Deprecated: Use
         [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost]
         instead. Total cost of the solution. This takes into account all costs:
         costs per per hour and travel hour, fixed vehicle costs, unperformed
         shipment penalty costs, global duration cost, etc.
         
        double total_cost = 2 [deprecated = true];
        Specified by:
        getTotalCost in interface OptimizeToursResponseOrBuilder
        Returns:
        The totalCost.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static OptimizeToursResponse parseFrom​(ByteBuffer data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OptimizeToursResponse parseFrom​(ByteBuffer data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OptimizeToursResponse parseFrom​(com.google.protobuf.ByteString data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OptimizeToursResponse parseFrom​(com.google.protobuf.ByteString data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OptimizeToursResponse parseFrom​(byte[] data)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OptimizeToursResponse parseFrom​(byte[] data,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public OptimizeToursResponse.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public OptimizeToursResponse.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected OptimizeToursResponse.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<OptimizeToursResponse> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public OptimizeToursResponse getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder