module Stratosphere.EMR.SecurityConfiguration (
        SecurityConfiguration(..), mkSecurityConfiguration
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SecurityConfiguration
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-securityconfiguration.html>
    SecurityConfiguration {SecurityConfiguration -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-securityconfiguration.html#cfn-emr-securityconfiguration-name>
                           SecurityConfiguration -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-emr-securityconfiguration.html#cfn-emr-securityconfiguration-securityconfiguration>
                           SecurityConfiguration -> Object
securityConfiguration :: JSON.Object}
  deriving stock (SecurityConfiguration -> SecurityConfiguration -> Bool
(SecurityConfiguration -> SecurityConfiguration -> Bool)
-> (SecurityConfiguration -> SecurityConfiguration -> Bool)
-> Eq SecurityConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SecurityConfiguration -> SecurityConfiguration -> Bool
== :: SecurityConfiguration -> SecurityConfiguration -> Bool
$c/= :: SecurityConfiguration -> SecurityConfiguration -> Bool
/= :: SecurityConfiguration -> SecurityConfiguration -> Bool
Prelude.Eq, Int -> SecurityConfiguration -> ShowS
[SecurityConfiguration] -> ShowS
SecurityConfiguration -> String
(Int -> SecurityConfiguration -> ShowS)
-> (SecurityConfiguration -> String)
-> ([SecurityConfiguration] -> ShowS)
-> Show SecurityConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SecurityConfiguration -> ShowS
showsPrec :: Int -> SecurityConfiguration -> ShowS
$cshow :: SecurityConfiguration -> String
show :: SecurityConfiguration -> String
$cshowList :: [SecurityConfiguration] -> ShowS
showList :: [SecurityConfiguration] -> ShowS
Prelude.Show)
mkSecurityConfiguration :: JSON.Object -> SecurityConfiguration
mkSecurityConfiguration :: Object -> SecurityConfiguration
mkSecurityConfiguration Object
securityConfiguration
  = SecurityConfiguration
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       securityConfiguration :: Object
securityConfiguration = Object
securityConfiguration,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SecurityConfiguration where
  toResourceProperties :: SecurityConfiguration -> ResourceProperties
toResourceProperties SecurityConfiguration {Maybe (Value Text)
()
Object
haddock_workaround_ :: SecurityConfiguration -> ()
name :: SecurityConfiguration -> Maybe (Value Text)
securityConfiguration :: SecurityConfiguration -> Object
haddock_workaround_ :: ()
name :: Maybe (Value Text)
securityConfiguration :: Object
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EMR::SecurityConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"SecurityConfiguration" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
securityConfiguration]
                           ([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
"Name" (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)
name]))}
instance JSON.ToJSON SecurityConfiguration where
  toJSON :: SecurityConfiguration -> Value
toJSON SecurityConfiguration {Maybe (Value Text)
()
Object
haddock_workaround_ :: SecurityConfiguration -> ()
name :: SecurityConfiguration -> Maybe (Value Text)
securityConfiguration :: SecurityConfiguration -> Object
haddock_workaround_ :: ()
name :: Maybe (Value Text)
securityConfiguration :: Object
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"SecurityConfiguration" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
securityConfiguration]
              ([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
"Name" (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)
name])))
instance Property "Name" SecurityConfiguration where
  type PropertyType "Name" SecurityConfiguration = Value Prelude.Text
  set :: PropertyType "Name" SecurityConfiguration
-> SecurityConfiguration -> SecurityConfiguration
set PropertyType "Name" SecurityConfiguration
newValue SecurityConfiguration {Maybe (Value Text)
()
Object
haddock_workaround_ :: SecurityConfiguration -> ()
name :: SecurityConfiguration -> Maybe (Value Text)
securityConfiguration :: SecurityConfiguration -> Object
haddock_workaround_ :: ()
name :: Maybe (Value Text)
securityConfiguration :: Object
..}
    = SecurityConfiguration {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" SecurityConfiguration
Value Text
newValue, ()
Object
haddock_workaround_ :: ()
securityConfiguration :: Object
haddock_workaround_ :: ()
securityConfiguration :: Object
..}
instance Property "SecurityConfiguration" SecurityConfiguration where
  type PropertyType "SecurityConfiguration" SecurityConfiguration = JSON.Object
  set :: PropertyType "SecurityConfiguration" SecurityConfiguration
-> SecurityConfiguration -> SecurityConfiguration
set PropertyType "SecurityConfiguration" SecurityConfiguration
newValue SecurityConfiguration {Maybe (Value Text)
()
Object
haddock_workaround_ :: SecurityConfiguration -> ()
name :: SecurityConfiguration -> Maybe (Value Text)
securityConfiguration :: SecurityConfiguration -> Object
haddock_workaround_ :: ()
name :: Maybe (Value Text)
securityConfiguration :: Object
..}
    = SecurityConfiguration {securityConfiguration :: Object
securityConfiguration = Object
PropertyType "SecurityConfiguration" SecurityConfiguration
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}