module Stratosphere.CodePipeline.Webhook.WebhookAuthConfigurationProperty (
WebhookAuthConfigurationProperty(..),
mkWebhookAuthConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data WebhookAuthConfigurationProperty
=
WebhookAuthConfigurationProperty {WebhookAuthConfigurationProperty -> ()
haddock_workaround_ :: (),
WebhookAuthConfigurationProperty -> Maybe (Value Text)
allowedIPRange :: (Prelude.Maybe (Value Prelude.Text)),
WebhookAuthConfigurationProperty -> Maybe (Value Text)
secretToken :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty -> Bool
(WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty -> Bool)
-> (WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty -> Bool)
-> Eq WebhookAuthConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty -> Bool
== :: WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty -> Bool
$c/= :: WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty -> Bool
/= :: WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty -> Bool
Prelude.Eq, Int -> WebhookAuthConfigurationProperty -> ShowS
[WebhookAuthConfigurationProperty] -> ShowS
WebhookAuthConfigurationProperty -> String
(Int -> WebhookAuthConfigurationProperty -> ShowS)
-> (WebhookAuthConfigurationProperty -> String)
-> ([WebhookAuthConfigurationProperty] -> ShowS)
-> Show WebhookAuthConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebhookAuthConfigurationProperty -> ShowS
showsPrec :: Int -> WebhookAuthConfigurationProperty -> ShowS
$cshow :: WebhookAuthConfigurationProperty -> String
show :: WebhookAuthConfigurationProperty -> String
$cshowList :: [WebhookAuthConfigurationProperty] -> ShowS
showList :: [WebhookAuthConfigurationProperty] -> ShowS
Prelude.Show)
mkWebhookAuthConfigurationProperty ::
WebhookAuthConfigurationProperty
mkWebhookAuthConfigurationProperty :: WebhookAuthConfigurationProperty
mkWebhookAuthConfigurationProperty
= WebhookAuthConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), allowedIPRange :: Maybe (Value Text)
allowedIPRange = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
secretToken :: Maybe (Value Text)
secretToken = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WebhookAuthConfigurationProperty where
toResourceProperties :: WebhookAuthConfigurationProperty -> ResourceProperties
toResourceProperties WebhookAuthConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: WebhookAuthConfigurationProperty -> ()
allowedIPRange :: WebhookAuthConfigurationProperty -> Maybe (Value Text)
secretToken :: WebhookAuthConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedIPRange :: Maybe (Value Text)
secretToken :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodePipeline::Webhook.WebhookAuthConfiguration",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowedIPRange" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
allowedIPRange,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SecretToken" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
secretToken])}
instance JSON.ToJSON WebhookAuthConfigurationProperty where
toJSON :: WebhookAuthConfigurationProperty -> Value
toJSON WebhookAuthConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: WebhookAuthConfigurationProperty -> ()
allowedIPRange :: WebhookAuthConfigurationProperty -> Maybe (Value Text)
secretToken :: WebhookAuthConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedIPRange :: Maybe (Value Text)
secretToken :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowedIPRange" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
allowedIPRange,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SecretToken" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
secretToken]))
instance Property "AllowedIPRange" WebhookAuthConfigurationProperty where
type PropertyType "AllowedIPRange" WebhookAuthConfigurationProperty = Value Prelude.Text
set :: PropertyType "AllowedIPRange" WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty
set PropertyType "AllowedIPRange" WebhookAuthConfigurationProperty
newValue WebhookAuthConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: WebhookAuthConfigurationProperty -> ()
allowedIPRange :: WebhookAuthConfigurationProperty -> Maybe (Value Text)
secretToken :: WebhookAuthConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedIPRange :: Maybe (Value Text)
secretToken :: Maybe (Value Text)
..}
= WebhookAuthConfigurationProperty
{allowedIPRange :: Maybe (Value Text)
allowedIPRange = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllowedIPRange" WebhookAuthConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
secretToken :: Maybe (Value Text)
haddock_workaround_ :: ()
secretToken :: Maybe (Value Text)
..}
instance Property "SecretToken" WebhookAuthConfigurationProperty where
type PropertyType "SecretToken" WebhookAuthConfigurationProperty = Value Prelude.Text
set :: PropertyType "SecretToken" WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty
-> WebhookAuthConfigurationProperty
set PropertyType "SecretToken" WebhookAuthConfigurationProperty
newValue WebhookAuthConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: WebhookAuthConfigurationProperty -> ()
allowedIPRange :: WebhookAuthConfigurationProperty -> Maybe (Value Text)
secretToken :: WebhookAuthConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedIPRange :: Maybe (Value Text)
secretToken :: Maybe (Value Text)
..}
= WebhookAuthConfigurationProperty
{secretToken :: Maybe (Value Text)
secretToken = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecretToken" WebhookAuthConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
allowedIPRange :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedIPRange :: Maybe (Value Text)
..}