File size: 624 Bytes
04f1444 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | // 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)
}
|