|
| 1 | +// Copyright 2021-2024 Buf Technologies, Inc. |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | +package spec; |
| 17 | + |
| 18 | +import "google/protobuf/any.proto"; |
| 19 | +import "google/protobuf/duration.proto"; |
| 20 | +import "google/protobuf/empty.proto"; |
| 21 | +import "google/protobuf/field_mask.proto"; |
| 22 | +import "google/protobuf/struct.proto"; |
| 23 | +import "google/protobuf/timestamp.proto"; |
| 24 | +import "google/protobuf/wrappers.proto"; |
| 25 | + |
| 26 | +message JsonTypesMessage { |
| 27 | + bool bool_field = 1; |
| 28 | + double double_field = 2; |
| 29 | + bytes bytes_field = 3; |
| 30 | + int64 int64_field = 4; |
| 31 | + JsonTypeEnum enum_field = 5; |
| 32 | + JsonTypesMessage message_field = 6; |
| 33 | + google.protobuf.Any any_field = 7; |
| 34 | + google.protobuf.Duration duration_field = 8; |
| 35 | + google.protobuf.Empty empty_field = 9; |
| 36 | + google.protobuf.FieldMask field_mask_field = 10; |
| 37 | + google.protobuf.Struct struct_field = 11; |
| 38 | + google.protobuf.Value value_field = 12; |
| 39 | + google.protobuf.ListValue list_value_field = 13; |
| 40 | + google.protobuf.NullValue null_value_field = 14; |
| 41 | + google.protobuf.Timestamp timestamp_field = 15; |
| 42 | + google.protobuf.DoubleValue wrapped_double_field = 16; |
| 43 | + google.protobuf.FloatValue wrapped_float_field = 17; |
| 44 | + google.protobuf.Int64Value wrapped_int64_field = 18; |
| 45 | + google.protobuf.UInt64Value wrapped_uint64_field = 19; |
| 46 | + google.protobuf.Int32Value wrapped_int32_field = 20; |
| 47 | + google.protobuf.UInt32Value wrapped_uint32_field = 21; |
| 48 | + google.protobuf.BoolValue wrapped_bool_field = 22; |
| 49 | + google.protobuf.StringValue wrapped_string_field = 23; |
| 50 | + google.protobuf.BytesValue wrapped_bytes_field = 24; |
| 51 | + repeated JsonTypeEnum repeated_enum_field = 25; |
| 52 | + map<bool, JsonTypeEnum> map_bool_enum_field = 26; |
| 53 | +} |
| 54 | + |
| 55 | +enum JsonTypeEnum { |
| 56 | + JSON_TYPE_ENUM_UNSPECIFIED = 0; |
| 57 | + JSON_TYPE_ENUM_YES = 1; |
| 58 | + JSON_TYPE_ENUM_NO = 2; |
| 59 | +} |
0 commit comments