{-# 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.OpsWorks.Types.Recipes 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 Recipes = Recipes'
{
Recipes -> Maybe [Text]
configure :: Prelude.Maybe [Prelude.Text],
Recipes -> Maybe [Text]
deploy :: Prelude.Maybe [Prelude.Text],
Recipes -> Maybe [Text]
setup :: Prelude.Maybe [Prelude.Text],
Recipes -> Maybe [Text]
shutdown :: Prelude.Maybe [Prelude.Text],
Recipes -> Maybe [Text]
undeploy :: Prelude.Maybe [Prelude.Text]
}
deriving (Recipes -> Recipes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Recipes -> Recipes -> Bool
$c/= :: Recipes -> Recipes -> Bool
== :: Recipes -> Recipes -> Bool
$c== :: Recipes -> Recipes -> Bool
Prelude.Eq, ReadPrec [Recipes]
ReadPrec Recipes
Int -> ReadS Recipes
ReadS [Recipes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Recipes]
$creadListPrec :: ReadPrec [Recipes]
readPrec :: ReadPrec Recipes
$creadPrec :: ReadPrec Recipes
readList :: ReadS [Recipes]
$creadList :: ReadS [Recipes]
readsPrec :: Int -> ReadS Recipes
$creadsPrec :: Int -> ReadS Recipes
Prelude.Read, Int -> Recipes -> ShowS
[Recipes] -> ShowS
Recipes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Recipes] -> ShowS
$cshowList :: [Recipes] -> ShowS
show :: Recipes -> String
$cshow :: Recipes -> String
showsPrec :: Int -> Recipes -> ShowS
$cshowsPrec :: Int -> Recipes -> ShowS
Prelude.Show, forall x. Rep Recipes x -> Recipes
forall x. Recipes -> Rep Recipes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Recipes x -> Recipes
$cfrom :: forall x. Recipes -> Rep Recipes x
Prelude.Generic)
newRecipes ::
Recipes
newRecipes :: Recipes
newRecipes =
Recipes'
{ $sel:configure:Recipes' :: Maybe [Text]
configure = forall a. Maybe a
Prelude.Nothing,
$sel:deploy:Recipes' :: Maybe [Text]
deploy = forall a. Maybe a
Prelude.Nothing,
$sel:setup:Recipes' :: Maybe [Text]
setup = forall a. Maybe a
Prelude.Nothing,
$sel:shutdown:Recipes' :: Maybe [Text]
shutdown = forall a. Maybe a
Prelude.Nothing,
$sel:undeploy:Recipes' :: Maybe [Text]
undeploy = forall a. Maybe a
Prelude.Nothing
}
recipes_configure :: Lens.Lens' Recipes (Prelude.Maybe [Prelude.Text])
recipes_configure :: Lens' Recipes (Maybe [Text])
recipes_configure = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipes' {Maybe [Text]
configure :: Maybe [Text]
$sel:configure:Recipes' :: Recipes -> Maybe [Text]
configure} -> Maybe [Text]
configure) (\s :: Recipes
s@Recipes' {} Maybe [Text]
a -> Recipes
s {$sel:configure:Recipes' :: Maybe [Text]
configure = Maybe [Text]
a} :: Recipes) 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
recipes_deploy :: Lens.Lens' Recipes (Prelude.Maybe [Prelude.Text])
recipes_deploy :: Lens' Recipes (Maybe [Text])
recipes_deploy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipes' {Maybe [Text]
deploy :: Maybe [Text]
$sel:deploy:Recipes' :: Recipes -> Maybe [Text]
deploy} -> Maybe [Text]
deploy) (\s :: Recipes
s@Recipes' {} Maybe [Text]
a -> Recipes
s {$sel:deploy:Recipes' :: Maybe [Text]
deploy = Maybe [Text]
a} :: Recipes) 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
recipes_setup :: Lens.Lens' Recipes (Prelude.Maybe [Prelude.Text])
recipes_setup :: Lens' Recipes (Maybe [Text])
recipes_setup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipes' {Maybe [Text]
setup :: Maybe [Text]
$sel:setup:Recipes' :: Recipes -> Maybe [Text]
setup} -> Maybe [Text]
setup) (\s :: Recipes
s@Recipes' {} Maybe [Text]
a -> Recipes
s {$sel:setup:Recipes' :: Maybe [Text]
setup = Maybe [Text]
a} :: Recipes) 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
recipes_shutdown :: Lens.Lens' Recipes (Prelude.Maybe [Prelude.Text])
recipes_shutdown :: Lens' Recipes (Maybe [Text])
recipes_shutdown = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipes' {Maybe [Text]
shutdown :: Maybe [Text]
$sel:shutdown:Recipes' :: Recipes -> Maybe [Text]
shutdown} -> Maybe [Text]
shutdown) (\s :: Recipes
s@Recipes' {} Maybe [Text]
a -> Recipes
s {$sel:shutdown:Recipes' :: Maybe [Text]
shutdown = Maybe [Text]
a} :: Recipes) 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
recipes_undeploy :: Lens.Lens' Recipes (Prelude.Maybe [Prelude.Text])
recipes_undeploy :: Lens' Recipes (Maybe [Text])
recipes_undeploy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipes' {Maybe [Text]
undeploy :: Maybe [Text]
$sel:undeploy:Recipes' :: Recipes -> Maybe [Text]
undeploy} -> Maybe [Text]
undeploy) (\s :: Recipes
s@Recipes' {} Maybe [Text]
a -> Recipes
s {$sel:undeploy:Recipes' :: Maybe [Text]
undeploy = Maybe [Text]
a} :: Recipes) 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
instance Data.FromJSON Recipes where
parseJSON :: Value -> Parser Recipes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Recipes"
( \Object
x ->
Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> Recipes
Recipes'
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
"Configure" 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
"Deploy" 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
"Setup" 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
"Shutdown" 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
"Undeploy" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Recipes where
hashWithSalt :: Int -> Recipes -> Int
hashWithSalt Int
_salt Recipes' {Maybe [Text]
undeploy :: Maybe [Text]
shutdown :: Maybe [Text]
setup :: Maybe [Text]
deploy :: Maybe [Text]
configure :: Maybe [Text]
$sel:undeploy:Recipes' :: Recipes -> Maybe [Text]
$sel:shutdown:Recipes' :: Recipes -> Maybe [Text]
$sel:setup:Recipes' :: Recipes -> Maybe [Text]
$sel:deploy:Recipes' :: Recipes -> Maybe [Text]
$sel:configure:Recipes' :: Recipes -> Maybe [Text]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
configure
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
deploy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
setup
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
shutdown
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
undeploy
instance Prelude.NFData Recipes where
rnf :: Recipes -> ()
rnf Recipes' {Maybe [Text]
undeploy :: Maybe [Text]
shutdown :: Maybe [Text]
setup :: Maybe [Text]
deploy :: Maybe [Text]
configure :: Maybe [Text]
$sel:undeploy:Recipes' :: Recipes -> Maybe [Text]
$sel:shutdown:Recipes' :: Recipes -> Maybe [Text]
$sel:setup:Recipes' :: Recipes -> Maybe [Text]
$sel:deploy:Recipes' :: Recipes -> Maybe [Text]
$sel:configure:Recipes' :: Recipes -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
configure
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
deploy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
setup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
shutdown
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
undeploy
instance Data.ToJSON Recipes where
toJSON :: Recipes -> Value
toJSON Recipes' {Maybe [Text]
undeploy :: Maybe [Text]
shutdown :: Maybe [Text]
setup :: Maybe [Text]
deploy :: Maybe [Text]
configure :: Maybe [Text]
$sel:undeploy:Recipes' :: Recipes -> Maybe [Text]
$sel:shutdown:Recipes' :: Recipes -> Maybe [Text]
$sel:setup:Recipes' :: Recipes -> Maybe [Text]
$sel:deploy:Recipes' :: Recipes -> Maybe [Text]
$sel:configure:Recipes' :: Recipes -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Configure" 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]
configure,
(Key
"Deploy" 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]
deploy,
(Key
"Setup" 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]
setup,
(Key
"Shutdown" 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]
shutdown,
(Key
"Undeploy" 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]
undeploy
]
)