{-# 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.Nimble.Types.Studio
-- 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.Nimble.Types.Studio where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Nimble.Types.StudioEncryptionConfiguration
import Amazonka.Nimble.Types.StudioState
import Amazonka.Nimble.Types.StudioStatusCode
import qualified Amazonka.Prelude as Prelude

-- |
--
-- /See:/ 'newStudio' smart constructor.
data Studio = Studio'
  { -- | Configuration of the encryption method that is used for the studio.
    Studio -> Maybe StudioEncryptionConfiguration
studioEncryptionConfiguration :: Prelude.Maybe StudioEncryptionConfiguration,
    -- | The current state of the studio resource.
    Studio -> Maybe StudioState
state :: Prelude.Maybe StudioState,
    -- | The name of the studio, as included in the URL when accessing it in the
    -- Nimble Studio portal.
    Studio -> Maybe Text
studioName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) that is assigned to a studio resource and
    -- uniquely identifies it. ARNs are unique across all Regions.
    Studio -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The Unix epoch timestamp in seconds for when the resource was created.
    Studio -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The unique identifier for a studio resource. In Nimble Studio, all other
    -- resources are contained in a studio resource.
    Studio -> Maybe Text
studioId :: Prelude.Maybe Prelude.Text,
    -- | The IAM role that studio users assume when logging in to the Nimble
    -- Studio portal.
    Studio -> Maybe Text
userRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services SSO application client ID used to integrate with
    -- Amazon Web Services SSO to enable Amazon Web Services SSO users to log
    -- in to Nimble portal.
    Studio -> Maybe Text
ssoClientId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services Region where the studio resource is located.
    Studio -> Maybe Text
homeRegion :: Prelude.Maybe Prelude.Text,
    -- | Additional detail on the studio state.
    Studio -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | A friendly name for the studio.
    Studio -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The Unix epoch timestamp in seconds for when the resource was updated.
    Studio -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | The address of the web page for the studio.
    Studio -> Maybe Text
studioUrl :: Prelude.Maybe Prelude.Text,
    -- | The IAM role that studio admins assume when logging in to the Nimble
    -- Studio portal.
    Studio -> Maybe Text
adminRoleArn :: Prelude.Maybe Prelude.Text,
    -- | A collection of labels, in the form of key:value pairs, that apply to
    -- this resource.
    Studio -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Status codes that provide additional detail on the studio state.
    Studio -> Maybe StudioStatusCode
statusCode :: Prelude.Maybe StudioStatusCode
  }
  deriving (Studio -> Studio -> Bool
(Studio -> Studio -> Bool)
-> (Studio -> Studio -> Bool) -> Eq Studio
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Studio -> Studio -> Bool
$c/= :: Studio -> Studio -> Bool
== :: Studio -> Studio -> Bool
$c== :: Studio -> Studio -> Bool
Prelude.Eq, ReadPrec [Studio]
ReadPrec Studio
Int -> ReadS Studio
ReadS [Studio]
(Int -> ReadS Studio)
-> ReadS [Studio]
-> ReadPrec Studio
-> ReadPrec [Studio]
-> Read Studio
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Studio]
$creadListPrec :: ReadPrec [Studio]
readPrec :: ReadPrec Studio
$creadPrec :: ReadPrec Studio
readList :: ReadS [Studio]
$creadList :: ReadS [Studio]
readsPrec :: Int -> ReadS Studio
$creadsPrec :: Int -> ReadS Studio
Prelude.Read, Int -> Studio -> ShowS
[Studio] -> ShowS
Studio -> String
(Int -> Studio -> ShowS)
-> (Studio -> String) -> ([Studio] -> ShowS) -> Show Studio
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Studio] -> ShowS
$cshowList :: [Studio] -> ShowS
show :: Studio -> String
$cshow :: Studio -> String
showsPrec :: Int -> Studio -> ShowS
$cshowsPrec :: Int -> Studio -> ShowS
Prelude.Show, (forall x. Studio -> Rep Studio x)
-> (forall x. Rep Studio x -> Studio) -> Generic Studio
forall x. Rep Studio x -> Studio
forall x. Studio -> Rep Studio x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Studio x -> Studio
$cfrom :: forall x. Studio -> Rep Studio x
Prelude.Generic)

-- |
-- Create a value of 'Studio' 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:
--
-- 'studioEncryptionConfiguration', 'studio_studioEncryptionConfiguration' - Configuration of the encryption method that is used for the studio.
--
-- 'state', 'studio_state' - The current state of the studio resource.
--
-- 'studioName', 'studio_studioName' - The name of the studio, as included in the URL when accessing it in the
-- Nimble Studio portal.
--
-- 'arn', 'studio_arn' - The Amazon Resource Name (ARN) that is assigned to a studio resource and
-- uniquely identifies it. ARNs are unique across all Regions.
--
-- 'createdAt', 'studio_createdAt' - The Unix epoch timestamp in seconds for when the resource was created.
--
-- 'studioId', 'studio_studioId' - The unique identifier for a studio resource. In Nimble Studio, all other
-- resources are contained in a studio resource.
--
-- 'userRoleArn', 'studio_userRoleArn' - The IAM role that studio users assume when logging in to the Nimble
-- Studio portal.
--
-- 'ssoClientId', 'studio_ssoClientId' - The Amazon Web Services SSO application client ID used to integrate with
-- Amazon Web Services SSO to enable Amazon Web Services SSO users to log
-- in to Nimble portal.
--
-- 'homeRegion', 'studio_homeRegion' - The Amazon Web Services Region where the studio resource is located.
--
-- 'statusMessage', 'studio_statusMessage' - Additional detail on the studio state.
--
-- 'displayName', 'studio_displayName' - A friendly name for the studio.
--
-- 'updatedAt', 'studio_updatedAt' - The Unix epoch timestamp in seconds for when the resource was updated.
--
-- 'studioUrl', 'studio_studioUrl' - The address of the web page for the studio.
--
-- 'adminRoleArn', 'studio_adminRoleArn' - The IAM role that studio admins assume when logging in to the Nimble
-- Studio portal.
--
-- 'tags', 'studio_tags' - A collection of labels, in the form of key:value pairs, that apply to
-- this resource.
--
-- 'statusCode', 'studio_statusCode' - Status codes that provide additional detail on the studio state.
newStudio ::
  Studio
newStudio :: Studio
newStudio =
  Studio' :: Maybe StudioEncryptionConfiguration
-> Maybe StudioState
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe StudioStatusCode
-> Studio
Studio'
    { $sel:studioEncryptionConfiguration:Studio' :: Maybe StudioEncryptionConfiguration
studioEncryptionConfiguration =
        Maybe StudioEncryptionConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:state:Studio' :: Maybe StudioState
state = Maybe StudioState
forall a. Maybe a
Prelude.Nothing,
      $sel:studioName:Studio' :: Maybe Text
studioName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Studio' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Studio' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:studioId:Studio' :: Maybe Text
studioId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:userRoleArn:Studio' :: Maybe Text
userRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ssoClientId:Studio' :: Maybe Text
ssoClientId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:homeRegion:Studio' :: Maybe Text
homeRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:Studio' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:Studio' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:Studio' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:studioUrl:Studio' :: Maybe Text
studioUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:adminRoleArn:Studio' :: Maybe Text
adminRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Studio' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:statusCode:Studio' :: Maybe StudioStatusCode
statusCode = Maybe StudioStatusCode
forall a. Maybe a
Prelude.Nothing
    }

-- | Configuration of the encryption method that is used for the studio.
studio_studioEncryptionConfiguration :: Lens.Lens' Studio (Prelude.Maybe StudioEncryptionConfiguration)
studio_studioEncryptionConfiguration :: (Maybe StudioEncryptionConfiguration
 -> f (Maybe StudioEncryptionConfiguration))
-> Studio -> f Studio
studio_studioEncryptionConfiguration = (Studio -> Maybe StudioEncryptionConfiguration)
-> (Studio -> Maybe StudioEncryptionConfiguration -> Studio)
-> Lens
     Studio
     Studio
     (Maybe StudioEncryptionConfiguration)
     (Maybe StudioEncryptionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe StudioEncryptionConfiguration
studioEncryptionConfiguration :: Maybe StudioEncryptionConfiguration
$sel:studioEncryptionConfiguration:Studio' :: Studio -> Maybe StudioEncryptionConfiguration
studioEncryptionConfiguration} -> Maybe StudioEncryptionConfiguration
studioEncryptionConfiguration) (\s :: Studio
s@Studio' {} Maybe StudioEncryptionConfiguration
a -> Studio
s {$sel:studioEncryptionConfiguration:Studio' :: Maybe StudioEncryptionConfiguration
studioEncryptionConfiguration = Maybe StudioEncryptionConfiguration
a} :: Studio)

-- | The current state of the studio resource.
studio_state :: Lens.Lens' Studio (Prelude.Maybe StudioState)
studio_state :: (Maybe StudioState -> f (Maybe StudioState)) -> Studio -> f Studio
studio_state = (Studio -> Maybe StudioState)
-> (Studio -> Maybe StudioState -> Studio)
-> Lens Studio Studio (Maybe StudioState) (Maybe StudioState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe StudioState
state :: Maybe StudioState
$sel:state:Studio' :: Studio -> Maybe StudioState
state} -> Maybe StudioState
state) (\s :: Studio
s@Studio' {} Maybe StudioState
a -> Studio
s {$sel:state:Studio' :: Maybe StudioState
state = Maybe StudioState
a} :: Studio)

-- | The name of the studio, as included in the URL when accessing it in the
-- Nimble Studio portal.
studio_studioName :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_studioName :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_studioName = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
studioName :: Maybe Text
$sel:studioName:Studio' :: Studio -> Maybe Text
studioName} -> Maybe Text
studioName) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:studioName:Studio' :: Maybe Text
studioName = Maybe Text
a} :: Studio)

-- | The Amazon Resource Name (ARN) that is assigned to a studio resource and
-- uniquely identifies it. ARNs are unique across all Regions.
studio_arn :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_arn :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_arn = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
arn :: Maybe Text
$sel:arn:Studio' :: Studio -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:arn:Studio' :: Maybe Text
arn = Maybe Text
a} :: Studio)

-- | The Unix epoch timestamp in seconds for when the resource was created.
studio_createdAt :: Lens.Lens' Studio (Prelude.Maybe Prelude.UTCTime)
studio_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Studio -> f Studio
studio_createdAt = (Studio -> Maybe POSIX)
-> (Studio -> Maybe POSIX -> Studio)
-> Lens Studio Studio (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Studio' :: Studio -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Studio
s@Studio' {} Maybe POSIX
a -> Studio
s {$sel:createdAt:Studio' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Studio) ((Maybe POSIX -> f (Maybe POSIX)) -> Studio -> f Studio)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Studio
-> f Studio
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 unique identifier for a studio resource. In Nimble Studio, all other
-- resources are contained in a studio resource.
studio_studioId :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_studioId :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_studioId = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
studioId :: Maybe Text
$sel:studioId:Studio' :: Studio -> Maybe Text
studioId} -> Maybe Text
studioId) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:studioId:Studio' :: Maybe Text
studioId = Maybe Text
a} :: Studio)

-- | The IAM role that studio users assume when logging in to the Nimble
-- Studio portal.
studio_userRoleArn :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_userRoleArn :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_userRoleArn = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
userRoleArn :: Maybe Text
$sel:userRoleArn:Studio' :: Studio -> Maybe Text
userRoleArn} -> Maybe Text
userRoleArn) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:userRoleArn:Studio' :: Maybe Text
userRoleArn = Maybe Text
a} :: Studio)

-- | The Amazon Web Services SSO application client ID used to integrate with
-- Amazon Web Services SSO to enable Amazon Web Services SSO users to log
-- in to Nimble portal.
studio_ssoClientId :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_ssoClientId :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_ssoClientId = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
ssoClientId :: Maybe Text
$sel:ssoClientId:Studio' :: Studio -> Maybe Text
ssoClientId} -> Maybe Text
ssoClientId) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:ssoClientId:Studio' :: Maybe Text
ssoClientId = Maybe Text
a} :: Studio)

-- | The Amazon Web Services Region where the studio resource is located.
studio_homeRegion :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_homeRegion :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_homeRegion = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
homeRegion :: Maybe Text
$sel:homeRegion:Studio' :: Studio -> Maybe Text
homeRegion} -> Maybe Text
homeRegion) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:homeRegion:Studio' :: Maybe Text
homeRegion = Maybe Text
a} :: Studio)

-- | Additional detail on the studio state.
studio_statusMessage :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_statusMessage :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_statusMessage = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:Studio' :: Studio -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:statusMessage:Studio' :: Maybe Text
statusMessage = Maybe Text
a} :: Studio)

-- | A friendly name for the studio.
studio_displayName :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_displayName :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_displayName = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
displayName :: Maybe Text
$sel:displayName:Studio' :: Studio -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:displayName:Studio' :: Maybe Text
displayName = Maybe Text
a} :: Studio)

-- | The Unix epoch timestamp in seconds for when the resource was updated.
studio_updatedAt :: Lens.Lens' Studio (Prelude.Maybe Prelude.UTCTime)
studio_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Studio -> f Studio
studio_updatedAt = (Studio -> Maybe POSIX)
-> (Studio -> Maybe POSIX -> Studio)
-> Lens Studio Studio (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:Studio' :: Studio -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: Studio
s@Studio' {} Maybe POSIX
a -> Studio
s {$sel:updatedAt:Studio' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: Studio) ((Maybe POSIX -> f (Maybe POSIX)) -> Studio -> f Studio)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Studio
-> f Studio
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 address of the web page for the studio.
studio_studioUrl :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_studioUrl :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_studioUrl = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
studioUrl :: Maybe Text
$sel:studioUrl:Studio' :: Studio -> Maybe Text
studioUrl} -> Maybe Text
studioUrl) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:studioUrl:Studio' :: Maybe Text
studioUrl = Maybe Text
a} :: Studio)

-- | The IAM role that studio admins assume when logging in to the Nimble
-- Studio portal.
studio_adminRoleArn :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_adminRoleArn :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_adminRoleArn = (Studio -> Maybe Text)
-> (Studio -> Maybe Text -> Studio)
-> Lens Studio Studio (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe Text
adminRoleArn :: Maybe Text
$sel:adminRoleArn:Studio' :: Studio -> Maybe Text
adminRoleArn} -> Maybe Text
adminRoleArn) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:adminRoleArn:Studio' :: Maybe Text
adminRoleArn = Maybe Text
a} :: Studio)

-- | A collection of labels, in the form of key:value pairs, that apply to
-- this resource.
studio_tags :: Lens.Lens' Studio (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
studio_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Studio -> f Studio
studio_tags = (Studio -> Maybe (HashMap Text Text))
-> (Studio -> Maybe (HashMap Text Text) -> Studio)
-> Lens
     Studio
     Studio
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Studio' :: Studio -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Studio
s@Studio' {} Maybe (HashMap Text Text)
a -> Studio
s {$sel:tags:Studio' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Studio) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Studio -> f Studio)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Studio
-> f Studio
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Status codes that provide additional detail on the studio state.
studio_statusCode :: Lens.Lens' Studio (Prelude.Maybe StudioStatusCode)
studio_statusCode :: (Maybe StudioStatusCode -> f (Maybe StudioStatusCode))
-> Studio -> f Studio
studio_statusCode = (Studio -> Maybe StudioStatusCode)
-> (Studio -> Maybe StudioStatusCode -> Studio)
-> Lens
     Studio Studio (Maybe StudioStatusCode) (Maybe StudioStatusCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe StudioStatusCode
statusCode :: Maybe StudioStatusCode
$sel:statusCode:Studio' :: Studio -> Maybe StudioStatusCode
statusCode} -> Maybe StudioStatusCode
statusCode) (\s :: Studio
s@Studio' {} Maybe StudioStatusCode
a -> Studio
s {$sel:statusCode:Studio' :: Maybe StudioStatusCode
statusCode = Maybe StudioStatusCode
a} :: Studio)

instance Core.FromJSON Studio where
  parseJSON :: Value -> Parser Studio
parseJSON =
    String -> (Object -> Parser Studio) -> Value -> Parser Studio
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Studio"
      ( \Object
x ->
          Maybe StudioEncryptionConfiguration
-> Maybe StudioState
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe StudioStatusCode
-> Studio
Studio'
            (Maybe StudioEncryptionConfiguration
 -> Maybe StudioState
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe StudioStatusCode
 -> Studio)
-> Parser (Maybe StudioEncryptionConfiguration)
-> Parser
     (Maybe StudioState
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe StudioEncryptionConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"studioEncryptionConfiguration")
            Parser
  (Maybe StudioState
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe StudioState)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StudioState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"studioName")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"arn")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"createdAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"studioId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"userRoleArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"ssoClientId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"homeRegion")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"statusMessage")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"displayName")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe StudioStatusCode
      -> Studio)
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
"updatedAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe StudioStatusCode
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Maybe StudioStatusCode -> Studio)
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
"studioUrl")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Maybe StudioStatusCode -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text) -> Maybe StudioStatusCode -> Studio)
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
"adminRoleArn")
            Parser
  (Maybe (HashMap Text Text) -> Maybe StudioStatusCode -> Studio)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe StudioStatusCode -> Studio)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe StudioStatusCode -> Studio)
-> Parser (Maybe StudioStatusCode) -> Parser Studio
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StudioStatusCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"statusCode")
      )

instance Prelude.Hashable Studio

instance Prelude.NFData Studio