module Stratosphere.Kendra.DataSource.AccessControlListConfigurationProperty (
        AccessControlListConfigurationProperty(..),
        mkAccessControlListConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessControlListConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-accesscontrollistconfiguration.html>
    AccessControlListConfigurationProperty {AccessControlListConfigurationProperty -> ()
haddock_workaround_ :: (),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-accesscontrollistconfiguration.html#cfn-kendra-datasource-accesscontrollistconfiguration-keypath>
                                            AccessControlListConfigurationProperty -> Maybe (Value Text)
keyPath :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AccessControlListConfigurationProperty
-> AccessControlListConfigurationProperty -> Bool
(AccessControlListConfigurationProperty
 -> AccessControlListConfigurationProperty -> Bool)
-> (AccessControlListConfigurationProperty
    -> AccessControlListConfigurationProperty -> Bool)
-> Eq AccessControlListConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessControlListConfigurationProperty
-> AccessControlListConfigurationProperty -> Bool
== :: AccessControlListConfigurationProperty
-> AccessControlListConfigurationProperty -> Bool
$c/= :: AccessControlListConfigurationProperty
-> AccessControlListConfigurationProperty -> Bool
/= :: AccessControlListConfigurationProperty
-> AccessControlListConfigurationProperty -> Bool
Prelude.Eq, Int -> AccessControlListConfigurationProperty -> ShowS
[AccessControlListConfigurationProperty] -> ShowS
AccessControlListConfigurationProperty -> String
(Int -> AccessControlListConfigurationProperty -> ShowS)
-> (AccessControlListConfigurationProperty -> String)
-> ([AccessControlListConfigurationProperty] -> ShowS)
-> Show AccessControlListConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessControlListConfigurationProperty -> ShowS
showsPrec :: Int -> AccessControlListConfigurationProperty -> ShowS
$cshow :: AccessControlListConfigurationProperty -> String
show :: AccessControlListConfigurationProperty -> String
$cshowList :: [AccessControlListConfigurationProperty] -> ShowS
showList :: [AccessControlListConfigurationProperty] -> ShowS
Prelude.Show)
mkAccessControlListConfigurationProperty ::
  AccessControlListConfigurationProperty
mkAccessControlListConfigurationProperty :: AccessControlListConfigurationProperty
mkAccessControlListConfigurationProperty
  = AccessControlListConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), keyPath :: Maybe (Value Text)
keyPath = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessControlListConfigurationProperty where
  toResourceProperties :: AccessControlListConfigurationProperty -> ResourceProperties
toResourceProperties AccessControlListConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessControlListConfigurationProperty -> ()
keyPath :: AccessControlListConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
keyPath :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Kendra::DataSource.AccessControlListConfiguration",
         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
"KeyPath" (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)
keyPath])}
instance JSON.ToJSON AccessControlListConfigurationProperty where
  toJSON :: AccessControlListConfigurationProperty -> Value
toJSON AccessControlListConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessControlListConfigurationProperty -> ()
keyPath :: AccessControlListConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
keyPath :: 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
"KeyPath" (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)
keyPath]))
instance Property "KeyPath" AccessControlListConfigurationProperty where
  type PropertyType "KeyPath" AccessControlListConfigurationProperty = Value Prelude.Text
  set :: PropertyType "KeyPath" AccessControlListConfigurationProperty
-> AccessControlListConfigurationProperty
-> AccessControlListConfigurationProperty
set PropertyType "KeyPath" AccessControlListConfigurationProperty
newValue AccessControlListConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessControlListConfigurationProperty -> ()
keyPath :: AccessControlListConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
keyPath :: Maybe (Value Text)
..}
    = AccessControlListConfigurationProperty
        {keyPath :: Maybe (Value Text)
keyPath = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KeyPath" AccessControlListConfigurationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}