{-# 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.EC2.Types.AttachmentEnaSrdSpecification where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.AttachmentEnaSrdUdpSpecification
import qualified Amazonka.Prelude as Prelude
data AttachmentEnaSrdSpecification = AttachmentEnaSrdSpecification'
{
AttachmentEnaSrdSpecification -> Maybe Bool
enaSrdEnabled :: Prelude.Maybe Prelude.Bool,
AttachmentEnaSrdSpecification
-> Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification :: Prelude.Maybe AttachmentEnaSrdUdpSpecification
}
deriving (AttachmentEnaSrdSpecification
-> AttachmentEnaSrdSpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttachmentEnaSrdSpecification
-> AttachmentEnaSrdSpecification -> Bool
$c/= :: AttachmentEnaSrdSpecification
-> AttachmentEnaSrdSpecification -> Bool
== :: AttachmentEnaSrdSpecification
-> AttachmentEnaSrdSpecification -> Bool
$c== :: AttachmentEnaSrdSpecification
-> AttachmentEnaSrdSpecification -> Bool
Prelude.Eq, ReadPrec [AttachmentEnaSrdSpecification]
ReadPrec AttachmentEnaSrdSpecification
Int -> ReadS AttachmentEnaSrdSpecification
ReadS [AttachmentEnaSrdSpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttachmentEnaSrdSpecification]
$creadListPrec :: ReadPrec [AttachmentEnaSrdSpecification]
readPrec :: ReadPrec AttachmentEnaSrdSpecification
$creadPrec :: ReadPrec AttachmentEnaSrdSpecification
readList :: ReadS [AttachmentEnaSrdSpecification]
$creadList :: ReadS [AttachmentEnaSrdSpecification]
readsPrec :: Int -> ReadS AttachmentEnaSrdSpecification
$creadsPrec :: Int -> ReadS AttachmentEnaSrdSpecification
Prelude.Read, Int -> AttachmentEnaSrdSpecification -> ShowS
[AttachmentEnaSrdSpecification] -> ShowS
AttachmentEnaSrdSpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttachmentEnaSrdSpecification] -> ShowS
$cshowList :: [AttachmentEnaSrdSpecification] -> ShowS
show :: AttachmentEnaSrdSpecification -> String
$cshow :: AttachmentEnaSrdSpecification -> String
showsPrec :: Int -> AttachmentEnaSrdSpecification -> ShowS
$cshowsPrec :: Int -> AttachmentEnaSrdSpecification -> ShowS
Prelude.Show, forall x.
Rep AttachmentEnaSrdSpecification x
-> AttachmentEnaSrdSpecification
forall x.
AttachmentEnaSrdSpecification
-> Rep AttachmentEnaSrdSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AttachmentEnaSrdSpecification x
-> AttachmentEnaSrdSpecification
$cfrom :: forall x.
AttachmentEnaSrdSpecification
-> Rep AttachmentEnaSrdSpecification x
Prelude.Generic)
newAttachmentEnaSrdSpecification ::
AttachmentEnaSrdSpecification
newAttachmentEnaSrdSpecification :: AttachmentEnaSrdSpecification
newAttachmentEnaSrdSpecification =
AttachmentEnaSrdSpecification'
{ $sel:enaSrdEnabled:AttachmentEnaSrdSpecification' :: Maybe Bool
enaSrdEnabled =
forall a. Maybe a
Prelude.Nothing,
$sel:enaSrdUdpSpecification:AttachmentEnaSrdSpecification' :: Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification = forall a. Maybe a
Prelude.Nothing
}
attachmentEnaSrdSpecification_enaSrdEnabled :: Lens.Lens' AttachmentEnaSrdSpecification (Prelude.Maybe Prelude.Bool)
attachmentEnaSrdSpecification_enaSrdEnabled :: Lens' AttachmentEnaSrdSpecification (Maybe Bool)
attachmentEnaSrdSpecification_enaSrdEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachmentEnaSrdSpecification' {Maybe Bool
enaSrdEnabled :: Maybe Bool
$sel:enaSrdEnabled:AttachmentEnaSrdSpecification' :: AttachmentEnaSrdSpecification -> Maybe Bool
enaSrdEnabled} -> Maybe Bool
enaSrdEnabled) (\s :: AttachmentEnaSrdSpecification
s@AttachmentEnaSrdSpecification' {} Maybe Bool
a -> AttachmentEnaSrdSpecification
s {$sel:enaSrdEnabled:AttachmentEnaSrdSpecification' :: Maybe Bool
enaSrdEnabled = Maybe Bool
a} :: AttachmentEnaSrdSpecification)
attachmentEnaSrdSpecification_enaSrdUdpSpecification :: Lens.Lens' AttachmentEnaSrdSpecification (Prelude.Maybe AttachmentEnaSrdUdpSpecification)
attachmentEnaSrdSpecification_enaSrdUdpSpecification :: Lens'
AttachmentEnaSrdSpecification
(Maybe AttachmentEnaSrdUdpSpecification)
attachmentEnaSrdSpecification_enaSrdUdpSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttachmentEnaSrdSpecification' {Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification :: Maybe AttachmentEnaSrdUdpSpecification
$sel:enaSrdUdpSpecification:AttachmentEnaSrdSpecification' :: AttachmentEnaSrdSpecification
-> Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification} -> Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification) (\s :: AttachmentEnaSrdSpecification
s@AttachmentEnaSrdSpecification' {} Maybe AttachmentEnaSrdUdpSpecification
a -> AttachmentEnaSrdSpecification
s {$sel:enaSrdUdpSpecification:AttachmentEnaSrdSpecification' :: Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification = Maybe AttachmentEnaSrdUdpSpecification
a} :: AttachmentEnaSrdSpecification)
instance Data.FromXML AttachmentEnaSrdSpecification where
parseXML :: [Node] -> Either String AttachmentEnaSrdSpecification
parseXML [Node]
x =
Maybe Bool
-> Maybe AttachmentEnaSrdUdpSpecification
-> AttachmentEnaSrdSpecification
AttachmentEnaSrdSpecification'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"enaSrdEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"enaSrdUdpSpecification")
instance
Prelude.Hashable
AttachmentEnaSrdSpecification
where
hashWithSalt :: Int -> AttachmentEnaSrdSpecification -> Int
hashWithSalt Int
_salt AttachmentEnaSrdSpecification' {Maybe Bool
Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification :: Maybe AttachmentEnaSrdUdpSpecification
enaSrdEnabled :: Maybe Bool
$sel:enaSrdUdpSpecification:AttachmentEnaSrdSpecification' :: AttachmentEnaSrdSpecification
-> Maybe AttachmentEnaSrdUdpSpecification
$sel:enaSrdEnabled:AttachmentEnaSrdSpecification' :: AttachmentEnaSrdSpecification -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enaSrdEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification
instance Prelude.NFData AttachmentEnaSrdSpecification where
rnf :: AttachmentEnaSrdSpecification -> ()
rnf AttachmentEnaSrdSpecification' {Maybe Bool
Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification :: Maybe AttachmentEnaSrdUdpSpecification
enaSrdEnabled :: Maybe Bool
$sel:enaSrdUdpSpecification:AttachmentEnaSrdSpecification' :: AttachmentEnaSrdSpecification
-> Maybe AttachmentEnaSrdUdpSpecification
$sel:enaSrdEnabled:AttachmentEnaSrdSpecification' :: AttachmentEnaSrdSpecification -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enaSrdEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AttachmentEnaSrdUdpSpecification
enaSrdUdpSpecification