/*
Edge Firewall API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 2.0.0
*/

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

package edgefirewall

import (
	"encoding/json"
	"fmt"
)

// SSLVerificationStatusOperators the model 'SSLVerificationStatusOperators'
type SSLVerificationStatusOperators string

// List of SSLVerificationStatusOperators
const (
	EQUAL SSLVerificationStatusOperators = "is_equal"
	NOT_EQUAL SSLVerificationStatusOperators = "is_not_equal"
)

// All allowed values of SSLVerificationStatusOperators enum
var AllowedSSLVerificationStatusOperatorsEnumValues = []SSLVerificationStatusOperators{
	"is_equal",
	"is_not_equal",
}

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

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

// NewSSLVerificationStatusOperatorsFromValue returns a pointer to a valid SSLVerificationStatusOperators
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewSSLVerificationStatusOperatorsFromValue(v string) (*SSLVerificationStatusOperators, error) {
	ev := SSLVerificationStatusOperators(v)
	if ev.IsValid() {
		return &ev, nil
	} else {
		return nil, fmt.Errorf("invalid value '%v' for SSLVerificationStatusOperators: valid values are %v", v, AllowedSSLVerificationStatusOperatorsEnumValues)
	}
}

// IsValid return true if the value is valid for the enum, false otherwise
func (v SSLVerificationStatusOperators) IsValid() bool {
	for _, existing := range AllowedSSLVerificationStatusOperatorsEnumValues {
		if existing == v {
			return true
		}
	}
	return false
}

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

type NullableSSLVerificationStatusOperators struct {
	value *SSLVerificationStatusOperators
	isSet bool
}

func (v NullableSSLVerificationStatusOperators) Get() *SSLVerificationStatusOperators {
	return v.value
}

func (v *NullableSSLVerificationStatusOperators) Set(val *SSLVerificationStatusOperators) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableSSLVerificationStatusOperators(val *SSLVerificationStatusOperators) *NullableSSLVerificationStatusOperators {
	return &NullableSSLVerificationStatusOperators{value: val, isSet: true}
}

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

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

