/*
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"
	"time"
)

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

// Level2PriceLevelUpdateModel Represents the response DTO for price level update information
type Level2PriceLevelUpdateModel struct {
	// The stock symbol
	Symbol NullableString `json:"symbol,omitempty"`
	// Original timestamp in nanoseconds since epoch
	TimestampNanos *int64 `json:"timestamp_nanos,omitempty"`
	// Time when the price level update was recorded as DateTime
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// Indicates if this is a price level update for the Buy Side.
	IsSideBuy *bool `json:"is_side_buy,omitempty"`
	// Indicates if event processing is complete.
	IsEventProcessingComplete *bool `json:"is_event_processing_complete,omitempty"`
	// Aggregate quoted size at the price level
	Size *int32 `json:"size,omitempty"`
	// Price level as decimal
	Price *float64 `json:"price,omitempty"`
}

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

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

// GetSymbol returns the Symbol field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Level2PriceLevelUpdateModel) GetSymbol() string {
	if o == nil || IsNil(o.Symbol.Get()) {
		var ret string
		return ret
	}
	return *o.Symbol.Get()
}

// GetSymbolOk returns a tuple with the Symbol field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Level2PriceLevelUpdateModel) GetSymbolOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.Symbol.Get(), o.Symbol.IsSet()
}

// HasSymbol returns a boolean if a field has been set.
func (o *Level2PriceLevelUpdateModel) HasSymbol() bool {
	if o != nil && o.Symbol.IsSet() {
		return true
	}

	return false
}

// SetSymbol gets a reference to the given NullableString and assigns it to the Symbol field.
func (o *Level2PriceLevelUpdateModel) SetSymbol(v string) {
	o.Symbol.Set(&v)
}
// SetSymbolNil sets the value for Symbol to be an explicit nil
func (o *Level2PriceLevelUpdateModel) SetSymbolNil() {
	o.Symbol.Set(nil)
}

// UnsetSymbol ensures that no value is present for Symbol, not even an explicit nil
func (o *Level2PriceLevelUpdateModel) UnsetSymbol() {
	o.Symbol.Unset()
}

// GetTimestampNanos returns the TimestampNanos field value if set, zero value otherwise.
func (o *Level2PriceLevelUpdateModel) GetTimestampNanos() int64 {
	if o == nil || IsNil(o.TimestampNanos) {
		var ret int64
		return ret
	}
	return *o.TimestampNanos
}

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

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

	return false
}

// SetTimestampNanos gets a reference to the given int64 and assigns it to the TimestampNanos field.
func (o *Level2PriceLevelUpdateModel) SetTimestampNanos(v int64) {
	o.TimestampNanos = &v
}

// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *Level2PriceLevelUpdateModel) GetTimestamp() time.Time {
	if o == nil || IsNil(o.Timestamp) {
		var ret time.Time
		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 *Level2PriceLevelUpdateModel) GetTimestampOk() (*time.Time, 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 *Level2PriceLevelUpdateModel) HasTimestamp() bool {
	if o != nil && !IsNil(o.Timestamp) {
		return true
	}

	return false
}

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

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

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

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

	return false
}

// SetIsSideBuy gets a reference to the given bool and assigns it to the IsSideBuy field.
func (o *Level2PriceLevelUpdateModel) SetIsSideBuy(v bool) {
	o.IsSideBuy = &v
}

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

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

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

	return false
}

// SetIsEventProcessingComplete gets a reference to the given bool and assigns it to the IsEventProcessingComplete field.
func (o *Level2PriceLevelUpdateModel) SetIsEventProcessingComplete(v bool) {
	o.IsEventProcessingComplete = &v
}

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

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

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

	return false
}

// SetSize gets a reference to the given int32 and assigns it to the Size field.
func (o *Level2PriceLevelUpdateModel) SetSize(v int32) {
	o.Size = &v
}

// GetPrice returns the Price field value if set, zero value otherwise.
func (o *Level2PriceLevelUpdateModel) GetPrice() float64 {
	if o == nil || IsNil(o.Price) {
		var ret float64
		return ret
	}
	return *o.Price
}

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

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

	return false
}

// SetPrice gets a reference to the given float64 and assigns it to the Price field.
func (o *Level2PriceLevelUpdateModel) SetPrice(v float64) {
	o.Price = &v
}

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

func (o Level2PriceLevelUpdateModel) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if o.Symbol.IsSet() {
		toSerialize["symbol"] = o.Symbol.Get()
	}
	if !IsNil(o.TimestampNanos) {
		toSerialize["timestamp_nanos"] = o.TimestampNanos
	}
	if !IsNil(o.Timestamp) {
		toSerialize["timestamp"] = o.Timestamp
	}
	if !IsNil(o.IsSideBuy) {
		toSerialize["is_side_buy"] = o.IsSideBuy
	}
	if !IsNil(o.IsEventProcessingComplete) {
		toSerialize["is_event_processing_complete"] = o.IsEventProcessingComplete
	}
	if !IsNil(o.Size) {
		toSerialize["size"] = o.Size
	}
	if !IsNil(o.Price) {
		toSerialize["price"] = o.Price
	}
	return toSerialize, nil
}

type NullableLevel2PriceLevelUpdateModel struct {
	value *Level2PriceLevelUpdateModel
	isSet bool
}

func (v NullableLevel2PriceLevelUpdateModel) Get() *Level2PriceLevelUpdateModel {
	return v.value
}

func (v *NullableLevel2PriceLevelUpdateModel) Set(val *Level2PriceLevelUpdateModel) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableLevel2PriceLevelUpdateModel(val *Level2PriceLevelUpdateModel) *NullableLevel2PriceLevelUpdateModel {
	return &NullableLevel2PriceLevelUpdateModel{value: val, isSet: true}
}

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

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


