{-# 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.ActionConfigurationProperty where
import Amazonka.CodePipeline.Types.ActionConfigurationPropertyType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActionConfigurationProperty = ActionConfigurationProperty'
{
ActionConfigurationProperty -> Maybe Bool
queryable :: Prelude.Maybe Prelude.Bool,
ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType
type' :: Prelude.Maybe ActionConfigurationPropertyType,
ActionConfigurationProperty -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ActionConfigurationProperty -> Text
name :: Prelude.Text,
ActionConfigurationProperty -> Bool
required :: Prelude.Bool,
ActionConfigurationProperty -> Bool
key :: Prelude.Bool,
ActionConfigurationProperty -> Bool
secret :: Prelude.Bool
}
deriving (ActionConfigurationProperty -> ActionConfigurationProperty -> Bool
(ActionConfigurationProperty
-> ActionConfigurationProperty -> Bool)
-> (ActionConfigurationProperty
-> ActionConfigurationProperty -> Bool)
-> Eq ActionConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionConfigurationProperty -> ActionConfigurationProperty -> Bool
$c/= :: ActionConfigurationProperty -> ActionConfigurationProperty -> Bool
== :: ActionConfigurationProperty -> ActionConfigurationProperty -> Bool
$c== :: ActionConfigurationProperty -> ActionConfigurationProperty -> Bool
Prelude.Eq, ReadPrec [ActionConfigurationProperty]
ReadPrec ActionConfigurationProperty
Int -> ReadS ActionConfigurationProperty
ReadS [ActionConfigurationProperty]
(Int -> ReadS ActionConfigurationProperty)
-> ReadS [ActionConfigurationProperty]
-> ReadPrec ActionConfigurationProperty
-> ReadPrec [ActionConfigurationProperty]
-> Read ActionConfigurationProperty
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionConfigurationProperty]
$creadListPrec :: ReadPrec [ActionConfigurationProperty]
readPrec :: ReadPrec ActionConfigurationProperty
$creadPrec :: ReadPrec ActionConfigurationProperty
readList :: ReadS [ActionConfigurationProperty]
$creadList :: ReadS [ActionConfigurationProperty]
readsPrec :: Int -> ReadS ActionConfigurationProperty
$creadsPrec :: Int -> ReadS ActionConfigurationProperty
Prelude.Read, Int -> ActionConfigurationProperty -> ShowS
[ActionConfigurationProperty] -> ShowS
ActionConfigurationProperty -> String
(Int -> ActionConfigurationProperty -> ShowS)
-> (ActionConfigurationProperty -> String)
-> ([ActionConfigurationProperty] -> ShowS)
-> Show ActionConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionConfigurationProperty] -> ShowS
$cshowList :: [ActionConfigurationProperty] -> ShowS
show :: ActionConfigurationProperty -> String
$cshow :: ActionConfigurationProperty -> String
showsPrec :: Int -> ActionConfigurationProperty -> ShowS
$cshowsPrec :: Int -> ActionConfigurationProperty -> ShowS
Prelude.Show, (forall x.
ActionConfigurationProperty -> Rep ActionConfigurationProperty x)
-> (forall x.
Rep ActionConfigurationProperty x -> ActionConfigurationProperty)
-> Generic ActionConfigurationProperty
forall x.
Rep ActionConfigurationProperty x -> ActionConfigurationProperty
forall x.
ActionConfigurationProperty -> Rep ActionConfigurationProperty x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ActionConfigurationProperty x -> ActionConfigurationProperty
$cfrom :: forall x.
ActionConfigurationProperty -> Rep ActionConfigurationProperty x
Prelude.Generic)
newActionConfigurationProperty ::
Prelude.Text ->
Prelude.Bool ->
Prelude.Bool ->
Prelude.Bool ->
ActionConfigurationProperty
newActionConfigurationProperty :: Text -> Bool -> Bool -> Bool -> ActionConfigurationProperty
newActionConfigurationProperty
Text
pName_
Bool
pRequired_
Bool
pKey_
Bool
pSecret_ =
ActionConfigurationProperty' :: Maybe Bool
-> Maybe ActionConfigurationPropertyType
-> Maybe Text
-> Text
-> Bool
-> Bool
-> Bool
-> ActionConfigurationProperty
ActionConfigurationProperty'
{ $sel:queryable:ActionConfigurationProperty' :: Maybe Bool
queryable =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:type':ActionConfigurationProperty' :: Maybe ActionConfigurationPropertyType
type' = Maybe ActionConfigurationPropertyType
forall a. Maybe a
Prelude.Nothing,
$sel:description:ActionConfigurationProperty' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ActionConfigurationProperty' :: Text
name = Text
pName_,
$sel:required:ActionConfigurationProperty' :: Bool
required = Bool
pRequired_,
$sel:key:ActionConfigurationProperty' :: Bool
key = Bool
pKey_,
$sel:secret:ActionConfigurationProperty' :: Bool
secret = Bool
pSecret_
}
actionConfigurationProperty_queryable :: Lens.Lens' ActionConfigurationProperty (Prelude.Maybe Prelude.Bool)
actionConfigurationProperty_queryable :: (Maybe Bool -> f (Maybe Bool))
-> ActionConfigurationProperty -> f ActionConfigurationProperty
actionConfigurationProperty_queryable = (ActionConfigurationProperty -> Maybe Bool)
-> (ActionConfigurationProperty
-> Maybe Bool -> ActionConfigurationProperty)
-> Lens
ActionConfigurationProperty
ActionConfigurationProperty
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionConfigurationProperty' {Maybe Bool
queryable :: Maybe Bool
$sel:queryable:ActionConfigurationProperty' :: ActionConfigurationProperty -> Maybe Bool
queryable} -> Maybe Bool
queryable) (\s :: ActionConfigurationProperty
s@ActionConfigurationProperty' {} Maybe Bool
a -> ActionConfigurationProperty
s {$sel:queryable:ActionConfigurationProperty' :: Maybe Bool
queryable = Maybe Bool
a} :: ActionConfigurationProperty)
actionConfigurationProperty_type :: Lens.Lens' ActionConfigurationProperty (Prelude.Maybe ActionConfigurationPropertyType)
actionConfigurationProperty_type :: (Maybe ActionConfigurationPropertyType
-> f (Maybe ActionConfigurationPropertyType))
-> ActionConfigurationProperty -> f ActionConfigurationProperty
actionConfigurationProperty_type = (ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType)
-> (ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType
-> ActionConfigurationProperty)
-> Lens
ActionConfigurationProperty
ActionConfigurationProperty
(Maybe ActionConfigurationPropertyType)
(Maybe ActionConfigurationPropertyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionConfigurationProperty' {Maybe ActionConfigurationPropertyType
type' :: Maybe ActionConfigurationPropertyType
$sel:type':ActionConfigurationProperty' :: ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType
type'} -> Maybe ActionConfigurationPropertyType
type') (\s :: ActionConfigurationProperty
s@ActionConfigurationProperty' {} Maybe ActionConfigurationPropertyType
a -> ActionConfigurationProperty
s {$sel:type':ActionConfigurationProperty' :: Maybe ActionConfigurationPropertyType
type' = Maybe ActionConfigurationPropertyType
a} :: ActionConfigurationProperty)
actionConfigurationProperty_description :: Lens.Lens' ActionConfigurationProperty (Prelude.Maybe Prelude.Text)
actionConfigurationProperty_description :: (Maybe Text -> f (Maybe Text))
-> ActionConfigurationProperty -> f ActionConfigurationProperty
actionConfigurationProperty_description = (ActionConfigurationProperty -> Maybe Text)
-> (ActionConfigurationProperty
-> Maybe Text -> ActionConfigurationProperty)
-> Lens
ActionConfigurationProperty
ActionConfigurationProperty
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionConfigurationProperty' {Maybe Text
description :: Maybe Text
$sel:description:ActionConfigurationProperty' :: ActionConfigurationProperty -> Maybe Text
description} -> Maybe Text
description) (\s :: ActionConfigurationProperty
s@ActionConfigurationProperty' {} Maybe Text
a -> ActionConfigurationProperty
s {$sel:description:ActionConfigurationProperty' :: Maybe Text
description = Maybe Text
a} :: ActionConfigurationProperty)
actionConfigurationProperty_name :: Lens.Lens' ActionConfigurationProperty Prelude.Text
actionConfigurationProperty_name :: (Text -> f Text)
-> ActionConfigurationProperty -> f ActionConfigurationProperty
actionConfigurationProperty_name = (ActionConfigurationProperty -> Text)
-> (ActionConfigurationProperty
-> Text -> ActionConfigurationProperty)
-> Lens
ActionConfigurationProperty ActionConfigurationProperty Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionConfigurationProperty' {Text
name :: Text
$sel:name:ActionConfigurationProperty' :: ActionConfigurationProperty -> Text
name} -> Text
name) (\s :: ActionConfigurationProperty
s@ActionConfigurationProperty' {} Text
a -> ActionConfigurationProperty
s {$sel:name:ActionConfigurationProperty' :: Text
name = Text
a} :: ActionConfigurationProperty)
actionConfigurationProperty_required :: Lens.Lens' ActionConfigurationProperty Prelude.Bool
actionConfigurationProperty_required :: (Bool -> f Bool)
-> ActionConfigurationProperty -> f ActionConfigurationProperty
actionConfigurationProperty_required = (ActionConfigurationProperty -> Bool)
-> (ActionConfigurationProperty
-> Bool -> ActionConfigurationProperty)
-> Lens
ActionConfigurationProperty ActionConfigurationProperty Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionConfigurationProperty' {Bool
required :: Bool
$sel:required:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
required} -> Bool
required) (\s :: ActionConfigurationProperty
s@ActionConfigurationProperty' {} Bool
a -> ActionConfigurationProperty
s {$sel:required:ActionConfigurationProperty' :: Bool
required = Bool
a} :: ActionConfigurationProperty)
actionConfigurationProperty_key :: Lens.Lens' ActionConfigurationProperty Prelude.Bool
actionConfigurationProperty_key :: (Bool -> f Bool)
-> ActionConfigurationProperty -> f ActionConfigurationProperty
actionConfigurationProperty_key = (ActionConfigurationProperty -> Bool)
-> (ActionConfigurationProperty
-> Bool -> ActionConfigurationProperty)
-> Lens
ActionConfigurationProperty ActionConfigurationProperty Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionConfigurationProperty' {Bool
key :: Bool
$sel:key:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
key} -> Bool
key) (\s :: ActionConfigurationProperty
s@ActionConfigurationProperty' {} Bool
a -> ActionConfigurationProperty
s {$sel:key:ActionConfigurationProperty' :: Bool
key = Bool
a} :: ActionConfigurationProperty)
actionConfigurationProperty_secret :: Lens.Lens' ActionConfigurationProperty Prelude.Bool
actionConfigurationProperty_secret :: (Bool -> f Bool)
-> ActionConfigurationProperty -> f ActionConfigurationProperty
actionConfigurationProperty_secret = (ActionConfigurationProperty -> Bool)
-> (ActionConfigurationProperty
-> Bool -> ActionConfigurationProperty)
-> Lens
ActionConfigurationProperty ActionConfigurationProperty Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionConfigurationProperty' {Bool
secret :: Bool
$sel:secret:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
secret} -> Bool
secret) (\s :: ActionConfigurationProperty
s@ActionConfigurationProperty' {} Bool
a -> ActionConfigurationProperty
s {$sel:secret:ActionConfigurationProperty' :: Bool
secret = Bool
a} :: ActionConfigurationProperty)
instance Core.FromJSON ActionConfigurationProperty where
parseJSON :: Value -> Parser ActionConfigurationProperty
parseJSON =
String
-> (Object -> Parser ActionConfigurationProperty)
-> Value
-> Parser ActionConfigurationProperty
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActionConfigurationProperty"
( \Object
x ->
Maybe Bool
-> Maybe ActionConfigurationPropertyType
-> Maybe Text
-> Text
-> Bool
-> Bool
-> Bool
-> ActionConfigurationProperty
ActionConfigurationProperty'
(Maybe Bool
-> Maybe ActionConfigurationPropertyType
-> Maybe Text
-> Text
-> Bool
-> Bool
-> Bool
-> ActionConfigurationProperty)
-> Parser (Maybe Bool)
-> Parser
(Maybe ActionConfigurationPropertyType
-> Maybe Text
-> Text
-> Bool
-> Bool
-> Bool
-> ActionConfigurationProperty)
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 ActionConfigurationPropertyType
-> Maybe Text
-> Text
-> Bool
-> Bool
-> Bool
-> ActionConfigurationProperty)
-> Parser (Maybe ActionConfigurationPropertyType)
-> Parser
(Maybe Text
-> Text -> Bool -> Bool -> Bool -> ActionConfigurationProperty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ActionConfigurationPropertyType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser
(Maybe Text
-> Text -> Bool -> Bool -> Bool -> ActionConfigurationProperty)
-> Parser (Maybe Text)
-> Parser
(Text -> Bool -> Bool -> Bool -> ActionConfigurationProperty)
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 -> ActionConfigurationProperty)
-> Parser Text
-> Parser (Bool -> Bool -> Bool -> ActionConfigurationProperty)
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 -> ActionConfigurationProperty)
-> Parser Bool
-> Parser (Bool -> Bool -> ActionConfigurationProperty)
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
"required")
Parser (Bool -> Bool -> ActionConfigurationProperty)
-> Parser Bool -> Parser (Bool -> ActionConfigurationProperty)
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 -> ActionConfigurationProperty)
-> Parser Bool -> Parser ActionConfigurationProperty
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
"secret")
)
instance Prelude.Hashable ActionConfigurationProperty
instance Prelude.NFData ActionConfigurationProperty
instance Core.ToJSON ActionConfigurationProperty where
toJSON :: ActionConfigurationProperty -> Value
toJSON ActionConfigurationProperty' {Bool
Maybe Bool
Maybe Text
Maybe ActionConfigurationPropertyType
Text
secret :: Bool
key :: Bool
required :: Bool
name :: Text
description :: Maybe Text
type' :: Maybe ActionConfigurationPropertyType
queryable :: Maybe Bool
$sel:secret:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:key:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:required:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:name:ActionConfigurationProperty' :: ActionConfigurationProperty -> Text
$sel:description:ActionConfigurationProperty' :: ActionConfigurationProperty -> Maybe Text
$sel:type':ActionConfigurationProperty' :: ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType
$sel:queryable:ActionConfigurationProperty' :: ActionConfigurationProperty -> 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
"type" Text -> ActionConfigurationPropertyType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ActionConfigurationPropertyType -> Pair)
-> Maybe ActionConfigurationPropertyType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActionConfigurationPropertyType
type',
(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
"required" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
required),
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
"secret" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
secret)
]
)