店播爬取Python脚本

test_proto3_optional.proto 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // Protocol Buffers - Google's data interchange format
  2. // Copyright 2008 Google Inc. All rights reserved.
  3. // https://developers.google.com/protocol-buffers/
  4. //
  5. // Redistribution and use in source and binary forms, with or without
  6. // modification, are permitted provided that the following conditions are
  7. // met:
  8. //
  9. // * Redistributions of source code must retain the above copyright
  10. // notice, this list of conditions and the following disclaimer.
  11. // * Redistributions in binary form must reproduce the above
  12. // copyright notice, this list of conditions and the following disclaimer
  13. // in the documentation and/or other materials provided with the
  14. // distribution.
  15. // * Neither the name of Google Inc. nor the names of its
  16. // contributors may be used to endorse or promote products derived from
  17. // this software without specific prior written permission.
  18. //
  19. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  22. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  23. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  25. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  26. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  27. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  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.
  30. syntax = "proto3";
  31. package google.protobuf.python.internal;
  32. message TestProto3Optional {
  33. message NestedMessage {
  34. // The field name "b" fails to compile in proto1 because it conflicts with
  35. // a local variable named "b" in one of the generated methods. Doh.
  36. // This file needs to compile in proto1 to test backwards-compatibility.
  37. optional int32 bb = 1;
  38. }
  39. enum NestedEnum {
  40. UNSPECIFIED = 0;
  41. FOO = 1;
  42. BAR = 2;
  43. BAZ = 3;
  44. NEG = -1; // Intentionally negative.
  45. }
  46. // Singular
  47. optional int32 optional_int32 = 1;
  48. optional int64 optional_int64 = 2;
  49. optional uint32 optional_uint32 = 3;
  50. optional uint64 optional_uint64 = 4;
  51. optional sint32 optional_sint32 = 5;
  52. optional sint64 optional_sint64 = 6;
  53. optional fixed32 optional_fixed32 = 7;
  54. optional fixed64 optional_fixed64 = 8;
  55. optional sfixed32 optional_sfixed32 = 9;
  56. optional sfixed64 optional_sfixed64 = 10;
  57. optional float optional_float = 11;
  58. optional double optional_double = 12;
  59. optional bool optional_bool = 13;
  60. optional string optional_string = 14;
  61. optional bytes optional_bytes = 15;
  62. optional NestedMessage optional_nested_message = 18;
  63. optional NestedEnum optional_nested_enum = 21;
  64. }