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

// OptionsStrike Represents a strike within the option exchange group.
type OptionsStrike struct {
	// The strike price.
	StrikePrice *float64 `json:"strike_price,omitempty"`
	Call *V1QuoteTrade `json:"call,omitempty"`
	Put *V1QuoteTrade `json:"put,omitempty"`
}

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

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

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

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

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

	return false
}

// SetStrikePrice gets a reference to the given float64 and assigns it to the StrikePrice field.
func (o *OptionsStrike) SetStrikePrice(v float64) {
	o.StrikePrice = &v
}

// GetCall returns the Call field value if set, zero value otherwise.
func (o *OptionsStrike) GetCall() V1QuoteTrade {
	if o == nil || IsNil(o.Call) {
		var ret V1QuoteTrade
		return ret
	}
	return *o.Call
}

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

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

	return false
}

// SetCall gets a reference to the given V1QuoteTrade and assigns it to the Call field.
func (o *OptionsStrike) SetCall(v V1QuoteTrade) {
	o.Call = &v
}

// GetPut returns the Put field value if set, zero value otherwise.
func (o *OptionsStrike) GetPut() V1QuoteTrade {
	if o == nil || IsNil(o.Put) {
		var ret V1QuoteTrade
		return ret
	}
	return *o.Put
}

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

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

	return false
}

// SetPut gets a reference to the given V1QuoteTrade and assigns it to the Put field.
func (o *OptionsStrike) SetPut(v V1QuoteTrade) {
	o.Put = &v
}

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

func (o OptionsStrike) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.StrikePrice) {
		toSerialize["strike_price"] = o.StrikePrice
	}
	if !IsNil(o.Call) {
		toSerialize["call"] = o.Call
	}
	if !IsNil(o.Put) {
		toSerialize["put"] = o.Put
	}
	return toSerialize, nil
}

type NullableOptionsStrike struct {
	value *OptionsStrike
	isSet bool
}

func (v NullableOptionsStrike) Get() *OptionsStrike {
	return v.value
}

func (v *NullableOptionsStrike) Set(val *OptionsStrike) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableOptionsStrike(val *OptionsStrike) *NullableOptionsStrike {
	return &NullableOptionsStrike{value: val, isSet: true}
}

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

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


