{-# 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.AMP.Types.WorkspaceSummary where
import Amazonka.AMP.Types.WorkspaceStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorkspaceSummary = WorkspaceSummary'
{
WorkspaceSummary -> Maybe Text
alias :: Prelude.Maybe Prelude.Text,
WorkspaceSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
WorkspaceSummary -> Text
arn :: Prelude.Text,
WorkspaceSummary -> POSIX
createdAt :: Core.POSIX,
WorkspaceSummary -> WorkspaceStatus
status :: WorkspaceStatus,
WorkspaceSummary -> Text
workspaceId :: Prelude.Text
}
deriving (WorkspaceSummary -> WorkspaceSummary -> Bool
(WorkspaceSummary -> WorkspaceSummary -> Bool)
-> (WorkspaceSummary -> WorkspaceSummary -> Bool)
-> Eq WorkspaceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkspaceSummary -> WorkspaceSummary -> Bool
$c/= :: WorkspaceSummary -> WorkspaceSummary -> Bool
== :: WorkspaceSummary -> WorkspaceSummary -> Bool
$c== :: WorkspaceSummary -> WorkspaceSummary -> Bool
Prelude.Eq, ReadPrec [WorkspaceSummary]
ReadPrec WorkspaceSummary
Int -> ReadS WorkspaceSummary
ReadS [WorkspaceSummary]
(Int -> ReadS WorkspaceSummary)
-> ReadS [WorkspaceSummary]
-> ReadPrec WorkspaceSummary
-> ReadPrec [WorkspaceSummary]
-> Read WorkspaceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkspaceSummary]
$creadListPrec :: ReadPrec [WorkspaceSummary]
readPrec :: ReadPrec WorkspaceSummary
$creadPrec :: ReadPrec WorkspaceSummary
readList :: ReadS [WorkspaceSummary]
$creadList :: ReadS [WorkspaceSummary]
readsPrec :: Int -> ReadS WorkspaceSummary
$creadsPrec :: Int -> ReadS WorkspaceSummary
Prelude.Read, Int -> WorkspaceSummary -> ShowS
[WorkspaceSummary] -> ShowS
WorkspaceSummary -> String
(Int -> WorkspaceSummary -> ShowS)
-> (WorkspaceSummary -> String)
-> ([WorkspaceSummary] -> ShowS)
-> Show WorkspaceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkspaceSummary] -> ShowS
$cshowList :: [WorkspaceSummary] -> ShowS
show :: WorkspaceSummary -> String
$cshow :: WorkspaceSummary -> String
showsPrec :: Int -> WorkspaceSummary -> ShowS
$cshowsPrec :: Int -> WorkspaceSummary -> ShowS
Prelude.Show, (forall x. WorkspaceSummary -> Rep WorkspaceSummary x)
-> (forall x. Rep WorkspaceSummary x -> WorkspaceSummary)
-> Generic WorkspaceSummary
forall x. Rep WorkspaceSummary x -> WorkspaceSummary
forall x. WorkspaceSummary -> Rep WorkspaceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkspaceSummary x -> WorkspaceSummary
$cfrom :: forall x. WorkspaceSummary -> Rep WorkspaceSummary x
Prelude.Generic)
newWorkspaceSummary ::
Prelude.Text ->
Prelude.UTCTime ->
WorkspaceStatus ->
Prelude.Text ->
WorkspaceSummary
newWorkspaceSummary :: Text -> UTCTime -> WorkspaceStatus -> Text -> WorkspaceSummary
newWorkspaceSummary
Text
pArn_
UTCTime
pCreatedAt_
WorkspaceStatus
pStatus_
Text
pWorkspaceId_ =
WorkspaceSummary' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> POSIX
-> WorkspaceStatus
-> Text
-> WorkspaceSummary
WorkspaceSummary'
{ $sel:alias:WorkspaceSummary' :: Maybe Text
alias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:WorkspaceSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:arn:WorkspaceSummary' :: Text
arn = Text
pArn_,
$sel:createdAt:WorkspaceSummary' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:status:WorkspaceSummary' :: WorkspaceStatus
status = WorkspaceStatus
pStatus_,
$sel:workspaceId:WorkspaceSummary' :: Text
workspaceId = Text
pWorkspaceId_
}
workspaceSummary_alias :: Lens.Lens' WorkspaceSummary (Prelude.Maybe Prelude.Text)
workspaceSummary_alias :: (Maybe Text -> f (Maybe Text))
-> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_alias = (WorkspaceSummary -> Maybe Text)
-> (WorkspaceSummary -> Maybe Text -> WorkspaceSummary)
-> Lens WorkspaceSummary WorkspaceSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {Maybe Text
alias :: Maybe Text
$sel:alias:WorkspaceSummary' :: WorkspaceSummary -> Maybe Text
alias} -> Maybe Text
alias) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Maybe Text
a -> WorkspaceSummary
s {$sel:alias:WorkspaceSummary' :: Maybe Text
alias = Maybe Text
a} :: WorkspaceSummary)
workspaceSummary_tags :: Lens.Lens' WorkspaceSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
workspaceSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_tags = (WorkspaceSummary -> Maybe (HashMap Text Text))
-> (WorkspaceSummary
-> Maybe (HashMap Text Text) -> WorkspaceSummary)
-> Lens
WorkspaceSummary
WorkspaceSummary
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:WorkspaceSummary' :: WorkspaceSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Maybe (HashMap Text Text)
a -> WorkspaceSummary
s {$sel:tags:WorkspaceSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: WorkspaceSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> WorkspaceSummary -> f WorkspaceSummary)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> WorkspaceSummary
-> f WorkspaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
workspaceSummary_arn :: Lens.Lens' WorkspaceSummary Prelude.Text
workspaceSummary_arn :: (Text -> f Text) -> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_arn = (WorkspaceSummary -> Text)
-> (WorkspaceSummary -> Text -> WorkspaceSummary)
-> Lens WorkspaceSummary WorkspaceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {Text
arn :: Text
$sel:arn:WorkspaceSummary' :: WorkspaceSummary -> Text
arn} -> Text
arn) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Text
a -> WorkspaceSummary
s {$sel:arn:WorkspaceSummary' :: Text
arn = Text
a} :: WorkspaceSummary)
workspaceSummary_createdAt :: Lens.Lens' WorkspaceSummary Prelude.UTCTime
workspaceSummary_createdAt :: (UTCTime -> f UTCTime) -> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_createdAt = (WorkspaceSummary -> POSIX)
-> (WorkspaceSummary -> POSIX -> WorkspaceSummary)
-> Lens WorkspaceSummary WorkspaceSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:WorkspaceSummary' :: WorkspaceSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} POSIX
a -> WorkspaceSummary
s {$sel:createdAt:WorkspaceSummary' :: POSIX
createdAt = POSIX
a} :: WorkspaceSummary) ((POSIX -> f POSIX) -> WorkspaceSummary -> f WorkspaceSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> WorkspaceSummary
-> f WorkspaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
workspaceSummary_status :: Lens.Lens' WorkspaceSummary WorkspaceStatus
workspaceSummary_status :: (WorkspaceStatus -> f WorkspaceStatus)
-> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_status = (WorkspaceSummary -> WorkspaceStatus)
-> (WorkspaceSummary -> WorkspaceStatus -> WorkspaceSummary)
-> Lens
WorkspaceSummary WorkspaceSummary WorkspaceStatus WorkspaceStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {WorkspaceStatus
status :: WorkspaceStatus
$sel:status:WorkspaceSummary' :: WorkspaceSummary -> WorkspaceStatus
status} -> WorkspaceStatus
status) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} WorkspaceStatus
a -> WorkspaceSummary
s {$sel:status:WorkspaceSummary' :: WorkspaceStatus
status = WorkspaceStatus
a} :: WorkspaceSummary)
workspaceSummary_workspaceId :: Lens.Lens' WorkspaceSummary Prelude.Text
workspaceSummary_workspaceId :: (Text -> f Text) -> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_workspaceId = (WorkspaceSummary -> Text)
-> (WorkspaceSummary -> Text -> WorkspaceSummary)
-> Lens WorkspaceSummary WorkspaceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {Text
workspaceId :: Text
$sel:workspaceId:WorkspaceSummary' :: WorkspaceSummary -> Text
workspaceId} -> Text
workspaceId) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Text
a -> WorkspaceSummary
s {$sel:workspaceId:WorkspaceSummary' :: Text
workspaceId = Text
a} :: WorkspaceSummary)
instance Core.FromJSON WorkspaceSummary where
parseJSON :: Value -> Parser WorkspaceSummary
parseJSON =
String
-> (Object -> Parser WorkspaceSummary)
-> Value
-> Parser WorkspaceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkspaceSummary"
( \Object
x ->
Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> POSIX
-> WorkspaceStatus
-> Text
-> WorkspaceSummary
WorkspaceSummary'
(Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> POSIX
-> WorkspaceStatus
-> Text
-> WorkspaceSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Text -> POSIX -> WorkspaceStatus -> Text -> WorkspaceSummary)
forall (f :: * -> *) a b. Functor 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
"alias")
Parser
(Maybe (HashMap Text Text)
-> Text -> POSIX -> WorkspaceStatus -> Text -> WorkspaceSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text -> POSIX -> WorkspaceStatus -> Text -> WorkspaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Text -> POSIX -> WorkspaceStatus -> Text -> WorkspaceSummary)
-> Parser Text
-> Parser (POSIX -> WorkspaceStatus -> Text -> WorkspaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"arn")
Parser (POSIX -> WorkspaceStatus -> Text -> WorkspaceSummary)
-> Parser POSIX
-> Parser (WorkspaceStatus -> Text -> WorkspaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createdAt")
Parser (WorkspaceStatus -> Text -> WorkspaceSummary)
-> Parser WorkspaceStatus -> Parser (Text -> WorkspaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser WorkspaceStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
Parser (Text -> WorkspaceSummary)
-> Parser Text -> Parser WorkspaceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"workspaceId")
)
instance Prelude.Hashable WorkspaceSummary
instance Prelude.NFData WorkspaceSummary