{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Grafana.Types.WorkspaceSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Grafana.Types.WorkspaceSummary where

import qualified Amazonka.Core as Core
import Amazonka.Grafana.Types.AuthenticationSummary
import Amazonka.Grafana.Types.NotificationDestinationType
import Amazonka.Grafana.Types.WorkspaceStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A structure that contains some information about one workspace in the
-- account.
--
-- /See:/ 'newWorkspaceSummary' smart constructor.
data WorkspaceSummary = WorkspaceSummary'
  { -- | The name of the workspace.
    WorkspaceSummary -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The Amazon Web Services notification channels that Amazon Managed
    -- Grafana can automatically create IAM roles and permissions for, which
    -- allows Amazon Managed Grafana to use these channels.
    WorkspaceSummary -> Maybe [NotificationDestinationType]
notificationDestinations :: Prelude.Maybe [NotificationDestinationType],
    -- | The customer-entered description of the workspace.
    WorkspaceSummary -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | A structure containing information about the authentication methods used
    -- in the workspace.
    WorkspaceSummary -> AuthenticationSummary
authentication :: AuthenticationSummary,
    -- | The date that the workspace was created.
    WorkspaceSummary -> POSIX
created :: Core.POSIX,
    -- | The URL endpoint to use to access the Grafana console in the workspace.
    WorkspaceSummary -> Text
endpoint :: Prelude.Text,
    -- | The Grafana version that the workspace is running.
    WorkspaceSummary -> Text
grafanaVersion :: Prelude.Text,
    -- | The unique ID of the workspace.
    WorkspaceSummary -> Text
id :: Prelude.Text,
    -- | The most recent date that the workspace was modified.
    WorkspaceSummary -> POSIX
modified :: Core.POSIX,
    -- | The current status of the workspace.
    WorkspaceSummary -> WorkspaceStatus
status :: WorkspaceStatus
  }
  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, 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)

-- |
-- Create a value of 'WorkspaceSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'name', 'workspaceSummary_name' - The name of the workspace.
--
-- 'notificationDestinations', 'workspaceSummary_notificationDestinations' - The Amazon Web Services notification channels that Amazon Managed
-- Grafana can automatically create IAM roles and permissions for, which
-- allows Amazon Managed Grafana to use these channels.
--
-- 'description', 'workspaceSummary_description' - The customer-entered description of the workspace.
--
-- 'authentication', 'workspaceSummary_authentication' - A structure containing information about the authentication methods used
-- in the workspace.
--
-- 'created', 'workspaceSummary_created' - The date that the workspace was created.
--
-- 'endpoint', 'workspaceSummary_endpoint' - The URL endpoint to use to access the Grafana console in the workspace.
--
-- 'grafanaVersion', 'workspaceSummary_grafanaVersion' - The Grafana version that the workspace is running.
--
-- 'id', 'workspaceSummary_id' - The unique ID of the workspace.
--
-- 'modified', 'workspaceSummary_modified' - The most recent date that the workspace was modified.
--
-- 'status', 'workspaceSummary_status' - The current status of the workspace.
newWorkspaceSummary ::
  -- | 'authentication'
  AuthenticationSummary ->
  -- | 'created'
  Prelude.UTCTime ->
  -- | 'endpoint'
  Prelude.Text ->
  -- | 'grafanaVersion'
  Prelude.Text ->
  -- | 'id'
  Prelude.Text ->
  -- | 'modified'
  Prelude.UTCTime ->
  -- | 'status'
  WorkspaceStatus ->
  WorkspaceSummary
newWorkspaceSummary :: AuthenticationSummary
-> UTCTime
-> Text
-> Text
-> Text
-> UTCTime
-> WorkspaceStatus
-> WorkspaceSummary
newWorkspaceSummary
  AuthenticationSummary
pAuthentication_
  UTCTime
pCreated_
  Text
pEndpoint_
  Text
pGrafanaVersion_
  Text
pId_
  UTCTime
pModified_
  WorkspaceStatus
pStatus_ =
    WorkspaceSummary' :: Maybe (Sensitive Text)
-> Maybe [NotificationDestinationType]
-> Maybe (Sensitive Text)
-> AuthenticationSummary
-> POSIX
-> Text
-> Text
-> Text
-> POSIX
-> WorkspaceStatus
-> WorkspaceSummary
WorkspaceSummary'
      { $sel:name:WorkspaceSummary' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:notificationDestinations:WorkspaceSummary' :: Maybe [NotificationDestinationType]
notificationDestinations = Maybe [NotificationDestinationType]
forall a. Maybe a
Prelude.Nothing,
        $sel:description:WorkspaceSummary' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:authentication:WorkspaceSummary' :: AuthenticationSummary
authentication = AuthenticationSummary
pAuthentication_,
        $sel:created:WorkspaceSummary' :: POSIX
created = 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
pCreated_,
        $sel:endpoint:WorkspaceSummary' :: Text
endpoint = Text
pEndpoint_,
        $sel:grafanaVersion:WorkspaceSummary' :: Text
grafanaVersion = Text
pGrafanaVersion_,
        $sel:id:WorkspaceSummary' :: Text
id = Text
pId_,
        $sel:modified:WorkspaceSummary' :: POSIX
modified = 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
pModified_,
        $sel:status:WorkspaceSummary' :: WorkspaceStatus
status = WorkspaceStatus
pStatus_
      }

-- | The name of the workspace.
workspaceSummary_name :: Lens.Lens' WorkspaceSummary (Prelude.Maybe Prelude.Text)
workspaceSummary_name :: (Maybe Text -> f (Maybe Text))
-> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_name = (WorkspaceSummary -> Maybe (Sensitive Text))
-> (WorkspaceSummary -> Maybe (Sensitive Text) -> WorkspaceSummary)
-> Lens
     WorkspaceSummary
     WorkspaceSummary
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:WorkspaceSummary' :: WorkspaceSummary -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Maybe (Sensitive Text)
a -> WorkspaceSummary
s {$sel:name:WorkspaceSummary' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: WorkspaceSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> WorkspaceSummary -> f WorkspaceSummary)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> WorkspaceSummary
-> f WorkspaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The Amazon Web Services notification channels that Amazon Managed
-- Grafana can automatically create IAM roles and permissions for, which
-- allows Amazon Managed Grafana to use these channels.
workspaceSummary_notificationDestinations :: Lens.Lens' WorkspaceSummary (Prelude.Maybe [NotificationDestinationType])
workspaceSummary_notificationDestinations :: (Maybe [NotificationDestinationType]
 -> f (Maybe [NotificationDestinationType]))
-> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_notificationDestinations = (WorkspaceSummary -> Maybe [NotificationDestinationType])
-> (WorkspaceSummary
    -> Maybe [NotificationDestinationType] -> WorkspaceSummary)
-> Lens
     WorkspaceSummary
     WorkspaceSummary
     (Maybe [NotificationDestinationType])
     (Maybe [NotificationDestinationType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {Maybe [NotificationDestinationType]
notificationDestinations :: Maybe [NotificationDestinationType]
$sel:notificationDestinations:WorkspaceSummary' :: WorkspaceSummary -> Maybe [NotificationDestinationType]
notificationDestinations} -> Maybe [NotificationDestinationType]
notificationDestinations) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Maybe [NotificationDestinationType]
a -> WorkspaceSummary
s {$sel:notificationDestinations:WorkspaceSummary' :: Maybe [NotificationDestinationType]
notificationDestinations = Maybe [NotificationDestinationType]
a} :: WorkspaceSummary) ((Maybe [NotificationDestinationType]
  -> f (Maybe [NotificationDestinationType]))
 -> WorkspaceSummary -> f WorkspaceSummary)
-> ((Maybe [NotificationDestinationType]
     -> f (Maybe [NotificationDestinationType]))
    -> Maybe [NotificationDestinationType]
    -> f (Maybe [NotificationDestinationType]))
-> (Maybe [NotificationDestinationType]
    -> f (Maybe [NotificationDestinationType]))
-> WorkspaceSummary
-> f WorkspaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [NotificationDestinationType]
  [NotificationDestinationType]
  [NotificationDestinationType]
  [NotificationDestinationType]
-> Iso
     (Maybe [NotificationDestinationType])
     (Maybe [NotificationDestinationType])
     (Maybe [NotificationDestinationType])
     (Maybe [NotificationDestinationType])
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
  [NotificationDestinationType]
  [NotificationDestinationType]
  [NotificationDestinationType]
  [NotificationDestinationType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The customer-entered description of the workspace.
workspaceSummary_description :: Lens.Lens' WorkspaceSummary (Prelude.Maybe Prelude.Text)
workspaceSummary_description :: (Maybe Text -> f (Maybe Text))
-> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_description = (WorkspaceSummary -> Maybe (Sensitive Text))
-> (WorkspaceSummary -> Maybe (Sensitive Text) -> WorkspaceSummary)
-> Lens
     WorkspaceSummary
     WorkspaceSummary
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:WorkspaceSummary' :: WorkspaceSummary -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Maybe (Sensitive Text)
a -> WorkspaceSummary
s {$sel:description:WorkspaceSummary' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: WorkspaceSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> WorkspaceSummary -> f WorkspaceSummary)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> WorkspaceSummary
-> f WorkspaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | A structure containing information about the authentication methods used
-- in the workspace.
workspaceSummary_authentication :: Lens.Lens' WorkspaceSummary AuthenticationSummary
workspaceSummary_authentication :: (AuthenticationSummary -> f AuthenticationSummary)
-> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_authentication = (WorkspaceSummary -> AuthenticationSummary)
-> (WorkspaceSummary -> AuthenticationSummary -> WorkspaceSummary)
-> Lens
     WorkspaceSummary
     WorkspaceSummary
     AuthenticationSummary
     AuthenticationSummary
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceSummary' {AuthenticationSummary
authentication :: AuthenticationSummary
$sel:authentication:WorkspaceSummary' :: WorkspaceSummary -> AuthenticationSummary
authentication} -> AuthenticationSummary
authentication) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} AuthenticationSummary
a -> WorkspaceSummary
s {$sel:authentication:WorkspaceSummary' :: AuthenticationSummary
authentication = AuthenticationSummary
a} :: WorkspaceSummary)

-- | The date that the workspace was created.
workspaceSummary_created :: Lens.Lens' WorkspaceSummary Prelude.UTCTime
workspaceSummary_created :: (UTCTime -> f UTCTime) -> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_created = (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
created :: POSIX
$sel:created:WorkspaceSummary' :: WorkspaceSummary -> POSIX
created} -> POSIX
created) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} POSIX
a -> WorkspaceSummary
s {$sel:created:WorkspaceSummary' :: POSIX
created = 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

-- | The URL endpoint to use to access the Grafana console in the workspace.
workspaceSummary_endpoint :: Lens.Lens' WorkspaceSummary Prelude.Text
workspaceSummary_endpoint :: (Text -> f Text) -> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_endpoint = (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
endpoint :: Text
$sel:endpoint:WorkspaceSummary' :: WorkspaceSummary -> Text
endpoint} -> Text
endpoint) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Text
a -> WorkspaceSummary
s {$sel:endpoint:WorkspaceSummary' :: Text
endpoint = Text
a} :: WorkspaceSummary)

-- | The Grafana version that the workspace is running.
workspaceSummary_grafanaVersion :: Lens.Lens' WorkspaceSummary Prelude.Text
workspaceSummary_grafanaVersion :: (Text -> f Text) -> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_grafanaVersion = (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
grafanaVersion :: Text
$sel:grafanaVersion:WorkspaceSummary' :: WorkspaceSummary -> Text
grafanaVersion} -> Text
grafanaVersion) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Text
a -> WorkspaceSummary
s {$sel:grafanaVersion:WorkspaceSummary' :: Text
grafanaVersion = Text
a} :: WorkspaceSummary)

-- | The unique ID of the workspace.
workspaceSummary_id :: Lens.Lens' WorkspaceSummary Prelude.Text
workspaceSummary_id :: (Text -> f Text) -> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_id = (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
id :: Text
$sel:id:WorkspaceSummary' :: WorkspaceSummary -> Text
id} -> Text
id) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} Text
a -> WorkspaceSummary
s {$sel:id:WorkspaceSummary' :: Text
id = Text
a} :: WorkspaceSummary)

-- | The most recent date that the workspace was modified.
workspaceSummary_modified :: Lens.Lens' WorkspaceSummary Prelude.UTCTime
workspaceSummary_modified :: (UTCTime -> f UTCTime) -> WorkspaceSummary -> f WorkspaceSummary
workspaceSummary_modified = (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
modified :: POSIX
$sel:modified:WorkspaceSummary' :: WorkspaceSummary -> POSIX
modified} -> POSIX
modified) (\s :: WorkspaceSummary
s@WorkspaceSummary' {} POSIX
a -> WorkspaceSummary
s {$sel:modified:WorkspaceSummary' :: POSIX
modified = 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

-- | The current status of the workspace.
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)

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 (Sensitive Text)
-> Maybe [NotificationDestinationType]
-> Maybe (Sensitive Text)
-> AuthenticationSummary
-> POSIX
-> Text
-> Text
-> Text
-> POSIX
-> WorkspaceStatus
-> WorkspaceSummary
WorkspaceSummary'
            (Maybe (Sensitive Text)
 -> Maybe [NotificationDestinationType]
 -> Maybe (Sensitive Text)
 -> AuthenticationSummary
 -> POSIX
 -> Text
 -> Text
 -> Text
 -> POSIX
 -> WorkspaceStatus
 -> WorkspaceSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe [NotificationDestinationType]
      -> Maybe (Sensitive Text)
      -> AuthenticationSummary
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe [NotificationDestinationType]
   -> Maybe (Sensitive Text)
   -> AuthenticationSummary
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceSummary)
-> Parser (Maybe [NotificationDestinationType])
-> Parser
     (Maybe (Sensitive Text)
      -> AuthenticationSummary
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [NotificationDestinationType]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"notificationDestinations"
                            Parser (Maybe (Maybe [NotificationDestinationType]))
-> Maybe [NotificationDestinationType]
-> Parser (Maybe [NotificationDestinationType])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [NotificationDestinationType]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe (Sensitive Text)
   -> AuthenticationSummary
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (AuthenticationSummary
      -> POSIX
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
            Parser
  (AuthenticationSummary
   -> POSIX
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceSummary)
-> Parser AuthenticationSummary
-> Parser
     (POSIX
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AuthenticationSummary
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"authentication")
            Parser
  (POSIX
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceSummary)
-> Parser POSIX
-> Parser
     (Text
      -> Text -> Text -> POSIX -> WorkspaceStatus -> 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
"created")
            Parser
  (Text
   -> Text -> Text -> POSIX -> WorkspaceStatus -> WorkspaceSummary)
-> Parser Text
-> Parser
     (Text -> Text -> POSIX -> WorkspaceStatus -> 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
"endpoint")
            Parser
  (Text -> Text -> POSIX -> WorkspaceStatus -> WorkspaceSummary)
-> Parser Text
-> Parser (Text -> POSIX -> WorkspaceStatus -> 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
"grafanaVersion")
            Parser (Text -> POSIX -> WorkspaceStatus -> WorkspaceSummary)
-> Parser Text
-> Parser (POSIX -> WorkspaceStatus -> 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
"id")
            Parser (POSIX -> WorkspaceStatus -> WorkspaceSummary)
-> Parser POSIX -> Parser (WorkspaceStatus -> 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
"modified")
            Parser (WorkspaceStatus -> WorkspaceSummary)
-> Parser WorkspaceStatus -> Parser 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")
      )

instance Prelude.Hashable WorkspaceSummary

instance Prelude.NFData WorkspaceSummary