Class ShipmentRoute.Transition

  • All Implemented Interfaces:
    ShipmentRoute.TransitionOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
    Enclosing class:
    ShipmentRoute

    public static final class ShipmentRoute.Transition
    extends com.google.protobuf.GeneratedMessageV3
    implements ShipmentRoute.TransitionOrBuilder
     Transition between two events on the route. See the description of
     [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute].
    
     If the vehicle does not have a `start_location` and/or `end_location`, the
     corresponding travel metrics are 0.
     
    Protobuf type google.cloud.optimization.v1.ShipmentRoute.Transition
    See Also:
    Serialized Form
    • Field Detail

      • TRAVEL_DURATION_FIELD_NUMBER

        public static final int TRAVEL_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRAVEL_DISTANCE_METERS_FIELD_NUMBER

        public static final int TRAVEL_DISTANCE_METERS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TRAFFIC_INFO_UNAVAILABLE_FIELD_NUMBER

        public static final int TRAFFIC_INFO_UNAVAILABLE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DELAY_DURATION_FIELD_NUMBER

        public static final int DELAY_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • BREAK_DURATION_FIELD_NUMBER

        public static final int BREAK_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • WAIT_DURATION_FIELD_NUMBER

        public static final int WAIT_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TOTAL_DURATION_FIELD_NUMBER

        public static final int TOTAL_DURATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • START_TIME_FIELD_NUMBER

        public static final int START_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ROUTE_POLYLINE_FIELD_NUMBER

        public static final int ROUTE_POLYLINE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • VEHICLE_LOADS_FIELD_NUMBER

        public static final int VEHICLE_LOADS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • 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()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasTravelDuration

        public boolean hasTravelDuration()
         Travel duration during this transition.
         
        .google.protobuf.Duration travel_duration = 1;
        Specified by:
        hasTravelDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        Whether the travelDuration field is set.
      • getTravelDuration

        public com.google.protobuf.Duration getTravelDuration()
         Travel duration during this transition.
         
        .google.protobuf.Duration travel_duration = 1;
        Specified by:
        getTravelDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        The travelDuration.
      • getTrafficInfoUnavailable

        public boolean getTrafficInfoUnavailable()
         When traffic is requested via
         [OptimizeToursRequest.consider_road_traffic]
         [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic],
         and the traffic info couldn't be retrieved for a `Transition`, this
         boolean is set to true. This may be temporary (rare hiccup in the
         realtime traffic servers) or permanent (no data for this location).
         
        bool traffic_info_unavailable = 3;
        Specified by:
        getTrafficInfoUnavailable in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        The trafficInfoUnavailable.
      • hasDelayDuration

        public boolean hasDelayDuration()
         Sum of the delay durations applied to this transition. If any, the delay
         starts exactly `delay_duration` seconds before the next event (visit or
         vehicle end). See
         [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay].
         
        .google.protobuf.Duration delay_duration = 4;
        Specified by:
        hasDelayDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        Whether the delayDuration field is set.
      • getDelayDuration

        public com.google.protobuf.Duration getDelayDuration()
         Sum of the delay durations applied to this transition. If any, the delay
         starts exactly `delay_duration` seconds before the next event (visit or
         vehicle end). See
         [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay].
         
        .google.protobuf.Duration delay_duration = 4;
        Specified by:
        getDelayDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        The delayDuration.
      • getDelayDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getDelayDurationOrBuilder()
         Sum of the delay durations applied to this transition. If any, the delay
         starts exactly `delay_duration` seconds before the next event (visit or
         vehicle end). See
         [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay].
         
        .google.protobuf.Duration delay_duration = 4;
        Specified by:
        getDelayDurationOrBuilder in interface ShipmentRoute.TransitionOrBuilder
      • hasBreakDuration

        public boolean hasBreakDuration()
         Sum of the duration of the breaks occurring during this transition, if
         any. Details about each break's start time and duration are stored in
         [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks].
         
        .google.protobuf.Duration break_duration = 5;
        Specified by:
        hasBreakDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        Whether the breakDuration field is set.
      • getBreakDuration

        public com.google.protobuf.Duration getBreakDuration()
         Sum of the duration of the breaks occurring during this transition, if
         any. Details about each break's start time and duration are stored in
         [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks].
         
        .google.protobuf.Duration break_duration = 5;
        Specified by:
        getBreakDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        The breakDuration.
      • getBreakDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getBreakDurationOrBuilder()
         Sum of the duration of the breaks occurring during this transition, if
         any. Details about each break's start time and duration are stored in
         [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks].
         
        .google.protobuf.Duration break_duration = 5;
        Specified by:
        getBreakDurationOrBuilder in interface ShipmentRoute.TransitionOrBuilder
      • hasWaitDuration

        public boolean hasWaitDuration()
         Time spent waiting during this transition. Wait duration corresponds to
         idle time and does not include break time. Also note that this wait time
         may be split into several non-contiguous intervals.
         
        .google.protobuf.Duration wait_duration = 6;
        Specified by:
        hasWaitDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        Whether the waitDuration field is set.
      • getWaitDuration

        public com.google.protobuf.Duration getWaitDuration()
         Time spent waiting during this transition. Wait duration corresponds to
         idle time and does not include break time. Also note that this wait time
         may be split into several non-contiguous intervals.
         
        .google.protobuf.Duration wait_duration = 6;
        Specified by:
        getWaitDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        The waitDuration.
      • getWaitDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getWaitDurationOrBuilder()
         Time spent waiting during this transition. Wait duration corresponds to
         idle time and does not include break time. Also note that this wait time
         may be split into several non-contiguous intervals.
         
        .google.protobuf.Duration wait_duration = 6;
        Specified by:
        getWaitDurationOrBuilder in interface ShipmentRoute.TransitionOrBuilder
      • hasTotalDuration

        public boolean hasTotalDuration()
         Total duration of the transition, provided for convenience. It is equal
         to:
        
         * next visit `start_time` (or `vehicle_end_time` if this is the last
         transition) - this transition's `start_time`;
         * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following
         additionally holds: `total_duration = travel_duration + delay_duration
         + break_duration + wait_duration`.
         
        .google.protobuf.Duration total_duration = 7;
        Specified by:
        hasTotalDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        Whether the totalDuration field is set.
      • getTotalDuration

        public com.google.protobuf.Duration getTotalDuration()
         Total duration of the transition, provided for convenience. It is equal
         to:
        
         * next visit `start_time` (or `vehicle_end_time` if this is the last
         transition) - this transition's `start_time`;
         * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following
         additionally holds: `total_duration = travel_duration + delay_duration
         + break_duration + wait_duration`.
         
        .google.protobuf.Duration total_duration = 7;
        Specified by:
        getTotalDuration in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        The totalDuration.
      • getTotalDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder()
         Total duration of the transition, provided for convenience. It is equal
         to:
        
         * next visit `start_time` (or `vehicle_end_time` if this is the last
         transition) - this transition's `start_time`;
         * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following
         additionally holds: `total_duration = travel_duration + delay_duration
         + break_duration + wait_duration`.
         
        .google.protobuf.Duration total_duration = 7;
        Specified by:
        getTotalDurationOrBuilder in interface ShipmentRoute.TransitionOrBuilder
      • hasStartTime

        public boolean hasStartTime()
         Start time of this transition.
         
        .google.protobuf.Timestamp start_time = 8;
        Specified by:
        hasStartTime in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        Whether the startTime field is set.
      • getStartTime

        public com.google.protobuf.Timestamp getStartTime()
         Start time of this transition.
         
        .google.protobuf.Timestamp start_time = 8;
        Specified by:
        getStartTime in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        The startTime.
      • hasRoutePolyline

        public boolean hasRoutePolyline()
         The encoded polyline representation of the route followed during the
         transition.
         This field is only populated if [populate_transition_polylines]
         [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
         is set to true.
         
        .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9;
        Specified by:
        hasRoutePolyline in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        Whether the routePolyline field is set.
      • getRoutePolyline

        public ShipmentRoute.EncodedPolyline getRoutePolyline()
         The encoded polyline representation of the route followed during the
         transition.
         This field is only populated if [populate_transition_polylines]
         [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
         is set to true.
         
        .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9;
        Specified by:
        getRoutePolyline in interface ShipmentRoute.TransitionOrBuilder
        Returns:
        The routePolyline.
      • getRoutePolylineOrBuilder

        public ShipmentRoute.EncodedPolylineOrBuilder getRoutePolylineOrBuilder()
         The encoded polyline representation of the route followed during the
         transition.
         This field is only populated if [populate_transition_polylines]
         [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines]
         is set to true.
         
        .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9;
        Specified by:
        getRoutePolylineOrBuilder in interface ShipmentRoute.TransitionOrBuilder
      • getVehicleLoadsCount

        public int getVehicleLoadsCount()
        Description copied from interface: ShipmentRoute.TransitionOrBuilder
         Vehicle loads during this transition, for each type that either appears
         in this vehicle's
         [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits],
         or that have non-zero
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         on some shipment performed on this route.
        
         The loads during the first transition are the starting loads of the
         vehicle route. Then, after each visit, the visit's `load_demands` are
         either added or subtracted to get the next transition's loads, depending
         on whether the visit was a pickup or a delivery.
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;
        Specified by:
        getVehicleLoadsCount in interface ShipmentRoute.TransitionOrBuilder
      • containsVehicleLoads

        public boolean containsVehicleLoads​(String key)
         Vehicle loads during this transition, for each type that either appears
         in this vehicle's
         [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits],
         or that have non-zero
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         on some shipment performed on this route.
        
         The loads during the first transition are the starting loads of the
         vehicle route. Then, after each visit, the visit's `load_demands` are
         either added or subtracted to get the next transition's loads, depending
         on whether the visit was a pickup or a delivery.
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;
        Specified by:
        containsVehicleLoads in interface ShipmentRoute.TransitionOrBuilder
      • getVehicleLoadsMap

        public Map<String,​ShipmentRoute.VehicleLoad> getVehicleLoadsMap()
         Vehicle loads during this transition, for each type that either appears
         in this vehicle's
         [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits],
         or that have non-zero
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         on some shipment performed on this route.
        
         The loads during the first transition are the starting loads of the
         vehicle route. Then, after each visit, the visit's `load_demands` are
         either added or subtracted to get the next transition's loads, depending
         on whether the visit was a pickup or a delivery.
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;
        Specified by:
        getVehicleLoadsMap in interface ShipmentRoute.TransitionOrBuilder
      • getVehicleLoadsOrDefault

        public ShipmentRoute.VehicleLoad getVehicleLoadsOrDefault​(String key,
                                                                  ShipmentRoute.VehicleLoad defaultValue)
         Vehicle loads during this transition, for each type that either appears
         in this vehicle's
         [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits],
         or that have non-zero
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         on some shipment performed on this route.
        
         The loads during the first transition are the starting loads of the
         vehicle route. Then, after each visit, the visit's `load_demands` are
         either added or subtracted to get the next transition's loads, depending
         on whether the visit was a pickup or a delivery.
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;
        Specified by:
        getVehicleLoadsOrDefault in interface ShipmentRoute.TransitionOrBuilder
      • getVehicleLoadsOrThrow

        public ShipmentRoute.VehicleLoad getVehicleLoadsOrThrow​(String key)
         Vehicle loads during this transition, for each type that either appears
         in this vehicle's
         [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits],
         or that have non-zero
         [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]
         on some shipment performed on this route.
        
         The loads during the first transition are the starting loads of the
         vehicle route. Then, after each visit, the visit's `load_demands` are
         either added or subtracted to get the next transition's loads, depending
         on whether the visit was a pickup or a delivery.
         
        map<string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad> vehicle_loads = 11;
        Specified by:
        getVehicleLoadsOrThrow in interface ShipmentRoute.TransitionOrBuilder
      • getLoadsCount

        @Deprecated
        public int getLoadsCount()
        Deprecated.
         Deprecated: Use
         [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true];
        Specified by:
        getLoadsCount in interface ShipmentRoute.TransitionOrBuilder
      • getLoads

        @Deprecated
        public CapacityQuantity getLoads​(int index)
        Deprecated.
         Deprecated: Use
         [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
         instead.
         
        repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true];
        Specified by:
        getLoads in interface ShipmentRoute.TransitionOrBuilder
      • 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 ShipmentRoute.Transition parseFrom​(ByteBuffer data)
                                                  throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

        public com.google.protobuf.Parser<ShipmentRoute.Transition> 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 ShipmentRoute.Transition getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder