{-# 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.WorkSpaces.Types.AccountModification where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkSpaces.Types.DedicatedTenancyModificationStateEnum
import Amazonka.WorkSpaces.Types.DedicatedTenancySupportResultEnum
data AccountModification = AccountModification'
{
AccountModification -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
AccountModification -> Maybe DedicatedTenancySupportResultEnum
dedicatedTenancySupport :: Prelude.Maybe DedicatedTenancySupportResultEnum,
AccountModification -> Maybe DedicatedTenancyModificationStateEnum
modificationState :: Prelude.Maybe DedicatedTenancyModificationStateEnum,
AccountModification -> Maybe Text
dedicatedTenancyManagementCidrRange :: Prelude.Maybe Prelude.Text,
AccountModification -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
AccountModification -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (AccountModification -> AccountModification -> Bool
(AccountModification -> AccountModification -> Bool)
-> (AccountModification -> AccountModification -> Bool)
-> Eq AccountModification
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountModification -> AccountModification -> Bool
$c/= :: AccountModification -> AccountModification -> Bool
== :: AccountModification -> AccountModification -> Bool
$c== :: AccountModification -> AccountModification -> Bool
Prelude.Eq, ReadPrec [AccountModification]
ReadPrec AccountModification
Int -> ReadS AccountModification
ReadS [AccountModification]
(Int -> ReadS AccountModification)
-> ReadS [AccountModification]
-> ReadPrec AccountModification
-> ReadPrec [AccountModification]
-> Read AccountModification
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountModification]
$creadListPrec :: ReadPrec [AccountModification]
readPrec :: ReadPrec AccountModification
$creadPrec :: ReadPrec AccountModification
readList :: ReadS [AccountModification]
$creadList :: ReadS [AccountModification]
readsPrec :: Int -> ReadS AccountModification
$creadsPrec :: Int -> ReadS AccountModification
Prelude.Read, Int -> AccountModification -> ShowS
[AccountModification] -> ShowS
AccountModification -> String
(Int -> AccountModification -> ShowS)
-> (AccountModification -> String)
-> ([AccountModification] -> ShowS)
-> Show AccountModification
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountModification] -> ShowS
$cshowList :: [AccountModification] -> ShowS
show :: AccountModification -> String
$cshow :: AccountModification -> String
showsPrec :: Int -> AccountModification -> ShowS
$cshowsPrec :: Int -> AccountModification -> ShowS
Prelude.Show, (forall x. AccountModification -> Rep AccountModification x)
-> (forall x. Rep AccountModification x -> AccountModification)
-> Generic AccountModification
forall x. Rep AccountModification x -> AccountModification
forall x. AccountModification -> Rep AccountModification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountModification x -> AccountModification
$cfrom :: forall x. AccountModification -> Rep AccountModification x
Prelude.Generic)
newAccountModification ::
AccountModification
newAccountModification :: AccountModification
newAccountModification =
AccountModification' :: Maybe POSIX
-> Maybe DedicatedTenancySupportResultEnum
-> Maybe DedicatedTenancyModificationStateEnum
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AccountModification
AccountModification'
{ $sel:startTime:AccountModification' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:dedicatedTenancySupport:AccountModification' :: Maybe DedicatedTenancySupportResultEnum
dedicatedTenancySupport = Maybe DedicatedTenancySupportResultEnum
forall a. Maybe a
Prelude.Nothing,
$sel:modificationState:AccountModification' :: Maybe DedicatedTenancyModificationStateEnum
modificationState = Maybe DedicatedTenancyModificationStateEnum
forall a. Maybe a
Prelude.Nothing,
$sel:dedicatedTenancyManagementCidrRange:AccountModification' :: Maybe Text
dedicatedTenancyManagementCidrRange =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:AccountModification' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:AccountModification' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
accountModification_startTime :: Lens.Lens' AccountModification (Prelude.Maybe Prelude.UTCTime)
accountModification_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AccountModification -> f AccountModification
accountModification_startTime = (AccountModification -> Maybe POSIX)
-> (AccountModification -> Maybe POSIX -> AccountModification)
-> Lens
AccountModification AccountModification (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountModification' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:AccountModification' :: AccountModification -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: AccountModification
s@AccountModification' {} Maybe POSIX
a -> AccountModification
s {$sel:startTime:AccountModification' :: Maybe POSIX
startTime = Maybe POSIX
a} :: AccountModification) ((Maybe POSIX -> f (Maybe POSIX))
-> AccountModification -> f AccountModification)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AccountModification
-> f AccountModification
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
accountModification_dedicatedTenancySupport :: Lens.Lens' AccountModification (Prelude.Maybe DedicatedTenancySupportResultEnum)
accountModification_dedicatedTenancySupport :: (Maybe DedicatedTenancySupportResultEnum
-> f (Maybe DedicatedTenancySupportResultEnum))
-> AccountModification -> f AccountModification
accountModification_dedicatedTenancySupport = (AccountModification -> Maybe DedicatedTenancySupportResultEnum)
-> (AccountModification
-> Maybe DedicatedTenancySupportResultEnum -> AccountModification)
-> Lens
AccountModification
AccountModification
(Maybe DedicatedTenancySupportResultEnum)
(Maybe DedicatedTenancySupportResultEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountModification' {Maybe DedicatedTenancySupportResultEnum
dedicatedTenancySupport :: Maybe DedicatedTenancySupportResultEnum
$sel:dedicatedTenancySupport:AccountModification' :: AccountModification -> Maybe DedicatedTenancySupportResultEnum
dedicatedTenancySupport} -> Maybe DedicatedTenancySupportResultEnum
dedicatedTenancySupport) (\s :: AccountModification
s@AccountModification' {} Maybe DedicatedTenancySupportResultEnum
a -> AccountModification
s {$sel:dedicatedTenancySupport:AccountModification' :: Maybe DedicatedTenancySupportResultEnum
dedicatedTenancySupport = Maybe DedicatedTenancySupportResultEnum
a} :: AccountModification)
accountModification_modificationState :: Lens.Lens' AccountModification (Prelude.Maybe DedicatedTenancyModificationStateEnum)
accountModification_modificationState :: (Maybe DedicatedTenancyModificationStateEnum
-> f (Maybe DedicatedTenancyModificationStateEnum))
-> AccountModification -> f AccountModification
accountModification_modificationState = (AccountModification
-> Maybe DedicatedTenancyModificationStateEnum)
-> (AccountModification
-> Maybe DedicatedTenancyModificationStateEnum
-> AccountModification)
-> Lens
AccountModification
AccountModification
(Maybe DedicatedTenancyModificationStateEnum)
(Maybe DedicatedTenancyModificationStateEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountModification' {Maybe DedicatedTenancyModificationStateEnum
modificationState :: Maybe DedicatedTenancyModificationStateEnum
$sel:modificationState:AccountModification' :: AccountModification -> Maybe DedicatedTenancyModificationStateEnum
modificationState} -> Maybe DedicatedTenancyModificationStateEnum
modificationState) (\s :: AccountModification
s@AccountModification' {} Maybe DedicatedTenancyModificationStateEnum
a -> AccountModification
s {$sel:modificationState:AccountModification' :: Maybe DedicatedTenancyModificationStateEnum
modificationState = Maybe DedicatedTenancyModificationStateEnum
a} :: AccountModification)
accountModification_dedicatedTenancyManagementCidrRange :: Lens.Lens' AccountModification (Prelude.Maybe Prelude.Text)
accountModification_dedicatedTenancyManagementCidrRange :: (Maybe Text -> f (Maybe Text))
-> AccountModification -> f AccountModification
accountModification_dedicatedTenancyManagementCidrRange = (AccountModification -> Maybe Text)
-> (AccountModification -> Maybe Text -> AccountModification)
-> Lens
AccountModification AccountModification (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountModification' {Maybe Text
dedicatedTenancyManagementCidrRange :: Maybe Text
$sel:dedicatedTenancyManagementCidrRange:AccountModification' :: AccountModification -> Maybe Text
dedicatedTenancyManagementCidrRange} -> Maybe Text
dedicatedTenancyManagementCidrRange) (\s :: AccountModification
s@AccountModification' {} Maybe Text
a -> AccountModification
s {$sel:dedicatedTenancyManagementCidrRange:AccountModification' :: Maybe Text
dedicatedTenancyManagementCidrRange = Maybe Text
a} :: AccountModification)
accountModification_errorCode :: Lens.Lens' AccountModification (Prelude.Maybe Prelude.Text)
accountModification_errorCode :: (Maybe Text -> f (Maybe Text))
-> AccountModification -> f AccountModification
accountModification_errorCode = (AccountModification -> Maybe Text)
-> (AccountModification -> Maybe Text -> AccountModification)
-> Lens
AccountModification AccountModification (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountModification' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:AccountModification' :: AccountModification -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: AccountModification
s@AccountModification' {} Maybe Text
a -> AccountModification
s {$sel:errorCode:AccountModification' :: Maybe Text
errorCode = Maybe Text
a} :: AccountModification)
accountModification_errorMessage :: Lens.Lens' AccountModification (Prelude.Maybe Prelude.Text)
accountModification_errorMessage :: (Maybe Text -> f (Maybe Text))
-> AccountModification -> f AccountModification
accountModification_errorMessage = (AccountModification -> Maybe Text)
-> (AccountModification -> Maybe Text -> AccountModification)
-> Lens
AccountModification AccountModification (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountModification' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:AccountModification' :: AccountModification -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: AccountModification
s@AccountModification' {} Maybe Text
a -> AccountModification
s {$sel:errorMessage:AccountModification' :: Maybe Text
errorMessage = Maybe Text
a} :: AccountModification)
instance Core.FromJSON AccountModification where
parseJSON :: Value -> Parser AccountModification
parseJSON =
String
-> (Object -> Parser AccountModification)
-> Value
-> Parser AccountModification
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AccountModification"
( \Object
x ->
Maybe POSIX
-> Maybe DedicatedTenancySupportResultEnum
-> Maybe DedicatedTenancyModificationStateEnum
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AccountModification
AccountModification'
(Maybe POSIX
-> Maybe DedicatedTenancySupportResultEnum
-> Maybe DedicatedTenancyModificationStateEnum
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AccountModification)
-> Parser (Maybe POSIX)
-> Parser
(Maybe DedicatedTenancySupportResultEnum
-> Maybe DedicatedTenancyModificationStateEnum
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AccountModification)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartTime")
Parser
(Maybe DedicatedTenancySupportResultEnum
-> Maybe DedicatedTenancyModificationStateEnum
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> AccountModification)
-> Parser (Maybe DedicatedTenancySupportResultEnum)
-> Parser
(Maybe DedicatedTenancyModificationStateEnum
-> Maybe Text -> Maybe Text -> Maybe Text -> AccountModification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DedicatedTenancySupportResultEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DedicatedTenancySupport")
Parser
(Maybe DedicatedTenancyModificationStateEnum
-> Maybe Text -> Maybe Text -> Maybe Text -> AccountModification)
-> Parser (Maybe DedicatedTenancyModificationStateEnum)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> AccountModification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe DedicatedTenancyModificationStateEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ModificationState")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> AccountModification)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> AccountModification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DedicatedTenancyManagementCidrRange")
Parser (Maybe Text -> Maybe Text -> AccountModification)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> AccountModification)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorCode")
Parser (Maybe Text -> AccountModification)
-> Parser (Maybe Text) -> Parser AccountModification
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorMessage")
)
instance Prelude.Hashable AccountModification
instance Prelude.NFData AccountModification