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

// V1GeneralData Class representation of general metric data. This class is an XML type with name 'general_data' and inherits from the BaseCsvModel class.
type V1GeneralData struct {
	// Gets or sets the entry time for the data point.
	EntryTime *time.Time `json:"entry_time,omitempty"`
	// Gets or sets the received time for the data point.
	RecvTime *time.Time `json:"recv_time,omitempty"`
	// Gets or sets the identifier for the exchange.
	ExchangeId NullableString `json:"exchange_id,omitempty"`
	// Gets or sets the identifier for the asset.
	AssetId NullableString `json:"asset_id,omitempty"`
	// Gets or sets the identifier for the symbol.
	SymbolId NullableString `json:"symbol_id,omitempty"`
	// Gets or sets the identifier for the metric.
	MetricId NullableString `json:"metric_id,omitempty"`
	// Gets or sets the decimal value for the metric.
	ValueDecimal NullableFloat64 `json:"value_decimal,omitempty"`
	// Gets or sets the textual representation of the value for the metric.
	ValueText NullableString `json:"value_text,omitempty"`
	// Gets or sets the timestamp value for the metric.
	ValueTime NullableTime `json:"value_time,omitempty"`
}

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

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

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

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

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

	return false
}

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

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

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

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

	return false
}

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

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

// UnsetExchangeId ensures that no value is present for ExchangeId, not even an explicit nil
func (o *V1GeneralData) 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 *V1GeneralData) 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 *V1GeneralData) 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 *V1GeneralData) 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 *V1GeneralData) SetAssetId(v string) {
	o.AssetId.Set(&v)
}
// SetAssetIdNil sets the value for AssetId to be an explicit nil
func (o *V1GeneralData) SetAssetIdNil() {
	o.AssetId.Set(nil)
}

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

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

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

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

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

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

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

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

	return false
}

// SetValueDecimal gets a reference to the given NullableFloat64 and assigns it to the ValueDecimal field.
func (o *V1GeneralData) SetValueDecimal(v float64) {
	o.ValueDecimal.Set(&v)
}
// SetValueDecimalNil sets the value for ValueDecimal to be an explicit nil
func (o *V1GeneralData) SetValueDecimalNil() {
	o.ValueDecimal.Set(nil)
}

// UnsetValueDecimal ensures that no value is present for ValueDecimal, not even an explicit nil
func (o *V1GeneralData) UnsetValueDecimal() {
	o.ValueDecimal.Unset()
}

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

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

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

	return false
}

// SetValueText gets a reference to the given NullableString and assigns it to the ValueText field.
func (o *V1GeneralData) SetValueText(v string) {
	o.ValueText.Set(&v)
}
// SetValueTextNil sets the value for ValueText to be an explicit nil
func (o *V1GeneralData) SetValueTextNil() {
	o.ValueText.Set(nil)
}

// UnsetValueText ensures that no value is present for ValueText, not even an explicit nil
func (o *V1GeneralData) UnsetValueText() {
	o.ValueText.Unset()
}

// GetValueTime returns the ValueTime field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *V1GeneralData) GetValueTime() time.Time {
	if o == nil || IsNil(o.ValueTime.Get()) {
		var ret time.Time
		return ret
	}
	return *o.ValueTime.Get()
}

// GetValueTimeOk returns a tuple with the ValueTime 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 *V1GeneralData) GetValueTimeOk() (*time.Time, bool) {
	if o == nil {
		return nil, false
	}
	return o.ValueTime.Get(), o.ValueTime.IsSet()
}

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

	return false
}

// SetValueTime gets a reference to the given NullableTime and assigns it to the ValueTime field.
func (o *V1GeneralData) SetValueTime(v time.Time) {
	o.ValueTime.Set(&v)
}
// SetValueTimeNil sets the value for ValueTime to be an explicit nil
func (o *V1GeneralData) SetValueTimeNil() {
	o.ValueTime.Set(nil)
}

// UnsetValueTime ensures that no value is present for ValueTime, not even an explicit nil
func (o *V1GeneralData) UnsetValueTime() {
	o.ValueTime.Unset()
}

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

func (o V1GeneralData) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.EntryTime) {
		toSerialize["entry_time"] = o.EntryTime
	}
	if !IsNil(o.RecvTime) {
		toSerialize["recv_time"] = o.RecvTime
	}
	if o.ExchangeId.IsSet() {
		toSerialize["exchange_id"] = o.ExchangeId.Get()
	}
	if o.AssetId.IsSet() {
		toSerialize["asset_id"] = o.AssetId.Get()
	}
	if o.SymbolId.IsSet() {
		toSerialize["symbol_id"] = o.SymbolId.Get()
	}
	if o.MetricId.IsSet() {
		toSerialize["metric_id"] = o.MetricId.Get()
	}
	if o.ValueDecimal.IsSet() {
		toSerialize["value_decimal"] = o.ValueDecimal.Get()
	}
	if o.ValueText.IsSet() {
		toSerialize["value_text"] = o.ValueText.Get()
	}
	if o.ValueTime.IsSet() {
		toSerialize["value_time"] = o.ValueTime.Get()
	}
	return toSerialize, nil
}

type NullableV1GeneralData struct {
	value *V1GeneralData
	isSet bool
}

func (v NullableV1GeneralData) Get() *V1GeneralData {
	return v.value
}

func (v *NullableV1GeneralData) Set(val *V1GeneralData) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableV1GeneralData(val *V1GeneralData) *NullableV1GeneralData {
	return &NullableV1GeneralData{value: val, isSet: true}
}

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

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


