{-# 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.InstanceProfile where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data InstanceProfile = InstanceProfile'
{
InstanceProfile -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
InstanceProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
InstanceProfile -> Maybe [Text]
excludeAppPackagesFromCleanup :: Prelude.Maybe [Prelude.Text],
InstanceProfile -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
InstanceProfile -> Maybe Bool
packageCleanup :: Prelude.Maybe Prelude.Bool,
InstanceProfile -> Maybe Bool
rebootAfterUse :: Prelude.Maybe Prelude.Bool
}
deriving (InstanceProfile -> InstanceProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceProfile -> InstanceProfile -> Bool
$c/= :: InstanceProfile -> InstanceProfile -> Bool
== :: InstanceProfile -> InstanceProfile -> Bool
$c== :: InstanceProfile -> InstanceProfile -> Bool
Prelude.Eq, ReadPrec [InstanceProfile]
ReadPrec InstanceProfile
Int -> ReadS InstanceProfile
ReadS [InstanceProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceProfile]
$creadListPrec :: ReadPrec [InstanceProfile]
readPrec :: ReadPrec InstanceProfile
$creadPrec :: ReadPrec InstanceProfile
readList :: ReadS [InstanceProfile]
$creadList :: ReadS [InstanceProfile]
readsPrec :: Int -> ReadS InstanceProfile
$creadsPrec :: Int -> ReadS InstanceProfile
Prelude.Read, Int -> InstanceProfile -> ShowS
[InstanceProfile] -> ShowS
InstanceProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceProfile] -> ShowS
$cshowList :: [InstanceProfile] -> ShowS
show :: InstanceProfile -> String
$cshow :: InstanceProfile -> String
showsPrec :: Int -> InstanceProfile -> ShowS
$cshowsPrec :: Int -> InstanceProfile -> ShowS
Prelude.Show, forall x. Rep InstanceProfile x -> InstanceProfile
forall x. InstanceProfile -> Rep InstanceProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceProfile x -> InstanceProfile
$cfrom :: forall x. InstanceProfile -> Rep InstanceProfile x
Prelude.Generic)
newInstanceProfile ::
InstanceProfile
newInstanceProfile :: InstanceProfile
newInstanceProfile =
InstanceProfile'
{ $sel:arn:InstanceProfile' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:description:InstanceProfile' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:excludeAppPackagesFromCleanup:InstanceProfile' :: Maybe [Text]
excludeAppPackagesFromCleanup = forall a. Maybe a
Prelude.Nothing,
$sel:name:InstanceProfile' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:packageCleanup:InstanceProfile' :: Maybe Bool
packageCleanup = forall a. Maybe a
Prelude.Nothing,
$sel:rebootAfterUse:InstanceProfile' :: Maybe Bool
rebootAfterUse = forall a. Maybe a
Prelude.Nothing
}
instanceProfile_arn :: Lens.Lens' InstanceProfile (Prelude.Maybe Prelude.Text)
instanceProfile_arn :: Lens' InstanceProfile (Maybe Text)
instanceProfile_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceProfile' {Maybe Text
arn :: Maybe Text
$sel:arn:InstanceProfile' :: InstanceProfile -> Maybe Text
arn} -> Maybe Text
arn) (\s :: InstanceProfile
s@InstanceProfile' {} Maybe Text
a -> InstanceProfile
s {$sel:arn:InstanceProfile' :: Maybe Text
arn = Maybe Text
a} :: InstanceProfile)
instanceProfile_description :: Lens.Lens' InstanceProfile (Prelude.Maybe Prelude.Text)
instanceProfile_description :: Lens' InstanceProfile (Maybe Text)
instanceProfile_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceProfile' {Maybe Text
description :: Maybe Text
$sel:description:InstanceProfile' :: InstanceProfile -> Maybe Text
description} -> Maybe Text
description) (\s :: InstanceProfile
s@InstanceProfile' {} Maybe Text
a -> InstanceProfile
s {$sel:description:InstanceProfile' :: Maybe Text
description = Maybe Text
a} :: InstanceProfile)
instanceProfile_excludeAppPackagesFromCleanup :: Lens.Lens' InstanceProfile (Prelude.Maybe [Prelude.Text])
instanceProfile_excludeAppPackagesFromCleanup :: Lens' InstanceProfile (Maybe [Text])
instanceProfile_excludeAppPackagesFromCleanup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceProfile' {Maybe [Text]
excludeAppPackagesFromCleanup :: Maybe [Text]
$sel:excludeAppPackagesFromCleanup:InstanceProfile' :: InstanceProfile -> Maybe [Text]
excludeAppPackagesFromCleanup} -> Maybe [Text]
excludeAppPackagesFromCleanup) (\s :: InstanceProfile
s@InstanceProfile' {} Maybe [Text]
a -> InstanceProfile
s {$sel:excludeAppPackagesFromCleanup:InstanceProfile' :: Maybe [Text]
excludeAppPackagesFromCleanup = Maybe [Text]
a} :: InstanceProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instanceProfile_name :: Lens.Lens' InstanceProfile (Prelude.Maybe Prelude.Text)
instanceProfile_name :: Lens' InstanceProfile (Maybe Text)
instanceProfile_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceProfile' {Maybe Text
name :: Maybe Text
$sel:name:InstanceProfile' :: InstanceProfile -> Maybe Text
name} -> Maybe Text
name) (\s :: InstanceProfile
s@InstanceProfile' {} Maybe Text
a -> InstanceProfile
s {$sel:name:InstanceProfile' :: Maybe Text
name = Maybe Text
a} :: InstanceProfile)
instanceProfile_packageCleanup :: Lens.Lens' InstanceProfile (Prelude.Maybe Prelude.Bool)
instanceProfile_packageCleanup :: Lens' InstanceProfile (Maybe Bool)
instanceProfile_packageCleanup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceProfile' {Maybe Bool
packageCleanup :: Maybe Bool
$sel:packageCleanup:InstanceProfile' :: InstanceProfile -> Maybe Bool
packageCleanup} -> Maybe Bool
packageCleanup) (\s :: InstanceProfile
s@InstanceProfile' {} Maybe Bool
a -> InstanceProfile
s {$sel:packageCleanup:InstanceProfile' :: Maybe Bool
packageCleanup = Maybe Bool
a} :: InstanceProfile)
instanceProfile_rebootAfterUse :: Lens.Lens' InstanceProfile (Prelude.Maybe Prelude.Bool)
instanceProfile_rebootAfterUse :: Lens' InstanceProfile (Maybe Bool)
instanceProfile_rebootAfterUse = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceProfile' {Maybe Bool
rebootAfterUse :: Maybe Bool
$sel:rebootAfterUse:InstanceProfile' :: InstanceProfile -> Maybe Bool
rebootAfterUse} -> Maybe Bool
rebootAfterUse) (\s :: InstanceProfile
s@InstanceProfile' {} Maybe Bool
a -> InstanceProfile
s {$sel:rebootAfterUse:InstanceProfile' :: Maybe Bool
rebootAfterUse = Maybe Bool
a} :: InstanceProfile)
instance Data.FromJSON InstanceProfile where
parseJSON :: Value -> Parser InstanceProfile
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InstanceProfile"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> InstanceProfile
InstanceProfile'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"excludeAppPackagesFromCleanup"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"packageCleanup")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"rebootAfterUse")
)
instance Prelude.Hashable InstanceProfile where
hashWithSalt :: Int -> InstanceProfile -> Int
hashWithSalt Int
_salt InstanceProfile' {Maybe Bool
Maybe [Text]
Maybe Text
rebootAfterUse :: Maybe Bool
packageCleanup :: Maybe Bool
name :: Maybe Text
excludeAppPackagesFromCleanup :: Maybe [Text]
description :: Maybe Text
arn :: Maybe Text
$sel:rebootAfterUse:InstanceProfile' :: InstanceProfile -> Maybe Bool
$sel:packageCleanup:InstanceProfile' :: InstanceProfile -> Maybe Bool
$sel:name:InstanceProfile' :: InstanceProfile -> Maybe Text
$sel:excludeAppPackagesFromCleanup:InstanceProfile' :: InstanceProfile -> Maybe [Text]
$sel:description:InstanceProfile' :: InstanceProfile -> Maybe Text
$sel:arn:InstanceProfile' :: InstanceProfile -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
excludeAppPackagesFromCleanup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
packageCleanup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
rebootAfterUse
instance Prelude.NFData InstanceProfile where
rnf :: InstanceProfile -> ()
rnf InstanceProfile' {Maybe Bool
Maybe [Text]
Maybe Text
rebootAfterUse :: Maybe Bool
packageCleanup :: Maybe Bool
name :: Maybe Text
excludeAppPackagesFromCleanup :: Maybe [Text]
description :: Maybe Text
arn :: Maybe Text
$sel:rebootAfterUse:InstanceProfile' :: InstanceProfile -> Maybe Bool
$sel:packageCleanup:InstanceProfile' :: InstanceProfile -> Maybe Bool
$sel:name:InstanceProfile' :: InstanceProfile -> Maybe Text
$sel:excludeAppPackagesFromCleanup:InstanceProfile' :: InstanceProfile -> Maybe [Text]
$sel:description:InstanceProfile' :: InstanceProfile -> Maybe Text
$sel:arn:InstanceProfile' :: InstanceProfile -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 [Text]
excludeAppPackagesFromCleanup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
packageCleanup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
rebootAfterUse