// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package attribute // import "go.opentelemetry.io/otel/attribute"

import (
	
)

// KeyValue holds a key and value pair.
type KeyValue struct {
	Key   Key
	Value Value
}

// Valid reports whether kv is a valid OpenTelemetry attribute.
func ( KeyValue) () bool {
	return .Key.Defined() && .Value.Type() != INVALID
}

// Bool creates a KeyValue with a BOOL Value type.
func ( string,  bool) KeyValue {
	return Key().Bool()
}

// BoolSlice creates a KeyValue with a BOOLSLICE Value type.
func ( string,  []bool) KeyValue {
	return Key().BoolSlice()
}

// Int creates a KeyValue with an INT64 Value type.
func ( string,  int) KeyValue {
	return Key().Int()
}

// IntSlice creates a KeyValue with an INT64SLICE Value type.
func ( string,  []int) KeyValue {
	return Key().IntSlice()
}

// Int64 creates a KeyValue with an INT64 Value type.
func ( string,  int64) KeyValue {
	return Key().Int64()
}

// Int64Slice creates a KeyValue with an INT64SLICE Value type.
func ( string,  []int64) KeyValue {
	return Key().Int64Slice()
}

// Float64 creates a KeyValue with a FLOAT64 Value type.
func ( string,  float64) KeyValue {
	return Key().Float64()
}

// Float64Slice creates a KeyValue with a FLOAT64SLICE Value type.
func ( string,  []float64) KeyValue {
	return Key().Float64Slice()
}

// String creates a KeyValue with a STRING Value type.
func (,  string) KeyValue {
	return Key().String()
}

// StringSlice creates a KeyValue with a STRINGSLICE Value type.
func ( string,  []string) KeyValue {
	return Key().StringSlice()
}

// Stringer creates a new key-value pair with a passed name and a string
// value generated by the passed Stringer interface.
func ( string,  fmt.Stringer) KeyValue {
	return Key().String(.String())
}