{-# 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.AndroidDeviceProvisioning.Types.Product where
import Network.Google.AndroidDeviceProvisioning.Types.Sum
import Network.Google.Prelude
data UpdateMetadataArguments = UpdateMetadataArguments'
{ _umaDeviceIdentifier :: !(Maybe DeviceIdentifier)
, _umaDeviceId :: !(Maybe (Textual Int64))
, _umaDeviceMetadata :: !(Maybe DeviceMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
updateMetadataArguments
:: UpdateMetadataArguments
updateMetadataArguments =
UpdateMetadataArguments'
{ _umaDeviceIdentifier = Nothing
, _umaDeviceId = Nothing
, _umaDeviceMetadata = Nothing
}
umaDeviceIdentifier :: Lens' UpdateMetadataArguments (Maybe DeviceIdentifier)
umaDeviceIdentifier
= lens _umaDeviceIdentifier
(\ s a -> s{_umaDeviceIdentifier = a})
umaDeviceId :: Lens' UpdateMetadataArguments (Maybe Int64)
umaDeviceId
= lens _umaDeviceId (\ s a -> s{_umaDeviceId = a}) .
mapping _Coerce
umaDeviceMetadata :: Lens' UpdateMetadataArguments (Maybe DeviceMetadata)
umaDeviceMetadata
= lens _umaDeviceMetadata
(\ s a -> s{_umaDeviceMetadata = a})
instance FromJSON UpdateMetadataArguments where
parseJSON
= withObject "UpdateMetadataArguments"
(\ o ->
UpdateMetadataArguments' <$>
(o .:? "deviceIdentifier") <*> (o .:? "deviceId") <*>
(o .:? "deviceMetadata"))
instance ToJSON UpdateMetadataArguments where
toJSON UpdateMetadataArguments'{..}
= object
(catMaybes
[("deviceIdentifier" .=) <$> _umaDeviceIdentifier,
("deviceId" .=) <$> _umaDeviceId,
("deviceMetadata" .=) <$> _umaDeviceMetadata])
data Status = Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
status
:: Status
status =
Status'
{ _sDetails = Nothing
, _sCode = Nothing
, _sMessage = Nothing
}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
data PartnerClaim = PartnerClaim'
{ _pcDeviceIdentifier :: !(Maybe DeviceIdentifier)
, _pcSectionType :: !(Maybe PartnerClaimSectionType)
, _pcCustomerId :: !(Maybe (Textual Int64))
, _pcDeviceMetadata :: !(Maybe DeviceMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
partnerClaim
:: PartnerClaim
partnerClaim =
PartnerClaim'
{ _pcDeviceIdentifier = Nothing
, _pcSectionType = Nothing
, _pcCustomerId = Nothing
, _pcDeviceMetadata = Nothing
}
pcDeviceIdentifier :: Lens' PartnerClaim (Maybe DeviceIdentifier)
pcDeviceIdentifier
= lens _pcDeviceIdentifier
(\ s a -> s{_pcDeviceIdentifier = a})
pcSectionType :: Lens' PartnerClaim (Maybe PartnerClaimSectionType)
pcSectionType
= lens _pcSectionType
(\ s a -> s{_pcSectionType = a})
pcCustomerId :: Lens' PartnerClaim (Maybe Int64)
pcCustomerId
= lens _pcCustomerId (\ s a -> s{_pcCustomerId = a})
. mapping _Coerce
pcDeviceMetadata :: Lens' PartnerClaim (Maybe DeviceMetadata)
pcDeviceMetadata
= lens _pcDeviceMetadata
(\ s a -> s{_pcDeviceMetadata = a})
instance FromJSON PartnerClaim where
parseJSON
= withObject "PartnerClaim"
(\ o ->
PartnerClaim' <$>
(o .:? "deviceIdentifier") <*> (o .:? "sectionType")
<*> (o .:? "customerId")
<*> (o .:? "deviceMetadata"))
instance ToJSON PartnerClaim where
toJSON PartnerClaim'{..}
= object
(catMaybes
[("deviceIdentifier" .=) <$> _pcDeviceIdentifier,
("sectionType" .=) <$> _pcSectionType,
("customerId" .=) <$> _pcCustomerId,
("deviceMetadata" .=) <$> _pcDeviceMetadata])
newtype CustomerUnclaimDeviceRequest = CustomerUnclaimDeviceRequest'
{ _cudrDevice :: Maybe DeviceReference
} deriving (Eq,Show,Data,Typeable,Generic)
customerUnclaimDeviceRequest
:: CustomerUnclaimDeviceRequest
customerUnclaimDeviceRequest =
CustomerUnclaimDeviceRequest'
{ _cudrDevice = Nothing
}
cudrDevice :: Lens' CustomerUnclaimDeviceRequest (Maybe DeviceReference)
cudrDevice
= lens _cudrDevice (\ s a -> s{_cudrDevice = a})
instance FromJSON CustomerUnclaimDeviceRequest where
parseJSON
= withObject "CustomerUnclaimDeviceRequest"
(\ o ->
CustomerUnclaimDeviceRequest' <$> (o .:? "device"))
instance ToJSON CustomerUnclaimDeviceRequest where
toJSON CustomerUnclaimDeviceRequest'{..}
= object (catMaybes [("device" .=) <$> _cudrDevice])
data FindDevicesByDeviceIdentifierRequest = FindDevicesByDeviceIdentifierRequest'
{ _fdbdirDeviceIdentifier :: !(Maybe DeviceIdentifier)
, _fdbdirLimit :: !(Maybe (Textual Int64))
, _fdbdirPageToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
findDevicesByDeviceIdentifierRequest
:: FindDevicesByDeviceIdentifierRequest
findDevicesByDeviceIdentifierRequest =
FindDevicesByDeviceIdentifierRequest'
{ _fdbdirDeviceIdentifier = Nothing
, _fdbdirLimit = Nothing
, _fdbdirPageToken = Nothing
}
fdbdirDeviceIdentifier :: Lens' FindDevicesByDeviceIdentifierRequest (Maybe DeviceIdentifier)
fdbdirDeviceIdentifier
= lens _fdbdirDeviceIdentifier
(\ s a -> s{_fdbdirDeviceIdentifier = a})
fdbdirLimit :: Lens' FindDevicesByDeviceIdentifierRequest (Maybe Int64)
fdbdirLimit
= lens _fdbdirLimit (\ s a -> s{_fdbdirLimit = a}) .
mapping _Coerce
fdbdirPageToken :: Lens' FindDevicesByDeviceIdentifierRequest (Maybe Text)
fdbdirPageToken
= lens _fdbdirPageToken
(\ s a -> s{_fdbdirPageToken = a})
instance FromJSON
FindDevicesByDeviceIdentifierRequest where
parseJSON
= withObject "FindDevicesByDeviceIdentifierRequest"
(\ o ->
FindDevicesByDeviceIdentifierRequest' <$>
(o .:? "deviceIdentifier") <*> (o .:? "limit") <*>
(o .:? "pageToken"))
instance ToJSON FindDevicesByDeviceIdentifierRequest
where
toJSON FindDevicesByDeviceIdentifierRequest'{..}
= object
(catMaybes
[("deviceIdentifier" .=) <$> _fdbdirDeviceIdentifier,
("limit" .=) <$> _fdbdirLimit,
("pageToken" .=) <$> _fdbdirPageToken])
data FindDevicesByOwnerResponse = FindDevicesByOwnerResponse'
{ _fdborNextPageToken :: !(Maybe Text)
, _fdborTotalSize :: !(Maybe (Textual Int32))
, _fdborDevices :: !(Maybe [Device])
} deriving (Eq,Show,Data,Typeable,Generic)
findDevicesByOwnerResponse
:: FindDevicesByOwnerResponse
findDevicesByOwnerResponse =
FindDevicesByOwnerResponse'
{ _fdborNextPageToken = Nothing
, _fdborTotalSize = Nothing
, _fdborDevices = Nothing
}
fdborNextPageToken :: Lens' FindDevicesByOwnerResponse (Maybe Text)
fdborNextPageToken
= lens _fdborNextPageToken
(\ s a -> s{_fdborNextPageToken = a})
fdborTotalSize :: Lens' FindDevicesByOwnerResponse (Maybe Int32)
fdborTotalSize
= lens _fdborTotalSize
(\ s a -> s{_fdborTotalSize = a})
. mapping _Coerce
fdborDevices :: Lens' FindDevicesByOwnerResponse [Device]
fdborDevices
= lens _fdborDevices (\ s a -> s{_fdborDevices = a})
. _Default
. _Coerce
instance FromJSON FindDevicesByOwnerResponse where
parseJSON
= withObject "FindDevicesByOwnerResponse"
(\ o ->
FindDevicesByOwnerResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "totalSize") <*>
(o .:? "devices" .!= mempty))
instance ToJSON FindDevicesByOwnerResponse where
toJSON FindDevicesByOwnerResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _fdborNextPageToken,
("totalSize" .=) <$> _fdborTotalSize,
("devices" .=) <$> _fdborDevices])
newtype DeviceMetadataEntries = DeviceMetadataEntries'
{ _dmeAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
deviceMetadataEntries
:: HashMap Text Text
-> DeviceMetadataEntries
deviceMetadataEntries pDmeAddtional_ =
DeviceMetadataEntries'
{ _dmeAddtional = _Coerce # pDmeAddtional_
}
dmeAddtional :: Lens' DeviceMetadataEntries (HashMap Text Text)
dmeAddtional
= lens _dmeAddtional (\ s a -> s{_dmeAddtional = a})
. _Coerce
instance FromJSON DeviceMetadataEntries where
parseJSON
= withObject "DeviceMetadataEntries"
(\ o ->
DeviceMetadataEntries' <$> (parseJSONObject o))
instance ToJSON DeviceMetadataEntries where
toJSON = toJSON . _dmeAddtional
data PartnerUnclaim = PartnerUnclaim'
{ _puDeviceIdentifier :: !(Maybe DeviceIdentifier)
, _puSectionType :: !(Maybe PartnerUnclaimSectionType)
, _puDeviceId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
partnerUnclaim
:: PartnerUnclaim
partnerUnclaim =
PartnerUnclaim'
{ _puDeviceIdentifier = Nothing
, _puSectionType = Nothing
, _puDeviceId = Nothing
}
puDeviceIdentifier :: Lens' PartnerUnclaim (Maybe DeviceIdentifier)
puDeviceIdentifier
= lens _puDeviceIdentifier
(\ s a -> s{_puDeviceIdentifier = a})
puSectionType :: Lens' PartnerUnclaim (Maybe PartnerUnclaimSectionType)
puSectionType
= lens _puSectionType
(\ s a -> s{_puSectionType = a})
puDeviceId :: Lens' PartnerUnclaim (Maybe Int64)
puDeviceId
= lens _puDeviceId (\ s a -> s{_puDeviceId = a}) .
mapping _Coerce
instance FromJSON PartnerUnclaim where
parseJSON
= withObject "PartnerUnclaim"
(\ o ->
PartnerUnclaim' <$>
(o .:? "deviceIdentifier") <*> (o .:? "sectionType")
<*> (o .:? "deviceId"))
instance ToJSON PartnerUnclaim where
toJSON PartnerUnclaim'{..}
= object
(catMaybes
[("deviceIdentifier" .=) <$> _puDeviceIdentifier,
("sectionType" .=) <$> _puSectionType,
("deviceId" .=) <$> _puDeviceId])
data Dpc = Dpc'
{ _dPackageName :: !(Maybe Text)
, _dName :: !(Maybe Text)
, _dDpcName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dpc
:: Dpc
dpc =
Dpc'
{ _dPackageName = Nothing
, _dName = Nothing
, _dDpcName = Nothing
}
dPackageName :: Lens' Dpc (Maybe Text)
dPackageName
= lens _dPackageName (\ s a -> s{_dPackageName = a})
dName :: Lens' Dpc (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})
dDpcName :: Lens' Dpc (Maybe Text)
dDpcName = lens _dDpcName (\ s a -> s{_dDpcName = a})
instance FromJSON Dpc where
parseJSON
= withObject "Dpc"
(\ o ->
Dpc' <$>
(o .:? "packageName") <*> (o .:? "name") <*>
(o .:? "dpcName"))
instance ToJSON Dpc where
toJSON Dpc'{..}
= object
(catMaybes
[("packageName" .=) <$> _dPackageName,
("name" .=) <$> _dName,
("dpcName" .=) <$> _dDpcName])
data ListVendorCustomersResponse = ListVendorCustomersResponse'
{ _lvcrCustomers :: !(Maybe [Company])
, _lvcrNextPageToken :: !(Maybe Text)
, _lvcrTotalSize :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
listVendorCustomersResponse
:: ListVendorCustomersResponse
listVendorCustomersResponse =
ListVendorCustomersResponse'
{ _lvcrCustomers = Nothing
, _lvcrNextPageToken = Nothing
, _lvcrTotalSize = Nothing
}
lvcrCustomers :: Lens' ListVendorCustomersResponse [Company]
lvcrCustomers
= lens _lvcrCustomers
(\ s a -> s{_lvcrCustomers = a})
. _Default
. _Coerce
lvcrNextPageToken :: Lens' ListVendorCustomersResponse (Maybe Text)
lvcrNextPageToken
= lens _lvcrNextPageToken
(\ s a -> s{_lvcrNextPageToken = a})
lvcrTotalSize :: Lens' ListVendorCustomersResponse (Maybe Int32)
lvcrTotalSize
= lens _lvcrTotalSize
(\ s a -> s{_lvcrTotalSize = a})
. mapping _Coerce
instance FromJSON ListVendorCustomersResponse where
parseJSON
= withObject "ListVendorCustomersResponse"
(\ o ->
ListVendorCustomersResponse' <$>
(o .:? "customers" .!= mempty) <*>
(o .:? "nextPageToken")
<*> (o .:? "totalSize"))
instance ToJSON ListVendorCustomersResponse where
toJSON ListVendorCustomersResponse'{..}
= object
(catMaybes
[("customers" .=) <$> _lvcrCustomers,
("nextPageToken" .=) <$> _lvcrNextPageToken,
("totalSize" .=) <$> _lvcrTotalSize])
data OperationPerDevice = OperationPerDevice'
{ _opdUpdateMetadata :: !(Maybe UpdateMetadataArguments)
, _opdResult :: !(Maybe PerDeviceStatusInBatch)
, _opdClaim :: !(Maybe PartnerClaim)
, _opdUnclaim :: !(Maybe PartnerUnclaim)
} deriving (Eq,Show,Data,Typeable,Generic)
operationPerDevice
:: OperationPerDevice
operationPerDevice =
OperationPerDevice'
{ _opdUpdateMetadata = Nothing
, _opdResult = Nothing
, _opdClaim = Nothing
, _opdUnclaim = Nothing
}
opdUpdateMetadata :: Lens' OperationPerDevice (Maybe UpdateMetadataArguments)
opdUpdateMetadata
= lens _opdUpdateMetadata
(\ s a -> s{_opdUpdateMetadata = a})
opdResult :: Lens' OperationPerDevice (Maybe PerDeviceStatusInBatch)
opdResult
= lens _opdResult (\ s a -> s{_opdResult = a})
opdClaim :: Lens' OperationPerDevice (Maybe PartnerClaim)
opdClaim = lens _opdClaim (\ s a -> s{_opdClaim = a})
opdUnclaim :: Lens' OperationPerDevice (Maybe PartnerUnclaim)
opdUnclaim
= lens _opdUnclaim (\ s a -> s{_opdUnclaim = a})
instance FromJSON OperationPerDevice where
parseJSON
= withObject "OperationPerDevice"
(\ o ->
OperationPerDevice' <$>
(o .:? "updateMetadata") <*> (o .:? "result") <*>
(o .:? "claim")
<*> (o .:? "unclaim"))
instance ToJSON OperationPerDevice where
toJSON OperationPerDevice'{..}
= object
(catMaybes
[("updateMetadata" .=) <$> _opdUpdateMetadata,
("result" .=) <$> _opdResult,
("claim" .=) <$> _opdClaim,
("unclaim" .=) <$> _opdUnclaim])
data Operation = Operation'
{ _oDone :: !(Maybe Bool)
, _oError :: !(Maybe Status)
, _oResponse :: !(Maybe OperationResponse)
, _oName :: !(Maybe Text)
, _oMetadata :: !(Maybe OperationMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oDone = Nothing
, _oError = Nothing
, _oResponse = Nothing
, _oName = Nothing
, _oMetadata = Nothing
}
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a})
oError :: Lens' Operation (Maybe Status)
oError = lens _oError (\ s a -> s{_oError = a})
oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oMetadata :: Lens' Operation (Maybe OperationMetadata)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("done" .=) <$> _oDone, ("error" .=) <$> _oError,
("response" .=) <$> _oResponse,
("name" .=) <$> _oName,
("metadata" .=) <$> _oMetadata])
data Empty =
Empty'
deriving (Eq,Show,Data,Typeable,Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
data PerDeviceStatusInBatch = PerDeviceStatusInBatch'
{ _pdsibStatus :: !(Maybe PerDeviceStatusInBatchStatus)
, _pdsibErrorIdentifier :: !(Maybe Text)
, _pdsibDeviceId :: !(Maybe (Textual Int64))
, _pdsibErrorMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
perDeviceStatusInBatch
:: PerDeviceStatusInBatch
perDeviceStatusInBatch =
PerDeviceStatusInBatch'
{ _pdsibStatus = Nothing
, _pdsibErrorIdentifier = Nothing
, _pdsibDeviceId = Nothing
, _pdsibErrorMessage = Nothing
}
pdsibStatus :: Lens' PerDeviceStatusInBatch (Maybe PerDeviceStatusInBatchStatus)
pdsibStatus
= lens _pdsibStatus (\ s a -> s{_pdsibStatus = a})
pdsibErrorIdentifier :: Lens' PerDeviceStatusInBatch (Maybe Text)
pdsibErrorIdentifier
= lens _pdsibErrorIdentifier
(\ s a -> s{_pdsibErrorIdentifier = a})
pdsibDeviceId :: Lens' PerDeviceStatusInBatch (Maybe Int64)
pdsibDeviceId
= lens _pdsibDeviceId
(\ s a -> s{_pdsibDeviceId = a})
. mapping _Coerce
pdsibErrorMessage :: Lens' PerDeviceStatusInBatch (Maybe Text)
pdsibErrorMessage
= lens _pdsibErrorMessage
(\ s a -> s{_pdsibErrorMessage = a})
instance FromJSON PerDeviceStatusInBatch where
parseJSON
= withObject "PerDeviceStatusInBatch"
(\ o ->
PerDeviceStatusInBatch' <$>
(o .:? "status") <*> (o .:? "errorIdentifier") <*>
(o .:? "deviceId")
<*> (o .:? "errorMessage"))
instance ToJSON PerDeviceStatusInBatch where
toJSON PerDeviceStatusInBatch'{..}
= object
(catMaybes
[("status" .=) <$> _pdsibStatus,
("errorIdentifier" .=) <$> _pdsibErrorIdentifier,
("deviceId" .=) <$> _pdsibDeviceId,
("errorMessage" .=) <$> _pdsibErrorMessage])
newtype ClaimDevicesRequest = ClaimDevicesRequest'
{ _cdrClaims :: Maybe [PartnerClaim]
} deriving (Eq,Show,Data,Typeable,Generic)
claimDevicesRequest
:: ClaimDevicesRequest
claimDevicesRequest =
ClaimDevicesRequest'
{ _cdrClaims = Nothing
}
cdrClaims :: Lens' ClaimDevicesRequest [PartnerClaim]
cdrClaims
= lens _cdrClaims (\ s a -> s{_cdrClaims = a}) .
_Default
. _Coerce
instance FromJSON ClaimDevicesRequest where
parseJSON
= withObject "ClaimDevicesRequest"
(\ o ->
ClaimDevicesRequest' <$> (o .:? "claims" .!= mempty))
instance ToJSON ClaimDevicesRequest where
toJSON ClaimDevicesRequest'{..}
= object (catMaybes [("claims" .=) <$> _cdrClaims])
data Device = Device'
{ _devDeviceIdentifier :: !(Maybe DeviceIdentifier)
, _devClaims :: !(Maybe [DeviceClaim])
, _devName :: !(Maybe Text)
, _devDeviceId :: !(Maybe (Textual Int64))
, _devDeviceMetadata :: !(Maybe DeviceMetadata)
, _devConfiguration :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
device
:: Device
device =
Device'
{ _devDeviceIdentifier = Nothing
, _devClaims = Nothing
, _devName = Nothing
, _devDeviceId = Nothing
, _devDeviceMetadata = Nothing
, _devConfiguration = Nothing
}
devDeviceIdentifier :: Lens' Device (Maybe DeviceIdentifier)
devDeviceIdentifier
= lens _devDeviceIdentifier
(\ s a -> s{_devDeviceIdentifier = a})
devClaims :: Lens' Device [DeviceClaim]
devClaims
= lens _devClaims (\ s a -> s{_devClaims = a}) .
_Default
. _Coerce
devName :: Lens' Device (Maybe Text)
devName = lens _devName (\ s a -> s{_devName = a})
devDeviceId :: Lens' Device (Maybe Int64)
devDeviceId
= lens _devDeviceId (\ s a -> s{_devDeviceId = a}) .
mapping _Coerce
devDeviceMetadata :: Lens' Device (Maybe DeviceMetadata)
devDeviceMetadata
= lens _devDeviceMetadata
(\ s a -> s{_devDeviceMetadata = a})
devConfiguration :: Lens' Device (Maybe Text)
devConfiguration
= lens _devConfiguration
(\ s a -> s{_devConfiguration = a})
instance FromJSON Device where
parseJSON
= withObject "Device"
(\ o ->
Device' <$>
(o .:? "deviceIdentifier") <*>
(o .:? "claims" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "deviceId")
<*> (o .:? "deviceMetadata")
<*> (o .:? "configuration"))
instance ToJSON Device where
toJSON Device'{..}
= object
(catMaybes
[("deviceIdentifier" .=) <$> _devDeviceIdentifier,
("claims" .=) <$> _devClaims,
("name" .=) <$> _devName,
("deviceId" .=) <$> _devDeviceId,
("deviceMetadata" .=) <$> _devDeviceMetadata,
("configuration" .=) <$> _devConfiguration])
data ClaimDeviceRequest = ClaimDeviceRequest'
{ _cdrDeviceIdentifier :: !(Maybe DeviceIdentifier)
, _cdrSectionType :: !(Maybe ClaimDeviceRequestSectionType)
, _cdrCustomerId :: !(Maybe (Textual Int64))
, _cdrDeviceMetadata :: !(Maybe DeviceMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
claimDeviceRequest
:: ClaimDeviceRequest
claimDeviceRequest =
ClaimDeviceRequest'
{ _cdrDeviceIdentifier = Nothing
, _cdrSectionType = Nothing
, _cdrCustomerId = Nothing
, _cdrDeviceMetadata = Nothing
}
cdrDeviceIdentifier :: Lens' ClaimDeviceRequest (Maybe DeviceIdentifier)
cdrDeviceIdentifier
= lens _cdrDeviceIdentifier
(\ s a -> s{_cdrDeviceIdentifier = a})
cdrSectionType :: Lens' ClaimDeviceRequest (Maybe ClaimDeviceRequestSectionType)
cdrSectionType
= lens _cdrSectionType
(\ s a -> s{_cdrSectionType = a})
cdrCustomerId :: Lens' ClaimDeviceRequest (Maybe Int64)
cdrCustomerId
= lens _cdrCustomerId
(\ s a -> s{_cdrCustomerId = a})
. mapping _Coerce
cdrDeviceMetadata :: Lens' ClaimDeviceRequest (Maybe DeviceMetadata)
cdrDeviceMetadata
= lens _cdrDeviceMetadata
(\ s a -> s{_cdrDeviceMetadata = a})
instance FromJSON ClaimDeviceRequest where
parseJSON
= withObject "ClaimDeviceRequest"
(\ o ->
ClaimDeviceRequest' <$>
(o .:? "deviceIdentifier") <*> (o .:? "sectionType")
<*> (o .:? "customerId")
<*> (o .:? "deviceMetadata"))
instance ToJSON ClaimDeviceRequest where
toJSON ClaimDeviceRequest'{..}
= object
(catMaybes
[("deviceIdentifier" .=) <$> _cdrDeviceIdentifier,
("sectionType" .=) <$> _cdrSectionType,
("customerId" .=) <$> _cdrCustomerId,
("deviceMetadata" .=) <$> _cdrDeviceMetadata])
data DeviceReference = DeviceReference'
{ _drDeviceIdentifier :: !(Maybe DeviceIdentifier)
, _drDeviceId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
deviceReference
:: DeviceReference
deviceReference =
DeviceReference'
{ _drDeviceIdentifier = Nothing
, _drDeviceId = Nothing
}
drDeviceIdentifier :: Lens' DeviceReference (Maybe DeviceIdentifier)
drDeviceIdentifier
= lens _drDeviceIdentifier
(\ s a -> s{_drDeviceIdentifier = a})
drDeviceId :: Lens' DeviceReference (Maybe Int64)
drDeviceId
= lens _drDeviceId (\ s a -> s{_drDeviceId = a}) .
mapping _Coerce
instance FromJSON DeviceReference where
parseJSON
= withObject "DeviceReference"
(\ o ->
DeviceReference' <$>
(o .:? "deviceIdentifier") <*> (o .:? "deviceId"))
instance ToJSON DeviceReference where
toJSON DeviceReference'{..}
= object
(catMaybes
[("deviceIdentifier" .=) <$> _drDeviceIdentifier,
("deviceId" .=) <$> _drDeviceId])
newtype CustomerRemoveConfigurationRequest = CustomerRemoveConfigurationRequest'
{ _crcrDevice :: Maybe DeviceReference
} deriving (Eq,Show,Data,Typeable,Generic)
customerRemoveConfigurationRequest
:: CustomerRemoveConfigurationRequest
customerRemoveConfigurationRequest =
CustomerRemoveConfigurationRequest'
{ _crcrDevice = Nothing
}
crcrDevice :: Lens' CustomerRemoveConfigurationRequest (Maybe DeviceReference)
crcrDevice
= lens _crcrDevice (\ s a -> s{_crcrDevice = a})
instance FromJSON CustomerRemoveConfigurationRequest
where
parseJSON
= withObject "CustomerRemoveConfigurationRequest"
(\ o ->
CustomerRemoveConfigurationRequest' <$>
(o .:? "device"))
instance ToJSON CustomerRemoveConfigurationRequest
where
toJSON CustomerRemoveConfigurationRequest'{..}
= object (catMaybes [("device" .=) <$> _crcrDevice])
data DeviceIdentifier = DeviceIdentifier'
{ _diManufacturer :: !(Maybe Text)
, _diModel :: !(Maybe Text)
, _diMeid :: !(Maybe Text)
, _diImei :: !(Maybe Text)
, _diSerialNumber :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
deviceIdentifier
:: DeviceIdentifier
deviceIdentifier =
DeviceIdentifier'
{ _diManufacturer = Nothing
, _diModel = Nothing
, _diMeid = Nothing
, _diImei = Nothing
, _diSerialNumber = Nothing
}
diManufacturer :: Lens' DeviceIdentifier (Maybe Text)
diManufacturer
= lens _diManufacturer
(\ s a -> s{_diManufacturer = a})
diModel :: Lens' DeviceIdentifier (Maybe Text)
diModel = lens _diModel (\ s a -> s{_diModel = a})
diMeid :: Lens' DeviceIdentifier (Maybe Text)
diMeid = lens _diMeid (\ s a -> s{_diMeid = a})
diImei :: Lens' DeviceIdentifier (Maybe Text)
diImei = lens _diImei (\ s a -> s{_diImei = a})
diSerialNumber :: Lens' DeviceIdentifier (Maybe Text)
diSerialNumber
= lens _diSerialNumber
(\ s a -> s{_diSerialNumber = a})
instance FromJSON DeviceIdentifier where
parseJSON
= withObject "DeviceIdentifier"
(\ o ->
DeviceIdentifier' <$>
(o .:? "manufacturer") <*> (o .:? "model") <*>
(o .:? "meid")
<*> (o .:? "imei")
<*> (o .:? "serialNumber"))
instance ToJSON DeviceIdentifier where
toJSON DeviceIdentifier'{..}
= object
(catMaybes
[("manufacturer" .=) <$> _diManufacturer,
("model" .=) <$> _diModel, ("meid" .=) <$> _diMeid,
("imei" .=) <$> _diImei,
("serialNumber" .=) <$> _diSerialNumber])
newtype UnclaimDevicesRequest = UnclaimDevicesRequest'
{ _udrUnclaims :: Maybe [PartnerUnclaim]
} deriving (Eq,Show,Data,Typeable,Generic)
unclaimDevicesRequest
:: UnclaimDevicesRequest
unclaimDevicesRequest =
UnclaimDevicesRequest'
{ _udrUnclaims = Nothing
}
udrUnclaims :: Lens' UnclaimDevicesRequest [PartnerUnclaim]
udrUnclaims
= lens _udrUnclaims (\ s a -> s{_udrUnclaims = a}) .
_Default
. _Coerce
instance FromJSON UnclaimDevicesRequest where
parseJSON
= withObject "UnclaimDevicesRequest"
(\ o ->
UnclaimDevicesRequest' <$>
(o .:? "unclaims" .!= mempty))
instance ToJSON UnclaimDevicesRequest where
toJSON UnclaimDevicesRequest'{..}
= object
(catMaybes [("unclaims" .=) <$> _udrUnclaims])
newtype StatusDetailsItem = StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem'
{ _sdiAddtional = _Coerce # pSdiAddtional_
}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data ListVendorsResponse = ListVendorsResponse'
{ _lvrNextPageToken :: !(Maybe Text)
, _lvrTotalSize :: !(Maybe (Textual Int32))
, _lvrVendors :: !(Maybe [Company])
} deriving (Eq,Show,Data,Typeable,Generic)
listVendorsResponse
:: ListVendorsResponse
listVendorsResponse =
ListVendorsResponse'
{ _lvrNextPageToken = Nothing
, _lvrTotalSize = Nothing
, _lvrVendors = Nothing
}
lvrNextPageToken :: Lens' ListVendorsResponse (Maybe Text)
lvrNextPageToken
= lens _lvrNextPageToken
(\ s a -> s{_lvrNextPageToken = a})
lvrTotalSize :: Lens' ListVendorsResponse (Maybe Int32)
lvrTotalSize
= lens _lvrTotalSize (\ s a -> s{_lvrTotalSize = a})
. mapping _Coerce
lvrVendors :: Lens' ListVendorsResponse [Company]
lvrVendors
= lens _lvrVendors (\ s a -> s{_lvrVendors = a}) .
_Default
. _Coerce
instance FromJSON ListVendorsResponse where
parseJSON
= withObject "ListVendorsResponse"
(\ o ->
ListVendorsResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "totalSize") <*>
(o .:? "vendors" .!= mempty))
instance ToJSON ListVendorsResponse where
toJSON ListVendorsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lvrNextPageToken,
("totalSize" .=) <$> _lvrTotalSize,
("vendors" .=) <$> _lvrVendors])
newtype CustomerListConfigurationsResponse = CustomerListConfigurationsResponse'
{ _clcrConfigurations :: Maybe [Configuration]
} deriving (Eq,Show,Data,Typeable,Generic)
customerListConfigurationsResponse
:: CustomerListConfigurationsResponse
customerListConfigurationsResponse =
CustomerListConfigurationsResponse'
{ _clcrConfigurations = Nothing
}
clcrConfigurations :: Lens' CustomerListConfigurationsResponse [Configuration]
clcrConfigurations
= lens _clcrConfigurations
(\ s a -> s{_clcrConfigurations = a})
. _Default
. _Coerce
instance FromJSON CustomerListConfigurationsResponse
where
parseJSON
= withObject "CustomerListConfigurationsResponse"
(\ o ->
CustomerListConfigurationsResponse' <$>
(o .:? "configurations" .!= mempty))
instance ToJSON CustomerListConfigurationsResponse
where
toJSON CustomerListConfigurationsResponse'{..}
= object
(catMaybes
[("configurations" .=) <$> _clcrConfigurations])
data CustomerApplyConfigurationRequest = CustomerApplyConfigurationRequest'
{ _cacrDevice :: !(Maybe DeviceReference)
, _cacrConfiguration :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customerApplyConfigurationRequest
:: CustomerApplyConfigurationRequest
customerApplyConfigurationRequest =
CustomerApplyConfigurationRequest'
{ _cacrDevice = Nothing
, _cacrConfiguration = Nothing
}
cacrDevice :: Lens' CustomerApplyConfigurationRequest (Maybe DeviceReference)
cacrDevice
= lens _cacrDevice (\ s a -> s{_cacrDevice = a})
cacrConfiguration :: Lens' CustomerApplyConfigurationRequest (Maybe Text)
cacrConfiguration
= lens _cacrConfiguration
(\ s a -> s{_cacrConfiguration = a})
instance FromJSON CustomerApplyConfigurationRequest
where
parseJSON
= withObject "CustomerApplyConfigurationRequest"
(\ o ->
CustomerApplyConfigurationRequest' <$>
(o .:? "device") <*> (o .:? "configuration"))
instance ToJSON CustomerApplyConfigurationRequest
where
toJSON CustomerApplyConfigurationRequest'{..}
= object
(catMaybes
[("device" .=) <$> _cacrDevice,
("configuration" .=) <$> _cacrConfiguration])
data Company = Company'
{ _cCompanyId :: !(Maybe (Textual Int64))
, _cCompanyName :: !(Maybe Text)
, _cOwnerEmails :: !(Maybe [Text])
, _cTermsStatus :: !(Maybe CompanyTermsStatus)
, _cName :: !(Maybe Text)
, _cAdminEmails :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
company
:: Company
company =
Company'
{ _cCompanyId = Nothing
, _cCompanyName = Nothing
, _cOwnerEmails = Nothing
, _cTermsStatus = Nothing
, _cName = Nothing
, _cAdminEmails = Nothing
}
cCompanyId :: Lens' Company (Maybe Int64)
cCompanyId
= lens _cCompanyId (\ s a -> s{_cCompanyId = a}) .
mapping _Coerce
cCompanyName :: Lens' Company (Maybe Text)
cCompanyName
= lens _cCompanyName (\ s a -> s{_cCompanyName = a})
cOwnerEmails :: Lens' Company [Text]
cOwnerEmails
= lens _cOwnerEmails (\ s a -> s{_cOwnerEmails = a})
. _Default
. _Coerce
cTermsStatus :: Lens' Company (Maybe CompanyTermsStatus)
cTermsStatus
= lens _cTermsStatus (\ s a -> s{_cTermsStatus = a})
cName :: Lens' Company (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cAdminEmails :: Lens' Company [Text]
cAdminEmails
= lens _cAdminEmails (\ s a -> s{_cAdminEmails = a})
. _Default
. _Coerce
instance FromJSON Company where
parseJSON
= withObject "Company"
(\ o ->
Company' <$>
(o .:? "companyId") <*> (o .:? "companyName") <*>
(o .:? "ownerEmails" .!= mempty)
<*> (o .:? "termsStatus")
<*> (o .:? "name")
<*> (o .:? "adminEmails" .!= mempty))
instance ToJSON Company where
toJSON Company'{..}
= object
(catMaybes
[("companyId" .=) <$> _cCompanyId,
("companyName" .=) <$> _cCompanyName,
("ownerEmails" .=) <$> _cOwnerEmails,
("termsStatus" .=) <$> _cTermsStatus,
("name" .=) <$> _cName,
("adminEmails" .=) <$> _cAdminEmails])
data CustomerListCustomersResponse = CustomerListCustomersResponse'
{ _clcrCustomers :: !(Maybe [Company])
, _clcrNextPageToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
customerListCustomersResponse
:: CustomerListCustomersResponse
customerListCustomersResponse =
CustomerListCustomersResponse'
{ _clcrCustomers = Nothing
, _clcrNextPageToken = Nothing
}
clcrCustomers :: Lens' CustomerListCustomersResponse [Company]
clcrCustomers
= lens _clcrCustomers
(\ s a -> s{_clcrCustomers = a})
. _Default
. _Coerce
clcrNextPageToken :: Lens' CustomerListCustomersResponse (Maybe Text)
clcrNextPageToken
= lens _clcrNextPageToken
(\ s a -> s{_clcrNextPageToken = a})
instance FromJSON CustomerListCustomersResponse where
parseJSON
= withObject "CustomerListCustomersResponse"
(\ o ->
CustomerListCustomersResponse' <$>
(o .:? "customers" .!= mempty) <*>
(o .:? "nextPageToken"))
instance ToJSON CustomerListCustomersResponse where
toJSON CustomerListCustomersResponse'{..}
= object
(catMaybes
[("customers" .=) <$> _clcrCustomers,
("nextPageToken" .=) <$> _clcrNextPageToken])
data DeviceClaim = DeviceClaim'
{ _dcSectionType :: !(Maybe DeviceClaimSectionType)
, _dcOwnerCompanyId :: !(Maybe (Textual Int64))
, _dcResellerId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
deviceClaim
:: DeviceClaim
deviceClaim =
DeviceClaim'
{ _dcSectionType = Nothing
, _dcOwnerCompanyId = Nothing
, _dcResellerId = Nothing
}
dcSectionType :: Lens' DeviceClaim (Maybe DeviceClaimSectionType)
dcSectionType
= lens _dcSectionType
(\ s a -> s{_dcSectionType = a})
dcOwnerCompanyId :: Lens' DeviceClaim (Maybe Int64)
dcOwnerCompanyId
= lens _dcOwnerCompanyId
(\ s a -> s{_dcOwnerCompanyId = a})
. mapping _Coerce
dcResellerId :: Lens' DeviceClaim (Maybe Int64)
dcResellerId
= lens _dcResellerId (\ s a -> s{_dcResellerId = a})
. mapping _Coerce
instance FromJSON DeviceClaim where
parseJSON
= withObject "DeviceClaim"
(\ o ->
DeviceClaim' <$>
(o .:? "sectionType") <*> (o .:? "ownerCompanyId")
<*> (o .:? "resellerId"))
instance ToJSON DeviceClaim where
toJSON DeviceClaim'{..}
= object
(catMaybes
[("sectionType" .=) <$> _dcSectionType,
("ownerCompanyId" .=) <$> _dcOwnerCompanyId,
("resellerId" .=) <$> _dcResellerId])
newtype UpdateDeviceMetadataRequest = UpdateDeviceMetadataRequest'
{ _udmrDeviceMetadata :: Maybe DeviceMetadata
} deriving (Eq,Show,Data,Typeable,Generic)
updateDeviceMetadataRequest
:: UpdateDeviceMetadataRequest
updateDeviceMetadataRequest =
UpdateDeviceMetadataRequest'
{ _udmrDeviceMetadata = Nothing
}
udmrDeviceMetadata :: Lens' UpdateDeviceMetadataRequest (Maybe DeviceMetadata)
udmrDeviceMetadata
= lens _udmrDeviceMetadata
(\ s a -> s{_udmrDeviceMetadata = a})
instance FromJSON UpdateDeviceMetadataRequest where
parseJSON
= withObject "UpdateDeviceMetadataRequest"
(\ o ->
UpdateDeviceMetadataRequest' <$>
(o .:? "deviceMetadata"))
instance ToJSON UpdateDeviceMetadataRequest where
toJSON UpdateDeviceMetadataRequest'{..}
= object
(catMaybes
[("deviceMetadata" .=) <$> _udmrDeviceMetadata])
newtype DeviceMetadata = DeviceMetadata'
{ _dmEntries :: Maybe DeviceMetadataEntries
} deriving (Eq,Show,Data,Typeable,Generic)
deviceMetadata
:: DeviceMetadata
deviceMetadata =
DeviceMetadata'
{ _dmEntries = Nothing
}
dmEntries :: Lens' DeviceMetadata (Maybe DeviceMetadataEntries)
dmEntries
= lens _dmEntries (\ s a -> s{_dmEntries = a})
instance FromJSON DeviceMetadata where
parseJSON
= withObject "DeviceMetadata"
(\ o -> DeviceMetadata' <$> (o .:? "entries"))
instance ToJSON DeviceMetadata where
toJSON DeviceMetadata'{..}
= object (catMaybes [("entries" .=) <$> _dmEntries])
data FindDevicesByOwnerRequest = FindDevicesByOwnerRequest'
{ _fdborSectionType :: !(Maybe FindDevicesByOwnerRequestSectionType)
, _fdborCustomerId :: !(Maybe [Textual Int64])
, _fdborLimit :: !(Maybe (Textual Int64))
, _fdborPageToken :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
findDevicesByOwnerRequest
:: FindDevicesByOwnerRequest
findDevicesByOwnerRequest =
FindDevicesByOwnerRequest'
{ _fdborSectionType = Nothing
, _fdborCustomerId = Nothing
, _fdborLimit = Nothing
, _fdborPageToken = Nothing
}
fdborSectionType :: Lens' FindDevicesByOwnerRequest (Maybe FindDevicesByOwnerRequestSectionType)
fdborSectionType
= lens _fdborSectionType
(\ s a -> s{_fdborSectionType = a})
fdborCustomerId :: Lens' FindDevicesByOwnerRequest [Int64]
fdborCustomerId
= lens _fdborCustomerId
(\ s a -> s{_fdborCustomerId = a})
. _Default
. _Coerce
fdborLimit :: Lens' FindDevicesByOwnerRequest (Maybe Int64)
fdborLimit
= lens _fdborLimit (\ s a -> s{_fdborLimit = a}) .
mapping _Coerce
fdborPageToken :: Lens' FindDevicesByOwnerRequest (Maybe Text)
fdborPageToken
= lens _fdborPageToken
(\ s a -> s{_fdborPageToken = a})
instance FromJSON FindDevicesByOwnerRequest where
parseJSON
= withObject "FindDevicesByOwnerRequest"
(\ o ->
FindDevicesByOwnerRequest' <$>
(o .:? "sectionType") <*>
(o .:? "customerId" .!= mempty)
<*> (o .:? "limit")
<*> (o .:? "pageToken"))
instance ToJSON FindDevicesByOwnerRequest where
toJSON FindDevicesByOwnerRequest'{..}
= object
(catMaybes
[("sectionType" .=) <$> _fdborSectionType,
("customerId" .=) <$> _fdborCustomerId,
("limit" .=) <$> _fdborLimit,
("pageToken" .=) <$> _fdborPageToken])
data FindDevicesByDeviceIdentifierResponse = FindDevicesByDeviceIdentifierResponse'
{ _fdbdirNextPageToken :: !(Maybe Text)
, _fdbdirTotalSize :: !(Maybe (Textual Int32))
, _fdbdirDevices :: !(Maybe [Device])
} deriving (Eq,Show,Data,Typeable,Generic)
findDevicesByDeviceIdentifierResponse
:: FindDevicesByDeviceIdentifierResponse
findDevicesByDeviceIdentifierResponse =
FindDevicesByDeviceIdentifierResponse'
{ _fdbdirNextPageToken = Nothing
, _fdbdirTotalSize = Nothing
, _fdbdirDevices = Nothing
}
fdbdirNextPageToken :: Lens' FindDevicesByDeviceIdentifierResponse (Maybe Text)
fdbdirNextPageToken
= lens _fdbdirNextPageToken
(\ s a -> s{_fdbdirNextPageToken = a})
fdbdirTotalSize :: Lens' FindDevicesByDeviceIdentifierResponse (Maybe Int32)
fdbdirTotalSize
= lens _fdbdirTotalSize
(\ s a -> s{_fdbdirTotalSize = a})
. mapping _Coerce
fdbdirDevices :: Lens' FindDevicesByDeviceIdentifierResponse [Device]
fdbdirDevices
= lens _fdbdirDevices
(\ s a -> s{_fdbdirDevices = a})
. _Default
. _Coerce
instance FromJSON
FindDevicesByDeviceIdentifierResponse where
parseJSON
= withObject "FindDevicesByDeviceIdentifierResponse"
(\ o ->
FindDevicesByDeviceIdentifierResponse' <$>
(o .:? "nextPageToken") <*> (o .:? "totalSize") <*>
(o .:? "devices" .!= mempty))
instance ToJSON FindDevicesByDeviceIdentifierResponse
where
toJSON FindDevicesByDeviceIdentifierResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _fdbdirNextPageToken,
("totalSize" .=) <$> _fdbdirTotalSize,
("devices" .=) <$> _fdbdirDevices])
data UnclaimDeviceRequest = UnclaimDeviceRequest'
{ _udrDeviceIdentifier :: !(Maybe DeviceIdentifier)
, _udrSectionType :: !(Maybe UnclaimDeviceRequestSectionType)
, _udrDeviceId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
unclaimDeviceRequest
:: UnclaimDeviceRequest
unclaimDeviceRequest =
UnclaimDeviceRequest'
{ _udrDeviceIdentifier = Nothing
, _udrSectionType = Nothing
, _udrDeviceId = Nothing
}
udrDeviceIdentifier :: Lens' UnclaimDeviceRequest (Maybe DeviceIdentifier)
udrDeviceIdentifier
= lens _udrDeviceIdentifier
(\ s a -> s{_udrDeviceIdentifier = a})
udrSectionType :: Lens' UnclaimDeviceRequest (Maybe UnclaimDeviceRequestSectionType)
udrSectionType
= lens _udrSectionType
(\ s a -> s{_udrSectionType = a})
udrDeviceId :: Lens' UnclaimDeviceRequest (Maybe Int64)
udrDeviceId
= lens _udrDeviceId (\ s a -> s{_udrDeviceId = a}) .
mapping _Coerce
instance FromJSON UnclaimDeviceRequest where
parseJSON
= withObject "UnclaimDeviceRequest"
(\ o ->
UnclaimDeviceRequest' <$>
(o .:? "deviceIdentifier") <*> (o .:? "sectionType")
<*> (o .:? "deviceId"))
instance ToJSON UnclaimDeviceRequest where
toJSON UnclaimDeviceRequest'{..}
= object
(catMaybes
[("deviceIdentifier" .=) <$> _udrDeviceIdentifier,
("sectionType" .=) <$> _udrSectionType,
("deviceId" .=) <$> _udrDeviceId])
data DevicesLongRunningOperationResponse = DevicesLongRunningOperationResponse'
{ _dlrorSuccessCount :: !(Maybe (Textual Int32))
, _dlrorPerDeviceStatus :: !(Maybe [OperationPerDevice])
} deriving (Eq,Show,Data,Typeable,Generic)
devicesLongRunningOperationResponse
:: DevicesLongRunningOperationResponse
devicesLongRunningOperationResponse =
DevicesLongRunningOperationResponse'
{ _dlrorSuccessCount = Nothing
, _dlrorPerDeviceStatus = Nothing
}
dlrorSuccessCount :: Lens' DevicesLongRunningOperationResponse (Maybe Int32)
dlrorSuccessCount
= lens _dlrorSuccessCount
(\ s a -> s{_dlrorSuccessCount = a})
. mapping _Coerce
dlrorPerDeviceStatus :: Lens' DevicesLongRunningOperationResponse [OperationPerDevice]
dlrorPerDeviceStatus
= lens _dlrorPerDeviceStatus
(\ s a -> s{_dlrorPerDeviceStatus = a})
. _Default
. _Coerce
instance FromJSON DevicesLongRunningOperationResponse
where
parseJSON
= withObject "DevicesLongRunningOperationResponse"
(\ o ->
DevicesLongRunningOperationResponse' <$>
(o .:? "successCount") <*>
(o .:? "perDeviceStatus" .!= mempty))
instance ToJSON DevicesLongRunningOperationResponse
where
toJSON DevicesLongRunningOperationResponse'{..}
= object
(catMaybes
[("successCount" .=) <$> _dlrorSuccessCount,
("perDeviceStatus" .=) <$> _dlrorPerDeviceStatus])
data Configuration = Configuration'
{ _conContactPhone :: !(Maybe Text)
, _conContactEmail :: !(Maybe Text)
, _conConfigurationName :: !(Maybe Text)
, _conConfigurationId :: !(Maybe (Textual Int64))
, _conCustomMessage :: !(Maybe Text)
, _conCompanyName :: !(Maybe Text)
, _conDpcExtras :: !(Maybe Text)
, _conName :: !(Maybe Text)
, _conDpcResourcePath :: !(Maybe Text)
, _conIsDefault :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
configuration
:: Configuration
configuration =
Configuration'
{ _conContactPhone = Nothing
, _conContactEmail = Nothing
, _conConfigurationName = Nothing
, _conConfigurationId = Nothing
, _conCustomMessage = Nothing
, _conCompanyName = Nothing
, _conDpcExtras = Nothing
, _conName = Nothing
, _conDpcResourcePath = Nothing
, _conIsDefault = Nothing
}
conContactPhone :: Lens' Configuration (Maybe Text)
conContactPhone
= lens _conContactPhone
(\ s a -> s{_conContactPhone = a})
conContactEmail :: Lens' Configuration (Maybe Text)
conContactEmail
= lens _conContactEmail
(\ s a -> s{_conContactEmail = a})
conConfigurationName :: Lens' Configuration (Maybe Text)
conConfigurationName
= lens _conConfigurationName
(\ s a -> s{_conConfigurationName = a})
conConfigurationId :: Lens' Configuration (Maybe Int64)
conConfigurationId
= lens _conConfigurationId
(\ s a -> s{_conConfigurationId = a})
. mapping _Coerce
conCustomMessage :: Lens' Configuration (Maybe Text)
conCustomMessage
= lens _conCustomMessage
(\ s a -> s{_conCustomMessage = a})
conCompanyName :: Lens' Configuration (Maybe Text)
conCompanyName
= lens _conCompanyName
(\ s a -> s{_conCompanyName = a})
conDpcExtras :: Lens' Configuration (Maybe Text)
conDpcExtras
= lens _conDpcExtras (\ s a -> s{_conDpcExtras = a})
conName :: Lens' Configuration (Maybe Text)
conName = lens _conName (\ s a -> s{_conName = a})
conDpcResourcePath :: Lens' Configuration (Maybe Text)
conDpcResourcePath
= lens _conDpcResourcePath
(\ s a -> s{_conDpcResourcePath = a})
conIsDefault :: Lens' Configuration (Maybe Bool)
conIsDefault
= lens _conIsDefault (\ s a -> s{_conIsDefault = a})
instance FromJSON Configuration where
parseJSON
= withObject "Configuration"
(\ o ->
Configuration' <$>
(o .:? "contactPhone") <*> (o .:? "contactEmail") <*>
(o .:? "configurationName")
<*> (o .:? "configurationId")
<*> (o .:? "customMessage")
<*> (o .:? "companyName")
<*> (o .:? "dpcExtras")
<*> (o .:? "name")
<*> (o .:? "dpcResourcePath")
<*> (o .:? "isDefault"))
instance ToJSON Configuration where
toJSON Configuration'{..}
= object
(catMaybes
[("contactPhone" .=) <$> _conContactPhone,
("contactEmail" .=) <$> _conContactEmail,
("configurationName" .=) <$> _conConfigurationName,
("configurationId" .=) <$> _conConfigurationId,
("customMessage" .=) <$> _conCustomMessage,
("companyName" .=) <$> _conCompanyName,
("dpcExtras" .=) <$> _conDpcExtras,
("name" .=) <$> _conName,
("dpcResourcePath" .=) <$> _conDpcResourcePath,
("isDefault" .=) <$> _conIsDefault])
newtype OperationMetadata = OperationMetadata'
{ _omAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadata
:: HashMap Text JSONValue
-> OperationMetadata
operationMetadata pOmAddtional_ =
OperationMetadata'
{ _omAddtional = _Coerce # pOmAddtional_
}
omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
omAddtional
= lens _omAddtional (\ s a -> s{_omAddtional = a}) .
_Coerce
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o -> OperationMetadata' <$> (parseJSONObject o))
instance ToJSON OperationMetadata where
toJSON = toJSON . _omAddtional
data ListCustomersResponse = ListCustomersResponse'
{ _lcrCustomers :: !(Maybe [Company])
, _lcrNextPageToken :: !(Maybe Text)
, _lcrTotalSize :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
listCustomersResponse
:: ListCustomersResponse
listCustomersResponse =
ListCustomersResponse'
{ _lcrCustomers = Nothing
, _lcrNextPageToken = Nothing
, _lcrTotalSize = Nothing
}
lcrCustomers :: Lens' ListCustomersResponse [Company]
lcrCustomers
= lens _lcrCustomers (\ s a -> s{_lcrCustomers = a})
. _Default
. _Coerce
lcrNextPageToken :: Lens' ListCustomersResponse (Maybe Text)
lcrNextPageToken
= lens _lcrNextPageToken
(\ s a -> s{_lcrNextPageToken = a})
lcrTotalSize :: Lens' ListCustomersResponse (Maybe Int32)
lcrTotalSize
= lens _lcrTotalSize (\ s a -> s{_lcrTotalSize = a})
. mapping _Coerce
instance FromJSON ListCustomersResponse where
parseJSON
= withObject "ListCustomersResponse"
(\ o ->
ListCustomersResponse' <$>
(o .:? "customers" .!= mempty) <*>
(o .:? "nextPageToken")
<*> (o .:? "totalSize"))
instance ToJSON ListCustomersResponse where
toJSON ListCustomersResponse'{..}
= object
(catMaybes
[("customers" .=) <$> _lcrCustomers,
("nextPageToken" .=) <$> _lcrNextPageToken,
("totalSize" .=) <$> _lcrTotalSize])
data DevicesLongRunningOperationMetadata = DevicesLongRunningOperationMetadata'
{ _dlromProgress :: !(Maybe (Textual Int32))
, _dlromDevicesCount :: !(Maybe (Textual Int32))
, _dlromProcessingStatus :: !(Maybe DevicesLongRunningOperationMetadataProcessingStatus)
} deriving (Eq,Show,Data,Typeable,Generic)
devicesLongRunningOperationMetadata
:: DevicesLongRunningOperationMetadata
devicesLongRunningOperationMetadata =
DevicesLongRunningOperationMetadata'
{ _dlromProgress = Nothing
, _dlromDevicesCount = Nothing
, _dlromProcessingStatus = Nothing
}
dlromProgress :: Lens' DevicesLongRunningOperationMetadata (Maybe Int32)
dlromProgress
= lens _dlromProgress
(\ s a -> s{_dlromProgress = a})
. mapping _Coerce
dlromDevicesCount :: Lens' DevicesLongRunningOperationMetadata (Maybe Int32)
dlromDevicesCount
= lens _dlromDevicesCount
(\ s a -> s{_dlromDevicesCount = a})
. mapping _Coerce
dlromProcessingStatus :: Lens' DevicesLongRunningOperationMetadata (Maybe DevicesLongRunningOperationMetadataProcessingStatus)
dlromProcessingStatus
= lens _dlromProcessingStatus
(\ s a -> s{_dlromProcessingStatus = a})
instance FromJSON DevicesLongRunningOperationMetadata
where
parseJSON
= withObject "DevicesLongRunningOperationMetadata"
(\ o ->
DevicesLongRunningOperationMetadata' <$>
(o .:? "progress") <*> (o .:? "devicesCount") <*>
(o .:? "processingStatus"))
instance ToJSON DevicesLongRunningOperationMetadata
where
toJSON DevicesLongRunningOperationMetadata'{..}
= object
(catMaybes
[("progress" .=) <$> _dlromProgress,
("devicesCount" .=) <$> _dlromDevicesCount,
("processingStatus" .=) <$> _dlromProcessingStatus])
newtype OperationResponse = OperationResponse'
{ _orAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationResponse
:: HashMap Text JSONValue
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse'
{ _orAddtional = _Coerce # pOrAddtional_
}
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
orAddtional
= lens _orAddtional (\ s a -> s{_orAddtional = a}) .
_Coerce
instance FromJSON OperationResponse where
parseJSON
= withObject "OperationResponse"
(\ o -> OperationResponse' <$> (parseJSONObject o))
instance ToJSON OperationResponse where
toJSON = toJSON . _orAddtional
data CustomerListDevicesResponse = CustomerListDevicesResponse'
{ _cldrNextPageToken :: !(Maybe Text)
, _cldrDevices :: !(Maybe [Device])
} deriving (Eq,Show,Data,Typeable,Generic)
customerListDevicesResponse
:: CustomerListDevicesResponse
customerListDevicesResponse =
CustomerListDevicesResponse'
{ _cldrNextPageToken = Nothing
, _cldrDevices = Nothing
}
cldrNextPageToken :: Lens' CustomerListDevicesResponse (Maybe Text)
cldrNextPageToken
= lens _cldrNextPageToken
(\ s a -> s{_cldrNextPageToken = a})
cldrDevices :: Lens' CustomerListDevicesResponse [Device]
cldrDevices
= lens _cldrDevices (\ s a -> s{_cldrDevices = a}) .
_Default
. _Coerce
instance FromJSON CustomerListDevicesResponse where
parseJSON
= withObject "CustomerListDevicesResponse"
(\ o ->
CustomerListDevicesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "devices" .!= mempty))
instance ToJSON CustomerListDevicesResponse where
toJSON CustomerListDevicesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _cldrNextPageToken,
("devices" .=) <$> _cldrDevices])
newtype UpdateDeviceMetadataInBatchRequest = UpdateDeviceMetadataInBatchRequest'
{ _udmibrUpdates :: Maybe [UpdateMetadataArguments]
} deriving (Eq,Show,Data,Typeable,Generic)
updateDeviceMetadataInBatchRequest
:: UpdateDeviceMetadataInBatchRequest
updateDeviceMetadataInBatchRequest =
UpdateDeviceMetadataInBatchRequest'
{ _udmibrUpdates = Nothing
}
udmibrUpdates :: Lens' UpdateDeviceMetadataInBatchRequest [UpdateMetadataArguments]
udmibrUpdates
= lens _udmibrUpdates
(\ s a -> s{_udmibrUpdates = a})
. _Default
. _Coerce
instance FromJSON UpdateDeviceMetadataInBatchRequest
where
parseJSON
= withObject "UpdateDeviceMetadataInBatchRequest"
(\ o ->
UpdateDeviceMetadataInBatchRequest' <$>
(o .:? "updates" .!= mempty))
instance ToJSON UpdateDeviceMetadataInBatchRequest
where
toJSON UpdateDeviceMetadataInBatchRequest'{..}
= object
(catMaybes [("updates" .=) <$> _udmibrUpdates])
newtype CustomerListDpcsResponse = CustomerListDpcsResponse'
{ _cldrDpcs :: Maybe [Dpc]
} deriving (Eq,Show,Data,Typeable,Generic)
customerListDpcsResponse
:: CustomerListDpcsResponse
customerListDpcsResponse =
CustomerListDpcsResponse'
{ _cldrDpcs = Nothing
}
cldrDpcs :: Lens' CustomerListDpcsResponse [Dpc]
cldrDpcs
= lens _cldrDpcs (\ s a -> s{_cldrDpcs = a}) .
_Default
. _Coerce
instance FromJSON CustomerListDpcsResponse where
parseJSON
= withObject "CustomerListDpcsResponse"
(\ o ->
CustomerListDpcsResponse' <$>
(o .:? "dpcs" .!= mempty))
instance ToJSON CustomerListDpcsResponse where
toJSON CustomerListDpcsResponse'{..}
= object (catMaybes [("dpcs" .=) <$> _cldrDpcs])
data ClaimDeviceResponse = ClaimDeviceResponse'
{ _cdrDeviceName :: !(Maybe Text)
, _cdrDeviceId :: !(Maybe (Textual Int64))
} deriving (Eq,Show,Data,Typeable,Generic)
claimDeviceResponse
:: ClaimDeviceResponse
claimDeviceResponse =
ClaimDeviceResponse'
{ _cdrDeviceName = Nothing
, _cdrDeviceId = Nothing
}
cdrDeviceName :: Lens' ClaimDeviceResponse (Maybe Text)
cdrDeviceName
= lens _cdrDeviceName
(\ s a -> s{_cdrDeviceName = a})
cdrDeviceId :: Lens' ClaimDeviceResponse (Maybe Int64)
cdrDeviceId
= lens _cdrDeviceId (\ s a -> s{_cdrDeviceId = a}) .
mapping _Coerce
instance FromJSON ClaimDeviceResponse where
parseJSON
= withObject "ClaimDeviceResponse"
(\ o ->
ClaimDeviceResponse' <$>
(o .:? "deviceName") <*> (o .:? "deviceId"))
instance ToJSON ClaimDeviceResponse where
toJSON ClaimDeviceResponse'{..}
= object
(catMaybes
[("deviceName" .=) <$> _cdrDeviceName,
("deviceId" .=) <$> _cdrDeviceId])
newtype CreateCustomerRequest = CreateCustomerRequest'
{ _ccrCustomer :: Maybe Company
} deriving (Eq,Show,Data,Typeable,Generic)
createCustomerRequest
:: CreateCustomerRequest
createCustomerRequest =
CreateCustomerRequest'
{ _ccrCustomer = Nothing
}
ccrCustomer :: Lens' CreateCustomerRequest (Maybe Company)
ccrCustomer
= lens _ccrCustomer (\ s a -> s{_ccrCustomer = a})
instance FromJSON CreateCustomerRequest where
parseJSON
= withObject "CreateCustomerRequest"
(\ o ->
CreateCustomerRequest' <$> (o .:? "customer"))
instance ToJSON CreateCustomerRequest where
toJSON CreateCustomerRequest'{..}
= object
(catMaybes [("customer" .=) <$> _ccrCustomer])