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

// Level3ClearBookModel Represents the response DTO for clear book information
type Level3ClearBookModel struct {
	// The stock symbol
	Symbol NullableString `json:"symbol,omitempty"`
	// Original timestamp in nanoseconds since epoch
	TimestampNanos *int64 `json:"timestamp_nanos,omitempty"`
	// Time when the book was cleared as DateTime
	Timestamp *time.Time `json:"timestamp,omitempty"`
}

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

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

// GetSymbol returns the Symbol field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Level3ClearBookModel) 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 *Level3ClearBookModel) 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 *Level3ClearBookModel) 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 *Level3ClearBookModel) SetSymbol(v string) {
	o.Symbol.Set(&v)
}
// SetSymbolNil sets the value for Symbol to be an explicit nil
func (o *Level3ClearBookModel) SetSymbolNil() {
	o.Symbol.Set(nil)
}

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

// GetTimestampNanos returns the TimestampNanos field value if set, zero value otherwise.
func (o *Level3ClearBookModel) 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 *Level3ClearBookModel) 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 *Level3ClearBookModel) 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 *Level3ClearBookModel) SetTimestampNanos(v int64) {
	o.TimestampNanos = &v
}

// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *Level3ClearBookModel) 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 *Level3ClearBookModel) 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 *Level3ClearBookModel) 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 *Level3ClearBookModel) SetTimestamp(v time.Time) {
	o.Timestamp = &v
}

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

func (o Level3ClearBookModel) 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
	}
	return toSerialize, nil
}

type NullableLevel3ClearBookModel struct {
	value *Level3ClearBookModel
	isSet bool
}

func (v NullableLevel3ClearBookModel) Get() *Level3ClearBookModel {
	return v.value
}

func (v *NullableLevel3ClearBookModel) Set(val *Level3ClearBookModel) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableLevel3ClearBookModel(val *Level3ClearBookModel) *NullableLevel3ClearBookModel {
	return &NullableLevel3ClearBookModel{value: val, isSet: true}
}

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

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


