{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Spectrum.Types.Product where
import Network.Google.Prelude
import Network.Google.Spectrum.Types.Sum
newtype GeoLocationPolygon =
GeoLocationPolygon'
{ _glpExterior :: Maybe [GeoLocationPoint]
}
deriving (Eq, Show, Data, Typeable, Generic)
geoLocationPolygon
:: GeoLocationPolygon
geoLocationPolygon = GeoLocationPolygon' {_glpExterior = Nothing}
glpExterior :: Lens' GeoLocationPolygon [GeoLocationPoint]
glpExterior
= lens _glpExterior (\ s a -> s{_glpExterior = a}) .
_Default
. _Coerce
instance FromJSON GeoLocationPolygon where
parseJSON
= withObject "GeoLocationPolygon"
(\ o ->
GeoLocationPolygon' <$>
(o .:? "exterior" .!= mempty))
instance ToJSON GeoLocationPolygon where
toJSON GeoLocationPolygon'{..}
= object
(catMaybes [("exterior" .=) <$> _glpExterior])
data GeoLocationPoint =
GeoLocationPoint'
{ _glpLatitude :: !(Maybe (Textual Double))
, _glpLongitude :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
geoLocationPoint
:: GeoLocationPoint
geoLocationPoint =
GeoLocationPoint' {_glpLatitude = Nothing, _glpLongitude = Nothing}
glpLatitude :: Lens' GeoLocationPoint (Maybe Double)
glpLatitude
= lens _glpLatitude (\ s a -> s{_glpLatitude = a}) .
mapping _Coerce
glpLongitude :: Lens' GeoLocationPoint (Maybe Double)
glpLongitude
= lens _glpLongitude (\ s a -> s{_glpLongitude = a})
. mapping _Coerce
instance FromJSON GeoLocationPoint where
parseJSON
= withObject "GeoLocationPoint"
(\ o ->
GeoLocationPoint' <$>
(o .:? "latitude") <*> (o .:? "longitude"))
instance ToJSON GeoLocationPoint where
toJSON GeoLocationPoint'{..}
= object
(catMaybes
[("latitude" .=) <$> _glpLatitude,
("longitude" .=) <$> _glpLongitude])
data PawsInitResponse =
PawsInitResponse'
{ _pirKind :: !Text
, _pirVersion :: !(Maybe Text)
, _pirRulesetInfo :: !(Maybe RulesetInfo)
, _pirType :: !(Maybe Text)
, _pirDatabaseChange :: !(Maybe DBUpdateSpec)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsInitResponse
:: PawsInitResponse
pawsInitResponse =
PawsInitResponse'
{ _pirKind = "spectrum#pawsInitResponse"
, _pirVersion = Nothing
, _pirRulesetInfo = Nothing
, _pirType = Nothing
, _pirDatabaseChange = Nothing
}
pirKind :: Lens' PawsInitResponse Text
pirKind = lens _pirKind (\ s a -> s{_pirKind = a})
pirVersion :: Lens' PawsInitResponse (Maybe Text)
pirVersion
= lens _pirVersion (\ s a -> s{_pirVersion = a})
pirRulesetInfo :: Lens' PawsInitResponse (Maybe RulesetInfo)
pirRulesetInfo
= lens _pirRulesetInfo
(\ s a -> s{_pirRulesetInfo = a})
pirType :: Lens' PawsInitResponse (Maybe Text)
pirType = lens _pirType (\ s a -> s{_pirType = a})
pirDatabaseChange :: Lens' PawsInitResponse (Maybe DBUpdateSpec)
pirDatabaseChange
= lens _pirDatabaseChange
(\ s a -> s{_pirDatabaseChange = a})
instance FromJSON PawsInitResponse where
parseJSON
= withObject "PawsInitResponse"
(\ o ->
PawsInitResponse' <$>
(o .:? "kind" .!= "spectrum#pawsInitResponse") <*>
(o .:? "version")
<*> (o .:? "rulesetInfo")
<*> (o .:? "type")
<*> (o .:? "databaseChange"))
instance ToJSON PawsInitResponse where
toJSON PawsInitResponse'{..}
= object
(catMaybes
[Just ("kind" .= _pirKind),
("version" .=) <$> _pirVersion,
("rulesetInfo" .=) <$> _pirRulesetInfo,
("type" .=) <$> _pirType,
("databaseChange" .=) <$> _pirDatabaseChange])
data PawsRegisterResponse =
PawsRegisterResponse'
{ _prrKind :: !Text
, _prrVersion :: !(Maybe Text)
, _prrType :: !(Maybe Text)
, _prrDatabaseChange :: !(Maybe DBUpdateSpec)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsRegisterResponse
:: PawsRegisterResponse
pawsRegisterResponse =
PawsRegisterResponse'
{ _prrKind = "spectrum#pawsRegisterResponse"
, _prrVersion = Nothing
, _prrType = Nothing
, _prrDatabaseChange = Nothing
}
prrKind :: Lens' PawsRegisterResponse Text
prrKind = lens _prrKind (\ s a -> s{_prrKind = a})
prrVersion :: Lens' PawsRegisterResponse (Maybe Text)
prrVersion
= lens _prrVersion (\ s a -> s{_prrVersion = a})
prrType :: Lens' PawsRegisterResponse (Maybe Text)
prrType = lens _prrType (\ s a -> s{_prrType = a})
prrDatabaseChange :: Lens' PawsRegisterResponse (Maybe DBUpdateSpec)
prrDatabaseChange
= lens _prrDatabaseChange
(\ s a -> s{_prrDatabaseChange = a})
instance FromJSON PawsRegisterResponse where
parseJSON
= withObject "PawsRegisterResponse"
(\ o ->
PawsRegisterResponse' <$>
(o .:? "kind" .!= "spectrum#pawsRegisterResponse")
<*> (o .:? "version")
<*> (o .:? "type")
<*> (o .:? "databaseChange"))
instance ToJSON PawsRegisterResponse where
toJSON PawsRegisterResponse'{..}
= object
(catMaybes
[Just ("kind" .= _prrKind),
("version" .=) <$> _prrVersion,
("type" .=) <$> _prrType,
("databaseChange" .=) <$> _prrDatabaseChange])
data PawsNotifySpectrumUseRequest =
PawsNotifySpectrumUseRequest'
{ _pnsurSpectra :: !(Maybe [SpectrumMessage])
, _pnsurLocation :: !(Maybe GeoLocation)
, _pnsurVersion :: !(Maybe Text)
, _pnsurType :: !(Maybe Text)
, _pnsurDeviceDesc :: !(Maybe DeviceDescriptor)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsNotifySpectrumUseRequest
:: PawsNotifySpectrumUseRequest
pawsNotifySpectrumUseRequest =
PawsNotifySpectrumUseRequest'
{ _pnsurSpectra = Nothing
, _pnsurLocation = Nothing
, _pnsurVersion = Nothing
, _pnsurType = Nothing
, _pnsurDeviceDesc = Nothing
}
pnsurSpectra :: Lens' PawsNotifySpectrumUseRequest [SpectrumMessage]
pnsurSpectra
= lens _pnsurSpectra (\ s a -> s{_pnsurSpectra = a})
. _Default
. _Coerce
pnsurLocation :: Lens' PawsNotifySpectrumUseRequest (Maybe GeoLocation)
pnsurLocation
= lens _pnsurLocation
(\ s a -> s{_pnsurLocation = a})
pnsurVersion :: Lens' PawsNotifySpectrumUseRequest (Maybe Text)
pnsurVersion
= lens _pnsurVersion (\ s a -> s{_pnsurVersion = a})
pnsurType :: Lens' PawsNotifySpectrumUseRequest (Maybe Text)
pnsurType
= lens _pnsurType (\ s a -> s{_pnsurType = a})
pnsurDeviceDesc :: Lens' PawsNotifySpectrumUseRequest (Maybe DeviceDescriptor)
pnsurDeviceDesc
= lens _pnsurDeviceDesc
(\ s a -> s{_pnsurDeviceDesc = a})
instance FromJSON PawsNotifySpectrumUseRequest where
parseJSON
= withObject "PawsNotifySpectrumUseRequest"
(\ o ->
PawsNotifySpectrumUseRequest' <$>
(o .:? "spectra" .!= mempty) <*> (o .:? "location")
<*> (o .:? "version")
<*> (o .:? "type")
<*> (o .:? "deviceDesc"))
instance ToJSON PawsNotifySpectrumUseRequest where
toJSON PawsNotifySpectrumUseRequest'{..}
= object
(catMaybes
[("spectra" .=) <$> _pnsurSpectra,
("location" .=) <$> _pnsurLocation,
("version" .=) <$> _pnsurVersion,
("type" .=) <$> _pnsurType,
("deviceDesc" .=) <$> _pnsurDeviceDesc])
data Vcard =
Vcard'
{ _vEmail :: !(Maybe VcardTypedText)
, _vAdr :: !(Maybe VcardAddress)
, _vOrg :: !(Maybe VcardTypedText)
, _vTel :: !(Maybe VcardTelephone)
, _vFn :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
vcard
:: Vcard
vcard =
Vcard'
{ _vEmail = Nothing
, _vAdr = Nothing
, _vOrg = Nothing
, _vTel = Nothing
, _vFn = Nothing
}
vEmail :: Lens' Vcard (Maybe VcardTypedText)
vEmail = lens _vEmail (\ s a -> s{_vEmail = a})
vAdr :: Lens' Vcard (Maybe VcardAddress)
vAdr = lens _vAdr (\ s a -> s{_vAdr = a})
vOrg :: Lens' Vcard (Maybe VcardTypedText)
vOrg = lens _vOrg (\ s a -> s{_vOrg = a})
vTel :: Lens' Vcard (Maybe VcardTelephone)
vTel = lens _vTel (\ s a -> s{_vTel = a})
vFn :: Lens' Vcard (Maybe Text)
vFn = lens _vFn (\ s a -> s{_vFn = a})
instance FromJSON Vcard where
parseJSON
= withObject "Vcard"
(\ o ->
Vcard' <$>
(o .:? "email") <*> (o .:? "adr") <*> (o .:? "org")
<*> (o .:? "tel")
<*> (o .:? "fn"))
instance ToJSON Vcard where
toJSON Vcard'{..}
= object
(catMaybes
[("email" .=) <$> _vEmail, ("adr" .=) <$> _vAdr,
("org" .=) <$> _vOrg, ("tel" .=) <$> _vTel,
("fn" .=) <$> _vFn])
newtype DBUpdateSpec =
DBUpdateSpec'
{ _dusDatabases :: Maybe [DatabaseSpec]
}
deriving (Eq, Show, Data, Typeable, Generic)
dbUpdateSpec
:: DBUpdateSpec
dbUpdateSpec = DBUpdateSpec' {_dusDatabases = Nothing}
dusDatabases :: Lens' DBUpdateSpec [DatabaseSpec]
dusDatabases
= lens _dusDatabases (\ s a -> s{_dusDatabases = a})
. _Default
. _Coerce
instance FromJSON DBUpdateSpec where
parseJSON
= withObject "DBUpdateSpec"
(\ o ->
DBUpdateSpec' <$> (o .:? "databases" .!= mempty))
instance ToJSON DBUpdateSpec where
toJSON DBUpdateSpec'{..}
= object
(catMaybes [("databases" .=) <$> _dusDatabases])
data PawsGetSpectrumBatchRequest =
PawsGetSpectrumBatchRequest'
{ _pgsbrAntenna :: !(Maybe AntennaCharacteristics)
, _pgsbrMasterDeviceDesc :: !(Maybe DeviceDescriptor)
, _pgsbrOwner :: !(Maybe DeviceOwner)
, _pgsbrRequestType :: !(Maybe Text)
, _pgsbrVersion :: !(Maybe Text)
, _pgsbrType :: !(Maybe Text)
, _pgsbrLocations :: !(Maybe [GeoLocation])
, _pgsbrCapabilities :: !(Maybe DeviceCapabilities)
, _pgsbrDeviceDesc :: !(Maybe DeviceDescriptor)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsGetSpectrumBatchRequest
:: PawsGetSpectrumBatchRequest
pawsGetSpectrumBatchRequest =
PawsGetSpectrumBatchRequest'
{ _pgsbrAntenna = Nothing
, _pgsbrMasterDeviceDesc = Nothing
, _pgsbrOwner = Nothing
, _pgsbrRequestType = Nothing
, _pgsbrVersion = Nothing
, _pgsbrType = Nothing
, _pgsbrLocations = Nothing
, _pgsbrCapabilities = Nothing
, _pgsbrDeviceDesc = Nothing
}
pgsbrAntenna :: Lens' PawsGetSpectrumBatchRequest (Maybe AntennaCharacteristics)
pgsbrAntenna
= lens _pgsbrAntenna (\ s a -> s{_pgsbrAntenna = a})
pgsbrMasterDeviceDesc :: Lens' PawsGetSpectrumBatchRequest (Maybe DeviceDescriptor)
pgsbrMasterDeviceDesc
= lens _pgsbrMasterDeviceDesc
(\ s a -> s{_pgsbrMasterDeviceDesc = a})
pgsbrOwner :: Lens' PawsGetSpectrumBatchRequest (Maybe DeviceOwner)
pgsbrOwner
= lens _pgsbrOwner (\ s a -> s{_pgsbrOwner = a})
pgsbrRequestType :: Lens' PawsGetSpectrumBatchRequest (Maybe Text)
pgsbrRequestType
= lens _pgsbrRequestType
(\ s a -> s{_pgsbrRequestType = a})
pgsbrVersion :: Lens' PawsGetSpectrumBatchRequest (Maybe Text)
pgsbrVersion
= lens _pgsbrVersion (\ s a -> s{_pgsbrVersion = a})
pgsbrType :: Lens' PawsGetSpectrumBatchRequest (Maybe Text)
pgsbrType
= lens _pgsbrType (\ s a -> s{_pgsbrType = a})
pgsbrLocations :: Lens' PawsGetSpectrumBatchRequest [GeoLocation]
pgsbrLocations
= lens _pgsbrLocations
(\ s a -> s{_pgsbrLocations = a})
. _Default
. _Coerce
pgsbrCapabilities :: Lens' PawsGetSpectrumBatchRequest (Maybe DeviceCapabilities)
pgsbrCapabilities
= lens _pgsbrCapabilities
(\ s a -> s{_pgsbrCapabilities = a})
pgsbrDeviceDesc :: Lens' PawsGetSpectrumBatchRequest (Maybe DeviceDescriptor)
pgsbrDeviceDesc
= lens _pgsbrDeviceDesc
(\ s a -> s{_pgsbrDeviceDesc = a})
instance FromJSON PawsGetSpectrumBatchRequest where
parseJSON
= withObject "PawsGetSpectrumBatchRequest"
(\ o ->
PawsGetSpectrumBatchRequest' <$>
(o .:? "antenna") <*> (o .:? "masterDeviceDesc") <*>
(o .:? "owner")
<*> (o .:? "requestType")
<*> (o .:? "version")
<*> (o .:? "type")
<*> (o .:? "locations" .!= mempty)
<*> (o .:? "capabilities")
<*> (o .:? "deviceDesc"))
instance ToJSON PawsGetSpectrumBatchRequest where
toJSON PawsGetSpectrumBatchRequest'{..}
= object
(catMaybes
[("antenna" .=) <$> _pgsbrAntenna,
("masterDeviceDesc" .=) <$> _pgsbrMasterDeviceDesc,
("owner" .=) <$> _pgsbrOwner,
("requestType" .=) <$> _pgsbrRequestType,
("version" .=) <$> _pgsbrVersion,
("type" .=) <$> _pgsbrType,
("locations" .=) <$> _pgsbrLocations,
("capabilities" .=) <$> _pgsbrCapabilities,
("deviceDesc" .=) <$> _pgsbrDeviceDesc])
data GeoSpectrumSchedule =
GeoSpectrumSchedule'
{ _gssLocation :: !(Maybe GeoLocation)
, _gssSpectrumSchedules :: !(Maybe [SpectrumSchedule])
}
deriving (Eq, Show, Data, Typeable, Generic)
geoSpectrumSchedule
:: GeoSpectrumSchedule
geoSpectrumSchedule =
GeoSpectrumSchedule' {_gssLocation = Nothing, _gssSpectrumSchedules = Nothing}
gssLocation :: Lens' GeoSpectrumSchedule (Maybe GeoLocation)
gssLocation
= lens _gssLocation (\ s a -> s{_gssLocation = a})
gssSpectrumSchedules :: Lens' GeoSpectrumSchedule [SpectrumSchedule]
gssSpectrumSchedules
= lens _gssSpectrumSchedules
(\ s a -> s{_gssSpectrumSchedules = a})
. _Default
. _Coerce
instance FromJSON GeoSpectrumSchedule where
parseJSON
= withObject "GeoSpectrumSchedule"
(\ o ->
GeoSpectrumSchedule' <$>
(o .:? "location") <*>
(o .:? "spectrumSchedules" .!= mempty))
instance ToJSON GeoSpectrumSchedule where
toJSON GeoSpectrumSchedule'{..}
= object
(catMaybes
[("location" .=) <$> _gssLocation,
("spectrumSchedules" .=) <$> _gssSpectrumSchedules])
newtype VcardTypedText =
VcardTypedText'
{ _vttText :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
vcardTypedText
:: VcardTypedText
vcardTypedText = VcardTypedText' {_vttText = Nothing}
vttText :: Lens' VcardTypedText (Maybe Text)
vttText = lens _vttText (\ s a -> s{_vttText = a})
instance FromJSON VcardTypedText where
parseJSON
= withObject "VcardTypedText"
(\ o -> VcardTypedText' <$> (o .:? "text"))
instance ToJSON VcardTypedText where
toJSON VcardTypedText'{..}
= object (catMaybes [("text" .=) <$> _vttText])
data SpectrumSchedule =
SpectrumSchedule'
{ _ssSpectra :: !(Maybe [SpectrumMessage])
, _ssEventTime :: !(Maybe EventTime)
}
deriving (Eq, Show, Data, Typeable, Generic)
spectrumSchedule
:: SpectrumSchedule
spectrumSchedule =
SpectrumSchedule' {_ssSpectra = Nothing, _ssEventTime = Nothing}
ssSpectra :: Lens' SpectrumSchedule [SpectrumMessage]
ssSpectra
= lens _ssSpectra (\ s a -> s{_ssSpectra = a}) .
_Default
. _Coerce
ssEventTime :: Lens' SpectrumSchedule (Maybe EventTime)
ssEventTime
= lens _ssEventTime (\ s a -> s{_ssEventTime = a})
instance FromJSON SpectrumSchedule where
parseJSON
= withObject "SpectrumSchedule"
(\ o ->
SpectrumSchedule' <$>
(o .:? "spectra" .!= mempty) <*> (o .:? "eventTime"))
instance ToJSON SpectrumSchedule where
toJSON SpectrumSchedule'{..}
= object
(catMaybes
[("spectra" .=) <$> _ssSpectra,
("eventTime" .=) <$> _ssEventTime])
newtype VcardTelephone =
VcardTelephone'
{ _vtURI :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
vcardTelephone
:: VcardTelephone
vcardTelephone = VcardTelephone' {_vtURI = Nothing}
vtURI :: Lens' VcardTelephone (Maybe Text)
vtURI = lens _vtURI (\ s a -> s{_vtURI = a})
instance FromJSON VcardTelephone where
parseJSON
= withObject "VcardTelephone"
(\ o -> VcardTelephone' <$> (o .:? "uri"))
instance ToJSON VcardTelephone where
toJSON VcardTelephone'{..}
= object (catMaybes [("uri" .=) <$> _vtURI])
data DeviceOwner =
DeviceOwner'
{ _doOperator :: !(Maybe Vcard)
, _doOwner :: !(Maybe Vcard)
}
deriving (Eq, Show, Data, Typeable, Generic)
deviceOwner
:: DeviceOwner
deviceOwner = DeviceOwner' {_doOperator = Nothing, _doOwner = Nothing}
doOperator :: Lens' DeviceOwner (Maybe Vcard)
doOperator
= lens _doOperator (\ s a -> s{_doOperator = a})
doOwner :: Lens' DeviceOwner (Maybe Vcard)
doOwner = lens _doOwner (\ s a -> s{_doOwner = a})
instance FromJSON DeviceOwner where
parseJSON
= withObject "DeviceOwner"
(\ o ->
DeviceOwner' <$>
(o .:? "operator") <*> (o .:? "owner"))
instance ToJSON DeviceOwner where
toJSON DeviceOwner'{..}
= object
(catMaybes
[("operator" .=) <$> _doOperator,
("owner" .=) <$> _doOwner])
data EventTime =
EventTime'
{ _etStartTime :: !(Maybe Text)
, _etStopTime :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
eventTime
:: EventTime
eventTime = EventTime' {_etStartTime = Nothing, _etStopTime = Nothing}
etStartTime :: Lens' EventTime (Maybe Text)
etStartTime
= lens _etStartTime (\ s a -> s{_etStartTime = a})
etStopTime :: Lens' EventTime (Maybe Text)
etStopTime
= lens _etStopTime (\ s a -> s{_etStopTime = a})
instance FromJSON EventTime where
parseJSON
= withObject "EventTime"
(\ o ->
EventTime' <$>
(o .:? "startTime") <*> (o .:? "stopTime"))
instance ToJSON EventTime where
toJSON EventTime'{..}
= object
(catMaybes
[("startTime" .=) <$> _etStartTime,
("stopTime" .=) <$> _etStopTime])
data PawsGetSpectrumRequest =
PawsGetSpectrumRequest'
{ _pgsrAntenna :: !(Maybe AntennaCharacteristics)
, _pgsrMasterDeviceDesc :: !(Maybe DeviceDescriptor)
, _pgsrLocation :: !(Maybe GeoLocation)
, _pgsrOwner :: !(Maybe DeviceOwner)
, _pgsrRequestType :: !(Maybe Text)
, _pgsrVersion :: !(Maybe Text)
, _pgsrType :: !(Maybe Text)
, _pgsrCapabilities :: !(Maybe DeviceCapabilities)
, _pgsrDeviceDesc :: !(Maybe DeviceDescriptor)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsGetSpectrumRequest
:: PawsGetSpectrumRequest
pawsGetSpectrumRequest =
PawsGetSpectrumRequest'
{ _pgsrAntenna = Nothing
, _pgsrMasterDeviceDesc = Nothing
, _pgsrLocation = Nothing
, _pgsrOwner = Nothing
, _pgsrRequestType = Nothing
, _pgsrVersion = Nothing
, _pgsrType = Nothing
, _pgsrCapabilities = Nothing
, _pgsrDeviceDesc = Nothing
}
pgsrAntenna :: Lens' PawsGetSpectrumRequest (Maybe AntennaCharacteristics)
pgsrAntenna
= lens _pgsrAntenna (\ s a -> s{_pgsrAntenna = a})
pgsrMasterDeviceDesc :: Lens' PawsGetSpectrumRequest (Maybe DeviceDescriptor)
pgsrMasterDeviceDesc
= lens _pgsrMasterDeviceDesc
(\ s a -> s{_pgsrMasterDeviceDesc = a})
pgsrLocation :: Lens' PawsGetSpectrumRequest (Maybe GeoLocation)
pgsrLocation
= lens _pgsrLocation (\ s a -> s{_pgsrLocation = a})
pgsrOwner :: Lens' PawsGetSpectrumRequest (Maybe DeviceOwner)
pgsrOwner
= lens _pgsrOwner (\ s a -> s{_pgsrOwner = a})
pgsrRequestType :: Lens' PawsGetSpectrumRequest (Maybe Text)
pgsrRequestType
= lens _pgsrRequestType
(\ s a -> s{_pgsrRequestType = a})
pgsrVersion :: Lens' PawsGetSpectrumRequest (Maybe Text)
pgsrVersion
= lens _pgsrVersion (\ s a -> s{_pgsrVersion = a})
pgsrType :: Lens' PawsGetSpectrumRequest (Maybe Text)
pgsrType = lens _pgsrType (\ s a -> s{_pgsrType = a})
pgsrCapabilities :: Lens' PawsGetSpectrumRequest (Maybe DeviceCapabilities)
pgsrCapabilities
= lens _pgsrCapabilities
(\ s a -> s{_pgsrCapabilities = a})
pgsrDeviceDesc :: Lens' PawsGetSpectrumRequest (Maybe DeviceDescriptor)
pgsrDeviceDesc
= lens _pgsrDeviceDesc
(\ s a -> s{_pgsrDeviceDesc = a})
instance FromJSON PawsGetSpectrumRequest where
parseJSON
= withObject "PawsGetSpectrumRequest"
(\ o ->
PawsGetSpectrumRequest' <$>
(o .:? "antenna") <*> (o .:? "masterDeviceDesc") <*>
(o .:? "location")
<*> (o .:? "owner")
<*> (o .:? "requestType")
<*> (o .:? "version")
<*> (o .:? "type")
<*> (o .:? "capabilities")
<*> (o .:? "deviceDesc"))
instance ToJSON PawsGetSpectrumRequest where
toJSON PawsGetSpectrumRequest'{..}
= object
(catMaybes
[("antenna" .=) <$> _pgsrAntenna,
("masterDeviceDesc" .=) <$> _pgsrMasterDeviceDesc,
("location" .=) <$> _pgsrLocation,
("owner" .=) <$> _pgsrOwner,
("requestType" .=) <$> _pgsrRequestType,
("version" .=) <$> _pgsrVersion,
("type" .=) <$> _pgsrType,
("capabilities" .=) <$> _pgsrCapabilities,
("deviceDesc" .=) <$> _pgsrDeviceDesc])
data AntennaCharacteristics =
AntennaCharacteristics'
{ _acHeight :: !(Maybe (Textual Double))
, _acHeightType :: !(Maybe Text)
, _acHeightUncertainty :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
antennaCharacteristics
:: AntennaCharacteristics
antennaCharacteristics =
AntennaCharacteristics'
{ _acHeight = Nothing
, _acHeightType = Nothing
, _acHeightUncertainty = Nothing
}
acHeight :: Lens' AntennaCharacteristics (Maybe Double)
acHeight
= lens _acHeight (\ s a -> s{_acHeight = a}) .
mapping _Coerce
acHeightType :: Lens' AntennaCharacteristics (Maybe Text)
acHeightType
= lens _acHeightType (\ s a -> s{_acHeightType = a})
acHeightUncertainty :: Lens' AntennaCharacteristics (Maybe Double)
acHeightUncertainty
= lens _acHeightUncertainty
(\ s a -> s{_acHeightUncertainty = a})
. mapping _Coerce
instance FromJSON AntennaCharacteristics where
parseJSON
= withObject "AntennaCharacteristics"
(\ o ->
AntennaCharacteristics' <$>
(o .:? "height") <*> (o .:? "heightType") <*>
(o .:? "heightUncertainty"))
instance ToJSON AntennaCharacteristics where
toJSON AntennaCharacteristics'{..}
= object
(catMaybes
[("height" .=) <$> _acHeight,
("heightType" .=) <$> _acHeightType,
("heightUncertainty" .=) <$> _acHeightUncertainty])
data PawsVerifyDeviceResponse =
PawsVerifyDeviceResponse'
{ _pvdrDeviceValidities :: !(Maybe [DeviceValidity])
, _pvdrKind :: !Text
, _pvdrVersion :: !(Maybe Text)
, _pvdrType :: !(Maybe Text)
, _pvdrDatabaseChange :: !(Maybe DBUpdateSpec)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsVerifyDeviceResponse
:: PawsVerifyDeviceResponse
pawsVerifyDeviceResponse =
PawsVerifyDeviceResponse'
{ _pvdrDeviceValidities = Nothing
, _pvdrKind = "spectrum#pawsVerifyDeviceResponse"
, _pvdrVersion = Nothing
, _pvdrType = Nothing
, _pvdrDatabaseChange = Nothing
}
pvdrDeviceValidities :: Lens' PawsVerifyDeviceResponse [DeviceValidity]
pvdrDeviceValidities
= lens _pvdrDeviceValidities
(\ s a -> s{_pvdrDeviceValidities = a})
. _Default
. _Coerce
pvdrKind :: Lens' PawsVerifyDeviceResponse Text
pvdrKind = lens _pvdrKind (\ s a -> s{_pvdrKind = a})
pvdrVersion :: Lens' PawsVerifyDeviceResponse (Maybe Text)
pvdrVersion
= lens _pvdrVersion (\ s a -> s{_pvdrVersion = a})
pvdrType :: Lens' PawsVerifyDeviceResponse (Maybe Text)
pvdrType = lens _pvdrType (\ s a -> s{_pvdrType = a})
pvdrDatabaseChange :: Lens' PawsVerifyDeviceResponse (Maybe DBUpdateSpec)
pvdrDatabaseChange
= lens _pvdrDatabaseChange
(\ s a -> s{_pvdrDatabaseChange = a})
instance FromJSON PawsVerifyDeviceResponse where
parseJSON
= withObject "PawsVerifyDeviceResponse"
(\ o ->
PawsVerifyDeviceResponse' <$>
(o .:? "deviceValidities" .!= mempty) <*>
(o .:? "kind" .!=
"spectrum#pawsVerifyDeviceResponse")
<*> (o .:? "version")
<*> (o .:? "type")
<*> (o .:? "databaseChange"))
instance ToJSON PawsVerifyDeviceResponse where
toJSON PawsVerifyDeviceResponse'{..}
= object
(catMaybes
[("deviceValidities" .=) <$> _pvdrDeviceValidities,
Just ("kind" .= _pvdrKind),
("version" .=) <$> _pvdrVersion,
("type" .=) <$> _pvdrType,
("databaseChange" .=) <$> _pvdrDatabaseChange])
data VcardAddress =
VcardAddress'
{ _vaPobox :: !(Maybe Text)
, _vaCountry :: !(Maybe Text)
, _vaStreet :: !(Maybe Text)
, _vaLocality :: !(Maybe Text)
, _vaCode :: !(Maybe Text)
, _vaRegion :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
vcardAddress
:: VcardAddress
vcardAddress =
VcardAddress'
{ _vaPobox = Nothing
, _vaCountry = Nothing
, _vaStreet = Nothing
, _vaLocality = Nothing
, _vaCode = Nothing
, _vaRegion = Nothing
}
vaPobox :: Lens' VcardAddress (Maybe Text)
vaPobox = lens _vaPobox (\ s a -> s{_vaPobox = a})
vaCountry :: Lens' VcardAddress (Maybe Text)
vaCountry
= lens _vaCountry (\ s a -> s{_vaCountry = a})
vaStreet :: Lens' VcardAddress (Maybe Text)
vaStreet = lens _vaStreet (\ s a -> s{_vaStreet = a})
vaLocality :: Lens' VcardAddress (Maybe Text)
vaLocality
= lens _vaLocality (\ s a -> s{_vaLocality = a})
vaCode :: Lens' VcardAddress (Maybe Text)
vaCode = lens _vaCode (\ s a -> s{_vaCode = a})
vaRegion :: Lens' VcardAddress (Maybe Text)
vaRegion = lens _vaRegion (\ s a -> s{_vaRegion = a})
instance FromJSON VcardAddress where
parseJSON
= withObject "VcardAddress"
(\ o ->
VcardAddress' <$>
(o .:? "pobox") <*> (o .:? "country") <*>
(o .:? "street")
<*> (o .:? "locality")
<*> (o .:? "code")
<*> (o .:? "region"))
instance ToJSON VcardAddress where
toJSON VcardAddress'{..}
= object
(catMaybes
[("pobox" .=) <$> _vaPobox,
("country" .=) <$> _vaCountry,
("street" .=) <$> _vaStreet,
("locality" .=) <$> _vaLocality,
("code" .=) <$> _vaCode,
("region" .=) <$> _vaRegion])
data PawsGetSpectrumBatchResponse =
PawsGetSpectrumBatchResponse'
{ _pNeedsSpectrumReport :: !(Maybe Bool)
, _pKind :: !Text
, _pGeoSpectrumSchedules :: !(Maybe [GeoSpectrumSchedule])
, _pMaxContiguousBwHz :: !(Maybe (Textual Double))
, _pVersion :: !(Maybe Text)
, _pRulesetInfo :: !(Maybe RulesetInfo)
, _pType :: !(Maybe Text)
, _pDatabaseChange :: !(Maybe DBUpdateSpec)
, _pTimestamp :: !(Maybe Text)
, _pDeviceDesc :: !(Maybe DeviceDescriptor)
, _pMaxTotalBwHz :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsGetSpectrumBatchResponse
:: PawsGetSpectrumBatchResponse
pawsGetSpectrumBatchResponse =
PawsGetSpectrumBatchResponse'
{ _pNeedsSpectrumReport = Nothing
, _pKind = "spectrum#pawsGetSpectrumBatchResponse"
, _pGeoSpectrumSchedules = Nothing
, _pMaxContiguousBwHz = Nothing
, _pVersion = Nothing
, _pRulesetInfo = Nothing
, _pType = Nothing
, _pDatabaseChange = Nothing
, _pTimestamp = Nothing
, _pDeviceDesc = Nothing
, _pMaxTotalBwHz = Nothing
}
pNeedsSpectrumReport :: Lens' PawsGetSpectrumBatchResponse (Maybe Bool)
pNeedsSpectrumReport
= lens _pNeedsSpectrumReport
(\ s a -> s{_pNeedsSpectrumReport = a})
pKind :: Lens' PawsGetSpectrumBatchResponse Text
pKind = lens _pKind (\ s a -> s{_pKind = a})
pGeoSpectrumSchedules :: Lens' PawsGetSpectrumBatchResponse [GeoSpectrumSchedule]
pGeoSpectrumSchedules
= lens _pGeoSpectrumSchedules
(\ s a -> s{_pGeoSpectrumSchedules = a})
. _Default
. _Coerce
pMaxContiguousBwHz :: Lens' PawsGetSpectrumBatchResponse (Maybe Double)
pMaxContiguousBwHz
= lens _pMaxContiguousBwHz
(\ s a -> s{_pMaxContiguousBwHz = a})
. mapping _Coerce
pVersion :: Lens' PawsGetSpectrumBatchResponse (Maybe Text)
pVersion = lens _pVersion (\ s a -> s{_pVersion = a})
pRulesetInfo :: Lens' PawsGetSpectrumBatchResponse (Maybe RulesetInfo)
pRulesetInfo
= lens _pRulesetInfo (\ s a -> s{_pRulesetInfo = a})
pType :: Lens' PawsGetSpectrumBatchResponse (Maybe Text)
pType = lens _pType (\ s a -> s{_pType = a})
pDatabaseChange :: Lens' PawsGetSpectrumBatchResponse (Maybe DBUpdateSpec)
pDatabaseChange
= lens _pDatabaseChange
(\ s a -> s{_pDatabaseChange = a})
pTimestamp :: Lens' PawsGetSpectrumBatchResponse (Maybe Text)
pTimestamp
= lens _pTimestamp (\ s a -> s{_pTimestamp = a})
pDeviceDesc :: Lens' PawsGetSpectrumBatchResponse (Maybe DeviceDescriptor)
pDeviceDesc
= lens _pDeviceDesc (\ s a -> s{_pDeviceDesc = a})
pMaxTotalBwHz :: Lens' PawsGetSpectrumBatchResponse (Maybe Double)
pMaxTotalBwHz
= lens _pMaxTotalBwHz
(\ s a -> s{_pMaxTotalBwHz = a})
. mapping _Coerce
instance FromJSON PawsGetSpectrumBatchResponse where
parseJSON
= withObject "PawsGetSpectrumBatchResponse"
(\ o ->
PawsGetSpectrumBatchResponse' <$>
(o .:? "needsSpectrumReport") <*>
(o .:? "kind" .!=
"spectrum#pawsGetSpectrumBatchResponse")
<*> (o .:? "geoSpectrumSchedules" .!= mempty)
<*> (o .:? "maxContiguousBwHz")
<*> (o .:? "version")
<*> (o .:? "rulesetInfo")
<*> (o .:? "type")
<*> (o .:? "databaseChange")
<*> (o .:? "timestamp")
<*> (o .:? "deviceDesc")
<*> (o .:? "maxTotalBwHz"))
instance ToJSON PawsGetSpectrumBatchResponse where
toJSON PawsGetSpectrumBatchResponse'{..}
= object
(catMaybes
[("needsSpectrumReport" .=) <$>
_pNeedsSpectrumReport,
Just ("kind" .= _pKind),
("geoSpectrumSchedules" .=) <$>
_pGeoSpectrumSchedules,
("maxContiguousBwHz" .=) <$> _pMaxContiguousBwHz,
("version" .=) <$> _pVersion,
("rulesetInfo" .=) <$> _pRulesetInfo,
("type" .=) <$> _pType,
("databaseChange" .=) <$> _pDatabaseChange,
("timestamp" .=) <$> _pTimestamp,
("deviceDesc" .=) <$> _pDeviceDesc,
("maxTotalBwHz" .=) <$> _pMaxTotalBwHz])
data DeviceValidity =
DeviceValidity'
{ _dvIsValid :: !(Maybe Bool)
, _dvReason :: !(Maybe Text)
, _dvDeviceDesc :: !(Maybe DeviceDescriptor)
}
deriving (Eq, Show, Data, Typeable, Generic)
deviceValidity
:: DeviceValidity
deviceValidity =
DeviceValidity'
{_dvIsValid = Nothing, _dvReason = Nothing, _dvDeviceDesc = Nothing}
dvIsValid :: Lens' DeviceValidity (Maybe Bool)
dvIsValid
= lens _dvIsValid (\ s a -> s{_dvIsValid = a})
dvReason :: Lens' DeviceValidity (Maybe Text)
dvReason = lens _dvReason (\ s a -> s{_dvReason = a})
dvDeviceDesc :: Lens' DeviceValidity (Maybe DeviceDescriptor)
dvDeviceDesc
= lens _dvDeviceDesc (\ s a -> s{_dvDeviceDesc = a})
instance FromJSON DeviceValidity where
parseJSON
= withObject "DeviceValidity"
(\ o ->
DeviceValidity' <$>
(o .:? "isValid") <*> (o .:? "reason") <*>
(o .:? "deviceDesc"))
instance ToJSON DeviceValidity where
toJSON DeviceValidity'{..}
= object
(catMaybes
[("isValid" .=) <$> _dvIsValid,
("reason" .=) <$> _dvReason,
("deviceDesc" .=) <$> _dvDeviceDesc])
data GeoLocationEllipse =
GeoLocationEllipse'
{ _gleSemiMajorAxis :: !(Maybe (Textual Double))
, _gleCenter :: !(Maybe GeoLocationPoint)
, _gleOrientation :: !(Maybe (Textual Double))
, _gleSemiMinorAxis :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
geoLocationEllipse
:: GeoLocationEllipse
geoLocationEllipse =
GeoLocationEllipse'
{ _gleSemiMajorAxis = Nothing
, _gleCenter = Nothing
, _gleOrientation = Nothing
, _gleSemiMinorAxis = Nothing
}
gleSemiMajorAxis :: Lens' GeoLocationEllipse (Maybe Double)
gleSemiMajorAxis
= lens _gleSemiMajorAxis
(\ s a -> s{_gleSemiMajorAxis = a})
. mapping _Coerce
gleCenter :: Lens' GeoLocationEllipse (Maybe GeoLocationPoint)
gleCenter
= lens _gleCenter (\ s a -> s{_gleCenter = a})
gleOrientation :: Lens' GeoLocationEllipse (Maybe Double)
gleOrientation
= lens _gleOrientation
(\ s a -> s{_gleOrientation = a})
. mapping _Coerce
gleSemiMinorAxis :: Lens' GeoLocationEllipse (Maybe Double)
gleSemiMinorAxis
= lens _gleSemiMinorAxis
(\ s a -> s{_gleSemiMinorAxis = a})
. mapping _Coerce
instance FromJSON GeoLocationEllipse where
parseJSON
= withObject "GeoLocationEllipse"
(\ o ->
GeoLocationEllipse' <$>
(o .:? "semiMajorAxis") <*> (o .:? "center") <*>
(o .:? "orientation")
<*> (o .:? "semiMinorAxis"))
instance ToJSON GeoLocationEllipse where
toJSON GeoLocationEllipse'{..}
= object
(catMaybes
[("semiMajorAxis" .=) <$> _gleSemiMajorAxis,
("center" .=) <$> _gleCenter,
("orientation" .=) <$> _gleOrientation,
("semiMinorAxis" .=) <$> _gleSemiMinorAxis])
data RulesetInfo =
RulesetInfo'
{ _riRulesetIds :: !(Maybe [Text])
, _riMaxPollingSecs :: !(Maybe (Textual Int32))
, _riMaxLocationChange :: !(Maybe (Textual Double))
, _riAuthority :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
rulesetInfo
:: RulesetInfo
rulesetInfo =
RulesetInfo'
{ _riRulesetIds = Nothing
, _riMaxPollingSecs = Nothing
, _riMaxLocationChange = Nothing
, _riAuthority = Nothing
}
riRulesetIds :: Lens' RulesetInfo [Text]
riRulesetIds
= lens _riRulesetIds (\ s a -> s{_riRulesetIds = a})
. _Default
. _Coerce
riMaxPollingSecs :: Lens' RulesetInfo (Maybe Int32)
riMaxPollingSecs
= lens _riMaxPollingSecs
(\ s a -> s{_riMaxPollingSecs = a})
. mapping _Coerce
riMaxLocationChange :: Lens' RulesetInfo (Maybe Double)
riMaxLocationChange
= lens _riMaxLocationChange
(\ s a -> s{_riMaxLocationChange = a})
. mapping _Coerce
riAuthority :: Lens' RulesetInfo (Maybe Text)
riAuthority
= lens _riAuthority (\ s a -> s{_riAuthority = a})
instance FromJSON RulesetInfo where
parseJSON
= withObject "RulesetInfo"
(\ o ->
RulesetInfo' <$>
(o .:? "rulesetIds" .!= mempty) <*>
(o .:? "maxPollingSecs")
<*> (o .:? "maxLocationChange")
<*> (o .:? "authority"))
instance ToJSON RulesetInfo where
toJSON RulesetInfo'{..}
= object
(catMaybes
[("rulesetIds" .=) <$> _riRulesetIds,
("maxPollingSecs" .=) <$> _riMaxPollingSecs,
("maxLocationChange" .=) <$> _riMaxLocationChange,
("authority" .=) <$> _riAuthority])
data PawsRegisterRequest =
PawsRegisterRequest'
{ _pawAntenna :: !(Maybe AntennaCharacteristics)
, _pawLocation :: !(Maybe GeoLocation)
, _pawDeviceOwner :: !(Maybe DeviceOwner)
, _pawVersion :: !(Maybe Text)
, _pawType :: !(Maybe Text)
, _pawDeviceDesc :: !(Maybe DeviceDescriptor)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsRegisterRequest
:: PawsRegisterRequest
pawsRegisterRequest =
PawsRegisterRequest'
{ _pawAntenna = Nothing
, _pawLocation = Nothing
, _pawDeviceOwner = Nothing
, _pawVersion = Nothing
, _pawType = Nothing
, _pawDeviceDesc = Nothing
}
pawAntenna :: Lens' PawsRegisterRequest (Maybe AntennaCharacteristics)
pawAntenna
= lens _pawAntenna (\ s a -> s{_pawAntenna = a})
pawLocation :: Lens' PawsRegisterRequest (Maybe GeoLocation)
pawLocation
= lens _pawLocation (\ s a -> s{_pawLocation = a})
pawDeviceOwner :: Lens' PawsRegisterRequest (Maybe DeviceOwner)
pawDeviceOwner
= lens _pawDeviceOwner
(\ s a -> s{_pawDeviceOwner = a})
pawVersion :: Lens' PawsRegisterRequest (Maybe Text)
pawVersion
= lens _pawVersion (\ s a -> s{_pawVersion = a})
pawType :: Lens' PawsRegisterRequest (Maybe Text)
pawType = lens _pawType (\ s a -> s{_pawType = a})
pawDeviceDesc :: Lens' PawsRegisterRequest (Maybe DeviceDescriptor)
pawDeviceDesc
= lens _pawDeviceDesc
(\ s a -> s{_pawDeviceDesc = a})
instance FromJSON PawsRegisterRequest where
parseJSON
= withObject "PawsRegisterRequest"
(\ o ->
PawsRegisterRequest' <$>
(o .:? "antenna") <*> (o .:? "location") <*>
(o .:? "deviceOwner")
<*> (o .:? "version")
<*> (o .:? "type")
<*> (o .:? "deviceDesc"))
instance ToJSON PawsRegisterRequest where
toJSON PawsRegisterRequest'{..}
= object
(catMaybes
[("antenna" .=) <$> _pawAntenna,
("location" .=) <$> _pawLocation,
("deviceOwner" .=) <$> _pawDeviceOwner,
("version" .=) <$> _pawVersion,
("type" .=) <$> _pawType,
("deviceDesc" .=) <$> _pawDeviceDesc])
data PawsNotifySpectrumUseResponse =
PawsNotifySpectrumUseResponse'
{ _pnsurnKind :: !Text
, _pnsurnVersion :: !(Maybe Text)
, _pnsurnType :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsNotifySpectrumUseResponse
:: PawsNotifySpectrumUseResponse
pawsNotifySpectrumUseResponse =
PawsNotifySpectrumUseResponse'
{ _pnsurnKind = "spectrum#pawsNotifySpectrumUseResponse"
, _pnsurnVersion = Nothing
, _pnsurnType = Nothing
}
pnsurnKind :: Lens' PawsNotifySpectrumUseResponse Text
pnsurnKind
= lens _pnsurnKind (\ s a -> s{_pnsurnKind = a})
pnsurnVersion :: Lens' PawsNotifySpectrumUseResponse (Maybe Text)
pnsurnVersion
= lens _pnsurnVersion
(\ s a -> s{_pnsurnVersion = a})
pnsurnType :: Lens' PawsNotifySpectrumUseResponse (Maybe Text)
pnsurnType
= lens _pnsurnType (\ s a -> s{_pnsurnType = a})
instance FromJSON PawsNotifySpectrumUseResponse where
parseJSON
= withObject "PawsNotifySpectrumUseResponse"
(\ o ->
PawsNotifySpectrumUseResponse' <$>
(o .:? "kind" .!=
"spectrum#pawsNotifySpectrumUseResponse")
<*> (o .:? "version")
<*> (o .:? "type"))
instance ToJSON PawsNotifySpectrumUseResponse where
toJSON PawsNotifySpectrumUseResponse'{..}
= object
(catMaybes
[Just ("kind" .= _pnsurnKind),
("version" .=) <$> _pnsurnVersion,
("type" .=) <$> _pnsurnType])
data DatabaseSpec =
DatabaseSpec'
{ _dsURI :: !(Maybe Text)
, _dsName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
databaseSpec
:: DatabaseSpec
databaseSpec = DatabaseSpec' {_dsURI = Nothing, _dsName = Nothing}
dsURI :: Lens' DatabaseSpec (Maybe Text)
dsURI = lens _dsURI (\ s a -> s{_dsURI = a})
dsName :: Lens' DatabaseSpec (Maybe Text)
dsName = lens _dsName (\ s a -> s{_dsName = a})
instance FromJSON DatabaseSpec where
parseJSON
= withObject "DatabaseSpec"
(\ o ->
DatabaseSpec' <$> (o .:? "uri") <*> (o .:? "name"))
instance ToJSON DatabaseSpec where
toJSON DatabaseSpec'{..}
= object
(catMaybes
[("uri" .=) <$> _dsURI, ("name" .=) <$> _dsName])
data SpectrumMessage =
SpectrumMessage'
{ _smBandwidth :: !(Maybe (Textual Double))
, _smFrequencyRanges :: !(Maybe [FrequencyRange])
}
deriving (Eq, Show, Data, Typeable, Generic)
spectrumMessage
:: SpectrumMessage
spectrumMessage =
SpectrumMessage' {_smBandwidth = Nothing, _smFrequencyRanges = Nothing}
smBandwidth :: Lens' SpectrumMessage (Maybe Double)
smBandwidth
= lens _smBandwidth (\ s a -> s{_smBandwidth = a}) .
mapping _Coerce
smFrequencyRanges :: Lens' SpectrumMessage [FrequencyRange]
smFrequencyRanges
= lens _smFrequencyRanges
(\ s a -> s{_smFrequencyRanges = a})
. _Default
. _Coerce
instance FromJSON SpectrumMessage where
parseJSON
= withObject "SpectrumMessage"
(\ o ->
SpectrumMessage' <$>
(o .:? "bandwidth") <*>
(o .:? "frequencyRanges" .!= mempty))
instance ToJSON SpectrumMessage where
toJSON SpectrumMessage'{..}
= object
(catMaybes
[("bandwidth" .=) <$> _smBandwidth,
("frequencyRanges" .=) <$> _smFrequencyRanges])
data GeoLocation =
GeoLocation'
{ _glConfidence :: !(Maybe (Textual Int32))
, _glPoint :: !(Maybe GeoLocationEllipse)
, _glRegion :: !(Maybe GeoLocationPolygon)
}
deriving (Eq, Show, Data, Typeable, Generic)
geoLocation
:: GeoLocation
geoLocation =
GeoLocation'
{_glConfidence = Nothing, _glPoint = Nothing, _glRegion = Nothing}
glConfidence :: Lens' GeoLocation (Maybe Int32)
glConfidence
= lens _glConfidence (\ s a -> s{_glConfidence = a})
. mapping _Coerce
glPoint :: Lens' GeoLocation (Maybe GeoLocationEllipse)
glPoint = lens _glPoint (\ s a -> s{_glPoint = a})
glRegion :: Lens' GeoLocation (Maybe GeoLocationPolygon)
glRegion = lens _glRegion (\ s a -> s{_glRegion = a})
instance FromJSON GeoLocation where
parseJSON
= withObject "GeoLocation"
(\ o ->
GeoLocation' <$>
(o .:? "confidence") <*> (o .:? "point") <*>
(o .:? "region"))
instance ToJSON GeoLocation where
toJSON GeoLocation'{..}
= object
(catMaybes
[("confidence" .=) <$> _glConfidence,
("point" .=) <$> _glPoint,
("region" .=) <$> _glRegion])
data FrequencyRange =
FrequencyRange'
{ _frStopHz :: !(Maybe (Textual Double))
, _frMaxPowerDBm :: !(Maybe (Textual Double))
, _frChannelId :: !(Maybe Text)
, _frStartHz :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
frequencyRange
:: FrequencyRange
frequencyRange =
FrequencyRange'
{ _frStopHz = Nothing
, _frMaxPowerDBm = Nothing
, _frChannelId = Nothing
, _frStartHz = Nothing
}
frStopHz :: Lens' FrequencyRange (Maybe Double)
frStopHz
= lens _frStopHz (\ s a -> s{_frStopHz = a}) .
mapping _Coerce
frMaxPowerDBm :: Lens' FrequencyRange (Maybe Double)
frMaxPowerDBm
= lens _frMaxPowerDBm
(\ s a -> s{_frMaxPowerDBm = a})
. mapping _Coerce
frChannelId :: Lens' FrequencyRange (Maybe Text)
frChannelId
= lens _frChannelId (\ s a -> s{_frChannelId = a})
frStartHz :: Lens' FrequencyRange (Maybe Double)
frStartHz
= lens _frStartHz (\ s a -> s{_frStartHz = a}) .
mapping _Coerce
instance FromJSON FrequencyRange where
parseJSON
= withObject "FrequencyRange"
(\ o ->
FrequencyRange' <$>
(o .:? "stopHz") <*> (o .:? "maxPowerDBm") <*>
(o .:? "channelId")
<*> (o .:? "startHz"))
instance ToJSON FrequencyRange where
toJSON FrequencyRange'{..}
= object
(catMaybes
[("stopHz" .=) <$> _frStopHz,
("maxPowerDBm" .=) <$> _frMaxPowerDBm,
("channelId" .=) <$> _frChannelId,
("startHz" .=) <$> _frStartHz])
data PawsGetSpectrumResponse =
PawsGetSpectrumResponse'
{ _pgsrgNeedsSpectrumReport :: !(Maybe Bool)
, _pgsrgSpectrumSchedules :: !(Maybe [SpectrumSchedule])
, _pgsrgKind :: !Text
, _pgsrgMaxContiguousBwHz :: !(Maybe (Textual Double))
, _pgsrgVersion :: !(Maybe Text)
, _pgsrgRulesetInfo :: !(Maybe RulesetInfo)
, _pgsrgType :: !(Maybe Text)
, _pgsrgDatabaseChange :: !(Maybe DBUpdateSpec)
, _pgsrgTimestamp :: !(Maybe Text)
, _pgsrgDeviceDesc :: !(Maybe DeviceDescriptor)
, _pgsrgMaxTotalBwHz :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsGetSpectrumResponse
:: PawsGetSpectrumResponse
pawsGetSpectrumResponse =
PawsGetSpectrumResponse'
{ _pgsrgNeedsSpectrumReport = Nothing
, _pgsrgSpectrumSchedules = Nothing
, _pgsrgKind = "spectrum#pawsGetSpectrumResponse"
, _pgsrgMaxContiguousBwHz = Nothing
, _pgsrgVersion = Nothing
, _pgsrgRulesetInfo = Nothing
, _pgsrgType = Nothing
, _pgsrgDatabaseChange = Nothing
, _pgsrgTimestamp = Nothing
, _pgsrgDeviceDesc = Nothing
, _pgsrgMaxTotalBwHz = Nothing
}
pgsrgNeedsSpectrumReport :: Lens' PawsGetSpectrumResponse (Maybe Bool)
pgsrgNeedsSpectrumReport
= lens _pgsrgNeedsSpectrumReport
(\ s a -> s{_pgsrgNeedsSpectrumReport = a})
pgsrgSpectrumSchedules :: Lens' PawsGetSpectrumResponse [SpectrumSchedule]
pgsrgSpectrumSchedules
= lens _pgsrgSpectrumSchedules
(\ s a -> s{_pgsrgSpectrumSchedules = a})
. _Default
. _Coerce
pgsrgKind :: Lens' PawsGetSpectrumResponse Text
pgsrgKind
= lens _pgsrgKind (\ s a -> s{_pgsrgKind = a})
pgsrgMaxContiguousBwHz :: Lens' PawsGetSpectrumResponse (Maybe Double)
pgsrgMaxContiguousBwHz
= lens _pgsrgMaxContiguousBwHz
(\ s a -> s{_pgsrgMaxContiguousBwHz = a})
. mapping _Coerce
pgsrgVersion :: Lens' PawsGetSpectrumResponse (Maybe Text)
pgsrgVersion
= lens _pgsrgVersion (\ s a -> s{_pgsrgVersion = a})
pgsrgRulesetInfo :: Lens' PawsGetSpectrumResponse (Maybe RulesetInfo)
pgsrgRulesetInfo
= lens _pgsrgRulesetInfo
(\ s a -> s{_pgsrgRulesetInfo = a})
pgsrgType :: Lens' PawsGetSpectrumResponse (Maybe Text)
pgsrgType
= lens _pgsrgType (\ s a -> s{_pgsrgType = a})
pgsrgDatabaseChange :: Lens' PawsGetSpectrumResponse (Maybe DBUpdateSpec)
pgsrgDatabaseChange
= lens _pgsrgDatabaseChange
(\ s a -> s{_pgsrgDatabaseChange = a})
pgsrgTimestamp :: Lens' PawsGetSpectrumResponse (Maybe Text)
pgsrgTimestamp
= lens _pgsrgTimestamp
(\ s a -> s{_pgsrgTimestamp = a})
pgsrgDeviceDesc :: Lens' PawsGetSpectrumResponse (Maybe DeviceDescriptor)
pgsrgDeviceDesc
= lens _pgsrgDeviceDesc
(\ s a -> s{_pgsrgDeviceDesc = a})
pgsrgMaxTotalBwHz :: Lens' PawsGetSpectrumResponse (Maybe Double)
pgsrgMaxTotalBwHz
= lens _pgsrgMaxTotalBwHz
(\ s a -> s{_pgsrgMaxTotalBwHz = a})
. mapping _Coerce
instance FromJSON PawsGetSpectrumResponse where
parseJSON
= withObject "PawsGetSpectrumResponse"
(\ o ->
PawsGetSpectrumResponse' <$>
(o .:? "needsSpectrumReport") <*>
(o .:? "spectrumSchedules" .!= mempty)
<*>
(o .:? "kind" .!= "spectrum#pawsGetSpectrumResponse")
<*> (o .:? "maxContiguousBwHz")
<*> (o .:? "version")
<*> (o .:? "rulesetInfo")
<*> (o .:? "type")
<*> (o .:? "databaseChange")
<*> (o .:? "timestamp")
<*> (o .:? "deviceDesc")
<*> (o .:? "maxTotalBwHz"))
instance ToJSON PawsGetSpectrumResponse where
toJSON PawsGetSpectrumResponse'{..}
= object
(catMaybes
[("needsSpectrumReport" .=) <$>
_pgsrgNeedsSpectrumReport,
("spectrumSchedules" .=) <$> _pgsrgSpectrumSchedules,
Just ("kind" .= _pgsrgKind),
("maxContiguousBwHz" .=) <$> _pgsrgMaxContiguousBwHz,
("version" .=) <$> _pgsrgVersion,
("rulesetInfo" .=) <$> _pgsrgRulesetInfo,
("type" .=) <$> _pgsrgType,
("databaseChange" .=) <$> _pgsrgDatabaseChange,
("timestamp" .=) <$> _pgsrgTimestamp,
("deviceDesc" .=) <$> _pgsrgDeviceDesc,
("maxTotalBwHz" .=) <$> _pgsrgMaxTotalBwHz])
data PawsVerifyDeviceRequest =
PawsVerifyDeviceRequest'
{ _pvdrvVersion :: !(Maybe Text)
, _pvdrvDeviceDescs :: !(Maybe [DeviceDescriptor])
, _pvdrvType :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsVerifyDeviceRequest
:: PawsVerifyDeviceRequest
pawsVerifyDeviceRequest =
PawsVerifyDeviceRequest'
{_pvdrvVersion = Nothing, _pvdrvDeviceDescs = Nothing, _pvdrvType = Nothing}
pvdrvVersion :: Lens' PawsVerifyDeviceRequest (Maybe Text)
pvdrvVersion
= lens _pvdrvVersion (\ s a -> s{_pvdrvVersion = a})
pvdrvDeviceDescs :: Lens' PawsVerifyDeviceRequest [DeviceDescriptor]
pvdrvDeviceDescs
= lens _pvdrvDeviceDescs
(\ s a -> s{_pvdrvDeviceDescs = a})
. _Default
. _Coerce
pvdrvType :: Lens' PawsVerifyDeviceRequest (Maybe Text)
pvdrvType
= lens _pvdrvType (\ s a -> s{_pvdrvType = a})
instance FromJSON PawsVerifyDeviceRequest where
parseJSON
= withObject "PawsVerifyDeviceRequest"
(\ o ->
PawsVerifyDeviceRequest' <$>
(o .:? "version") <*>
(o .:? "deviceDescs" .!= mempty)
<*> (o .:? "type"))
instance ToJSON PawsVerifyDeviceRequest where
toJSON PawsVerifyDeviceRequest'{..}
= object
(catMaybes
[("version" .=) <$> _pvdrvVersion,
("deviceDescs" .=) <$> _pvdrvDeviceDescs,
("type" .=) <$> _pvdrvType])
data DeviceDescriptor =
DeviceDescriptor'
{ _ddEtsiEnDeviceEmissionsClass :: !(Maybe Text)
, _ddRulesetIds :: !(Maybe [Text])
, _ddModelId :: !(Maybe Text)
, _ddEtsiEnDeviceType :: !(Maybe Text)
, _ddEtsiEnTechnologyId :: !(Maybe Text)
, _ddFccId :: !(Maybe Text)
, _ddManufacturerId :: !(Maybe Text)
, _ddFccTvbdDeviceType :: !(Maybe Text)
, _ddEtsiEnDeviceCategory :: !(Maybe Text)
, _ddSerialNumber :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
deviceDescriptor
:: DeviceDescriptor
deviceDescriptor =
DeviceDescriptor'
{ _ddEtsiEnDeviceEmissionsClass = Nothing
, _ddRulesetIds = Nothing
, _ddModelId = Nothing
, _ddEtsiEnDeviceType = Nothing
, _ddEtsiEnTechnologyId = Nothing
, _ddFccId = Nothing
, _ddManufacturerId = Nothing
, _ddFccTvbdDeviceType = Nothing
, _ddEtsiEnDeviceCategory = Nothing
, _ddSerialNumber = Nothing
}
ddEtsiEnDeviceEmissionsClass :: Lens' DeviceDescriptor (Maybe Text)
ddEtsiEnDeviceEmissionsClass
= lens _ddEtsiEnDeviceEmissionsClass
(\ s a -> s{_ddEtsiEnDeviceEmissionsClass = a})
ddRulesetIds :: Lens' DeviceDescriptor [Text]
ddRulesetIds
= lens _ddRulesetIds (\ s a -> s{_ddRulesetIds = a})
. _Default
. _Coerce
ddModelId :: Lens' DeviceDescriptor (Maybe Text)
ddModelId
= lens _ddModelId (\ s a -> s{_ddModelId = a})
ddEtsiEnDeviceType :: Lens' DeviceDescriptor (Maybe Text)
ddEtsiEnDeviceType
= lens _ddEtsiEnDeviceType
(\ s a -> s{_ddEtsiEnDeviceType = a})
ddEtsiEnTechnologyId :: Lens' DeviceDescriptor (Maybe Text)
ddEtsiEnTechnologyId
= lens _ddEtsiEnTechnologyId
(\ s a -> s{_ddEtsiEnTechnologyId = a})
ddFccId :: Lens' DeviceDescriptor (Maybe Text)
ddFccId = lens _ddFccId (\ s a -> s{_ddFccId = a})
ddManufacturerId :: Lens' DeviceDescriptor (Maybe Text)
ddManufacturerId
= lens _ddManufacturerId
(\ s a -> s{_ddManufacturerId = a})
ddFccTvbdDeviceType :: Lens' DeviceDescriptor (Maybe Text)
ddFccTvbdDeviceType
= lens _ddFccTvbdDeviceType
(\ s a -> s{_ddFccTvbdDeviceType = a})
ddEtsiEnDeviceCategory :: Lens' DeviceDescriptor (Maybe Text)
ddEtsiEnDeviceCategory
= lens _ddEtsiEnDeviceCategory
(\ s a -> s{_ddEtsiEnDeviceCategory = a})
ddSerialNumber :: Lens' DeviceDescriptor (Maybe Text)
ddSerialNumber
= lens _ddSerialNumber
(\ s a -> s{_ddSerialNumber = a})
instance FromJSON DeviceDescriptor where
parseJSON
= withObject "DeviceDescriptor"
(\ o ->
DeviceDescriptor' <$>
(o .:? "etsiEnDeviceEmissionsClass") <*>
(o .:? "rulesetIds" .!= mempty)
<*> (o .:? "modelId")
<*> (o .:? "etsiEnDeviceType")
<*> (o .:? "etsiEnTechnologyId")
<*> (o .:? "fccId")
<*> (o .:? "manufacturerId")
<*> (o .:? "fccTvbdDeviceType")
<*> (o .:? "etsiEnDeviceCategory")
<*> (o .:? "serialNumber"))
instance ToJSON DeviceDescriptor where
toJSON DeviceDescriptor'{..}
= object
(catMaybes
[("etsiEnDeviceEmissionsClass" .=) <$>
_ddEtsiEnDeviceEmissionsClass,
("rulesetIds" .=) <$> _ddRulesetIds,
("modelId" .=) <$> _ddModelId,
("etsiEnDeviceType" .=) <$> _ddEtsiEnDeviceType,
("etsiEnTechnologyId" .=) <$> _ddEtsiEnTechnologyId,
("fccId" .=) <$> _ddFccId,
("manufacturerId" .=) <$> _ddManufacturerId,
("fccTvbdDeviceType" .=) <$> _ddFccTvbdDeviceType,
("etsiEnDeviceCategory" .=) <$>
_ddEtsiEnDeviceCategory,
("serialNumber" .=) <$> _ddSerialNumber])
data PawsInitRequest =
PawsInitRequest'
{ _piriLocation :: !(Maybe GeoLocation)
, _piriVersion :: !(Maybe Text)
, _piriType :: !(Maybe Text)
, _piriDeviceDesc :: !(Maybe DeviceDescriptor)
}
deriving (Eq, Show, Data, Typeable, Generic)
pawsInitRequest
:: PawsInitRequest
pawsInitRequest =
PawsInitRequest'
{ _piriLocation = Nothing
, _piriVersion = Nothing
, _piriType = Nothing
, _piriDeviceDesc = Nothing
}
piriLocation :: Lens' PawsInitRequest (Maybe GeoLocation)
piriLocation
= lens _piriLocation (\ s a -> s{_piriLocation = a})
piriVersion :: Lens' PawsInitRequest (Maybe Text)
piriVersion
= lens _piriVersion (\ s a -> s{_piriVersion = a})
piriType :: Lens' PawsInitRequest (Maybe Text)
piriType = lens _piriType (\ s a -> s{_piriType = a})
piriDeviceDesc :: Lens' PawsInitRequest (Maybe DeviceDescriptor)
piriDeviceDesc
= lens _piriDeviceDesc
(\ s a -> s{_piriDeviceDesc = a})
instance FromJSON PawsInitRequest where
parseJSON
= withObject "PawsInitRequest"
(\ o ->
PawsInitRequest' <$>
(o .:? "location") <*> (o .:? "version") <*>
(o .:? "type")
<*> (o .:? "deviceDesc"))
instance ToJSON PawsInitRequest where
toJSON PawsInitRequest'{..}
= object
(catMaybes
[("location" .=) <$> _piriLocation,
("version" .=) <$> _piriVersion,
("type" .=) <$> _piriType,
("deviceDesc" .=) <$> _piriDeviceDesc])
newtype DeviceCapabilities =
DeviceCapabilities'
{ _dcFrequencyRanges :: Maybe [FrequencyRange]
}
deriving (Eq, Show, Data, Typeable, Generic)
deviceCapabilities
:: DeviceCapabilities
deviceCapabilities = DeviceCapabilities' {_dcFrequencyRanges = Nothing}
dcFrequencyRanges :: Lens' DeviceCapabilities [FrequencyRange]
dcFrequencyRanges
= lens _dcFrequencyRanges
(\ s a -> s{_dcFrequencyRanges = a})
. _Default
. _Coerce
instance FromJSON DeviceCapabilities where
parseJSON
= withObject "DeviceCapabilities"
(\ o ->
DeviceCapabilities' <$>
(o .:? "frequencyRanges" .!= mempty))
instance ToJSON DeviceCapabilities where
toJSON DeviceCapabilities'{..}
= object
(catMaybes
[("frequencyRanges" .=) <$> _dcFrequencyRanges])