{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ActionConfigurationProperty = ActionConfigurationProperty'
{
ActionConfigurationProperty -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ActionConfigurationProperty -> Maybe Bool
queryable :: Prelude.Maybe Prelude.Bool,
ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType
type' :: Prelude.Maybe ActionConfigurationPropertyType,
ActionConfigurationProperty -> Text
name :: Prelude.Text,
ActionConfigurationProperty -> Bool
required :: Prelude.Bool,
ActionConfigurationProperty -> Bool
key :: Prelude.Bool,
ActionConfigurationProperty -> Bool
secret :: Prelude.Bool
}
deriving (ActionConfigurationProperty -> ActionConfigurationProperty -> Bool
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]
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
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.
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'
{ $sel:description:ActionConfigurationProperty' :: Maybe Text
description =
forall a. Maybe a
Prelude.Nothing,
$sel:queryable:ActionConfigurationProperty' :: Maybe Bool
queryable = forall a. Maybe a
Prelude.Nothing,
$sel:type':ActionConfigurationProperty' :: Maybe ActionConfigurationPropertyType
type' = 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_description :: Lens.Lens' ActionConfigurationProperty (Prelude.Maybe Prelude.Text)
actionConfigurationProperty_description :: Lens' ActionConfigurationProperty (Maybe Text)
actionConfigurationProperty_description = 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_queryable :: Lens.Lens' ActionConfigurationProperty (Prelude.Maybe Prelude.Bool)
actionConfigurationProperty_queryable :: Lens' ActionConfigurationProperty (Maybe Bool)
actionConfigurationProperty_queryable = 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 :: Lens'
ActionConfigurationProperty (Maybe ActionConfigurationPropertyType)
actionConfigurationProperty_type = 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_name :: Lens.Lens' ActionConfigurationProperty Prelude.Text
actionConfigurationProperty_name :: Lens' ActionConfigurationProperty Text
actionConfigurationProperty_name = 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 :: Lens' ActionConfigurationProperty Bool
actionConfigurationProperty_required = 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 :: Lens' ActionConfigurationProperty Bool
actionConfigurationProperty_key = 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 :: Lens' ActionConfigurationProperty Bool
actionConfigurationProperty_secret = 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 Data.FromJSON ActionConfigurationProperty where
parseJSON :: Value -> Parser ActionConfigurationProperty
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActionConfigurationProperty"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe ActionConfigurationPropertyType
-> Text
-> Bool
-> Bool
-> Bool
-> ActionConfigurationProperty
ActionConfigurationProperty'
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 (Maybe a)
Data..:? Key
"type")
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
"required")
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
"secret")
)
instance Prelude.Hashable ActionConfigurationProperty where
hashWithSalt :: Int -> ActionConfigurationProperty -> Int
hashWithSalt Int
_salt ActionConfigurationProperty' {Bool
Maybe Bool
Maybe Text
Maybe ActionConfigurationPropertyType
Text
secret :: Bool
key :: Bool
required :: Bool
name :: Text
type' :: Maybe ActionConfigurationPropertyType
queryable :: Maybe Bool
description :: Maybe Text
$sel:secret:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:key:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:required:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:name:ActionConfigurationProperty' :: ActionConfigurationProperty -> Text
$sel:type':ActionConfigurationProperty' :: ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType
$sel:queryable:ActionConfigurationProperty' :: ActionConfigurationProperty -> Maybe Bool
$sel:description:ActionConfigurationProperty' :: ActionConfigurationProperty -> 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` Maybe ActionConfigurationPropertyType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
required
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
secret
instance Prelude.NFData ActionConfigurationProperty where
rnf :: ActionConfigurationProperty -> ()
rnf ActionConfigurationProperty' {Bool
Maybe Bool
Maybe Text
Maybe ActionConfigurationPropertyType
Text
secret :: Bool
key :: Bool
required :: Bool
name :: Text
type' :: Maybe ActionConfigurationPropertyType
queryable :: Maybe Bool
description :: Maybe Text
$sel:secret:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:key:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:required:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:name:ActionConfigurationProperty' :: ActionConfigurationProperty -> Text
$sel:type':ActionConfigurationProperty' :: ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType
$sel:queryable:ActionConfigurationProperty' :: ActionConfigurationProperty -> Maybe Bool
$sel:description:ActionConfigurationProperty' :: ActionConfigurationProperty -> 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 Maybe ActionConfigurationPropertyType
type'
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
required
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
secret
instance Data.ToJSON ActionConfigurationProperty where
toJSON :: ActionConfigurationProperty -> Value
toJSON ActionConfigurationProperty' {Bool
Maybe Bool
Maybe Text
Maybe ActionConfigurationPropertyType
Text
secret :: Bool
key :: Bool
required :: Bool
name :: Text
type' :: Maybe ActionConfigurationPropertyType
queryable :: Maybe Bool
description :: Maybe Text
$sel:secret:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:key:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:required:ActionConfigurationProperty' :: ActionConfigurationProperty -> Bool
$sel:name:ActionConfigurationProperty' :: ActionConfigurationProperty -> Text
$sel:type':ActionConfigurationProperty' :: ActionConfigurationProperty
-> Maybe ActionConfigurationPropertyType
$sel:queryable:ActionConfigurationProperty' :: ActionConfigurationProperty -> Maybe Bool
$sel:description:ActionConfigurationProperty' :: ActionConfigurationProperty -> 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,
(Key
"type" 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 ActionConfigurationPropertyType
type',
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
"required" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
required),
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
"secret" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Bool
secret)
]
)