// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/validate"
)

// IPSECPolicyAuthentication authentication for IPSec policy
// Example: hmac-sha-256-128
//
// swagger:model IPSECPolicyAuthentication
type IPSECPolicyAuthentication string

func NewIPSECPolicyAuthentication(value IPSECPolicyAuthentication) *IPSECPolicyAuthentication {
	return &value
}

// Pointer returns a pointer to a freshly-allocated IPSECPolicyAuthentication.
func (m IPSECPolicyAuthentication) Pointer() *IPSECPolicyAuthentication {
	return &m
}

const (

	// IPSECPolicyAuthenticationHmacDashShaDash256Dash128 captures enum value "hmac-sha-256-128"
	IPSECPolicyAuthenticationHmacDashShaDash256Dash128 IPSECPolicyAuthentication = "hmac-sha-256-128"

	// IPSECPolicyAuthenticationHmacDashSha1Dash96 captures enum value "hmac-sha1-96"
	IPSECPolicyAuthenticationHmacDashSha1Dash96 IPSECPolicyAuthentication = "hmac-sha1-96"

	// IPSECPolicyAuthenticationNone captures enum value "none"
	IPSECPolicyAuthenticationNone IPSECPolicyAuthentication = "none"
)

// for schema
var ipSECPolicyAuthenticationEnum []interface{}

func init() {
	var res []IPSECPolicyAuthentication
	if err := json.Unmarshal([]byte(`["hmac-sha-256-128","hmac-sha1-96","none"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		ipSECPolicyAuthenticationEnum = append(ipSECPolicyAuthenticationEnum, v)
	}
}

func (m IPSECPolicyAuthentication) validateIPSECPolicyAuthenticationEnum(path, location string, value IPSECPolicyAuthentication) error {
	if err := validate.EnumCase(path, location, value, ipSECPolicyAuthenticationEnum, true); err != nil {
		return err
	}
	return nil
}

// Validate validates this IP s e c policy authentication
func (m IPSECPolicyAuthentication) Validate(formats strfmt.Registry) error {
	var res []error

	// value enum
	if err := m.validateIPSECPolicyAuthenticationEnum("", "body", m); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

// ContextValidate validates this IP s e c policy authentication based on context it is used
func (m IPSECPolicyAuthentication) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
