{-# 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.AccountFreeTrialInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GuardDuty.Types.DataSourcesFreeTrial
import qualified Amazonka.Prelude as Prelude
data AccountFreeTrialInfo = AccountFreeTrialInfo'
{
AccountFreeTrialInfo -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
AccountFreeTrialInfo -> Maybe DataSourcesFreeTrial
dataSources :: Prelude.Maybe DataSourcesFreeTrial
}
deriving (AccountFreeTrialInfo -> AccountFreeTrialInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountFreeTrialInfo -> AccountFreeTrialInfo -> Bool
$c/= :: AccountFreeTrialInfo -> AccountFreeTrialInfo -> Bool
== :: AccountFreeTrialInfo -> AccountFreeTrialInfo -> Bool
$c== :: AccountFreeTrialInfo -> AccountFreeTrialInfo -> Bool
Prelude.Eq, ReadPrec [AccountFreeTrialInfo]
ReadPrec AccountFreeTrialInfo
Int -> ReadS AccountFreeTrialInfo
ReadS [AccountFreeTrialInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountFreeTrialInfo]
$creadListPrec :: ReadPrec [AccountFreeTrialInfo]
readPrec :: ReadPrec AccountFreeTrialInfo
$creadPrec :: ReadPrec AccountFreeTrialInfo
readList :: ReadS [AccountFreeTrialInfo]
$creadList :: ReadS [AccountFreeTrialInfo]
readsPrec :: Int -> ReadS AccountFreeTrialInfo
$creadsPrec :: Int -> ReadS AccountFreeTrialInfo
Prelude.Read, Int -> AccountFreeTrialInfo -> ShowS
[AccountFreeTrialInfo] -> ShowS
AccountFreeTrialInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountFreeTrialInfo] -> ShowS
$cshowList :: [AccountFreeTrialInfo] -> ShowS
show :: AccountFreeTrialInfo -> String
$cshow :: AccountFreeTrialInfo -> String
showsPrec :: Int -> AccountFreeTrialInfo -> ShowS
$cshowsPrec :: Int -> AccountFreeTrialInfo -> ShowS
Prelude.Show, forall x. Rep AccountFreeTrialInfo x -> AccountFreeTrialInfo
forall x. AccountFreeTrialInfo -> Rep AccountFreeTrialInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountFreeTrialInfo x -> AccountFreeTrialInfo
$cfrom :: forall x. AccountFreeTrialInfo -> Rep AccountFreeTrialInfo x
Prelude.Generic)
newAccountFreeTrialInfo ::
AccountFreeTrialInfo
newAccountFreeTrialInfo :: AccountFreeTrialInfo
newAccountFreeTrialInfo =
AccountFreeTrialInfo'
{ $sel:accountId:AccountFreeTrialInfo' :: Maybe Text
accountId = forall a. Maybe a
Prelude.Nothing,
$sel:dataSources:AccountFreeTrialInfo' :: Maybe DataSourcesFreeTrial
dataSources = forall a. Maybe a
Prelude.Nothing
}
accountFreeTrialInfo_accountId :: Lens.Lens' AccountFreeTrialInfo (Prelude.Maybe Prelude.Text)
accountFreeTrialInfo_accountId :: Lens' AccountFreeTrialInfo (Maybe Text)
accountFreeTrialInfo_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountFreeTrialInfo' {Maybe Text
accountId :: Maybe Text
$sel:accountId:AccountFreeTrialInfo' :: AccountFreeTrialInfo -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: AccountFreeTrialInfo
s@AccountFreeTrialInfo' {} Maybe Text
a -> AccountFreeTrialInfo
s {$sel:accountId:AccountFreeTrialInfo' :: Maybe Text
accountId = Maybe Text
a} :: AccountFreeTrialInfo)
accountFreeTrialInfo_dataSources :: Lens.Lens' AccountFreeTrialInfo (Prelude.Maybe DataSourcesFreeTrial)
accountFreeTrialInfo_dataSources :: Lens' AccountFreeTrialInfo (Maybe DataSourcesFreeTrial)
accountFreeTrialInfo_dataSources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountFreeTrialInfo' {Maybe DataSourcesFreeTrial
dataSources :: Maybe DataSourcesFreeTrial
$sel:dataSources:AccountFreeTrialInfo' :: AccountFreeTrialInfo -> Maybe DataSourcesFreeTrial
dataSources} -> Maybe DataSourcesFreeTrial
dataSources) (\s :: AccountFreeTrialInfo
s@AccountFreeTrialInfo' {} Maybe DataSourcesFreeTrial
a -> AccountFreeTrialInfo
s {$sel:dataSources:AccountFreeTrialInfo' :: Maybe DataSourcesFreeTrial
dataSources = Maybe DataSourcesFreeTrial
a} :: AccountFreeTrialInfo)
instance Data.FromJSON AccountFreeTrialInfo where
parseJSON :: Value -> Parser AccountFreeTrialInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AccountFreeTrialInfo"
( \Object
x ->
Maybe Text -> Maybe DataSourcesFreeTrial -> AccountFreeTrialInfo
AccountFreeTrialInfo'
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
"dataSources")
)
instance Prelude.Hashable AccountFreeTrialInfo where
hashWithSalt :: Int -> AccountFreeTrialInfo -> Int
hashWithSalt Int
_salt AccountFreeTrialInfo' {Maybe Text
Maybe DataSourcesFreeTrial
dataSources :: Maybe DataSourcesFreeTrial
accountId :: Maybe Text
$sel:dataSources:AccountFreeTrialInfo' :: AccountFreeTrialInfo -> Maybe DataSourcesFreeTrial
$sel:accountId:AccountFreeTrialInfo' :: AccountFreeTrialInfo -> 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 DataSourcesFreeTrial
dataSources
instance Prelude.NFData AccountFreeTrialInfo where
rnf :: AccountFreeTrialInfo -> ()
rnf AccountFreeTrialInfo' {Maybe Text
Maybe DataSourcesFreeTrial
dataSources :: Maybe DataSourcesFreeTrial
accountId :: Maybe Text
$sel:dataSources:AccountFreeTrialInfo' :: AccountFreeTrialInfo -> Maybe DataSourcesFreeTrial
$sel:accountId:AccountFreeTrialInfo' :: AccountFreeTrialInfo -> 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 DataSourcesFreeTrial
dataSources