module Stratosphere.OpenSearchService.Domain.JWTOptionsProperty (
        JWTOptionsProperty(..), mkJWTOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data JWTOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-jwtoptions.html>
    JWTOptionsProperty {JWTOptionsProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-jwtoptions.html#cfn-opensearchservice-domain-jwtoptions-enabled>
                        JWTOptionsProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-jwtoptions.html#cfn-opensearchservice-domain-jwtoptions-publickey>
                        JWTOptionsProperty -> Maybe (Value Text)
publicKey :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-jwtoptions.html#cfn-opensearchservice-domain-jwtoptions-roleskey>
                        JWTOptionsProperty -> Maybe (Value Text)
rolesKey :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-jwtoptions.html#cfn-opensearchservice-domain-jwtoptions-subjectkey>
                        JWTOptionsProperty -> Maybe (Value Text)
subjectKey :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (JWTOptionsProperty -> JWTOptionsProperty -> Bool
(JWTOptionsProperty -> JWTOptionsProperty -> Bool)
-> (JWTOptionsProperty -> JWTOptionsProperty -> Bool)
-> Eq JWTOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: JWTOptionsProperty -> JWTOptionsProperty -> Bool
== :: JWTOptionsProperty -> JWTOptionsProperty -> Bool
$c/= :: JWTOptionsProperty -> JWTOptionsProperty -> Bool
/= :: JWTOptionsProperty -> JWTOptionsProperty -> Bool
Prelude.Eq, Int -> JWTOptionsProperty -> ShowS
[JWTOptionsProperty] -> ShowS
JWTOptionsProperty -> String
(Int -> JWTOptionsProperty -> ShowS)
-> (JWTOptionsProperty -> String)
-> ([JWTOptionsProperty] -> ShowS)
-> Show JWTOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> JWTOptionsProperty -> ShowS
showsPrec :: Int -> JWTOptionsProperty -> ShowS
$cshow :: JWTOptionsProperty -> String
show :: JWTOptionsProperty -> String
$cshowList :: [JWTOptionsProperty] -> ShowS
showList :: [JWTOptionsProperty] -> ShowS
Prelude.Show)
mkJWTOptionsProperty :: JWTOptionsProperty
mkJWTOptionsProperty :: JWTOptionsProperty
mkJWTOptionsProperty
  = JWTOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       publicKey :: Maybe (Value Text)
publicKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, rolesKey :: Maybe (Value Text)
rolesKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       subjectKey :: Maybe (Value Text)
subjectKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties JWTOptionsProperty where
  toResourceProperties :: JWTOptionsProperty -> ResourceProperties
toResourceProperties JWTOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: JWTOptionsProperty -> ()
enabled :: JWTOptionsProperty -> Maybe (Value Bool)
publicKey :: JWTOptionsProperty -> Maybe (Value Text)
rolesKey :: JWTOptionsProperty -> Maybe (Value Text)
subjectKey :: JWTOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpenSearchService::Domain.JWTOptions",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
                            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
"PublicKey" (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)
publicKey,
                            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
"RolesKey" (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)
rolesKey,
                            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
"SubjectKey" (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)
subjectKey])}
instance JSON.ToJSON JWTOptionsProperty where
  toJSON :: JWTOptionsProperty -> Value
toJSON JWTOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: JWTOptionsProperty -> ()
enabled :: JWTOptionsProperty -> Maybe (Value Bool)
publicKey :: JWTOptionsProperty -> Maybe (Value Text)
rolesKey :: JWTOptionsProperty -> Maybe (Value Text)
subjectKey :: JWTOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
subjectKey :: 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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
               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
"PublicKey" (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)
publicKey,
               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
"RolesKey" (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)
rolesKey,
               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
"SubjectKey" (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)
subjectKey]))
instance Property "Enabled" JWTOptionsProperty where
  type PropertyType "Enabled" JWTOptionsProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" JWTOptionsProperty
-> JWTOptionsProperty -> JWTOptionsProperty
set PropertyType "Enabled" JWTOptionsProperty
newValue JWTOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: JWTOptionsProperty -> ()
enabled :: JWTOptionsProperty -> Maybe (Value Bool)
publicKey :: JWTOptionsProperty -> Maybe (Value Text)
rolesKey :: JWTOptionsProperty -> Maybe (Value Text)
subjectKey :: JWTOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
..}
    = JWTOptionsProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" JWTOptionsProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
haddock_workaround_ :: ()
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
..}
instance Property "PublicKey" JWTOptionsProperty where
  type PropertyType "PublicKey" JWTOptionsProperty = Value Prelude.Text
  set :: PropertyType "PublicKey" JWTOptionsProperty
-> JWTOptionsProperty -> JWTOptionsProperty
set PropertyType "PublicKey" JWTOptionsProperty
newValue JWTOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: JWTOptionsProperty -> ()
enabled :: JWTOptionsProperty -> Maybe (Value Bool)
publicKey :: JWTOptionsProperty -> Maybe (Value Text)
rolesKey :: JWTOptionsProperty -> Maybe (Value Text)
subjectKey :: JWTOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
..}
    = JWTOptionsProperty {publicKey :: Maybe (Value Text)
publicKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PublicKey" JWTOptionsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
..}
instance Property "RolesKey" JWTOptionsProperty where
  type PropertyType "RolesKey" JWTOptionsProperty = Value Prelude.Text
  set :: PropertyType "RolesKey" JWTOptionsProperty
-> JWTOptionsProperty -> JWTOptionsProperty
set PropertyType "RolesKey" JWTOptionsProperty
newValue JWTOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: JWTOptionsProperty -> ()
enabled :: JWTOptionsProperty -> Maybe (Value Bool)
publicKey :: JWTOptionsProperty -> Maybe (Value Text)
rolesKey :: JWTOptionsProperty -> Maybe (Value Text)
subjectKey :: JWTOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
..}
    = JWTOptionsProperty {rolesKey :: Maybe (Value Text)
rolesKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RolesKey" JWTOptionsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
..}
instance Property "SubjectKey" JWTOptionsProperty where
  type PropertyType "SubjectKey" JWTOptionsProperty = Value Prelude.Text
  set :: PropertyType "SubjectKey" JWTOptionsProperty
-> JWTOptionsProperty -> JWTOptionsProperty
set PropertyType "SubjectKey" JWTOptionsProperty
newValue JWTOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: JWTOptionsProperty -> ()
enabled :: JWTOptionsProperty -> Maybe (Value Bool)
publicKey :: JWTOptionsProperty -> Maybe (Value Text)
rolesKey :: JWTOptionsProperty -> Maybe (Value Text)
subjectKey :: JWTOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
subjectKey :: Maybe (Value Text)
..}
    = JWTOptionsProperty {subjectKey :: Maybe (Value Text)
subjectKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SubjectKey" JWTOptionsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
publicKey :: Maybe (Value Text)
rolesKey :: Maybe (Value Text)
..}