module Stratosphere.MSK.Cluster.PublicAccessProperty (
        PublicAccessProperty(..), mkPublicAccessProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PublicAccessProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-publicaccess.html>
    PublicAccessProperty {PublicAccessProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-publicaccess.html#cfn-msk-cluster-publicaccess-type>
                          PublicAccessProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (PublicAccessProperty -> PublicAccessProperty -> Bool
(PublicAccessProperty -> PublicAccessProperty -> Bool)
-> (PublicAccessProperty -> PublicAccessProperty -> Bool)
-> Eq PublicAccessProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PublicAccessProperty -> PublicAccessProperty -> Bool
== :: PublicAccessProperty -> PublicAccessProperty -> Bool
$c/= :: PublicAccessProperty -> PublicAccessProperty -> Bool
/= :: PublicAccessProperty -> PublicAccessProperty -> Bool
Prelude.Eq, Int -> PublicAccessProperty -> ShowS
[PublicAccessProperty] -> ShowS
PublicAccessProperty -> String
(Int -> PublicAccessProperty -> ShowS)
-> (PublicAccessProperty -> String)
-> ([PublicAccessProperty] -> ShowS)
-> Show PublicAccessProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PublicAccessProperty -> ShowS
showsPrec :: Int -> PublicAccessProperty -> ShowS
$cshow :: PublicAccessProperty -> String
show :: PublicAccessProperty -> String
$cshowList :: [PublicAccessProperty] -> ShowS
showList :: [PublicAccessProperty] -> ShowS
Prelude.Show)
mkPublicAccessProperty :: PublicAccessProperty
mkPublicAccessProperty :: PublicAccessProperty
mkPublicAccessProperty
  = PublicAccessProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PublicAccessProperty where
  toResourceProperties :: PublicAccessProperty -> ResourceProperties
toResourceProperties PublicAccessProperty {Maybe (Value Text)
()
haddock_workaround_ :: PublicAccessProperty -> ()
type' :: PublicAccessProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MSK::Cluster.PublicAccess",
         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
"Type" (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)
type'])}
instance JSON.ToJSON PublicAccessProperty where
  toJSON :: PublicAccessProperty -> Value
toJSON PublicAccessProperty {Maybe (Value Text)
()
haddock_workaround_ :: PublicAccessProperty -> ()
type' :: PublicAccessProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: 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
"Type" (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)
type']))
instance Property "Type" PublicAccessProperty where
  type PropertyType "Type" PublicAccessProperty = Value Prelude.Text
  set :: PropertyType "Type" PublicAccessProperty
-> PublicAccessProperty -> PublicAccessProperty
set PropertyType "Type" PublicAccessProperty
newValue PublicAccessProperty {Maybe (Value Text)
()
haddock_workaround_ :: PublicAccessProperty -> ()
type' :: PublicAccessProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
type' :: Maybe (Value Text)
..}
    = PublicAccessProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" PublicAccessProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}