module Stratosphere.EC2.NetworkInsightsPath.PathFilterProperty (
        module Exports, PathFilterProperty(..), mkPathFilterProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.NetworkInsightsPath.FilterPortRangeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PathFilterProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinsightspath-pathfilter.html>
    PathFilterProperty {PathFilterProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinsightspath-pathfilter.html#cfn-ec2-networkinsightspath-pathfilter-destinationaddress>
                        PathFilterProperty -> Maybe (Value Text)
destinationAddress :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinsightspath-pathfilter.html#cfn-ec2-networkinsightspath-pathfilter-destinationportrange>
                        PathFilterProperty -> Maybe FilterPortRangeProperty
destinationPortRange :: (Prelude.Maybe FilterPortRangeProperty),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinsightspath-pathfilter.html#cfn-ec2-networkinsightspath-pathfilter-sourceaddress>
                        PathFilterProperty -> Maybe (Value Text)
sourceAddress :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-networkinsightspath-pathfilter.html#cfn-ec2-networkinsightspath-pathfilter-sourceportrange>
                        PathFilterProperty -> Maybe FilterPortRangeProperty
sourcePortRange :: (Prelude.Maybe FilterPortRangeProperty)}
  deriving stock (PathFilterProperty -> PathFilterProperty -> Bool
(PathFilterProperty -> PathFilterProperty -> Bool)
-> (PathFilterProperty -> PathFilterProperty -> Bool)
-> Eq PathFilterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PathFilterProperty -> PathFilterProperty -> Bool
== :: PathFilterProperty -> PathFilterProperty -> Bool
$c/= :: PathFilterProperty -> PathFilterProperty -> Bool
/= :: PathFilterProperty -> PathFilterProperty -> Bool
Prelude.Eq, Int -> PathFilterProperty -> ShowS
[PathFilterProperty] -> ShowS
PathFilterProperty -> String
(Int -> PathFilterProperty -> ShowS)
-> (PathFilterProperty -> String)
-> ([PathFilterProperty] -> ShowS)
-> Show PathFilterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PathFilterProperty -> ShowS
showsPrec :: Int -> PathFilterProperty -> ShowS
$cshow :: PathFilterProperty -> String
show :: PathFilterProperty -> String
$cshowList :: [PathFilterProperty] -> ShowS
showList :: [PathFilterProperty] -> ShowS
Prelude.Show)
mkPathFilterProperty :: PathFilterProperty
mkPathFilterProperty :: PathFilterProperty
mkPathFilterProperty
  = PathFilterProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), destinationAddress :: Maybe (Value Text)
destinationAddress = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       destinationPortRange :: Maybe FilterPortRangeProperty
destinationPortRange = Maybe FilterPortRangeProperty
forall a. Maybe a
Prelude.Nothing,
       sourceAddress :: Maybe (Value Text)
sourceAddress = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, sourcePortRange :: Maybe FilterPortRangeProperty
sourcePortRange = Maybe FilterPortRangeProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PathFilterProperty where
  toResourceProperties :: PathFilterProperty -> ResourceProperties
toResourceProperties PathFilterProperty {Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: PathFilterProperty -> ()
destinationAddress :: PathFilterProperty -> Maybe (Value Text)
destinationPortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
sourceAddress :: PathFilterProperty -> Maybe (Value Text)
sourcePortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::NetworkInsightsPath.PathFilter",
         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
"DestinationAddress" (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)
destinationAddress,
                            Key -> FilterPortRangeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DestinationPortRange" (FilterPortRangeProperty -> (Key, Value))
-> Maybe FilterPortRangeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FilterPortRangeProperty
destinationPortRange,
                            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
"SourceAddress" (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)
sourceAddress,
                            Key -> FilterPortRangeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourcePortRange" (FilterPortRangeProperty -> (Key, Value))
-> Maybe FilterPortRangeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FilterPortRangeProperty
sourcePortRange])}
instance JSON.ToJSON PathFilterProperty where
  toJSON :: PathFilterProperty -> Value
toJSON PathFilterProperty {Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: PathFilterProperty -> ()
destinationAddress :: PathFilterProperty -> Maybe (Value Text)
destinationPortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
sourceAddress :: PathFilterProperty -> Maybe (Value Text)
sourcePortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
..}
    = [(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
"DestinationAddress" (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)
destinationAddress,
               Key -> FilterPortRangeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DestinationPortRange" (FilterPortRangeProperty -> (Key, Value))
-> Maybe FilterPortRangeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FilterPortRangeProperty
destinationPortRange,
               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
"SourceAddress" (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)
sourceAddress,
               Key -> FilterPortRangeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourcePortRange" (FilterPortRangeProperty -> (Key, Value))
-> Maybe FilterPortRangeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FilterPortRangeProperty
sourcePortRange]))
instance Property "DestinationAddress" PathFilterProperty where
  type PropertyType "DestinationAddress" PathFilterProperty = Value Prelude.Text
  set :: PropertyType "DestinationAddress" PathFilterProperty
-> PathFilterProperty -> PathFilterProperty
set PropertyType "DestinationAddress" PathFilterProperty
newValue PathFilterProperty {Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: PathFilterProperty -> ()
destinationAddress :: PathFilterProperty -> Maybe (Value Text)
destinationPortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
sourceAddress :: PathFilterProperty -> Maybe (Value Text)
sourcePortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
..}
    = PathFilterProperty
        {destinationAddress :: Maybe (Value Text)
destinationAddress = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DestinationAddress" PathFilterProperty
Value Text
newValue, Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: ()
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
..}
instance Property "DestinationPortRange" PathFilterProperty where
  type PropertyType "DestinationPortRange" PathFilterProperty = FilterPortRangeProperty
  set :: PropertyType "DestinationPortRange" PathFilterProperty
-> PathFilterProperty -> PathFilterProperty
set PropertyType "DestinationPortRange" PathFilterProperty
newValue PathFilterProperty {Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: PathFilterProperty -> ()
destinationAddress :: PathFilterProperty -> Maybe (Value Text)
destinationPortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
sourceAddress :: PathFilterProperty -> Maybe (Value Text)
sourcePortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
..}
    = PathFilterProperty
        {destinationPortRange :: Maybe FilterPortRangeProperty
destinationPortRange = FilterPortRangeProperty -> Maybe FilterPortRangeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DestinationPortRange" PathFilterProperty
FilterPortRangeProperty
newValue, Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
..}
instance Property "SourceAddress" PathFilterProperty where
  type PropertyType "SourceAddress" PathFilterProperty = Value Prelude.Text
  set :: PropertyType "SourceAddress" PathFilterProperty
-> PathFilterProperty -> PathFilterProperty
set PropertyType "SourceAddress" PathFilterProperty
newValue PathFilterProperty {Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: PathFilterProperty -> ()
destinationAddress :: PathFilterProperty -> Maybe (Value Text)
destinationPortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
sourceAddress :: PathFilterProperty -> Maybe (Value Text)
sourcePortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
..}
    = PathFilterProperty {sourceAddress :: Maybe (Value Text)
sourceAddress = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceAddress" PathFilterProperty
Value Text
newValue, Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourcePortRange :: Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourcePortRange :: Maybe FilterPortRangeProperty
..}
instance Property "SourcePortRange" PathFilterProperty where
  type PropertyType "SourcePortRange" PathFilterProperty = FilterPortRangeProperty
  set :: PropertyType "SourcePortRange" PathFilterProperty
-> PathFilterProperty -> PathFilterProperty
set PropertyType "SourcePortRange" PathFilterProperty
newValue PathFilterProperty {Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: PathFilterProperty -> ()
destinationAddress :: PathFilterProperty -> Maybe (Value Text)
destinationPortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
sourceAddress :: PathFilterProperty -> Maybe (Value Text)
sourcePortRange :: PathFilterProperty -> Maybe FilterPortRangeProperty
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
sourcePortRange :: Maybe FilterPortRangeProperty
..}
    = PathFilterProperty {sourcePortRange :: Maybe FilterPortRangeProperty
sourcePortRange = FilterPortRangeProperty -> Maybe FilterPortRangeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourcePortRange" PathFilterProperty
FilterPortRangeProperty
newValue, Maybe (Value Text)
Maybe FilterPortRangeProperty
()
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
haddock_workaround_ :: ()
destinationAddress :: Maybe (Value Text)
destinationPortRange :: Maybe FilterPortRangeProperty
sourceAddress :: Maybe (Value Text)
..}