1 // 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 
6 using pb = global::Google.Protobuf;
7 using pbc = global::Google.Protobuf.Collections;
8 using pbr = global::Google.Protobuf.Reflection;
9 using scg = global::System.Collections.Generic;
10 namespace Google.Protobuf.WellKnownTypes {
11 
12   /// <summary>Holder for reflection information generated from google/protobuf/source_context.proto</summary>
13   [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
14   public static partial class SourceContextReflection {
15 
16     #region Descriptor
17     /// <summary>File descriptor for google/protobuf/source_context.proto</summary>
18     public static pbr::FileDescriptor Descriptor {
19       get { return descriptor; }
20     }
21     private static pbr::FileDescriptor descriptor;
22 
SourceContextReflection()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.FromGeneratedCode(descriptorData,
32           new pbr::FileDescriptor[] { },
33           new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
34             new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.SourceContext), global::Google.Protobuf.WellKnownTypes.SourceContext.Parser, new[]{ "FileName" }, null, null, null)
35           }));
36     }
37     #endregion
38 
39   }
40   #region Messages
41   /// <summary>
42   ///  `SourceContext` represents information about the source of a
43   ///  protobuf element, like the file in which it is defined.
44   /// </summary>
45   [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 
50     public static pbr::MessageDescriptor Descriptor {
51       get { return global::Google.Protobuf.WellKnownTypes.SourceContextReflection.Descriptor.MessageTypes[0]; }
52     }
53 
54     pbr::MessageDescriptor pb::IMessage.Descriptor {
55       get { return Descriptor; }
56     }
57 
SourceContext()58     public SourceContext() {
59       OnConstruction();
60     }
61 
OnConstruction()62     partial void OnConstruction();
63 
SourceContext(SourceContext other)64     public SourceContext(SourceContext other) : this() {
65       fileName_ = other.fileName_;
66     }
67 
Clone()68     public SourceContext Clone() {
69       return new SourceContext(this);
70     }
71 
72     /// <summary>Field number for the "file_name" field.</summary>
73     public const int FileNameFieldNumber = 1;
74     private string fileName_ = "";
75     /// <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>
79     public string FileName {
80       get { return fileName_; }
81       set {
82         fileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
83       }
84     }
85 
Equals(object other)86     public override bool Equals(object other) {
87       return Equals(other as SourceContext);
88     }
89 
Equals(SourceContext other)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 
GetHashCode()101     public override int GetHashCode() {
102       int hash = 1;
103       if (FileName.Length != 0) hash ^= FileName.GetHashCode();
104       return hash;
105     }
106 
ToString()107     public override string ToString() {
108       return pb::JsonFormatter.ToDiagnosticString(this);
109     }
110 
WriteTo(pb::CodedOutputStream output)111     public void WriteTo(pb::CodedOutputStream output) {
112       if (FileName.Length != 0) {
113         output.WriteRawTag(10);
114         output.WriteString(FileName);
115       }
116     }
117 
CalculateSize()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 
MergeFrom(SourceContext other)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 
MergeFrom(pb::CodedInputStream input)135     public void MergeFrom(pb::CodedInputStream input) {
136       uint tag;
137       while ((tag = input.ReadTag()) != 0) {
138         switch(tag) {
139           default:
140             input.SkipLastField();
141             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
157