module Stratosphere.ApiGatewayV2.Authorizer.JWTConfigurationProperty (
JWTConfigurationProperty(..), mkJWTConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JWTConfigurationProperty
=
JWTConfigurationProperty {JWTConfigurationProperty -> ()
haddock_workaround_ :: (),
JWTConfigurationProperty -> Maybe (ValueList Text)
audience :: (Prelude.Maybe (ValueList Prelude.Text)),
JWTConfigurationProperty -> Maybe (Value Text)
issuer :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (JWTConfigurationProperty -> JWTConfigurationProperty -> Bool
(JWTConfigurationProperty -> JWTConfigurationProperty -> Bool)
-> (JWTConfigurationProperty -> JWTConfigurationProperty -> Bool)
-> Eq JWTConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: JWTConfigurationProperty -> JWTConfigurationProperty -> Bool
== :: JWTConfigurationProperty -> JWTConfigurationProperty -> Bool
$c/= :: JWTConfigurationProperty -> JWTConfigurationProperty -> Bool
/= :: JWTConfigurationProperty -> JWTConfigurationProperty -> Bool
Prelude.Eq, Int -> JWTConfigurationProperty -> ShowS
[JWTConfigurationProperty] -> ShowS
JWTConfigurationProperty -> String
(Int -> JWTConfigurationProperty -> ShowS)
-> (JWTConfigurationProperty -> String)
-> ([JWTConfigurationProperty] -> ShowS)
-> Show JWTConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> JWTConfigurationProperty -> ShowS
showsPrec :: Int -> JWTConfigurationProperty -> ShowS
$cshow :: JWTConfigurationProperty -> String
show :: JWTConfigurationProperty -> String
$cshowList :: [JWTConfigurationProperty] -> ShowS
showList :: [JWTConfigurationProperty] -> ShowS
Prelude.Show)
mkJWTConfigurationProperty :: JWTConfigurationProperty
mkJWTConfigurationProperty :: JWTConfigurationProperty
mkJWTConfigurationProperty
= JWTConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), audience :: Maybe (ValueList Text)
audience = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
issuer :: Maybe (Value Text)
issuer = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties JWTConfigurationProperty where
toResourceProperties :: JWTConfigurationProperty -> ResourceProperties
toResourceProperties JWTConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: JWTConfigurationProperty -> ()
audience :: JWTConfigurationProperty -> Maybe (ValueList Text)
issuer :: JWTConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (ValueList Text)
issuer :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGatewayV2::Authorizer.JWTConfiguration",
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 -> ValueList 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
"Audience" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
audience,
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
"Issuer" (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)
issuer])}
instance JSON.ToJSON JWTConfigurationProperty where
toJSON :: JWTConfigurationProperty -> Value
toJSON JWTConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: JWTConfigurationProperty -> ()
audience :: JWTConfigurationProperty -> Maybe (ValueList Text)
issuer :: JWTConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (ValueList Text)
issuer :: 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 -> ValueList 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
"Audience" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
audience,
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
"Issuer" (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)
issuer]))
instance Property "Audience" JWTConfigurationProperty where
type PropertyType "Audience" JWTConfigurationProperty = ValueList Prelude.Text
set :: PropertyType "Audience" JWTConfigurationProperty
-> JWTConfigurationProperty -> JWTConfigurationProperty
set PropertyType "Audience" JWTConfigurationProperty
newValue JWTConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: JWTConfigurationProperty -> ()
audience :: JWTConfigurationProperty -> Maybe (ValueList Text)
issuer :: JWTConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (ValueList Text)
issuer :: Maybe (Value Text)
..}
= JWTConfigurationProperty {audience :: Maybe (ValueList Text)
audience = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Audience" JWTConfigurationProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
issuer :: Maybe (Value Text)
haddock_workaround_ :: ()
issuer :: Maybe (Value Text)
..}
instance Property "Issuer" JWTConfigurationProperty where
type PropertyType "Issuer" JWTConfigurationProperty = Value Prelude.Text
set :: PropertyType "Issuer" JWTConfigurationProperty
-> JWTConfigurationProperty -> JWTConfigurationProperty
set PropertyType "Issuer" JWTConfigurationProperty
newValue JWTConfigurationProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: JWTConfigurationProperty -> ()
audience :: JWTConfigurationProperty -> Maybe (ValueList Text)
issuer :: JWTConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (ValueList Text)
issuer :: Maybe (Value Text)
..}
= JWTConfigurationProperty {issuer :: Maybe (Value Text)
issuer = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Issuer" JWTConfigurationProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
audience :: Maybe (ValueList Text)
haddock_workaround_ :: ()
audience :: Maybe (ValueList Text)
..}