module Stratosphere.OpenSearchService.Domain.CognitoOptionsProperty (
        CognitoOptionsProperty(..), mkCognitoOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CognitoOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-cognitooptions.html>
    CognitoOptionsProperty {CognitoOptionsProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-cognitooptions.html#cfn-opensearchservice-domain-cognitooptions-enabled>
                            CognitoOptionsProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-cognitooptions.html#cfn-opensearchservice-domain-cognitooptions-identitypoolid>
                            CognitoOptionsProperty -> Maybe (Value Text)
identityPoolId :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-cognitooptions.html#cfn-opensearchservice-domain-cognitooptions-rolearn>
                            CognitoOptionsProperty -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-cognitooptions.html#cfn-opensearchservice-domain-cognitooptions-userpoolid>
                            CognitoOptionsProperty -> Maybe (Value Text)
userPoolId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CognitoOptionsProperty -> CognitoOptionsProperty -> Bool
(CognitoOptionsProperty -> CognitoOptionsProperty -> Bool)
-> (CognitoOptionsProperty -> CognitoOptionsProperty -> Bool)
-> Eq CognitoOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CognitoOptionsProperty -> CognitoOptionsProperty -> Bool
== :: CognitoOptionsProperty -> CognitoOptionsProperty -> Bool
$c/= :: CognitoOptionsProperty -> CognitoOptionsProperty -> Bool
/= :: CognitoOptionsProperty -> CognitoOptionsProperty -> Bool
Prelude.Eq, Int -> CognitoOptionsProperty -> ShowS
[CognitoOptionsProperty] -> ShowS
CognitoOptionsProperty -> String
(Int -> CognitoOptionsProperty -> ShowS)
-> (CognitoOptionsProperty -> String)
-> ([CognitoOptionsProperty] -> ShowS)
-> Show CognitoOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CognitoOptionsProperty -> ShowS
showsPrec :: Int -> CognitoOptionsProperty -> ShowS
$cshow :: CognitoOptionsProperty -> String
show :: CognitoOptionsProperty -> String
$cshowList :: [CognitoOptionsProperty] -> ShowS
showList :: [CognitoOptionsProperty] -> ShowS
Prelude.Show)
mkCognitoOptionsProperty :: CognitoOptionsProperty
mkCognitoOptionsProperty :: CognitoOptionsProperty
mkCognitoOptionsProperty
  = CognitoOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       identityPoolId :: Maybe (Value Text)
identityPoolId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       userPoolId :: Maybe (Value Text)
userPoolId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CognitoOptionsProperty where
  toResourceProperties :: CognitoOptionsProperty -> ResourceProperties
toResourceProperties CognitoOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CognitoOptionsProperty -> ()
enabled :: CognitoOptionsProperty -> Maybe (Value Bool)
identityPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
roleArn :: CognitoOptionsProperty -> Maybe (Value Text)
userPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpenSearchService::Domain.CognitoOptions",
         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
"IdentityPoolId" (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)
identityPoolId,
                            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
"RoleArn" (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)
roleArn,
                            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
"UserPoolId" (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)
userPoolId])}
instance JSON.ToJSON CognitoOptionsProperty where
  toJSON :: CognitoOptionsProperty -> Value
toJSON CognitoOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CognitoOptionsProperty -> ()
enabled :: CognitoOptionsProperty -> Maybe (Value Bool)
identityPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
roleArn :: CognitoOptionsProperty -> Maybe (Value Text)
userPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: 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
"IdentityPoolId" (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)
identityPoolId,
               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
"RoleArn" (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)
roleArn,
               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
"UserPoolId" (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)
userPoolId]))
instance Property "Enabled" CognitoOptionsProperty where
  type PropertyType "Enabled" CognitoOptionsProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" CognitoOptionsProperty
-> CognitoOptionsProperty -> CognitoOptionsProperty
set PropertyType "Enabled" CognitoOptionsProperty
newValue CognitoOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CognitoOptionsProperty -> ()
enabled :: CognitoOptionsProperty -> Maybe (Value Bool)
identityPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
roleArn :: CognitoOptionsProperty -> Maybe (Value Text)
userPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = CognitoOptionsProperty {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" CognitoOptionsProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
haddock_workaround_ :: ()
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
instance Property "IdentityPoolId" CognitoOptionsProperty where
  type PropertyType "IdentityPoolId" CognitoOptionsProperty = Value Prelude.Text
  set :: PropertyType "IdentityPoolId" CognitoOptionsProperty
-> CognitoOptionsProperty -> CognitoOptionsProperty
set PropertyType "IdentityPoolId" CognitoOptionsProperty
newValue CognitoOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CognitoOptionsProperty -> ()
enabled :: CognitoOptionsProperty -> Maybe (Value Bool)
identityPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
roleArn :: CognitoOptionsProperty -> Maybe (Value Text)
userPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = CognitoOptionsProperty
        {identityPoolId :: Maybe (Value Text)
identityPoolId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IdentityPoolId" CognitoOptionsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
instance Property "RoleArn" CognitoOptionsProperty where
  type PropertyType "RoleArn" CognitoOptionsProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" CognitoOptionsProperty
-> CognitoOptionsProperty -> CognitoOptionsProperty
set PropertyType "RoleArn" CognitoOptionsProperty
newValue CognitoOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CognitoOptionsProperty -> ()
enabled :: CognitoOptionsProperty -> Maybe (Value Bool)
identityPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
roleArn :: CognitoOptionsProperty -> Maybe (Value Text)
userPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = CognitoOptionsProperty {roleArn :: Maybe (Value Text)
roleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleArn" CognitoOptionsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
instance Property "UserPoolId" CognitoOptionsProperty where
  type PropertyType "UserPoolId" CognitoOptionsProperty = Value Prelude.Text
  set :: PropertyType "UserPoolId" CognitoOptionsProperty
-> CognitoOptionsProperty -> CognitoOptionsProperty
set PropertyType "UserPoolId" CognitoOptionsProperty
newValue CognitoOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CognitoOptionsProperty -> ()
enabled :: CognitoOptionsProperty -> Maybe (Value Bool)
identityPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
roleArn :: CognitoOptionsProperty -> Maybe (Value Text)
userPoolId :: CognitoOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
userPoolId :: Maybe (Value Text)
..}
    = CognitoOptionsProperty {userPoolId :: Maybe (Value Text)
userPoolId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UserPoolId" CognitoOptionsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
identityPoolId :: Maybe (Value Text)
roleArn :: Maybe (Value Text)
..}