{-# 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.VerifiedAccessLogDeliveryStatus 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.VerifiedAccessLogDeliveryStatusCode
import qualified Amazonka.Prelude as Prelude
data VerifiedAccessLogDeliveryStatus = VerifiedAccessLogDeliveryStatus'
{
VerifiedAccessLogDeliveryStatus
-> Maybe VerifiedAccessLogDeliveryStatusCode
code :: Prelude.Maybe VerifiedAccessLogDeliveryStatusCode,
VerifiedAccessLogDeliveryStatus -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (VerifiedAccessLogDeliveryStatus
-> VerifiedAccessLogDeliveryStatus -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerifiedAccessLogDeliveryStatus
-> VerifiedAccessLogDeliveryStatus -> Bool
$c/= :: VerifiedAccessLogDeliveryStatus
-> VerifiedAccessLogDeliveryStatus -> Bool
== :: VerifiedAccessLogDeliveryStatus
-> VerifiedAccessLogDeliveryStatus -> Bool
$c== :: VerifiedAccessLogDeliveryStatus
-> VerifiedAccessLogDeliveryStatus -> Bool
Prelude.Eq, ReadPrec [VerifiedAccessLogDeliveryStatus]
ReadPrec VerifiedAccessLogDeliveryStatus
Int -> ReadS VerifiedAccessLogDeliveryStatus
ReadS [VerifiedAccessLogDeliveryStatus]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VerifiedAccessLogDeliveryStatus]
$creadListPrec :: ReadPrec [VerifiedAccessLogDeliveryStatus]
readPrec :: ReadPrec VerifiedAccessLogDeliveryStatus
$creadPrec :: ReadPrec VerifiedAccessLogDeliveryStatus
readList :: ReadS [VerifiedAccessLogDeliveryStatus]
$creadList :: ReadS [VerifiedAccessLogDeliveryStatus]
readsPrec :: Int -> ReadS VerifiedAccessLogDeliveryStatus
$creadsPrec :: Int -> ReadS VerifiedAccessLogDeliveryStatus
Prelude.Read, Int -> VerifiedAccessLogDeliveryStatus -> ShowS
[VerifiedAccessLogDeliveryStatus] -> ShowS
VerifiedAccessLogDeliveryStatus -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VerifiedAccessLogDeliveryStatus] -> ShowS
$cshowList :: [VerifiedAccessLogDeliveryStatus] -> ShowS
show :: VerifiedAccessLogDeliveryStatus -> String
$cshow :: VerifiedAccessLogDeliveryStatus -> String
showsPrec :: Int -> VerifiedAccessLogDeliveryStatus -> ShowS
$cshowsPrec :: Int -> VerifiedAccessLogDeliveryStatus -> ShowS
Prelude.Show, forall x.
Rep VerifiedAccessLogDeliveryStatus x
-> VerifiedAccessLogDeliveryStatus
forall x.
VerifiedAccessLogDeliveryStatus
-> Rep VerifiedAccessLogDeliveryStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VerifiedAccessLogDeliveryStatus x
-> VerifiedAccessLogDeliveryStatus
$cfrom :: forall x.
VerifiedAccessLogDeliveryStatus
-> Rep VerifiedAccessLogDeliveryStatus x
Prelude.Generic)
newVerifiedAccessLogDeliveryStatus ::
VerifiedAccessLogDeliveryStatus
newVerifiedAccessLogDeliveryStatus :: VerifiedAccessLogDeliveryStatus
newVerifiedAccessLogDeliveryStatus =
VerifiedAccessLogDeliveryStatus'
{ $sel:code:VerifiedAccessLogDeliveryStatus' :: Maybe VerifiedAccessLogDeliveryStatusCode
code =
forall a. Maybe a
Prelude.Nothing,
$sel:message:VerifiedAccessLogDeliveryStatus' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing
}
verifiedAccessLogDeliveryStatus_code :: Lens.Lens' VerifiedAccessLogDeliveryStatus (Prelude.Maybe VerifiedAccessLogDeliveryStatusCode)
verifiedAccessLogDeliveryStatus_code :: Lens'
VerifiedAccessLogDeliveryStatus
(Maybe VerifiedAccessLogDeliveryStatusCode)
verifiedAccessLogDeliveryStatus_code = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifiedAccessLogDeliveryStatus' {Maybe VerifiedAccessLogDeliveryStatusCode
code :: Maybe VerifiedAccessLogDeliveryStatusCode
$sel:code:VerifiedAccessLogDeliveryStatus' :: VerifiedAccessLogDeliveryStatus
-> Maybe VerifiedAccessLogDeliveryStatusCode
code} -> Maybe VerifiedAccessLogDeliveryStatusCode
code) (\s :: VerifiedAccessLogDeliveryStatus
s@VerifiedAccessLogDeliveryStatus' {} Maybe VerifiedAccessLogDeliveryStatusCode
a -> VerifiedAccessLogDeliveryStatus
s {$sel:code:VerifiedAccessLogDeliveryStatus' :: Maybe VerifiedAccessLogDeliveryStatusCode
code = Maybe VerifiedAccessLogDeliveryStatusCode
a} :: VerifiedAccessLogDeliveryStatus)
verifiedAccessLogDeliveryStatus_message :: Lens.Lens' VerifiedAccessLogDeliveryStatus (Prelude.Maybe Prelude.Text)
verifiedAccessLogDeliveryStatus_message :: Lens' VerifiedAccessLogDeliveryStatus (Maybe Text)
verifiedAccessLogDeliveryStatus_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VerifiedAccessLogDeliveryStatus' {Maybe Text
message :: Maybe Text
$sel:message:VerifiedAccessLogDeliveryStatus' :: VerifiedAccessLogDeliveryStatus -> Maybe Text
message} -> Maybe Text
message) (\s :: VerifiedAccessLogDeliveryStatus
s@VerifiedAccessLogDeliveryStatus' {} Maybe Text
a -> VerifiedAccessLogDeliveryStatus
s {$sel:message:VerifiedAccessLogDeliveryStatus' :: Maybe Text
message = Maybe Text
a} :: VerifiedAccessLogDeliveryStatus)
instance Data.FromXML VerifiedAccessLogDeliveryStatus where
parseXML :: [Node] -> Either String VerifiedAccessLogDeliveryStatus
parseXML [Node]
x =
Maybe VerifiedAccessLogDeliveryStatusCode
-> Maybe Text -> VerifiedAccessLogDeliveryStatus
VerifiedAccessLogDeliveryStatus'
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
"code")
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
"message")
instance
Prelude.Hashable
VerifiedAccessLogDeliveryStatus
where
hashWithSalt :: Int -> VerifiedAccessLogDeliveryStatus -> Int
hashWithSalt
Int
_salt
VerifiedAccessLogDeliveryStatus' {Maybe Text
Maybe VerifiedAccessLogDeliveryStatusCode
message :: Maybe Text
code :: Maybe VerifiedAccessLogDeliveryStatusCode
$sel:message:VerifiedAccessLogDeliveryStatus' :: VerifiedAccessLogDeliveryStatus -> Maybe Text
$sel:code:VerifiedAccessLogDeliveryStatus' :: VerifiedAccessLogDeliveryStatus
-> Maybe VerifiedAccessLogDeliveryStatusCode
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VerifiedAccessLogDeliveryStatusCode
code
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
instance
Prelude.NFData
VerifiedAccessLogDeliveryStatus
where
rnf :: VerifiedAccessLogDeliveryStatus -> ()
rnf VerifiedAccessLogDeliveryStatus' {Maybe Text
Maybe VerifiedAccessLogDeliveryStatusCode
message :: Maybe Text
code :: Maybe VerifiedAccessLogDeliveryStatusCode
$sel:message:VerifiedAccessLogDeliveryStatus' :: VerifiedAccessLogDeliveryStatus -> Maybe Text
$sel:code:VerifiedAccessLogDeliveryStatus' :: VerifiedAccessLogDeliveryStatus
-> Maybe VerifiedAccessLogDeliveryStatusCode
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe VerifiedAccessLogDeliveryStatusCode
code seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message