| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis_beta.toolresults.v1beta3; | 3 library googleapis_beta.toolresults.v1beta3; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| (...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 * duration.seconds -= 1; duration.nanos += 1000000000; } | 1251 * duration.seconds -= 1; duration.nanos += 1000000000; } |
| 1252 * | 1252 * |
| 1253 * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. | 1253 * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. |
| 1254 * | 1254 * |
| 1255 * Timestamp start = ...; Duration duration = ...; Timestamp end = ...; | 1255 * Timestamp start = ...; Duration duration = ...; Timestamp end = ...; |
| 1256 * | 1256 * |
| 1257 * end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + | 1257 * end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + |
| 1258 * duration.nanos; | 1258 * duration.nanos; |
| 1259 * | 1259 * |
| 1260 * if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } | 1260 * if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } |
| 1261 * |
| 1262 * Example 3: Compute Duration from datetime.timedelta in Python. |
| 1263 * |
| 1264 * td = datetime.timedelta(days=3, minutes=10) duration = Duration() |
| 1265 * duration.FromTimedelta(td) |
| 1261 */ | 1266 */ |
| 1262 class Duration { | 1267 class Duration { |
| 1263 /** | 1268 /** |
| 1264 * Signed fractions of a second at nanosecond resolution of the span of time. | 1269 * Signed fractions of a second at nanosecond resolution of the span of time. |
| 1265 * Durations less than one second are represented with a 0 `seconds` field and | 1270 * Durations less than one second are represented with a 0 `seconds` field and |
| 1266 * a positive or negative `nanos` field. For durations of one second or more, | 1271 * a positive or negative `nanos` field. For durations of one second or more, |
| 1267 * a non-zero value for the `nanos` field must be of the same sign as the | 1272 * a non-zero value for the `nanos` field must be of the same sign as the |
| 1268 * `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. | 1273 * `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. |
| 1269 */ | 1274 */ |
| 1270 core.int nanos; | 1275 core.int nanos; |
| (...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2900 * | 2905 * |
| 2901 * long millis = System.currentTimeMillis(); | 2906 * long millis = System.currentTimeMillis(); |
| 2902 * | 2907 * |
| 2903 * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) | 2908 * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) |
| 2904 * .setNanos((int) ((millis % 1000) * 1000000)).build(); | 2909 * .setNanos((int) ((millis % 1000) * 1000000)).build(); |
| 2905 * | 2910 * |
| 2906 * | 2911 * |
| 2907 * | 2912 * |
| 2908 * Example 5: Compute Timestamp from current time in Python. | 2913 * Example 5: Compute Timestamp from current time in Python. |
| 2909 * | 2914 * |
| 2910 * now = time.time() seconds = int(now) nanos = int((now - seconds) * 10**9) | 2915 * timestamp = Timestamp() timestamp.GetCurrentTime() |
| 2911 * timestamp = Timestamp(seconds=seconds, nanos=nanos) | |
| 2912 */ | 2916 */ |
| 2913 class Timestamp { | 2917 class Timestamp { |
| 2914 /** | 2918 /** |
| 2915 * Non-negative fractions of a second at nanosecond resolution. Negative | 2919 * Non-negative fractions of a second at nanosecond resolution. Negative |
| 2916 * second values with fractions must still have non-negative nanos values that | 2920 * second values with fractions must still have non-negative nanos values that |
| 2917 * count forward in time. Must be from 0 to 999,999,999 inclusive. | 2921 * count forward in time. Must be from 0 to 999,999,999 inclusive. |
| 2918 */ | 2922 */ |
| 2919 core.int nanos; | 2923 core.int nanos; |
| 2920 /** | 2924 /** |
| 2921 * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must | 2925 * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3127 } | 3131 } |
| 3128 if (output != null) { | 3132 if (output != null) { |
| 3129 _json["output"] = (output).toJson(); | 3133 _json["output"] = (output).toJson(); |
| 3130 } | 3134 } |
| 3131 if (testCase != null) { | 3135 if (testCase != null) { |
| 3132 _json["testCase"] = (testCase).toJson(); | 3136 _json["testCase"] = (testCase).toJson(); |
| 3133 } | 3137 } |
| 3134 return _json; | 3138 return _json; |
| 3135 } | 3139 } |
| 3136 } | 3140 } |
| OLD | NEW |