/*
 * Redfish OAPI specification
 *
 * Partial Redfish OAPI specification for a limited client
 *
 * API version: 0.0.1
 */

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package client

import (
	"encoding/json"
	"fmt"
)

// IndicatorLED the model 'IndicatorLED'
type IndicatorLED string

// List of IndicatorLED
const (
	INDICATORLED_UNKNOWN IndicatorLED = "Unknown"
	INDICATORLED_LIT IndicatorLED = "Lit"
	INDICATORLED_BLINKING IndicatorLED = "Blinking"
	INDICATORLED_OFF IndicatorLED = "Off"
)

func (v *IndicatorLED) UnmarshalJSON(src []byte) error {
	var value string
	err := json.Unmarshal(src, &value)
	if err != nil {
		return err
	}
	enumTypeValue := IndicatorLED(value)
	for _, existing := range []IndicatorLED{ "Unknown", "Lit", "Blinking", "Off",   } {
		if existing == enumTypeValue {
			*v = enumTypeValue
			return nil
		}
	}

	return fmt.Errorf("%+v is not a valid IndicatorLED", value)
}

// Ptr returns reference to IndicatorLED value
func (v IndicatorLED) Ptr() *IndicatorLED {
	return &v
}

type NullableIndicatorLED struct {
	value *IndicatorLED
	isSet bool
}

func (v NullableIndicatorLED) Get() *IndicatorLED {
	return v.value
}

func (v *NullableIndicatorLED) Set(val *IndicatorLED) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableIndicatorLED(val *IndicatorLED) *NullableIndicatorLED {
	return &NullableIndicatorLED{value: val, isSet: true}
}

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

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