blob: cf12e6c650b06df02d9b16c2910b615c73c2d521 [file] [log] [blame]
Jon Skeet62a4aa52015-07-14 14:26:49 +01001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/source_context.proto
3#pragma warning disable 1591, 0612, 3021
4#region Designer generated code
5
6using pb = global::Google.Protobuf;
7using pbc = global::Google.Protobuf.Collections;
8using pbr = global::Google.Protobuf.Reflection;
9using scg = global::System.Collections.Generic;
10namespace Google.Protobuf.WellKnownTypes {
11
Jon Skeet284bb452015-11-05 09:13:53 +000012 /// <summary>Holder for reflection information generated from google/protobuf/source_context.proto</summary>
13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14 public static partial class SourceContextReflection {
Jon Skeet62a4aa52015-07-14 14:26:49 +010015
Jon Skeet284bb452015-11-05 09:13:53 +000016 #region Descriptor
17 /// <summary>File descriptor for google/protobuf/source_context.proto</summary>
18 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010020 }
Jon Skeet284bb452015-11-05 09:13:53 +000021 private static pbr::FileDescriptor descriptor;
22
23 static SourceContextReflection() {
24 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
26 "CiRnb29nbGUvcHJvdG9idWYvc291cmNlX2NvbnRleHQucHJvdG8SD2dvb2ds",
27 "ZS5wcm90b2J1ZiIiCg1Tb3VyY2VDb250ZXh0EhEKCWZpbGVfbmFtZRgBIAEo",
28 "CUJVChNjb20uZ29vZ2xlLnByb3RvYnVmQhJTb3VyY2VDb250ZXh0UHJvdG9Q",
29 "AaABAaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IG",
30 "cHJvdG8z"));
31 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
32 new pbr::FileDescriptor[] { },
33 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
Jon Skeeteadd4ca2015-11-13 20:04:14 +000034 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.SourceContext), global::Google.Protobuf.WellKnownTypes.SourceContext.Parser, new[]{ "FileName" }, null, null, null)
Jon Skeet284bb452015-11-05 09:13:53 +000035 }));
36 }
37 #endregion
38
Jon Skeet62a4aa52015-07-14 14:26:49 +010039 }
40 #region Messages
Jon Skeet18e0a2e2015-10-01 10:38:01 +010041 /// <summary>
42 /// `SourceContext` represents information about the source of a
43 /// protobuf element, like the file in which it is defined.
44 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010045 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
46 public sealed partial class SourceContext : pb::IMessage<SourceContext> {
47 private static readonly pb::MessageParser<SourceContext> _parser = new pb::MessageParser<SourceContext>(() => new SourceContext());
48 public static pb::MessageParser<SourceContext> Parser { get { return _parser; } }
49
Jon Skeet62a4aa52015-07-14 14:26:49 +010050 public static pbr::MessageDescriptor Descriptor {
Jon Skeet284bb452015-11-05 09:13:53 +000051 get { return global::Google.Protobuf.WellKnownTypes.SourceContextReflection.Descriptor.MessageTypes[0]; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010052 }
53
Jon Skeet96cffaa2015-07-20 19:25:07 +010054 pbr::MessageDescriptor pb::IMessage.Descriptor {
55 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010056 }
57
Jon Skeet62a4aa52015-07-14 14:26:49 +010058 public SourceContext() {
59 OnConstruction();
60 }
61
62 partial void OnConstruction();
63
64 public SourceContext(SourceContext other) : this() {
65 fileName_ = other.fileName_;
66 }
67
68 public SourceContext Clone() {
69 return new SourceContext(this);
70 }
71
Jon Skeet18e0a2e2015-10-01 10:38:01 +010072 /// <summary>Field number for the "file_name" field.</summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010073 public const int FileNameFieldNumber = 1;
74 private string fileName_ = "";
Jon Skeet18e0a2e2015-10-01 10:38:01 +010075 /// <summary>
76 /// The path-qualified name of the .proto file that contained the associated
77 /// protobuf element. For example: `"google/protobuf/source.proto"`.
78 /// </summary>
Jon Skeet62a4aa52015-07-14 14:26:49 +010079 public string FileName {
80 get { return fileName_; }
81 set {
Jon Skeetd18cc082015-07-30 13:50:02 +010082 fileName_ = pb::Preconditions.CheckNotNull(value, "value");
Jon Skeet62a4aa52015-07-14 14:26:49 +010083 }
84 }
85
86 public override bool Equals(object other) {
87 return Equals(other as SourceContext);
88 }
89
90 public bool Equals(SourceContext other) {
91 if (ReferenceEquals(other, null)) {
92 return false;
93 }
94 if (ReferenceEquals(other, this)) {
95 return true;
96 }
97 if (FileName != other.FileName) return false;
98 return true;
99 }
100
101 public override int GetHashCode() {
102 int hash = 1;
103 if (FileName.Length != 0) hash ^= FileName.GetHashCode();
104 return hash;
105 }
106
107 public override string ToString() {
108 return pb::JsonFormatter.Default.Format(this);
109 }
110
111 public void WriteTo(pb::CodedOutputStream output) {
112 if (FileName.Length != 0) {
113 output.WriteRawTag(10);
114 output.WriteString(FileName);
115 }
116 }
117
118 public int CalculateSize() {
119 int size = 0;
120 if (FileName.Length != 0) {
121 size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName);
122 }
123 return size;
124 }
125
126 public void MergeFrom(SourceContext other) {
127 if (other == null) {
128 return;
129 }
130 if (other.FileName.Length != 0) {
131 FileName = other.FileName;
132 }
133 }
134
135 public void MergeFrom(pb::CodedInputStream input) {
136 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100137 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100138 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100139 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100140 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100141 break;
142 case 10: {
143 FileName = input.ReadString();
144 break;
145 }
146 }
147 }
148 }
149
150 }
151
152 #endregion
153
154}
155
156#endregion Designer generated code