module Stratosphere.Route53Resolver.ResolverRuleAssociation (
        ResolverRuleAssociation(..), mkResolverRuleAssociation
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ResolverRuleAssociation
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53resolver-resolverruleassociation.html>
    ResolverRuleAssociation {ResolverRuleAssociation -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53resolver-resolverruleassociation.html#cfn-route53resolver-resolverruleassociation-name>
                             ResolverRuleAssociation -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53resolver-resolverruleassociation.html#cfn-route53resolver-resolverruleassociation-resolverruleid>
                             ResolverRuleAssociation -> Value Text
resolverRuleId :: (Value Prelude.Text),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53resolver-resolverruleassociation.html#cfn-route53resolver-resolverruleassociation-vpcid>
                             ResolverRuleAssociation -> Value Text
vPCId :: (Value Prelude.Text)}
  deriving stock (ResolverRuleAssociation -> ResolverRuleAssociation -> Bool
(ResolverRuleAssociation -> ResolverRuleAssociation -> Bool)
-> (ResolverRuleAssociation -> ResolverRuleAssociation -> Bool)
-> Eq ResolverRuleAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResolverRuleAssociation -> ResolverRuleAssociation -> Bool
== :: ResolverRuleAssociation -> ResolverRuleAssociation -> Bool
$c/= :: ResolverRuleAssociation -> ResolverRuleAssociation -> Bool
/= :: ResolverRuleAssociation -> ResolverRuleAssociation -> Bool
Prelude.Eq, Int -> ResolverRuleAssociation -> ShowS
[ResolverRuleAssociation] -> ShowS
ResolverRuleAssociation -> String
(Int -> ResolverRuleAssociation -> ShowS)
-> (ResolverRuleAssociation -> String)
-> ([ResolverRuleAssociation] -> ShowS)
-> Show ResolverRuleAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResolverRuleAssociation -> ShowS
showsPrec :: Int -> ResolverRuleAssociation -> ShowS
$cshow :: ResolverRuleAssociation -> String
show :: ResolverRuleAssociation -> String
$cshowList :: [ResolverRuleAssociation] -> ShowS
showList :: [ResolverRuleAssociation] -> ShowS
Prelude.Show)
mkResolverRuleAssociation ::
  Value Prelude.Text -> Value Prelude.Text -> ResolverRuleAssociation
mkResolverRuleAssociation :: Value Text -> Value Text -> ResolverRuleAssociation
mkResolverRuleAssociation Value Text
resolverRuleId Value Text
vPCId
  = ResolverRuleAssociation
      {haddock_workaround_ :: ()
haddock_workaround_ = (), resolverRuleId :: Value Text
resolverRuleId = Value Text
resolverRuleId,
       vPCId :: Value Text
vPCId = Value Text
vPCId, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ResolverRuleAssociation where
  toResourceProperties :: ResolverRuleAssociation -> ResourceProperties
toResourceProperties ResolverRuleAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResolverRuleAssociation -> ()
name :: ResolverRuleAssociation -> Maybe (Value Text)
resolverRuleId :: ResolverRuleAssociation -> Value Text
vPCId :: ResolverRuleAssociation -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
resolverRuleId :: Value Text
vPCId :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Route53Resolver::ResolverRuleAssociation",
         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
"ResolverRuleId" 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..= Value Text
resolverRuleId, Key
"VPCId" 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..= Value Text
vPCId]
                           ([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 ResolverRuleAssociation where
  toJSON :: ResolverRuleAssociation -> Value
toJSON ResolverRuleAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResolverRuleAssociation -> ()
name :: ResolverRuleAssociation -> Maybe (Value Text)
resolverRuleId :: ResolverRuleAssociation -> Value Text
vPCId :: ResolverRuleAssociation -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
resolverRuleId :: Value Text
vPCId :: Value Text
..}
    = [(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
"ResolverRuleId" 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..= Value Text
resolverRuleId, Key
"VPCId" 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..= Value Text
vPCId]
              ([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" ResolverRuleAssociation where
  type PropertyType "Name" ResolverRuleAssociation = Value Prelude.Text
  set :: PropertyType "Name" ResolverRuleAssociation
-> ResolverRuleAssociation -> ResolverRuleAssociation
set PropertyType "Name" ResolverRuleAssociation
newValue ResolverRuleAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResolverRuleAssociation -> ()
name :: ResolverRuleAssociation -> Maybe (Value Text)
resolverRuleId :: ResolverRuleAssociation -> Value Text
vPCId :: ResolverRuleAssociation -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
resolverRuleId :: Value Text
vPCId :: Value Text
..}
    = ResolverRuleAssociation {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" ResolverRuleAssociation
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
resolverRuleId :: Value Text
vPCId :: Value Text
haddock_workaround_ :: ()
resolverRuleId :: Value Text
vPCId :: Value Text
..}
instance Property "ResolverRuleId" ResolverRuleAssociation where
  type PropertyType "ResolverRuleId" ResolverRuleAssociation = Value Prelude.Text
  set :: PropertyType "ResolverRuleId" ResolverRuleAssociation
-> ResolverRuleAssociation -> ResolverRuleAssociation
set PropertyType "ResolverRuleId" ResolverRuleAssociation
newValue ResolverRuleAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResolverRuleAssociation -> ()
name :: ResolverRuleAssociation -> Maybe (Value Text)
resolverRuleId :: ResolverRuleAssociation -> Value Text
vPCId :: ResolverRuleAssociation -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
resolverRuleId :: Value Text
vPCId :: Value Text
..}
    = ResolverRuleAssociation {resolverRuleId :: Value Text
resolverRuleId = PropertyType "ResolverRuleId" ResolverRuleAssociation
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
vPCId :: Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
vPCId :: Value Text
..}
instance Property "VPCId" ResolverRuleAssociation where
  type PropertyType "VPCId" ResolverRuleAssociation = Value Prelude.Text
  set :: PropertyType "VPCId" ResolverRuleAssociation
-> ResolverRuleAssociation -> ResolverRuleAssociation
set PropertyType "VPCId" ResolverRuleAssociation
newValue ResolverRuleAssociation {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ResolverRuleAssociation -> ()
name :: ResolverRuleAssociation -> Maybe (Value Text)
resolverRuleId :: ResolverRuleAssociation -> Value Text
vPCId :: ResolverRuleAssociation -> Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
resolverRuleId :: Value Text
vPCId :: Value Text
..}
    = ResolverRuleAssociation {vPCId :: Value Text
vPCId = PropertyType "VPCId" ResolverRuleAssociation
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
resolverRuleId :: Value Text
haddock_workaround_ :: ()
name :: Maybe (Value Text)
resolverRuleId :: Value Text
..}