# Class PrecedenceRule (1.15.0)

1.15.0 (latest) 1.14.0 1.13.0 1.12.0 1.11.2 1.10.0 1.9.1 1.8.5 1.7.0 1.6.0 1.5.0 1.4.3 1.3.2 1.2.0 1.1.3 1.0.1 0.1.1

    PrecedenceRule(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A precedence rule between two events (each event is the pickup or
the delivery of a shipment): the "second" event has to start at
least `offset_duration` after "first" has started.

Several precedences can refer to the same (or related) events, e.g.,
"pickup of B happens after delivery of A" and "pickup of C happens
after pickup of B".

Furthermore, precedences only apply when both shipments are
performed and are otherwise ignored.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `first_index` | `int` Shipment index of the "first" event. This field must be specified. This field is a member of `oneof`_ `_first_index`. |
| `first_is_delivery` | `bool` Indicates if the "first" event is a delivery. |
| `second_index` | `int` Shipment index of the "second" event. This field must be specified. This field is a member of `oneof`_ `_second_index`. |
| `second_is_delivery` | `bool` Indicates if the "second" event is a delivery. |
| `offset_duration` | `google.protobuf.duration_pb2.Duration` The offset between the "first" and "second" event. It can be negative. |