module Stratosphere.EC2.ClientVpnAuthorizationRule (
        ClientVpnAuthorizationRule(..), mkClientVpnAuthorizationRule
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ClientVpnAuthorizationRule
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnauthorizationrule.html>
    ClientVpnAuthorizationRule {ClientVpnAuthorizationRule -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnauthorizationrule.html#cfn-ec2-clientvpnauthorizationrule-accessgroupid>
                                ClientVpnAuthorizationRule -> Maybe (Value Text)
accessGroupId :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnauthorizationrule.html#cfn-ec2-clientvpnauthorizationrule-authorizeallgroups>
                                ClientVpnAuthorizationRule -> Maybe (Value Bool)
authorizeAllGroups :: (Prelude.Maybe (Value Prelude.Bool)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnauthorizationrule.html#cfn-ec2-clientvpnauthorizationrule-clientvpnendpointid>
                                ClientVpnAuthorizationRule -> Value Text
clientVpnEndpointId :: (Value Prelude.Text),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnauthorizationrule.html#cfn-ec2-clientvpnauthorizationrule-description>
                                ClientVpnAuthorizationRule -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-clientvpnauthorizationrule.html#cfn-ec2-clientvpnauthorizationrule-targetnetworkcidr>
                                ClientVpnAuthorizationRule -> Value Text
targetNetworkCidr :: (Value Prelude.Text)}
  deriving stock (ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule -> Bool
(ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule -> Bool)
-> (ClientVpnAuthorizationRule
    -> ClientVpnAuthorizationRule -> Bool)
-> Eq ClientVpnAuthorizationRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule -> Bool
== :: ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule -> Bool
$c/= :: ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule -> Bool
/= :: ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule -> Bool
Prelude.Eq, Int -> ClientVpnAuthorizationRule -> ShowS
[ClientVpnAuthorizationRule] -> ShowS
ClientVpnAuthorizationRule -> String
(Int -> ClientVpnAuthorizationRule -> ShowS)
-> (ClientVpnAuthorizationRule -> String)
-> ([ClientVpnAuthorizationRule] -> ShowS)
-> Show ClientVpnAuthorizationRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClientVpnAuthorizationRule -> ShowS
showsPrec :: Int -> ClientVpnAuthorizationRule -> ShowS
$cshow :: ClientVpnAuthorizationRule -> String
show :: ClientVpnAuthorizationRule -> String
$cshowList :: [ClientVpnAuthorizationRule] -> ShowS
showList :: [ClientVpnAuthorizationRule] -> ShowS
Prelude.Show)
mkClientVpnAuthorizationRule ::
  Value Prelude.Text
  -> Value Prelude.Text -> ClientVpnAuthorizationRule
mkClientVpnAuthorizationRule :: Value Text -> Value Text -> ClientVpnAuthorizationRule
mkClientVpnAuthorizationRule Value Text
clientVpnEndpointId Value Text
targetNetworkCidr
  = ClientVpnAuthorizationRule
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       clientVpnEndpointId :: Value Text
clientVpnEndpointId = Value Text
clientVpnEndpointId,
       targetNetworkCidr :: Value Text
targetNetworkCidr = Value Text
targetNetworkCidr,
       accessGroupId :: Maybe (Value Text)
accessGroupId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       authorizeAllGroups :: Maybe (Value Bool)
authorizeAllGroups = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ClientVpnAuthorizationRule where
  toResourceProperties :: ClientVpnAuthorizationRule -> ResourceProperties
toResourceProperties ClientVpnAuthorizationRule {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClientVpnAuthorizationRule -> ()
accessGroupId :: ClientVpnAuthorizationRule -> Maybe (Value Text)
authorizeAllGroups :: ClientVpnAuthorizationRule -> Maybe (Value Bool)
clientVpnEndpointId :: ClientVpnAuthorizationRule -> Value Text
description :: ClientVpnAuthorizationRule -> Maybe (Value Text)
targetNetworkCidr :: ClientVpnAuthorizationRule -> Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::ClientVpnAuthorizationRule",
         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
"ClientVpnEndpointId" 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
clientVpnEndpointId,
                            Key
"TargetNetworkCidr" 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
targetNetworkCidr]
                           ([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
"AccessGroupId" (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)
accessGroupId,
                               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AuthorizeAllGroups" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
authorizeAllGroups,
                               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
"Description" (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)
description]))}
instance JSON.ToJSON ClientVpnAuthorizationRule where
  toJSON :: ClientVpnAuthorizationRule -> Value
toJSON ClientVpnAuthorizationRule {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClientVpnAuthorizationRule -> ()
accessGroupId :: ClientVpnAuthorizationRule -> Maybe (Value Text)
authorizeAllGroups :: ClientVpnAuthorizationRule -> Maybe (Value Bool)
clientVpnEndpointId :: ClientVpnAuthorizationRule -> Value Text
description :: ClientVpnAuthorizationRule -> Maybe (Value Text)
targetNetworkCidr :: ClientVpnAuthorizationRule -> Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: 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
"ClientVpnEndpointId" 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
clientVpnEndpointId,
               Key
"TargetNetworkCidr" 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
targetNetworkCidr]
              ([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
"AccessGroupId" (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)
accessGroupId,
                  Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AuthorizeAllGroups" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
authorizeAllGroups,
                  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
"Description" (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)
description])))
instance Property "AccessGroupId" ClientVpnAuthorizationRule where
  type PropertyType "AccessGroupId" ClientVpnAuthorizationRule = Value Prelude.Text
  set :: PropertyType "AccessGroupId" ClientVpnAuthorizationRule
-> ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule
set PropertyType "AccessGroupId" ClientVpnAuthorizationRule
newValue ClientVpnAuthorizationRule {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClientVpnAuthorizationRule -> ()
accessGroupId :: ClientVpnAuthorizationRule -> Maybe (Value Text)
authorizeAllGroups :: ClientVpnAuthorizationRule -> Maybe (Value Bool)
clientVpnEndpointId :: ClientVpnAuthorizationRule -> Value Text
description :: ClientVpnAuthorizationRule -> Maybe (Value Text)
targetNetworkCidr :: ClientVpnAuthorizationRule -> Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
    = ClientVpnAuthorizationRule
        {accessGroupId :: Maybe (Value Text)
accessGroupId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AccessGroupId" ClientVpnAuthorizationRule
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
haddock_workaround_ :: ()
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
instance Property "AuthorizeAllGroups" ClientVpnAuthorizationRule where
  type PropertyType "AuthorizeAllGroups" ClientVpnAuthorizationRule = Value Prelude.Bool
  set :: PropertyType "AuthorizeAllGroups" ClientVpnAuthorizationRule
-> ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule
set PropertyType "AuthorizeAllGroups" ClientVpnAuthorizationRule
newValue ClientVpnAuthorizationRule {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClientVpnAuthorizationRule -> ()
accessGroupId :: ClientVpnAuthorizationRule -> Maybe (Value Text)
authorizeAllGroups :: ClientVpnAuthorizationRule -> Maybe (Value Bool)
clientVpnEndpointId :: ClientVpnAuthorizationRule -> Value Text
description :: ClientVpnAuthorizationRule -> Maybe (Value Text)
targetNetworkCidr :: ClientVpnAuthorizationRule -> Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
    = ClientVpnAuthorizationRule
        {authorizeAllGroups :: Maybe (Value Bool)
authorizeAllGroups = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AuthorizeAllGroups" ClientVpnAuthorizationRule
Value Bool
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
instance Property "ClientVpnEndpointId" ClientVpnAuthorizationRule where
  type PropertyType "ClientVpnEndpointId" ClientVpnAuthorizationRule = Value Prelude.Text
  set :: PropertyType "ClientVpnEndpointId" ClientVpnAuthorizationRule
-> ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule
set PropertyType "ClientVpnEndpointId" ClientVpnAuthorizationRule
newValue ClientVpnAuthorizationRule {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClientVpnAuthorizationRule -> ()
accessGroupId :: ClientVpnAuthorizationRule -> Maybe (Value Text)
authorizeAllGroups :: ClientVpnAuthorizationRule -> Maybe (Value Bool)
clientVpnEndpointId :: ClientVpnAuthorizationRule -> Value Text
description :: ClientVpnAuthorizationRule -> Maybe (Value Text)
targetNetworkCidr :: ClientVpnAuthorizationRule -> Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
    = ClientVpnAuthorizationRule {clientVpnEndpointId :: Value Text
clientVpnEndpointId = PropertyType "ClientVpnEndpointId" ClientVpnAuthorizationRule
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
instance Property "Description" ClientVpnAuthorizationRule where
  type PropertyType "Description" ClientVpnAuthorizationRule = Value Prelude.Text
  set :: PropertyType "Description" ClientVpnAuthorizationRule
-> ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule
set PropertyType "Description" ClientVpnAuthorizationRule
newValue ClientVpnAuthorizationRule {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClientVpnAuthorizationRule -> ()
accessGroupId :: ClientVpnAuthorizationRule -> Maybe (Value Text)
authorizeAllGroups :: ClientVpnAuthorizationRule -> Maybe (Value Bool)
clientVpnEndpointId :: ClientVpnAuthorizationRule -> Value Text
description :: ClientVpnAuthorizationRule -> Maybe (Value Text)
targetNetworkCidr :: ClientVpnAuthorizationRule -> Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
    = ClientVpnAuthorizationRule
        {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" ClientVpnAuthorizationRule
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
targetNetworkCidr :: Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
targetNetworkCidr :: Value Text
..}
instance Property "TargetNetworkCidr" ClientVpnAuthorizationRule where
  type PropertyType "TargetNetworkCidr" ClientVpnAuthorizationRule = Value Prelude.Text
  set :: PropertyType "TargetNetworkCidr" ClientVpnAuthorizationRule
-> ClientVpnAuthorizationRule -> ClientVpnAuthorizationRule
set PropertyType "TargetNetworkCidr" ClientVpnAuthorizationRule
newValue ClientVpnAuthorizationRule {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ClientVpnAuthorizationRule -> ()
accessGroupId :: ClientVpnAuthorizationRule -> Maybe (Value Text)
authorizeAllGroups :: ClientVpnAuthorizationRule -> Maybe (Value Bool)
clientVpnEndpointId :: ClientVpnAuthorizationRule -> Value Text
description :: ClientVpnAuthorizationRule -> Maybe (Value Text)
targetNetworkCidr :: ClientVpnAuthorizationRule -> Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
targetNetworkCidr :: Value Text
..}
    = ClientVpnAuthorizationRule {targetNetworkCidr :: Value Text
targetNetworkCidr = PropertyType "TargetNetworkCidr" ClientVpnAuthorizationRule
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
haddock_workaround_ :: ()
accessGroupId :: Maybe (Value Text)
authorizeAllGroups :: Maybe (Value Bool)
clientVpnEndpointId :: Value Text
description :: Maybe (Value Text)
..}