@@ -355,94 +355,7 @@ func (r serviceJSON) RawJSON() string {
355
355
}
356
356
357
357
type ServiceMetadata struct {
358
- // A Timestamp represents a point in time independent of any time zone or local
359
- // calendar, encoded as a count of seconds and fractions of seconds at nanosecond
360
- // resolution. The count is relative to an epoch at UTC midnight on January 1,
361
- // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar
362
- // backwards to year one.
363
- //
364
- // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
365
- // second table is needed for interpretation, using a
366
- // [24-hour linear smear](https://developers.google.com/time/smear).
367
- //
368
- // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
369
- // restricting to that range, we ensure that we can convert to and from
370
- // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
371
- //
372
- // # Examples
373
- //
374
- // Example 1: Compute Timestamp from POSIX `time()`.
375
- //
376
- // Timestamp timestamp;
377
- // timestamp.set_seconds(time(NULL));
378
- // timestamp.set_nanos(0);
379
- //
380
- // Example 2: Compute Timestamp from POSIX `gettimeofday()`.
381
- //
382
- // struct timeval tv;
383
- // gettimeofday(&tv, NULL);
384
- //
385
- // Timestamp timestamp;
386
- // timestamp.set_seconds(tv.tv_sec);
387
- // timestamp.set_nanos(tv.tv_usec * 1000);
388
- //
389
- // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
390
- //
391
- // FILETIME ft;
392
- // GetSystemTimeAsFileTime(&ft);
393
- // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
394
- //
395
- // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
396
- // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
397
- // Timestamp timestamp;
398
- // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
399
- // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
400
- //
401
- // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
402
- //
403
- // long millis = System.currentTimeMillis();
404
- //
405
- // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
406
- // .setNanos((int) ((millis % 1000) * 1000000)).build();
407
- //
408
- // Example 5: Compute Timestamp from Java `Instant.now()`.
409
- //
410
- // Instant now = Instant.now();
411
- //
412
- // Timestamp timestamp =
413
- // Timestamp.newBuilder().setSeconds(now.getEpochSecond())
414
- // .setNanos(now.getNano()).build();
415
- //
416
- // Example 6: Compute Timestamp from current time in Python.
417
- //
418
- // timestamp = Timestamp()
419
- // timestamp.GetCurrentTime()
420
- //
421
- // # JSON Mapping
422
- //
423
- // In JSON format, the Timestamp type is encoded as a string in the
424
- // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
425
- // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always
426
- // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are
427
- // zero-padded to two digits each. The fractional seconds, which can go up to 9
428
- // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix
429
- // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON
430
- // serializer should always use UTC (as indicated by "Z") when printing the
431
- // Timestamp type and a proto3 JSON parser should be able to accept both UTC and
432
- // other timezones (as indicated by an offset).
433
- //
434
- // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on
435
- // January 15, 2017.
436
- //
437
- // In JavaScript, one can convert a Date object to this format using the standard
438
- // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
439
- // method. In Python, a standard `datetime.datetime` object can be converted to
440
- // this format using
441
- // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the
442
- // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the
443
- // Joda Time's
444
- // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
445
- // to obtain a formatter capable of generating timestamps in this format.
358
+ // created_at is the time the service was created.
446
359
CreatedAt time.Time `json:"createdAt" format:"date-time"`
447
360
// creator describes the principal who created the service.
448
361
Creator shared.Subject `json:"creator"`
@@ -483,94 +396,7 @@ func (r serviceMetadataJSON) RawJSON() string {
483
396
}
484
397
485
398
type ServiceMetadataParam struct {
486
- // A Timestamp represents a point in time independent of any time zone or local
487
- // calendar, encoded as a count of seconds and fractions of seconds at nanosecond
488
- // resolution. The count is relative to an epoch at UTC midnight on January 1,
489
- // 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar
490
- // backwards to year one.
491
- //
492
- // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
493
- // second table is needed for interpretation, using a
494
- // [24-hour linear smear](https://developers.google.com/time/smear).
495
- //
496
- // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
497
- // restricting to that range, we ensure that we can convert to and from
498
- // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
499
- //
500
- // # Examples
501
- //
502
- // Example 1: Compute Timestamp from POSIX `time()`.
503
- //
504
- // Timestamp timestamp;
505
- // timestamp.set_seconds(time(NULL));
506
- // timestamp.set_nanos(0);
507
- //
508
- // Example 2: Compute Timestamp from POSIX `gettimeofday()`.
509
- //
510
- // struct timeval tv;
511
- // gettimeofday(&tv, NULL);
512
- //
513
- // Timestamp timestamp;
514
- // timestamp.set_seconds(tv.tv_sec);
515
- // timestamp.set_nanos(tv.tv_usec * 1000);
516
- //
517
- // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
518
- //
519
- // FILETIME ft;
520
- // GetSystemTimeAsFileTime(&ft);
521
- // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
522
- //
523
- // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
524
- // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
525
- // Timestamp timestamp;
526
- // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
527
- // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
528
- //
529
- // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
530
- //
531
- // long millis = System.currentTimeMillis();
532
- //
533
- // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
534
- // .setNanos((int) ((millis % 1000) * 1000000)).build();
535
- //
536
- // Example 5: Compute Timestamp from Java `Instant.now()`.
537
- //
538
- // Instant now = Instant.now();
539
- //
540
- // Timestamp timestamp =
541
- // Timestamp.newBuilder().setSeconds(now.getEpochSecond())
542
- // .setNanos(now.getNano()).build();
543
- //
544
- // Example 6: Compute Timestamp from current time in Python.
545
- //
546
- // timestamp = Timestamp()
547
- // timestamp.GetCurrentTime()
548
- //
549
- // # JSON Mapping
550
- //
551
- // In JSON format, the Timestamp type is encoded as a string in the
552
- // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is
553
- // "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always
554
- // expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are
555
- // zero-padded to two digits each. The fractional seconds, which can go up to 9
556
- // digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix
557
- // indicates the timezone ("UTC"); the timezone is required. A proto3 JSON
558
- // serializer should always use UTC (as indicated by "Z") when printing the
559
- // Timestamp type and a proto3 JSON parser should be able to accept both UTC and
560
- // other timezones (as indicated by an offset).
561
- //
562
- // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on
563
- // January 15, 2017.
564
- //
565
- // In JavaScript, one can convert a Date object to this format using the standard
566
- // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
567
- // method. In Python, a standard `datetime.datetime` object can be converted to
568
- // this format using
569
- // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the
570
- // time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the
571
- // Joda Time's
572
- // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
573
- // to obtain a formatter capable of generating timestamps in this format.
399
+ // created_at is the time the service was created.
574
400
CreatedAt param.Field [time.Time ] `json:"createdAt" format:"date-time"`
575
401
// creator describes the principal who created the service.
576
402
Creator param.Field [shared.SubjectParam ] `json:"creator"`
0 commit comments