mirror of
https://github.com/coder/coder.git
synced 2026-06-04 05:28:20 +00:00
41420aea3c
Bumps [ts-proto](https://github.com/stephenh/ts-proto) from 1.164.0 to 1.181.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/stephenh/ts-proto/releases">ts-proto's releases</a>.</em></p> <blockquote> <h2>v1.181.2</h2> <h2><a href="https://github.com/stephenh/ts-proto/compare/v1.181.1...v1.181.2">1.181.2</a> (2024-08-15)</h2> <h3>Bug Fixes</h3> <ul> <li>toJSON Function with <code>removeEnumPrefix=true</code> and <code>unrecognizedEnumValue=0</code> Options (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1089">#1089</a>) (<a href="https://github.com/stephenh/ts-proto/commit/24014908f814e2720b9c2b9bd2ae1773be880a16">2401490</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/1086">#1086</a> <a href="https://redirect.github.com/stephenh/ts-proto/issues/1086">#1086</a></li> </ul> <h2>v1.181.1</h2> <h2><a href="https://github.com/stephenh/ts-proto/compare/v1.181.0...v1.181.1">1.181.1</a> (2024-07-13)</h2> <h3>Bug Fixes</h3> <ul> <li>Incorrect message names in the generated code for repeated fields (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1073">#1073</a>) (<a href="https://github.com/stephenh/ts-proto/commit/8a95d8e0983a38e604b6990461e726db566ff311">8a95d8e</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/1072">#1072</a></li> </ul> <h2>v1.181.0</h2> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.180.0...v1.181.0">1.181.0</a> (2024-07-01)</h1> <h3>Features</h3> <ul> <li>added the "typePrefix" and "typeSuffix" options. (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1069">#1069</a>) (<a href="https://github.com/stephenh/ts-proto/commit/ab515cda322baeb94c7588117e4bb5bee6281874">ab515cd</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/1033">#1033</a></li> </ul> <h2>v1.180.0</h2> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.179.0...v1.180.0">1.180.0</a> (2024-06-15)</h1> <h3>Features</h3> <ul> <li>oneof=unions-value to use the same field name for oneof cases (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1062">#1062</a>) (<a href="https://github.com/stephenh/ts-proto/commit/74930908cc8e5292577a793b7ae06c3721225ac3">7493090</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/1060">#1060</a></li> </ul> <h2>v1.179.0</h2> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.178.0...v1.179.0">1.179.0</a> (2024-06-15)</h1> <h3>Features</h3> <ul> <li>bigIntLiteral option for using BigInt literals (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1063">#1063</a>) (<a href="https://github.com/stephenh/ts-proto/commit/b89fbcb1f99ccfcd1f06551286c2459e44a3bac2">b89fbcb</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/928">#928</a> <a href="https://redirect.github.com/stephenh/ts-proto/issues/932">#932</a></li> </ul> <h2>v1.178.0</h2> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.177.0...v1.178.0">1.178.0</a> (2024-06-07)</h1> <h3>Features</h3> <ul> <li><code>no-file-descriptor</code> setting for outputSchema option (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1047">#1047</a>) (<a href="https://github.com/stephenh/ts-proto/commit/c54f06c4a7dd766abf3f91932b1e4cdf38b7f346">c54f06c</a>)</li> </ul> <h2>v1.177.0</h2> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.176.3...v1.177.0">1.177.0</a> (2024-06-07)</h1> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/stephenh/ts-proto/blob/main/CHANGELOG.md">ts-proto's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/stephenh/ts-proto/compare/v1.181.1...v1.181.2">1.181.2</a> (2024-08-15)</h2> <h3>Bug Fixes</h3> <ul> <li>toJSON Function with <code>removeEnumPrefix=true</code> and <code>unrecognizedEnumValue=0</code> Options (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1089">#1089</a>) (<a href="https://github.com/stephenh/ts-proto/commit/24014908f814e2720b9c2b9bd2ae1773be880a16">2401490</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/1086">#1086</a> <a href="https://redirect.github.com/stephenh/ts-proto/issues/1086">#1086</a></li> </ul> <h2><a href="https://github.com/stephenh/ts-proto/compare/v1.181.0...v1.181.1">1.181.1</a> (2024-07-13)</h2> <h3>Bug Fixes</h3> <ul> <li>Incorrect message names in the generated code for repeated fields (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1073">#1073</a>) (<a href="https://github.com/stephenh/ts-proto/commit/8a95d8e0983a38e604b6990461e726db566ff311">8a95d8e</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/1072">#1072</a></li> </ul> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.180.0...v1.181.0">1.181.0</a> (2024-07-01)</h1> <h3>Features</h3> <ul> <li>added the "typePrefix" and "typeSuffix" options. (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1069">#1069</a>) (<a href="https://github.com/stephenh/ts-proto/commit/ab515cda322baeb94c7588117e4bb5bee6281874">ab515cd</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/1033">#1033</a></li> </ul> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.179.0...v1.180.0">1.180.0</a> (2024-06-15)</h1> <h3>Features</h3> <ul> <li>oneof=unions-value to use the same field name for oneof cases (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1062">#1062</a>) (<a href="https://github.com/stephenh/ts-proto/commit/74930908cc8e5292577a793b7ae06c3721225ac3">7493090</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/1060">#1060</a></li> </ul> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.178.0...v1.179.0">1.179.0</a> (2024-06-15)</h1> <h3>Features</h3> <ul> <li>bigIntLiteral option for using BigInt literals (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1063">#1063</a>) (<a href="https://github.com/stephenh/ts-proto/commit/b89fbcb1f99ccfcd1f06551286c2459e44a3bac2">b89fbcb</a>), closes <a href="https://redirect.github.com/stephenh/ts-proto/issues/928">#928</a> <a href="https://redirect.github.com/stephenh/ts-proto/issues/932">#932</a></li> </ul> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.177.0...v1.178.0">1.178.0</a> (2024-06-07)</h1> <h3>Features</h3> <ul> <li><code>no-file-descriptor</code> setting for outputSchema option (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1047">#1047</a>) (<a href="https://github.com/stephenh/ts-proto/commit/c54f06c4a7dd766abf3f91932b1e4cdf38b7f346">c54f06c</a>)</li> </ul> <h1><a href="https://github.com/stephenh/ts-proto/compare/v1.176.3...v1.177.0">1.177.0</a> (2024-06-07)</h1> <h3>Features</h3> <ul> <li>add option <code>noDefaultsForOptionals</code> (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1051">#1051</a>) (<a href="https://github.com/stephenh/ts-proto/commit/41d10205bf68468c37cf69e58dc4c4fdbfffcf5b">41d1020</a>)</li> </ul> <h2><a href="https://github.com/stephenh/ts-proto/compare/v1.176.2...v1.176.3">1.176.3</a> (2024-06-07)</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/stephenh/ts-proto/commit/290d0c51e7bea305f4759c138c43aef8a22af19b"><code>290d0c5</code></a> chore(release): 1.181.2 [skip ci]</li> <li><a href="https://github.com/stephenh/ts-proto/commit/24014908f814e2720b9c2b9bd2ae1773be880a16"><code>2401490</code></a> fix: toJSON Function with <code>removeEnumPrefix=true</code> and `unrecognizedEnumValue=...</li> <li><a href="https://github.com/stephenh/ts-proto/commit/76243a860bdcadb16086379abebb60ff9cc3d363"><code>76243a8</code></a> chore(release): 1.181.1 [skip ci]</li> <li><a href="https://github.com/stephenh/ts-proto/commit/8a95d8e0983a38e604b6990461e726db566ff311"><code>8a95d8e</code></a> fix: Incorrect message names in the generated code for repeated fields (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1073">#1073</a>)</li> <li><a href="https://github.com/stephenh/ts-proto/commit/2078d1a905ad7961e168971c51b852deae930b6d"><code>2078d1a</code></a> Remove .DS_Store (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1071">#1071</a>)</li> <li><a href="https://github.com/stephenh/ts-proto/commit/c5546fba41ed248ffa750172aae3544e70ffddb8"><code>c5546fb</code></a> chore(release): 1.181.0 [skip ci]</li> <li><a href="https://github.com/stephenh/ts-proto/commit/ab515cda322baeb94c7588117e4bb5bee6281874"><code>ab515cd</code></a> feat: added the "typePrefix" and "typeSuffix" options. (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1069">#1069</a>)</li> <li><a href="https://github.com/stephenh/ts-proto/commit/14e7e0f6a94a9309d16fb8d62467c95b3d001529"><code>14e7e0f</code></a> docs: Describe <code>oneof=unions-value</code> output as Algebraic Data Type (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1065">#1065</a>)</li> <li><a href="https://github.com/stephenh/ts-proto/commit/84ccaf2badc2def72b03f11d6faac645d1677f97"><code>84ccaf2</code></a> chore(release): 1.180.0 [skip ci]</li> <li><a href="https://github.com/stephenh/ts-proto/commit/74930908cc8e5292577a793b7ae06c3721225ac3"><code>7493090</code></a> feat: oneof=unions-value to use the same field name for oneof cases (<a href="https://redirect.github.com/stephenh/ts-proto/issues/1062">#1062</a>)</li> <li>Additional commits viewable in <a href="https://github.com/stephenh/ts-proto/compare/v1.164.0...v1.181.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: ケイラ <kayla@tree.camp>
130 lines
4.9 KiB
TypeScript
130 lines
4.9 KiB
TypeScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-ts_proto v1.181.2
|
|
// protoc v4.23.4
|
|
// source: google/protobuf/timestamp.proto
|
|
|
|
/* eslint-disable */
|
|
import * as _m0 from "protobufjs/minimal";
|
|
|
|
export const protobufPackage = "google.protobuf";
|
|
|
|
/**
|
|
* A Timestamp represents a point in time independent of any time zone or local
|
|
* calendar, encoded as a count of seconds and fractions of seconds at
|
|
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
|
* January 1, 1970, in the proleptic Gregorian calendar which extends the
|
|
* Gregorian calendar backwards to year one.
|
|
*
|
|
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
|
* second table is needed for interpretation, using a [24-hour linear
|
|
* smear](https://developers.google.com/time/smear).
|
|
*
|
|
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
|
* restricting to that range, we ensure that we can convert to and from [RFC
|
|
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
|
*
|
|
* # Examples
|
|
*
|
|
* Example 1: Compute Timestamp from POSIX `time()`.
|
|
*
|
|
* Timestamp timestamp;
|
|
* timestamp.set_seconds(time(NULL));
|
|
* timestamp.set_nanos(0);
|
|
*
|
|
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
|
*
|
|
* struct timeval tv;
|
|
* gettimeofday(&tv, NULL);
|
|
*
|
|
* Timestamp timestamp;
|
|
* timestamp.set_seconds(tv.tv_sec);
|
|
* timestamp.set_nanos(tv.tv_usec * 1000);
|
|
*
|
|
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
|
*
|
|
* FILETIME ft;
|
|
* GetSystemTimeAsFileTime(&ft);
|
|
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
|
*
|
|
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
|
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
|
* Timestamp timestamp;
|
|
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
|
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
|
*
|
|
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
|
*
|
|
* long millis = System.currentTimeMillis();
|
|
*
|
|
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
|
* .setNanos((int) ((millis % 1000) * 1000000)).build();
|
|
*
|
|
* Example 5: Compute Timestamp from Java `Instant.now()`.
|
|
*
|
|
* Instant now = Instant.now();
|
|
*
|
|
* Timestamp timestamp =
|
|
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
|
* .setNanos(now.getNano()).build();
|
|
*
|
|
* Example 6: Compute Timestamp from current time in Python.
|
|
*
|
|
* timestamp = Timestamp()
|
|
* timestamp.GetCurrentTime()
|
|
*
|
|
* # JSON Mapping
|
|
*
|
|
* In JSON format, the Timestamp type is encoded as a string in the
|
|
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
|
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
|
|
* where {year} is always expressed using four digits while {month}, {day},
|
|
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
* is required. A proto3 JSON serializer should always use UTC (as indicated by
|
|
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
|
* able to accept both UTC and other timezones (as indicated by an offset).
|
|
*
|
|
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
* 01:30 UTC on January 15, 2017.
|
|
*
|
|
* In JavaScript, one can convert a Date object to this format using the
|
|
* standard
|
|
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
* method. In Python, a standard `datetime.datetime` object can be converted
|
|
* to this format using
|
|
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
|
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
|
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
|
* ) to obtain a formatter capable of generating timestamps in this format.
|
|
*/
|
|
export interface Timestamp {
|
|
/**
|
|
* Represents seconds of UTC time since Unix epoch
|
|
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
|
* 9999-12-31T23:59:59Z inclusive.
|
|
*/
|
|
seconds: number;
|
|
/**
|
|
* Non-negative fractions of a second at nanosecond resolution. Negative
|
|
* second values with fractions must still have non-negative nanos values
|
|
* that count forward in time. Must be from 0 to 999,999,999
|
|
* inclusive.
|
|
*/
|
|
nanos: number;
|
|
}
|
|
|
|
export const Timestamp = {
|
|
encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
if (message.seconds !== 0) {
|
|
writer.uint32(8).int64(message.seconds);
|
|
}
|
|
if (message.nanos !== 0) {
|
|
writer.uint32(16).int32(message.nanos);
|
|
}
|
|
return writer;
|
|
},
|
|
};
|