{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DeviceFarm.CreateNetworkProfile
(
CreateNetworkProfile (..),
newCreateNetworkProfile,
createNetworkProfile_description,
createNetworkProfile_downlinkBandwidthBits,
createNetworkProfile_downlinkDelayMs,
createNetworkProfile_downlinkJitterMs,
createNetworkProfile_downlinkLossPercent,
createNetworkProfile_type,
createNetworkProfile_uplinkBandwidthBits,
createNetworkProfile_uplinkDelayMs,
createNetworkProfile_uplinkJitterMs,
createNetworkProfile_uplinkLossPercent,
createNetworkProfile_projectArn,
createNetworkProfile_name,
CreateNetworkProfileResponse (..),
newCreateNetworkProfileResponse,
createNetworkProfileResponse_networkProfile,
createNetworkProfileResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DeviceFarm.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateNetworkProfile = CreateNetworkProfile'
{
CreateNetworkProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateNetworkProfile -> Maybe Integer
downlinkBandwidthBits :: Prelude.Maybe Prelude.Integer,
CreateNetworkProfile -> Maybe Integer
downlinkDelayMs :: Prelude.Maybe Prelude.Integer,
CreateNetworkProfile -> Maybe Integer
downlinkJitterMs :: Prelude.Maybe Prelude.Integer,
CreateNetworkProfile -> Maybe Natural
downlinkLossPercent :: Prelude.Maybe Prelude.Natural,
CreateNetworkProfile -> Maybe NetworkProfileType
type' :: Prelude.Maybe NetworkProfileType,
CreateNetworkProfile -> Maybe Integer
uplinkBandwidthBits :: Prelude.Maybe Prelude.Integer,
CreateNetworkProfile -> Maybe Integer
uplinkDelayMs :: Prelude.Maybe Prelude.Integer,
CreateNetworkProfile -> Maybe Integer
uplinkJitterMs :: Prelude.Maybe Prelude.Integer,
CreateNetworkProfile -> Maybe Natural
uplinkLossPercent :: Prelude.Maybe Prelude.Natural,
CreateNetworkProfile -> Text
projectArn :: Prelude.Text,
CreateNetworkProfile -> Text
name :: Prelude.Text
}
deriving (CreateNetworkProfile -> CreateNetworkProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateNetworkProfile -> CreateNetworkProfile -> Bool
$c/= :: CreateNetworkProfile -> CreateNetworkProfile -> Bool
== :: CreateNetworkProfile -> CreateNetworkProfile -> Bool
$c== :: CreateNetworkProfile -> CreateNetworkProfile -> Bool
Prelude.Eq, ReadPrec [CreateNetworkProfile]
ReadPrec CreateNetworkProfile
Int -> ReadS CreateNetworkProfile
ReadS [CreateNetworkProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateNetworkProfile]
$creadListPrec :: ReadPrec [CreateNetworkProfile]
readPrec :: ReadPrec CreateNetworkProfile
$creadPrec :: ReadPrec CreateNetworkProfile
readList :: ReadS [CreateNetworkProfile]
$creadList :: ReadS [CreateNetworkProfile]
readsPrec :: Int -> ReadS CreateNetworkProfile
$creadsPrec :: Int -> ReadS CreateNetworkProfile
Prelude.Read, Int -> CreateNetworkProfile -> ShowS
[CreateNetworkProfile] -> ShowS
CreateNetworkProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateNetworkProfile] -> ShowS
$cshowList :: [CreateNetworkProfile] -> ShowS
show :: CreateNetworkProfile -> String
$cshow :: CreateNetworkProfile -> String
showsPrec :: Int -> CreateNetworkProfile -> ShowS
$cshowsPrec :: Int -> CreateNetworkProfile -> ShowS
Prelude.Show, forall x. Rep CreateNetworkProfile x -> CreateNetworkProfile
forall x. CreateNetworkProfile -> Rep CreateNetworkProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateNetworkProfile x -> CreateNetworkProfile
$cfrom :: forall x. CreateNetworkProfile -> Rep CreateNetworkProfile x
Prelude.Generic)
newCreateNetworkProfile ::
Prelude.Text ->
Prelude.Text ->
CreateNetworkProfile
newCreateNetworkProfile :: Text -> Text -> CreateNetworkProfile
newCreateNetworkProfile Text
pProjectArn_ Text
pName_ =
CreateNetworkProfile'
{ $sel:description:CreateNetworkProfile' :: Maybe Text
description =
forall a. Maybe a
Prelude.Nothing,
$sel:downlinkBandwidthBits:CreateNetworkProfile' :: Maybe Integer
downlinkBandwidthBits = forall a. Maybe a
Prelude.Nothing,
$sel:downlinkDelayMs:CreateNetworkProfile' :: Maybe Integer
downlinkDelayMs = forall a. Maybe a
Prelude.Nothing,
$sel:downlinkJitterMs:CreateNetworkProfile' :: Maybe Integer
downlinkJitterMs = forall a. Maybe a
Prelude.Nothing,
$sel:downlinkLossPercent:CreateNetworkProfile' :: Maybe Natural
downlinkLossPercent = forall a. Maybe a
Prelude.Nothing,
$sel:type':CreateNetworkProfile' :: Maybe NetworkProfileType
type' = forall a. Maybe a
Prelude.Nothing,
$sel:uplinkBandwidthBits:CreateNetworkProfile' :: Maybe Integer
uplinkBandwidthBits = forall a. Maybe a
Prelude.Nothing,
$sel:uplinkDelayMs:CreateNetworkProfile' :: Maybe Integer
uplinkDelayMs = forall a. Maybe a
Prelude.Nothing,
$sel:uplinkJitterMs:CreateNetworkProfile' :: Maybe Integer
uplinkJitterMs = forall a. Maybe a
Prelude.Nothing,
$sel:uplinkLossPercent:CreateNetworkProfile' :: Maybe Natural
uplinkLossPercent = forall a. Maybe a
Prelude.Nothing,
$sel:projectArn:CreateNetworkProfile' :: Text
projectArn = Text
pProjectArn_,
$sel:name:CreateNetworkProfile' :: Text
name = Text
pName_
}
createNetworkProfile_description :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Text)
createNetworkProfile_description :: Lens' CreateNetworkProfile (Maybe Text)
createNetworkProfile_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Text
description :: Maybe Text
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Text
a -> CreateNetworkProfile
s {$sel:description:CreateNetworkProfile' :: Maybe Text
description = Maybe Text
a} :: CreateNetworkProfile)
createNetworkProfile_downlinkBandwidthBits :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Integer)
createNetworkProfile_downlinkBandwidthBits :: Lens' CreateNetworkProfile (Maybe Integer)
createNetworkProfile_downlinkBandwidthBits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Integer
downlinkBandwidthBits :: Maybe Integer
$sel:downlinkBandwidthBits:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
downlinkBandwidthBits} -> Maybe Integer
downlinkBandwidthBits) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Integer
a -> CreateNetworkProfile
s {$sel:downlinkBandwidthBits:CreateNetworkProfile' :: Maybe Integer
downlinkBandwidthBits = Maybe Integer
a} :: CreateNetworkProfile)
createNetworkProfile_downlinkDelayMs :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Integer)
createNetworkProfile_downlinkDelayMs :: Lens' CreateNetworkProfile (Maybe Integer)
createNetworkProfile_downlinkDelayMs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Integer
downlinkDelayMs :: Maybe Integer
$sel:downlinkDelayMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
downlinkDelayMs} -> Maybe Integer
downlinkDelayMs) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Integer
a -> CreateNetworkProfile
s {$sel:downlinkDelayMs:CreateNetworkProfile' :: Maybe Integer
downlinkDelayMs = Maybe Integer
a} :: CreateNetworkProfile)
createNetworkProfile_downlinkJitterMs :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Integer)
createNetworkProfile_downlinkJitterMs :: Lens' CreateNetworkProfile (Maybe Integer)
createNetworkProfile_downlinkJitterMs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Integer
downlinkJitterMs :: Maybe Integer
$sel:downlinkJitterMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
downlinkJitterMs} -> Maybe Integer
downlinkJitterMs) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Integer
a -> CreateNetworkProfile
s {$sel:downlinkJitterMs:CreateNetworkProfile' :: Maybe Integer
downlinkJitterMs = Maybe Integer
a} :: CreateNetworkProfile)
createNetworkProfile_downlinkLossPercent :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Natural)
createNetworkProfile_downlinkLossPercent :: Lens' CreateNetworkProfile (Maybe Natural)
createNetworkProfile_downlinkLossPercent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Natural
downlinkLossPercent :: Maybe Natural
$sel:downlinkLossPercent:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Natural
downlinkLossPercent} -> Maybe Natural
downlinkLossPercent) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Natural
a -> CreateNetworkProfile
s {$sel:downlinkLossPercent:CreateNetworkProfile' :: Maybe Natural
downlinkLossPercent = Maybe Natural
a} :: CreateNetworkProfile)
createNetworkProfile_type :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe NetworkProfileType)
createNetworkProfile_type :: Lens' CreateNetworkProfile (Maybe NetworkProfileType)
createNetworkProfile_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe NetworkProfileType
type' :: Maybe NetworkProfileType
$sel:type':CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkProfileType
type'} -> Maybe NetworkProfileType
type') (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe NetworkProfileType
a -> CreateNetworkProfile
s {$sel:type':CreateNetworkProfile' :: Maybe NetworkProfileType
type' = Maybe NetworkProfileType
a} :: CreateNetworkProfile)
createNetworkProfile_uplinkBandwidthBits :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Integer)
createNetworkProfile_uplinkBandwidthBits :: Lens' CreateNetworkProfile (Maybe Integer)
createNetworkProfile_uplinkBandwidthBits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Integer
uplinkBandwidthBits :: Maybe Integer
$sel:uplinkBandwidthBits:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
uplinkBandwidthBits} -> Maybe Integer
uplinkBandwidthBits) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Integer
a -> CreateNetworkProfile
s {$sel:uplinkBandwidthBits:CreateNetworkProfile' :: Maybe Integer
uplinkBandwidthBits = Maybe Integer
a} :: CreateNetworkProfile)
createNetworkProfile_uplinkDelayMs :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Integer)
createNetworkProfile_uplinkDelayMs :: Lens' CreateNetworkProfile (Maybe Integer)
createNetworkProfile_uplinkDelayMs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Integer
uplinkDelayMs :: Maybe Integer
$sel:uplinkDelayMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
uplinkDelayMs} -> Maybe Integer
uplinkDelayMs) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Integer
a -> CreateNetworkProfile
s {$sel:uplinkDelayMs:CreateNetworkProfile' :: Maybe Integer
uplinkDelayMs = Maybe Integer
a} :: CreateNetworkProfile)
createNetworkProfile_uplinkJitterMs :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Integer)
createNetworkProfile_uplinkJitterMs :: Lens' CreateNetworkProfile (Maybe Integer)
createNetworkProfile_uplinkJitterMs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Integer
uplinkJitterMs :: Maybe Integer
$sel:uplinkJitterMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
uplinkJitterMs} -> Maybe Integer
uplinkJitterMs) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Integer
a -> CreateNetworkProfile
s {$sel:uplinkJitterMs:CreateNetworkProfile' :: Maybe Integer
uplinkJitterMs = Maybe Integer
a} :: CreateNetworkProfile)
createNetworkProfile_uplinkLossPercent :: Lens.Lens' CreateNetworkProfile (Prelude.Maybe Prelude.Natural)
createNetworkProfile_uplinkLossPercent :: Lens' CreateNetworkProfile (Maybe Natural)
createNetworkProfile_uplinkLossPercent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Maybe Natural
uplinkLossPercent :: Maybe Natural
$sel:uplinkLossPercent:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Natural
uplinkLossPercent} -> Maybe Natural
uplinkLossPercent) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Maybe Natural
a -> CreateNetworkProfile
s {$sel:uplinkLossPercent:CreateNetworkProfile' :: Maybe Natural
uplinkLossPercent = Maybe Natural
a} :: CreateNetworkProfile)
createNetworkProfile_projectArn :: Lens.Lens' CreateNetworkProfile Prelude.Text
createNetworkProfile_projectArn :: Lens' CreateNetworkProfile Text
createNetworkProfile_projectArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Text
projectArn :: Text
$sel:projectArn:CreateNetworkProfile' :: CreateNetworkProfile -> Text
projectArn} -> Text
projectArn) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Text
a -> CreateNetworkProfile
s {$sel:projectArn:CreateNetworkProfile' :: Text
projectArn = Text
a} :: CreateNetworkProfile)
createNetworkProfile_name :: Lens.Lens' CreateNetworkProfile Prelude.Text
createNetworkProfile_name :: Lens' CreateNetworkProfile Text
createNetworkProfile_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfile' {Text
name :: Text
$sel:name:CreateNetworkProfile' :: CreateNetworkProfile -> Text
name} -> Text
name) (\s :: CreateNetworkProfile
s@CreateNetworkProfile' {} Text
a -> CreateNetworkProfile
s {$sel:name:CreateNetworkProfile' :: Text
name = Text
a} :: CreateNetworkProfile)
instance Core.AWSRequest CreateNetworkProfile where
type
AWSResponse CreateNetworkProfile =
CreateNetworkProfileResponse
request :: (Service -> Service)
-> CreateNetworkProfile -> Request CreateNetworkProfile
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateNetworkProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateNetworkProfile)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe NetworkProfile -> Int -> CreateNetworkProfileResponse
CreateNetworkProfileResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"networkProfile")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateNetworkProfile where
hashWithSalt :: Int -> CreateNetworkProfile -> Int
hashWithSalt Int
_salt CreateNetworkProfile' {Maybe Integer
Maybe Natural
Maybe Text
Maybe NetworkProfileType
Text
name :: Text
projectArn :: Text
uplinkLossPercent :: Maybe Natural
uplinkJitterMs :: Maybe Integer
uplinkDelayMs :: Maybe Integer
uplinkBandwidthBits :: Maybe Integer
type' :: Maybe NetworkProfileType
downlinkLossPercent :: Maybe Natural
downlinkJitterMs :: Maybe Integer
downlinkDelayMs :: Maybe Integer
downlinkBandwidthBits :: Maybe Integer
description :: Maybe Text
$sel:name:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:projectArn:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:uplinkLossPercent:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Natural
$sel:uplinkJitterMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:uplinkDelayMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:uplinkBandwidthBits:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:type':CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkProfileType
$sel:downlinkLossPercent:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Natural
$sel:downlinkJitterMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:downlinkDelayMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:downlinkBandwidthBits:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
downlinkBandwidthBits
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
downlinkDelayMs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
downlinkJitterMs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
downlinkLossPercent
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkProfileType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
uplinkBandwidthBits
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
uplinkDelayMs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
uplinkJitterMs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
uplinkLossPercent
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
projectArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData CreateNetworkProfile where
rnf :: CreateNetworkProfile -> ()
rnf CreateNetworkProfile' {Maybe Integer
Maybe Natural
Maybe Text
Maybe NetworkProfileType
Text
name :: Text
projectArn :: Text
uplinkLossPercent :: Maybe Natural
uplinkJitterMs :: Maybe Integer
uplinkDelayMs :: Maybe Integer
uplinkBandwidthBits :: Maybe Integer
type' :: Maybe NetworkProfileType
downlinkLossPercent :: Maybe Natural
downlinkJitterMs :: Maybe Integer
downlinkDelayMs :: Maybe Integer
downlinkBandwidthBits :: Maybe Integer
description :: Maybe Text
$sel:name:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:projectArn:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:uplinkLossPercent:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Natural
$sel:uplinkJitterMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:uplinkDelayMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:uplinkBandwidthBits:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:type':CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkProfileType
$sel:downlinkLossPercent:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Natural
$sel:downlinkJitterMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:downlinkDelayMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:downlinkBandwidthBits:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
downlinkBandwidthBits
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
downlinkDelayMs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
downlinkJitterMs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
downlinkLossPercent
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkProfileType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
uplinkBandwidthBits
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
uplinkDelayMs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
uplinkJitterMs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
uplinkLossPercent
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
projectArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToHeaders CreateNetworkProfile where
toHeaders :: CreateNetworkProfile -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"DeviceFarm_20150623.CreateNetworkProfile" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateNetworkProfile where
toJSON :: CreateNetworkProfile -> Value
toJSON CreateNetworkProfile' {Maybe Integer
Maybe Natural
Maybe Text
Maybe NetworkProfileType
Text
name :: Text
projectArn :: Text
uplinkLossPercent :: Maybe Natural
uplinkJitterMs :: Maybe Integer
uplinkDelayMs :: Maybe Integer
uplinkBandwidthBits :: Maybe Integer
type' :: Maybe NetworkProfileType
downlinkLossPercent :: Maybe Natural
downlinkJitterMs :: Maybe Integer
downlinkDelayMs :: Maybe Integer
downlinkBandwidthBits :: Maybe Integer
description :: Maybe Text
$sel:name:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:projectArn:CreateNetworkProfile' :: CreateNetworkProfile -> Text
$sel:uplinkLossPercent:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Natural
$sel:uplinkJitterMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:uplinkDelayMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:uplinkBandwidthBits:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:type':CreateNetworkProfile' :: CreateNetworkProfile -> Maybe NetworkProfileType
$sel:downlinkLossPercent:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Natural
$sel:downlinkJitterMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:downlinkDelayMs:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:downlinkBandwidthBits:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Integer
$sel:description:CreateNetworkProfile' :: CreateNetworkProfile -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"downlinkBandwidthBits" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
downlinkBandwidthBits,
(Key
"downlinkDelayMs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
downlinkDelayMs,
(Key
"downlinkJitterMs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
downlinkJitterMs,
(Key
"downlinkLossPercent" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
downlinkLossPercent,
(Key
"type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkProfileType
type',
(Key
"uplinkBandwidthBits" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
uplinkBandwidthBits,
(Key
"uplinkDelayMs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
uplinkDelayMs,
(Key
"uplinkJitterMs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
uplinkJitterMs,
(Key
"uplinkLossPercent" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
uplinkLossPercent,
forall a. a -> Maybe a
Prelude.Just (Key
"projectArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
projectArn),
forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
]
)
instance Data.ToPath CreateNetworkProfile where
toPath :: CreateNetworkProfile -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateNetworkProfile where
toQuery :: CreateNetworkProfile -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateNetworkProfileResponse = CreateNetworkProfileResponse'
{
CreateNetworkProfileResponse -> Maybe NetworkProfile
networkProfile :: Prelude.Maybe NetworkProfile,
CreateNetworkProfileResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
$c/= :: CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
== :: CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
$c== :: CreateNetworkProfileResponse
-> CreateNetworkProfileResponse -> Bool
Prelude.Eq, ReadPrec [CreateNetworkProfileResponse]
ReadPrec CreateNetworkProfileResponse
Int -> ReadS CreateNetworkProfileResponse
ReadS [CreateNetworkProfileResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateNetworkProfileResponse]
$creadListPrec :: ReadPrec [CreateNetworkProfileResponse]
readPrec :: ReadPrec CreateNetworkProfileResponse
$creadPrec :: ReadPrec CreateNetworkProfileResponse
readList :: ReadS [CreateNetworkProfileResponse]
$creadList :: ReadS [CreateNetworkProfileResponse]
readsPrec :: Int -> ReadS CreateNetworkProfileResponse
$creadsPrec :: Int -> ReadS CreateNetworkProfileResponse
Prelude.Read, Int -> CreateNetworkProfileResponse -> ShowS
[CreateNetworkProfileResponse] -> ShowS
CreateNetworkProfileResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateNetworkProfileResponse] -> ShowS
$cshowList :: [CreateNetworkProfileResponse] -> ShowS
show :: CreateNetworkProfileResponse -> String
$cshow :: CreateNetworkProfileResponse -> String
showsPrec :: Int -> CreateNetworkProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateNetworkProfileResponse -> ShowS
Prelude.Show, forall x.
Rep CreateNetworkProfileResponse x -> CreateNetworkProfileResponse
forall x.
CreateNetworkProfileResponse -> Rep CreateNetworkProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateNetworkProfileResponse x -> CreateNetworkProfileResponse
$cfrom :: forall x.
CreateNetworkProfileResponse -> Rep CreateNetworkProfileResponse x
Prelude.Generic)
newCreateNetworkProfileResponse ::
Prelude.Int ->
CreateNetworkProfileResponse
newCreateNetworkProfileResponse :: Int -> CreateNetworkProfileResponse
newCreateNetworkProfileResponse Int
pHttpStatus_ =
CreateNetworkProfileResponse'
{ $sel:networkProfile:CreateNetworkProfileResponse' :: Maybe NetworkProfile
networkProfile =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateNetworkProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createNetworkProfileResponse_networkProfile :: Lens.Lens' CreateNetworkProfileResponse (Prelude.Maybe NetworkProfile)
createNetworkProfileResponse_networkProfile :: Lens' CreateNetworkProfileResponse (Maybe NetworkProfile)
createNetworkProfileResponse_networkProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfileResponse' {Maybe NetworkProfile
networkProfile :: Maybe NetworkProfile
$sel:networkProfile:CreateNetworkProfileResponse' :: CreateNetworkProfileResponse -> Maybe NetworkProfile
networkProfile} -> Maybe NetworkProfile
networkProfile) (\s :: CreateNetworkProfileResponse
s@CreateNetworkProfileResponse' {} Maybe NetworkProfile
a -> CreateNetworkProfileResponse
s {$sel:networkProfile:CreateNetworkProfileResponse' :: Maybe NetworkProfile
networkProfile = Maybe NetworkProfile
a} :: CreateNetworkProfileResponse)
createNetworkProfileResponse_httpStatus :: Lens.Lens' CreateNetworkProfileResponse Prelude.Int
createNetworkProfileResponse_httpStatus :: Lens' CreateNetworkProfileResponse Int
createNetworkProfileResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateNetworkProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateNetworkProfileResponse' :: CreateNetworkProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateNetworkProfileResponse
s@CreateNetworkProfileResponse' {} Int
a -> CreateNetworkProfileResponse
s {$sel:httpStatus:CreateNetworkProfileResponse' :: Int
httpStatus = Int
a} :: CreateNetworkProfileResponse)
instance Prelude.NFData CreateNetworkProfileResponse where
rnf :: CreateNetworkProfileResponse -> ()
rnf CreateNetworkProfileResponse' {Int
Maybe NetworkProfile
httpStatus :: Int
networkProfile :: Maybe NetworkProfile
$sel:httpStatus:CreateNetworkProfileResponse' :: CreateNetworkProfileResponse -> Int
$sel:networkProfile:CreateNetworkProfileResponse' :: CreateNetworkProfileResponse -> Maybe NetworkProfile
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkProfile
networkProfile
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus