{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MediaLive.Types.InputWhitelistRuleCidr where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data InputWhitelistRuleCidr = InputWhitelistRuleCidr'
{
InputWhitelistRuleCidr -> Maybe Text
cidr :: Prelude.Maybe Prelude.Text
}
deriving (InputWhitelistRuleCidr -> InputWhitelistRuleCidr -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputWhitelistRuleCidr -> InputWhitelistRuleCidr -> Bool
$c/= :: InputWhitelistRuleCidr -> InputWhitelistRuleCidr -> Bool
== :: InputWhitelistRuleCidr -> InputWhitelistRuleCidr -> Bool
$c== :: InputWhitelistRuleCidr -> InputWhitelistRuleCidr -> Bool
Prelude.Eq, ReadPrec [InputWhitelistRuleCidr]
ReadPrec InputWhitelistRuleCidr
Int -> ReadS InputWhitelistRuleCidr
ReadS [InputWhitelistRuleCidr]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputWhitelistRuleCidr]
$creadListPrec :: ReadPrec [InputWhitelistRuleCidr]
readPrec :: ReadPrec InputWhitelistRuleCidr
$creadPrec :: ReadPrec InputWhitelistRuleCidr
readList :: ReadS [InputWhitelistRuleCidr]
$creadList :: ReadS [InputWhitelistRuleCidr]
readsPrec :: Int -> ReadS InputWhitelistRuleCidr
$creadsPrec :: Int -> ReadS InputWhitelistRuleCidr
Prelude.Read, Int -> InputWhitelistRuleCidr -> ShowS
[InputWhitelistRuleCidr] -> ShowS
InputWhitelistRuleCidr -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputWhitelistRuleCidr] -> ShowS
$cshowList :: [InputWhitelistRuleCidr] -> ShowS
show :: InputWhitelistRuleCidr -> String
$cshow :: InputWhitelistRuleCidr -> String
showsPrec :: Int -> InputWhitelistRuleCidr -> ShowS
$cshowsPrec :: Int -> InputWhitelistRuleCidr -> ShowS
Prelude.Show, forall x. Rep InputWhitelistRuleCidr x -> InputWhitelistRuleCidr
forall x. InputWhitelistRuleCidr -> Rep InputWhitelistRuleCidr x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InputWhitelistRuleCidr x -> InputWhitelistRuleCidr
$cfrom :: forall x. InputWhitelistRuleCidr -> Rep InputWhitelistRuleCidr x
Prelude.Generic)
newInputWhitelistRuleCidr ::
InputWhitelistRuleCidr
newInputWhitelistRuleCidr :: InputWhitelistRuleCidr
newInputWhitelistRuleCidr =
InputWhitelistRuleCidr' {$sel:cidr:InputWhitelistRuleCidr' :: Maybe Text
cidr = forall a. Maybe a
Prelude.Nothing}
inputWhitelistRuleCidr_cidr :: Lens.Lens' InputWhitelistRuleCidr (Prelude.Maybe Prelude.Text)
inputWhitelistRuleCidr_cidr :: Lens' InputWhitelistRuleCidr (Maybe Text)
inputWhitelistRuleCidr_cidr = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputWhitelistRuleCidr' {Maybe Text
cidr :: Maybe Text
$sel:cidr:InputWhitelistRuleCidr' :: InputWhitelistRuleCidr -> Maybe Text
cidr} -> Maybe Text
cidr) (\s :: InputWhitelistRuleCidr
s@InputWhitelistRuleCidr' {} Maybe Text
a -> InputWhitelistRuleCidr
s {$sel:cidr:InputWhitelistRuleCidr' :: Maybe Text
cidr = Maybe Text
a} :: InputWhitelistRuleCidr)
instance Prelude.Hashable InputWhitelistRuleCidr where
hashWithSalt :: Int -> InputWhitelistRuleCidr -> Int
hashWithSalt Int
_salt InputWhitelistRuleCidr' {Maybe Text
cidr :: Maybe Text
$sel:cidr:InputWhitelistRuleCidr' :: InputWhitelistRuleCidr -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cidr
instance Prelude.NFData InputWhitelistRuleCidr where
rnf :: InputWhitelistRuleCidr -> ()
rnf InputWhitelistRuleCidr' {Maybe Text
cidr :: Maybe Text
$sel:cidr:InputWhitelistRuleCidr' :: InputWhitelistRuleCidr -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cidr
instance Data.ToJSON InputWhitelistRuleCidr where
toJSON :: InputWhitelistRuleCidr -> Value
toJSON InputWhitelistRuleCidr' {Maybe Text
cidr :: Maybe Text
$sel:cidr:InputWhitelistRuleCidr' :: InputWhitelistRuleCidr -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"cidr" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
cidr]
)