blob: d7c0954f4a9f84537ee027d58dc51cd00e0c1386 [file] [log] [blame]
Jon Skeet62a4aa52015-07-14 14:26:49 +01001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/timestamp.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
12 namespace Proto {
13
14 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
15 public static partial class Timestamp {
16
Jon Skeet62a4aa52015-07-14 14:26:49 +010017 #region Descriptor
18 public static pbr::FileDescriptor Descriptor {
19 get { return descriptor; }
20 }
21 private static pbr::FileDescriptor descriptor;
22
23 static Timestamp() {
24 byte[] descriptorData = global::System.Convert.FromBase64String(
25 string.Concat(
26 "Ch9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnByb3RvEg9nb29nbGUucHJv",
27 "dG9idWYiKwoJVGltZXN0YW1wEg8KB3NlY29uZHMYASABKAMSDQoFbmFub3MY",
28 "AiABKAVCUQoTY29tLmdvb2dsZS5wcm90b2J1ZkIOVGltZXN0YW1wUHJvdG9Q",
29 "AaABAaICA0dQQqoCHkdvb2dsZS5Qcm90b2J1Zi5XZWxsS25vd25UeXBlc2IG",
Jon Skeet47bf49b2015-07-22 11:39:38 +010030 "cHJvdG8z"));
Jon Skeet62a4aa52015-07-14 14:26:49 +010031 descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
Jon Skeet96cffaa2015-07-20 19:25:07 +010032 new pbr::FileDescriptor[] { },
Jon Skeet47bf49b2015-07-22 11:39:38 +010033 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
34 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Timestamp), new[]{ "Seconds", "Nanos" }, null, null, null)
35 }));
Jon Skeet62a4aa52015-07-14 14:26:49 +010036 }
37 #endregion
38
39 }
40 }
41 #region Messages
42 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
43 public sealed partial class Timestamp : pb::IMessage<Timestamp> {
44 private static readonly pb::MessageParser<Timestamp> _parser = new pb::MessageParser<Timestamp>(() => new Timestamp());
45 public static pb::MessageParser<Timestamp> Parser { get { return _parser; } }
46
Jon Skeet62a4aa52015-07-14 14:26:49 +010047 public static pbr::MessageDescriptor Descriptor {
48 get { return global::Google.Protobuf.WellKnownTypes.Proto.Timestamp.Descriptor.MessageTypes[0]; }
49 }
50
Jon Skeet96cffaa2015-07-20 19:25:07 +010051 pbr::MessageDescriptor pb::IMessage.Descriptor {
52 get { return Descriptor; }
Jon Skeet62a4aa52015-07-14 14:26:49 +010053 }
54
Jon Skeet62a4aa52015-07-14 14:26:49 +010055 public Timestamp() {
56 OnConstruction();
57 }
58
59 partial void OnConstruction();
60
61 public Timestamp(Timestamp other) : this() {
62 seconds_ = other.seconds_;
63 nanos_ = other.nanos_;
64 }
65
66 public Timestamp Clone() {
67 return new Timestamp(this);
68 }
69
Jon Skeet62a4aa52015-07-14 14:26:49 +010070 public const int SecondsFieldNumber = 1;
71 private long seconds_;
72 public long Seconds {
73 get { return seconds_; }
74 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +010075 seconds_ = value;
76 }
77 }
78
79 public const int NanosFieldNumber = 2;
80 private int nanos_;
Jon Skeet62a4aa52015-07-14 14:26:49 +010081 public int Nanos {
82 get { return nanos_; }
83 set {
Jon Skeet62a4aa52015-07-14 14:26:49 +010084 nanos_ = value;
85 }
86 }
87
88 public override bool Equals(object other) {
89 return Equals(other as Timestamp);
90 }
91
92 public bool Equals(Timestamp other) {
93 if (ReferenceEquals(other, null)) {
94 return false;
95 }
96 if (ReferenceEquals(other, this)) {
97 return true;
98 }
99 if (Seconds != other.Seconds) return false;
100 if (Nanos != other.Nanos) return false;
101 return true;
102 }
103
104 public override int GetHashCode() {
105 int hash = 1;
106 if (Seconds != 0L) hash ^= Seconds.GetHashCode();
107 if (Nanos != 0) hash ^= Nanos.GetHashCode();
108 return hash;
109 }
110
111 public override string ToString() {
112 return pb::JsonFormatter.Default.Format(this);
113 }
114
115 public void WriteTo(pb::CodedOutputStream output) {
116 if (Seconds != 0L) {
117 output.WriteRawTag(8);
118 output.WriteInt64(Seconds);
119 }
120 if (Nanos != 0) {
121 output.WriteRawTag(16);
122 output.WriteInt32(Nanos);
123 }
124 }
125
126 public int CalculateSize() {
127 int size = 0;
128 if (Seconds != 0L) {
129 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seconds);
130 }
131 if (Nanos != 0) {
132 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos);
133 }
134 return size;
135 }
136
137 public void MergeFrom(Timestamp other) {
138 if (other == null) {
139 return;
140 }
141 if (other.Seconds != 0L) {
142 Seconds = other.Seconds;
143 }
144 if (other.Nanos != 0) {
145 Nanos = other.Nanos;
146 }
147 }
148
149 public void MergeFrom(pb::CodedInputStream input) {
150 uint tag;
Jon Skeet1a57ad82015-08-05 11:23:52 +0100151 while ((tag = input.ReadTag()) != 0) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100152 switch(tag) {
Jon Skeet62a4aa52015-07-14 14:26:49 +0100153 default:
Jon Skeet5bdc5722015-08-06 11:40:43 +0100154 input.SkipLastField();
Jon Skeet62a4aa52015-07-14 14:26:49 +0100155 break;
156 case 8: {
157 Seconds = input.ReadInt64();
158 break;
159 }
160 case 16: {
161 Nanos = input.ReadInt32();
162 break;
163 }
164 }
165 }
166 }
167
168 }
169
170 #endregion
171
172}
173
174#endregion Designer generated code