module Stratosphere.S3.AccessGrantsInstance (
AccessGrantsInstance(..), mkAccessGrantsInstance
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data AccessGrantsInstance
=
AccessGrantsInstance {AccessGrantsInstance -> ()
haddock_workaround_ :: (),
AccessGrantsInstance -> Maybe (Value Text)
identityCenterArn :: (Prelude.Maybe (Value Prelude.Text)),
AccessGrantsInstance -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (AccessGrantsInstance -> AccessGrantsInstance -> Bool
(AccessGrantsInstance -> AccessGrantsInstance -> Bool)
-> (AccessGrantsInstance -> AccessGrantsInstance -> Bool)
-> Eq AccessGrantsInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessGrantsInstance -> AccessGrantsInstance -> Bool
== :: AccessGrantsInstance -> AccessGrantsInstance -> Bool
$c/= :: AccessGrantsInstance -> AccessGrantsInstance -> Bool
/= :: AccessGrantsInstance -> AccessGrantsInstance -> Bool
Prelude.Eq, Int -> AccessGrantsInstance -> ShowS
[AccessGrantsInstance] -> ShowS
AccessGrantsInstance -> String
(Int -> AccessGrantsInstance -> ShowS)
-> (AccessGrantsInstance -> String)
-> ([AccessGrantsInstance] -> ShowS)
-> Show AccessGrantsInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessGrantsInstance -> ShowS
showsPrec :: Int -> AccessGrantsInstance -> ShowS
$cshow :: AccessGrantsInstance -> String
show :: AccessGrantsInstance -> String
$cshowList :: [AccessGrantsInstance] -> ShowS
showList :: [AccessGrantsInstance] -> ShowS
Prelude.Show)
mkAccessGrantsInstance :: AccessGrantsInstance
mkAccessGrantsInstance :: AccessGrantsInstance
mkAccessGrantsInstance
= AccessGrantsInstance
{haddock_workaround_ :: ()
haddock_workaround_ = (), identityCenterArn :: Maybe (Value Text)
identityCenterArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessGrantsInstance where
toResourceProperties :: AccessGrantsInstance -> ResourceProperties
toResourceProperties AccessGrantsInstance {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsInstance -> ()
identityCenterArn :: AccessGrantsInstance -> Maybe (Value Text)
tags :: AccessGrantsInstance -> Maybe [Tag]
haddock_workaround_ :: ()
identityCenterArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3::AccessGrantsInstance",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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
"IdentityCenterArn" (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)
identityCenterArn,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])}
instance JSON.ToJSON AccessGrantsInstance where
toJSON :: AccessGrantsInstance -> Value
toJSON AccessGrantsInstance {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsInstance -> ()
identityCenterArn :: AccessGrantsInstance -> Maybe (Value Text)
tags :: AccessGrantsInstance -> Maybe [Tag]
haddock_workaround_ :: ()
identityCenterArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= [(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
"IdentityCenterArn" (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)
identityCenterArn,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))
instance Property "IdentityCenterArn" AccessGrantsInstance where
type PropertyType "IdentityCenterArn" AccessGrantsInstance = Value Prelude.Text
set :: PropertyType "IdentityCenterArn" AccessGrantsInstance
-> AccessGrantsInstance -> AccessGrantsInstance
set PropertyType "IdentityCenterArn" AccessGrantsInstance
newValue AccessGrantsInstance {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsInstance -> ()
identityCenterArn :: AccessGrantsInstance -> Maybe (Value Text)
tags :: AccessGrantsInstance -> Maybe [Tag]
haddock_workaround_ :: ()
identityCenterArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= AccessGrantsInstance
{identityCenterArn :: Maybe (Value Text)
identityCenterArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IdentityCenterArn" AccessGrantsInstance
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" AccessGrantsInstance where
type PropertyType "Tags" AccessGrantsInstance = [Tag]
set :: PropertyType "Tags" AccessGrantsInstance
-> AccessGrantsInstance -> AccessGrantsInstance
set PropertyType "Tags" AccessGrantsInstance
newValue AccessGrantsInstance {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsInstance -> ()
identityCenterArn :: AccessGrantsInstance -> Maybe (Value Text)
tags :: AccessGrantsInstance -> Maybe [Tag]
haddock_workaround_ :: ()
identityCenterArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
= AccessGrantsInstance {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" AccessGrantsInstance
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
identityCenterArn :: Maybe (Value Text)
haddock_workaround_ :: ()
identityCenterArn :: Maybe (Value Text)
..}