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

// V1SymbolMapping Represents symbol mapping information for exchange symbols.
type V1SymbolMapping struct {
	// The symbol ID.
	SymbolId NullableString `json:"symbol_id,omitempty"`
	// The exchange-specific symbol ID.
	SymbolIdExchange NullableString `json:"symbol_id_exchange,omitempty"`
	// The CoinAPI DataInfo ID.
	CoinapiDatainfoId *int32 `json:"coinapi_datainfo_id,omitempty"`
	// The exchange-specific base asset ID.
	AssetIdBaseExchange NullableString `json:"asset_id_base_exchange,omitempty"`
	// The exchange-specific quote asset ID.
	AssetIdQuoteExchange NullableString `json:"asset_id_quote_exchange,omitempty"`
	// The base asset ID.
	AssetIdBase NullableString `json:"asset_id_base,omitempty"`
	// The quote asset ID.
	AssetIdQuote NullableString `json:"asset_id_quote,omitempty"`
	// The price precision.
	PricePrecision NullableFloat64 `json:"price_precision,omitempty"`
	// The size precision.
	SizePrecision NullableFloat64 `json:"size_precision,omitempty"`
}

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

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

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

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

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

	return false
}

// SetSymbolId gets a reference to the given NullableString and assigns it to the SymbolId field.
func (o *V1SymbolMapping) SetSymbolId(v string) {
	o.SymbolId.Set(&v)
}
// SetSymbolIdNil sets the value for SymbolId to be an explicit nil
func (o *V1SymbolMapping) SetSymbolIdNil() {
	o.SymbolId.Set(nil)
}

// UnsetSymbolId ensures that no value is present for SymbolId, not even an explicit nil
func (o *V1SymbolMapping) UnsetSymbolId() {
	o.SymbolId.Unset()
}

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

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

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

	return false
}

// SetSymbolIdExchange gets a reference to the given NullableString and assigns it to the SymbolIdExchange field.
func (o *V1SymbolMapping) SetSymbolIdExchange(v string) {
	o.SymbolIdExchange.Set(&v)
}
// SetSymbolIdExchangeNil sets the value for SymbolIdExchange to be an explicit nil
func (o *V1SymbolMapping) SetSymbolIdExchangeNil() {
	o.SymbolIdExchange.Set(nil)
}

// UnsetSymbolIdExchange ensures that no value is present for SymbolIdExchange, not even an explicit nil
func (o *V1SymbolMapping) UnsetSymbolIdExchange() {
	o.SymbolIdExchange.Unset()
}

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

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

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

	return false
}

// SetCoinapiDatainfoId gets a reference to the given int32 and assigns it to the CoinapiDatainfoId field.
func (o *V1SymbolMapping) SetCoinapiDatainfoId(v int32) {
	o.CoinapiDatainfoId = &v
}

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

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

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

	return false
}

// SetAssetIdBaseExchange gets a reference to the given NullableString and assigns it to the AssetIdBaseExchange field.
func (o *V1SymbolMapping) SetAssetIdBaseExchange(v string) {
	o.AssetIdBaseExchange.Set(&v)
}
// SetAssetIdBaseExchangeNil sets the value for AssetIdBaseExchange to be an explicit nil
func (o *V1SymbolMapping) SetAssetIdBaseExchangeNil() {
	o.AssetIdBaseExchange.Set(nil)
}

// UnsetAssetIdBaseExchange ensures that no value is present for AssetIdBaseExchange, not even an explicit nil
func (o *V1SymbolMapping) UnsetAssetIdBaseExchange() {
	o.AssetIdBaseExchange.Unset()
}

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

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

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

	return false
}

// SetAssetIdQuoteExchange gets a reference to the given NullableString and assigns it to the AssetIdQuoteExchange field.
func (o *V1SymbolMapping) SetAssetIdQuoteExchange(v string) {
	o.AssetIdQuoteExchange.Set(&v)
}
// SetAssetIdQuoteExchangeNil sets the value for AssetIdQuoteExchange to be an explicit nil
func (o *V1SymbolMapping) SetAssetIdQuoteExchangeNil() {
	o.AssetIdQuoteExchange.Set(nil)
}

// UnsetAssetIdQuoteExchange ensures that no value is present for AssetIdQuoteExchange, not even an explicit nil
func (o *V1SymbolMapping) UnsetAssetIdQuoteExchange() {
	o.AssetIdQuoteExchange.Unset()
}

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

// UnsetAssetIdBase ensures that no value is present for AssetIdBase, not even an explicit nil
func (o *V1SymbolMapping) 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 *V1SymbolMapping) 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 *V1SymbolMapping) 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 *V1SymbolMapping) 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 *V1SymbolMapping) SetAssetIdQuote(v string) {
	o.AssetIdQuote.Set(&v)
}
// SetAssetIdQuoteNil sets the value for AssetIdQuote to be an explicit nil
func (o *V1SymbolMapping) SetAssetIdQuoteNil() {
	o.AssetIdQuote.Set(nil)
}

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

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

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

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

	return false
}

// SetPricePrecision gets a reference to the given NullableFloat64 and assigns it to the PricePrecision field.
func (o *V1SymbolMapping) SetPricePrecision(v float64) {
	o.PricePrecision.Set(&v)
}
// SetPricePrecisionNil sets the value for PricePrecision to be an explicit nil
func (o *V1SymbolMapping) SetPricePrecisionNil() {
	o.PricePrecision.Set(nil)
}

// UnsetPricePrecision ensures that no value is present for PricePrecision, not even an explicit nil
func (o *V1SymbolMapping) UnsetPricePrecision() {
	o.PricePrecision.Unset()
}

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

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

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

	return false
}

// SetSizePrecision gets a reference to the given NullableFloat64 and assigns it to the SizePrecision field.
func (o *V1SymbolMapping) SetSizePrecision(v float64) {
	o.SizePrecision.Set(&v)
}
// SetSizePrecisionNil sets the value for SizePrecision to be an explicit nil
func (o *V1SymbolMapping) SetSizePrecisionNil() {
	o.SizePrecision.Set(nil)
}

// UnsetSizePrecision ensures that no value is present for SizePrecision, not even an explicit nil
func (o *V1SymbolMapping) UnsetSizePrecision() {
	o.SizePrecision.Unset()
}

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

func (o V1SymbolMapping) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if o.SymbolId.IsSet() {
		toSerialize["symbol_id"] = o.SymbolId.Get()
	}
	if o.SymbolIdExchange.IsSet() {
		toSerialize["symbol_id_exchange"] = o.SymbolIdExchange.Get()
	}
	if !IsNil(o.CoinapiDatainfoId) {
		toSerialize["coinapi_datainfo_id"] = o.CoinapiDatainfoId
	}
	if o.AssetIdBaseExchange.IsSet() {
		toSerialize["asset_id_base_exchange"] = o.AssetIdBaseExchange.Get()
	}
	if o.AssetIdQuoteExchange.IsSet() {
		toSerialize["asset_id_quote_exchange"] = o.AssetIdQuoteExchange.Get()
	}
	if o.AssetIdBase.IsSet() {
		toSerialize["asset_id_base"] = o.AssetIdBase.Get()
	}
	if o.AssetIdQuote.IsSet() {
		toSerialize["asset_id_quote"] = o.AssetIdQuote.Get()
	}
	if o.PricePrecision.IsSet() {
		toSerialize["price_precision"] = o.PricePrecision.Get()
	}
	if o.SizePrecision.IsSet() {
		toSerialize["size_precision"] = o.SizePrecision.Get()
	}
	return toSerialize, nil
}

type NullableV1SymbolMapping struct {
	value *V1SymbolMapping
	isSet bool
}

func (v NullableV1SymbolMapping) Get() *V1SymbolMapping {
	return v.value
}

func (v *NullableV1SymbolMapping) Set(val *V1SymbolMapping) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableV1SymbolMapping(val *V1SymbolMapping) *NullableV1SymbolMapping {
	return &NullableV1SymbolMapping{value: val, isSet: true}
}

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

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


