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

package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry"

import (
	
	
)

// protoInt64 represents the protobuf encoding of integers which can be either
// strings or integers.
type protoInt64 int64

// Int64 returns the protoInt64 as an int64.
func ( *protoInt64) () int64 { return int64(*) }

// UnmarshalJSON decodes both strings and integers.
func ( *protoInt64) ( []byte) error {
	if [0] == '"' {
		var  string
		if  := json.Unmarshal(, &);  != nil {
			return 
		}
		,  := strconv.ParseInt(, 10, 64)
		if  != nil {
			return 
		}
		* = protoInt64()
	} else {
		var  int64
		if  := json.Unmarshal(, &);  != nil {
			return 
		}
		* = protoInt64()
	}
	return nil
}

// protoUint64 represents the protobuf encoding of integers which can be either
// strings or integers.
type protoUint64 uint64

// Int64 returns the protoUint64 as a uint64.
func ( *protoUint64) () uint64 { return uint64(*) }

// UnmarshalJSON decodes both strings and integers.
func ( *protoUint64) ( []byte) error {
	if [0] == '"' {
		var  string
		if  := json.Unmarshal(, &);  != nil {
			return 
		}
		,  := strconv.ParseUint(, 10, 64)
		if  != nil {
			return 
		}
		* = protoUint64()
	} else {
		var  uint64
		if  := json.Unmarshal(, &);  != nil {
			return 
		}
		* = protoUint64()
	}
	return nil
}