/*
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 TxPoolPerformanceModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TxPoolPerformanceModel{}

// TxPoolPerformanceModel struct for TxPoolPerformanceModel
type TxPoolPerformanceModel struct {
	TxProcessingTime *int32 `json:"tx_processing_time,omitempty"`
	CheckInputsTypesSupportedTime *int32 `json:"check_inputs_types_supported_time,omitempty"`
	ExpirationValidateTime *int32 `json:"expiration_validate_time,omitempty"`
	ValidateAmountTime *int32 `json:"validate_amount_time,omitempty"`
	ValidateAliasTime *int32 `json:"validate_alias_time,omitempty"`
	CheckKeyimagesWsMsTime *int32 `json:"check_keyimages_ws_ms_time,omitempty"`
	CheckInputsTime *int32 `json:"check_inputs_time,omitempty"`
	BeginTxTime *int32 `json:"begin_tx_time,omitempty"`
	UpdateDbTime *int32 `json:"update_db_time,omitempty"`
	DbCommitTime *int32 `json:"db_commit_time,omitempty"`
	CheckPostHf4Balance *int32 `json:"check_post_hf4_balance,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _TxPoolPerformanceModel TxPoolPerformanceModel

// NewTxPoolPerformanceModel instantiates a new TxPoolPerformanceModel 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 NewTxPoolPerformanceModel() *TxPoolPerformanceModel {
	this := TxPoolPerformanceModel{}
	return &this
}

// NewTxPoolPerformanceModelWithDefaults instantiates a new TxPoolPerformanceModel 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 NewTxPoolPerformanceModelWithDefaults() *TxPoolPerformanceModel {
	this := TxPoolPerformanceModel{}
	return &this
}

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

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

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

	return false
}

// SetTxProcessingTime gets a reference to the given int32 and assigns it to the TxProcessingTime field.
func (o *TxPoolPerformanceModel) SetTxProcessingTime(v int32) {
	o.TxProcessingTime = &v
}

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

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

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

	return false
}

// SetCheckInputsTypesSupportedTime gets a reference to the given int32 and assigns it to the CheckInputsTypesSupportedTime field.
func (o *TxPoolPerformanceModel) SetCheckInputsTypesSupportedTime(v int32) {
	o.CheckInputsTypesSupportedTime = &v
}

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

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

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

	return false
}

// SetExpirationValidateTime gets a reference to the given int32 and assigns it to the ExpirationValidateTime field.
func (o *TxPoolPerformanceModel) SetExpirationValidateTime(v int32) {
	o.ExpirationValidateTime = &v
}

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

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

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

	return false
}

// SetValidateAmountTime gets a reference to the given int32 and assigns it to the ValidateAmountTime field.
func (o *TxPoolPerformanceModel) SetValidateAmountTime(v int32) {
	o.ValidateAmountTime = &v
}

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

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

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

	return false
}

// SetValidateAliasTime gets a reference to the given int32 and assigns it to the ValidateAliasTime field.
func (o *TxPoolPerformanceModel) SetValidateAliasTime(v int32) {
	o.ValidateAliasTime = &v
}

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

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

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

	return false
}

// SetCheckKeyimagesWsMsTime gets a reference to the given int32 and assigns it to the CheckKeyimagesWsMsTime field.
func (o *TxPoolPerformanceModel) SetCheckKeyimagesWsMsTime(v int32) {
	o.CheckKeyimagesWsMsTime = &v
}

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

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

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

	return false
}

// SetCheckInputsTime gets a reference to the given int32 and assigns it to the CheckInputsTime field.
func (o *TxPoolPerformanceModel) SetCheckInputsTime(v int32) {
	o.CheckInputsTime = &v
}

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

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

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

	return false
}

// SetBeginTxTime gets a reference to the given int32 and assigns it to the BeginTxTime field.
func (o *TxPoolPerformanceModel) SetBeginTxTime(v int32) {
	o.BeginTxTime = &v
}

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

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

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

	return false
}

// SetUpdateDbTime gets a reference to the given int32 and assigns it to the UpdateDbTime field.
func (o *TxPoolPerformanceModel) SetUpdateDbTime(v int32) {
	o.UpdateDbTime = &v
}

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

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

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

	return false
}

// SetDbCommitTime gets a reference to the given int32 and assigns it to the DbCommitTime field.
func (o *TxPoolPerformanceModel) SetDbCommitTime(v int32) {
	o.DbCommitTime = &v
}

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

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

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

	return false
}

// SetCheckPostHf4Balance gets a reference to the given int32 and assigns it to the CheckPostHf4Balance field.
func (o *TxPoolPerformanceModel) SetCheckPostHf4Balance(v int32) {
	o.CheckPostHf4Balance = &v
}

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

func (o TxPoolPerformanceModel) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.TxProcessingTime) {
		toSerialize["tx_processing_time"] = o.TxProcessingTime
	}
	if !IsNil(o.CheckInputsTypesSupportedTime) {
		toSerialize["check_inputs_types_supported_time"] = o.CheckInputsTypesSupportedTime
	}
	if !IsNil(o.ExpirationValidateTime) {
		toSerialize["expiration_validate_time"] = o.ExpirationValidateTime
	}
	if !IsNil(o.ValidateAmountTime) {
		toSerialize["validate_amount_time"] = o.ValidateAmountTime
	}
	if !IsNil(o.ValidateAliasTime) {
		toSerialize["validate_alias_time"] = o.ValidateAliasTime
	}
	if !IsNil(o.CheckKeyimagesWsMsTime) {
		toSerialize["check_keyimages_ws_ms_time"] = o.CheckKeyimagesWsMsTime
	}
	if !IsNil(o.CheckInputsTime) {
		toSerialize["check_inputs_time"] = o.CheckInputsTime
	}
	if !IsNil(o.BeginTxTime) {
		toSerialize["begin_tx_time"] = o.BeginTxTime
	}
	if !IsNil(o.UpdateDbTime) {
		toSerialize["update_db_time"] = o.UpdateDbTime
	}
	if !IsNil(o.DbCommitTime) {
		toSerialize["db_commit_time"] = o.DbCommitTime
	}
	if !IsNil(o.CheckPostHf4Balance) {
		toSerialize["check_post_hf4_balance"] = o.CheckPostHf4Balance
	}

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

	return toSerialize, nil
}

func (o *TxPoolPerformanceModel) UnmarshalJSON(data []byte) (err error) {
	varTxPoolPerformanceModel := _TxPoolPerformanceModel{}

	err = json.Unmarshal(data, &varTxPoolPerformanceModel)

	if err != nil {
		return err
	}

	*o = TxPoolPerformanceModel(varTxPoolPerformanceModel)

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

	if err = json.Unmarshal(data, &additionalProperties); err == nil {
		delete(additionalProperties, "tx_processing_time")
		delete(additionalProperties, "check_inputs_types_supported_time")
		delete(additionalProperties, "expiration_validate_time")
		delete(additionalProperties, "validate_amount_time")
		delete(additionalProperties, "validate_alias_time")
		delete(additionalProperties, "check_keyimages_ws_ms_time")
		delete(additionalProperties, "check_inputs_time")
		delete(additionalProperties, "begin_tx_time")
		delete(additionalProperties, "update_db_time")
		delete(additionalProperties, "db_commit_time")
		delete(additionalProperties, "check_post_hf4_balance")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableTxPoolPerformanceModel struct {
	value *TxPoolPerformanceModel
	isSet bool
}

func (v NullableTxPoolPerformanceModel) Get() *TxPoolPerformanceModel {
	return v.value
}

func (v *NullableTxPoolPerformanceModel) Set(val *TxPoolPerformanceModel) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableTxPoolPerformanceModel(val *TxPoolPerformanceModel) *NullableTxPoolPerformanceModel {
	return &NullableTxPoolPerformanceModel{value: val, isSet: true}
}

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

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


