{-# 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.WorkspaceDescription
-- 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.WorkspaceDescription where

import qualified Amazonka.Core as Core
import Amazonka.Grafana.Types.AccountAccessType
import Amazonka.Grafana.Types.AuthenticationSummary
import Amazonka.Grafana.Types.DataSourceType
import Amazonka.Grafana.Types.LicenseType
import Amazonka.Grafana.Types.NotificationDestinationType
import Amazonka.Grafana.Types.PermissionType
import Amazonka.Grafana.Types.WorkspaceStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A structure containing information about an Amazon Managed Grafana
-- workspace in your account.
--
-- /See:/ 'newWorkspaceDescription' smart constructor.
data WorkspaceDescription = WorkspaceDescription'
  { -- | The IAM role that grants permissions to the Amazon Web Services
    -- resources that the workspace will view data from. This role must already
    -- exist.
    WorkspaceDescription -> Maybe (Sensitive Text)
workspaceRoleArn :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | If this workspace is currently in the free trial period for Grafana
    -- Enterprise, this value specifies when that free trial ends.
    WorkspaceDescription -> Maybe POSIX
freeTrialExpiration :: Prelude.Maybe Core.POSIX,
    -- | Specifies whether this workspace has a full Grafana Enterprise license
    -- or a free trial license.
    WorkspaceDescription -> Maybe LicenseType
licenseType :: Prelude.Maybe LicenseType,
    -- | If this is @Service Managed@, Amazon Managed Grafana automatically
    -- creates the IAM roles and provisions the permissions that the workspace
    -- needs to use Amazon Web Services data sources and notification channels.
    --
    -- If this is @CUSTOMER_MANAGED@, you manage those roles and permissions
    -- yourself. If you are creating this workspace in a member account of an
    -- organization and that account is not a delegated administrator account,
    -- and you want the workspace to access data sources in other Amazon Web
    -- Services accounts in the organization, you must choose
    -- @CUSTOMER_MANAGED@.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/grafana/latest/userguide/AMG-manage-permissions.html Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels>
    WorkspaceDescription -> Maybe PermissionType
permissionType :: Prelude.Maybe PermissionType,
    -- | The name of the workspace.
    WorkspaceDescription -> 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, to allow
    -- Amazon Managed Grafana to use these channels.
    WorkspaceDescription -> Maybe [NotificationDestinationType]
notificationDestinations :: Prelude.Maybe [NotificationDestinationType],
    -- | Specifies whether the workspace can access Amazon Web Services resources
    -- in this Amazon Web Services account only, or whether it can also access
    -- Amazon Web Services resources in other accounts in the same
    -- organization. If this is @ORGANIZATION@, the
    -- @workspaceOrganizationalUnits@ parameter specifies which organizational
    -- units the workspace can access.
    WorkspaceDescription -> Maybe AccountAccessType
accountAccessType :: Prelude.Maybe AccountAccessType,
    -- | If this workspace has a full Grafana Enterprise license, this specifies
    -- when the license ends and will need to be renewed.
    WorkspaceDescription -> Maybe POSIX
licenseExpiration :: Prelude.Maybe Core.POSIX,
    -- | The name of the IAM role that is used to access resources through
    -- Organizations.
    WorkspaceDescription -> Maybe (Sensitive Text)
organizationRoleName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The name of the CloudFormation stack set that is used to generate IAM
    -- roles to be used for this workspace.
    WorkspaceDescription -> Maybe Text
stackSetName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the organizational units that this workspace is allowed to use
    -- data sources from, if this workspace is in an account that is part of an
    -- organization.
    WorkspaceDescription -> Maybe (Sensitive [Text])
organizationalUnits :: Prelude.Maybe (Core.Sensitive [Prelude.Text]),
    -- | The user-defined description of the workspace.
    WorkspaceDescription -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | Specifies whether this workspace has already fully used its free trial
    -- for Grafana Enterprise.
    WorkspaceDescription -> Maybe Bool
freeTrialConsumed :: Prelude.Maybe Prelude.Bool,
    -- | A structure that describes whether the workspace uses SAML, Amazon Web
    -- Services SSO, or both methods for user authentication.
    WorkspaceDescription -> AuthenticationSummary
authentication :: AuthenticationSummary,
    -- | The date that the workspace was created.
    WorkspaceDescription -> POSIX
created :: Core.POSIX,
    -- | Specifies the Amazon Web Services data sources that have been configured
    -- to have IAM roles and permissions created to allow Amazon Managed
    -- Grafana to read data from these sources.
    WorkspaceDescription -> [DataSourceType]
dataSources :: [DataSourceType],
    -- | The URL that users can use to access the Grafana console in the
    -- workspace.
    WorkspaceDescription -> Text
endpoint :: Prelude.Text,
    -- | The version of Grafana supported in this workspace.
    WorkspaceDescription -> Text
grafanaVersion :: Prelude.Text,
    -- | The unique ID of this workspace.
    WorkspaceDescription -> Text
id :: Prelude.Text,
    -- | The most recent date that the workspace was modified.
    WorkspaceDescription -> POSIX
modified :: Core.POSIX,
    -- | The current status of the workspace.
    WorkspaceDescription -> WorkspaceStatus
status :: WorkspaceStatus
  }
  deriving (WorkspaceDescription -> WorkspaceDescription -> Bool
(WorkspaceDescription -> WorkspaceDescription -> Bool)
-> (WorkspaceDescription -> WorkspaceDescription -> Bool)
-> Eq WorkspaceDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkspaceDescription -> WorkspaceDescription -> Bool
$c/= :: WorkspaceDescription -> WorkspaceDescription -> Bool
== :: WorkspaceDescription -> WorkspaceDescription -> Bool
$c== :: WorkspaceDescription -> WorkspaceDescription -> Bool
Prelude.Eq, Int -> WorkspaceDescription -> ShowS
[WorkspaceDescription] -> ShowS
WorkspaceDescription -> String
(Int -> WorkspaceDescription -> ShowS)
-> (WorkspaceDescription -> String)
-> ([WorkspaceDescription] -> ShowS)
-> Show WorkspaceDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkspaceDescription] -> ShowS
$cshowList :: [WorkspaceDescription] -> ShowS
show :: WorkspaceDescription -> String
$cshow :: WorkspaceDescription -> String
showsPrec :: Int -> WorkspaceDescription -> ShowS
$cshowsPrec :: Int -> WorkspaceDescription -> ShowS
Prelude.Show, (forall x. WorkspaceDescription -> Rep WorkspaceDescription x)
-> (forall x. Rep WorkspaceDescription x -> WorkspaceDescription)
-> Generic WorkspaceDescription
forall x. Rep WorkspaceDescription x -> WorkspaceDescription
forall x. WorkspaceDescription -> Rep WorkspaceDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkspaceDescription x -> WorkspaceDescription
$cfrom :: forall x. WorkspaceDescription -> Rep WorkspaceDescription x
Prelude.Generic)

-- |
-- Create a value of 'WorkspaceDescription' 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:
--
-- 'workspaceRoleArn', 'workspaceDescription_workspaceRoleArn' - The IAM role that grants permissions to the Amazon Web Services
-- resources that the workspace will view data from. This role must already
-- exist.
--
-- 'freeTrialExpiration', 'workspaceDescription_freeTrialExpiration' - If this workspace is currently in the free trial period for Grafana
-- Enterprise, this value specifies when that free trial ends.
--
-- 'licenseType', 'workspaceDescription_licenseType' - Specifies whether this workspace has a full Grafana Enterprise license
-- or a free trial license.
--
-- 'permissionType', 'workspaceDescription_permissionType' - If this is @Service Managed@, Amazon Managed Grafana automatically
-- creates the IAM roles and provisions the permissions that the workspace
-- needs to use Amazon Web Services data sources and notification channels.
--
-- If this is @CUSTOMER_MANAGED@, you manage those roles and permissions
-- yourself. If you are creating this workspace in a member account of an
-- organization and that account is not a delegated administrator account,
-- and you want the workspace to access data sources in other Amazon Web
-- Services accounts in the organization, you must choose
-- @CUSTOMER_MANAGED@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/grafana/latest/userguide/AMG-manage-permissions.html Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels>
--
-- 'name', 'workspaceDescription_name' - The name of the workspace.
--
-- 'notificationDestinations', 'workspaceDescription_notificationDestinations' - The Amazon Web Services notification channels that Amazon Managed
-- Grafana can automatically create IAM roles and permissions for, to allow
-- Amazon Managed Grafana to use these channels.
--
-- 'accountAccessType', 'workspaceDescription_accountAccessType' - Specifies whether the workspace can access Amazon Web Services resources
-- in this Amazon Web Services account only, or whether it can also access
-- Amazon Web Services resources in other accounts in the same
-- organization. If this is @ORGANIZATION@, the
-- @workspaceOrganizationalUnits@ parameter specifies which organizational
-- units the workspace can access.
--
-- 'licenseExpiration', 'workspaceDescription_licenseExpiration' - If this workspace has a full Grafana Enterprise license, this specifies
-- when the license ends and will need to be renewed.
--
-- 'organizationRoleName', 'workspaceDescription_organizationRoleName' - The name of the IAM role that is used to access resources through
-- Organizations.
--
-- 'stackSetName', 'workspaceDescription_stackSetName' - The name of the CloudFormation stack set that is used to generate IAM
-- roles to be used for this workspace.
--
-- 'organizationalUnits', 'workspaceDescription_organizationalUnits' - Specifies the organizational units that this workspace is allowed to use
-- data sources from, if this workspace is in an account that is part of an
-- organization.
--
-- 'description', 'workspaceDescription_description' - The user-defined description of the workspace.
--
-- 'freeTrialConsumed', 'workspaceDescription_freeTrialConsumed' - Specifies whether this workspace has already fully used its free trial
-- for Grafana Enterprise.
--
-- 'authentication', 'workspaceDescription_authentication' - A structure that describes whether the workspace uses SAML, Amazon Web
-- Services SSO, or both methods for user authentication.
--
-- 'created', 'workspaceDescription_created' - The date that the workspace was created.
--
-- 'dataSources', 'workspaceDescription_dataSources' - Specifies the Amazon Web Services data sources that have been configured
-- to have IAM roles and permissions created to allow Amazon Managed
-- Grafana to read data from these sources.
--
-- 'endpoint', 'workspaceDescription_endpoint' - The URL that users can use to access the Grafana console in the
-- workspace.
--
-- 'grafanaVersion', 'workspaceDescription_grafanaVersion' - The version of Grafana supported in this workspace.
--
-- 'id', 'workspaceDescription_id' - The unique ID of this workspace.
--
-- 'modified', 'workspaceDescription_modified' - The most recent date that the workspace was modified.
--
-- 'status', 'workspaceDescription_status' - The current status of the workspace.
newWorkspaceDescription ::
  -- | 'authentication'
  AuthenticationSummary ->
  -- | 'created'
  Prelude.UTCTime ->
  -- | 'endpoint'
  Prelude.Text ->
  -- | 'grafanaVersion'
  Prelude.Text ->
  -- | 'id'
  Prelude.Text ->
  -- | 'modified'
  Prelude.UTCTime ->
  -- | 'status'
  WorkspaceStatus ->
  WorkspaceDescription
newWorkspaceDescription :: AuthenticationSummary
-> UTCTime
-> Text
-> Text
-> Text
-> UTCTime
-> WorkspaceStatus
-> WorkspaceDescription
newWorkspaceDescription
  AuthenticationSummary
pAuthentication_
  UTCTime
pCreated_
  Text
pEndpoint_
  Text
pGrafanaVersion_
  Text
pId_
  UTCTime
pModified_
  WorkspaceStatus
pStatus_ =
    WorkspaceDescription' :: Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe LicenseType
-> Maybe PermissionType
-> Maybe (Sensitive Text)
-> Maybe [NotificationDestinationType]
-> Maybe AccountAccessType
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive [Text])
-> Maybe (Sensitive Text)
-> Maybe Bool
-> AuthenticationSummary
-> POSIX
-> [DataSourceType]
-> Text
-> Text
-> Text
-> POSIX
-> WorkspaceStatus
-> WorkspaceDescription
WorkspaceDescription'
      { $sel:workspaceRoleArn:WorkspaceDescription' :: Maybe (Sensitive Text)
workspaceRoleArn =
          Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:freeTrialExpiration:WorkspaceDescription' :: Maybe POSIX
freeTrialExpiration = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:licenseType:WorkspaceDescription' :: Maybe LicenseType
licenseType = Maybe LicenseType
forall a. Maybe a
Prelude.Nothing,
        $sel:permissionType:WorkspaceDescription' :: Maybe PermissionType
permissionType = Maybe PermissionType
forall a. Maybe a
Prelude.Nothing,
        $sel:name:WorkspaceDescription' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:notificationDestinations:WorkspaceDescription' :: Maybe [NotificationDestinationType]
notificationDestinations = Maybe [NotificationDestinationType]
forall a. Maybe a
Prelude.Nothing,
        $sel:accountAccessType:WorkspaceDescription' :: Maybe AccountAccessType
accountAccessType = Maybe AccountAccessType
forall a. Maybe a
Prelude.Nothing,
        $sel:licenseExpiration:WorkspaceDescription' :: Maybe POSIX
licenseExpiration = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:organizationRoleName:WorkspaceDescription' :: Maybe (Sensitive Text)
organizationRoleName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:stackSetName:WorkspaceDescription' :: Maybe Text
stackSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:organizationalUnits:WorkspaceDescription' :: Maybe (Sensitive [Text])
organizationalUnits = Maybe (Sensitive [Text])
forall a. Maybe a
Prelude.Nothing,
        $sel:description:WorkspaceDescription' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:freeTrialConsumed:WorkspaceDescription' :: Maybe Bool
freeTrialConsumed = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:authentication:WorkspaceDescription' :: AuthenticationSummary
authentication = AuthenticationSummary
pAuthentication_,
        $sel:created:WorkspaceDescription' :: 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:dataSources:WorkspaceDescription' :: [DataSourceType]
dataSources = [DataSourceType]
forall a. Monoid a => a
Prelude.mempty,
        $sel:endpoint:WorkspaceDescription' :: Text
endpoint = Text
pEndpoint_,
        $sel:grafanaVersion:WorkspaceDescription' :: Text
grafanaVersion = Text
pGrafanaVersion_,
        $sel:id:WorkspaceDescription' :: Text
id = Text
pId_,
        $sel:modified:WorkspaceDescription' :: 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:WorkspaceDescription' :: WorkspaceStatus
status = WorkspaceStatus
pStatus_
      }

-- | The IAM role that grants permissions to the Amazon Web Services
-- resources that the workspace will view data from. This role must already
-- exist.
workspaceDescription_workspaceRoleArn :: Lens.Lens' WorkspaceDescription (Prelude.Maybe Prelude.Text)
workspaceDescription_workspaceRoleArn :: (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_workspaceRoleArn = (WorkspaceDescription -> Maybe (Sensitive Text))
-> (WorkspaceDescription
    -> Maybe (Sensitive Text) -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe (Sensitive Text)
workspaceRoleArn :: Maybe (Sensitive Text)
$sel:workspaceRoleArn:WorkspaceDescription' :: WorkspaceDescription -> Maybe (Sensitive Text)
workspaceRoleArn} -> Maybe (Sensitive Text)
workspaceRoleArn) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe (Sensitive Text)
a -> WorkspaceDescription
s {$sel:workspaceRoleArn:WorkspaceDescription' :: Maybe (Sensitive Text)
workspaceRoleArn = Maybe (Sensitive Text)
a} :: WorkspaceDescription) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription
-> f WorkspaceDescription
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

-- | If this workspace is currently in the free trial period for Grafana
-- Enterprise, this value specifies when that free trial ends.
workspaceDescription_freeTrialExpiration :: Lens.Lens' WorkspaceDescription (Prelude.Maybe Prelude.UTCTime)
workspaceDescription_freeTrialExpiration :: (Maybe UTCTime -> f (Maybe UTCTime))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_freeTrialExpiration = (WorkspaceDescription -> Maybe POSIX)
-> (WorkspaceDescription -> Maybe POSIX -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe POSIX
freeTrialExpiration :: Maybe POSIX
$sel:freeTrialExpiration:WorkspaceDescription' :: WorkspaceDescription -> Maybe POSIX
freeTrialExpiration} -> Maybe POSIX
freeTrialExpiration) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe POSIX
a -> WorkspaceDescription
s {$sel:freeTrialExpiration:WorkspaceDescription' :: Maybe POSIX
freeTrialExpiration = Maybe POSIX
a} :: WorkspaceDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> WorkspaceDescription
-> f WorkspaceDescription
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

-- | Specifies whether this workspace has a full Grafana Enterprise license
-- or a free trial license.
workspaceDescription_licenseType :: Lens.Lens' WorkspaceDescription (Prelude.Maybe LicenseType)
workspaceDescription_licenseType :: (Maybe LicenseType -> f (Maybe LicenseType))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_licenseType = (WorkspaceDescription -> Maybe LicenseType)
-> (WorkspaceDescription
    -> Maybe LicenseType -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe LicenseType)
     (Maybe LicenseType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe LicenseType
licenseType :: Maybe LicenseType
$sel:licenseType:WorkspaceDescription' :: WorkspaceDescription -> Maybe LicenseType
licenseType} -> Maybe LicenseType
licenseType) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe LicenseType
a -> WorkspaceDescription
s {$sel:licenseType:WorkspaceDescription' :: Maybe LicenseType
licenseType = Maybe LicenseType
a} :: WorkspaceDescription)

-- | If this is @Service Managed@, Amazon Managed Grafana automatically
-- creates the IAM roles and provisions the permissions that the workspace
-- needs to use Amazon Web Services data sources and notification channels.
--
-- If this is @CUSTOMER_MANAGED@, you manage those roles and permissions
-- yourself. If you are creating this workspace in a member account of an
-- organization and that account is not a delegated administrator account,
-- and you want the workspace to access data sources in other Amazon Web
-- Services accounts in the organization, you must choose
-- @CUSTOMER_MANAGED@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/grafana/latest/userguide/AMG-manage-permissions.html Amazon Managed Grafana permissions and policies for Amazon Web Services data sources and notification channels>
workspaceDescription_permissionType :: Lens.Lens' WorkspaceDescription (Prelude.Maybe PermissionType)
workspaceDescription_permissionType :: (Maybe PermissionType -> f (Maybe PermissionType))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_permissionType = (WorkspaceDescription -> Maybe PermissionType)
-> (WorkspaceDescription
    -> Maybe PermissionType -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe PermissionType)
     (Maybe PermissionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe PermissionType
permissionType :: Maybe PermissionType
$sel:permissionType:WorkspaceDescription' :: WorkspaceDescription -> Maybe PermissionType
permissionType} -> Maybe PermissionType
permissionType) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe PermissionType
a -> WorkspaceDescription
s {$sel:permissionType:WorkspaceDescription' :: Maybe PermissionType
permissionType = Maybe PermissionType
a} :: WorkspaceDescription)

-- | The name of the workspace.
workspaceDescription_name :: Lens.Lens' WorkspaceDescription (Prelude.Maybe Prelude.Text)
workspaceDescription_name :: (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_name = (WorkspaceDescription -> Maybe (Sensitive Text))
-> (WorkspaceDescription
    -> Maybe (Sensitive Text) -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:WorkspaceDescription' :: WorkspaceDescription -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe (Sensitive Text)
a -> WorkspaceDescription
s {$sel:name:WorkspaceDescription' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: WorkspaceDescription) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription
-> f WorkspaceDescription
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, to allow
-- Amazon Managed Grafana to use these channels.
workspaceDescription_notificationDestinations :: Lens.Lens' WorkspaceDescription (Prelude.Maybe [NotificationDestinationType])
workspaceDescription_notificationDestinations :: (Maybe [NotificationDestinationType]
 -> f (Maybe [NotificationDestinationType]))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_notificationDestinations = (WorkspaceDescription -> Maybe [NotificationDestinationType])
-> (WorkspaceDescription
    -> Maybe [NotificationDestinationType] -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe [NotificationDestinationType])
     (Maybe [NotificationDestinationType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe [NotificationDestinationType]
notificationDestinations :: Maybe [NotificationDestinationType]
$sel:notificationDestinations:WorkspaceDescription' :: WorkspaceDescription -> Maybe [NotificationDestinationType]
notificationDestinations} -> Maybe [NotificationDestinationType]
notificationDestinations) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe [NotificationDestinationType]
a -> WorkspaceDescription
s {$sel:notificationDestinations:WorkspaceDescription' :: Maybe [NotificationDestinationType]
notificationDestinations = Maybe [NotificationDestinationType]
a} :: WorkspaceDescription) ((Maybe [NotificationDestinationType]
  -> f (Maybe [NotificationDestinationType]))
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((Maybe [NotificationDestinationType]
     -> f (Maybe [NotificationDestinationType]))
    -> Maybe [NotificationDestinationType]
    -> f (Maybe [NotificationDestinationType]))
-> (Maybe [NotificationDestinationType]
    -> f (Maybe [NotificationDestinationType]))
-> WorkspaceDescription
-> f WorkspaceDescription
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

-- | Specifies whether the workspace can access Amazon Web Services resources
-- in this Amazon Web Services account only, or whether it can also access
-- Amazon Web Services resources in other accounts in the same
-- organization. If this is @ORGANIZATION@, the
-- @workspaceOrganizationalUnits@ parameter specifies which organizational
-- units the workspace can access.
workspaceDescription_accountAccessType :: Lens.Lens' WorkspaceDescription (Prelude.Maybe AccountAccessType)
workspaceDescription_accountAccessType :: (Maybe AccountAccessType -> f (Maybe AccountAccessType))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_accountAccessType = (WorkspaceDescription -> Maybe AccountAccessType)
-> (WorkspaceDescription
    -> Maybe AccountAccessType -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe AccountAccessType)
     (Maybe AccountAccessType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe AccountAccessType
accountAccessType :: Maybe AccountAccessType
$sel:accountAccessType:WorkspaceDescription' :: WorkspaceDescription -> Maybe AccountAccessType
accountAccessType} -> Maybe AccountAccessType
accountAccessType) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe AccountAccessType
a -> WorkspaceDescription
s {$sel:accountAccessType:WorkspaceDescription' :: Maybe AccountAccessType
accountAccessType = Maybe AccountAccessType
a} :: WorkspaceDescription)

-- | If this workspace has a full Grafana Enterprise license, this specifies
-- when the license ends and will need to be renewed.
workspaceDescription_licenseExpiration :: Lens.Lens' WorkspaceDescription (Prelude.Maybe Prelude.UTCTime)
workspaceDescription_licenseExpiration :: (Maybe UTCTime -> f (Maybe UTCTime))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_licenseExpiration = (WorkspaceDescription -> Maybe POSIX)
-> (WorkspaceDescription -> Maybe POSIX -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe POSIX
licenseExpiration :: Maybe POSIX
$sel:licenseExpiration:WorkspaceDescription' :: WorkspaceDescription -> Maybe POSIX
licenseExpiration} -> Maybe POSIX
licenseExpiration) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe POSIX
a -> WorkspaceDescription
s {$sel:licenseExpiration:WorkspaceDescription' :: Maybe POSIX
licenseExpiration = Maybe POSIX
a} :: WorkspaceDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> WorkspaceDescription
-> f WorkspaceDescription
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

-- | The name of the IAM role that is used to access resources through
-- Organizations.
workspaceDescription_organizationRoleName :: Lens.Lens' WorkspaceDescription (Prelude.Maybe Prelude.Text)
workspaceDescription_organizationRoleName :: (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_organizationRoleName = (WorkspaceDescription -> Maybe (Sensitive Text))
-> (WorkspaceDescription
    -> Maybe (Sensitive Text) -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe (Sensitive Text)
organizationRoleName :: Maybe (Sensitive Text)
$sel:organizationRoleName:WorkspaceDescription' :: WorkspaceDescription -> Maybe (Sensitive Text)
organizationRoleName} -> Maybe (Sensitive Text)
organizationRoleName) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe (Sensitive Text)
a -> WorkspaceDescription
s {$sel:organizationRoleName:WorkspaceDescription' :: Maybe (Sensitive Text)
organizationRoleName = Maybe (Sensitive Text)
a} :: WorkspaceDescription) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription
-> f WorkspaceDescription
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 name of the CloudFormation stack set that is used to generate IAM
-- roles to be used for this workspace.
workspaceDescription_stackSetName :: Lens.Lens' WorkspaceDescription (Prelude.Maybe Prelude.Text)
workspaceDescription_stackSetName :: (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_stackSetName = (WorkspaceDescription -> Maybe Text)
-> (WorkspaceDescription -> Maybe Text -> WorkspaceDescription)
-> Lens
     WorkspaceDescription WorkspaceDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe Text
stackSetName :: Maybe Text
$sel:stackSetName:WorkspaceDescription' :: WorkspaceDescription -> Maybe Text
stackSetName} -> Maybe Text
stackSetName) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe Text
a -> WorkspaceDescription
s {$sel:stackSetName:WorkspaceDescription' :: Maybe Text
stackSetName = Maybe Text
a} :: WorkspaceDescription)

-- | Specifies the organizational units that this workspace is allowed to use
-- data sources from, if this workspace is in an account that is part of an
-- organization.
workspaceDescription_organizationalUnits :: Lens.Lens' WorkspaceDescription (Prelude.Maybe [Prelude.Text])
workspaceDescription_organizationalUnits :: (Maybe [Text] -> f (Maybe [Text]))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_organizationalUnits = (WorkspaceDescription -> Maybe (Sensitive [Text]))
-> (WorkspaceDescription
    -> Maybe (Sensitive [Text]) -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe (Sensitive [Text]))
     (Maybe (Sensitive [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe (Sensitive [Text])
organizationalUnits :: Maybe (Sensitive [Text])
$sel:organizationalUnits:WorkspaceDescription' :: WorkspaceDescription -> Maybe (Sensitive [Text])
organizationalUnits} -> Maybe (Sensitive [Text])
organizationalUnits) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe (Sensitive [Text])
a -> WorkspaceDescription
s {$sel:organizationalUnits:WorkspaceDescription' :: Maybe (Sensitive [Text])
organizationalUnits = Maybe (Sensitive [Text])
a} :: WorkspaceDescription) ((Maybe (Sensitive [Text]) -> f (Maybe (Sensitive [Text])))
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe (Sensitive [Text]) -> f (Maybe (Sensitive [Text])))
-> (Maybe [Text] -> f (Maybe [Text]))
-> WorkspaceDescription
-> f WorkspaceDescription
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 AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
-> (Exchange [Text] [Text] [Text] (Identity [Text])
    -> Exchange [Text] [Text] [Text] (Identity [Text]))
-> AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange [Text] [Text] [Text] (Identity [Text])
-> Exchange [Text] [Text] [Text] (Identity [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | The user-defined description of the workspace.
workspaceDescription_description :: Lens.Lens' WorkspaceDescription (Prelude.Maybe Prelude.Text)
workspaceDescription_description :: (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_description = (WorkspaceDescription -> Maybe (Sensitive Text))
-> (WorkspaceDescription
    -> Maybe (Sensitive Text) -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:WorkspaceDescription' :: WorkspaceDescription -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe (Sensitive Text)
a -> WorkspaceDescription
s {$sel:description:WorkspaceDescription' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: WorkspaceDescription) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> WorkspaceDescription
-> f WorkspaceDescription
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

-- | Specifies whether this workspace has already fully used its free trial
-- for Grafana Enterprise.
workspaceDescription_freeTrialConsumed :: Lens.Lens' WorkspaceDescription (Prelude.Maybe Prelude.Bool)
workspaceDescription_freeTrialConsumed :: (Maybe Bool -> f (Maybe Bool))
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_freeTrialConsumed = (WorkspaceDescription -> Maybe Bool)
-> (WorkspaceDescription -> Maybe Bool -> WorkspaceDescription)
-> Lens
     WorkspaceDescription WorkspaceDescription (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Maybe Bool
freeTrialConsumed :: Maybe Bool
$sel:freeTrialConsumed:WorkspaceDescription' :: WorkspaceDescription -> Maybe Bool
freeTrialConsumed} -> Maybe Bool
freeTrialConsumed) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Maybe Bool
a -> WorkspaceDescription
s {$sel:freeTrialConsumed:WorkspaceDescription' :: Maybe Bool
freeTrialConsumed = Maybe Bool
a} :: WorkspaceDescription)

-- | A structure that describes whether the workspace uses SAML, Amazon Web
-- Services SSO, or both methods for user authentication.
workspaceDescription_authentication :: Lens.Lens' WorkspaceDescription AuthenticationSummary
workspaceDescription_authentication :: (AuthenticationSummary -> f AuthenticationSummary)
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_authentication = (WorkspaceDescription -> AuthenticationSummary)
-> (WorkspaceDescription
    -> AuthenticationSummary -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     AuthenticationSummary
     AuthenticationSummary
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {AuthenticationSummary
authentication :: AuthenticationSummary
$sel:authentication:WorkspaceDescription' :: WorkspaceDescription -> AuthenticationSummary
authentication} -> AuthenticationSummary
authentication) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} AuthenticationSummary
a -> WorkspaceDescription
s {$sel:authentication:WorkspaceDescription' :: AuthenticationSummary
authentication = AuthenticationSummary
a} :: WorkspaceDescription)

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

-- | Specifies the Amazon Web Services data sources that have been configured
-- to have IAM roles and permissions created to allow Amazon Managed
-- Grafana to read data from these sources.
workspaceDescription_dataSources :: Lens.Lens' WorkspaceDescription [DataSourceType]
workspaceDescription_dataSources :: ([DataSourceType] -> f [DataSourceType])
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_dataSources = (WorkspaceDescription -> [DataSourceType])
-> (WorkspaceDescription
    -> [DataSourceType] -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     [DataSourceType]
     [DataSourceType]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {[DataSourceType]
dataSources :: [DataSourceType]
$sel:dataSources:WorkspaceDescription' :: WorkspaceDescription -> [DataSourceType]
dataSources} -> [DataSourceType]
dataSources) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} [DataSourceType]
a -> WorkspaceDescription
s {$sel:dataSources:WorkspaceDescription' :: [DataSourceType]
dataSources = [DataSourceType]
a} :: WorkspaceDescription) (([DataSourceType] -> f [DataSourceType])
 -> WorkspaceDescription -> f WorkspaceDescription)
-> (([DataSourceType] -> f [DataSourceType])
    -> [DataSourceType] -> f [DataSourceType])
-> ([DataSourceType] -> f [DataSourceType])
-> WorkspaceDescription
-> f WorkspaceDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DataSourceType] -> f [DataSourceType])
-> [DataSourceType] -> f [DataSourceType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The URL that users can use to access the Grafana console in the
-- workspace.
workspaceDescription_endpoint :: Lens.Lens' WorkspaceDescription Prelude.Text
workspaceDescription_endpoint :: (Text -> f Text) -> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_endpoint = (WorkspaceDescription -> Text)
-> (WorkspaceDescription -> Text -> WorkspaceDescription)
-> Lens WorkspaceDescription WorkspaceDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Text
endpoint :: Text
$sel:endpoint:WorkspaceDescription' :: WorkspaceDescription -> Text
endpoint} -> Text
endpoint) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Text
a -> WorkspaceDescription
s {$sel:endpoint:WorkspaceDescription' :: Text
endpoint = Text
a} :: WorkspaceDescription)

-- | The version of Grafana supported in this workspace.
workspaceDescription_grafanaVersion :: Lens.Lens' WorkspaceDescription Prelude.Text
workspaceDescription_grafanaVersion :: (Text -> f Text) -> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_grafanaVersion = (WorkspaceDescription -> Text)
-> (WorkspaceDescription -> Text -> WorkspaceDescription)
-> Lens WorkspaceDescription WorkspaceDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Text
grafanaVersion :: Text
$sel:grafanaVersion:WorkspaceDescription' :: WorkspaceDescription -> Text
grafanaVersion} -> Text
grafanaVersion) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Text
a -> WorkspaceDescription
s {$sel:grafanaVersion:WorkspaceDescription' :: Text
grafanaVersion = Text
a} :: WorkspaceDescription)

-- | The unique ID of this workspace.
workspaceDescription_id :: Lens.Lens' WorkspaceDescription Prelude.Text
workspaceDescription_id :: (Text -> f Text) -> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_id = (WorkspaceDescription -> Text)
-> (WorkspaceDescription -> Text -> WorkspaceDescription)
-> Lens WorkspaceDescription WorkspaceDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {Text
id :: Text
$sel:id:WorkspaceDescription' :: WorkspaceDescription -> Text
id} -> Text
id) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} Text
a -> WorkspaceDescription
s {$sel:id:WorkspaceDescription' :: Text
id = Text
a} :: WorkspaceDescription)

-- | The most recent date that the workspace was modified.
workspaceDescription_modified :: Lens.Lens' WorkspaceDescription Prelude.UTCTime
workspaceDescription_modified :: (UTCTime -> f UTCTime)
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_modified = (WorkspaceDescription -> POSIX)
-> (WorkspaceDescription -> POSIX -> WorkspaceDescription)
-> Lens WorkspaceDescription WorkspaceDescription POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {POSIX
modified :: POSIX
$sel:modified:WorkspaceDescription' :: WorkspaceDescription -> POSIX
modified} -> POSIX
modified) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} POSIX
a -> WorkspaceDescription
s {$sel:modified:WorkspaceDescription' :: POSIX
modified = POSIX
a} :: WorkspaceDescription) ((POSIX -> f POSIX)
 -> WorkspaceDescription -> f WorkspaceDescription)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> WorkspaceDescription
-> f WorkspaceDescription
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.
workspaceDescription_status :: Lens.Lens' WorkspaceDescription WorkspaceStatus
workspaceDescription_status :: (WorkspaceStatus -> f WorkspaceStatus)
-> WorkspaceDescription -> f WorkspaceDescription
workspaceDescription_status = (WorkspaceDescription -> WorkspaceStatus)
-> (WorkspaceDescription
    -> WorkspaceStatus -> WorkspaceDescription)
-> Lens
     WorkspaceDescription
     WorkspaceDescription
     WorkspaceStatus
     WorkspaceStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceDescription' {WorkspaceStatus
status :: WorkspaceStatus
$sel:status:WorkspaceDescription' :: WorkspaceDescription -> WorkspaceStatus
status} -> WorkspaceStatus
status) (\s :: WorkspaceDescription
s@WorkspaceDescription' {} WorkspaceStatus
a -> WorkspaceDescription
s {$sel:status:WorkspaceDescription' :: WorkspaceStatus
status = WorkspaceStatus
a} :: WorkspaceDescription)

instance Core.FromJSON WorkspaceDescription where
  parseJSON :: Value -> Parser WorkspaceDescription
parseJSON =
    String
-> (Object -> Parser WorkspaceDescription)
-> Value
-> Parser WorkspaceDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"WorkspaceDescription"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe LicenseType
-> Maybe PermissionType
-> Maybe (Sensitive Text)
-> Maybe [NotificationDestinationType]
-> Maybe AccountAccessType
-> Maybe POSIX
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive [Text])
-> Maybe (Sensitive Text)
-> Maybe Bool
-> AuthenticationSummary
-> POSIX
-> [DataSourceType]
-> Text
-> Text
-> Text
-> POSIX
-> WorkspaceStatus
-> WorkspaceDescription
WorkspaceDescription'
            (Maybe (Sensitive Text)
 -> Maybe POSIX
 -> Maybe LicenseType
 -> Maybe PermissionType
 -> Maybe (Sensitive Text)
 -> Maybe [NotificationDestinationType]
 -> Maybe AccountAccessType
 -> Maybe POSIX
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe (Sensitive [Text])
 -> Maybe (Sensitive Text)
 -> Maybe Bool
 -> AuthenticationSummary
 -> POSIX
 -> [DataSourceType]
 -> Text
 -> Text
 -> Text
 -> POSIX
 -> WorkspaceStatus
 -> WorkspaceDescription)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe POSIX
      -> Maybe LicenseType
      -> Maybe PermissionType
      -> Maybe (Sensitive Text)
      -> Maybe [NotificationDestinationType]
      -> Maybe AccountAccessType
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
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
"workspaceRoleArn")
            Parser
  (Maybe POSIX
   -> Maybe LicenseType
   -> Maybe PermissionType
   -> Maybe (Sensitive Text)
   -> Maybe [NotificationDestinationType]
   -> Maybe AccountAccessType
   -> Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe LicenseType
      -> Maybe PermissionType
      -> Maybe (Sensitive Text)
      -> Maybe [NotificationDestinationType]
      -> Maybe AccountAccessType
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
forall (f :: * -> *) a b. Applicative f => 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
"freeTrialExpiration")
            Parser
  (Maybe LicenseType
   -> Maybe PermissionType
   -> Maybe (Sensitive Text)
   -> Maybe [NotificationDestinationType]
   -> Maybe AccountAccessType
   -> Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe LicenseType)
-> Parser
     (Maybe PermissionType
      -> Maybe (Sensitive Text)
      -> Maybe [NotificationDestinationType]
      -> Maybe AccountAccessType
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LicenseType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"licenseType")
            Parser
  (Maybe PermissionType
   -> Maybe (Sensitive Text)
   -> Maybe [NotificationDestinationType]
   -> Maybe AccountAccessType
   -> Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe PermissionType)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe [NotificationDestinationType]
      -> Maybe AccountAccessType
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PermissionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"permissionType")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe [NotificationDestinationType]
   -> Maybe AccountAccessType
   -> Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe [NotificationDestinationType]
      -> Maybe AccountAccessType
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
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
"name")
            Parser
  (Maybe [NotificationDestinationType]
   -> Maybe AccountAccessType
   -> Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe [NotificationDestinationType])
-> Parser
     (Maybe AccountAccessType
      -> Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
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 AccountAccessType
   -> Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe AccountAccessType)
-> Parser
     (Maybe POSIX
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccountAccessType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"accountAccessType")
            Parser
  (Maybe POSIX
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
forall (f :: * -> *) a b. Applicative f => 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
"licenseExpiration")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Text
      -> Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
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
"organizationRoleName")
            Parser
  (Maybe Text
   -> Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive [Text])
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
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
"stackSetName")
            Parser
  (Maybe (Sensitive [Text])
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe (Sensitive [Text]))
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (Sensitive [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"organizationalUnits"
                            Parser (Maybe (Maybe (Sensitive [Text])))
-> Maybe (Sensitive [Text]) -> Parser (Maybe (Sensitive [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (Sensitive [Text])
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Bool
      -> AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
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
  (Maybe Bool
   -> AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser (Maybe Bool)
-> Parser
     (AuthenticationSummary
      -> POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"freeTrialConsumed")
            Parser
  (AuthenticationSummary
   -> POSIX
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser AuthenticationSummary
-> Parser
     (POSIX
      -> [DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
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
   -> [DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser POSIX
-> Parser
     ([DataSourceType]
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
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
  ([DataSourceType]
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser [DataSourceType]
-> Parser
     (Text
      -> Text
      -> Text
      -> POSIX
      -> WorkspaceStatus
      -> WorkspaceDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [DataSourceType])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dataSources" Parser (Maybe [DataSourceType])
-> [DataSourceType] -> Parser [DataSourceType]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [DataSourceType]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Text
   -> Text
   -> Text
   -> POSIX
   -> WorkspaceStatus
   -> WorkspaceDescription)
-> Parser Text
-> Parser
     (Text -> Text -> POSIX -> WorkspaceStatus -> WorkspaceDescription)
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 -> WorkspaceDescription)
-> Parser Text
-> Parser
     (Text -> POSIX -> WorkspaceStatus -> WorkspaceDescription)
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 -> WorkspaceDescription)
-> Parser Text
-> Parser (POSIX -> WorkspaceStatus -> WorkspaceDescription)
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 -> WorkspaceDescription)
-> Parser POSIX -> Parser (WorkspaceStatus -> WorkspaceDescription)
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 -> WorkspaceDescription)
-> Parser WorkspaceStatus -> Parser WorkspaceDescription
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 WorkspaceDescription

instance Prelude.NFData WorkspaceDescription