Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 1 | // 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 | |
| 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 | namespace Proto { |
| 13 | |
| 14 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 15 | public static partial class Timestamp { |
| 16 | |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 17 | #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 Skeet | 47bf49b | 2015-07-22 11:39:38 +0100 | [diff] [blame] | 30 | "cHJvdG8z")); |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 31 | descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 32 | new pbr::FileDescriptor[] { }, |
Jon Skeet | 47bf49b | 2015-07-22 11:39:38 +0100 | [diff] [blame] | 33 | 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 Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 36 | } |
| 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 Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 47 | public static pbr::MessageDescriptor Descriptor { |
| 48 | get { return global::Google.Protobuf.WellKnownTypes.Proto.Timestamp.Descriptor.MessageTypes[0]; } |
| 49 | } |
| 50 | |
Jon Skeet | 96cffaa | 2015-07-20 19:25:07 +0100 | [diff] [blame] | 51 | pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 52 | get { return Descriptor; } |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 53 | } |
| 54 | |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 55 | 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 Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 70 | public const int SecondsFieldNumber = 1; |
| 71 | private long seconds_; |
| 72 | public long Seconds { |
| 73 | get { return seconds_; } |
| 74 | set { |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 75 | seconds_ = value; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | public const int NanosFieldNumber = 2; |
| 80 | private int nanos_; |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 81 | public int Nanos { |
| 82 | get { return nanos_; } |
| 83 | set { |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 84 | 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 Skeet | 1a57ad8 | 2015-08-05 11:23:52 +0100 | [diff] [blame] | 151 | while ((tag = input.ReadTag()) != 0) { |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 152 | switch(tag) { |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 153 | default: |
Jon Skeet | 5bdc572 | 2015-08-06 11:40:43 +0100 | [diff] [blame^] | 154 | input.SkipLastField(); |
Jon Skeet | 62a4aa5 | 2015-07-14 14:26:49 +0100 | [diff] [blame] | 155 | 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 |