/*
FinFeedAPI Stock REST API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: v1
Contact: support@apibricks.io
*/

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

package openapi

import (
	"encoding/json"
)

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

// Level3OrderBookModel Represents the response DTO for Level-3 order book information
type Level3OrderBookModel struct {
	AddOrder *Level3AddOrderModel `json:"add_order,omitempty"`
	DeleteOrder *Level3DeleteOrderModel `json:"delete_order,omitempty"`
	ModifyOrder *Level3ModifyOrderModel `json:"modify_order,omitempty"`
	ExecutedOrder *Level3ExecutedOrderModel `json:"executed_order,omitempty"`
	ClearBook *Level3ClearBookModel `json:"clear_book,omitempty"`
}

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

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

// GetAddOrder returns the AddOrder field value if set, zero value otherwise.
func (o *Level3OrderBookModel) GetAddOrder() Level3AddOrderModel {
	if o == nil || IsNil(o.AddOrder) {
		var ret Level3AddOrderModel
		return ret
	}
	return *o.AddOrder
}

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

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

	return false
}

// SetAddOrder gets a reference to the given Level3AddOrderModel and assigns it to the AddOrder field.
func (o *Level3OrderBookModel) SetAddOrder(v Level3AddOrderModel) {
	o.AddOrder = &v
}

// GetDeleteOrder returns the DeleteOrder field value if set, zero value otherwise.
func (o *Level3OrderBookModel) GetDeleteOrder() Level3DeleteOrderModel {
	if o == nil || IsNil(o.DeleteOrder) {
		var ret Level3DeleteOrderModel
		return ret
	}
	return *o.DeleteOrder
}

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

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

	return false
}

// SetDeleteOrder gets a reference to the given Level3DeleteOrderModel and assigns it to the DeleteOrder field.
func (o *Level3OrderBookModel) SetDeleteOrder(v Level3DeleteOrderModel) {
	o.DeleteOrder = &v
}

// GetModifyOrder returns the ModifyOrder field value if set, zero value otherwise.
func (o *Level3OrderBookModel) GetModifyOrder() Level3ModifyOrderModel {
	if o == nil || IsNil(o.ModifyOrder) {
		var ret Level3ModifyOrderModel
		return ret
	}
	return *o.ModifyOrder
}

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

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

	return false
}

// SetModifyOrder gets a reference to the given Level3ModifyOrderModel and assigns it to the ModifyOrder field.
func (o *Level3OrderBookModel) SetModifyOrder(v Level3ModifyOrderModel) {
	o.ModifyOrder = &v
}

// GetExecutedOrder returns the ExecutedOrder field value if set, zero value otherwise.
func (o *Level3OrderBookModel) GetExecutedOrder() Level3ExecutedOrderModel {
	if o == nil || IsNil(o.ExecutedOrder) {
		var ret Level3ExecutedOrderModel
		return ret
	}
	return *o.ExecutedOrder
}

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

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

	return false
}

// SetExecutedOrder gets a reference to the given Level3ExecutedOrderModel and assigns it to the ExecutedOrder field.
func (o *Level3OrderBookModel) SetExecutedOrder(v Level3ExecutedOrderModel) {
	o.ExecutedOrder = &v
}

// GetClearBook returns the ClearBook field value if set, zero value otherwise.
func (o *Level3OrderBookModel) GetClearBook() Level3ClearBookModel {
	if o == nil || IsNil(o.ClearBook) {
		var ret Level3ClearBookModel
		return ret
	}
	return *o.ClearBook
}

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

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

	return false
}

// SetClearBook gets a reference to the given Level3ClearBookModel and assigns it to the ClearBook field.
func (o *Level3OrderBookModel) SetClearBook(v Level3ClearBookModel) {
	o.ClearBook = &v
}

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

func (o Level3OrderBookModel) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.AddOrder) {
		toSerialize["add_order"] = o.AddOrder
	}
	if !IsNil(o.DeleteOrder) {
		toSerialize["delete_order"] = o.DeleteOrder
	}
	if !IsNil(o.ModifyOrder) {
		toSerialize["modify_order"] = o.ModifyOrder
	}
	if !IsNil(o.ExecutedOrder) {
		toSerialize["executed_order"] = o.ExecutedOrder
	}
	if !IsNil(o.ClearBook) {
		toSerialize["clear_book"] = o.ClearBook
	}
	return toSerialize, nil
}

type NullableLevel3OrderBookModel struct {
	value *Level3OrderBookModel
	isSet bool
}

func (v NullableLevel3OrderBookModel) Get() *Level3OrderBookModel {
	return v.value
}

func (v *NullableLevel3OrderBookModel) Set(val *Level3OrderBookModel) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableLevel3OrderBookModel(val *Level3OrderBookModel) *NullableLevel3OrderBookModel {
	return &NullableLevel3OrderBookModel{value: val, isSet: true}
}

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

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


