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

// AdminSecurityEventModel Represents the response DTO for security event information
type AdminSecurityEventModel struct {
	// The stock symbol
	Symbol NullableString `json:"symbol,omitempty"`
	// Original timestamp in nanoseconds since epoch
	TimestampNanos *int64 `json:"timestamp_nanos,omitempty"`
	// Time when the security event was recorded as DateTime
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// Security event as byte value
	SecurityEvent *int32 `json:"security_event,omitempty"`
	// Security event as character string ('O' or 'C')
	SecurityEventCode NullableString `json:"security_event_code,omitempty"`
	// Human-readable description of the security event
	SecurityEventText NullableString `json:"security_event_text,omitempty"`
	// Indicates if the security event is 'Opening Process Complete' ('O'/0x4f).
	IsOpeningProcessComplete *bool `json:"is_opening_process_complete,omitempty"`
	// Indicates if the security event is 'Closing Process Complete' ('C'/0x43).
	IsClosingProcessComplete *bool `json:"is_closing_process_complete,omitempty"`
}

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

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

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

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

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

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

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

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

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

	return false
}

// SetSecurityEvent gets a reference to the given int32 and assigns it to the SecurityEvent field.
func (o *AdminSecurityEventModel) SetSecurityEvent(v int32) {
	o.SecurityEvent = &v
}

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

// GetSecurityEventCodeOk returns a tuple with the SecurityEventCode 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 *AdminSecurityEventModel) GetSecurityEventCodeOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.SecurityEventCode.Get(), o.SecurityEventCode.IsSet()
}

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

	return false
}

// SetSecurityEventCode gets a reference to the given NullableString and assigns it to the SecurityEventCode field.
func (o *AdminSecurityEventModel) SetSecurityEventCode(v string) {
	o.SecurityEventCode.Set(&v)
}
// SetSecurityEventCodeNil sets the value for SecurityEventCode to be an explicit nil
func (o *AdminSecurityEventModel) SetSecurityEventCodeNil() {
	o.SecurityEventCode.Set(nil)
}

// UnsetSecurityEventCode ensures that no value is present for SecurityEventCode, not even an explicit nil
func (o *AdminSecurityEventModel) UnsetSecurityEventCode() {
	o.SecurityEventCode.Unset()
}

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

// GetSecurityEventTextOk returns a tuple with the SecurityEventText 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 *AdminSecurityEventModel) GetSecurityEventTextOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.SecurityEventText.Get(), o.SecurityEventText.IsSet()
}

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

	return false
}

// SetSecurityEventText gets a reference to the given NullableString and assigns it to the SecurityEventText field.
func (o *AdminSecurityEventModel) SetSecurityEventText(v string) {
	o.SecurityEventText.Set(&v)
}
// SetSecurityEventTextNil sets the value for SecurityEventText to be an explicit nil
func (o *AdminSecurityEventModel) SetSecurityEventTextNil() {
	o.SecurityEventText.Set(nil)
}

// UnsetSecurityEventText ensures that no value is present for SecurityEventText, not even an explicit nil
func (o *AdminSecurityEventModel) UnsetSecurityEventText() {
	o.SecurityEventText.Unset()
}

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

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

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

	return false
}

// SetIsOpeningProcessComplete gets a reference to the given bool and assigns it to the IsOpeningProcessComplete field.
func (o *AdminSecurityEventModel) SetIsOpeningProcessComplete(v bool) {
	o.IsOpeningProcessComplete = &v
}

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

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

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

	return false
}

// SetIsClosingProcessComplete gets a reference to the given bool and assigns it to the IsClosingProcessComplete field.
func (o *AdminSecurityEventModel) SetIsClosingProcessComplete(v bool) {
	o.IsClosingProcessComplete = &v
}

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

func (o AdminSecurityEventModel) 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.SecurityEvent) {
		toSerialize["security_event"] = o.SecurityEvent
	}
	if o.SecurityEventCode.IsSet() {
		toSerialize["security_event_code"] = o.SecurityEventCode.Get()
	}
	if o.SecurityEventText.IsSet() {
		toSerialize["security_event_text"] = o.SecurityEventText.Get()
	}
	if !IsNil(o.IsOpeningProcessComplete) {
		toSerialize["is_opening_process_complete"] = o.IsOpeningProcessComplete
	}
	if !IsNil(o.IsClosingProcessComplete) {
		toSerialize["is_closing_process_complete"] = o.IsClosingProcessComplete
	}
	return toSerialize, nil
}

type NullableAdminSecurityEventModel struct {
	value *AdminSecurityEventModel
	isSet bool
}

func (v NullableAdminSecurityEventModel) Get() *AdminSecurityEventModel {
	return v.value
}

func (v *NullableAdminSecurityEventModel) Set(val *AdminSecurityEventModel) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAdminSecurityEventModel(val *AdminSecurityEventModel) *NullableAdminSecurityEventModel {
	return &NullableAdminSecurityEventModel{value: val, isSet: true}
}

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

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


