module Network.AWS.DeviceFarm.UpdateNetworkProfile
(
updateNetworkProfile
, UpdateNetworkProfile
, unpUplinkJitterMs
, unpUplinkLossPercent
, unpDownlinkJitterMs
, unpName
, unpDownlinkLossPercent
, unpType
, unpUplinkDelayMs
, unpUplinkBandwidthBits
, unpDescription
, unpDownlinkDelayMs
, unpDownlinkBandwidthBits
, unpArn
, updateNetworkProfileResponse
, UpdateNetworkProfileResponse
, unprsNetworkProfile
, unprsResponseStatus
) where
import Network.AWS.DeviceFarm.Types
import Network.AWS.DeviceFarm.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateNetworkProfile = UpdateNetworkProfile'
{ _unpUplinkJitterMs :: !(Maybe Integer)
, _unpUplinkLossPercent :: !(Maybe Nat)
, _unpDownlinkJitterMs :: !(Maybe Integer)
, _unpName :: !(Maybe Text)
, _unpDownlinkLossPercent :: !(Maybe Nat)
, _unpType :: !(Maybe NetworkProfileType)
, _unpUplinkDelayMs :: !(Maybe Integer)
, _unpUplinkBandwidthBits :: !(Maybe Integer)
, _unpDescription :: !(Maybe Text)
, _unpDownlinkDelayMs :: !(Maybe Integer)
, _unpDownlinkBandwidthBits :: !(Maybe Integer)
, _unpArn :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateNetworkProfile
:: Text
-> UpdateNetworkProfile
updateNetworkProfile pArn_ =
UpdateNetworkProfile'
{ _unpUplinkJitterMs = Nothing
, _unpUplinkLossPercent = Nothing
, _unpDownlinkJitterMs = Nothing
, _unpName = Nothing
, _unpDownlinkLossPercent = Nothing
, _unpType = Nothing
, _unpUplinkDelayMs = Nothing
, _unpUplinkBandwidthBits = Nothing
, _unpDescription = Nothing
, _unpDownlinkDelayMs = Nothing
, _unpDownlinkBandwidthBits = Nothing
, _unpArn = pArn_
}
unpUplinkJitterMs :: Lens' UpdateNetworkProfile (Maybe Integer)
unpUplinkJitterMs = lens _unpUplinkJitterMs (\ s a -> s{_unpUplinkJitterMs = a});
unpUplinkLossPercent :: Lens' UpdateNetworkProfile (Maybe Natural)
unpUplinkLossPercent = lens _unpUplinkLossPercent (\ s a -> s{_unpUplinkLossPercent = a}) . mapping _Nat;
unpDownlinkJitterMs :: Lens' UpdateNetworkProfile (Maybe Integer)
unpDownlinkJitterMs = lens _unpDownlinkJitterMs (\ s a -> s{_unpDownlinkJitterMs = a});
unpName :: Lens' UpdateNetworkProfile (Maybe Text)
unpName = lens _unpName (\ s a -> s{_unpName = a});
unpDownlinkLossPercent :: Lens' UpdateNetworkProfile (Maybe Natural)
unpDownlinkLossPercent = lens _unpDownlinkLossPercent (\ s a -> s{_unpDownlinkLossPercent = a}) . mapping _Nat;
unpType :: Lens' UpdateNetworkProfile (Maybe NetworkProfileType)
unpType = lens _unpType (\ s a -> s{_unpType = a});
unpUplinkDelayMs :: Lens' UpdateNetworkProfile (Maybe Integer)
unpUplinkDelayMs = lens _unpUplinkDelayMs (\ s a -> s{_unpUplinkDelayMs = a});
unpUplinkBandwidthBits :: Lens' UpdateNetworkProfile (Maybe Integer)
unpUplinkBandwidthBits = lens _unpUplinkBandwidthBits (\ s a -> s{_unpUplinkBandwidthBits = a});
unpDescription :: Lens' UpdateNetworkProfile (Maybe Text)
unpDescription = lens _unpDescription (\ s a -> s{_unpDescription = a});
unpDownlinkDelayMs :: Lens' UpdateNetworkProfile (Maybe Integer)
unpDownlinkDelayMs = lens _unpDownlinkDelayMs (\ s a -> s{_unpDownlinkDelayMs = a});
unpDownlinkBandwidthBits :: Lens' UpdateNetworkProfile (Maybe Integer)
unpDownlinkBandwidthBits = lens _unpDownlinkBandwidthBits (\ s a -> s{_unpDownlinkBandwidthBits = a});
unpArn :: Lens' UpdateNetworkProfile Text
unpArn = lens _unpArn (\ s a -> s{_unpArn = a});
instance AWSRequest UpdateNetworkProfile where
type Rs UpdateNetworkProfile =
UpdateNetworkProfileResponse
request = postJSON deviceFarm
response
= receiveJSON
(\ s h x ->
UpdateNetworkProfileResponse' <$>
(x .?> "networkProfile") <*> (pure (fromEnum s)))
instance Hashable UpdateNetworkProfile where
instance NFData UpdateNetworkProfile where
instance ToHeaders UpdateNetworkProfile where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DeviceFarm_20150623.UpdateNetworkProfile" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateNetworkProfile where
toJSON UpdateNetworkProfile'{..}
= object
(catMaybes
[("uplinkJitterMs" .=) <$> _unpUplinkJitterMs,
("uplinkLossPercent" .=) <$> _unpUplinkLossPercent,
("downlinkJitterMs" .=) <$> _unpDownlinkJitterMs,
("name" .=) <$> _unpName,
("downlinkLossPercent" .=) <$>
_unpDownlinkLossPercent,
("type" .=) <$> _unpType,
("uplinkDelayMs" .=) <$> _unpUplinkDelayMs,
("uplinkBandwidthBits" .=) <$>
_unpUplinkBandwidthBits,
("description" .=) <$> _unpDescription,
("downlinkDelayMs" .=) <$> _unpDownlinkDelayMs,
("downlinkBandwidthBits" .=) <$>
_unpDownlinkBandwidthBits,
Just ("arn" .= _unpArn)])
instance ToPath UpdateNetworkProfile where
toPath = const "/"
instance ToQuery UpdateNetworkProfile where
toQuery = const mempty
data UpdateNetworkProfileResponse = UpdateNetworkProfileResponse'
{ _unprsNetworkProfile :: !(Maybe NetworkProfile)
, _unprsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateNetworkProfileResponse
:: Int
-> UpdateNetworkProfileResponse
updateNetworkProfileResponse pResponseStatus_ =
UpdateNetworkProfileResponse'
{_unprsNetworkProfile = Nothing, _unprsResponseStatus = pResponseStatus_}
unprsNetworkProfile :: Lens' UpdateNetworkProfileResponse (Maybe NetworkProfile)
unprsNetworkProfile = lens _unprsNetworkProfile (\ s a -> s{_unprsNetworkProfile = a});
unprsResponseStatus :: Lens' UpdateNetworkProfileResponse Int
unprsResponseStatus = lens _unprsResponseStatus (\ s a -> s{_unprsResponseStatus = a});
instance NFData UpdateNetworkProfileResponse where