module Stratosphere.AuditManager.Assessment.RoleProperty (
        RoleProperty(..), mkRoleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RoleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-auditmanager-assessment-role.html>
    RoleProperty {RoleProperty -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-auditmanager-assessment-role.html#cfn-auditmanager-assessment-role-rolearn>
                  RoleProperty -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-auditmanager-assessment-role.html#cfn-auditmanager-assessment-role-roletype>
                  RoleProperty -> Maybe (Value Text)
roleType :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RoleProperty -> RoleProperty -> Bool
(RoleProperty -> RoleProperty -> Bool)
-> (RoleProperty -> RoleProperty -> Bool) -> Eq RoleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RoleProperty -> RoleProperty -> Bool
== :: RoleProperty -> RoleProperty -> Bool
$c/= :: RoleProperty -> RoleProperty -> Bool
/= :: RoleProperty -> RoleProperty -> Bool
Prelude.Eq, Int -> RoleProperty -> ShowS
[RoleProperty] -> ShowS
RoleProperty -> String
(Int -> RoleProperty -> ShowS)
-> (RoleProperty -> String)
-> ([RoleProperty] -> ShowS)
-> Show RoleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RoleProperty -> ShowS
showsPrec :: Int -> RoleProperty -> ShowS
$cshow :: RoleProperty -> String
show :: RoleProperty -> String
$cshowList :: [RoleProperty] -> ShowS
showList :: [RoleProperty] -> ShowS
Prelude.Show)
mkRoleProperty :: RoleProperty
mkRoleProperty :: RoleProperty
mkRoleProperty
  = RoleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       roleType :: Maybe (Value Text)
roleType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RoleProperty where
  toResourceProperties :: RoleProperty -> ResourceProperties
toResourceProperties RoleProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoleProperty -> ()
roleArn :: RoleProperty -> Maybe (Value Text)
roleType :: RoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
roleType :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AuditManager::Assessment.Role",
         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
"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
"RoleType" (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)
roleType])}
instance JSON.ToJSON RoleProperty where
  toJSON :: RoleProperty -> Value
toJSON RoleProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoleProperty -> ()
roleArn :: RoleProperty -> Maybe (Value Text)
roleType :: RoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
roleType :: 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
"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
"RoleType" (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)
roleType]))
instance Property "RoleArn" RoleProperty where
  type PropertyType "RoleArn" RoleProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" RoleProperty -> RoleProperty -> RoleProperty
set PropertyType "RoleArn" RoleProperty
newValue RoleProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoleProperty -> ()
roleArn :: RoleProperty -> Maybe (Value Text)
roleType :: RoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
roleType :: Maybe (Value Text)
..}
    = RoleProperty {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" RoleProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
roleType :: Maybe (Value Text)
haddock_workaround_ :: ()
roleType :: Maybe (Value Text)
..}
instance Property "RoleType" RoleProperty where
  type PropertyType "RoleType" RoleProperty = Value Prelude.Text
  set :: PropertyType "RoleType" RoleProperty
-> RoleProperty -> RoleProperty
set PropertyType "RoleType" RoleProperty
newValue RoleProperty {Maybe (Value Text)
()
haddock_workaround_ :: RoleProperty -> ()
roleArn :: RoleProperty -> Maybe (Value Text)
roleType :: RoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
roleType :: Maybe (Value Text)
..}
    = RoleProperty {roleType :: Maybe (Value Text)
roleType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleType" RoleProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
..}