| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you under the Apache License, Version 2.0 (the |
| // "License"); you may not use this file except in compliance |
| // with the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, |
| // software distributed under the License is distributed on an |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| // KIND, either express or implied. See the License for the |
| // specific language governing permissions and limitations |
| // under the License. |
| syntax = "proto2"; |
| package jsonwriter_test; |
| |
| import "kudu/util/pb_util.proto"; |
| |
| // This proto includes every type of field in both singular and repeated |
| // forms. This is mostly copied from 'unittest.proto' in the protobuf source |
| // (hence the odd field numbers which skip some). |
| message TestAllTypes { |
| message NestedMessage { |
| optional int32 int_field = 1; |
| } |
| |
| enum NestedEnum { |
| FOO = 1; |
| BAR = 2; |
| BAZ = 3; |
| } |
| |
| // Singular |
| optional int32 optional_int32 = 1; |
| optional int64 optional_int64 = 2; |
| optional uint32 optional_uint32 = 3; |
| optional uint64 optional_uint64 = 4; |
| optional sint32 optional_sint32 = 5; |
| optional sint64 optional_sint64 = 6; |
| optional fixed32 optional_fixed32 = 7; |
| optional fixed64 optional_fixed64 = 8; |
| optional sfixed32 optional_sfixed32 = 9; |
| optional sfixed64 optional_sfixed64 = 10; |
| optional float optional_float = 11; |
| optional double optional_double = 12; |
| optional bool optional_bool = 13; |
| optional string optional_string = 14; |
| optional string optional_redacted_string = 15 [ (kudu.REDACT) = true ]; |
| optional bytes optional_bytes = 16; |
| optional bytes optional_redacted_bytes = 17 [ (kudu.REDACT) = true ]; |
| |
| optional NestedMessage optional_nested_message = 18; |
| optional NestedEnum optional_nested_enum = 21; |
| |
| // Repeated |
| repeated int32 repeated_int32 = 31; |
| repeated int64 repeated_int64 = 32; |
| repeated uint32 repeated_uint32 = 33; |
| repeated uint64 repeated_uint64 = 34; |
| repeated sint32 repeated_sint32 = 35; |
| repeated sint64 repeated_sint64 = 36; |
| repeated fixed32 repeated_fixed32 = 37; |
| repeated fixed64 repeated_fixed64 = 38; |
| repeated sfixed32 repeated_sfixed32 = 39; |
| repeated sfixed64 repeated_sfixed64 = 40; |
| repeated float repeated_float = 41; |
| repeated double repeated_double = 42; |
| repeated bool repeated_bool = 43; |
| repeated string repeated_string = 44; |
| repeated bytes repeated_bytes = 45; |
| repeated string repeated_redacted_string = 46 [ (kudu.REDACT) = true ]; |
| repeated string repeated_redacted_bytes = 47 [ (kudu.REDACT) = true ]; |
| |
| repeated NestedMessage repeated_nested_message = 48; |
| repeated NestedEnum repeated_nested_enum = 51; |
| } |