module Stratosphere.EC2.VerifiedAccessEndpoint.CidrOptionsProperty (
        module Exports, CidrOptionsProperty(..), mkCidrOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.VerifiedAccessEndpoint.PortRangeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CidrOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessendpoint-cidroptions.html>
    CidrOptionsProperty {CidrOptionsProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessendpoint-cidroptions.html#cfn-ec2-verifiedaccessendpoint-cidroptions-cidr>
                         CidrOptionsProperty -> Maybe (Value Text)
cidr :: (Prelude.Maybe (Value Prelude.Text)),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessendpoint-cidroptions.html#cfn-ec2-verifiedaccessendpoint-cidroptions-portranges>
                         CidrOptionsProperty -> Maybe [PortRangeProperty]
portRanges :: (Prelude.Maybe [PortRangeProperty]),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessendpoint-cidroptions.html#cfn-ec2-verifiedaccessendpoint-cidroptions-protocol>
                         CidrOptionsProperty -> Maybe (Value Text)
protocol :: (Prelude.Maybe (Value Prelude.Text)),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessendpoint-cidroptions.html#cfn-ec2-verifiedaccessendpoint-cidroptions-subnetids>
                         CidrOptionsProperty -> Maybe (ValueList Text)
subnetIds :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (CidrOptionsProperty -> CidrOptionsProperty -> Bool
(CidrOptionsProperty -> CidrOptionsProperty -> Bool)
-> (CidrOptionsProperty -> CidrOptionsProperty -> Bool)
-> Eq CidrOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CidrOptionsProperty -> CidrOptionsProperty -> Bool
== :: CidrOptionsProperty -> CidrOptionsProperty -> Bool
$c/= :: CidrOptionsProperty -> CidrOptionsProperty -> Bool
/= :: CidrOptionsProperty -> CidrOptionsProperty -> Bool
Prelude.Eq, Int -> CidrOptionsProperty -> ShowS
[CidrOptionsProperty] -> ShowS
CidrOptionsProperty -> String
(Int -> CidrOptionsProperty -> ShowS)
-> (CidrOptionsProperty -> String)
-> ([CidrOptionsProperty] -> ShowS)
-> Show CidrOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CidrOptionsProperty -> ShowS
showsPrec :: Int -> CidrOptionsProperty -> ShowS
$cshow :: CidrOptionsProperty -> String
show :: CidrOptionsProperty -> String
$cshowList :: [CidrOptionsProperty] -> ShowS
showList :: [CidrOptionsProperty] -> ShowS
Prelude.Show)
mkCidrOptionsProperty :: CidrOptionsProperty
mkCidrOptionsProperty :: CidrOptionsProperty
mkCidrOptionsProperty
  = CidrOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cidr :: Maybe (Value Text)
cidr = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       portRanges :: Maybe [PortRangeProperty]
portRanges = Maybe [PortRangeProperty]
forall a. Maybe a
Prelude.Nothing, protocol :: Maybe (Value Text)
protocol = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       subnetIds :: Maybe (ValueList Text)
subnetIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CidrOptionsProperty where
  toResourceProperties :: CidrOptionsProperty -> ResourceProperties
toResourceProperties CidrOptionsProperty {Maybe [PortRangeProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CidrOptionsProperty -> ()
cidr :: CidrOptionsProperty -> Maybe (Value Text)
portRanges :: CidrOptionsProperty -> Maybe [PortRangeProperty]
protocol :: CidrOptionsProperty -> Maybe (Value Text)
subnetIds :: CidrOptionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::VerifiedAccessEndpoint.CidrOptions",
         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
"Cidr" (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)
cidr,
                            Key -> [PortRangeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PortRanges" ([PortRangeProperty] -> (Key, Value))
-> Maybe [PortRangeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PortRangeProperty]
portRanges,
                            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
"Protocol" (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)
protocol,
                            Key -> ValueList 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
"SubnetIds" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
subnetIds])}
instance JSON.ToJSON CidrOptionsProperty where
  toJSON :: CidrOptionsProperty -> Value
toJSON CidrOptionsProperty {Maybe [PortRangeProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CidrOptionsProperty -> ()
cidr :: CidrOptionsProperty -> Maybe (Value Text)
portRanges :: CidrOptionsProperty -> Maybe [PortRangeProperty]
protocol :: CidrOptionsProperty -> Maybe (Value Text)
subnetIds :: CidrOptionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList 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
"Cidr" (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)
cidr,
               Key -> [PortRangeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PortRanges" ([PortRangeProperty] -> (Key, Value))
-> Maybe [PortRangeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PortRangeProperty]
portRanges,
               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
"Protocol" (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)
protocol,
               Key -> ValueList 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
"SubnetIds" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
subnetIds]))
instance Property "Cidr" CidrOptionsProperty where
  type PropertyType "Cidr" CidrOptionsProperty = Value Prelude.Text
  set :: PropertyType "Cidr" CidrOptionsProperty
-> CidrOptionsProperty -> CidrOptionsProperty
set PropertyType "Cidr" CidrOptionsProperty
newValue CidrOptionsProperty {Maybe [PortRangeProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CidrOptionsProperty -> ()
cidr :: CidrOptionsProperty -> Maybe (Value Text)
portRanges :: CidrOptionsProperty -> Maybe [PortRangeProperty]
protocol :: CidrOptionsProperty -> Maybe (Value Text)
subnetIds :: CidrOptionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
..}
    = CidrOptionsProperty {cidr :: Maybe (Value Text)
cidr = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Cidr" CidrOptionsProperty
Value Text
newValue, Maybe [PortRangeProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
..}
instance Property "PortRanges" CidrOptionsProperty where
  type PropertyType "PortRanges" CidrOptionsProperty = [PortRangeProperty]
  set :: PropertyType "PortRanges" CidrOptionsProperty
-> CidrOptionsProperty -> CidrOptionsProperty
set PropertyType "PortRanges" CidrOptionsProperty
newValue CidrOptionsProperty {Maybe [PortRangeProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CidrOptionsProperty -> ()
cidr :: CidrOptionsProperty -> Maybe (Value Text)
portRanges :: CidrOptionsProperty -> Maybe [PortRangeProperty]
protocol :: CidrOptionsProperty -> Maybe (Value Text)
subnetIds :: CidrOptionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
..}
    = CidrOptionsProperty {portRanges :: Maybe [PortRangeProperty]
portRanges = [PortRangeProperty] -> Maybe [PortRangeProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PortRangeProperty]
PropertyType "PortRanges" CidrOptionsProperty
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
..}
instance Property "Protocol" CidrOptionsProperty where
  type PropertyType "Protocol" CidrOptionsProperty = Value Prelude.Text
  set :: PropertyType "Protocol" CidrOptionsProperty
-> CidrOptionsProperty -> CidrOptionsProperty
set PropertyType "Protocol" CidrOptionsProperty
newValue CidrOptionsProperty {Maybe [PortRangeProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CidrOptionsProperty -> ()
cidr :: CidrOptionsProperty -> Maybe (Value Text)
portRanges :: CidrOptionsProperty -> Maybe [PortRangeProperty]
protocol :: CidrOptionsProperty -> Maybe (Value Text)
subnetIds :: CidrOptionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
..}
    = CidrOptionsProperty {protocol :: Maybe (Value Text)
protocol = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Protocol" CidrOptionsProperty
Value Text
newValue, Maybe [PortRangeProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
subnetIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
subnetIds :: Maybe (ValueList Text)
..}
instance Property "SubnetIds" CidrOptionsProperty where
  type PropertyType "SubnetIds" CidrOptionsProperty = ValueList Prelude.Text
  set :: PropertyType "SubnetIds" CidrOptionsProperty
-> CidrOptionsProperty -> CidrOptionsProperty
set PropertyType "SubnetIds" CidrOptionsProperty
newValue CidrOptionsProperty {Maybe [PortRangeProperty]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: CidrOptionsProperty -> ()
cidr :: CidrOptionsProperty -> Maybe (Value Text)
portRanges :: CidrOptionsProperty -> Maybe [PortRangeProperty]
protocol :: CidrOptionsProperty -> Maybe (Value Text)
subnetIds :: CidrOptionsProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
..}
    = CidrOptionsProperty {subnetIds :: Maybe (ValueList Text)
subnetIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SubnetIds" CidrOptionsProperty
ValueList Text
newValue, Maybe [PortRangeProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
haddock_workaround_ :: ()
cidr :: Maybe (Value Text)
portRanges :: Maybe [PortRangeProperty]
protocol :: Maybe (Value Text)
..}