Files
openrtb/openrtb2/connection_type.go
T

30 lines
1.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package openrtb2
// 5.22 Connection Type
//
// Various options for the type of device connectivity.
type ConnectionType int8
const (
ConnectionTypeUnknown ConnectionType = 0 // Unknown
ConnectionTypeEthernet ConnectionType = 1 // Ethernet
ConnectionTypeWIFI ConnectionType = 2 // WIFI
ConnectionTypeCellularNetworkUnknownGeneration ConnectionType = 3 // Cellular Network Unknown Generation
ConnectionTypeCellularNetwork2G ConnectionType = 4 // Cellular Network 2G
ConnectionTypeCellularNetwork3G ConnectionType = 5 // Cellular Network 3G
ConnectionTypeCellularNetwork4G ConnectionType = 6 // Cellular Network 4G
)
// Ptr returns pointer to own value.
func (t ConnectionType) Ptr() *ConnectionType {
return &t
}
// Val safely dereferences pointer, returning default value (ConnectionTypeUnknown) for nil.
func (t *ConnectionType) Val() ConnectionType {
if t == nil {
return ConnectionTypeUnknown
}
return *t
}