module Stratosphere.PCAConnectorSCEP.Connector.OpenIdConfigurationProperty (
        OpenIdConfigurationProperty(..), mkOpenIdConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data OpenIdConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcaconnectorscep-connector-openidconfiguration.html>
    OpenIdConfigurationProperty {OpenIdConfigurationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcaconnectorscep-connector-openidconfiguration.html#cfn-pcaconnectorscep-connector-openidconfiguration-audience>
                                 OpenIdConfigurationProperty -> Maybe (Value Text)
audience :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcaconnectorscep-connector-openidconfiguration.html#cfn-pcaconnectorscep-connector-openidconfiguration-issuer>
                                 OpenIdConfigurationProperty -> Maybe (Value Text)
issuer :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcaconnectorscep-connector-openidconfiguration.html#cfn-pcaconnectorscep-connector-openidconfiguration-subject>
                                 OpenIdConfigurationProperty -> Maybe (Value Text)
subject :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (OpenIdConfigurationProperty -> OpenIdConfigurationProperty -> Bool
(OpenIdConfigurationProperty
 -> OpenIdConfigurationProperty -> Bool)
-> (OpenIdConfigurationProperty
    -> OpenIdConfigurationProperty -> Bool)
-> Eq OpenIdConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OpenIdConfigurationProperty -> OpenIdConfigurationProperty -> Bool
== :: OpenIdConfigurationProperty -> OpenIdConfigurationProperty -> Bool
$c/= :: OpenIdConfigurationProperty -> OpenIdConfigurationProperty -> Bool
/= :: OpenIdConfigurationProperty -> OpenIdConfigurationProperty -> Bool
Prelude.Eq, Int -> OpenIdConfigurationProperty -> ShowS
[OpenIdConfigurationProperty] -> ShowS
OpenIdConfigurationProperty -> String
(Int -> OpenIdConfigurationProperty -> ShowS)
-> (OpenIdConfigurationProperty -> String)
-> ([OpenIdConfigurationProperty] -> ShowS)
-> Show OpenIdConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OpenIdConfigurationProperty -> ShowS
showsPrec :: Int -> OpenIdConfigurationProperty -> ShowS
$cshow :: OpenIdConfigurationProperty -> String
show :: OpenIdConfigurationProperty -> String
$cshowList :: [OpenIdConfigurationProperty] -> ShowS
showList :: [OpenIdConfigurationProperty] -> ShowS
Prelude.Show)
mkOpenIdConfigurationProperty :: OpenIdConfigurationProperty
mkOpenIdConfigurationProperty :: OpenIdConfigurationProperty
mkOpenIdConfigurationProperty
  = OpenIdConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), audience :: Maybe (Value Text)
audience = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       issuer :: Maybe (Value Text)
issuer = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, subject :: Maybe (Value Text)
subject = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OpenIdConfigurationProperty where
  toResourceProperties :: OpenIdConfigurationProperty -> ResourceProperties
toResourceProperties OpenIdConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OpenIdConfigurationProperty -> ()
audience :: OpenIdConfigurationProperty -> Maybe (Value Text)
issuer :: OpenIdConfigurationProperty -> Maybe (Value Text)
subject :: OpenIdConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
issuer :: Maybe (Value Text)
subject :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PCAConnectorSCEP::Connector.OpenIdConfiguration",
         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
"Audience" (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)
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,
                            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
"Subject" (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)
subject])}
instance JSON.ToJSON OpenIdConfigurationProperty where
  toJSON :: OpenIdConfigurationProperty -> Value
toJSON OpenIdConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OpenIdConfigurationProperty -> ()
audience :: OpenIdConfigurationProperty -> Maybe (Value Text)
issuer :: OpenIdConfigurationProperty -> Maybe (Value Text)
subject :: OpenIdConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
issuer :: Maybe (Value Text)
subject :: 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
"Audience" (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)
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,
               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
"Subject" (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)
subject]))
instance Property "Audience" OpenIdConfigurationProperty where
  type PropertyType "Audience" OpenIdConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Audience" OpenIdConfigurationProperty
-> OpenIdConfigurationProperty -> OpenIdConfigurationProperty
set PropertyType "Audience" OpenIdConfigurationProperty
newValue OpenIdConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OpenIdConfigurationProperty -> ()
audience :: OpenIdConfigurationProperty -> Maybe (Value Text)
issuer :: OpenIdConfigurationProperty -> Maybe (Value Text)
subject :: OpenIdConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
issuer :: Maybe (Value Text)
subject :: Maybe (Value Text)
..}
    = OpenIdConfigurationProperty
        {audience :: Maybe (Value Text)
audience = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Audience" OpenIdConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
issuer :: Maybe (Value Text)
subject :: Maybe (Value Text)
haddock_workaround_ :: ()
issuer :: Maybe (Value Text)
subject :: Maybe (Value Text)
..}
instance Property "Issuer" OpenIdConfigurationProperty where
  type PropertyType "Issuer" OpenIdConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Issuer" OpenIdConfigurationProperty
-> OpenIdConfigurationProperty -> OpenIdConfigurationProperty
set PropertyType "Issuer" OpenIdConfigurationProperty
newValue OpenIdConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OpenIdConfigurationProperty -> ()
audience :: OpenIdConfigurationProperty -> Maybe (Value Text)
issuer :: OpenIdConfigurationProperty -> Maybe (Value Text)
subject :: OpenIdConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
issuer :: Maybe (Value Text)
subject :: Maybe (Value Text)
..}
    = OpenIdConfigurationProperty {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" OpenIdConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
subject :: Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
subject :: Maybe (Value Text)
..}
instance Property "Subject" OpenIdConfigurationProperty where
  type PropertyType "Subject" OpenIdConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Subject" OpenIdConfigurationProperty
-> OpenIdConfigurationProperty -> OpenIdConfigurationProperty
set PropertyType "Subject" OpenIdConfigurationProperty
newValue OpenIdConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: OpenIdConfigurationProperty -> ()
audience :: OpenIdConfigurationProperty -> Maybe (Value Text)
issuer :: OpenIdConfigurationProperty -> Maybe (Value Text)
subject :: OpenIdConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
issuer :: Maybe (Value Text)
subject :: Maybe (Value Text)
..}
    = OpenIdConfigurationProperty {subject :: Maybe (Value Text)
subject = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Subject" OpenIdConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
issuer :: Maybe (Value Text)
haddock_workaround_ :: ()
audience :: Maybe (Value Text)
issuer :: Maybe (Value Text)
..}