{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActionTypeProperty = ActionTypeProperty'
{
ActionTypeProperty -> Maybe Bool
queryable :: Prelude.Maybe Prelude.Bool,
ActionTypeProperty -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ActionTypeProperty -> Text
name :: Prelude.Text,
ActionTypeProperty -> Bool
optional :: Prelude.Bool,
ActionTypeProperty -> Bool
key :: Prelude.Bool,
ActionTypeProperty -> Bool
noEcho :: Prelude.Bool
}
deriving (ActionTypeProperty -> ActionTypeProperty -> Bool
(ActionTypeProperty -> ActionTypeProperty -> Bool)
-> (ActionTypeProperty -> ActionTypeProperty -> Bool)
-> Eq ActionTypeProperty
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]
(Int -> ReadS ActionTypeProperty)
-> ReadS [ActionTypeProperty]
-> ReadPrec ActionTypeProperty
-> ReadPrec [ActionTypeProperty]
-> Read 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
(Int -> ActionTypeProperty -> ShowS)
-> (ActionTypeProperty -> String)
-> ([ActionTypeProperty] -> ShowS)
-> Show ActionTypeProperty
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. ActionTypeProperty -> Rep ActionTypeProperty x)
-> (forall x. Rep ActionTypeProperty x -> ActionTypeProperty)
-> Generic ActionTypeProperty
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' :: Maybe Bool
-> Maybe Text -> Text -> Bool -> Bool -> Bool -> ActionTypeProperty
ActionTypeProperty'
{ $sel:queryable:ActionTypeProperty' :: Maybe Bool
queryable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:description:ActionTypeProperty' :: Maybe Text
description = Maybe Text
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_queryable :: Lens.Lens' ActionTypeProperty (Prelude.Maybe Prelude.Bool)
actionTypeProperty_queryable :: (Maybe Bool -> f (Maybe Bool))
-> ActionTypeProperty -> f ActionTypeProperty
actionTypeProperty_queryable = (ActionTypeProperty -> Maybe Bool)
-> (ActionTypeProperty -> Maybe Bool -> ActionTypeProperty)
-> Lens
ActionTypeProperty ActionTypeProperty (Maybe Bool) (Maybe Bool)
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_description :: Lens.Lens' ActionTypeProperty (Prelude.Maybe Prelude.Text)
actionTypeProperty_description :: (Maybe Text -> f (Maybe Text))
-> ActionTypeProperty -> f ActionTypeProperty
actionTypeProperty_description = (ActionTypeProperty -> Maybe Text)
-> (ActionTypeProperty -> Maybe Text -> ActionTypeProperty)
-> Lens
ActionTypeProperty ActionTypeProperty (Maybe Text) (Maybe Text)
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_name :: Lens.Lens' ActionTypeProperty Prelude.Text
actionTypeProperty_name :: (Text -> f Text) -> ActionTypeProperty -> f ActionTypeProperty
actionTypeProperty_name = (ActionTypeProperty -> Text)
-> (ActionTypeProperty -> Text -> ActionTypeProperty)
-> Lens ActionTypeProperty ActionTypeProperty Text Text
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 :: (Bool -> f Bool) -> ActionTypeProperty -> f ActionTypeProperty
actionTypeProperty_optional = (ActionTypeProperty -> Bool)
-> (ActionTypeProperty -> Bool -> ActionTypeProperty)
-> Lens ActionTypeProperty ActionTypeProperty Bool Bool
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 :: (Bool -> f Bool) -> ActionTypeProperty -> f ActionTypeProperty
actionTypeProperty_key = (ActionTypeProperty -> Bool)
-> (ActionTypeProperty -> Bool -> ActionTypeProperty)
-> Lens ActionTypeProperty ActionTypeProperty Bool Bool
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 :: (Bool -> f Bool) -> ActionTypeProperty -> f ActionTypeProperty
actionTypeProperty_noEcho = (ActionTypeProperty -> Bool)
-> (ActionTypeProperty -> Bool -> ActionTypeProperty)
-> Lens ActionTypeProperty ActionTypeProperty Bool Bool
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 Core.FromJSON ActionTypeProperty where
parseJSON :: Value -> Parser ActionTypeProperty
parseJSON =
String
-> (Object -> Parser ActionTypeProperty)
-> Value
-> Parser ActionTypeProperty
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActionTypeProperty"
( \Object
x ->
Maybe Bool
-> Maybe Text -> Text -> Bool -> Bool -> Bool -> ActionTypeProperty
ActionTypeProperty'
(Maybe Bool
-> Maybe Text
-> Text
-> Bool
-> Bool
-> Bool
-> ActionTypeProperty)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text -> Text -> Bool -> Bool -> Bool -> ActionTypeProperty)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"queryable")
Parser
(Maybe Text -> Text -> Bool -> Bool -> Bool -> ActionTypeProperty)
-> Parser (Maybe Text)
-> Parser (Text -> Bool -> Bool -> Bool -> ActionTypeProperty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
Parser (Text -> Bool -> Bool -> Bool -> ActionTypeProperty)
-> Parser Text
-> Parser (Bool -> Bool -> Bool -> ActionTypeProperty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (Bool -> Bool -> Bool -> ActionTypeProperty)
-> Parser Bool -> Parser (Bool -> Bool -> ActionTypeProperty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"optional")
Parser (Bool -> Bool -> ActionTypeProperty)
-> Parser Bool -> Parser (Bool -> ActionTypeProperty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"key")
Parser (Bool -> ActionTypeProperty)
-> Parser Bool -> Parser ActionTypeProperty
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Bool
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"noEcho")
)
instance Prelude.Hashable ActionTypeProperty
instance Prelude.NFData ActionTypeProperty
instance Core.ToJSON ActionTypeProperty where
toJSON :: ActionTypeProperty -> Value
toJSON ActionTypeProperty' {Bool
Maybe Bool
Maybe Text
Text
noEcho :: Bool
key :: Bool
optional :: Bool
name :: Text
description :: Maybe Text
queryable :: Maybe Bool
$sel:noEcho:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:key:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:optional:ActionTypeProperty' :: ActionTypeProperty -> Bool
$sel:name:ActionTypeProperty' :: ActionTypeProperty -> Text
$sel:description:ActionTypeProperty' :: ActionTypeProperty -> Maybe Text
$sel:queryable:ActionTypeProperty' :: ActionTypeProperty -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"queryable" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
queryable,
(Text
"description" 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
description,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"optional" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
optional),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"key" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
key),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"noEcho" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
noEcho)
]
)