// Code generated by Fern. DO NOT EDIT.

package attackprotection

import (
	fmt "fmt"
)

// Account Lockout: Determines whether or not IP address is used when counting failed attempts.
//
//	Possible values: <code>count_per_identifier_and_ip</code>, <code>count_per_identifier</code>.
type UpdateBruteForceSettingsRequestContentMode string

const (
	UpdateBruteForceSettingsRequestContentModeCountPerIdentifierAndIP UpdateBruteForceSettingsRequestContentMode = "count_per_identifier_and_ip"
	UpdateBruteForceSettingsRequestContentModeCountPerIdentifier      UpdateBruteForceSettingsRequestContentMode = "count_per_identifier"
)

func NewUpdateBruteForceSettingsRequestContentModeFromString(s string) (UpdateBruteForceSettingsRequestContentMode, error) {
	switch s {
	case "count_per_identifier_and_ip":
		return UpdateBruteForceSettingsRequestContentModeCountPerIdentifierAndIP, nil
	case "count_per_identifier":
		return UpdateBruteForceSettingsRequestContentModeCountPerIdentifier, nil
	}
	var t UpdateBruteForceSettingsRequestContentMode
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (u UpdateBruteForceSettingsRequestContentMode) Ptr() *UpdateBruteForceSettingsRequestContentMode {
	return &u
}

type UpdateBruteForceSettingsRequestContentShieldsItem string

const (
	UpdateBruteForceSettingsRequestContentShieldsItemBlock            UpdateBruteForceSettingsRequestContentShieldsItem = "block"
	UpdateBruteForceSettingsRequestContentShieldsItemUserNotification UpdateBruteForceSettingsRequestContentShieldsItem = "user_notification"
)

func NewUpdateBruteForceSettingsRequestContentShieldsItemFromString(s string) (UpdateBruteForceSettingsRequestContentShieldsItem, error) {
	switch s {
	case "block":
		return UpdateBruteForceSettingsRequestContentShieldsItemBlock, nil
	case "user_notification":
		return UpdateBruteForceSettingsRequestContentShieldsItemUserNotification, nil
	}
	var t UpdateBruteForceSettingsRequestContentShieldsItem
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (u UpdateBruteForceSettingsRequestContentShieldsItem) Ptr() *UpdateBruteForceSettingsRequestContentShieldsItem {
	return &u
}
