// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace EthereumSamuraiApiCaller.Models
{
    using Newtonsoft.Json;
    using System.Linq;

    public partial class BlockResponse
    {
        /// <summary>
        /// Initializes a new instance of the BlockResponse class.
        /// </summary>
        public BlockResponse()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the BlockResponse class.
        /// </summary>
        public BlockResponse(long number, string blockHash = default(string), string gasUsed = default(string), string gasLimit = default(string), string parentHash = default(string))
        {
            BlockHash = blockHash;
            GasUsed = gasUsed;
            GasLimit = gasLimit;
            ParentHash = parentHash;
            Number = number;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "blockHash")]
        public string BlockHash { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "gasUsed")]
        public string GasUsed { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "gasLimit")]
        public string GasLimit { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "parentHash")]
        public string ParentHash { get; set; }

        /// <summary>
        /// </summary>
        [JsonProperty(PropertyName = "number")]
        public long Number { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="Microsoft.Rest.ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            //Nothing to validate
        }
    }
}
