module Stratosphere.LakeFormation.Permissions.DataLocationResourceProperty (
DataLocationResourceProperty(..), mkDataLocationResourceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataLocationResourceProperty
=
DataLocationResourceProperty {DataLocationResourceProperty -> ()
haddock_workaround_ :: (),
DataLocationResourceProperty -> Maybe (Value Text)
catalogId :: (Prelude.Maybe (Value Prelude.Text)),
DataLocationResourceProperty -> Maybe (Value Text)
s3Resource :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (DataLocationResourceProperty
-> DataLocationResourceProperty -> Bool
(DataLocationResourceProperty
-> DataLocationResourceProperty -> Bool)
-> (DataLocationResourceProperty
-> DataLocationResourceProperty -> Bool)
-> Eq DataLocationResourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataLocationResourceProperty
-> DataLocationResourceProperty -> Bool
== :: DataLocationResourceProperty
-> DataLocationResourceProperty -> Bool
$c/= :: DataLocationResourceProperty
-> DataLocationResourceProperty -> Bool
/= :: DataLocationResourceProperty
-> DataLocationResourceProperty -> Bool
Prelude.Eq, Int -> DataLocationResourceProperty -> ShowS
[DataLocationResourceProperty] -> ShowS
DataLocationResourceProperty -> String
(Int -> DataLocationResourceProperty -> ShowS)
-> (DataLocationResourceProperty -> String)
-> ([DataLocationResourceProperty] -> ShowS)
-> Show DataLocationResourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataLocationResourceProperty -> ShowS
showsPrec :: Int -> DataLocationResourceProperty -> ShowS
$cshow :: DataLocationResourceProperty -> String
show :: DataLocationResourceProperty -> String
$cshowList :: [DataLocationResourceProperty] -> ShowS
showList :: [DataLocationResourceProperty] -> ShowS
Prelude.Show)
mkDataLocationResourceProperty :: DataLocationResourceProperty
mkDataLocationResourceProperty :: DataLocationResourceProperty
mkDataLocationResourceProperty
= DataLocationResourceProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), catalogId :: Maybe (Value Text)
catalogId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
s3Resource :: Maybe (Value Text)
s3Resource = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataLocationResourceProperty where
toResourceProperties :: DataLocationResourceProperty -> ResourceProperties
toResourceProperties DataLocationResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataLocationResourceProperty -> ()
catalogId :: DataLocationResourceProperty -> Maybe (Value Text)
s3Resource :: DataLocationResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
catalogId :: Maybe (Value Text)
s3Resource :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::LakeFormation::Permissions.DataLocationResource",
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
"CatalogId" (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)
catalogId,
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
"S3Resource" (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)
s3Resource])}
instance JSON.ToJSON DataLocationResourceProperty where
toJSON :: DataLocationResourceProperty -> Value
toJSON DataLocationResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataLocationResourceProperty -> ()
catalogId :: DataLocationResourceProperty -> Maybe (Value Text)
s3Resource :: DataLocationResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
catalogId :: Maybe (Value Text)
s3Resource :: 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
"CatalogId" (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)
catalogId,
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
"S3Resource" (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)
s3Resource]))
instance Property "CatalogId" DataLocationResourceProperty where
type PropertyType "CatalogId" DataLocationResourceProperty = Value Prelude.Text
set :: PropertyType "CatalogId" DataLocationResourceProperty
-> DataLocationResourceProperty -> DataLocationResourceProperty
set PropertyType "CatalogId" DataLocationResourceProperty
newValue DataLocationResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataLocationResourceProperty -> ()
catalogId :: DataLocationResourceProperty -> Maybe (Value Text)
s3Resource :: DataLocationResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
catalogId :: Maybe (Value Text)
s3Resource :: Maybe (Value Text)
..}
= DataLocationResourceProperty
{catalogId :: Maybe (Value Text)
catalogId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CatalogId" DataLocationResourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
s3Resource :: Maybe (Value Text)
haddock_workaround_ :: ()
s3Resource :: Maybe (Value Text)
..}
instance Property "S3Resource" DataLocationResourceProperty where
type PropertyType "S3Resource" DataLocationResourceProperty = Value Prelude.Text
set :: PropertyType "S3Resource" DataLocationResourceProperty
-> DataLocationResourceProperty -> DataLocationResourceProperty
set PropertyType "S3Resource" DataLocationResourceProperty
newValue DataLocationResourceProperty {Maybe (Value Text)
()
haddock_workaround_ :: DataLocationResourceProperty -> ()
catalogId :: DataLocationResourceProperty -> Maybe (Value Text)
s3Resource :: DataLocationResourceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
catalogId :: Maybe (Value Text)
s3Resource :: Maybe (Value Text)
..}
= DataLocationResourceProperty
{s3Resource :: Maybe (Value Text)
s3Resource = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "S3Resource" DataLocationResourceProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
catalogId :: Maybe (Value Text)
haddock_workaround_ :: ()
catalogId :: Maybe (Value Text)
..}