openmeter / api /v3 /client /nullable.go
Leon4gr45's picture
Upload folder using huggingface_hub (part 3)
04f1444 verified
Raw
History Blame Contribute Delete
624 Bytes
// Code generated by @openmeter/typespec-go. DO NOT EDIT.
package openmeter
import "github.com/oapi-codegen/nullable"
// Nullable represents a JSON field with three states: unspecified, explicit
// null, or a concrete value. Optional nullable fields use this as a value with
// omitempty; do not wrap it in a pointer.
type Nullable[T any] = nullable.Nullable[T]
// Null constructs an explicit JSON null.
func Null[T any]() Nullable[T] {
return nullable.NewNullNullable[T]()
}
// NullableValue constructs a non-null value.
func NullableValue[T any](value T) Nullable[T] {
return nullable.NewNullableWithValue(value)
}