/*
Lethean Blockchain API

OpenAPI for Lethean Blockchain

API version: 6.0.1
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package lthn

import (
	"encoding/json"
)

// checks if the BlockDetailsModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BlockDetailsModel{}

// BlockDetailsModel struct for BlockDetailsModel
type BlockDetailsModel struct {
	ActualTimestamp *int32 `json:"actual_timestamp,omitempty"`
	AlreadyGeneratedCoins *string `json:"already_generated_coins,omitempty"`
	BaseReward *int32 `json:"base_reward,omitempty"`
	Blob *string `json:"blob,omitempty"`
	BlockCumulativeSize *int32 `json:"block_cumulative_size,omitempty"`
	BlockTselfSize *int32 `json:"block_tself_size,omitempty"`
	CumulativeDiffAdjusted *string `json:"cumulative_diff_adjusted,omitempty"`
	CumulativeDiffPrecise *string `json:"cumulative_diff_precise,omitempty"`
	Difficulty *string `json:"difficulty,omitempty"`
	EffectiveFeeMedian *int32 `json:"effective_fee_median,omitempty"`
	Height *int32 `json:"height,omitempty"`
	Id *string `json:"id,omitempty"`
	IsOrphan *bool `json:"is_orphan,omitempty"`
	MinerTextInfo *string `json:"miner_text_info,omitempty"`
	ObjectInJson *string `json:"object_in_json,omitempty"`
	Penalty *int32 `json:"penalty,omitempty"`
	PowSeed *string `json:"pow_seed,omitempty"`
	PrevId *string `json:"prev_id,omitempty"`
	SummaryReward *int32 `json:"summary_reward,omitempty"`
	ThisBlockFeeMedian *int32 `json:"this_block_fee_median,omitempty"`
	Timestamp *int32 `json:"timestamp,omitempty"`
	TotalFee *int32 `json:"total_fee,omitempty"`
	TotalTxsSize *int32 `json:"total_txs_size,omitempty"`
	TransactionsDetails []TransactionDetailsModel `json:"transactions_details,omitempty"`
	Type *int32 `json:"type,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _BlockDetailsModel BlockDetailsModel

// NewBlockDetailsModel instantiates a new BlockDetailsModel object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewBlockDetailsModel() *BlockDetailsModel {
	this := BlockDetailsModel{}
	return &this
}

// NewBlockDetailsModelWithDefaults instantiates a new BlockDetailsModel object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewBlockDetailsModelWithDefaults() *BlockDetailsModel {
	this := BlockDetailsModel{}
	return &this
}

// GetActualTimestamp returns the ActualTimestamp field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetActualTimestamp() int32 {
	if o == nil || IsNil(o.ActualTimestamp) {
		var ret int32
		return ret
	}
	return *o.ActualTimestamp
}

// GetActualTimestampOk returns a tuple with the ActualTimestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetActualTimestampOk() (*int32, bool) {
	if o == nil || IsNil(o.ActualTimestamp) {
		return nil, false
	}
	return o.ActualTimestamp, true
}

// HasActualTimestamp returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasActualTimestamp() bool {
	if o != nil && !IsNil(o.ActualTimestamp) {
		return true
	}

	return false
}

// SetActualTimestamp gets a reference to the given int32 and assigns it to the ActualTimestamp field.
func (o *BlockDetailsModel) SetActualTimestamp(v int32) {
	o.ActualTimestamp = &v
}

// GetAlreadyGeneratedCoins returns the AlreadyGeneratedCoins field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetAlreadyGeneratedCoins() string {
	if o == nil || IsNil(o.AlreadyGeneratedCoins) {
		var ret string
		return ret
	}
	return *o.AlreadyGeneratedCoins
}

// GetAlreadyGeneratedCoinsOk returns a tuple with the AlreadyGeneratedCoins field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetAlreadyGeneratedCoinsOk() (*string, bool) {
	if o == nil || IsNil(o.AlreadyGeneratedCoins) {
		return nil, false
	}
	return o.AlreadyGeneratedCoins, true
}

// HasAlreadyGeneratedCoins returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasAlreadyGeneratedCoins() bool {
	if o != nil && !IsNil(o.AlreadyGeneratedCoins) {
		return true
	}

	return false
}

// SetAlreadyGeneratedCoins gets a reference to the given string and assigns it to the AlreadyGeneratedCoins field.
func (o *BlockDetailsModel) SetAlreadyGeneratedCoins(v string) {
	o.AlreadyGeneratedCoins = &v
}

// GetBaseReward returns the BaseReward field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetBaseReward() int32 {
	if o == nil || IsNil(o.BaseReward) {
		var ret int32
		return ret
	}
	return *o.BaseReward
}

// GetBaseRewardOk returns a tuple with the BaseReward field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetBaseRewardOk() (*int32, bool) {
	if o == nil || IsNil(o.BaseReward) {
		return nil, false
	}
	return o.BaseReward, true
}

// HasBaseReward returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasBaseReward() bool {
	if o != nil && !IsNil(o.BaseReward) {
		return true
	}

	return false
}

// SetBaseReward gets a reference to the given int32 and assigns it to the BaseReward field.
func (o *BlockDetailsModel) SetBaseReward(v int32) {
	o.BaseReward = &v
}

// GetBlob returns the Blob field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetBlob() string {
	if o == nil || IsNil(o.Blob) {
		var ret string
		return ret
	}
	return *o.Blob
}

// GetBlobOk returns a tuple with the Blob field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetBlobOk() (*string, bool) {
	if o == nil || IsNil(o.Blob) {
		return nil, false
	}
	return o.Blob, true
}

// HasBlob returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasBlob() bool {
	if o != nil && !IsNil(o.Blob) {
		return true
	}

	return false
}

// SetBlob gets a reference to the given string and assigns it to the Blob field.
func (o *BlockDetailsModel) SetBlob(v string) {
	o.Blob = &v
}

// GetBlockCumulativeSize returns the BlockCumulativeSize field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetBlockCumulativeSize() int32 {
	if o == nil || IsNil(o.BlockCumulativeSize) {
		var ret int32
		return ret
	}
	return *o.BlockCumulativeSize
}

// GetBlockCumulativeSizeOk returns a tuple with the BlockCumulativeSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetBlockCumulativeSizeOk() (*int32, bool) {
	if o == nil || IsNil(o.BlockCumulativeSize) {
		return nil, false
	}
	return o.BlockCumulativeSize, true
}

// HasBlockCumulativeSize returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasBlockCumulativeSize() bool {
	if o != nil && !IsNil(o.BlockCumulativeSize) {
		return true
	}

	return false
}

// SetBlockCumulativeSize gets a reference to the given int32 and assigns it to the BlockCumulativeSize field.
func (o *BlockDetailsModel) SetBlockCumulativeSize(v int32) {
	o.BlockCumulativeSize = &v
}

// GetBlockTselfSize returns the BlockTselfSize field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetBlockTselfSize() int32 {
	if o == nil || IsNil(o.BlockTselfSize) {
		var ret int32
		return ret
	}
	return *o.BlockTselfSize
}

// GetBlockTselfSizeOk returns a tuple with the BlockTselfSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetBlockTselfSizeOk() (*int32, bool) {
	if o == nil || IsNil(o.BlockTselfSize) {
		return nil, false
	}
	return o.BlockTselfSize, true
}

// HasBlockTselfSize returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasBlockTselfSize() bool {
	if o != nil && !IsNil(o.BlockTselfSize) {
		return true
	}

	return false
}

// SetBlockTselfSize gets a reference to the given int32 and assigns it to the BlockTselfSize field.
func (o *BlockDetailsModel) SetBlockTselfSize(v int32) {
	o.BlockTselfSize = &v
}

// GetCumulativeDiffAdjusted returns the CumulativeDiffAdjusted field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetCumulativeDiffAdjusted() string {
	if o == nil || IsNil(o.CumulativeDiffAdjusted) {
		var ret string
		return ret
	}
	return *o.CumulativeDiffAdjusted
}

// GetCumulativeDiffAdjustedOk returns a tuple with the CumulativeDiffAdjusted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetCumulativeDiffAdjustedOk() (*string, bool) {
	if o == nil || IsNil(o.CumulativeDiffAdjusted) {
		return nil, false
	}
	return o.CumulativeDiffAdjusted, true
}

// HasCumulativeDiffAdjusted returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasCumulativeDiffAdjusted() bool {
	if o != nil && !IsNil(o.CumulativeDiffAdjusted) {
		return true
	}

	return false
}

// SetCumulativeDiffAdjusted gets a reference to the given string and assigns it to the CumulativeDiffAdjusted field.
func (o *BlockDetailsModel) SetCumulativeDiffAdjusted(v string) {
	o.CumulativeDiffAdjusted = &v
}

// GetCumulativeDiffPrecise returns the CumulativeDiffPrecise field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetCumulativeDiffPrecise() string {
	if o == nil || IsNil(o.CumulativeDiffPrecise) {
		var ret string
		return ret
	}
	return *o.CumulativeDiffPrecise
}

// GetCumulativeDiffPreciseOk returns a tuple with the CumulativeDiffPrecise field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetCumulativeDiffPreciseOk() (*string, bool) {
	if o == nil || IsNil(o.CumulativeDiffPrecise) {
		return nil, false
	}
	return o.CumulativeDiffPrecise, true
}

// HasCumulativeDiffPrecise returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasCumulativeDiffPrecise() bool {
	if o != nil && !IsNil(o.CumulativeDiffPrecise) {
		return true
	}

	return false
}

// SetCumulativeDiffPrecise gets a reference to the given string and assigns it to the CumulativeDiffPrecise field.
func (o *BlockDetailsModel) SetCumulativeDiffPrecise(v string) {
	o.CumulativeDiffPrecise = &v
}

// GetDifficulty returns the Difficulty field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetDifficulty() string {
	if o == nil || IsNil(o.Difficulty) {
		var ret string
		return ret
	}
	return *o.Difficulty
}

// GetDifficultyOk returns a tuple with the Difficulty field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetDifficultyOk() (*string, bool) {
	if o == nil || IsNil(o.Difficulty) {
		return nil, false
	}
	return o.Difficulty, true
}

// HasDifficulty returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasDifficulty() bool {
	if o != nil && !IsNil(o.Difficulty) {
		return true
	}

	return false
}

// SetDifficulty gets a reference to the given string and assigns it to the Difficulty field.
func (o *BlockDetailsModel) SetDifficulty(v string) {
	o.Difficulty = &v
}

// GetEffectiveFeeMedian returns the EffectiveFeeMedian field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetEffectiveFeeMedian() int32 {
	if o == nil || IsNil(o.EffectiveFeeMedian) {
		var ret int32
		return ret
	}
	return *o.EffectiveFeeMedian
}

// GetEffectiveFeeMedianOk returns a tuple with the EffectiveFeeMedian field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetEffectiveFeeMedianOk() (*int32, bool) {
	if o == nil || IsNil(o.EffectiveFeeMedian) {
		return nil, false
	}
	return o.EffectiveFeeMedian, true
}

// HasEffectiveFeeMedian returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasEffectiveFeeMedian() bool {
	if o != nil && !IsNil(o.EffectiveFeeMedian) {
		return true
	}

	return false
}

// SetEffectiveFeeMedian gets a reference to the given int32 and assigns it to the EffectiveFeeMedian field.
func (o *BlockDetailsModel) SetEffectiveFeeMedian(v int32) {
	o.EffectiveFeeMedian = &v
}

// GetHeight returns the Height field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetHeight() int32 {
	if o == nil || IsNil(o.Height) {
		var ret int32
		return ret
	}
	return *o.Height
}

// GetHeightOk returns a tuple with the Height field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetHeightOk() (*int32, bool) {
	if o == nil || IsNil(o.Height) {
		return nil, false
	}
	return o.Height, true
}

// HasHeight returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasHeight() bool {
	if o != nil && !IsNil(o.Height) {
		return true
	}

	return false
}

// SetHeight gets a reference to the given int32 and assigns it to the Height field.
func (o *BlockDetailsModel) SetHeight(v int32) {
	o.Height = &v
}

// GetId returns the Id field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetId() string {
	if o == nil || IsNil(o.Id) {
		var ret string
		return ret
	}
	return *o.Id
}

// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetIdOk() (*string, bool) {
	if o == nil || IsNil(o.Id) {
		return nil, false
	}
	return o.Id, true
}

// HasId returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasId() bool {
	if o != nil && !IsNil(o.Id) {
		return true
	}

	return false
}

// SetId gets a reference to the given string and assigns it to the Id field.
func (o *BlockDetailsModel) SetId(v string) {
	o.Id = &v
}

// GetIsOrphan returns the IsOrphan field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetIsOrphan() bool {
	if o == nil || IsNil(o.IsOrphan) {
		var ret bool
		return ret
	}
	return *o.IsOrphan
}

// GetIsOrphanOk returns a tuple with the IsOrphan field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetIsOrphanOk() (*bool, bool) {
	if o == nil || IsNil(o.IsOrphan) {
		return nil, false
	}
	return o.IsOrphan, true
}

// HasIsOrphan returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasIsOrphan() bool {
	if o != nil && !IsNil(o.IsOrphan) {
		return true
	}

	return false
}

// SetIsOrphan gets a reference to the given bool and assigns it to the IsOrphan field.
func (o *BlockDetailsModel) SetIsOrphan(v bool) {
	o.IsOrphan = &v
}

// GetMinerTextInfo returns the MinerTextInfo field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetMinerTextInfo() string {
	if o == nil || IsNil(o.MinerTextInfo) {
		var ret string
		return ret
	}
	return *o.MinerTextInfo
}

// GetMinerTextInfoOk returns a tuple with the MinerTextInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetMinerTextInfoOk() (*string, bool) {
	if o == nil || IsNil(o.MinerTextInfo) {
		return nil, false
	}
	return o.MinerTextInfo, true
}

// HasMinerTextInfo returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasMinerTextInfo() bool {
	if o != nil && !IsNil(o.MinerTextInfo) {
		return true
	}

	return false
}

// SetMinerTextInfo gets a reference to the given string and assigns it to the MinerTextInfo field.
func (o *BlockDetailsModel) SetMinerTextInfo(v string) {
	o.MinerTextInfo = &v
}

// GetObjectInJson returns the ObjectInJson field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetObjectInJson() string {
	if o == nil || IsNil(o.ObjectInJson) {
		var ret string
		return ret
	}
	return *o.ObjectInJson
}

// GetObjectInJsonOk returns a tuple with the ObjectInJson field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetObjectInJsonOk() (*string, bool) {
	if o == nil || IsNil(o.ObjectInJson) {
		return nil, false
	}
	return o.ObjectInJson, true
}

// HasObjectInJson returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasObjectInJson() bool {
	if o != nil && !IsNil(o.ObjectInJson) {
		return true
	}

	return false
}

// SetObjectInJson gets a reference to the given string and assigns it to the ObjectInJson field.
func (o *BlockDetailsModel) SetObjectInJson(v string) {
	o.ObjectInJson = &v
}

// GetPenalty returns the Penalty field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetPenalty() int32 {
	if o == nil || IsNil(o.Penalty) {
		var ret int32
		return ret
	}
	return *o.Penalty
}

// GetPenaltyOk returns a tuple with the Penalty field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetPenaltyOk() (*int32, bool) {
	if o == nil || IsNil(o.Penalty) {
		return nil, false
	}
	return o.Penalty, true
}

// HasPenalty returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasPenalty() bool {
	if o != nil && !IsNil(o.Penalty) {
		return true
	}

	return false
}

// SetPenalty gets a reference to the given int32 and assigns it to the Penalty field.
func (o *BlockDetailsModel) SetPenalty(v int32) {
	o.Penalty = &v
}

// GetPowSeed returns the PowSeed field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetPowSeed() string {
	if o == nil || IsNil(o.PowSeed) {
		var ret string
		return ret
	}
	return *o.PowSeed
}

// GetPowSeedOk returns a tuple with the PowSeed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetPowSeedOk() (*string, bool) {
	if o == nil || IsNil(o.PowSeed) {
		return nil, false
	}
	return o.PowSeed, true
}

// HasPowSeed returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasPowSeed() bool {
	if o != nil && !IsNil(o.PowSeed) {
		return true
	}

	return false
}

// SetPowSeed gets a reference to the given string and assigns it to the PowSeed field.
func (o *BlockDetailsModel) SetPowSeed(v string) {
	o.PowSeed = &v
}

// GetPrevId returns the PrevId field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetPrevId() string {
	if o == nil || IsNil(o.PrevId) {
		var ret string
		return ret
	}
	return *o.PrevId
}

// GetPrevIdOk returns a tuple with the PrevId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetPrevIdOk() (*string, bool) {
	if o == nil || IsNil(o.PrevId) {
		return nil, false
	}
	return o.PrevId, true
}

// HasPrevId returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasPrevId() bool {
	if o != nil && !IsNil(o.PrevId) {
		return true
	}

	return false
}

// SetPrevId gets a reference to the given string and assigns it to the PrevId field.
func (o *BlockDetailsModel) SetPrevId(v string) {
	o.PrevId = &v
}

// GetSummaryReward returns the SummaryReward field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetSummaryReward() int32 {
	if o == nil || IsNil(o.SummaryReward) {
		var ret int32
		return ret
	}
	return *o.SummaryReward
}

// GetSummaryRewardOk returns a tuple with the SummaryReward field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetSummaryRewardOk() (*int32, bool) {
	if o == nil || IsNil(o.SummaryReward) {
		return nil, false
	}
	return o.SummaryReward, true
}

// HasSummaryReward returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasSummaryReward() bool {
	if o != nil && !IsNil(o.SummaryReward) {
		return true
	}

	return false
}

// SetSummaryReward gets a reference to the given int32 and assigns it to the SummaryReward field.
func (o *BlockDetailsModel) SetSummaryReward(v int32) {
	o.SummaryReward = &v
}

// GetThisBlockFeeMedian returns the ThisBlockFeeMedian field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetThisBlockFeeMedian() int32 {
	if o == nil || IsNil(o.ThisBlockFeeMedian) {
		var ret int32
		return ret
	}
	return *o.ThisBlockFeeMedian
}

// GetThisBlockFeeMedianOk returns a tuple with the ThisBlockFeeMedian field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetThisBlockFeeMedianOk() (*int32, bool) {
	if o == nil || IsNil(o.ThisBlockFeeMedian) {
		return nil, false
	}
	return o.ThisBlockFeeMedian, true
}

// HasThisBlockFeeMedian returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasThisBlockFeeMedian() bool {
	if o != nil && !IsNil(o.ThisBlockFeeMedian) {
		return true
	}

	return false
}

// SetThisBlockFeeMedian gets a reference to the given int32 and assigns it to the ThisBlockFeeMedian field.
func (o *BlockDetailsModel) SetThisBlockFeeMedian(v int32) {
	o.ThisBlockFeeMedian = &v
}

// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetTimestamp() int32 {
	if o == nil || IsNil(o.Timestamp) {
		var ret int32
		return ret
	}
	return *o.Timestamp
}

// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetTimestampOk() (*int32, bool) {
	if o == nil || IsNil(o.Timestamp) {
		return nil, false
	}
	return o.Timestamp, true
}

// HasTimestamp returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasTimestamp() bool {
	if o != nil && !IsNil(o.Timestamp) {
		return true
	}

	return false
}

// SetTimestamp gets a reference to the given int32 and assigns it to the Timestamp field.
func (o *BlockDetailsModel) SetTimestamp(v int32) {
	o.Timestamp = &v
}

// GetTotalFee returns the TotalFee field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetTotalFee() int32 {
	if o == nil || IsNil(o.TotalFee) {
		var ret int32
		return ret
	}
	return *o.TotalFee
}

// GetTotalFeeOk returns a tuple with the TotalFee field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetTotalFeeOk() (*int32, bool) {
	if o == nil || IsNil(o.TotalFee) {
		return nil, false
	}
	return o.TotalFee, true
}

// HasTotalFee returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasTotalFee() bool {
	if o != nil && !IsNil(o.TotalFee) {
		return true
	}

	return false
}

// SetTotalFee gets a reference to the given int32 and assigns it to the TotalFee field.
func (o *BlockDetailsModel) SetTotalFee(v int32) {
	o.TotalFee = &v
}

// GetTotalTxsSize returns the TotalTxsSize field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetTotalTxsSize() int32 {
	if o == nil || IsNil(o.TotalTxsSize) {
		var ret int32
		return ret
	}
	return *o.TotalTxsSize
}

// GetTotalTxsSizeOk returns a tuple with the TotalTxsSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetTotalTxsSizeOk() (*int32, bool) {
	if o == nil || IsNil(o.TotalTxsSize) {
		return nil, false
	}
	return o.TotalTxsSize, true
}

// HasTotalTxsSize returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasTotalTxsSize() bool {
	if o != nil && !IsNil(o.TotalTxsSize) {
		return true
	}

	return false
}

// SetTotalTxsSize gets a reference to the given int32 and assigns it to the TotalTxsSize field.
func (o *BlockDetailsModel) SetTotalTxsSize(v int32) {
	o.TotalTxsSize = &v
}

// GetTransactionsDetails returns the TransactionsDetails field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetTransactionsDetails() []TransactionDetailsModel {
	if o == nil || IsNil(o.TransactionsDetails) {
		var ret []TransactionDetailsModel
		return ret
	}
	return o.TransactionsDetails
}

// GetTransactionsDetailsOk returns a tuple with the TransactionsDetails field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetTransactionsDetailsOk() ([]TransactionDetailsModel, bool) {
	if o == nil || IsNil(o.TransactionsDetails) {
		return nil, false
	}
	return o.TransactionsDetails, true
}

// HasTransactionsDetails returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasTransactionsDetails() bool {
	if o != nil && !IsNil(o.TransactionsDetails) {
		return true
	}

	return false
}

// SetTransactionsDetails gets a reference to the given []TransactionDetailsModel and assigns it to the TransactionsDetails field.
func (o *BlockDetailsModel) SetTransactionsDetails(v []TransactionDetailsModel) {
	o.TransactionsDetails = v
}

// GetType returns the Type field value if set, zero value otherwise.
func (o *BlockDetailsModel) GetType() int32 {
	if o == nil || IsNil(o.Type) {
		var ret int32
		return ret
	}
	return *o.Type
}

// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BlockDetailsModel) GetTypeOk() (*int32, bool) {
	if o == nil || IsNil(o.Type) {
		return nil, false
	}
	return o.Type, true
}

// HasType returns a boolean if a field has been set.
func (o *BlockDetailsModel) HasType() bool {
	if o != nil && !IsNil(o.Type) {
		return true
	}

	return false
}

// SetType gets a reference to the given int32 and assigns it to the Type field.
func (o *BlockDetailsModel) SetType(v int32) {
	o.Type = &v
}

func (o BlockDetailsModel) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o BlockDetailsModel) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.ActualTimestamp) {
		toSerialize["actual_timestamp"] = o.ActualTimestamp
	}
	if !IsNil(o.AlreadyGeneratedCoins) {
		toSerialize["already_generated_coins"] = o.AlreadyGeneratedCoins
	}
	if !IsNil(o.BaseReward) {
		toSerialize["base_reward"] = o.BaseReward
	}
	if !IsNil(o.Blob) {
		toSerialize["blob"] = o.Blob
	}
	if !IsNil(o.BlockCumulativeSize) {
		toSerialize["block_cumulative_size"] = o.BlockCumulativeSize
	}
	if !IsNil(o.BlockTselfSize) {
		toSerialize["block_tself_size"] = o.BlockTselfSize
	}
	if !IsNil(o.CumulativeDiffAdjusted) {
		toSerialize["cumulative_diff_adjusted"] = o.CumulativeDiffAdjusted
	}
	if !IsNil(o.CumulativeDiffPrecise) {
		toSerialize["cumulative_diff_precise"] = o.CumulativeDiffPrecise
	}
	if !IsNil(o.Difficulty) {
		toSerialize["difficulty"] = o.Difficulty
	}
	if !IsNil(o.EffectiveFeeMedian) {
		toSerialize["effective_fee_median"] = o.EffectiveFeeMedian
	}
	if !IsNil(o.Height) {
		toSerialize["height"] = o.Height
	}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.IsOrphan) {
		toSerialize["is_orphan"] = o.IsOrphan
	}
	if !IsNil(o.MinerTextInfo) {
		toSerialize["miner_text_info"] = o.MinerTextInfo
	}
	if !IsNil(o.ObjectInJson) {
		toSerialize["object_in_json"] = o.ObjectInJson
	}
	if !IsNil(o.Penalty) {
		toSerialize["penalty"] = o.Penalty
	}
	if !IsNil(o.PowSeed) {
		toSerialize["pow_seed"] = o.PowSeed
	}
	if !IsNil(o.PrevId) {
		toSerialize["prev_id"] = o.PrevId
	}
	if !IsNil(o.SummaryReward) {
		toSerialize["summary_reward"] = o.SummaryReward
	}
	if !IsNil(o.ThisBlockFeeMedian) {
		toSerialize["this_block_fee_median"] = o.ThisBlockFeeMedian
	}
	if !IsNil(o.Timestamp) {
		toSerialize["timestamp"] = o.Timestamp
	}
	if !IsNil(o.TotalFee) {
		toSerialize["total_fee"] = o.TotalFee
	}
	if !IsNil(o.TotalTxsSize) {
		toSerialize["total_txs_size"] = o.TotalTxsSize
	}
	if !IsNil(o.TransactionsDetails) {
		toSerialize["transactions_details"] = o.TransactionsDetails
	}
	if !IsNil(o.Type) {
		toSerialize["type"] = o.Type
	}

	for key, value := range o.AdditionalProperties {
		toSerialize[key] = value
	}

	return toSerialize, nil
}

func (o *BlockDetailsModel) UnmarshalJSON(data []byte) (err error) {
	varBlockDetailsModel := _BlockDetailsModel{}

	err = json.Unmarshal(data, &varBlockDetailsModel)

	if err != nil {
		return err
	}

	*o = BlockDetailsModel(varBlockDetailsModel)

	additionalProperties := make(map[string]interface{})

	if err = json.Unmarshal(data, &additionalProperties); err == nil {
		delete(additionalProperties, "actual_timestamp")
		delete(additionalProperties, "already_generated_coins")
		delete(additionalProperties, "base_reward")
		delete(additionalProperties, "blob")
		delete(additionalProperties, "block_cumulative_size")
		delete(additionalProperties, "block_tself_size")
		delete(additionalProperties, "cumulative_diff_adjusted")
		delete(additionalProperties, "cumulative_diff_precise")
		delete(additionalProperties, "difficulty")
		delete(additionalProperties, "effective_fee_median")
		delete(additionalProperties, "height")
		delete(additionalProperties, "id")
		delete(additionalProperties, "is_orphan")
		delete(additionalProperties, "miner_text_info")
		delete(additionalProperties, "object_in_json")
		delete(additionalProperties, "penalty")
		delete(additionalProperties, "pow_seed")
		delete(additionalProperties, "prev_id")
		delete(additionalProperties, "summary_reward")
		delete(additionalProperties, "this_block_fee_median")
		delete(additionalProperties, "timestamp")
		delete(additionalProperties, "total_fee")
		delete(additionalProperties, "total_txs_size")
		delete(additionalProperties, "transactions_details")
		delete(additionalProperties, "type")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableBlockDetailsModel struct {
	value *BlockDetailsModel
	isSet bool
}

func (v NullableBlockDetailsModel) Get() *BlockDetailsModel {
	return v.value
}

func (v *NullableBlockDetailsModel) Set(val *BlockDetailsModel) {
	v.value = val
	v.isSet = true
}

func (v NullableBlockDetailsModel) IsSet() bool {
	return v.isSet
}

func (v *NullableBlockDetailsModel) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableBlockDetailsModel(val *BlockDetailsModel) *NullableBlockDetailsModel {
	return &NullableBlockDetailsModel{value: val, isSet: true}
}

func (v NullableBlockDetailsModel) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableBlockDetailsModel) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


