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

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

// OptionsOptionExchangeGroup Represents an option exchange group data model.
type OptionsOptionExchangeGroup struct {
	// The base asset identifier.
	AssetIdBase NullableString `json:"asset_id_base,omitempty"`
	// The quote asset identifier.
	AssetIdQuote NullableString `json:"asset_id_quote,omitempty"`
	// The underlying price of the option.
	UnderlyingPrice NullableFloat64 `json:"underlying_price,omitempty"`
	// The expiration time of the option.
	TimeExpiration *time.Time `json:"time_expiration,omitempty"`
	// The list of strikes available.
	Strikes []OptionsStrike `json:"strikes,omitempty"`
}

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

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

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

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

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

	return false
}

// SetAssetIdBase gets a reference to the given NullableString and assigns it to the AssetIdBase field.
func (o *OptionsOptionExchangeGroup) SetAssetIdBase(v string) {
	o.AssetIdBase.Set(&v)
}
// SetAssetIdBaseNil sets the value for AssetIdBase to be an explicit nil
func (o *OptionsOptionExchangeGroup) SetAssetIdBaseNil() {
	o.AssetIdBase.Set(nil)
}

// UnsetAssetIdBase ensures that no value is present for AssetIdBase, not even an explicit nil
func (o *OptionsOptionExchangeGroup) UnsetAssetIdBase() {
	o.AssetIdBase.Unset()
}

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

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

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

	return false
}

// SetAssetIdQuote gets a reference to the given NullableString and assigns it to the AssetIdQuote field.
func (o *OptionsOptionExchangeGroup) SetAssetIdQuote(v string) {
	o.AssetIdQuote.Set(&v)
}
// SetAssetIdQuoteNil sets the value for AssetIdQuote to be an explicit nil
func (o *OptionsOptionExchangeGroup) SetAssetIdQuoteNil() {
	o.AssetIdQuote.Set(nil)
}

// UnsetAssetIdQuote ensures that no value is present for AssetIdQuote, not even an explicit nil
func (o *OptionsOptionExchangeGroup) UnsetAssetIdQuote() {
	o.AssetIdQuote.Unset()
}

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

// GetUnderlyingPriceOk returns a tuple with the UnderlyingPrice 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 *OptionsOptionExchangeGroup) GetUnderlyingPriceOk() (*float64, bool) {
	if o == nil {
		return nil, false
	}
	return o.UnderlyingPrice.Get(), o.UnderlyingPrice.IsSet()
}

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

	return false
}

// SetUnderlyingPrice gets a reference to the given NullableFloat64 and assigns it to the UnderlyingPrice field.
func (o *OptionsOptionExchangeGroup) SetUnderlyingPrice(v float64) {
	o.UnderlyingPrice.Set(&v)
}
// SetUnderlyingPriceNil sets the value for UnderlyingPrice to be an explicit nil
func (o *OptionsOptionExchangeGroup) SetUnderlyingPriceNil() {
	o.UnderlyingPrice.Set(nil)
}

// UnsetUnderlyingPrice ensures that no value is present for UnderlyingPrice, not even an explicit nil
func (o *OptionsOptionExchangeGroup) UnsetUnderlyingPrice() {
	o.UnderlyingPrice.Unset()
}

// GetTimeExpiration returns the TimeExpiration field value if set, zero value otherwise.
func (o *OptionsOptionExchangeGroup) GetTimeExpiration() time.Time {
	if o == nil || IsNil(o.TimeExpiration) {
		var ret time.Time
		return ret
	}
	return *o.TimeExpiration
}

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

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

	return false
}

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

// GetStrikes returns the Strikes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *OptionsOptionExchangeGroup) GetStrikes() []OptionsStrike {
	if o == nil {
		var ret []OptionsStrike
		return ret
	}
	return o.Strikes
}

// GetStrikesOk returns a tuple with the Strikes 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 *OptionsOptionExchangeGroup) GetStrikesOk() ([]OptionsStrike, bool) {
	if o == nil || IsNil(o.Strikes) {
		return nil, false
	}
	return o.Strikes, true
}

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

	return false
}

// SetStrikes gets a reference to the given []OptionsStrike and assigns it to the Strikes field.
func (o *OptionsOptionExchangeGroup) SetStrikes(v []OptionsStrike) {
	o.Strikes = v
}

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

func (o OptionsOptionExchangeGroup) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if o.AssetIdBase.IsSet() {
		toSerialize["asset_id_base"] = o.AssetIdBase.Get()
	}
	if o.AssetIdQuote.IsSet() {
		toSerialize["asset_id_quote"] = o.AssetIdQuote.Get()
	}
	if o.UnderlyingPrice.IsSet() {
		toSerialize["underlying_price"] = o.UnderlyingPrice.Get()
	}
	if !IsNil(o.TimeExpiration) {
		toSerialize["time_expiration"] = o.TimeExpiration
	}
	if o.Strikes != nil {
		toSerialize["strikes"] = o.Strikes
	}
	return toSerialize, nil
}

type NullableOptionsOptionExchangeGroup struct {
	value *OptionsOptionExchangeGroup
	isSet bool
}

func (v NullableOptionsOptionExchangeGroup) Get() *OptionsOptionExchangeGroup {
	return v.value
}

func (v *NullableOptionsOptionExchangeGroup) Set(val *OptionsOptionExchangeGroup) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableOptionsOptionExchangeGroup(val *OptionsOptionExchangeGroup) *NullableOptionsOptionExchangeGroup {
	return &NullableOptionsOptionExchangeGroup{value: val, isSet: true}
}

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

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


