module Stratosphere.EC2.NetworkAclEntry.IcmpProperty (
        IcmpProperty(..), mkIcmpProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IcmpProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html>
    IcmpProperty {IcmpProperty -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-code>
                  IcmpProperty -> Maybe (Value Integer)
code :: (Prelude.Maybe (Value Prelude.Integer)),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkaclentry-icmp.html#cfn-ec2-networkaclentry-icmp-type>
                  IcmpProperty -> Maybe (Value Integer)
type' :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (IcmpProperty -> IcmpProperty -> Bool
(IcmpProperty -> IcmpProperty -> Bool)
-> (IcmpProperty -> IcmpProperty -> Bool) -> Eq IcmpProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IcmpProperty -> IcmpProperty -> Bool
== :: IcmpProperty -> IcmpProperty -> Bool
$c/= :: IcmpProperty -> IcmpProperty -> Bool
/= :: IcmpProperty -> IcmpProperty -> Bool
Prelude.Eq, Int -> IcmpProperty -> ShowS
[IcmpProperty] -> ShowS
IcmpProperty -> String
(Int -> IcmpProperty -> ShowS)
-> (IcmpProperty -> String)
-> ([IcmpProperty] -> ShowS)
-> Show IcmpProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IcmpProperty -> ShowS
showsPrec :: Int -> IcmpProperty -> ShowS
$cshow :: IcmpProperty -> String
show :: IcmpProperty -> String
$cshowList :: [IcmpProperty] -> ShowS
showList :: [IcmpProperty] -> ShowS
Prelude.Show)
mkIcmpProperty :: IcmpProperty
mkIcmpProperty :: IcmpProperty
mkIcmpProperty
  = IcmpProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), code :: Maybe (Value Integer)
code = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       type' :: Maybe (Value Integer)
type' = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IcmpProperty where
  toResourceProperties :: IcmpProperty -> ResourceProperties
toResourceProperties IcmpProperty {Maybe (Value Integer)
()
haddock_workaround_ :: IcmpProperty -> ()
code :: IcmpProperty -> Maybe (Value Integer)
type' :: IcmpProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
code :: Maybe (Value Integer)
type' :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::NetworkAclEntry.Icmp",
         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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Code" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
code,
                            Key -> Value Integer -> (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 Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
type'])}
instance JSON.ToJSON IcmpProperty where
  toJSON :: IcmpProperty -> Value
toJSON IcmpProperty {Maybe (Value Integer)
()
haddock_workaround_ :: IcmpProperty -> ()
code :: IcmpProperty -> Maybe (Value Integer)
type' :: IcmpProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
code :: Maybe (Value Integer)
type' :: Maybe (Value Integer)
..}
    = [(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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Code" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
code,
               Key -> Value Integer -> (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 Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
type']))
instance Property "Code" IcmpProperty where
  type PropertyType "Code" IcmpProperty = Value Prelude.Integer
  set :: PropertyType "Code" IcmpProperty -> IcmpProperty -> IcmpProperty
set PropertyType "Code" IcmpProperty
newValue IcmpProperty {Maybe (Value Integer)
()
haddock_workaround_ :: IcmpProperty -> ()
code :: IcmpProperty -> Maybe (Value Integer)
type' :: IcmpProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
code :: Maybe (Value Integer)
type' :: Maybe (Value Integer)
..}
    = IcmpProperty {code :: Maybe (Value Integer)
code = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Code" IcmpProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
type' :: Maybe (Value Integer)
haddock_workaround_ :: ()
type' :: Maybe (Value Integer)
..}
instance Property "Type" IcmpProperty where
  type PropertyType "Type" IcmpProperty = Value Prelude.Integer
  set :: PropertyType "Type" IcmpProperty -> IcmpProperty -> IcmpProperty
set PropertyType "Type" IcmpProperty
newValue IcmpProperty {Maybe (Value Integer)
()
haddock_workaround_ :: IcmpProperty -> ()
code :: IcmpProperty -> Maybe (Value Integer)
type' :: IcmpProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
code :: Maybe (Value Integer)
type' :: Maybe (Value Integer)
..}
    = IcmpProperty {type' :: Maybe (Value Integer)
type' = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" IcmpProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
code :: Maybe (Value Integer)
haddock_workaround_ :: ()
code :: Maybe (Value Integer)
..}