| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 | 30 |
| 31 // Proto to test proto3 Timestamp and Duration. |
| 31 syntax = "proto3"; | 32 syntax = "proto3"; |
| 32 | 33 |
| 33 package google.protobuf.testing; | 34 package google.protobuf.testing.timestampduration; |
| 35 option java_package = "com.google.protobuf.testing.timestampduration"; |
| 34 | 36 |
| 35 import "google/protobuf/timestamp.proto"; | 37 import "google/protobuf/timestamp.proto"; |
| 36 import "google/protobuf/duration.proto"; | 38 import "google/protobuf/duration.proto"; |
| 37 | 39 |
| 38 message TimestampDurationTestCases { | |
| 39 // Timestamp tests | |
| 40 TimeStampType epoch = 1; | |
| 41 TimeStampType epoch2 = 2; | |
| 42 TimeStampType mintime = 3; | |
| 43 TimeStampType maxtime = 4; | |
| 44 TimeStampType timeval1 = 5; | |
| 45 TimeStampType timeval2 = 6; | |
| 46 TimeStampType timeval3 = 7; | |
| 47 TimeStampType timeval4 = 8; | |
| 48 TimeStampType timeval5 = 9; | |
| 49 TimeStampType timeval6 = 10; | |
| 50 TimeStampType timeval7 = 11; | |
| 51 google.protobuf.Timestamp timeval8 = 12; | |
| 52 | |
| 53 // Duration tests | |
| 54 DurationType zero_duration = 101; | |
| 55 DurationType min_duration = 102; | |
| 56 DurationType max_duration = 103; | |
| 57 DurationType duration1 = 104; | |
| 58 DurationType duration2 = 105; | |
| 59 DurationType duration3 = 106; | |
| 60 DurationType duration4 = 107; | |
| 61 google.protobuf.Duration duration5 = 108; | |
| 62 } | |
| 63 | |
| 64 message TimeStampType { | |
| 65 google.protobuf.Timestamp timestamp = 1; | |
| 66 } | |
| 67 | |
| 68 message DurationType { | |
| 69 google.protobuf.Duration duration = 1; | |
| 70 } | |
| 71 | |
| 72 service TimestampDurationTestService { | |
| 73 rpc Call(TimestampDurationTestCases) returns (TimestampDurationTestCases); | |
| 74 } | |
| 75 | |
| 76 message TimestampDuration { | 40 message TimestampDuration { |
| 77 google.protobuf.Timestamp ts = 1; | 41 google.protobuf.Timestamp ts = 1; |
| 78 google.protobuf.Duration dur = 2; | 42 google.protobuf.Duration dur = 2; |
| 79 repeated google.protobuf.Timestamp rep_ts = 3; | |
| 80 } | 43 } |
| 44 |
| 45 service TestService { |
| 46 rpc Call(TimestampDuration) returns (TimestampDuration); |
| 47 } |
| OLD | NEW |