{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.DeviceFarm.Types.CreateRemoteAccessSessionConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.Types.BillingMethod
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateRemoteAccessSessionConfiguration = CreateRemoteAccessSessionConfiguration'
{
CreateRemoteAccessSessionConfiguration -> Maybe BillingMethod
billingMethod :: Prelude.Maybe BillingMethod,
CreateRemoteAccessSessionConfiguration -> Maybe [Text]
vpceConfigurationArns :: Prelude.Maybe [Prelude.Text]
}
deriving (CreateRemoteAccessSessionConfiguration
-> CreateRemoteAccessSessionConfiguration -> Bool
(CreateRemoteAccessSessionConfiguration
-> CreateRemoteAccessSessionConfiguration -> Bool)
-> (CreateRemoteAccessSessionConfiguration
-> CreateRemoteAccessSessionConfiguration -> Bool)
-> Eq CreateRemoteAccessSessionConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRemoteAccessSessionConfiguration
-> CreateRemoteAccessSessionConfiguration -> Bool
$c/= :: CreateRemoteAccessSessionConfiguration
-> CreateRemoteAccessSessionConfiguration -> Bool
== :: CreateRemoteAccessSessionConfiguration
-> CreateRemoteAccessSessionConfiguration -> Bool
$c== :: CreateRemoteAccessSessionConfiguration
-> CreateRemoteAccessSessionConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateRemoteAccessSessionConfiguration]
ReadPrec CreateRemoteAccessSessionConfiguration
Int -> ReadS CreateRemoteAccessSessionConfiguration
ReadS [CreateRemoteAccessSessionConfiguration]
(Int -> ReadS CreateRemoteAccessSessionConfiguration)
-> ReadS [CreateRemoteAccessSessionConfiguration]
-> ReadPrec CreateRemoteAccessSessionConfiguration
-> ReadPrec [CreateRemoteAccessSessionConfiguration]
-> Read CreateRemoteAccessSessionConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRemoteAccessSessionConfiguration]
$creadListPrec :: ReadPrec [CreateRemoteAccessSessionConfiguration]
readPrec :: ReadPrec CreateRemoteAccessSessionConfiguration
$creadPrec :: ReadPrec CreateRemoteAccessSessionConfiguration
readList :: ReadS [CreateRemoteAccessSessionConfiguration]
$creadList :: ReadS [CreateRemoteAccessSessionConfiguration]
readsPrec :: Int -> ReadS CreateRemoteAccessSessionConfiguration
$creadsPrec :: Int -> ReadS CreateRemoteAccessSessionConfiguration
Prelude.Read, Int -> CreateRemoteAccessSessionConfiguration -> ShowS
[CreateRemoteAccessSessionConfiguration] -> ShowS
CreateRemoteAccessSessionConfiguration -> String
(Int -> CreateRemoteAccessSessionConfiguration -> ShowS)
-> (CreateRemoteAccessSessionConfiguration -> String)
-> ([CreateRemoteAccessSessionConfiguration] -> ShowS)
-> Show CreateRemoteAccessSessionConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRemoteAccessSessionConfiguration] -> ShowS
$cshowList :: [CreateRemoteAccessSessionConfiguration] -> ShowS
show :: CreateRemoteAccessSessionConfiguration -> String
$cshow :: CreateRemoteAccessSessionConfiguration -> String
showsPrec :: Int -> CreateRemoteAccessSessionConfiguration -> ShowS
$cshowsPrec :: Int -> CreateRemoteAccessSessionConfiguration -> ShowS
Prelude.Show, (forall x.
CreateRemoteAccessSessionConfiguration
-> Rep CreateRemoteAccessSessionConfiguration x)
-> (forall x.
Rep CreateRemoteAccessSessionConfiguration x
-> CreateRemoteAccessSessionConfiguration)
-> Generic CreateRemoteAccessSessionConfiguration
forall x.
Rep CreateRemoteAccessSessionConfiguration x
-> CreateRemoteAccessSessionConfiguration
forall x.
CreateRemoteAccessSessionConfiguration
-> Rep CreateRemoteAccessSessionConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRemoteAccessSessionConfiguration x
-> CreateRemoteAccessSessionConfiguration
$cfrom :: forall x.
CreateRemoteAccessSessionConfiguration
-> Rep CreateRemoteAccessSessionConfiguration x
Prelude.Generic)
newCreateRemoteAccessSessionConfiguration ::
CreateRemoteAccessSessionConfiguration
newCreateRemoteAccessSessionConfiguration :: CreateRemoteAccessSessionConfiguration
newCreateRemoteAccessSessionConfiguration =
CreateRemoteAccessSessionConfiguration' :: Maybe BillingMethod
-> Maybe [Text] -> CreateRemoteAccessSessionConfiguration
CreateRemoteAccessSessionConfiguration'
{ $sel:billingMethod:CreateRemoteAccessSessionConfiguration' :: Maybe BillingMethod
billingMethod =
Maybe BillingMethod
forall a. Maybe a
Prelude.Nothing,
$sel:vpceConfigurationArns:CreateRemoteAccessSessionConfiguration' :: Maybe [Text]
vpceConfigurationArns =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
createRemoteAccessSessionConfiguration_billingMethod :: Lens.Lens' CreateRemoteAccessSessionConfiguration (Prelude.Maybe BillingMethod)
createRemoteAccessSessionConfiguration_billingMethod :: (Maybe BillingMethod -> f (Maybe BillingMethod))
-> CreateRemoteAccessSessionConfiguration
-> f CreateRemoteAccessSessionConfiguration
createRemoteAccessSessionConfiguration_billingMethod = (CreateRemoteAccessSessionConfiguration -> Maybe BillingMethod)
-> (CreateRemoteAccessSessionConfiguration
-> Maybe BillingMethod -> CreateRemoteAccessSessionConfiguration)
-> Lens
CreateRemoteAccessSessionConfiguration
CreateRemoteAccessSessionConfiguration
(Maybe BillingMethod)
(Maybe BillingMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSessionConfiguration' {Maybe BillingMethod
billingMethod :: Maybe BillingMethod
$sel:billingMethod:CreateRemoteAccessSessionConfiguration' :: CreateRemoteAccessSessionConfiguration -> Maybe BillingMethod
billingMethod} -> Maybe BillingMethod
billingMethod) (\s :: CreateRemoteAccessSessionConfiguration
s@CreateRemoteAccessSessionConfiguration' {} Maybe BillingMethod
a -> CreateRemoteAccessSessionConfiguration
s {$sel:billingMethod:CreateRemoteAccessSessionConfiguration' :: Maybe BillingMethod
billingMethod = Maybe BillingMethod
a} :: CreateRemoteAccessSessionConfiguration)
createRemoteAccessSessionConfiguration_vpceConfigurationArns :: Lens.Lens' CreateRemoteAccessSessionConfiguration (Prelude.Maybe [Prelude.Text])
createRemoteAccessSessionConfiguration_vpceConfigurationArns :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateRemoteAccessSessionConfiguration
-> f CreateRemoteAccessSessionConfiguration
createRemoteAccessSessionConfiguration_vpceConfigurationArns = (CreateRemoteAccessSessionConfiguration -> Maybe [Text])
-> (CreateRemoteAccessSessionConfiguration
-> Maybe [Text] -> CreateRemoteAccessSessionConfiguration)
-> Lens
CreateRemoteAccessSessionConfiguration
CreateRemoteAccessSessionConfiguration
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSessionConfiguration' {Maybe [Text]
vpceConfigurationArns :: Maybe [Text]
$sel:vpceConfigurationArns:CreateRemoteAccessSessionConfiguration' :: CreateRemoteAccessSessionConfiguration -> Maybe [Text]
vpceConfigurationArns} -> Maybe [Text]
vpceConfigurationArns) (\s :: CreateRemoteAccessSessionConfiguration
s@CreateRemoteAccessSessionConfiguration' {} Maybe [Text]
a -> CreateRemoteAccessSessionConfiguration
s {$sel:vpceConfigurationArns:CreateRemoteAccessSessionConfiguration' :: Maybe [Text]
vpceConfigurationArns = Maybe [Text]
a} :: CreateRemoteAccessSessionConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateRemoteAccessSessionConfiguration
-> f CreateRemoteAccessSessionConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateRemoteAccessSessionConfiguration
-> f CreateRemoteAccessSessionConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.Hashable
CreateRemoteAccessSessionConfiguration
instance
Prelude.NFData
CreateRemoteAccessSessionConfiguration
instance
Core.ToJSON
CreateRemoteAccessSessionConfiguration
where
toJSON :: CreateRemoteAccessSessionConfiguration -> Value
toJSON CreateRemoteAccessSessionConfiguration' {Maybe [Text]
Maybe BillingMethod
vpceConfigurationArns :: Maybe [Text]
billingMethod :: Maybe BillingMethod
$sel:vpceConfigurationArns:CreateRemoteAccessSessionConfiguration' :: CreateRemoteAccessSessionConfiguration -> Maybe [Text]
$sel:billingMethod:CreateRemoteAccessSessionConfiguration' :: CreateRemoteAccessSessionConfiguration -> Maybe BillingMethod
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"billingMethod" Text -> BillingMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BillingMethod -> Pair) -> Maybe BillingMethod -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BillingMethod
billingMethod,
(Text
"vpceConfigurationArns" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
vpceConfigurationArns
]
)