// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers
// SPDX-License-Identifier: Apache-2.0

package conv

import (
	"github.com/go-openapi/strfmt"
)

// Base64 returns a pointer to the [strfmt.Base64] value passed in.
func Base64(v strfmt.Base64) *strfmt.Base64 {
	return &v
}

// Base64Value returns the value of the [strfmt.Base64] pointer passed in or
// the default value if the pointer is nil.
func Base64Value(v *strfmt.Base64) strfmt.Base64 {
	if v == nil {
		return nil
	}

	return *v
}

// URI returns a pointer to the [strfmt.URI] value passed in.
func URI(v strfmt.URI) *strfmt.URI {
	return &v
}

// URIValue returns the value of the [strfmt.URI] pointer passed in or
// the default value if the pointer is nil.
func URIValue(v *strfmt.URI) strfmt.URI {
	if v == nil {
		return strfmt.URI("")
	}

	return *v
}

// Email returns a pointer to the [strfmt.Email] value passed in.
func Email(v strfmt.Email) *strfmt.Email {
	return &v
}

// EmailValue returns the value of the [strfmt.Email] pointer passed in or
// the default value if the pointer is nil.
func EmailValue(v *strfmt.Email) strfmt.Email {
	if v == nil {
		return strfmt.Email("")
	}

	return *v
}

// Hostname returns a pointer to the [strfmt.Hostname] value passed in.
func Hostname(v strfmt.Hostname) *strfmt.Hostname {
	return &v
}

// HostnameValue returns the value of the [strfmt.Hostname] pointer passed in or
// the default value if the pointer is nil.
func HostnameValue(v *strfmt.Hostname) strfmt.Hostname {
	if v == nil {
		return strfmt.Hostname("")
	}

	return *v
}

// IPv4 returns a pointer to the [strfmt.IPv4] value passed in.
func IPv4(v strfmt.IPv4) *strfmt.IPv4 {
	return &v
}

// IPv4Value returns the value of the [strfmt.IPv4] pointer passed in or
// the default value if the pointer is nil.
func IPv4Value(v *strfmt.IPv4) strfmt.IPv4 {
	if v == nil {
		return strfmt.IPv4("")
	}

	return *v
}

// IPv6 returns a pointer to the [strfmt.IPv6] value passed in.
func IPv6(v strfmt.IPv6) *strfmt.IPv6 {
	return &v
}

// IPv6Value returns the value of the [strfmt.IPv6] pointer passed in or
// the default value if the pointer is nil.
func IPv6Value(v *strfmt.IPv6) strfmt.IPv6 {
	if v == nil {
		return strfmt.IPv6("")
	}

	return *v
}

// CIDR returns a pointer to the [strfmt.CIDR] value passed in.
func CIDR(v strfmt.CIDR) *strfmt.CIDR {
	return &v
}

// CIDRValue returns the value of the [strfmt.CIDR] pointer passed in or
// the default value if the pointer is nil.
func CIDRValue(v *strfmt.CIDR) strfmt.CIDR {
	if v == nil {
		return strfmt.CIDR("")
	}

	return *v
}

// MAC returns a pointer to the [strfmt.MAC] value passed in.
func MAC(v strfmt.MAC) *strfmt.MAC {
	return &v
}

// MACValue returns the value of the [strfmt.MAC] pointer passed in or
// the default value if the pointer is nil.
func MACValue(v *strfmt.MAC) strfmt.MAC {
	if v == nil {
		return strfmt.MAC("")
	}

	return *v
}

// UUID returns a pointer to the [strfmt.UUID] value passed in.
func UUID(v strfmt.UUID) *strfmt.UUID {
	return &v
}

// UUIDValue returns the value of the [strfmt.UUID] pointer passed in or
// the default value if the pointer is nil.
func UUIDValue(v *strfmt.UUID) strfmt.UUID {
	if v == nil {
		return strfmt.UUID("")
	}

	return *v
}

// UUID3 returns a pointer to the [strfmt.UUID3] value passed in.
func UUID3(v strfmt.UUID3) *strfmt.UUID3 {
	return &v
}

// UUID3Value returns the value of the [strfmt.UUID3] pointer passed in or
// the default value if the pointer is nil.
func UUID3Value(v *strfmt.UUID3) strfmt.UUID3 {
	if v == nil {
		return strfmt.UUID3("")
	}

	return *v
}

// UUID4 returns a pointer to the [strfmt.UUID4] value passed in.
func UUID4(v strfmt.UUID4) *strfmt.UUID4 {
	return &v
}

// UUID4Value returns the value of the [strfmt.UUID4] pointer passed in or
// the default value if the pointer is nil.
func UUID4Value(v *strfmt.UUID4) strfmt.UUID4 {
	if v == nil {
		return strfmt.UUID4("")
	}

	return *v
}

// UUID5 returns a pointer to the [strfmt.UUID5] value passed in.
func UUID5(v strfmt.UUID5) *strfmt.UUID5 {
	return &v
}

// UUID5Value returns the value of the [strfmt.UUID5] pointer passed in or
// the default value if the pointer is nil.
func UUID5Value(v *strfmt.UUID5) strfmt.UUID5 {
	if v == nil {
		return strfmt.UUID5("")
	}

	return *v
}

// UUID7 returns a pointer to the [strfmt.UUID7] value passed in.
func UUID7(v strfmt.UUID7) *strfmt.UUID7 {
	return &v
}

// UUID7Value returns the value of the [strfmt.UUID7] pointer passed in or
// the default value if the pointer is nil.
func UUID7Value(v *strfmt.UUID7) strfmt.UUID7 {
	if v == nil {
		return strfmt.UUID7("")
	}

	return *v
}

// ISBN returns a pointer to the [strfmt.ISBN] value passed in.
func ISBN(v strfmt.ISBN) *strfmt.ISBN {
	return &v
}

// ISBNValue returns the value of the [strfmt.ISBN] pointer passed in or
// the default value if the pointer is nil.
func ISBNValue(v *strfmt.ISBN) strfmt.ISBN {
	if v == nil {
		return strfmt.ISBN("")
	}

	return *v
}

// ISBN10 returns a pointer to the [strfmt.ISBN10] value passed in.
func ISBN10(v strfmt.ISBN10) *strfmt.ISBN10 {
	return &v
}

// ISBN10Value returns the value of the [strfmt.ISBN10] pointer passed in or
// the default value if the pointer is nil.
func ISBN10Value(v *strfmt.ISBN10) strfmt.ISBN10 {
	if v == nil {
		return strfmt.ISBN10("")
	}

	return *v
}

// ISBN13 returns a pointer to the [strfmt.ISBN13] value passed in.
func ISBN13(v strfmt.ISBN13) *strfmt.ISBN13 {
	return &v
}

// ISBN13Value returns the value of the [strfmt.ISBN13] pointer passed in or
// the default value if the pointer is nil.
func ISBN13Value(v *strfmt.ISBN13) strfmt.ISBN13 {
	if v == nil {
		return strfmt.ISBN13("")
	}

	return *v
}

// CreditCard returns a pointer to the [strfmt.CreditCard] value passed in.
func CreditCard(v strfmt.CreditCard) *strfmt.CreditCard {
	return &v
}

// CreditCardValue returns the value of the [strfmt.CreditCard] pointer passed in or
// the default value if the pointer is nil.
func CreditCardValue(v *strfmt.CreditCard) strfmt.CreditCard {
	if v == nil {
		return strfmt.CreditCard("")
	}

	return *v
}

// SSN returns a pointer to the [strfmt.SSN] value passed in.
func SSN(v strfmt.SSN) *strfmt.SSN {
	return &v
}

// SSNValue returns the value of the [strfmt.SSN] pointer passed in or
// the default value if the pointer is nil.
func SSNValue(v *strfmt.SSN) strfmt.SSN {
	if v == nil {
		return strfmt.SSN("")
	}

	return *v
}

// HexColor returns a pointer to the [strfmt.HexColor] value passed in.
func HexColor(v strfmt.HexColor) *strfmt.HexColor {
	return &v
}

// HexColorValue returns the value of the [strfmt.HexColor] pointer passed in or
// the default value if the pointer is nil.
func HexColorValue(v *strfmt.HexColor) strfmt.HexColor {
	if v == nil {
		return strfmt.HexColor("")
	}

	return *v
}

// RGBColor returns a pointer to the [strfmt.RGBColor] value passed in.
func RGBColor(v strfmt.RGBColor) *strfmt.RGBColor {
	return &v
}

// RGBColorValue returns the value of the [strfmt.RGBColor] pointer passed in or
// the default value if the pointer is nil.
func RGBColorValue(v *strfmt.RGBColor) strfmt.RGBColor {
	if v == nil {
		return strfmt.RGBColor("")
	}

	return *v
}

// Password returns a pointer to the [strfmt.Password] value passed in.
func Password(v strfmt.Password) *strfmt.Password {
	return &v
}

// PasswordValue returns the value of the [strfmt.Password] pointer passed in or
// the default value if the pointer is nil.
func PasswordValue(v *strfmt.Password) strfmt.Password {
	if v == nil {
		return strfmt.Password("")
	}

	return *v
}

// Currency returns a pointer to the [strfmt.Currency] value passed in.
func Currency(v strfmt.Currency) *strfmt.Currency {
	return &v
}

// CurrencyValue returns the value of the [strfmt.Currency] pointer passed in or
// the default value if the pointer is nil.
func CurrencyValue(v *strfmt.Currency) strfmt.Currency {
	if v == nil {
		return strfmt.Currency{}
	}

	return *v
}

// Country returns a pointer to the [strfmt.Country] value passed in.
func Country(v strfmt.Country) *strfmt.Country {
	return &v
}

// CountryValue returns the value of the [strfmt.Country] pointer passed in or
// the default value if the pointer is nil.
func CountryValue(v *strfmt.Country) strfmt.Country {
	if v == nil {
		return strfmt.Country{}
	}

	return *v
}
