Skip to content

Commit

Permalink
feat: add automation rule NONE to booking proto
Browse files Browse the repository at this point in the history
  • Loading branch information
gostajonasson committed Dec 21, 2022
1 parent 00da04d commit 4fa0f9b
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 81 deletions.
81 changes: 43 additions & 38 deletions cmd/saga/gen/einride/saga/extend/book/v1beta1/booking.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion openapiv2/book.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,14 @@ definitions:
BookingAutomationRule:
type: string
enum:
- NONE
- CREATE_SHIPMENTS
- CREATE_AND_RELEASE_SHIPMENTS
description: |-
The rule that is applied when a confirmed booking is accepted.
- AUTOMATION_RULE_UNSPECIFIED: Unspecified auto rule.
- NONE: No automation rule
- CREATE_SHIPMENTS: When the confirmed booking is accepted, shipments will be created automatically from its stops and units.
- CREATE_AND_RELEASE_SHIPMENTS: When the confirmed booking is accepted, shipments will be created automatically from its stops and units
and then released.
Expand Down Expand Up @@ -619,7 +621,7 @@ definitions:
properties:
automationRule:
$ref: '#/definitions/BookingAutomationRule'
description: The rule that is applied when a confirmed booking is accepted. Defaults to no auto rule.
description: The rule that is applied when a confirmed booking is accepted. Defaults to NONE.
createTime:
type: string
format: date-time
Expand Down
8 changes: 5 additions & 3 deletions proto/einride/saga/extend/book/v1beta1/booking.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ message Booking {
ServiceType service_type = 8 [(google.api.field_behavior) = REQUIRED];
// External reference ID is a unique identifier that can be set by the client.
string external_reference_id = 9;
// The rule that is applied when a confirmed booking is accepted. Defaults to no auto rule.
// The rule that is applied when a confirmed booking is accepted. Defaults to NONE.
AutomationRule automation_rule = 10;

// The units included in this booking.
Expand Down Expand Up @@ -100,11 +100,13 @@ message Booking {
enum AutomationRule {
// Unspecified auto rule.
AUTOMATION_RULE_UNSPECIFIED = 0;
// No automation rule
NONE = 1;
// When the confirmed booking is accepted, shipments will be created automatically from its stops and units.
CREATE_SHIPMENTS = 1;
CREATE_SHIPMENTS = 2;
// When the confirmed booking is accepted, shipments will be created automatically from its stops and units
// and then released.
CREATE_AND_RELEASE_SHIPMENTS = 2;
CREATE_AND_RELEASE_SHIPMENTS = 3;
}

// A stop is an address where an event is going to happen. The event could be
Expand Down
Loading

0 comments on commit 4fa0f9b

Please sign in to comment.