1// Protocol Buffers - Google's data interchange format 2// Copyright 2016 Google Inc. All rights reserved. 3// 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file or at 6// https://developers.google.com/open-source/licenses/bsd 7 8syntax = "proto2"; 9 10package objc.protobuf.tests.deprecated; 11option objc_class_prefix = "Dep"; 12 13// 14// This file is like unittest_deprecated_file.proto, but uses message, enum, 15// enum value, and field level deprecation. 16// 17// The source generated from this file needs to be inspect to confirm it has 18// all of the expected annotations. It also will be compiled into the unittest 19// and that compile should be clean without errors. 20// 21 22// Mix of field types marked as deprecated. 23message Msg1 { 24 extensions 100 to max; 25 26 optional string string_field = 1 [deprecated=true]; 27 required int32 int_field = 2 [deprecated=true]; 28 repeated fixed32 fixed_field = 3 [deprecated=true]; 29 optional Msg1 msg_field = 4 [deprecated=true]; 30} 31 32// Mix of extension field types marked as deprecated. 33extend Msg1 { 34 optional string string_ext_field = 101 [deprecated=true]; 35 optional int32 int_ext_field = 102 [deprecated=true]; 36 repeated fixed32 fixed_ext_field = 103 [deprecated=true]; 37 optional Msg1 msg_ext_field = 104 [deprecated=true]; 38} 39 40// Mix of extension field types (scoped to a message) marked as deprecated. 41message Msg1A { 42 extend Msg1 { 43 optional string string_ext2_field = 201 [deprecated=true]; 44 optional int32 int_ext2_field = 202 [deprecated=true]; 45 repeated fixed32 fixed_ext2_field = 203 [deprecated=true]; 46 optional Msg1 msg_ext2_field = 204 [deprecated=true]; 47 } 48} 49 50// Enum value marked as deprecated. 51enum Enum1 { 52 ENUM1_ONE = 1; 53 ENUM1_TWO = 2; 54 ENUM1_THREE = 3 [deprecated=true]; 55} 56 57// Message marked as deprecated. 58message Msg2 { 59 option deprecated = true; 60 61 optional string string_field = 1; 62 required int32 int_field = 2; 63 repeated fixed32 fixed_field = 3; 64} 65 66// Enum marked as deprecated. 67enum Enum2 { 68 option deprecated = true; 69 70 ENUM2_ONE = 1; 71 ENUM2_TWO = 2; 72 ENUM2_THREE = 3; 73} 74