module Stratosphere.BedrockAgentCore.Gateway.CustomJWTAuthorizerConfigurationProperty (
        CustomJWTAuthorizerConfigurationProperty(..),
        mkCustomJWTAuthorizerConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CustomJWTAuthorizerConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-gateway-customjwtauthorizerconfiguration.html>
    CustomJWTAuthorizerConfigurationProperty {CustomJWTAuthorizerConfigurationProperty -> ()
haddock_workaround_ :: (),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-gateway-customjwtauthorizerconfiguration.html#cfn-bedrockagentcore-gateway-customjwtauthorizerconfiguration-allowedaudience>
                                              CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
allowedAudience :: (Prelude.Maybe (ValueList Prelude.Text)),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-gateway-customjwtauthorizerconfiguration.html#cfn-bedrockagentcore-gateway-customjwtauthorizerconfiguration-allowedclients>
                                              CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
allowedClients :: (Prelude.Maybe (ValueList Prelude.Text)),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-gateway-customjwtauthorizerconfiguration.html#cfn-bedrockagentcore-gateway-customjwtauthorizerconfiguration-discoveryurl>
                                              CustomJWTAuthorizerConfigurationProperty -> Value Text
discoveryUrl :: (Value Prelude.Text)}
  deriving stock (CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty -> Bool
(CustomJWTAuthorizerConfigurationProperty
 -> CustomJWTAuthorizerConfigurationProperty -> Bool)
-> (CustomJWTAuthorizerConfigurationProperty
    -> CustomJWTAuthorizerConfigurationProperty -> Bool)
-> Eq CustomJWTAuthorizerConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty -> Bool
== :: CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty -> Bool
$c/= :: CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty -> Bool
/= :: CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty -> Bool
Prelude.Eq, Int -> CustomJWTAuthorizerConfigurationProperty -> ShowS
[CustomJWTAuthorizerConfigurationProperty] -> ShowS
CustomJWTAuthorizerConfigurationProperty -> String
(Int -> CustomJWTAuthorizerConfigurationProperty -> ShowS)
-> (CustomJWTAuthorizerConfigurationProperty -> String)
-> ([CustomJWTAuthorizerConfigurationProperty] -> ShowS)
-> Show CustomJWTAuthorizerConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CustomJWTAuthorizerConfigurationProperty -> ShowS
showsPrec :: Int -> CustomJWTAuthorizerConfigurationProperty -> ShowS
$cshow :: CustomJWTAuthorizerConfigurationProperty -> String
show :: CustomJWTAuthorizerConfigurationProperty -> String
$cshowList :: [CustomJWTAuthorizerConfigurationProperty] -> ShowS
showList :: [CustomJWTAuthorizerConfigurationProperty] -> ShowS
Prelude.Show)
mkCustomJWTAuthorizerConfigurationProperty ::
  Value Prelude.Text -> CustomJWTAuthorizerConfigurationProperty
mkCustomJWTAuthorizerConfigurationProperty :: Value Text -> CustomJWTAuthorizerConfigurationProperty
mkCustomJWTAuthorizerConfigurationProperty Value Text
discoveryUrl
  = CustomJWTAuthorizerConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), discoveryUrl :: Value Text
discoveryUrl = Value Text
discoveryUrl,
       allowedAudience :: Maybe (ValueList Text)
allowedAudience = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       allowedClients :: Maybe (ValueList Text)
allowedClients = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CustomJWTAuthorizerConfigurationProperty where
  toResourceProperties :: CustomJWTAuthorizerConfigurationProperty -> ResourceProperties
toResourceProperties CustomJWTAuthorizerConfigurationProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CustomJWTAuthorizerConfigurationProperty -> ()
allowedAudience :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
allowedClients :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
discoveryUrl :: CustomJWTAuthorizerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
allowedClients :: Maybe (ValueList Text)
discoveryUrl :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::BedrockAgentCore::Gateway.CustomJWTAuthorizerConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"DiscoveryUrl" 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..= Value Text
discoveryUrl]
                           ([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
"AllowedAudience" (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)
allowedAudience,
                               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
"AllowedClients" (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)
allowedClients]))}
instance JSON.ToJSON CustomJWTAuthorizerConfigurationProperty where
  toJSON :: CustomJWTAuthorizerConfigurationProperty -> Value
toJSON CustomJWTAuthorizerConfigurationProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CustomJWTAuthorizerConfigurationProperty -> ()
allowedAudience :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
allowedClients :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
discoveryUrl :: CustomJWTAuthorizerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
allowedClients :: Maybe (ValueList Text)
discoveryUrl :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"DiscoveryUrl" 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..= Value Text
discoveryUrl]
              ([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
"AllowedAudience" (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)
allowedAudience,
                  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
"AllowedClients" (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)
allowedClients])))
instance Property "AllowedAudience" CustomJWTAuthorizerConfigurationProperty where
  type PropertyType "AllowedAudience" CustomJWTAuthorizerConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType
  "AllowedAudience" CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty
set PropertyType
  "AllowedAudience" CustomJWTAuthorizerConfigurationProperty
newValue CustomJWTAuthorizerConfigurationProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CustomJWTAuthorizerConfigurationProperty -> ()
allowedAudience :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
allowedClients :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
discoveryUrl :: CustomJWTAuthorizerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
allowedClients :: Maybe (ValueList Text)
discoveryUrl :: Value Text
..}
    = CustomJWTAuthorizerConfigurationProperty
        {allowedAudience :: Maybe (ValueList Text)
allowedAudience = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "AllowedAudience" CustomJWTAuthorizerConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
allowedClients :: Maybe (ValueList Text)
discoveryUrl :: Value Text
haddock_workaround_ :: ()
allowedClients :: Maybe (ValueList Text)
discoveryUrl :: Value Text
..}
instance Property "AllowedClients" CustomJWTAuthorizerConfigurationProperty where
  type PropertyType "AllowedClients" CustomJWTAuthorizerConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType
  "AllowedClients" CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty
set PropertyType
  "AllowedClients" CustomJWTAuthorizerConfigurationProperty
newValue CustomJWTAuthorizerConfigurationProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CustomJWTAuthorizerConfigurationProperty -> ()
allowedAudience :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
allowedClients :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
discoveryUrl :: CustomJWTAuthorizerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
allowedClients :: Maybe (ValueList Text)
discoveryUrl :: Value Text
..}
    = CustomJWTAuthorizerConfigurationProperty
        {allowedClients :: Maybe (ValueList Text)
allowedClients = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "AllowedClients" CustomJWTAuthorizerConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
discoveryUrl :: Value Text
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
discoveryUrl :: Value Text
..}
instance Property "DiscoveryUrl" CustomJWTAuthorizerConfigurationProperty where
  type PropertyType "DiscoveryUrl" CustomJWTAuthorizerConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "DiscoveryUrl" CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty
-> CustomJWTAuthorizerConfigurationProperty
set PropertyType
  "DiscoveryUrl" CustomJWTAuthorizerConfigurationProperty
newValue CustomJWTAuthorizerConfigurationProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: CustomJWTAuthorizerConfigurationProperty -> ()
allowedAudience :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
allowedClients :: CustomJWTAuthorizerConfigurationProperty -> Maybe (ValueList Text)
discoveryUrl :: CustomJWTAuthorizerConfigurationProperty -> Value Text
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
allowedClients :: Maybe (ValueList Text)
discoveryUrl :: Value Text
..}
    = CustomJWTAuthorizerConfigurationProperty
        {discoveryUrl :: Value Text
discoveryUrl = PropertyType
  "DiscoveryUrl" CustomJWTAuthorizerConfigurationProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
allowedClients :: Maybe (ValueList Text)
haddock_workaround_ :: ()
allowedAudience :: Maybe (ValueList Text)
allowedClients :: Maybe (ValueList Text)
..}