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