test.proto 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. option java_package = "org.apache.hadoop.ipc.protobuf";
  19. option java_outer_classname = "TestProtos";
  20. option java_generate_equals_and_hash = true;
  21. package hadoop.common;
  22. message EmptyRequestProto {
  23. }
  24. message EmptyResponseProto {
  25. }
  26. message EchoRequestProto {
  27. required string message = 1;
  28. }
  29. message EchoResponseProto {
  30. required string message = 1;
  31. }
  32. message OptRequestProto {
  33. optional string message = 1;
  34. }
  35. message OptResponseProto {
  36. optional string message = 1;
  37. }
  38. message SleepRequestProto{
  39. required int32 milliSeconds = 1;
  40. }
  41. message SleepResponseProto{
  42. }
  43. message SlowPingRequestProto {
  44. required bool shouldSlow = 1;
  45. }
  46. message EchoRequestProto2 {
  47. repeated string message = 1;
  48. }
  49. message EchoResponseProto2 {
  50. repeated string message = 1;
  51. }
  52. message AddRequestProto {
  53. required int32 param1 = 1;
  54. required int32 param2 = 2;
  55. }
  56. message AddRequestProto2 {
  57. repeated int32 params = 1;
  58. }
  59. message AddResponseProto {
  60. required int32 result = 1;
  61. }
  62. message ExchangeRequestProto {
  63. repeated int32 values = 1;
  64. }
  65. message ExchangeResponseProto {
  66. repeated int32 values = 1;
  67. }
  68. message AuthMethodResponseProto {
  69. required int32 code = 1;
  70. required string mechanismName = 2;
  71. }
  72. message AuthUserResponseProto {
  73. required string authUser = 1;
  74. }