module Stratosphere.S3.AccessGrantsLocation (
        AccessGrantsLocation(..), mkAccessGrantsLocation
    ) 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 AccessGrantsLocation
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrantslocation.html>
    AccessGrantsLocation {AccessGrantsLocation -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrantslocation.html#cfn-s3-accessgrantslocation-iamrolearn>
                          AccessGrantsLocation -> Maybe (Value Text)
iamRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrantslocation.html#cfn-s3-accessgrantslocation-locationscope>
                          AccessGrantsLocation -> Maybe (Value Text)
locationScope :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3-accessgrantslocation.html#cfn-s3-accessgrantslocation-tags>
                          AccessGrantsLocation -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (AccessGrantsLocation -> AccessGrantsLocation -> Bool
(AccessGrantsLocation -> AccessGrantsLocation -> Bool)
-> (AccessGrantsLocation -> AccessGrantsLocation -> Bool)
-> Eq AccessGrantsLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessGrantsLocation -> AccessGrantsLocation -> Bool
== :: AccessGrantsLocation -> AccessGrantsLocation -> Bool
$c/= :: AccessGrantsLocation -> AccessGrantsLocation -> Bool
/= :: AccessGrantsLocation -> AccessGrantsLocation -> Bool
Prelude.Eq, Int -> AccessGrantsLocation -> ShowS
[AccessGrantsLocation] -> ShowS
AccessGrantsLocation -> String
(Int -> AccessGrantsLocation -> ShowS)
-> (AccessGrantsLocation -> String)
-> ([AccessGrantsLocation] -> ShowS)
-> Show AccessGrantsLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessGrantsLocation -> ShowS
showsPrec :: Int -> AccessGrantsLocation -> ShowS
$cshow :: AccessGrantsLocation -> String
show :: AccessGrantsLocation -> String
$cshowList :: [AccessGrantsLocation] -> ShowS
showList :: [AccessGrantsLocation] -> ShowS
Prelude.Show)
mkAccessGrantsLocation :: AccessGrantsLocation
mkAccessGrantsLocation :: AccessGrantsLocation
mkAccessGrantsLocation
  = AccessGrantsLocation
      {haddock_workaround_ :: ()
haddock_workaround_ = (), iamRoleArn :: Maybe (Value Text)
iamRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       locationScope :: Maybe (Value Text)
locationScope = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessGrantsLocation where
  toResourceProperties :: AccessGrantsLocation -> ResourceProperties
toResourceProperties AccessGrantsLocation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsLocation -> ()
iamRoleArn :: AccessGrantsLocation -> Maybe (Value Text)
locationScope :: AccessGrantsLocation -> Maybe (Value Text)
tags :: AccessGrantsLocation -> Maybe [Tag]
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
locationScope :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3::AccessGrantsLocation",
         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
"IamRoleArn" (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)
iamRoleArn,
                            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
"LocationScope" (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)
locationScope,
                            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 AccessGrantsLocation where
  toJSON :: AccessGrantsLocation -> Value
toJSON AccessGrantsLocation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsLocation -> ()
iamRoleArn :: AccessGrantsLocation -> Maybe (Value Text)
locationScope :: AccessGrantsLocation -> Maybe (Value Text)
tags :: AccessGrantsLocation -> Maybe [Tag]
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
locationScope :: 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
"IamRoleArn" (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)
iamRoleArn,
               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
"LocationScope" (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)
locationScope,
               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 "IamRoleArn" AccessGrantsLocation where
  type PropertyType "IamRoleArn" AccessGrantsLocation = Value Prelude.Text
  set :: PropertyType "IamRoleArn" AccessGrantsLocation
-> AccessGrantsLocation -> AccessGrantsLocation
set PropertyType "IamRoleArn" AccessGrantsLocation
newValue AccessGrantsLocation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsLocation -> ()
iamRoleArn :: AccessGrantsLocation -> Maybe (Value Text)
locationScope :: AccessGrantsLocation -> Maybe (Value Text)
tags :: AccessGrantsLocation -> Maybe [Tag]
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
locationScope :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = AccessGrantsLocation {iamRoleArn :: Maybe (Value Text)
iamRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IamRoleArn" AccessGrantsLocation
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
locationScope :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
locationScope :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "LocationScope" AccessGrantsLocation where
  type PropertyType "LocationScope" AccessGrantsLocation = Value Prelude.Text
  set :: PropertyType "LocationScope" AccessGrantsLocation
-> AccessGrantsLocation -> AccessGrantsLocation
set PropertyType "LocationScope" AccessGrantsLocation
newValue AccessGrantsLocation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsLocation -> ()
iamRoleArn :: AccessGrantsLocation -> Maybe (Value Text)
locationScope :: AccessGrantsLocation -> Maybe (Value Text)
tags :: AccessGrantsLocation -> Maybe [Tag]
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
locationScope :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = AccessGrantsLocation {locationScope :: Maybe (Value Text)
locationScope = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LocationScope" AccessGrantsLocation
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" AccessGrantsLocation where
  type PropertyType "Tags" AccessGrantsLocation = [Tag]
  set :: PropertyType "Tags" AccessGrantsLocation
-> AccessGrantsLocation -> AccessGrantsLocation
set PropertyType "Tags" AccessGrantsLocation
newValue AccessGrantsLocation {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: AccessGrantsLocation -> ()
iamRoleArn :: AccessGrantsLocation -> Maybe (Value Text)
locationScope :: AccessGrantsLocation -> Maybe (Value Text)
tags :: AccessGrantsLocation -> Maybe [Tag]
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
locationScope :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = AccessGrantsLocation {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" AccessGrantsLocation
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
locationScope :: Maybe (Value Text)
haddock_workaround_ :: ()
iamRoleArn :: Maybe (Value Text)
locationScope :: Maybe (Value Text)
..}