{-# 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.CodePipeline.Types.ActionTypeProperty 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 ActionTypeProperty = ActionTypeProperty'
{
ActionTypeProperty -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ActionTypeProperty -> Maybe Bool
queryable :: Prelude.Maybe Prelude.Bool,
ActionTypeProperty -> Text
name :: Prelude.Text,
ActionTypeProperty -> Bool
optional :: Prelude.Bool,
ActionTypeProperty -> Bool
key :: Prelude.Bool,
ActionTypeProperty -> Bool
noEcho :: Prelude.Bool
}
deriving (ActionTypeProperty -> ActionTypeProperty -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionTypeProperty -> ActionTypeProperty -> Bool
$c/= :: ActionTypeProperty -> ActionTypeProperty -> Bool
== :: ActionTypeProperty -> ActionTypeProperty -> Bool
$c== :: ActionTypeProperty -> ActionTypeProperty -> Bool
Prelude.Eq, ReadPrec [ActionTypeProperty]
ReadPrec ActionTypeProperty
Int -> ReadS ActionTypeProperty
ReadS [ActionTypeProperty]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionTypeProperty]
$creadListPrec :: ReadPrec [ActionTypeProperty]
readPrec :: ReadPrec ActionTypeProperty
$creadPrec :: ReadPrec ActionTypeProperty
readList :: ReadS [ActionTypeProperty]
$creadList :: ReadS [ActionTypeProperty]
readsPrec :: Int -> ReadS ActionTypeProperty
$creadsPrec :: Int -> ReadS ActionTypeProperty
Prelude.Read, Int -> ActionTypeProperty -> ShowS
[ActionTypeProperty] -> ShowS
ActionTypeProperty -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionTypeProperty] -> ShowS
$cshowList :: [ActionTypeProperty] -> ShowS
show :: ActionTypeProperty -> String
$cshow :: ActionTypeProperty -> String
showsPrec :: Int -> ActionTypeProperty -> ShowS
$cshowsPrec :: Int -> ActionTypeProperty -> ShowS
Prelude.Show, forall x. Rep ActionTypeProperty x -> ActionTypeProperty
forall x. ActionTypeProperty -> Rep ActionTypeProperty x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionTypeProperty x -> ActionTypeProperty
$cfrom :: forall x. ActionTypeProperty -> Rep ActionTypeProperty x
Prelude.Generic)
newActionTypeProperty ::
Prelude.Text ->
Prelude.Bool ->
Prelude.Bool ->
Prelude.Bool ->
ActionTypeProperty
newActionTypeProperty :: Text -> Bool -> Bool -> Bool -> ActionTypeProperty
newActionTypeProperty
Text
pName_
Bool
pOptional_
Bool
pKey_
Bool
pNoEcho_ =
ActionTypeProperty'
{ $sel:description:ActionTypeProperty' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:queryable:ActionTypeProperty' :: Maybe Bool
queryable = forall a. Maybe a
Prelude.Nothing,
$sel:name:ActionTypeProperty' :: Text
name = Text
pName_,
$sel:optional:ActionTypeProperty' :: Bool
optional = Bool
pOptional_,
$sel:key:ActionTypeProperty' :: Bool
key = Bool
pKey_,
$sel:noEcho:ActionTypeProperty' :: Bool
noEcho = Bool
pNoEcho_
}
actionTypeProperty_description :: Lens.Lens' ActionTypeProperty (Prelude.Maybe Prelude.Text)
actionTypeProperty_description :: Lens' ActionTypeProperty (Maybe Text)
actionTypeProperty_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeProperty' {Maybe Text
description :: Maybe Text
$sel:description:ActionTypeProperty' :: ActionTypeProperty -> Maybe Text
description} -> Maybe Text
description) (\s :: ActionTypeProperty
s@ActionTypeProperty' {} Maybe Text
a -> ActionTypeProperty
s {$sel:description:ActionTypeProperty' :: Maybe Text
description = Maybe Text
a} :: ActionTypeProperty)
actionTypeProperty_queryable :: Lens.Lens' ActionTypeProperty (Prelude.Maybe Prelude.Bool)
actionTypeProperty_queryable :: Lens' ActionTypeProperty (Maybe Bool)
actionTypeProperty_queryable = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeProperty' {Maybe Bool
queryable :: Maybe Bool
$sel:queryable:ActionTypeProperty' :: ActionTypeProperty -> Maybe Bool
queryable} -> Maybe Bool
queryable) (\s :: ActionTypeProperty
s@ActionTypeProperty' {} Maybe Bool
a -> ActionTypeProperty
s {$sel:queryable:ActionTypeProperty' :: Maybe Bool
queryable = Maybe Bool
a} :: ActionTypeProperty)
actionTypeProperty_name :: Lens.Lens' ActionTypeProperty Prelude.Text
actionTypeProperty_name :: Lens' ActionTypeProperty Text
actionTypeProperty_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeProperty' {Text
name :: Text
$sel:name:ActionTypeProperty' :: ActionTypeProperty -> Text
name} -> Text
name) (\s :: ActionTypeProperty
s@ActionTypeProperty' {} Text
a -> ActionTypeProperty
s {$sel:name:ActionTypeProperty' :: Text
name = Text
a} :: ActionTypeProperty)
actionTypeProperty_optional :: Lens.Lens' ActionTypeProperty Prelude.Bool
actionTypeProperty_optional :: Lens' ActionTypeProperty Bool
actionTypeProperty_optional = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeProperty' {Bool
optional :: Bool
$sel:optional:ActionTypeProperty' :: ActionTypeProperty -> Bool
optional} -> Bool
optional) (\s :: ActionTypeProperty
s@ActionTypeProperty' {} Bool
a -> ActionTypeProperty
s {$sel:optional:ActionTypeProperty' :: Bool
optional = Bool
a} :: ActionTypeProperty)
actionTypeProperty_key :: Lens.Lens' ActionTypeProperty Prelude.Bool
actionTypeProperty_key :: Lens' ActionTypeProperty Bool
actionTypeProperty_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeProperty' {Bool
key :: Bool
$sel:key:ActionTypeProperty' :: ActionTypeProperty -> Bool
key} -> Bool
key) (\s :: ActionTypeProperty
s@ActionTypeProperty' {} Bool
a -> ActionTypeProperty
s {$sel:key:ActionTypeProperty' :: Bool
key = Bool
a} :: ActionTypeProperty)
actionTypeProperty_noEcho :: Lens.Lens' ActionTypeProperty Prelude.Bool
actionTypeProperty_noEcho :: Lens' ActionTypeProperty Bool
actionTypeProperty_noEcho = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeProperty' {Bool
noEcho :: Bool
$sel:noEcho:ActionTypeProperty' :: ActionTypeProperty -> Bool
noEcho} -> Bool
noEcho) (\s :: ActionTypeProperty
s@ActionTypeProperty' {} Bool
a -> ActionTypeProperty
s {$sel:noEcho:ActionTypeProperty' :: Bool
noEcho = Bool
a} :: ActionTypeProperty)
instance Data.FromJSON ActionTypeProperty where
parseJSON :: Value -> Parser ActionTypeProperty
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActionTypeProperty"
( \Object
x ->
Maybe Text
-> Maybe Bool -> Text -> Bool -> Bool -> Bool -> ActionTypeProperty
ActionTypeProperty'
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
"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
"queryable")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser 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 a
Data..: Key
"optional")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"key")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"noEcho")
)
instance Prelude.Hashable ActionTypeProperty where
hashWithSalt :: Int -> ActionTypeProperty -> Int
hashWithSalt Int
_salt ActionTypeProperty' {Bool
Maybe Bool
Maybe Text
Text
noEcho :: Bool
key :: Bool
optional :: Bool
name :: Text
queryable :: Maybe Bool
description :: Maybe Text
$sel:noEcho:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:key:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:optional:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:name:ActionTypeProperty' :: ActionTypeProperty -> Text
$sel:queryable:ActionTypeProperty' :: ActionTypeProperty -> Maybe Bool
$sel:description:ActionTypeProperty' :: ActionTypeProperty -> 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 Bool
queryable
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
optional
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
noEcho
instance Prelude.NFData ActionTypeProperty where
rnf :: ActionTypeProperty -> ()
rnf ActionTypeProperty' {Bool
Maybe Bool
Maybe Text
Text
noEcho :: Bool
key :: Bool
optional :: Bool
name :: Text
queryable :: Maybe Bool
description :: Maybe Text
$sel:noEcho:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:key:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:optional:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:name:ActionTypeProperty' :: ActionTypeProperty -> Text
$sel:queryable:ActionTypeProperty' :: ActionTypeProperty -> Maybe Bool
$sel:description:ActionTypeProperty' :: ActionTypeProperty -> 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 Bool
queryable
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
optional
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
key
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
noEcho
instance Data.ToJSON ActionTypeProperty where
toJSON :: ActionTypeProperty -> Value
toJSON ActionTypeProperty' {Bool
Maybe Bool
Maybe Text
Text
noEcho :: Bool
key :: Bool
optional :: Bool
name :: Text
queryable :: Maybe Bool
description :: Maybe Text
$sel:noEcho:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:key:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:optional:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:name:ActionTypeProperty' :: ActionTypeProperty -> Text
$sel:queryable:ActionTypeProperty' :: ActionTypeProperty -> Maybe Bool
$sel:description:ActionTypeProperty' :: ActionTypeProperty -> 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
"queryable" 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 Bool
queryable,
forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"optional" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
optional),
forall a. a -> Maybe a
Prelude.Just (Key
"key" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
key),
forall a. a -> Maybe a
Prelude.Just (Key
"noEcho" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
noEcho)
]
)