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