/*
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"
)

// SSLVerificationStatusArguments the model 'SSLVerificationStatusArguments'
type SSLVerificationStatusArguments string

// List of SSLVerificationStatusArguments
const (
	SUCCESS SSLVerificationStatusArguments = "SUCCESS"
	CERTIFICATE_VERIFICATION_ERROR SSLVerificationStatusArguments = "CERTIFICATE_VERIFICATION_ERROR"
	MISSING_CLIENT_CERTIFICATE SSLVerificationStatusArguments = "MISSING_CLIENT_CERTIFICATE"
)

// All allowed values of SSLVerificationStatusArguments enum
var AllowedSSLVerificationStatusArgumentsEnumValues = []SSLVerificationStatusArguments{
	"SUCCESS",
	"CERTIFICATE_VERIFICATION_ERROR",
	"MISSING_CLIENT_CERTIFICATE",
}

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

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

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

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

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

type NullableSSLVerificationStatusArguments struct {
	value *SSLVerificationStatusArguments
	isSet bool
}

func (v NullableSSLVerificationStatusArguments) Get() *SSLVerificationStatusArguments {
	return v.value
}

func (v *NullableSSLVerificationStatusArguments) Set(val *SSLVerificationStatusArguments) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableSSLVerificationStatusArguments(val *SSLVerificationStatusArguments) *NullableSSLVerificationStatusArguments {
	return &NullableSSLVerificationStatusArguments{value: val, isSet: true}
}

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

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

