module Stratosphere.RDS.DBSecurityGroup.IngressProperty (
        IngressProperty(..), mkIngressProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IngressProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-security-group-rule.html>
    IngressProperty {IngressProperty -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-security-group-rule.html#cfn-rds-securitygroup-cidrip>
                     IngressProperty -> Maybe (Value Text)
cIDRIP :: (Prelude.Maybe (Value Prelude.Text)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-security-group-rule.html#cfn-rds-securitygroup-ec2securitygroupid>
                     IngressProperty -> Maybe (Value Text)
eC2SecurityGroupId :: (Prelude.Maybe (Value Prelude.Text)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-security-group-rule.html#cfn-rds-securitygroup-ec2securitygroupname>
                     IngressProperty -> Maybe (Value Text)
eC2SecurityGroupName :: (Prelude.Maybe (Value Prelude.Text)),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-security-group-rule.html#cfn-rds-securitygroup-ec2securitygroupownerid>
                     IngressProperty -> Maybe (Value Text)
eC2SecurityGroupOwnerId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (IngressProperty -> IngressProperty -> Bool
(IngressProperty -> IngressProperty -> Bool)
-> (IngressProperty -> IngressProperty -> Bool)
-> Eq IngressProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IngressProperty -> IngressProperty -> Bool
== :: IngressProperty -> IngressProperty -> Bool
$c/= :: IngressProperty -> IngressProperty -> Bool
/= :: IngressProperty -> IngressProperty -> Bool
Prelude.Eq, Int -> IngressProperty -> ShowS
[IngressProperty] -> ShowS
IngressProperty -> String
(Int -> IngressProperty -> ShowS)
-> (IngressProperty -> String)
-> ([IngressProperty] -> ShowS)
-> Show IngressProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IngressProperty -> ShowS
showsPrec :: Int -> IngressProperty -> ShowS
$cshow :: IngressProperty -> String
show :: IngressProperty -> String
$cshowList :: [IngressProperty] -> ShowS
showList :: [IngressProperty] -> ShowS
Prelude.Show)
mkIngressProperty :: IngressProperty
mkIngressProperty :: IngressProperty
mkIngressProperty
  = IngressProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cIDRIP :: Maybe (Value Text)
cIDRIP = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       eC2SecurityGroupOwnerId :: Maybe (Value Text)
eC2SecurityGroupOwnerId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IngressProperty where
  toResourceProperties :: IngressProperty -> ResourceProperties
toResourceProperties IngressProperty {Maybe (Value Text)
()
haddock_workaround_ :: IngressProperty -> ()
cIDRIP :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupId :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupName :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupOwnerId :: IngressProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::RDS::DBSecurityGroup.Ingress",
         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
"CIDRIP" (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)
cIDRIP,
                            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
"EC2SecurityGroupId" (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)
eC2SecurityGroupId,
                            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
"EC2SecurityGroupName" (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)
eC2SecurityGroupName,
                            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
"EC2SecurityGroupOwnerId"
                              (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)
eC2SecurityGroupOwnerId])}
instance JSON.ToJSON IngressProperty where
  toJSON :: IngressProperty -> Value
toJSON IngressProperty {Maybe (Value Text)
()
haddock_workaround_ :: IngressProperty -> ()
cIDRIP :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupId :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupName :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupOwnerId :: IngressProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: 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
"CIDRIP" (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)
cIDRIP,
               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
"EC2SecurityGroupId" (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)
eC2SecurityGroupId,
               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
"EC2SecurityGroupName" (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)
eC2SecurityGroupName,
               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
"EC2SecurityGroupOwnerId"
                 (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)
eC2SecurityGroupOwnerId]))
instance Property "CIDRIP" IngressProperty where
  type PropertyType "CIDRIP" IngressProperty = Value Prelude.Text
  set :: PropertyType "CIDRIP" IngressProperty
-> IngressProperty -> IngressProperty
set PropertyType "CIDRIP" IngressProperty
newValue IngressProperty {Maybe (Value Text)
()
haddock_workaround_ :: IngressProperty -> ()
cIDRIP :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupId :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupName :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupOwnerId :: IngressProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
..}
    = IngressProperty {cIDRIP :: Maybe (Value Text)
cIDRIP = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CIDRIP" IngressProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
haddock_workaround_ :: ()
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
..}
instance Property "EC2SecurityGroupId" IngressProperty where
  type PropertyType "EC2SecurityGroupId" IngressProperty = Value Prelude.Text
  set :: PropertyType "EC2SecurityGroupId" IngressProperty
-> IngressProperty -> IngressProperty
set PropertyType "EC2SecurityGroupId" IngressProperty
newValue IngressProperty {Maybe (Value Text)
()
haddock_workaround_ :: IngressProperty -> ()
cIDRIP :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupId :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupName :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupOwnerId :: IngressProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
..}
    = IngressProperty {eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EC2SecurityGroupId" IngressProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
..}
instance Property "EC2SecurityGroupName" IngressProperty where
  type PropertyType "EC2SecurityGroupName" IngressProperty = Value Prelude.Text
  set :: PropertyType "EC2SecurityGroupName" IngressProperty
-> IngressProperty -> IngressProperty
set PropertyType "EC2SecurityGroupName" IngressProperty
newValue IngressProperty {Maybe (Value Text)
()
haddock_workaround_ :: IngressProperty -> ()
cIDRIP :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupId :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupName :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupOwnerId :: IngressProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
..}
    = IngressProperty
        {eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EC2SecurityGroupName" IngressProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
..}
instance Property "EC2SecurityGroupOwnerId" IngressProperty where
  type PropertyType "EC2SecurityGroupOwnerId" IngressProperty = Value Prelude.Text
  set :: PropertyType "EC2SecurityGroupOwnerId" IngressProperty
-> IngressProperty -> IngressProperty
set PropertyType "EC2SecurityGroupOwnerId" IngressProperty
newValue IngressProperty {Maybe (Value Text)
()
haddock_workaround_ :: IngressProperty -> ()
cIDRIP :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupId :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupName :: IngressProperty -> Maybe (Value Text)
eC2SecurityGroupOwnerId :: IngressProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
eC2SecurityGroupOwnerId :: Maybe (Value Text)
..}
    = IngressProperty
        {eC2SecurityGroupOwnerId :: Maybe (Value Text)
eC2SecurityGroupOwnerId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EC2SecurityGroupOwnerId" IngressProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
haddock_workaround_ :: ()
cIDRIP :: Maybe (Value Text)
eC2SecurityGroupId :: Maybe (Value Text)
eC2SecurityGroupName :: Maybe (Value Text)
..}