diff --git a/.sage/go.mod b/.sage/go.mod
index 126fac4..d0c94c6 100644
--- a/.sage/go.mod
+++ b/.sage/go.mod
@@ -2,6 +2,6 @@ module sage
go 1.24.10
-toolchain go1.25.4
+toolchain go1.25.5
require go.einride.tech/sage v0.383.0
diff --git a/cmd/examplectl/gen/einride/example/freight/v1/freight_service_cli.pb.go b/cmd/examplectl/gen/einride/example/freight/v1/freight_service_cli.pb.go
index 2bd20df..7406c4f 100644
--- a/cmd/examplectl/gen/einride/example/freight/v1/freight_service_cli.pb.go
+++ b/cmd/examplectl/gen/einride/example/freight/v1/freight_service_cli.pb.go
@@ -23,6 +23,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&Shipper{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.GetShipper": " Get a shipper.\n\n See: https://google.aip.dev/131 (Standard methods: Get).\n",
+ "einride.example.freight.v1.GetShipperRequest": " Request message for FreightService.GetShipper.\n",
"einride.example.freight.v1.GetShipperRequest.name": " The resource name of the shipper to retrieve.\n Format: shippers/{shipper}\n",
},
),
@@ -34,6 +35,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&ListShippersResponse{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.ListShippers": " List shippers.\n\n See: https://google.aip.dev/132 (Standard methods: List).\n",
+ "einride.example.freight.v1.ListShippersRequest": " Request message for FreightService.ListShippers.\n",
"einride.example.freight.v1.ListShippersRequest.page_size": " Requested page size. Server may return fewer shippers than requested.\n If unspecified, server will pick an appropriate default.\n",
"einride.example.freight.v1.ListShippersRequest.page_token": " A token identifying a page of results the server should return.\n Typically, this is the value of\n [ListShippersResponse.next_page_token][einride.example.freight.v1.ListShippersResponse.next_page_token]\n returned from the previous call to `ListShippers` method.\n",
},
@@ -45,13 +47,16 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&CreateShipperRequest{},
&Shipper{},
map[protoreflect.FullName]string{
+ "einride.example.freight.v1.CreateShipperRequest": " Request message for FreightService.CreateShipper.\n",
"einride.example.freight.v1.CreateShipperRequest.shipper": " The shipper to create.\n",
"einride.example.freight.v1.FreightService.CreateShipper": " Create a shipper.\n\n See: https://google.aip.dev/133 (Standard methods: Create).\n",
+ "einride.example.freight.v1.Shipper": " A shipper is a supplier or owner of goods to be transported.\n",
"einride.example.freight.v1.Shipper.create_time": " The creation timestamp of the shipper.\n",
"einride.example.freight.v1.Shipper.delete_time": " The deletion timestamp of the shipper.\n",
"einride.example.freight.v1.Shipper.display_name": " The display name of the shipper.\n",
"einride.example.freight.v1.Shipper.name": " The resource name of the shipper.\n",
"einride.example.freight.v1.Shipper.update_time": " The last update timestamp of the shipper.\n\n Updated when create/update/delete operation is performed.\n",
+ "google.protobuf.Timestamp": " A Timestamp represents a point in time independent of any time zone or local\n calendar, encoded as a count of seconds and fractions of seconds at\n nanosecond resolution. The count is relative to an epoch at UTC midnight on\n January 1, 1970, in the proleptic Gregorian calendar which extends the\n Gregorian calendar backwards to year one.\n\n All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n second table is needed for interpretation, using a [24-hour linear\n smear](https://developers.google.com/time/smear).\n\n The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n restricting to that range, we ensure that we can convert to and from [RFC\n 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\n # Examples\n\n Example 1: Compute Timestamp from POSIX `time()`.\n\n Timestamp timestamp;\n timestamp.set_seconds(time(NULL));\n timestamp.set_nanos(0);\n\n Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\n struct timeval tv;\n gettimeofday(&tv, NULL);\n\n Timestamp timestamp;\n timestamp.set_seconds(tv.tv_sec);\n timestamp.set_nanos(tv.tv_usec * 1000);\n\n Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\n FILETIME ft;\n GetSystemTimeAsFileTime(&ft);\n UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n Timestamp timestamp;\n timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\n Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\n long millis = System.currentTimeMillis();\n\n Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n Example 5: Compute Timestamp from Java `Instant.now()`.\n\n Instant now = Instant.now();\n\n Timestamp timestamp =\n Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n .setNanos(now.getNano()).build();\n\n Example 6: Compute Timestamp from current time in Python.\n\n timestamp = Timestamp()\n timestamp.GetCurrentTime()\n\n # JSON Mapping\n\n In JSON format, the Timestamp type is encoded as a string in the\n [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n where {year} is always expressed using four digits while {month}, {day},\n {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n is required. A proto3 JSON serializer should always use UTC (as indicated by\n \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n able to accept both UTC and other timezones (as indicated by an offset).\n\n For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n 01:30 UTC on January 15, 2017.\n\n In JavaScript, one can convert a Date object to this format using the\n standard\n [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n method. In Python, a standard `datetime.datetime` object can be converted\n to this format using\n [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n the Joda Time's [`ISODateTimeFormat.dateTime()`](\n http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n ) to obtain a formatter capable of generating timestamps in this format.\n\n",
"google.protobuf.Timestamp.nanos": " Non-negative fractions of a second at nanosecond resolution. Negative\n second values with fractions must still have non-negative nanos values\n that count forward in time. Must be from 0 to 999,999,999\n inclusive.\n",
"google.protobuf.Timestamp.seconds": " Represents seconds of UTC time since Unix epoch\n 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n 9999-12-31T23:59:59Z inclusive.\n",
},
@@ -64,14 +69,18 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&Shipper{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.UpdateShipper": " Update a shipper.\n\n See: https://google.aip.dev/134 (Standard methods: Update).\n",
+ "einride.example.freight.v1.Shipper": " A shipper is a supplier or owner of goods to be transported.\n",
"einride.example.freight.v1.Shipper.create_time": " The creation timestamp of the shipper.\n",
"einride.example.freight.v1.Shipper.delete_time": " The deletion timestamp of the shipper.\n",
"einride.example.freight.v1.Shipper.display_name": " The display name of the shipper.\n",
"einride.example.freight.v1.Shipper.name": " The resource name of the shipper.\n",
"einride.example.freight.v1.Shipper.update_time": " The last update timestamp of the shipper.\n\n Updated when create/update/delete operation is performed.\n",
+ "einride.example.freight.v1.UpdateShipperRequest": " Request message for FreightService.UpdateShipper.\n",
"einride.example.freight.v1.UpdateShipperRequest.shipper": " The shipper to update with. The name must match or be empty.\n The shipper's `name` field is used to identify the shipper to be updated.\n Format: shippers/{shipper}\n",
"einride.example.freight.v1.UpdateShipperRequest.update_mask": " The list of fields to be updated.\n",
+ "google.protobuf.FieldMask": " `FieldMask` represents a set of symbolic field paths, for example:\n\n paths: \"f.a\"\n paths: \"f.b.d\"\n\n Here `f` represents a field in some root message, `a` and `b`\n fields in the message found in `f`, and `d` a field found in the\n message in `f.b`.\n\n Field masks are used to specify a subset of fields that should be\n returned by a get operation or modified by an update operation.\n Field masks also have a custom JSON encoding (see below).\n\n # Field Masks in Projections\n\n When used in the context of a projection, a response message or\n sub-message is filtered by the API to only contain those fields as\n specified in the mask. For example, if the mask in the previous\n example is applied to a response message as follows:\n\n f {\n a : 22\n b {\n d : 1\n x : 2\n }\n y : 13\n }\n z: 8\n\n The result will not contain specific values for fields x,y and z\n (their value will be set to the default, and omitted in proto text\n output):\n\n\n f {\n a : 22\n b {\n d : 1\n }\n }\n\n A repeated field is not allowed except at the last position of a\n paths string.\n\n If a FieldMask object is not present in a get operation, the\n operation applies to all fields (as if a FieldMask of all fields\n had been specified).\n\n Note that a field mask does not necessarily apply to the\n top-level response message. In case of a REST get operation, the\n field mask applies directly to the response, but in case of a REST\n list operation, the mask instead applies to each individual message\n in the returned resource list. In case of a REST custom method,\n other definitions may be used. Where the mask applies will be\n clearly documented together with its declaration in the API. In\n any case, the effect on the returned resource/resources is required\n behavior for APIs.\n\n # Field Masks in Update Operations\n\n A field mask in update operations specifies which fields of the\n targeted resource are going to be updated. The API is required\n to only change the values of the fields as specified in the mask\n and leave the others untouched. If a resource is passed in to\n describe the updated values, the API ignores the values of all\n fields not covered by the mask.\n\n If a repeated field is specified for an update operation, new values will\n be appended to the existing repeated field in the target resource. Note that\n a repeated field is only allowed in the last position of a `paths` string.\n\n If a sub-message is specified in the last position of the field mask for an\n update operation, then new value will be merged into the existing sub-message\n in the target resource.\n\n For example, given the target message:\n\n f {\n b {\n d: 1\n x: 2\n }\n c: [1]\n }\n\n And an update message:\n\n f {\n b {\n d: 10\n }\n c: [2]\n }\n\n then if the field mask is:\n\n paths: [\"f.b\", \"f.c\"]\n\n then the result will be:\n\n f {\n b {\n d: 10\n x: 2\n }\n c: [1, 2]\n }\n\n An implementation may provide options to override this default behavior for\n repeated and message fields.\n\n In order to reset a field's value to the default, the field must\n be in the mask and set to the default value in the provided resource.\n Hence, in order to reset all fields of a resource, provide a default\n instance of the resource and set all fields in the mask, or do\n not provide a mask as described below.\n\n If a field mask is not present on update, the operation applies to\n all fields (as if a field mask of all fields has been specified).\n Note that in the presence of schema evolution, this may mean that\n fields the client does not know and has therefore not filled into\n the request will be reset to their default. If this is unwanted\n behavior, a specific service may require a client to always specify\n a field mask, producing an error if not.\n\n As with get operations, the location of the resource which\n describes the updated values in the request message depends on the\n operation kind. In any case, the effect of the field mask is\n required to be honored by the API.\n\n ## Considerations for HTTP REST\n\n The HTTP kind of an update operation which uses a field mask must\n be set to PATCH instead of PUT in order to satisfy HTTP semantics\n (PUT must only be used for full updates).\n\n # JSON Encoding of Field Masks\n\n In JSON, a field mask is encoded as a single string where paths are\n separated by a comma. Fields name in each path are converted\n to/from lower-camel naming conventions.\n\n As an example, consider the following message declarations:\n\n message Profile {\n User user = 1;\n Photo photo = 2;\n }\n message User {\n string display_name = 1;\n string address = 2;\n }\n\n In proto a field mask for `Profile` may look as such:\n\n mask {\n paths: \"user.display_name\"\n paths: \"photo\"\n }\n\n In JSON, the same mask is represented as below:\n\n {\n mask: \"user.displayName,photo\"\n }\n\n # Field Masks and Oneof Fields\n\n Field masks treat fields in oneofs just as regular fields. Consider the\n following message:\n\n message SampleMessage {\n oneof test_oneof {\n string name = 4;\n SubMessage sub_message = 9;\n }\n }\n\n The field mask can be:\n\n mask {\n paths: \"name\"\n }\n\n Or:\n\n mask {\n paths: \"sub_message\"\n }\n\n Note that oneof type names (\"test_oneof\" in this case) cannot be used in\n paths.\n\n ## Field Mask Verification\n\n The implementation of any API method which has a FieldMask type field in the\n request should verify the included field paths, and return an\n `INVALID_ARGUMENT` error if any path is unmappable.\n",
"google.protobuf.FieldMask.paths": " The set of field mask paths.\n",
+ "google.protobuf.Timestamp": " A Timestamp represents a point in time independent of any time zone or local\n calendar, encoded as a count of seconds and fractions of seconds at\n nanosecond resolution. The count is relative to an epoch at UTC midnight on\n January 1, 1970, in the proleptic Gregorian calendar which extends the\n Gregorian calendar backwards to year one.\n\n All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n second table is needed for interpretation, using a [24-hour linear\n smear](https://developers.google.com/time/smear).\n\n The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n restricting to that range, we ensure that we can convert to and from [RFC\n 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\n # Examples\n\n Example 1: Compute Timestamp from POSIX `time()`.\n\n Timestamp timestamp;\n timestamp.set_seconds(time(NULL));\n timestamp.set_nanos(0);\n\n Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\n struct timeval tv;\n gettimeofday(&tv, NULL);\n\n Timestamp timestamp;\n timestamp.set_seconds(tv.tv_sec);\n timestamp.set_nanos(tv.tv_usec * 1000);\n\n Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\n FILETIME ft;\n GetSystemTimeAsFileTime(&ft);\n UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n Timestamp timestamp;\n timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\n Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\n long millis = System.currentTimeMillis();\n\n Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n Example 5: Compute Timestamp from Java `Instant.now()`.\n\n Instant now = Instant.now();\n\n Timestamp timestamp =\n Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n .setNanos(now.getNano()).build();\n\n Example 6: Compute Timestamp from current time in Python.\n\n timestamp = Timestamp()\n timestamp.GetCurrentTime()\n\n # JSON Mapping\n\n In JSON format, the Timestamp type is encoded as a string in the\n [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n where {year} is always expressed using four digits while {month}, {day},\n {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n is required. A proto3 JSON serializer should always use UTC (as indicated by\n \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n able to accept both UTC and other timezones (as indicated by an offset).\n\n For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n 01:30 UTC on January 15, 2017.\n\n In JavaScript, one can convert a Date object to this format using the\n standard\n [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n method. In Python, a standard `datetime.datetime` object can be converted\n to this format using\n [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n the Joda Time's [`ISODateTimeFormat.dateTime()`](\n http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n ) to obtain a formatter capable of generating timestamps in this format.\n\n",
"google.protobuf.Timestamp.nanos": " Non-negative fractions of a second at nanosecond resolution. Negative\n second values with fractions must still have non-negative nanos values\n that count forward in time. Must be from 0 to 999,999,999\n inclusive.\n",
"google.protobuf.Timestamp.seconds": " Represents seconds of UTC time since Unix epoch\n 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n 9999-12-31T23:59:59Z inclusive.\n",
},
@@ -83,6 +92,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&DeleteShipperRequest{},
&Shipper{},
map[protoreflect.FullName]string{
+ "einride.example.freight.v1.DeleteShipperRequest": " Request message for FreightService.DeleteShipper.\n",
"einride.example.freight.v1.DeleteShipperRequest.name": " The resource name of the shipper to delete.\n Format: shippers/{shipper}\n",
"einride.example.freight.v1.FreightService.DeleteShipper": " Delete a shipper.\n\n See: https://google.aip.dev/135 (Standard methods: Delete).\n See: https://google.aip.dev/164 (Soft delete).\n",
},
@@ -95,6 +105,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&Site{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.GetSite": " Get a site.\n\n See: https://google.aip.dev/131 (Standard methods: Get).\n",
+ "einride.example.freight.v1.GetSiteRequest": " Request message for FreightService.GetSite.\n",
"einride.example.freight.v1.GetSiteRequest.name": " The resource name of the site to retrieve.\n Format: shippers/{shipper}/sites/{site}\n",
},
),
@@ -106,6 +117,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&ListSitesResponse{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.ListSites": " List sites for a shipper.\n\n See: https://google.aip.dev/132 (Standard methods: List).\n",
+ "einride.example.freight.v1.ListSitesRequest": " Request message for FreightService.ListSites.\n",
"einride.example.freight.v1.ListSitesRequest.page_size": " Requested page size. Server may return fewer sites than requested.\n If unspecified, server will pick an appropriate default.\n",
"einride.example.freight.v1.ListSitesRequest.page_token": " A token identifying a page of results the server should return.\n Typically, this is the value of\n [ListSitesResponse.next_page_token][einride.example.freight.v1.ListSitesResponse.next_page_token]\n returned from the previous call to `ListSites` method.\n",
"einride.example.freight.v1.ListSitesRequest.parent": " The resource name of the parent, which owns this collection of sites.\n Format: shippers/{shipper}\n",
@@ -119,17 +131,21 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&CreateSiteRequest{},
&Site{},
map[protoreflect.FullName]string{
+ "einride.example.freight.v1.CreateSiteRequest": " Request message for FreightService.CreateSite.\n",
"einride.example.freight.v1.CreateSiteRequest.parent": " The resource name of the parent shipper for which this site will be created.\n Format: shippers/{shipper}\n",
"einride.example.freight.v1.CreateSiteRequest.site": " The site to create.\n",
"einride.example.freight.v1.FreightService.CreateSite": " Create a site.\n\n See: https://google.aip.dev/133 (Standard methods: Create).\n",
+ "einride.example.freight.v1.Site": " A site is a node in a [shipper][einride.example.freight.v1.Shipper]'s\n transport network.\n",
"einride.example.freight.v1.Site.create_time": " The creation timestamp of the site.\n",
"einride.example.freight.v1.Site.delete_time": " The deletion timestamp of the site.\n",
"einride.example.freight.v1.Site.display_name": " The display name of the site.\n",
"einride.example.freight.v1.Site.lat_lng": " The geographic location of the site.\n",
"einride.example.freight.v1.Site.name": " The resource name of the site.\n",
"einride.example.freight.v1.Site.update_time": " The last update timestamp of the site.\n\n Updated when create/update/delete operation is performed.\n",
+ "google.protobuf.Timestamp": " A Timestamp represents a point in time independent of any time zone or local\n calendar, encoded as a count of seconds and fractions of seconds at\n nanosecond resolution. The count is relative to an epoch at UTC midnight on\n January 1, 1970, in the proleptic Gregorian calendar which extends the\n Gregorian calendar backwards to year one.\n\n All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n second table is needed for interpretation, using a [24-hour linear\n smear](https://developers.google.com/time/smear).\n\n The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n restricting to that range, we ensure that we can convert to and from [RFC\n 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\n # Examples\n\n Example 1: Compute Timestamp from POSIX `time()`.\n\n Timestamp timestamp;\n timestamp.set_seconds(time(NULL));\n timestamp.set_nanos(0);\n\n Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\n struct timeval tv;\n gettimeofday(&tv, NULL);\n\n Timestamp timestamp;\n timestamp.set_seconds(tv.tv_sec);\n timestamp.set_nanos(tv.tv_usec * 1000);\n\n Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\n FILETIME ft;\n GetSystemTimeAsFileTime(&ft);\n UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n Timestamp timestamp;\n timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\n Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\n long millis = System.currentTimeMillis();\n\n Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n Example 5: Compute Timestamp from Java `Instant.now()`.\n\n Instant now = Instant.now();\n\n Timestamp timestamp =\n Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n .setNanos(now.getNano()).build();\n\n Example 6: Compute Timestamp from current time in Python.\n\n timestamp = Timestamp()\n timestamp.GetCurrentTime()\n\n # JSON Mapping\n\n In JSON format, the Timestamp type is encoded as a string in the\n [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n where {year} is always expressed using four digits while {month}, {day},\n {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n is required. A proto3 JSON serializer should always use UTC (as indicated by\n \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n able to accept both UTC and other timezones (as indicated by an offset).\n\n For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n 01:30 UTC on January 15, 2017.\n\n In JavaScript, one can convert a Date object to this format using the\n standard\n [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n method. In Python, a standard `datetime.datetime` object can be converted\n to this format using\n [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n the Joda Time's [`ISODateTimeFormat.dateTime()`](\n http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n ) to obtain a formatter capable of generating timestamps in this format.\n\n",
"google.protobuf.Timestamp.nanos": " Non-negative fractions of a second at nanosecond resolution. Negative\n second values with fractions must still have non-negative nanos values\n that count forward in time. Must be from 0 to 999,999,999\n inclusive.\n",
"google.protobuf.Timestamp.seconds": " Represents seconds of UTC time since Unix epoch\n 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n 9999-12-31T23:59:59Z inclusive.\n",
+ "google.type.LatLng": " An object that represents a latitude/longitude pair. This is expressed as a\n pair of doubles to represent degrees latitude and degrees longitude. Unless\n specified otherwise, this must conform to the\n WGS84\n standard. Values must be within normalized ranges.\n",
"google.type.LatLng.latitude": " The latitude in degrees. It must be in the range [-90.0, +90.0].\n",
"google.type.LatLng.longitude": " The longitude in degrees. It must be in the range [-180.0, +180.0].\n",
},
@@ -142,17 +158,22 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&Site{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.UpdateSite": " Update a site.\n\n See: https://google.aip.dev/134 (Standard methods: Update).\n",
+ "einride.example.freight.v1.Site": " A site is a node in a [shipper][einride.example.freight.v1.Shipper]'s\n transport network.\n",
"einride.example.freight.v1.Site.create_time": " The creation timestamp of the site.\n",
"einride.example.freight.v1.Site.delete_time": " The deletion timestamp of the site.\n",
"einride.example.freight.v1.Site.display_name": " The display name of the site.\n",
"einride.example.freight.v1.Site.lat_lng": " The geographic location of the site.\n",
"einride.example.freight.v1.Site.name": " The resource name of the site.\n",
"einride.example.freight.v1.Site.update_time": " The last update timestamp of the site.\n\n Updated when create/update/delete operation is performed.\n",
+ "einride.example.freight.v1.UpdateSiteRequest": " Request message for FreightService.UpdateSite.\n",
"einride.example.freight.v1.UpdateSiteRequest.site": " The site to update with. The name must match or be empty.\n The site's `name` field is used to identify the site to be updated.\n Format: shippers/{shipper}/sites/{site}\n",
"einride.example.freight.v1.UpdateSiteRequest.update_mask": " The list of fields to be updated.\n",
+ "google.protobuf.FieldMask": " `FieldMask` represents a set of symbolic field paths, for example:\n\n paths: \"f.a\"\n paths: \"f.b.d\"\n\n Here `f` represents a field in some root message, `a` and `b`\n fields in the message found in `f`, and `d` a field found in the\n message in `f.b`.\n\n Field masks are used to specify a subset of fields that should be\n returned by a get operation or modified by an update operation.\n Field masks also have a custom JSON encoding (see below).\n\n # Field Masks in Projections\n\n When used in the context of a projection, a response message or\n sub-message is filtered by the API to only contain those fields as\n specified in the mask. For example, if the mask in the previous\n example is applied to a response message as follows:\n\n f {\n a : 22\n b {\n d : 1\n x : 2\n }\n y : 13\n }\n z: 8\n\n The result will not contain specific values for fields x,y and z\n (their value will be set to the default, and omitted in proto text\n output):\n\n\n f {\n a : 22\n b {\n d : 1\n }\n }\n\n A repeated field is not allowed except at the last position of a\n paths string.\n\n If a FieldMask object is not present in a get operation, the\n operation applies to all fields (as if a FieldMask of all fields\n had been specified).\n\n Note that a field mask does not necessarily apply to the\n top-level response message. In case of a REST get operation, the\n field mask applies directly to the response, but in case of a REST\n list operation, the mask instead applies to each individual message\n in the returned resource list. In case of a REST custom method,\n other definitions may be used. Where the mask applies will be\n clearly documented together with its declaration in the API. In\n any case, the effect on the returned resource/resources is required\n behavior for APIs.\n\n # Field Masks in Update Operations\n\n A field mask in update operations specifies which fields of the\n targeted resource are going to be updated. The API is required\n to only change the values of the fields as specified in the mask\n and leave the others untouched. If a resource is passed in to\n describe the updated values, the API ignores the values of all\n fields not covered by the mask.\n\n If a repeated field is specified for an update operation, new values will\n be appended to the existing repeated field in the target resource. Note that\n a repeated field is only allowed in the last position of a `paths` string.\n\n If a sub-message is specified in the last position of the field mask for an\n update operation, then new value will be merged into the existing sub-message\n in the target resource.\n\n For example, given the target message:\n\n f {\n b {\n d: 1\n x: 2\n }\n c: [1]\n }\n\n And an update message:\n\n f {\n b {\n d: 10\n }\n c: [2]\n }\n\n then if the field mask is:\n\n paths: [\"f.b\", \"f.c\"]\n\n then the result will be:\n\n f {\n b {\n d: 10\n x: 2\n }\n c: [1, 2]\n }\n\n An implementation may provide options to override this default behavior for\n repeated and message fields.\n\n In order to reset a field's value to the default, the field must\n be in the mask and set to the default value in the provided resource.\n Hence, in order to reset all fields of a resource, provide a default\n instance of the resource and set all fields in the mask, or do\n not provide a mask as described below.\n\n If a field mask is not present on update, the operation applies to\n all fields (as if a field mask of all fields has been specified).\n Note that in the presence of schema evolution, this may mean that\n fields the client does not know and has therefore not filled into\n the request will be reset to their default. If this is unwanted\n behavior, a specific service may require a client to always specify\n a field mask, producing an error if not.\n\n As with get operations, the location of the resource which\n describes the updated values in the request message depends on the\n operation kind. In any case, the effect of the field mask is\n required to be honored by the API.\n\n ## Considerations for HTTP REST\n\n The HTTP kind of an update operation which uses a field mask must\n be set to PATCH instead of PUT in order to satisfy HTTP semantics\n (PUT must only be used for full updates).\n\n # JSON Encoding of Field Masks\n\n In JSON, a field mask is encoded as a single string where paths are\n separated by a comma. Fields name in each path are converted\n to/from lower-camel naming conventions.\n\n As an example, consider the following message declarations:\n\n message Profile {\n User user = 1;\n Photo photo = 2;\n }\n message User {\n string display_name = 1;\n string address = 2;\n }\n\n In proto a field mask for `Profile` may look as such:\n\n mask {\n paths: \"user.display_name\"\n paths: \"photo\"\n }\n\n In JSON, the same mask is represented as below:\n\n {\n mask: \"user.displayName,photo\"\n }\n\n # Field Masks and Oneof Fields\n\n Field masks treat fields in oneofs just as regular fields. Consider the\n following message:\n\n message SampleMessage {\n oneof test_oneof {\n string name = 4;\n SubMessage sub_message = 9;\n }\n }\n\n The field mask can be:\n\n mask {\n paths: \"name\"\n }\n\n Or:\n\n mask {\n paths: \"sub_message\"\n }\n\n Note that oneof type names (\"test_oneof\" in this case) cannot be used in\n paths.\n\n ## Field Mask Verification\n\n The implementation of any API method which has a FieldMask type field in the\n request should verify the included field paths, and return an\n `INVALID_ARGUMENT` error if any path is unmappable.\n",
"google.protobuf.FieldMask.paths": " The set of field mask paths.\n",
+ "google.protobuf.Timestamp": " A Timestamp represents a point in time independent of any time zone or local\n calendar, encoded as a count of seconds and fractions of seconds at\n nanosecond resolution. The count is relative to an epoch at UTC midnight on\n January 1, 1970, in the proleptic Gregorian calendar which extends the\n Gregorian calendar backwards to year one.\n\n All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n second table is needed for interpretation, using a [24-hour linear\n smear](https://developers.google.com/time/smear).\n\n The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n restricting to that range, we ensure that we can convert to and from [RFC\n 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\n # Examples\n\n Example 1: Compute Timestamp from POSIX `time()`.\n\n Timestamp timestamp;\n timestamp.set_seconds(time(NULL));\n timestamp.set_nanos(0);\n\n Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\n struct timeval tv;\n gettimeofday(&tv, NULL);\n\n Timestamp timestamp;\n timestamp.set_seconds(tv.tv_sec);\n timestamp.set_nanos(tv.tv_usec * 1000);\n\n Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\n FILETIME ft;\n GetSystemTimeAsFileTime(&ft);\n UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n Timestamp timestamp;\n timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\n Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\n long millis = System.currentTimeMillis();\n\n Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n Example 5: Compute Timestamp from Java `Instant.now()`.\n\n Instant now = Instant.now();\n\n Timestamp timestamp =\n Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n .setNanos(now.getNano()).build();\n\n Example 6: Compute Timestamp from current time in Python.\n\n timestamp = Timestamp()\n timestamp.GetCurrentTime()\n\n # JSON Mapping\n\n In JSON format, the Timestamp type is encoded as a string in the\n [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n where {year} is always expressed using four digits while {month}, {day},\n {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n is required. A proto3 JSON serializer should always use UTC (as indicated by\n \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n able to accept both UTC and other timezones (as indicated by an offset).\n\n For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n 01:30 UTC on January 15, 2017.\n\n In JavaScript, one can convert a Date object to this format using the\n standard\n [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n method. In Python, a standard `datetime.datetime` object can be converted\n to this format using\n [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n the Joda Time's [`ISODateTimeFormat.dateTime()`](\n http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n ) to obtain a formatter capable of generating timestamps in this format.\n\n",
"google.protobuf.Timestamp.nanos": " Non-negative fractions of a second at nanosecond resolution. Negative\n second values with fractions must still have non-negative nanos values\n that count forward in time. Must be from 0 to 999,999,999\n inclusive.\n",
"google.protobuf.Timestamp.seconds": " Represents seconds of UTC time since Unix epoch\n 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n 9999-12-31T23:59:59Z inclusive.\n",
+ "google.type.LatLng": " An object that represents a latitude/longitude pair. This is expressed as a\n pair of doubles to represent degrees latitude and degrees longitude. Unless\n specified otherwise, this must conform to the\n WGS84\n standard. Values must be within normalized ranges.\n",
"google.type.LatLng.latitude": " The latitude in degrees. It must be in the range [-90.0, +90.0].\n",
"google.type.LatLng.longitude": " The longitude in degrees. It must be in the range [-180.0, +180.0].\n",
},
@@ -164,6 +185,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&DeleteSiteRequest{},
&Site{},
map[protoreflect.FullName]string{
+ "einride.example.freight.v1.DeleteSiteRequest": " Request message for FreightService.DeleteSite.\n",
"einride.example.freight.v1.DeleteSiteRequest.name": " The resource name of the site to delete.\n Format: shippers/{shipper}/sites/{site}\n",
"einride.example.freight.v1.FreightService.DeleteSite": " Delete a site.\n\n See: https://google.aip.dev/135 (Standard methods: Delete).\n See: https://google.aip.dev/164 (Soft delete).\n",
},
@@ -175,6 +197,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&BatchGetSitesRequest{},
&BatchGetSitesResponse{},
map[protoreflect.FullName]string{
+ "einride.example.freight.v1.BatchGetSitesRequest": " Request message for FreightService.BatchGetSites.\n",
"einride.example.freight.v1.BatchGetSitesRequest.names": " The names of the sites to retrieve.\n A maximum of 1000 sites can be retrieved in a batch.\n Format: `shippers/{shipper}/sites/{site}`\n",
"einride.example.freight.v1.BatchGetSitesRequest.parent": " The parent resource shared by all sites being retrieved.\n If this is set, the parent of all of the sites specified in `names`\n must match this field.\n Format: `shippers/{shipper}`\n",
"einride.example.freight.v1.FreightService.BatchGetSites": " Batch get sites.\n\n See: https://google.aip.dev/231 (Batch methods: Get).\n",
@@ -188,6 +211,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&Shipment{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.GetShipment": " Get a shipment.\n\n See: https://google.aip.dev/131 (Standard methods: Get).\n",
+ "einride.example.freight.v1.GetShipmentRequest": " Request message for FreightService.GetShipment.\n",
"einride.example.freight.v1.GetShipmentRequest.name": " The resource name of the shipment to retrieve.\n Format: shippers/{shipper}/shipments/{shipment}\n",
},
),
@@ -199,6 +223,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&ListShipmentsResponse{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.ListShipments": " List shipments for a shipper.\n\n See: https://google.aip.dev/132 (Standard methods: List).\n",
+ "einride.example.freight.v1.ListShipmentsRequest": " Request message for FreightService.ListShipments.\n",
"einride.example.freight.v1.ListShipmentsRequest.page_size": " Requested page size. Server may return fewer shipments than requested.\n If unspecified, server will pick an appropriate default.\n",
"einride.example.freight.v1.ListShipmentsRequest.page_token": " A token identifying a page of results the server should return.\n Typically, this is the value of\n [ListShipmentsResponse.next_page_token][einride.example.freight.v1.ListShipmentsResponse.next_page_token]\n returned from the previous call to `ListShipments` method.\n",
"einride.example.freight.v1.ListShipmentsRequest.parent": " The resource name of the parent, which owns this collection of shipments.\n Format: shippers/{shipper}\n",
@@ -211,13 +236,17 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&CreateShipmentRequest{},
&Shipment{},
map[protoreflect.FullName]string{
+ "einride.example.freight.v1.CreateShipmentRequest": " Request message for FreightService.CreateShipment.\n",
"einride.example.freight.v1.CreateShipmentRequest.parent": " The resource name of the parent shipper for which this shipment will be created.\n Format: shippers/{shipper}\n",
"einride.example.freight.v1.CreateShipmentRequest.shipment": " The shipment to create.\n",
"einride.example.freight.v1.FreightService.CreateShipment": " Create a shipment.\n\n See: https://google.aip.dev/133 (Standard methods: Create).\n",
+ "einride.example.freight.v1.LineItem": " A shipment line item.\n",
"einride.example.freight.v1.LineItem.quantity": " The quantity of the line item.\n",
"einride.example.freight.v1.LineItem.title": " The title of the line item.\n",
"einride.example.freight.v1.LineItem.volume_m3": " The volume of the line item in cubic meters.\n",
"einride.example.freight.v1.LineItem.weight_kg": " The weight of the line item in kilograms.\n",
+ "einride.example.freight.v1.Shipment": " A shipment represents transportation of goods between an origin\n [site][einride.example.freight.v1.Site] and a destination\n [site][einride.example.freight.v1.Site].\n",
+ "einride.example.freight.v1.Shipment.AnnotationsEntry": "",
"einride.example.freight.v1.Shipment.AnnotationsEntry.key": "",
"einride.example.freight.v1.Shipment.AnnotationsEntry.value": "",
"einride.example.freight.v1.Shipment.annotations": " Annotations of the shipment.\n",
@@ -232,6 +261,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
"einride.example.freight.v1.Shipment.pickup_earliest_time": " The earliest pickup time of the shipment at the origin site.\n",
"einride.example.freight.v1.Shipment.pickup_latest_time": " The latest pickup time of the shipment at the origin site.\n",
"einride.example.freight.v1.Shipment.update_time": " The last update timestamp of the shipment.\n\n Updated when create/update/delete operation is shipment.\n",
+ "google.protobuf.Timestamp": " A Timestamp represents a point in time independent of any time zone or local\n calendar, encoded as a count of seconds and fractions of seconds at\n nanosecond resolution. The count is relative to an epoch at UTC midnight on\n January 1, 1970, in the proleptic Gregorian calendar which extends the\n Gregorian calendar backwards to year one.\n\n All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n second table is needed for interpretation, using a [24-hour linear\n smear](https://developers.google.com/time/smear).\n\n The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n restricting to that range, we ensure that we can convert to and from [RFC\n 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\n # Examples\n\n Example 1: Compute Timestamp from POSIX `time()`.\n\n Timestamp timestamp;\n timestamp.set_seconds(time(NULL));\n timestamp.set_nanos(0);\n\n Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\n struct timeval tv;\n gettimeofday(&tv, NULL);\n\n Timestamp timestamp;\n timestamp.set_seconds(tv.tv_sec);\n timestamp.set_nanos(tv.tv_usec * 1000);\n\n Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\n FILETIME ft;\n GetSystemTimeAsFileTime(&ft);\n UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n Timestamp timestamp;\n timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\n Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\n long millis = System.currentTimeMillis();\n\n Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n Example 5: Compute Timestamp from Java `Instant.now()`.\n\n Instant now = Instant.now();\n\n Timestamp timestamp =\n Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n .setNanos(now.getNano()).build();\n\n Example 6: Compute Timestamp from current time in Python.\n\n timestamp = Timestamp()\n timestamp.GetCurrentTime()\n\n # JSON Mapping\n\n In JSON format, the Timestamp type is encoded as a string in the\n [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n where {year} is always expressed using four digits while {month}, {day},\n {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n is required. A proto3 JSON serializer should always use UTC (as indicated by\n \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n able to accept both UTC and other timezones (as indicated by an offset).\n\n For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n 01:30 UTC on January 15, 2017.\n\n In JavaScript, one can convert a Date object to this format using the\n standard\n [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n method. In Python, a standard `datetime.datetime` object can be converted\n to this format using\n [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n the Joda Time's [`ISODateTimeFormat.dateTime()`](\n http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n ) to obtain a formatter capable of generating timestamps in this format.\n\n",
"google.protobuf.Timestamp.nanos": " Non-negative fractions of a second at nanosecond resolution. Negative\n second values with fractions must still have non-negative nanos values\n that count forward in time. Must be from 0 to 999,999,999\n inclusive.\n",
"google.protobuf.Timestamp.seconds": " Represents seconds of UTC time since Unix epoch\n 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n 9999-12-31T23:59:59Z inclusive.\n",
},
@@ -244,10 +274,13 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&Shipment{},
map[protoreflect.FullName]string{
"einride.example.freight.v1.FreightService.UpdateShipment": " Update a shipment.\n\n See: https://google.aip.dev/134 (Standard methods: Update).\n",
+ "einride.example.freight.v1.LineItem": " A shipment line item.\n",
"einride.example.freight.v1.LineItem.quantity": " The quantity of the line item.\n",
"einride.example.freight.v1.LineItem.title": " The title of the line item.\n",
"einride.example.freight.v1.LineItem.volume_m3": " The volume of the line item in cubic meters.\n",
"einride.example.freight.v1.LineItem.weight_kg": " The weight of the line item in kilograms.\n",
+ "einride.example.freight.v1.Shipment": " A shipment represents transportation of goods between an origin\n [site][einride.example.freight.v1.Site] and a destination\n [site][einride.example.freight.v1.Site].\n",
+ "einride.example.freight.v1.Shipment.AnnotationsEntry": "",
"einride.example.freight.v1.Shipment.AnnotationsEntry.key": "",
"einride.example.freight.v1.Shipment.AnnotationsEntry.value": "",
"einride.example.freight.v1.Shipment.annotations": " Annotations of the shipment.\n",
@@ -262,9 +295,12 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
"einride.example.freight.v1.Shipment.pickup_earliest_time": " The earliest pickup time of the shipment at the origin site.\n",
"einride.example.freight.v1.Shipment.pickup_latest_time": " The latest pickup time of the shipment at the origin site.\n",
"einride.example.freight.v1.Shipment.update_time": " The last update timestamp of the shipment.\n\n Updated when create/update/delete operation is shipment.\n",
+ "einride.example.freight.v1.UpdateShipmentRequest": " Request message for FreightService.UpdateShipment.\n",
"einride.example.freight.v1.UpdateShipmentRequest.shipment": " The shipment to update with. The name must match or be empty.\n The shipment's `name` field is used to identify the shipment to be updated.\n Format: shippers/{shipper}/shipments/{shipment}\n",
"einride.example.freight.v1.UpdateShipmentRequest.update_mask": " The list of fields to be updated.\n",
+ "google.protobuf.FieldMask": " `FieldMask` represents a set of symbolic field paths, for example:\n\n paths: \"f.a\"\n paths: \"f.b.d\"\n\n Here `f` represents a field in some root message, `a` and `b`\n fields in the message found in `f`, and `d` a field found in the\n message in `f.b`.\n\n Field masks are used to specify a subset of fields that should be\n returned by a get operation or modified by an update operation.\n Field masks also have a custom JSON encoding (see below).\n\n # Field Masks in Projections\n\n When used in the context of a projection, a response message or\n sub-message is filtered by the API to only contain those fields as\n specified in the mask. For example, if the mask in the previous\n example is applied to a response message as follows:\n\n f {\n a : 22\n b {\n d : 1\n x : 2\n }\n y : 13\n }\n z: 8\n\n The result will not contain specific values for fields x,y and z\n (their value will be set to the default, and omitted in proto text\n output):\n\n\n f {\n a : 22\n b {\n d : 1\n }\n }\n\n A repeated field is not allowed except at the last position of a\n paths string.\n\n If a FieldMask object is not present in a get operation, the\n operation applies to all fields (as if a FieldMask of all fields\n had been specified).\n\n Note that a field mask does not necessarily apply to the\n top-level response message. In case of a REST get operation, the\n field mask applies directly to the response, but in case of a REST\n list operation, the mask instead applies to each individual message\n in the returned resource list. In case of a REST custom method,\n other definitions may be used. Where the mask applies will be\n clearly documented together with its declaration in the API. In\n any case, the effect on the returned resource/resources is required\n behavior for APIs.\n\n # Field Masks in Update Operations\n\n A field mask in update operations specifies which fields of the\n targeted resource are going to be updated. The API is required\n to only change the values of the fields as specified in the mask\n and leave the others untouched. If a resource is passed in to\n describe the updated values, the API ignores the values of all\n fields not covered by the mask.\n\n If a repeated field is specified for an update operation, new values will\n be appended to the existing repeated field in the target resource. Note that\n a repeated field is only allowed in the last position of a `paths` string.\n\n If a sub-message is specified in the last position of the field mask for an\n update operation, then new value will be merged into the existing sub-message\n in the target resource.\n\n For example, given the target message:\n\n f {\n b {\n d: 1\n x: 2\n }\n c: [1]\n }\n\n And an update message:\n\n f {\n b {\n d: 10\n }\n c: [2]\n }\n\n then if the field mask is:\n\n paths: [\"f.b\", \"f.c\"]\n\n then the result will be:\n\n f {\n b {\n d: 10\n x: 2\n }\n c: [1, 2]\n }\n\n An implementation may provide options to override this default behavior for\n repeated and message fields.\n\n In order to reset a field's value to the default, the field must\n be in the mask and set to the default value in the provided resource.\n Hence, in order to reset all fields of a resource, provide a default\n instance of the resource and set all fields in the mask, or do\n not provide a mask as described below.\n\n If a field mask is not present on update, the operation applies to\n all fields (as if a field mask of all fields has been specified).\n Note that in the presence of schema evolution, this may mean that\n fields the client does not know and has therefore not filled into\n the request will be reset to their default. If this is unwanted\n behavior, a specific service may require a client to always specify\n a field mask, producing an error if not.\n\n As with get operations, the location of the resource which\n describes the updated values in the request message depends on the\n operation kind. In any case, the effect of the field mask is\n required to be honored by the API.\n\n ## Considerations for HTTP REST\n\n The HTTP kind of an update operation which uses a field mask must\n be set to PATCH instead of PUT in order to satisfy HTTP semantics\n (PUT must only be used for full updates).\n\n # JSON Encoding of Field Masks\n\n In JSON, a field mask is encoded as a single string where paths are\n separated by a comma. Fields name in each path are converted\n to/from lower-camel naming conventions.\n\n As an example, consider the following message declarations:\n\n message Profile {\n User user = 1;\n Photo photo = 2;\n }\n message User {\n string display_name = 1;\n string address = 2;\n }\n\n In proto a field mask for `Profile` may look as such:\n\n mask {\n paths: \"user.display_name\"\n paths: \"photo\"\n }\n\n In JSON, the same mask is represented as below:\n\n {\n mask: \"user.displayName,photo\"\n }\n\n # Field Masks and Oneof Fields\n\n Field masks treat fields in oneofs just as regular fields. Consider the\n following message:\n\n message SampleMessage {\n oneof test_oneof {\n string name = 4;\n SubMessage sub_message = 9;\n }\n }\n\n The field mask can be:\n\n mask {\n paths: \"name\"\n }\n\n Or:\n\n mask {\n paths: \"sub_message\"\n }\n\n Note that oneof type names (\"test_oneof\" in this case) cannot be used in\n paths.\n\n ## Field Mask Verification\n\n The implementation of any API method which has a FieldMask type field in the\n request should verify the included field paths, and return an\n `INVALID_ARGUMENT` error if any path is unmappable.\n",
"google.protobuf.FieldMask.paths": " The set of field mask paths.\n",
+ "google.protobuf.Timestamp": " A Timestamp represents a point in time independent of any time zone or local\n calendar, encoded as a count of seconds and fractions of seconds at\n nanosecond resolution. The count is relative to an epoch at UTC midnight on\n January 1, 1970, in the proleptic Gregorian calendar which extends the\n Gregorian calendar backwards to year one.\n\n All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n second table is needed for interpretation, using a [24-hour linear\n smear](https://developers.google.com/time/smear).\n\n The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n restricting to that range, we ensure that we can convert to and from [RFC\n 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n\n # Examples\n\n Example 1: Compute Timestamp from POSIX `time()`.\n\n Timestamp timestamp;\n timestamp.set_seconds(time(NULL));\n timestamp.set_nanos(0);\n\n Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n\n struct timeval tv;\n gettimeofday(&tv, NULL);\n\n Timestamp timestamp;\n timestamp.set_seconds(tv.tv_sec);\n timestamp.set_nanos(tv.tv_usec * 1000);\n\n Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\n FILETIME ft;\n GetSystemTimeAsFileTime(&ft);\n UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n\n // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n Timestamp timestamp;\n timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\n Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\n long millis = System.currentTimeMillis();\n\n Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n .setNanos((int) ((millis % 1000) * 1000000)).build();\n\n Example 5: Compute Timestamp from Java `Instant.now()`.\n\n Instant now = Instant.now();\n\n Timestamp timestamp =\n Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n .setNanos(now.getNano()).build();\n\n Example 6: Compute Timestamp from current time in Python.\n\n timestamp = Timestamp()\n timestamp.GetCurrentTime()\n\n # JSON Mapping\n\n In JSON format, the Timestamp type is encoded as a string in the\n [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n where {year} is always expressed using four digits while {month}, {day},\n {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n is required. A proto3 JSON serializer should always use UTC (as indicated by\n \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n able to accept both UTC and other timezones (as indicated by an offset).\n\n For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n 01:30 UTC on January 15, 2017.\n\n In JavaScript, one can convert a Date object to this format using the\n standard\n [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n method. In Python, a standard `datetime.datetime` object can be converted\n to this format using\n [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n the Joda Time's [`ISODateTimeFormat.dateTime()`](\n http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n ) to obtain a formatter capable of generating timestamps in this format.\n\n",
"google.protobuf.Timestamp.nanos": " Non-negative fractions of a second at nanosecond resolution. Negative\n second values with fractions must still have non-negative nanos values\n that count forward in time. Must be from 0 to 999,999,999\n inclusive.\n",
"google.protobuf.Timestamp.seconds": " Represents seconds of UTC time since Unix epoch\n 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n 9999-12-31T23:59:59Z inclusive.\n",
},
@@ -276,6 +312,7 @@ func NewFreightServiceCommand(config aipcli.Config) *cobra.Command {
&DeleteShipmentRequest{},
&Shipment{},
map[protoreflect.FullName]string{
+ "einride.example.freight.v1.DeleteShipmentRequest": " Request message for FreightService.DeleteShipment.\n",
"einride.example.freight.v1.DeleteShipmentRequest.name": " The resource name of the shipment to delete.\n Format: shippers/{shipper}/shipments/{shipment}\n",
"einride.example.freight.v1.FreightService.DeleteShipment": " Delete a shipment.\n\n See: https://google.aip.dev/135 (Standard methods: Delete).\n See: https://google.aip.dev/164 (Soft delete).\n",
},
diff --git a/go.mod b/go.mod
index 44f813a..39701a8 100644
--- a/go.mod
+++ b/go.mod
@@ -2,7 +2,7 @@ module go.einride.tech/aip-cli
go 1.24.10
-toolchain go1.25.4
+toolchain go1.25.5
require (
cloud.google.com/go/iam v1.2.1
diff --git a/internal/gengoaipcli/comments.go b/internal/gengoaipcli/comments.go
index ab8a88b..190881e 100644
--- a/internal/gengoaipcli/comments.go
+++ b/internal/gengoaipcli/comments.go
@@ -1,6 +1,8 @@
package gengoaipcli
-import "google.golang.org/protobuf/reflect/protoreflect"
+import (
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
func collectDescriptorComments(comments map[protoreflect.FullName]string, desc protoreflect.Descriptor) {
comments[desc.FullName()] = desc.ParentFile().SourceLocations().ByDescriptor(desc).LeadingComments
@@ -12,6 +14,11 @@ func collectMethodComments(comments map[protoreflect.FullName]string, method pro
}
func collectMessageComments(comments map[protoreflect.FullName]string, msg protoreflect.MessageDescriptor) {
+ if _, ok := comments[msg.FullName()]; ok {
+ // already collected comments for this message
+ return
+ }
+ collectDescriptorComments(comments, msg)
for i := 0; i < msg.Fields().Len(); i++ {
field := msg.Fields().Get(i)
collectDescriptorComments(comments, field)