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

// V1ListingItem Represents a listing item.
type V1ListingItem struct {
	// Gets or sets the metric ID.
	MetricId NullableString `json:"metric_id,omitempty"`
	// Gets or sets the symbol ID.
	SymbolId NullableString `json:"symbol_id,omitempty"`
	// Gets or sets the symbol ID from the exchange.
	SymbolIdExternal NullableString `json:"symbol_id_external,omitempty"`
	// Gets or sets the exchange ID.
	ExchangeId NullableString `json:"exchange_id,omitempty"`
	// Gets or sets the asset ID.
	AssetId NullableString `json:"asset_id,omitempty"`
	// Gets or sets the asset ID from the exchange.
	AssetIdExternal NullableString `json:"asset_id_external,omitempty"`
	// Gets or sets the chain id.
	ChainId NullableString `json:"chain_id,omitempty"`
	// Gets or sets the network id.
	NetworkId NullableString `json:"network_id,omitempty"`
}

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

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

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

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

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

	return false
}

// SetMetricId gets a reference to the given NullableString and assigns it to the MetricId field.
func (o *V1ListingItem) SetMetricId(v string) {
	o.MetricId.Set(&v)
}
// SetMetricIdNil sets the value for MetricId to be an explicit nil
func (o *V1ListingItem) SetMetricIdNil() {
	o.MetricId.Set(nil)
}

// UnsetMetricId ensures that no value is present for MetricId, not even an explicit nil
func (o *V1ListingItem) UnsetMetricId() {
	o.MetricId.Unset()
}

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

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

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

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

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

	return false
}

// SetSymbolIdExternal gets a reference to the given NullableString and assigns it to the SymbolIdExternal field.
func (o *V1ListingItem) SetSymbolIdExternal(v string) {
	o.SymbolIdExternal.Set(&v)
}
// SetSymbolIdExternalNil sets the value for SymbolIdExternal to be an explicit nil
func (o *V1ListingItem) SetSymbolIdExternalNil() {
	o.SymbolIdExternal.Set(nil)
}

// UnsetSymbolIdExternal ensures that no value is present for SymbolIdExternal, not even an explicit nil
func (o *V1ListingItem) UnsetSymbolIdExternal() {
	o.SymbolIdExternal.Unset()
}

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

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

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

	return false
}

// SetExchangeId gets a reference to the given NullableString and assigns it to the ExchangeId field.
func (o *V1ListingItem) SetExchangeId(v string) {
	o.ExchangeId.Set(&v)
}
// SetExchangeIdNil sets the value for ExchangeId to be an explicit nil
func (o *V1ListingItem) SetExchangeIdNil() {
	o.ExchangeId.Set(nil)
}

// UnsetExchangeId ensures that no value is present for ExchangeId, not even an explicit nil
func (o *V1ListingItem) UnsetExchangeId() {
	o.ExchangeId.Unset()
}

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

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

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

	return false
}

// SetAssetId gets a reference to the given NullableString and assigns it to the AssetId field.
func (o *V1ListingItem) SetAssetId(v string) {
	o.AssetId.Set(&v)
}
// SetAssetIdNil sets the value for AssetId to be an explicit nil
func (o *V1ListingItem) SetAssetIdNil() {
	o.AssetId.Set(nil)
}

// UnsetAssetId ensures that no value is present for AssetId, not even an explicit nil
func (o *V1ListingItem) UnsetAssetId() {
	o.AssetId.Unset()
}

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

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

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

	return false
}

// SetAssetIdExternal gets a reference to the given NullableString and assigns it to the AssetIdExternal field.
func (o *V1ListingItem) SetAssetIdExternal(v string) {
	o.AssetIdExternal.Set(&v)
}
// SetAssetIdExternalNil sets the value for AssetIdExternal to be an explicit nil
func (o *V1ListingItem) SetAssetIdExternalNil() {
	o.AssetIdExternal.Set(nil)
}

// UnsetAssetIdExternal ensures that no value is present for AssetIdExternal, not even an explicit nil
func (o *V1ListingItem) UnsetAssetIdExternal() {
	o.AssetIdExternal.Unset()
}

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

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

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

	return false
}

// SetChainId gets a reference to the given NullableString and assigns it to the ChainId field.
func (o *V1ListingItem) SetChainId(v string) {
	o.ChainId.Set(&v)
}
// SetChainIdNil sets the value for ChainId to be an explicit nil
func (o *V1ListingItem) SetChainIdNil() {
	o.ChainId.Set(nil)
}

// UnsetChainId ensures that no value is present for ChainId, not even an explicit nil
func (o *V1ListingItem) UnsetChainId() {
	o.ChainId.Unset()
}

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

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

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

	return false
}

// SetNetworkId gets a reference to the given NullableString and assigns it to the NetworkId field.
func (o *V1ListingItem) SetNetworkId(v string) {
	o.NetworkId.Set(&v)
}
// SetNetworkIdNil sets the value for NetworkId to be an explicit nil
func (o *V1ListingItem) SetNetworkIdNil() {
	o.NetworkId.Set(nil)
}

// UnsetNetworkId ensures that no value is present for NetworkId, not even an explicit nil
func (o *V1ListingItem) UnsetNetworkId() {
	o.NetworkId.Unset()
}

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

func (o V1ListingItem) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if o.MetricId.IsSet() {
		toSerialize["metric_id"] = o.MetricId.Get()
	}
	if o.SymbolId.IsSet() {
		toSerialize["symbol_id"] = o.SymbolId.Get()
	}
	if o.SymbolIdExternal.IsSet() {
		toSerialize["symbol_id_external"] = o.SymbolIdExternal.Get()
	}
	if o.ExchangeId.IsSet() {
		toSerialize["exchange_id"] = o.ExchangeId.Get()
	}
	if o.AssetId.IsSet() {
		toSerialize["asset_id"] = o.AssetId.Get()
	}
	if o.AssetIdExternal.IsSet() {
		toSerialize["asset_id_external"] = o.AssetIdExternal.Get()
	}
	if o.ChainId.IsSet() {
		toSerialize["chain_id"] = o.ChainId.Get()
	}
	if o.NetworkId.IsSet() {
		toSerialize["network_id"] = o.NetworkId.Get()
	}
	return toSerialize, nil
}

type NullableV1ListingItem struct {
	value *V1ListingItem
	isSet bool
}

func (v NullableV1ListingItem) Get() *V1ListingItem {
	return v.value
}

func (v *NullableV1ListingItem) Set(val *V1ListingItem) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableV1ListingItem(val *V1ListingItem) *NullableV1ListingItem {
	return &NullableV1ListingItem{value: val, isSet: true}
}

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

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


