using System; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; namespace MoralisUnity.Web3Api.Models { [DataContract] public class BlockDate { /// /// The date of the block /// example: 12/31/2019 7:00:00 PM /// [DataMember(Name = "date", EmitDefaultValue = false)] [JsonProperty(PropertyName = "date")] public DateTime? Date { get; set; } /// /// The blocknumber /// example: 9193266 /// [DataMember(Name = "block", EmitDefaultValue = false)] [JsonProperty(PropertyName = "block")] public decimal? Block { get; set; } /// /// The timestamp of the block /// example: 1577836811 /// [DataMember(Name = "timestamp", EmitDefaultValue = false)] [JsonProperty(PropertyName = "timestamp")] public decimal? Timestamp { get; set; } /// /// Get the string presentation of the object /// /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); sb.Append("class BlockDate{"); sb.Append(" Date ").Append(Date).Append("\n"); sb.Append(" Block ").Append(Block).Append("\n"); sb.Append(" Timestamp ").Append(Timestamp).Append("\n"); sb.Append("}"); return sb.ToString(); } /// /// Get the JSON string presentation of the object /// /// JSON string presentation of the object public string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } } }