{-# 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.GuardDuty.Types.RemoteAccountDetails 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 RemoteAccountDetails = RemoteAccountDetails'
{
RemoteAccountDetails -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
RemoteAccountDetails -> Maybe Bool
affiliated :: Prelude.Maybe Prelude.Bool
}
deriving (RemoteAccountDetails -> RemoteAccountDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoteAccountDetails -> RemoteAccountDetails -> Bool
$c/= :: RemoteAccountDetails -> RemoteAccountDetails -> Bool
== :: RemoteAccountDetails -> RemoteAccountDetails -> Bool
$c== :: RemoteAccountDetails -> RemoteAccountDetails -> Bool
Prelude.Eq, ReadPrec [RemoteAccountDetails]
ReadPrec RemoteAccountDetails
Int -> ReadS RemoteAccountDetails
ReadS [RemoteAccountDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoteAccountDetails]
$creadListPrec :: ReadPrec [RemoteAccountDetails]
readPrec :: ReadPrec RemoteAccountDetails
$creadPrec :: ReadPrec RemoteAccountDetails
readList :: ReadS [RemoteAccountDetails]
$creadList :: ReadS [RemoteAccountDetails]
readsPrec :: Int -> ReadS RemoteAccountDetails
$creadsPrec :: Int -> ReadS RemoteAccountDetails
Prelude.Read, Int -> RemoteAccountDetails -> ShowS
[RemoteAccountDetails] -> ShowS
RemoteAccountDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoteAccountDetails] -> ShowS
$cshowList :: [RemoteAccountDetails] -> ShowS
show :: RemoteAccountDetails -> String
$cshow :: RemoteAccountDetails -> String
showsPrec :: Int -> RemoteAccountDetails -> ShowS
$cshowsPrec :: Int -> RemoteAccountDetails -> ShowS
Prelude.Show, forall x. Rep RemoteAccountDetails x -> RemoteAccountDetails
forall x. RemoteAccountDetails -> Rep RemoteAccountDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RemoteAccountDetails x -> RemoteAccountDetails
$cfrom :: forall x. RemoteAccountDetails -> Rep RemoteAccountDetails x
Prelude.Generic)
newRemoteAccountDetails ::
RemoteAccountDetails
newRemoteAccountDetails :: RemoteAccountDetails
newRemoteAccountDetails =
RemoteAccountDetails'
{ $sel:accountId:RemoteAccountDetails' :: Maybe Text
accountId = forall a. Maybe a
Prelude.Nothing,
$sel:affiliated:RemoteAccountDetails' :: Maybe Bool
affiliated = forall a. Maybe a
Prelude.Nothing
}
remoteAccountDetails_accountId :: Lens.Lens' RemoteAccountDetails (Prelude.Maybe Prelude.Text)
remoteAccountDetails_accountId :: Lens' RemoteAccountDetails (Maybe Text)
remoteAccountDetails_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoteAccountDetails' {Maybe Text
accountId :: Maybe Text
$sel:accountId:RemoteAccountDetails' :: RemoteAccountDetails -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: RemoteAccountDetails
s@RemoteAccountDetails' {} Maybe Text
a -> RemoteAccountDetails
s {$sel:accountId:RemoteAccountDetails' :: Maybe Text
accountId = Maybe Text
a} :: RemoteAccountDetails)
remoteAccountDetails_affiliated :: Lens.Lens' RemoteAccountDetails (Prelude.Maybe Prelude.Bool)
remoteAccountDetails_affiliated :: Lens' RemoteAccountDetails (Maybe Bool)
remoteAccountDetails_affiliated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoteAccountDetails' {Maybe Bool
affiliated :: Maybe Bool
$sel:affiliated:RemoteAccountDetails' :: RemoteAccountDetails -> Maybe Bool
affiliated} -> Maybe Bool
affiliated) (\s :: RemoteAccountDetails
s@RemoteAccountDetails' {} Maybe Bool
a -> RemoteAccountDetails
s {$sel:affiliated:RemoteAccountDetails' :: Maybe Bool
affiliated = Maybe Bool
a} :: RemoteAccountDetails)
instance Data.FromJSON RemoteAccountDetails where
parseJSON :: Value -> Parser RemoteAccountDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RemoteAccountDetails"
( \Object
x ->
Maybe Text -> Maybe Bool -> RemoteAccountDetails
RemoteAccountDetails'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"accountId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"affiliated")
)
instance Prelude.Hashable RemoteAccountDetails where
hashWithSalt :: Int -> RemoteAccountDetails -> Int
hashWithSalt Int
_salt RemoteAccountDetails' {Maybe Bool
Maybe Text
affiliated :: Maybe Bool
accountId :: Maybe Text
$sel:affiliated:RemoteAccountDetails' :: RemoteAccountDetails -> Maybe Bool
$sel:accountId:RemoteAccountDetails' :: RemoteAccountDetails -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
affiliated
instance Prelude.NFData RemoteAccountDetails where
rnf :: RemoteAccountDetails -> ()
rnf RemoteAccountDetails' {Maybe Bool
Maybe Text
affiliated :: Maybe Bool
accountId :: Maybe Text
$sel:affiliated:RemoteAccountDetails' :: RemoteAccountDetails -> Maybe Bool
$sel:accountId:RemoteAccountDetails' :: RemoteAccountDetails -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
affiliated