OLD | NEW |
1 // Generated by the protocol buffer compiler. DO NOT EDIT! | 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 // source: google/protobuf/type.proto | 2 // source: google/protobuf/type.proto |
3 #pragma warning disable 1591, 0612, 3021 | 3 #pragma warning disable 1591, 0612, 3021 |
4 #region Designer generated code | 4 #region Designer generated code |
5 | 5 |
6 using pb = global::Google.Protobuf; | 6 using pb = global::Google.Protobuf; |
7 using pbc = global::Google.Protobuf.Collections; | 7 using pbc = global::Google.Protobuf.Collections; |
8 using pbr = global::Google.Protobuf.Reflection; | 8 using pbr = global::Google.Protobuf.Reflection; |
9 using scg = global::System.Collections.Generic; | 9 using scg = global::System.Collections.Generic; |
10 namespace Google.Protobuf.WellKnownTypes { | 10 namespace Google.Protobuf.WellKnownTypes { |
11 | 11 |
12 /// <summary>Holder for reflection information generated from google/protobuf/
type.proto</summary> | 12 /// <summary>Holder for reflection information generated from google/protobuf/
type.proto</summary> |
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
14 public static partial class TypeReflection { | 13 public static partial class TypeReflection { |
15 | 14 |
16 #region Descriptor | 15 #region Descriptor |
17 /// <summary>File descriptor for google/protobuf/type.proto</summary> | 16 /// <summary>File descriptor for google/protobuf/type.proto</summary> |
18 public static pbr::FileDescriptor Descriptor { | 17 public static pbr::FileDescriptor Descriptor { |
19 get { return descriptor; } | 18 get { return descriptor; } |
20 } | 19 } |
21 private static pbr::FileDescriptor descriptor; | 20 private static pbr::FileDescriptor descriptor; |
22 | 21 |
23 static TypeReflection() { | 22 static TypeReflection() { |
(...skipping 24 matching lines...) Expand all Loading... |
48 "SVRZX09QVElPTkFMEAESGAoUQ0FSRElOQUxJVFlfUkVRVUlSRUQQAhIYChRD", | 47 "SVRZX09QVElPTkFMEAESGAoUQ0FSRElOQUxJVFlfUkVRVUlSRUQQAhIYChRD", |
49 "QVJESU5BTElUWV9SRVBFQVRFRBADIs4BCgRFbnVtEgwKBG5hbWUYASABKAkS", | 48 "QVJESU5BTElUWV9SRVBFQVRFRBADIs4BCgRFbnVtEgwKBG5hbWUYASABKAkS", |
50 "LQoJZW51bXZhbHVlGAIgAygLMhouZ29vZ2xlLnByb3RvYnVmLkVudW1WYWx1", | 49 "LQoJZW51bXZhbHVlGAIgAygLMhouZ29vZ2xlLnByb3RvYnVmLkVudW1WYWx1", |
51 "ZRIoCgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhI2", | 50 "ZRIoCgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVmLk9wdGlvbhI2", |
52 "Cg5zb3VyY2VfY29udGV4dBgEIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5Tb3Vy", | 51 "Cg5zb3VyY2VfY29udGV4dBgEIAEoCzIeLmdvb2dsZS5wcm90b2J1Zi5Tb3Vy", |
53 "Y2VDb250ZXh0EicKBnN5bnRheBgFIAEoDjIXLmdvb2dsZS5wcm90b2J1Zi5T", | 52 "Y2VDb250ZXh0EicKBnN5bnRheBgFIAEoDjIXLmdvb2dsZS5wcm90b2J1Zi5T", |
54 "eW50YXgiUwoJRW51bVZhbHVlEgwKBG5hbWUYASABKAkSDgoGbnVtYmVyGAIg", | 53 "eW50YXgiUwoJRW51bVZhbHVlEgwKBG5hbWUYASABKAkSDgoGbnVtYmVyGAIg", |
55 "ASgFEigKB29wdGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9u", | 54 "ASgFEigKB29wdGlvbnMYAyADKAsyFy5nb29nbGUucHJvdG9idWYuT3B0aW9u", |
56 "IjsKBk9wdGlvbhIMCgRuYW1lGAEgASgJEiMKBXZhbHVlGAIgASgLMhQuZ29v", | 55 "IjsKBk9wdGlvbhIMCgRuYW1lGAEgASgJEiMKBXZhbHVlGAIgASgLMhQuZ29v", |
57 "Z2xlLnByb3RvYnVmLkFueSouCgZTeW50YXgSEQoNU1lOVEFYX1BST1RPMhAA", | 56 "Z2xlLnByb3RvYnVmLkFueSouCgZTeW50YXgSEQoNU1lOVEFYX1BST1RPMhAA", |
58 "EhEKDVNZTlRBWF9QUk9UTzMQAUJMChNjb20uZ29vZ2xlLnByb3RvYnVmQglU", | 57 "EhEKDVNZTlRBWF9QUk9UTzMQAUJ9ChNjb20uZ29vZ2xlLnByb3RvYnVmQglU", |
59 "eXBlUHJvdG9QAaABAaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25v", | 58 "eXBlUHJvdG9QAVovZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vcHJvdG9i", |
60 "d25UeXBlc2IGcHJvdG8z")); | 59 "dWYvcHR5cGU7cHR5cGX4AQGiAgNHUEKqAh5Hb29nbGUuUHJvdG9idWYuV2Vs", |
| 60 "bEtub3duVHlwZXNiBnByb3RvMw==")); |
61 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, | 61 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
62 new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.Any
Reflection.Descriptor, global::Google.Protobuf.WellKnownTypes.SourceContextRefle
ction.Descriptor, }, | 62 new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.Any
Reflection.Descriptor, global::Google.Protobuf.WellKnownTypes.SourceContextRefle
ction.Descriptor, }, |
63 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.We
llKnownTypes.Syntax), }, new pbr::GeneratedClrTypeInfo[] { | 63 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.We
llKnownTypes.Syntax), }, new pbr::GeneratedClrTypeInfo[] { |
64 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.Type), global::Google.Protobuf.WellKnownTypes.Type.Parser, new[]{ "Name"
, "Fields", "Oneofs", "Options", "SourceContext", "Syntax" }, null, null, null), | 64 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.Type), global::Google.Protobuf.WellKnownTypes.Type.Parser, new[]{ "Name"
, "Fields", "Oneofs", "Options", "SourceContext", "Syntax" }, null, null, null), |
65 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.Field), global::Google.Protobuf.WellKnownTypes.Field.Parser, new[]{ "Kin
d", "Cardinality", "Number", "Name", "TypeUrl", "OneofIndex", "Packed", "Options
", "JsonName", "DefaultValue" }, null, new[]{ typeof(global::Google.Protobuf.Wel
lKnownTypes.Field.Types.Kind), typeof(global::Google.Protobuf.WellKnownTypes.Fie
ld.Types.Cardinality) }, null), | 65 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.Field), global::Google.Protobuf.WellKnownTypes.Field.Parser, new[]{ "Kin
d", "Cardinality", "Number", "Name", "TypeUrl", "OneofIndex", "Packed", "Options
", "JsonName", "DefaultValue" }, null, new[]{ typeof(global::Google.Protobuf.Wel
lKnownTypes.Field.Types.Kind), typeof(global::Google.Protobuf.WellKnownTypes.Fie
ld.Types.Cardinality) }, null), |
66 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.Enum), global::Google.Protobuf.WellKnownTypes.Enum.Parser, new[]{ "Name"
, "Enumvalue", "Options", "SourceContext", "Syntax" }, null, null, null), | 66 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.Enum), global::Google.Protobuf.WellKnownTypes.Enum.Parser, new[]{ "Name"
, "Enumvalue", "Options", "SourceContext", "Syntax" }, null, null, null), |
67 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.EnumValue), global::Google.Protobuf.WellKnownTypes.EnumValue.Parser, new
[]{ "Name", "Number", "Options" }, null, null, null), | 67 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.EnumValue), global::Google.Protobuf.WellKnownTypes.EnumValue.Parser, new
[]{ "Name", "Number", "Options" }, null, null, null), |
68 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.Option), global::Google.Protobuf.WellKnownTypes.Option.Parser, new[]{ "N
ame", "Value" }, null, null, null) | 68 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKno
wnTypes.Option), global::Google.Protobuf.WellKnownTypes.Option.Parser, new[]{ "N
ame", "Value" }, null, null, null) |
69 })); | 69 })); |
70 } | 70 } |
71 #endregion | 71 #endregion |
72 | 72 |
73 } | 73 } |
74 #region Enums | 74 #region Enums |
75 /// <summary> | 75 /// <summary> |
76 /// The syntax in which a protocol buffer element is defined. | 76 /// The syntax in which a protocol buffer element is defined. |
77 /// </summary> | 77 /// </summary> |
78 public enum Syntax { | 78 public enum Syntax { |
79 /// <summary> | 79 /// <summary> |
80 /// Syntax `proto2`. | 80 /// Syntax `proto2`. |
81 /// </summary> | 81 /// </summary> |
82 [pbr::OriginalName("SYNTAX_PROTO2")] Proto2 = 0, | 82 [pbr::OriginalName("SYNTAX_PROTO2")] Proto2 = 0, |
83 /// <summary> | 83 /// <summary> |
84 /// Syntax `proto3`. | 84 /// Syntax `proto3`. |
85 /// </summary> | 85 /// </summary> |
86 [pbr::OriginalName("SYNTAX_PROTO3")] Proto3 = 1, | 86 [pbr::OriginalName("SYNTAX_PROTO3")] Proto3 = 1, |
87 } | 87 } |
88 | 88 |
89 #endregion | 89 #endregion |
90 | 90 |
91 #region Messages | 91 #region Messages |
92 /// <summary> | 92 /// <summary> |
93 /// A protocol buffer message type. | 93 /// A protocol buffer message type. |
94 /// </summary> | 94 /// </summary> |
95 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
96 public sealed partial class Type : pb::IMessage<Type> { | 95 public sealed partial class Type : pb::IMessage<Type> { |
97 private static readonly pb::MessageParser<Type> _parser = new pb::MessagePar
ser<Type>(() => new Type()); | 96 private static readonly pb::MessageParser<Type> _parser = new pb::MessagePar
ser<Type>(() => new Type()); |
| 97 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
98 public static pb::MessageParser<Type> Parser { get { return _parser; } } | 98 public static pb::MessageParser<Type> Parser { get { return _parser; } } |
99 | 99 |
| 100 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
100 public static pbr::MessageDescriptor Descriptor { | 101 public static pbr::MessageDescriptor Descriptor { |
101 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[0]; } | 102 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[0]; } |
102 } | 103 } |
103 | 104 |
| 105 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
104 pbr::MessageDescriptor pb::IMessage.Descriptor { | 106 pbr::MessageDescriptor pb::IMessage.Descriptor { |
105 get { return Descriptor; } | 107 get { return Descriptor; } |
106 } | 108 } |
107 | 109 |
| 110 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
108 public Type() { | 111 public Type() { |
109 OnConstruction(); | 112 OnConstruction(); |
110 } | 113 } |
111 | 114 |
112 partial void OnConstruction(); | 115 partial void OnConstruction(); |
113 | 116 |
| 117 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
114 public Type(Type other) : this() { | 118 public Type(Type other) : this() { |
115 name_ = other.name_; | 119 name_ = other.name_; |
116 fields_ = other.fields_.Clone(); | 120 fields_ = other.fields_.Clone(); |
117 oneofs_ = other.oneofs_.Clone(); | 121 oneofs_ = other.oneofs_.Clone(); |
118 options_ = other.options_.Clone(); | 122 options_ = other.options_.Clone(); |
119 SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone()
: null; | 123 SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone()
: null; |
120 syntax_ = other.syntax_; | 124 syntax_ = other.syntax_; |
121 } | 125 } |
122 | 126 |
| 127 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
123 public Type Clone() { | 128 public Type Clone() { |
124 return new Type(this); | 129 return new Type(this); |
125 } | 130 } |
126 | 131 |
127 /// <summary>Field number for the "name" field.</summary> | 132 /// <summary>Field number for the "name" field.</summary> |
128 public const int NameFieldNumber = 1; | 133 public const int NameFieldNumber = 1; |
129 private string name_ = ""; | 134 private string name_ = ""; |
130 /// <summary> | 135 /// <summary> |
131 /// The fully qualified message name. | 136 /// The fully qualified message name. |
132 /// </summary> | 137 /// </summary> |
| 138 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
133 public string Name { | 139 public string Name { |
134 get { return name_; } | 140 get { return name_; } |
135 set { | 141 set { |
136 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 142 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
137 } | 143 } |
138 } | 144 } |
139 | 145 |
140 /// <summary>Field number for the "fields" field.</summary> | 146 /// <summary>Field number for the "fields" field.</summary> |
141 public const int FieldsFieldNumber = 2; | 147 public const int FieldsFieldNumber = 2; |
142 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Field> _repeated_fields_codec | 148 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Field> _repeated_fields_codec |
143 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.F
ield.Parser); | 149 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.F
ield.Parser); |
144 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.F
ield> fields_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Fi
eld>(); | 150 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.F
ield> fields_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Fi
eld>(); |
145 /// <summary> | 151 /// <summary> |
146 /// The list of fields. | 152 /// The list of fields. |
147 /// </summary> | 153 /// </summary> |
| 154 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
148 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> Fiel
ds { | 155 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Field> Fiel
ds { |
149 get { return fields_; } | 156 get { return fields_; } |
150 } | 157 } |
151 | 158 |
152 /// <summary>Field number for the "oneofs" field.</summary> | 159 /// <summary>Field number for the "oneofs" field.</summary> |
153 public const int OneofsFieldNumber = 3; | 160 public const int OneofsFieldNumber = 3; |
154 private static readonly pb::FieldCodec<string> _repeated_oneofs_codec | 161 private static readonly pb::FieldCodec<string> _repeated_oneofs_codec |
155 = pb::FieldCodec.ForString(26); | 162 = pb::FieldCodec.ForString(26); |
156 private readonly pbc::RepeatedField<string> oneofs_ = new pbc::RepeatedField
<string>(); | 163 private readonly pbc::RepeatedField<string> oneofs_ = new pbc::RepeatedField
<string>(); |
157 /// <summary> | 164 /// <summary> |
158 /// The list of types appearing in `oneof` definitions in this type. | 165 /// The list of types appearing in `oneof` definitions in this type. |
159 /// </summary> | 166 /// </summary> |
| 167 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
160 public pbc::RepeatedField<string> Oneofs { | 168 public pbc::RepeatedField<string> Oneofs { |
161 get { return oneofs_; } | 169 get { return oneofs_; } |
162 } | 170 } |
163 | 171 |
164 /// <summary>Field number for the "options" field.</summary> | 172 /// <summary>Field number for the "options" field.</summary> |
165 public const int OptionsFieldNumber = 4; | 173 public const int OptionsFieldNumber = 4; |
166 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Option> _repeated_options_codec | 174 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Option> _repeated_options_codec |
167 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.O
ption.Parser); | 175 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.O
ption.Parser); |
168 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.O
ption> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.
Option>(); | 176 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.O
ption> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.
Option>(); |
169 /// <summary> | 177 /// <summary> |
170 /// The protocol buffer options. | 178 /// The protocol buffer options. |
171 /// </summary> | 179 /// </summary> |
| 180 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
172 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Opt
ions { | 181 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Opt
ions { |
173 get { return options_; } | 182 get { return options_; } |
174 } | 183 } |
175 | 184 |
176 /// <summary>Field number for the "source_context" field.</summary> | 185 /// <summary>Field number for the "source_context" field.</summary> |
177 public const int SourceContextFieldNumber = 5; | 186 public const int SourceContextFieldNumber = 5; |
178 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; | 187 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; |
179 /// <summary> | 188 /// <summary> |
180 /// The source context. | 189 /// The source context. |
181 /// </summary> | 190 /// </summary> |
| 191 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
182 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { | 192 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { |
183 get { return sourceContext_; } | 193 get { return sourceContext_; } |
184 set { | 194 set { |
185 sourceContext_ = value; | 195 sourceContext_ = value; |
186 } | 196 } |
187 } | 197 } |
188 | 198 |
189 /// <summary>Field number for the "syntax" field.</summary> | 199 /// <summary>Field number for the "syntax" field.</summary> |
190 public const int SyntaxFieldNumber = 6; | 200 public const int SyntaxFieldNumber = 6; |
191 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0; | 201 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0; |
192 /// <summary> | 202 /// <summary> |
193 /// The source syntax. | 203 /// The source syntax. |
194 /// </summary> | 204 /// </summary> |
| 205 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
195 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { | 206 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { |
196 get { return syntax_; } | 207 get { return syntax_; } |
197 set { | 208 set { |
198 syntax_ = value; | 209 syntax_ = value; |
199 } | 210 } |
200 } | 211 } |
201 | 212 |
| 213 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
202 public override bool Equals(object other) { | 214 public override bool Equals(object other) { |
203 return Equals(other as Type); | 215 return Equals(other as Type); |
204 } | 216 } |
205 | 217 |
| 218 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
206 public bool Equals(Type other) { | 219 public bool Equals(Type other) { |
207 if (ReferenceEquals(other, null)) { | 220 if (ReferenceEquals(other, null)) { |
208 return false; | 221 return false; |
209 } | 222 } |
210 if (ReferenceEquals(other, this)) { | 223 if (ReferenceEquals(other, this)) { |
211 return true; | 224 return true; |
212 } | 225 } |
213 if (Name != other.Name) return false; | 226 if (Name != other.Name) return false; |
214 if(!fields_.Equals(other.fields_)) return false; | 227 if(!fields_.Equals(other.fields_)) return false; |
215 if(!oneofs_.Equals(other.oneofs_)) return false; | 228 if(!oneofs_.Equals(other.oneofs_)) return false; |
216 if(!options_.Equals(other.options_)) return false; | 229 if(!options_.Equals(other.options_)) return false; |
217 if (!object.Equals(SourceContext, other.SourceContext)) return false; | 230 if (!object.Equals(SourceContext, other.SourceContext)) return false; |
218 if (Syntax != other.Syntax) return false; | 231 if (Syntax != other.Syntax) return false; |
219 return true; | 232 return true; |
220 } | 233 } |
221 | 234 |
| 235 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
222 public override int GetHashCode() { | 236 public override int GetHashCode() { |
223 int hash = 1; | 237 int hash = 1; |
224 if (Name.Length != 0) hash ^= Name.GetHashCode(); | 238 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
225 hash ^= fields_.GetHashCode(); | 239 hash ^= fields_.GetHashCode(); |
226 hash ^= oneofs_.GetHashCode(); | 240 hash ^= oneofs_.GetHashCode(); |
227 hash ^= options_.GetHashCode(); | 241 hash ^= options_.GetHashCode(); |
228 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); | 242 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); |
229 if (Syntax != 0) hash ^= Syntax.GetHashCode(); | 243 if (Syntax != 0) hash ^= Syntax.GetHashCode(); |
230 return hash; | 244 return hash; |
231 } | 245 } |
232 | 246 |
| 247 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
233 public override string ToString() { | 248 public override string ToString() { |
234 return pb::JsonFormatter.ToDiagnosticString(this); | 249 return pb::JsonFormatter.ToDiagnosticString(this); |
235 } | 250 } |
236 | 251 |
| 252 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
237 public void WriteTo(pb::CodedOutputStream output) { | 253 public void WriteTo(pb::CodedOutputStream output) { |
238 if (Name.Length != 0) { | 254 if (Name.Length != 0) { |
239 output.WriteRawTag(10); | 255 output.WriteRawTag(10); |
240 output.WriteString(Name); | 256 output.WriteString(Name); |
241 } | 257 } |
242 fields_.WriteTo(output, _repeated_fields_codec); | 258 fields_.WriteTo(output, _repeated_fields_codec); |
243 oneofs_.WriteTo(output, _repeated_oneofs_codec); | 259 oneofs_.WriteTo(output, _repeated_oneofs_codec); |
244 options_.WriteTo(output, _repeated_options_codec); | 260 options_.WriteTo(output, _repeated_options_codec); |
245 if (sourceContext_ != null) { | 261 if (sourceContext_ != null) { |
246 output.WriteRawTag(42); | 262 output.WriteRawTag(42); |
247 output.WriteMessage(SourceContext); | 263 output.WriteMessage(SourceContext); |
248 } | 264 } |
249 if (Syntax != 0) { | 265 if (Syntax != 0) { |
250 output.WriteRawTag(48); | 266 output.WriteRawTag(48); |
251 output.WriteEnum((int) Syntax); | 267 output.WriteEnum((int) Syntax); |
252 } | 268 } |
253 } | 269 } |
254 | 270 |
| 271 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
255 public int CalculateSize() { | 272 public int CalculateSize() { |
256 int size = 0; | 273 int size = 0; |
257 if (Name.Length != 0) { | 274 if (Name.Length != 0) { |
258 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); | 275 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
259 } | 276 } |
260 size += fields_.CalculateSize(_repeated_fields_codec); | 277 size += fields_.CalculateSize(_repeated_fields_codec); |
261 size += oneofs_.CalculateSize(_repeated_oneofs_codec); | 278 size += oneofs_.CalculateSize(_repeated_oneofs_codec); |
262 size += options_.CalculateSize(_repeated_options_codec); | 279 size += options_.CalculateSize(_repeated_options_codec); |
263 if (sourceContext_ != null) { | 280 if (sourceContext_ != null) { |
264 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); | 281 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); |
265 } | 282 } |
266 if (Syntax != 0) { | 283 if (Syntax != 0) { |
267 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); | 284 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); |
268 } | 285 } |
269 return size; | 286 return size; |
270 } | 287 } |
271 | 288 |
| 289 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
272 public void MergeFrom(Type other) { | 290 public void MergeFrom(Type other) { |
273 if (other == null) { | 291 if (other == null) { |
274 return; | 292 return; |
275 } | 293 } |
276 if (other.Name.Length != 0) { | 294 if (other.Name.Length != 0) { |
277 Name = other.Name; | 295 Name = other.Name; |
278 } | 296 } |
279 fields_.Add(other.fields_); | 297 fields_.Add(other.fields_); |
280 oneofs_.Add(other.oneofs_); | 298 oneofs_.Add(other.oneofs_); |
281 options_.Add(other.options_); | 299 options_.Add(other.options_); |
282 if (other.sourceContext_ != null) { | 300 if (other.sourceContext_ != null) { |
283 if (sourceContext_ == null) { | 301 if (sourceContext_ == null) { |
284 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceCont
ext(); | 302 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceCont
ext(); |
285 } | 303 } |
286 SourceContext.MergeFrom(other.SourceContext); | 304 SourceContext.MergeFrom(other.SourceContext); |
287 } | 305 } |
288 if (other.Syntax != 0) { | 306 if (other.Syntax != 0) { |
289 Syntax = other.Syntax; | 307 Syntax = other.Syntax; |
290 } | 308 } |
291 } | 309 } |
292 | 310 |
| 311 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
293 public void MergeFrom(pb::CodedInputStream input) { | 312 public void MergeFrom(pb::CodedInputStream input) { |
294 uint tag; | 313 uint tag; |
295 while ((tag = input.ReadTag()) != 0) { | 314 while ((tag = input.ReadTag()) != 0) { |
296 switch(tag) { | 315 switch(tag) { |
297 default: | 316 default: |
298 input.SkipLastField(); | 317 input.SkipLastField(); |
299 break; | 318 break; |
300 case 10: { | 319 case 10: { |
301 Name = input.ReadString(); | 320 Name = input.ReadString(); |
302 break; | 321 break; |
(...skipping 21 matching lines...) Expand all Loading... |
324 syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.Read
Enum(); | 343 syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.Read
Enum(); |
325 break; | 344 break; |
326 } | 345 } |
327 } | 346 } |
328 } | 347 } |
329 } | 348 } |
330 | 349 |
331 } | 350 } |
332 | 351 |
333 /// <summary> | 352 /// <summary> |
334 /// A single field of a message type. | 353 /// A single field of a message type. |
335 /// </summary> | 354 /// </summary> |
336 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
337 public sealed partial class Field : pb::IMessage<Field> { | 355 public sealed partial class Field : pb::IMessage<Field> { |
338 private static readonly pb::MessageParser<Field> _parser = new pb::MessagePa
rser<Field>(() => new Field()); | 356 private static readonly pb::MessageParser<Field> _parser = new pb::MessagePa
rser<Field>(() => new Field()); |
| 357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
339 public static pb::MessageParser<Field> Parser { get { return _parser; } } | 358 public static pb::MessageParser<Field> Parser { get { return _parser; } } |
340 | 359 |
| 360 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
341 public static pbr::MessageDescriptor Descriptor { | 361 public static pbr::MessageDescriptor Descriptor { |
342 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[1]; } | 362 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[1]; } |
343 } | 363 } |
344 | 364 |
| 365 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
345 pbr::MessageDescriptor pb::IMessage.Descriptor { | 366 pbr::MessageDescriptor pb::IMessage.Descriptor { |
346 get { return Descriptor; } | 367 get { return Descriptor; } |
347 } | 368 } |
348 | 369 |
| 370 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
349 public Field() { | 371 public Field() { |
350 OnConstruction(); | 372 OnConstruction(); |
351 } | 373 } |
352 | 374 |
353 partial void OnConstruction(); | 375 partial void OnConstruction(); |
354 | 376 |
| 377 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
355 public Field(Field other) : this() { | 378 public Field(Field other) : this() { |
356 kind_ = other.kind_; | 379 kind_ = other.kind_; |
357 cardinality_ = other.cardinality_; | 380 cardinality_ = other.cardinality_; |
358 number_ = other.number_; | 381 number_ = other.number_; |
359 name_ = other.name_; | 382 name_ = other.name_; |
360 typeUrl_ = other.typeUrl_; | 383 typeUrl_ = other.typeUrl_; |
361 oneofIndex_ = other.oneofIndex_; | 384 oneofIndex_ = other.oneofIndex_; |
362 packed_ = other.packed_; | 385 packed_ = other.packed_; |
363 options_ = other.options_.Clone(); | 386 options_ = other.options_.Clone(); |
364 jsonName_ = other.jsonName_; | 387 jsonName_ = other.jsonName_; |
365 defaultValue_ = other.defaultValue_; | 388 defaultValue_ = other.defaultValue_; |
366 } | 389 } |
367 | 390 |
| 391 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
368 public Field Clone() { | 392 public Field Clone() { |
369 return new Field(this); | 393 return new Field(this); |
370 } | 394 } |
371 | 395 |
372 /// <summary>Field number for the "kind" field.</summary> | 396 /// <summary>Field number for the "kind" field.</summary> |
373 public const int KindFieldNumber = 1; | 397 public const int KindFieldNumber = 1; |
374 private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = 0; | 398 private global::Google.Protobuf.WellKnownTypes.Field.Types.Kind kind_ = 0; |
375 /// <summary> | 399 /// <summary> |
376 /// The field type. | 400 /// The field type. |
377 /// </summary> | 401 /// </summary> |
| 402 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
378 public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { | 403 public global::Google.Protobuf.WellKnownTypes.Field.Types.Kind Kind { |
379 get { return kind_; } | 404 get { return kind_; } |
380 set { | 405 set { |
381 kind_ = value; | 406 kind_ = value; |
382 } | 407 } |
383 } | 408 } |
384 | 409 |
385 /// <summary>Field number for the "cardinality" field.</summary> | 410 /// <summary>Field number for the "cardinality" field.</summary> |
386 public const int CardinalityFieldNumber = 2; | 411 public const int CardinalityFieldNumber = 2; |
387 private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardi
nality_ = 0; | 412 private global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality cardi
nality_ = 0; |
388 /// <summary> | 413 /// <summary> |
389 /// The field cardinality. | 414 /// The field cardinality. |
390 /// </summary> | 415 /// </summary> |
| 416 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
391 public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardin
ality { | 417 public global::Google.Protobuf.WellKnownTypes.Field.Types.Cardinality Cardin
ality { |
392 get { return cardinality_; } | 418 get { return cardinality_; } |
393 set { | 419 set { |
394 cardinality_ = value; | 420 cardinality_ = value; |
395 } | 421 } |
396 } | 422 } |
397 | 423 |
398 /// <summary>Field number for the "number" field.</summary> | 424 /// <summary>Field number for the "number" field.</summary> |
399 public const int NumberFieldNumber = 3; | 425 public const int NumberFieldNumber = 3; |
400 private int number_; | 426 private int number_; |
401 /// <summary> | 427 /// <summary> |
402 /// The field number. | 428 /// The field number. |
403 /// </summary> | 429 /// </summary> |
| 430 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
404 public int Number { | 431 public int Number { |
405 get { return number_; } | 432 get { return number_; } |
406 set { | 433 set { |
407 number_ = value; | 434 number_ = value; |
408 } | 435 } |
409 } | 436 } |
410 | 437 |
411 /// <summary>Field number for the "name" field.</summary> | 438 /// <summary>Field number for the "name" field.</summary> |
412 public const int NameFieldNumber = 4; | 439 public const int NameFieldNumber = 4; |
413 private string name_ = ""; | 440 private string name_ = ""; |
414 /// <summary> | 441 /// <summary> |
415 /// The field name. | 442 /// The field name. |
416 /// </summary> | 443 /// </summary> |
| 444 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
417 public string Name { | 445 public string Name { |
418 get { return name_; } | 446 get { return name_; } |
419 set { | 447 set { |
420 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 448 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
421 } | 449 } |
422 } | 450 } |
423 | 451 |
424 /// <summary>Field number for the "type_url" field.</summary> | 452 /// <summary>Field number for the "type_url" field.</summary> |
425 public const int TypeUrlFieldNumber = 6; | 453 public const int TypeUrlFieldNumber = 6; |
426 private string typeUrl_ = ""; | 454 private string typeUrl_ = ""; |
427 /// <summary> | 455 /// <summary> |
428 /// The field type URL, without the scheme, for message or enumeration | 456 /// The field type URL, without the scheme, for message or enumeration |
429 /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. | 457 /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
430 /// </summary> | 458 /// </summary> |
| 459 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
431 public string TypeUrl { | 460 public string TypeUrl { |
432 get { return typeUrl_; } | 461 get { return typeUrl_; } |
433 set { | 462 set { |
434 typeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 463 typeUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
435 } | 464 } |
436 } | 465 } |
437 | 466 |
438 /// <summary>Field number for the "oneof_index" field.</summary> | 467 /// <summary>Field number for the "oneof_index" field.</summary> |
439 public const int OneofIndexFieldNumber = 7; | 468 public const int OneofIndexFieldNumber = 7; |
440 private int oneofIndex_; | 469 private int oneofIndex_; |
441 /// <summary> | 470 /// <summary> |
442 /// The index of the field type in `Type.oneofs`, for message or enumeratio
n | 471 /// The index of the field type in `Type.oneofs`, for message or enumeration |
443 /// types. The first type has index 1; zero means the type is not in the li
st. | 472 /// types. The first type has index 1; zero means the type is not in the lis
t. |
444 /// </summary> | 473 /// </summary> |
| 474 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
445 public int OneofIndex { | 475 public int OneofIndex { |
446 get { return oneofIndex_; } | 476 get { return oneofIndex_; } |
447 set { | 477 set { |
448 oneofIndex_ = value; | 478 oneofIndex_ = value; |
449 } | 479 } |
450 } | 480 } |
451 | 481 |
452 /// <summary>Field number for the "packed" field.</summary> | 482 /// <summary>Field number for the "packed" field.</summary> |
453 public const int PackedFieldNumber = 8; | 483 public const int PackedFieldNumber = 8; |
454 private bool packed_; | 484 private bool packed_; |
455 /// <summary> | 485 /// <summary> |
456 /// Whether to use alternative packed wire representation. | 486 /// Whether to use alternative packed wire representation. |
457 /// </summary> | 487 /// </summary> |
| 488 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
458 public bool Packed { | 489 public bool Packed { |
459 get { return packed_; } | 490 get { return packed_; } |
460 set { | 491 set { |
461 packed_ = value; | 492 packed_ = value; |
462 } | 493 } |
463 } | 494 } |
464 | 495 |
465 /// <summary>Field number for the "options" field.</summary> | 496 /// <summary>Field number for the "options" field.</summary> |
466 public const int OptionsFieldNumber = 9; | 497 public const int OptionsFieldNumber = 9; |
467 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Option> _repeated_options_codec | 498 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Option> _repeated_options_codec |
468 = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.O
ption.Parser); | 499 = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.O
ption.Parser); |
469 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.O
ption> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.
Option>(); | 500 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.O
ption> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.
Option>(); |
470 /// <summary> | 501 /// <summary> |
471 /// The protocol buffer options. | 502 /// The protocol buffer options. |
472 /// </summary> | 503 /// </summary> |
| 504 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
473 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Opt
ions { | 505 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Opt
ions { |
474 get { return options_; } | 506 get { return options_; } |
475 } | 507 } |
476 | 508 |
477 /// <summary>Field number for the "json_name" field.</summary> | 509 /// <summary>Field number for the "json_name" field.</summary> |
478 public const int JsonNameFieldNumber = 10; | 510 public const int JsonNameFieldNumber = 10; |
479 private string jsonName_ = ""; | 511 private string jsonName_ = ""; |
480 /// <summary> | 512 /// <summary> |
481 /// The field JSON name. | 513 /// The field JSON name. |
482 /// </summary> | 514 /// </summary> |
| 515 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
483 public string JsonName { | 516 public string JsonName { |
484 get { return jsonName_; } | 517 get { return jsonName_; } |
485 set { | 518 set { |
486 jsonName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 519 jsonName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
487 } | 520 } |
488 } | 521 } |
489 | 522 |
490 /// <summary>Field number for the "default_value" field.</summary> | 523 /// <summary>Field number for the "default_value" field.</summary> |
491 public const int DefaultValueFieldNumber = 11; | 524 public const int DefaultValueFieldNumber = 11; |
492 private string defaultValue_ = ""; | 525 private string defaultValue_ = ""; |
493 /// <summary> | 526 /// <summary> |
494 /// The string value of the default value of this field. Proto2 syntax only
. | 527 /// The string value of the default value of this field. Proto2 syntax only. |
495 /// </summary> | 528 /// </summary> |
| 529 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
496 public string DefaultValue { | 530 public string DefaultValue { |
497 get { return defaultValue_; } | 531 get { return defaultValue_; } |
498 set { | 532 set { |
499 defaultValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 533 defaultValue_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
500 } | 534 } |
501 } | 535 } |
502 | 536 |
| 537 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
503 public override bool Equals(object other) { | 538 public override bool Equals(object other) { |
504 return Equals(other as Field); | 539 return Equals(other as Field); |
505 } | 540 } |
506 | 541 |
| 542 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
507 public bool Equals(Field other) { | 543 public bool Equals(Field other) { |
508 if (ReferenceEquals(other, null)) { | 544 if (ReferenceEquals(other, null)) { |
509 return false; | 545 return false; |
510 } | 546 } |
511 if (ReferenceEquals(other, this)) { | 547 if (ReferenceEquals(other, this)) { |
512 return true; | 548 return true; |
513 } | 549 } |
514 if (Kind != other.Kind) return false; | 550 if (Kind != other.Kind) return false; |
515 if (Cardinality != other.Cardinality) return false; | 551 if (Cardinality != other.Cardinality) return false; |
516 if (Number != other.Number) return false; | 552 if (Number != other.Number) return false; |
517 if (Name != other.Name) return false; | 553 if (Name != other.Name) return false; |
518 if (TypeUrl != other.TypeUrl) return false; | 554 if (TypeUrl != other.TypeUrl) return false; |
519 if (OneofIndex != other.OneofIndex) return false; | 555 if (OneofIndex != other.OneofIndex) return false; |
520 if (Packed != other.Packed) return false; | 556 if (Packed != other.Packed) return false; |
521 if(!options_.Equals(other.options_)) return false; | 557 if(!options_.Equals(other.options_)) return false; |
522 if (JsonName != other.JsonName) return false; | 558 if (JsonName != other.JsonName) return false; |
523 if (DefaultValue != other.DefaultValue) return false; | 559 if (DefaultValue != other.DefaultValue) return false; |
524 return true; | 560 return true; |
525 } | 561 } |
526 | 562 |
| 563 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
527 public override int GetHashCode() { | 564 public override int GetHashCode() { |
528 int hash = 1; | 565 int hash = 1; |
529 if (Kind != 0) hash ^= Kind.GetHashCode(); | 566 if (Kind != 0) hash ^= Kind.GetHashCode(); |
530 if (Cardinality != 0) hash ^= Cardinality.GetHashCode(); | 567 if (Cardinality != 0) hash ^= Cardinality.GetHashCode(); |
531 if (Number != 0) hash ^= Number.GetHashCode(); | 568 if (Number != 0) hash ^= Number.GetHashCode(); |
532 if (Name.Length != 0) hash ^= Name.GetHashCode(); | 569 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
533 if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); | 570 if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); |
534 if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode(); | 571 if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode(); |
535 if (Packed != false) hash ^= Packed.GetHashCode(); | 572 if (Packed != false) hash ^= Packed.GetHashCode(); |
536 hash ^= options_.GetHashCode(); | 573 hash ^= options_.GetHashCode(); |
537 if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); | 574 if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); |
538 if (DefaultValue.Length != 0) hash ^= DefaultValue.GetHashCode(); | 575 if (DefaultValue.Length != 0) hash ^= DefaultValue.GetHashCode(); |
539 return hash; | 576 return hash; |
540 } | 577 } |
541 | 578 |
| 579 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
542 public override string ToString() { | 580 public override string ToString() { |
543 return pb::JsonFormatter.ToDiagnosticString(this); | 581 return pb::JsonFormatter.ToDiagnosticString(this); |
544 } | 582 } |
545 | 583 |
| 584 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
546 public void WriteTo(pb::CodedOutputStream output) { | 585 public void WriteTo(pb::CodedOutputStream output) { |
547 if (Kind != 0) { | 586 if (Kind != 0) { |
548 output.WriteRawTag(8); | 587 output.WriteRawTag(8); |
549 output.WriteEnum((int) Kind); | 588 output.WriteEnum((int) Kind); |
550 } | 589 } |
551 if (Cardinality != 0) { | 590 if (Cardinality != 0) { |
552 output.WriteRawTag(16); | 591 output.WriteRawTag(16); |
553 output.WriteEnum((int) Cardinality); | 592 output.WriteEnum((int) Cardinality); |
554 } | 593 } |
555 if (Number != 0) { | 594 if (Number != 0) { |
(...skipping 20 matching lines...) Expand all Loading... |
576 if (JsonName.Length != 0) { | 615 if (JsonName.Length != 0) { |
577 output.WriteRawTag(82); | 616 output.WriteRawTag(82); |
578 output.WriteString(JsonName); | 617 output.WriteString(JsonName); |
579 } | 618 } |
580 if (DefaultValue.Length != 0) { | 619 if (DefaultValue.Length != 0) { |
581 output.WriteRawTag(90); | 620 output.WriteRawTag(90); |
582 output.WriteString(DefaultValue); | 621 output.WriteString(DefaultValue); |
583 } | 622 } |
584 } | 623 } |
585 | 624 |
| 625 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
586 public int CalculateSize() { | 626 public int CalculateSize() { |
587 int size = 0; | 627 int size = 0; |
588 if (Kind != 0) { | 628 if (Kind != 0) { |
589 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); | 629 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Kind); |
590 } | 630 } |
591 if (Cardinality != 0) { | 631 if (Cardinality != 0) { |
592 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Cardinality); | 632 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Cardinality); |
593 } | 633 } |
594 if (Number != 0) { | 634 if (Number != 0) { |
595 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); | 635 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); |
(...skipping 13 matching lines...) Expand all Loading... |
609 size += options_.CalculateSize(_repeated_options_codec); | 649 size += options_.CalculateSize(_repeated_options_codec); |
610 if (JsonName.Length != 0) { | 650 if (JsonName.Length != 0) { |
611 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); | 651 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); |
612 } | 652 } |
613 if (DefaultValue.Length != 0) { | 653 if (DefaultValue.Length != 0) { |
614 size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); | 654 size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); |
615 } | 655 } |
616 return size; | 656 return size; |
617 } | 657 } |
618 | 658 |
| 659 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
619 public void MergeFrom(Field other) { | 660 public void MergeFrom(Field other) { |
620 if (other == null) { | 661 if (other == null) { |
621 return; | 662 return; |
622 } | 663 } |
623 if (other.Kind != 0) { | 664 if (other.Kind != 0) { |
624 Kind = other.Kind; | 665 Kind = other.Kind; |
625 } | 666 } |
626 if (other.Cardinality != 0) { | 667 if (other.Cardinality != 0) { |
627 Cardinality = other.Cardinality; | 668 Cardinality = other.Cardinality; |
628 } | 669 } |
(...skipping 14 matching lines...) Expand all Loading... |
643 } | 684 } |
644 options_.Add(other.options_); | 685 options_.Add(other.options_); |
645 if (other.JsonName.Length != 0) { | 686 if (other.JsonName.Length != 0) { |
646 JsonName = other.JsonName; | 687 JsonName = other.JsonName; |
647 } | 688 } |
648 if (other.DefaultValue.Length != 0) { | 689 if (other.DefaultValue.Length != 0) { |
649 DefaultValue = other.DefaultValue; | 690 DefaultValue = other.DefaultValue; |
650 } | 691 } |
651 } | 692 } |
652 | 693 |
| 694 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
653 public void MergeFrom(pb::CodedInputStream input) { | 695 public void MergeFrom(pb::CodedInputStream input) { |
654 uint tag; | 696 uint tag; |
655 while ((tag = input.ReadTag()) != 0) { | 697 while ((tag = input.ReadTag()) != 0) { |
656 switch(tag) { | 698 switch(tag) { |
657 default: | 699 default: |
658 input.SkipLastField(); | 700 input.SkipLastField(); |
659 break; | 701 break; |
660 case 8: { | 702 case 8: { |
661 kind_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) in
put.ReadEnum(); | 703 kind_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) in
put.ReadEnum(); |
662 break; | 704 break; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 case 90: { | 738 case 90: { |
697 DefaultValue = input.ReadString(); | 739 DefaultValue = input.ReadString(); |
698 break; | 740 break; |
699 } | 741 } |
700 } | 742 } |
701 } | 743 } |
702 } | 744 } |
703 | 745 |
704 #region Nested types | 746 #region Nested types |
705 /// <summary>Container for nested types declared in the Field message type.<
/summary> | 747 /// <summary>Container for nested types declared in the Field message type.<
/summary> |
706 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | 748 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
707 public static partial class Types { | 749 public static partial class Types { |
708 /// <summary> | 750 /// <summary> |
709 /// Basic field types. | 751 /// Basic field types. |
710 /// </summary> | 752 /// </summary> |
711 public enum Kind { | 753 public enum Kind { |
712 /// <summary> | 754 /// <summary> |
713 /// Field type unknown. | 755 /// Field type unknown. |
714 /// </summary> | 756 /// </summary> |
715 [pbr::OriginalName("TYPE_UNKNOWN")] TypeUnknown = 0, | 757 [pbr::OriginalName("TYPE_UNKNOWN")] TypeUnknown = 0, |
716 /// <summary> | 758 /// <summary> |
717 /// Field type double. | 759 /// Field type double. |
718 /// </summary> | 760 /// </summary> |
719 [pbr::OriginalName("TYPE_DOUBLE")] TypeDouble = 1, | 761 [pbr::OriginalName("TYPE_DOUBLE")] TypeDouble = 1, |
720 /// <summary> | 762 /// <summary> |
721 /// Field type float. | 763 /// Field type float. |
722 /// </summary> | 764 /// </summary> |
723 [pbr::OriginalName("TYPE_FLOAT")] TypeFloat = 2, | 765 [pbr::OriginalName("TYPE_FLOAT")] TypeFloat = 2, |
724 /// <summary> | 766 /// <summary> |
725 /// Field type int64. | 767 /// Field type int64. |
726 /// </summary> | 768 /// </summary> |
727 [pbr::OriginalName("TYPE_INT64")] TypeInt64 = 3, | 769 [pbr::OriginalName("TYPE_INT64")] TypeInt64 = 3, |
728 /// <summary> | 770 /// <summary> |
729 /// Field type uint64. | 771 /// Field type uint64. |
730 /// </summary> | 772 /// </summary> |
731 [pbr::OriginalName("TYPE_UINT64")] TypeUint64 = 4, | 773 [pbr::OriginalName("TYPE_UINT64")] TypeUint64 = 4, |
732 /// <summary> | 774 /// <summary> |
733 /// Field type int32. | 775 /// Field type int32. |
734 /// </summary> | 776 /// </summary> |
735 [pbr::OriginalName("TYPE_INT32")] TypeInt32 = 5, | 777 [pbr::OriginalName("TYPE_INT32")] TypeInt32 = 5, |
736 /// <summary> | 778 /// <summary> |
737 /// Field type fixed64. | 779 /// Field type fixed64. |
738 /// </summary> | 780 /// </summary> |
739 [pbr::OriginalName("TYPE_FIXED64")] TypeFixed64 = 6, | 781 [pbr::OriginalName("TYPE_FIXED64")] TypeFixed64 = 6, |
740 /// <summary> | 782 /// <summary> |
741 /// Field type fixed32. | 783 /// Field type fixed32. |
742 /// </summary> | 784 /// </summary> |
743 [pbr::OriginalName("TYPE_FIXED32")] TypeFixed32 = 7, | 785 [pbr::OriginalName("TYPE_FIXED32")] TypeFixed32 = 7, |
744 /// <summary> | 786 /// <summary> |
745 /// Field type bool. | 787 /// Field type bool. |
746 /// </summary> | 788 /// </summary> |
747 [pbr::OriginalName("TYPE_BOOL")] TypeBool = 8, | 789 [pbr::OriginalName("TYPE_BOOL")] TypeBool = 8, |
748 /// <summary> | 790 /// <summary> |
749 /// Field type string. | 791 /// Field type string. |
750 /// </summary> | 792 /// </summary> |
751 [pbr::OriginalName("TYPE_STRING")] TypeString = 9, | 793 [pbr::OriginalName("TYPE_STRING")] TypeString = 9, |
752 /// <summary> | 794 /// <summary> |
753 /// Field type group. Proto2 syntax only, and deprecated. | 795 /// Field type group. Proto2 syntax only, and deprecated. |
754 /// </summary> | 796 /// </summary> |
755 [pbr::OriginalName("TYPE_GROUP")] TypeGroup = 10, | 797 [pbr::OriginalName("TYPE_GROUP")] TypeGroup = 10, |
756 /// <summary> | 798 /// <summary> |
757 /// Field type message. | 799 /// Field type message. |
758 /// </summary> | 800 /// </summary> |
759 [pbr::OriginalName("TYPE_MESSAGE")] TypeMessage = 11, | 801 [pbr::OriginalName("TYPE_MESSAGE")] TypeMessage = 11, |
760 /// <summary> | 802 /// <summary> |
761 /// Field type bytes. | 803 /// Field type bytes. |
762 /// </summary> | 804 /// </summary> |
763 [pbr::OriginalName("TYPE_BYTES")] TypeBytes = 12, | 805 [pbr::OriginalName("TYPE_BYTES")] TypeBytes = 12, |
764 /// <summary> | 806 /// <summary> |
765 /// Field type uint32. | 807 /// Field type uint32. |
766 /// </summary> | 808 /// </summary> |
767 [pbr::OriginalName("TYPE_UINT32")] TypeUint32 = 13, | 809 [pbr::OriginalName("TYPE_UINT32")] TypeUint32 = 13, |
768 /// <summary> | 810 /// <summary> |
769 /// Field type enum. | 811 /// Field type enum. |
770 /// </summary> | 812 /// </summary> |
771 [pbr::OriginalName("TYPE_ENUM")] TypeEnum = 14, | 813 [pbr::OriginalName("TYPE_ENUM")] TypeEnum = 14, |
772 /// <summary> | 814 /// <summary> |
773 /// Field type sfixed32. | 815 /// Field type sfixed32. |
774 /// </summary> | 816 /// </summary> |
775 [pbr::OriginalName("TYPE_SFIXED32")] TypeSfixed32 = 15, | 817 [pbr::OriginalName("TYPE_SFIXED32")] TypeSfixed32 = 15, |
776 /// <summary> | 818 /// <summary> |
777 /// Field type sfixed64. | 819 /// Field type sfixed64. |
778 /// </summary> | 820 /// </summary> |
779 [pbr::OriginalName("TYPE_SFIXED64")] TypeSfixed64 = 16, | 821 [pbr::OriginalName("TYPE_SFIXED64")] TypeSfixed64 = 16, |
780 /// <summary> | 822 /// <summary> |
781 /// Field type sint32. | 823 /// Field type sint32. |
782 /// </summary> | 824 /// </summary> |
783 [pbr::OriginalName("TYPE_SINT32")] TypeSint32 = 17, | 825 [pbr::OriginalName("TYPE_SINT32")] TypeSint32 = 17, |
784 /// <summary> | 826 /// <summary> |
785 /// Field type sint64. | 827 /// Field type sint64. |
786 /// </summary> | 828 /// </summary> |
787 [pbr::OriginalName("TYPE_SINT64")] TypeSint64 = 18, | 829 [pbr::OriginalName("TYPE_SINT64")] TypeSint64 = 18, |
788 } | 830 } |
789 | 831 |
790 /// <summary> | 832 /// <summary> |
791 /// Whether a field is optional, required, or repeated. | 833 /// Whether a field is optional, required, or repeated. |
792 /// </summary> | 834 /// </summary> |
793 public enum Cardinality { | 835 public enum Cardinality { |
794 /// <summary> | 836 /// <summary> |
795 /// For fields with unknown cardinality. | 837 /// For fields with unknown cardinality. |
796 /// </summary> | 838 /// </summary> |
797 [pbr::OriginalName("CARDINALITY_UNKNOWN")] Unknown = 0, | 839 [pbr::OriginalName("CARDINALITY_UNKNOWN")] Unknown = 0, |
798 /// <summary> | 840 /// <summary> |
799 /// For optional fields. | 841 /// For optional fields. |
800 /// </summary> | 842 /// </summary> |
801 [pbr::OriginalName("CARDINALITY_OPTIONAL")] Optional = 1, | 843 [pbr::OriginalName("CARDINALITY_OPTIONAL")] Optional = 1, |
802 /// <summary> | 844 /// <summary> |
803 /// For required fields. Proto2 syntax only. | 845 /// For required fields. Proto2 syntax only. |
804 /// </summary> | 846 /// </summary> |
805 [pbr::OriginalName("CARDINALITY_REQUIRED")] Required = 2, | 847 [pbr::OriginalName("CARDINALITY_REQUIRED")] Required = 2, |
806 /// <summary> | 848 /// <summary> |
807 /// For repeated fields. | 849 /// For repeated fields. |
808 /// </summary> | 850 /// </summary> |
809 [pbr::OriginalName("CARDINALITY_REPEATED")] Repeated = 3, | 851 [pbr::OriginalName("CARDINALITY_REPEATED")] Repeated = 3, |
810 } | 852 } |
811 | 853 |
812 } | 854 } |
813 #endregion | 855 #endregion |
814 | 856 |
815 } | 857 } |
816 | 858 |
817 /// <summary> | 859 /// <summary> |
818 /// Enum type definition. | 860 /// Enum type definition. |
819 /// </summary> | 861 /// </summary> |
820 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
821 public sealed partial class Enum : pb::IMessage<Enum> { | 862 public sealed partial class Enum : pb::IMessage<Enum> { |
822 private static readonly pb::MessageParser<Enum> _parser = new pb::MessagePar
ser<Enum>(() => new Enum()); | 863 private static readonly pb::MessageParser<Enum> _parser = new pb::MessagePar
ser<Enum>(() => new Enum()); |
| 864 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
823 public static pb::MessageParser<Enum> Parser { get { return _parser; } } | 865 public static pb::MessageParser<Enum> Parser { get { return _parser; } } |
824 | 866 |
| 867 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
825 public static pbr::MessageDescriptor Descriptor { | 868 public static pbr::MessageDescriptor Descriptor { |
826 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[2]; } | 869 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[2]; } |
827 } | 870 } |
828 | 871 |
| 872 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
829 pbr::MessageDescriptor pb::IMessage.Descriptor { | 873 pbr::MessageDescriptor pb::IMessage.Descriptor { |
830 get { return Descriptor; } | 874 get { return Descriptor; } |
831 } | 875 } |
832 | 876 |
| 877 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
833 public Enum() { | 878 public Enum() { |
834 OnConstruction(); | 879 OnConstruction(); |
835 } | 880 } |
836 | 881 |
837 partial void OnConstruction(); | 882 partial void OnConstruction(); |
838 | 883 |
| 884 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
839 public Enum(Enum other) : this() { | 885 public Enum(Enum other) : this() { |
840 name_ = other.name_; | 886 name_ = other.name_; |
841 enumvalue_ = other.enumvalue_.Clone(); | 887 enumvalue_ = other.enumvalue_.Clone(); |
842 options_ = other.options_.Clone(); | 888 options_ = other.options_.Clone(); |
843 SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone()
: null; | 889 SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone()
: null; |
844 syntax_ = other.syntax_; | 890 syntax_ = other.syntax_; |
845 } | 891 } |
846 | 892 |
| 893 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
847 public Enum Clone() { | 894 public Enum Clone() { |
848 return new Enum(this); | 895 return new Enum(this); |
849 } | 896 } |
850 | 897 |
851 /// <summary>Field number for the "name" field.</summary> | 898 /// <summary>Field number for the "name" field.</summary> |
852 public const int NameFieldNumber = 1; | 899 public const int NameFieldNumber = 1; |
853 private string name_ = ""; | 900 private string name_ = ""; |
854 /// <summary> | 901 /// <summary> |
855 /// Enum type name. | 902 /// Enum type name. |
856 /// </summary> | 903 /// </summary> |
| 904 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
857 public string Name { | 905 public string Name { |
858 get { return name_; } | 906 get { return name_; } |
859 set { | 907 set { |
860 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 908 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
861 } | 909 } |
862 } | 910 } |
863 | 911 |
864 /// <summary>Field number for the "enumvalue" field.</summary> | 912 /// <summary>Field number for the "enumvalue" field.</summary> |
865 public const int EnumvalueFieldNumber = 2; | 913 public const int EnumvalueFieldNumber = 2; |
866 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.EnumValue> _repeated_enumvalue_codec | 914 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.EnumValue> _repeated_enumvalue_codec |
867 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.E
numValue.Parser); | 915 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.E
numValue.Parser); |
868 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.E
numValue> enumvalue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownT
ypes.EnumValue>(); | 916 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.E
numValue> enumvalue_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownT
ypes.EnumValue>(); |
869 /// <summary> | 917 /// <summary> |
870 /// Enum value definitions. | 918 /// Enum value definitions. |
871 /// </summary> | 919 /// </summary> |
| 920 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
872 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue>
Enumvalue { | 921 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.EnumValue>
Enumvalue { |
873 get { return enumvalue_; } | 922 get { return enumvalue_; } |
874 } | 923 } |
875 | 924 |
876 /// <summary>Field number for the "options" field.</summary> | 925 /// <summary>Field number for the "options" field.</summary> |
877 public const int OptionsFieldNumber = 3; | 926 public const int OptionsFieldNumber = 3; |
878 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Option> _repeated_options_codec | 927 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Option> _repeated_options_codec |
879 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.O
ption.Parser); | 928 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.O
ption.Parser); |
880 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.O
ption> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.
Option>(); | 929 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.O
ption> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.
Option>(); |
881 /// <summary> | 930 /// <summary> |
882 /// Protocol buffer options. | 931 /// Protocol buffer options. |
883 /// </summary> | 932 /// </summary> |
| 933 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
884 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Opt
ions { | 934 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Opt
ions { |
885 get { return options_; } | 935 get { return options_; } |
886 } | 936 } |
887 | 937 |
888 /// <summary>Field number for the "source_context" field.</summary> | 938 /// <summary>Field number for the "source_context" field.</summary> |
889 public const int SourceContextFieldNumber = 4; | 939 public const int SourceContextFieldNumber = 4; |
890 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; | 940 private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContext_; |
891 /// <summary> | 941 /// <summary> |
892 /// The source context. | 942 /// The source context. |
893 /// </summary> | 943 /// </summary> |
| 944 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
894 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { | 945 public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContext { |
895 get { return sourceContext_; } | 946 get { return sourceContext_; } |
896 set { | 947 set { |
897 sourceContext_ = value; | 948 sourceContext_ = value; |
898 } | 949 } |
899 } | 950 } |
900 | 951 |
901 /// <summary>Field number for the "syntax" field.</summary> | 952 /// <summary>Field number for the "syntax" field.</summary> |
902 public const int SyntaxFieldNumber = 5; | 953 public const int SyntaxFieldNumber = 5; |
903 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0; | 954 private global::Google.Protobuf.WellKnownTypes.Syntax syntax_ = 0; |
904 /// <summary> | 955 /// <summary> |
905 /// The source syntax. | 956 /// The source syntax. |
906 /// </summary> | 957 /// </summary> |
| 958 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
907 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { | 959 public global::Google.Protobuf.WellKnownTypes.Syntax Syntax { |
908 get { return syntax_; } | 960 get { return syntax_; } |
909 set { | 961 set { |
910 syntax_ = value; | 962 syntax_ = value; |
911 } | 963 } |
912 } | 964 } |
913 | 965 |
| 966 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
914 public override bool Equals(object other) { | 967 public override bool Equals(object other) { |
915 return Equals(other as Enum); | 968 return Equals(other as Enum); |
916 } | 969 } |
917 | 970 |
| 971 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
918 public bool Equals(Enum other) { | 972 public bool Equals(Enum other) { |
919 if (ReferenceEquals(other, null)) { | 973 if (ReferenceEquals(other, null)) { |
920 return false; | 974 return false; |
921 } | 975 } |
922 if (ReferenceEquals(other, this)) { | 976 if (ReferenceEquals(other, this)) { |
923 return true; | 977 return true; |
924 } | 978 } |
925 if (Name != other.Name) return false; | 979 if (Name != other.Name) return false; |
926 if(!enumvalue_.Equals(other.enumvalue_)) return false; | 980 if(!enumvalue_.Equals(other.enumvalue_)) return false; |
927 if(!options_.Equals(other.options_)) return false; | 981 if(!options_.Equals(other.options_)) return false; |
928 if (!object.Equals(SourceContext, other.SourceContext)) return false; | 982 if (!object.Equals(SourceContext, other.SourceContext)) return false; |
929 if (Syntax != other.Syntax) return false; | 983 if (Syntax != other.Syntax) return false; |
930 return true; | 984 return true; |
931 } | 985 } |
932 | 986 |
| 987 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
933 public override int GetHashCode() { | 988 public override int GetHashCode() { |
934 int hash = 1; | 989 int hash = 1; |
935 if (Name.Length != 0) hash ^= Name.GetHashCode(); | 990 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
936 hash ^= enumvalue_.GetHashCode(); | 991 hash ^= enumvalue_.GetHashCode(); |
937 hash ^= options_.GetHashCode(); | 992 hash ^= options_.GetHashCode(); |
938 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); | 993 if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); |
939 if (Syntax != 0) hash ^= Syntax.GetHashCode(); | 994 if (Syntax != 0) hash ^= Syntax.GetHashCode(); |
940 return hash; | 995 return hash; |
941 } | 996 } |
942 | 997 |
| 998 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
943 public override string ToString() { | 999 public override string ToString() { |
944 return pb::JsonFormatter.ToDiagnosticString(this); | 1000 return pb::JsonFormatter.ToDiagnosticString(this); |
945 } | 1001 } |
946 | 1002 |
| 1003 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
947 public void WriteTo(pb::CodedOutputStream output) { | 1004 public void WriteTo(pb::CodedOutputStream output) { |
948 if (Name.Length != 0) { | 1005 if (Name.Length != 0) { |
949 output.WriteRawTag(10); | 1006 output.WriteRawTag(10); |
950 output.WriteString(Name); | 1007 output.WriteString(Name); |
951 } | 1008 } |
952 enumvalue_.WriteTo(output, _repeated_enumvalue_codec); | 1009 enumvalue_.WriteTo(output, _repeated_enumvalue_codec); |
953 options_.WriteTo(output, _repeated_options_codec); | 1010 options_.WriteTo(output, _repeated_options_codec); |
954 if (sourceContext_ != null) { | 1011 if (sourceContext_ != null) { |
955 output.WriteRawTag(34); | 1012 output.WriteRawTag(34); |
956 output.WriteMessage(SourceContext); | 1013 output.WriteMessage(SourceContext); |
957 } | 1014 } |
958 if (Syntax != 0) { | 1015 if (Syntax != 0) { |
959 output.WriteRawTag(40); | 1016 output.WriteRawTag(40); |
960 output.WriteEnum((int) Syntax); | 1017 output.WriteEnum((int) Syntax); |
961 } | 1018 } |
962 } | 1019 } |
963 | 1020 |
| 1021 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
964 public int CalculateSize() { | 1022 public int CalculateSize() { |
965 int size = 0; | 1023 int size = 0; |
966 if (Name.Length != 0) { | 1024 if (Name.Length != 0) { |
967 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); | 1025 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
968 } | 1026 } |
969 size += enumvalue_.CalculateSize(_repeated_enumvalue_codec); | 1027 size += enumvalue_.CalculateSize(_repeated_enumvalue_codec); |
970 size += options_.CalculateSize(_repeated_options_codec); | 1028 size += options_.CalculateSize(_repeated_options_codec); |
971 if (sourceContext_ != null) { | 1029 if (sourceContext_ != null) { |
972 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); | 1030 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceContext); |
973 } | 1031 } |
974 if (Syntax != 0) { | 1032 if (Syntax != 0) { |
975 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); | 1033 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); |
976 } | 1034 } |
977 return size; | 1035 return size; |
978 } | 1036 } |
979 | 1037 |
| 1038 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
980 public void MergeFrom(Enum other) { | 1039 public void MergeFrom(Enum other) { |
981 if (other == null) { | 1040 if (other == null) { |
982 return; | 1041 return; |
983 } | 1042 } |
984 if (other.Name.Length != 0) { | 1043 if (other.Name.Length != 0) { |
985 Name = other.Name; | 1044 Name = other.Name; |
986 } | 1045 } |
987 enumvalue_.Add(other.enumvalue_); | 1046 enumvalue_.Add(other.enumvalue_); |
988 options_.Add(other.options_); | 1047 options_.Add(other.options_); |
989 if (other.sourceContext_ != null) { | 1048 if (other.sourceContext_ != null) { |
990 if (sourceContext_ == null) { | 1049 if (sourceContext_ == null) { |
991 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceCont
ext(); | 1050 sourceContext_ = new global::Google.Protobuf.WellKnownTypes.SourceCont
ext(); |
992 } | 1051 } |
993 SourceContext.MergeFrom(other.SourceContext); | 1052 SourceContext.MergeFrom(other.SourceContext); |
994 } | 1053 } |
995 if (other.Syntax != 0) { | 1054 if (other.Syntax != 0) { |
996 Syntax = other.Syntax; | 1055 Syntax = other.Syntax; |
997 } | 1056 } |
998 } | 1057 } |
999 | 1058 |
| 1059 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1000 public void MergeFrom(pb::CodedInputStream input) { | 1060 public void MergeFrom(pb::CodedInputStream input) { |
1001 uint tag; | 1061 uint tag; |
1002 while ((tag = input.ReadTag()) != 0) { | 1062 while ((tag = input.ReadTag()) != 0) { |
1003 switch(tag) { | 1063 switch(tag) { |
1004 default: | 1064 default: |
1005 input.SkipLastField(); | 1065 input.SkipLastField(); |
1006 break; | 1066 break; |
1007 case 10: { | 1067 case 10: { |
1008 Name = input.ReadString(); | 1068 Name = input.ReadString(); |
1009 break; | 1069 break; |
(...skipping 17 matching lines...) Expand all Loading... |
1027 syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.Read
Enum(); | 1087 syntax_ = (global::Google.Protobuf.WellKnownTypes.Syntax) input.Read
Enum(); |
1028 break; | 1088 break; |
1029 } | 1089 } |
1030 } | 1090 } |
1031 } | 1091 } |
1032 } | 1092 } |
1033 | 1093 |
1034 } | 1094 } |
1035 | 1095 |
1036 /// <summary> | 1096 /// <summary> |
1037 /// Enum value definition. | 1097 /// Enum value definition. |
1038 /// </summary> | 1098 /// </summary> |
1039 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
1040 public sealed partial class EnumValue : pb::IMessage<EnumValue> { | 1099 public sealed partial class EnumValue : pb::IMessage<EnumValue> { |
1041 private static readonly pb::MessageParser<EnumValue> _parser = new pb::Messa
geParser<EnumValue>(() => new EnumValue()); | 1100 private static readonly pb::MessageParser<EnumValue> _parser = new pb::Messa
geParser<EnumValue>(() => new EnumValue()); |
| 1101 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1042 public static pb::MessageParser<EnumValue> Parser { get { return _parser; }
} | 1102 public static pb::MessageParser<EnumValue> Parser { get { return _parser; }
} |
1043 | 1103 |
| 1104 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1044 public static pbr::MessageDescriptor Descriptor { | 1105 public static pbr::MessageDescriptor Descriptor { |
1045 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[3]; } | 1106 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[3]; } |
1046 } | 1107 } |
1047 | 1108 |
| 1109 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1048 pbr::MessageDescriptor pb::IMessage.Descriptor { | 1110 pbr::MessageDescriptor pb::IMessage.Descriptor { |
1049 get { return Descriptor; } | 1111 get { return Descriptor; } |
1050 } | 1112 } |
1051 | 1113 |
| 1114 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1052 public EnumValue() { | 1115 public EnumValue() { |
1053 OnConstruction(); | 1116 OnConstruction(); |
1054 } | 1117 } |
1055 | 1118 |
1056 partial void OnConstruction(); | 1119 partial void OnConstruction(); |
1057 | 1120 |
| 1121 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1058 public EnumValue(EnumValue other) : this() { | 1122 public EnumValue(EnumValue other) : this() { |
1059 name_ = other.name_; | 1123 name_ = other.name_; |
1060 number_ = other.number_; | 1124 number_ = other.number_; |
1061 options_ = other.options_.Clone(); | 1125 options_ = other.options_.Clone(); |
1062 } | 1126 } |
1063 | 1127 |
| 1128 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1064 public EnumValue Clone() { | 1129 public EnumValue Clone() { |
1065 return new EnumValue(this); | 1130 return new EnumValue(this); |
1066 } | 1131 } |
1067 | 1132 |
1068 /// <summary>Field number for the "name" field.</summary> | 1133 /// <summary>Field number for the "name" field.</summary> |
1069 public const int NameFieldNumber = 1; | 1134 public const int NameFieldNumber = 1; |
1070 private string name_ = ""; | 1135 private string name_ = ""; |
1071 /// <summary> | 1136 /// <summary> |
1072 /// Enum value name. | 1137 /// Enum value name. |
1073 /// </summary> | 1138 /// </summary> |
| 1139 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1074 public string Name { | 1140 public string Name { |
1075 get { return name_; } | 1141 get { return name_; } |
1076 set { | 1142 set { |
1077 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 1143 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
1078 } | 1144 } |
1079 } | 1145 } |
1080 | 1146 |
1081 /// <summary>Field number for the "number" field.</summary> | 1147 /// <summary>Field number for the "number" field.</summary> |
1082 public const int NumberFieldNumber = 2; | 1148 public const int NumberFieldNumber = 2; |
1083 private int number_; | 1149 private int number_; |
1084 /// <summary> | 1150 /// <summary> |
1085 /// Enum value number. | 1151 /// Enum value number. |
1086 /// </summary> | 1152 /// </summary> |
| 1153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1087 public int Number { | 1154 public int Number { |
1088 get { return number_; } | 1155 get { return number_; } |
1089 set { | 1156 set { |
1090 number_ = value; | 1157 number_ = value; |
1091 } | 1158 } |
1092 } | 1159 } |
1093 | 1160 |
1094 /// <summary>Field number for the "options" field.</summary> | 1161 /// <summary>Field number for the "options" field.</summary> |
1095 public const int OptionsFieldNumber = 3; | 1162 public const int OptionsFieldNumber = 3; |
1096 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Option> _repeated_options_codec | 1163 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownType
s.Option> _repeated_options_codec |
1097 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.O
ption.Parser); | 1164 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.O
ption.Parser); |
1098 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.O
ption> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.
Option>(); | 1165 private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.O
ption> options_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.
Option>(); |
1099 /// <summary> | 1166 /// <summary> |
1100 /// Protocol buffer options. | 1167 /// Protocol buffer options. |
1101 /// </summary> | 1168 /// </summary> |
| 1169 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1102 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Opt
ions { | 1170 public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Option> Opt
ions { |
1103 get { return options_; } | 1171 get { return options_; } |
1104 } | 1172 } |
1105 | 1173 |
| 1174 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1106 public override bool Equals(object other) { | 1175 public override bool Equals(object other) { |
1107 return Equals(other as EnumValue); | 1176 return Equals(other as EnumValue); |
1108 } | 1177 } |
1109 | 1178 |
| 1179 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1110 public bool Equals(EnumValue other) { | 1180 public bool Equals(EnumValue other) { |
1111 if (ReferenceEquals(other, null)) { | 1181 if (ReferenceEquals(other, null)) { |
1112 return false; | 1182 return false; |
1113 } | 1183 } |
1114 if (ReferenceEquals(other, this)) { | 1184 if (ReferenceEquals(other, this)) { |
1115 return true; | 1185 return true; |
1116 } | 1186 } |
1117 if (Name != other.Name) return false; | 1187 if (Name != other.Name) return false; |
1118 if (Number != other.Number) return false; | 1188 if (Number != other.Number) return false; |
1119 if(!options_.Equals(other.options_)) return false; | 1189 if(!options_.Equals(other.options_)) return false; |
1120 return true; | 1190 return true; |
1121 } | 1191 } |
1122 | 1192 |
| 1193 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1123 public override int GetHashCode() { | 1194 public override int GetHashCode() { |
1124 int hash = 1; | 1195 int hash = 1; |
1125 if (Name.Length != 0) hash ^= Name.GetHashCode(); | 1196 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
1126 if (Number != 0) hash ^= Number.GetHashCode(); | 1197 if (Number != 0) hash ^= Number.GetHashCode(); |
1127 hash ^= options_.GetHashCode(); | 1198 hash ^= options_.GetHashCode(); |
1128 return hash; | 1199 return hash; |
1129 } | 1200 } |
1130 | 1201 |
| 1202 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1131 public override string ToString() { | 1203 public override string ToString() { |
1132 return pb::JsonFormatter.ToDiagnosticString(this); | 1204 return pb::JsonFormatter.ToDiagnosticString(this); |
1133 } | 1205 } |
1134 | 1206 |
| 1207 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1135 public void WriteTo(pb::CodedOutputStream output) { | 1208 public void WriteTo(pb::CodedOutputStream output) { |
1136 if (Name.Length != 0) { | 1209 if (Name.Length != 0) { |
1137 output.WriteRawTag(10); | 1210 output.WriteRawTag(10); |
1138 output.WriteString(Name); | 1211 output.WriteString(Name); |
1139 } | 1212 } |
1140 if (Number != 0) { | 1213 if (Number != 0) { |
1141 output.WriteRawTag(16); | 1214 output.WriteRawTag(16); |
1142 output.WriteInt32(Number); | 1215 output.WriteInt32(Number); |
1143 } | 1216 } |
1144 options_.WriteTo(output, _repeated_options_codec); | 1217 options_.WriteTo(output, _repeated_options_codec); |
1145 } | 1218 } |
1146 | 1219 |
| 1220 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1147 public int CalculateSize() { | 1221 public int CalculateSize() { |
1148 int size = 0; | 1222 int size = 0; |
1149 if (Name.Length != 0) { | 1223 if (Name.Length != 0) { |
1150 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); | 1224 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
1151 } | 1225 } |
1152 if (Number != 0) { | 1226 if (Number != 0) { |
1153 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); | 1227 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); |
1154 } | 1228 } |
1155 size += options_.CalculateSize(_repeated_options_codec); | 1229 size += options_.CalculateSize(_repeated_options_codec); |
1156 return size; | 1230 return size; |
1157 } | 1231 } |
1158 | 1232 |
| 1233 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1159 public void MergeFrom(EnumValue other) { | 1234 public void MergeFrom(EnumValue other) { |
1160 if (other == null) { | 1235 if (other == null) { |
1161 return; | 1236 return; |
1162 } | 1237 } |
1163 if (other.Name.Length != 0) { | 1238 if (other.Name.Length != 0) { |
1164 Name = other.Name; | 1239 Name = other.Name; |
1165 } | 1240 } |
1166 if (other.Number != 0) { | 1241 if (other.Number != 0) { |
1167 Number = other.Number; | 1242 Number = other.Number; |
1168 } | 1243 } |
1169 options_.Add(other.options_); | 1244 options_.Add(other.options_); |
1170 } | 1245 } |
1171 | 1246 |
| 1247 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1172 public void MergeFrom(pb::CodedInputStream input) { | 1248 public void MergeFrom(pb::CodedInputStream input) { |
1173 uint tag; | 1249 uint tag; |
1174 while ((tag = input.ReadTag()) != 0) { | 1250 while ((tag = input.ReadTag()) != 0) { |
1175 switch(tag) { | 1251 switch(tag) { |
1176 default: | 1252 default: |
1177 input.SkipLastField(); | 1253 input.SkipLastField(); |
1178 break; | 1254 break; |
1179 case 10: { | 1255 case 10: { |
1180 Name = input.ReadString(); | 1256 Name = input.ReadString(); |
1181 break; | 1257 break; |
1182 } | 1258 } |
1183 case 16: { | 1259 case 16: { |
1184 Number = input.ReadInt32(); | 1260 Number = input.ReadInt32(); |
1185 break; | 1261 break; |
1186 } | 1262 } |
1187 case 26: { | 1263 case 26: { |
1188 options_.AddEntriesFrom(input, _repeated_options_codec); | 1264 options_.AddEntriesFrom(input, _repeated_options_codec); |
1189 break; | 1265 break; |
1190 } | 1266 } |
1191 } | 1267 } |
1192 } | 1268 } |
1193 } | 1269 } |
1194 | 1270 |
1195 } | 1271 } |
1196 | 1272 |
1197 /// <summary> | 1273 /// <summary> |
1198 /// A protocol buffer option, which can be attached to a message, field, | 1274 /// A protocol buffer option, which can be attached to a message, field, |
1199 /// enumeration, etc. | 1275 /// enumeration, etc. |
1200 /// </summary> | 1276 /// </summary> |
1201 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
1202 public sealed partial class Option : pb::IMessage<Option> { | 1277 public sealed partial class Option : pb::IMessage<Option> { |
1203 private static readonly pb::MessageParser<Option> _parser = new pb::MessageP
arser<Option>(() => new Option()); | 1278 private static readonly pb::MessageParser<Option> _parser = new pb::MessageP
arser<Option>(() => new Option()); |
| 1279 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1204 public static pb::MessageParser<Option> Parser { get { return _parser; } } | 1280 public static pb::MessageParser<Option> Parser { get { return _parser; } } |
1205 | 1281 |
| 1282 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1206 public static pbr::MessageDescriptor Descriptor { | 1283 public static pbr::MessageDescriptor Descriptor { |
1207 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[4]; } | 1284 get { return global::Google.Protobuf.WellKnownTypes.TypeReflection.Descrip
tor.MessageTypes[4]; } |
1208 } | 1285 } |
1209 | 1286 |
| 1287 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1210 pbr::MessageDescriptor pb::IMessage.Descriptor { | 1288 pbr::MessageDescriptor pb::IMessage.Descriptor { |
1211 get { return Descriptor; } | 1289 get { return Descriptor; } |
1212 } | 1290 } |
1213 | 1291 |
| 1292 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1214 public Option() { | 1293 public Option() { |
1215 OnConstruction(); | 1294 OnConstruction(); |
1216 } | 1295 } |
1217 | 1296 |
1218 partial void OnConstruction(); | 1297 partial void OnConstruction(); |
1219 | 1298 |
| 1299 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1220 public Option(Option other) : this() { | 1300 public Option(Option other) : this() { |
1221 name_ = other.name_; | 1301 name_ = other.name_; |
1222 Value = other.value_ != null ? other.Value.Clone() : null; | 1302 Value = other.value_ != null ? other.Value.Clone() : null; |
1223 } | 1303 } |
1224 | 1304 |
| 1305 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1225 public Option Clone() { | 1306 public Option Clone() { |
1226 return new Option(this); | 1307 return new Option(this); |
1227 } | 1308 } |
1228 | 1309 |
1229 /// <summary>Field number for the "name" field.</summary> | 1310 /// <summary>Field number for the "name" field.</summary> |
1230 public const int NameFieldNumber = 1; | 1311 public const int NameFieldNumber = 1; |
1231 private string name_ = ""; | 1312 private string name_ = ""; |
1232 /// <summary> | 1313 /// <summary> |
1233 /// The option's name. For example, `"java_package"`. | 1314 /// The option's name. For example, `"java_package"`. |
1234 /// </summary> | 1315 /// </summary> |
| 1316 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1235 public string Name { | 1317 public string Name { |
1236 get { return name_; } | 1318 get { return name_; } |
1237 set { | 1319 set { |
1238 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | 1320 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); |
1239 } | 1321 } |
1240 } | 1322 } |
1241 | 1323 |
1242 /// <summary>Field number for the "value" field.</summary> | 1324 /// <summary>Field number for the "value" field.</summary> |
1243 public const int ValueFieldNumber = 2; | 1325 public const int ValueFieldNumber = 2; |
1244 private global::Google.Protobuf.WellKnownTypes.Any value_; | 1326 private global::Google.Protobuf.WellKnownTypes.Any value_; |
1245 /// <summary> | 1327 /// <summary> |
1246 /// The option's value. For example, `"com.google.protobuf"`. | 1328 /// The option's value. For example, `"com.google.protobuf"`. |
1247 /// </summary> | 1329 /// </summary> |
| 1330 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1248 public global::Google.Protobuf.WellKnownTypes.Any Value { | 1331 public global::Google.Protobuf.WellKnownTypes.Any Value { |
1249 get { return value_; } | 1332 get { return value_; } |
1250 set { | 1333 set { |
1251 value_ = value; | 1334 value_ = value; |
1252 } | 1335 } |
1253 } | 1336 } |
1254 | 1337 |
| 1338 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1255 public override bool Equals(object other) { | 1339 public override bool Equals(object other) { |
1256 return Equals(other as Option); | 1340 return Equals(other as Option); |
1257 } | 1341 } |
1258 | 1342 |
| 1343 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1259 public bool Equals(Option other) { | 1344 public bool Equals(Option other) { |
1260 if (ReferenceEquals(other, null)) { | 1345 if (ReferenceEquals(other, null)) { |
1261 return false; | 1346 return false; |
1262 } | 1347 } |
1263 if (ReferenceEquals(other, this)) { | 1348 if (ReferenceEquals(other, this)) { |
1264 return true; | 1349 return true; |
1265 } | 1350 } |
1266 if (Name != other.Name) return false; | 1351 if (Name != other.Name) return false; |
1267 if (!object.Equals(Value, other.Value)) return false; | 1352 if (!object.Equals(Value, other.Value)) return false; |
1268 return true; | 1353 return true; |
1269 } | 1354 } |
1270 | 1355 |
| 1356 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1271 public override int GetHashCode() { | 1357 public override int GetHashCode() { |
1272 int hash = 1; | 1358 int hash = 1; |
1273 if (Name.Length != 0) hash ^= Name.GetHashCode(); | 1359 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
1274 if (value_ != null) hash ^= Value.GetHashCode(); | 1360 if (value_ != null) hash ^= Value.GetHashCode(); |
1275 return hash; | 1361 return hash; |
1276 } | 1362 } |
1277 | 1363 |
| 1364 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1278 public override string ToString() { | 1365 public override string ToString() { |
1279 return pb::JsonFormatter.ToDiagnosticString(this); | 1366 return pb::JsonFormatter.ToDiagnosticString(this); |
1280 } | 1367 } |
1281 | 1368 |
| 1369 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1282 public void WriteTo(pb::CodedOutputStream output) { | 1370 public void WriteTo(pb::CodedOutputStream output) { |
1283 if (Name.Length != 0) { | 1371 if (Name.Length != 0) { |
1284 output.WriteRawTag(10); | 1372 output.WriteRawTag(10); |
1285 output.WriteString(Name); | 1373 output.WriteString(Name); |
1286 } | 1374 } |
1287 if (value_ != null) { | 1375 if (value_ != null) { |
1288 output.WriteRawTag(18); | 1376 output.WriteRawTag(18); |
1289 output.WriteMessage(Value); | 1377 output.WriteMessage(Value); |
1290 } | 1378 } |
1291 } | 1379 } |
1292 | 1380 |
| 1381 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1293 public int CalculateSize() { | 1382 public int CalculateSize() { |
1294 int size = 0; | 1383 int size = 0; |
1295 if (Name.Length != 0) { | 1384 if (Name.Length != 0) { |
1296 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); | 1385 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
1297 } | 1386 } |
1298 if (value_ != null) { | 1387 if (value_ != null) { |
1299 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value); | 1388 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value); |
1300 } | 1389 } |
1301 return size; | 1390 return size; |
1302 } | 1391 } |
1303 | 1392 |
| 1393 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1304 public void MergeFrom(Option other) { | 1394 public void MergeFrom(Option other) { |
1305 if (other == null) { | 1395 if (other == null) { |
1306 return; | 1396 return; |
1307 } | 1397 } |
1308 if (other.Name.Length != 0) { | 1398 if (other.Name.Length != 0) { |
1309 Name = other.Name; | 1399 Name = other.Name; |
1310 } | 1400 } |
1311 if (other.value_ != null) { | 1401 if (other.value_ != null) { |
1312 if (value_ == null) { | 1402 if (value_ == null) { |
1313 value_ = new global::Google.Protobuf.WellKnownTypes.Any(); | 1403 value_ = new global::Google.Protobuf.WellKnownTypes.Any(); |
1314 } | 1404 } |
1315 Value.MergeFrom(other.Value); | 1405 Value.MergeFrom(other.Value); |
1316 } | 1406 } |
1317 } | 1407 } |
1318 | 1408 |
| 1409 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
1319 public void MergeFrom(pb::CodedInputStream input) { | 1410 public void MergeFrom(pb::CodedInputStream input) { |
1320 uint tag; | 1411 uint tag; |
1321 while ((tag = input.ReadTag()) != 0) { | 1412 while ((tag = input.ReadTag()) != 0) { |
1322 switch(tag) { | 1413 switch(tag) { |
1323 default: | 1414 default: |
1324 input.SkipLastField(); | 1415 input.SkipLastField(); |
1325 break; | 1416 break; |
1326 case 10: { | 1417 case 10: { |
1327 Name = input.ReadString(); | 1418 Name = input.ReadString(); |
1328 break; | 1419 break; |
1329 } | 1420 } |
1330 case 18: { | 1421 case 18: { |
1331 if (value_ == null) { | 1422 if (value_ == null) { |
1332 value_ = new global::Google.Protobuf.WellKnownTypes.Any(); | 1423 value_ = new global::Google.Protobuf.WellKnownTypes.Any(); |
1333 } | 1424 } |
1334 input.ReadMessage(value_); | 1425 input.ReadMessage(value_); |
1335 break; | 1426 break; |
1336 } | 1427 } |
1337 } | 1428 } |
1338 } | 1429 } |
1339 } | 1430 } |
1340 | 1431 |
1341 } | 1432 } |
1342 | 1433 |
1343 #endregion | 1434 #endregion |
1344 | 1435 |
1345 } | 1436 } |
1346 | 1437 |
1347 #endregion Designer generated code | 1438 #endregion Designer generated code |
OLD | NEW |