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

// IndexesIndexIdentifier Represents an index id
type IndexesIndexIdentifier struct {
	// Index ID
	Id NullableString `json:"id,omitempty"`
}

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

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

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

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

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

	return false
}

// SetId gets a reference to the given NullableString and assigns it to the Id field.
func (o *IndexesIndexIdentifier) SetId(v string) {
	o.Id.Set(&v)
}
// SetIdNil sets the value for Id to be an explicit nil
func (o *IndexesIndexIdentifier) SetIdNil() {
	o.Id.Set(nil)
}

// UnsetId ensures that no value is present for Id, not even an explicit nil
func (o *IndexesIndexIdentifier) UnsetId() {
	o.Id.Unset()
}

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

func (o IndexesIndexIdentifier) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if o.Id.IsSet() {
		toSerialize["id"] = o.Id.Get()
	}
	return toSerialize, nil
}

type NullableIndexesIndexIdentifier struct {
	value *IndexesIndexIdentifier
	isSet bool
}

func (v NullableIndexesIndexIdentifier) Get() *IndexesIndexIdentifier {
	return v.value
}

func (v *NullableIndexesIndexIdentifier) Set(val *IndexesIndexIdentifier) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableIndexesIndexIdentifier(val *IndexesIndexIdentifier) *NullableIndexesIndexIdentifier {
	return &NullableIndexesIndexIdentifier{value: val, isSet: true}
}

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

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


