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

import qualified Amazonka.Core as Core
import Amazonka.EMR.Types.AuthMode
import Amazonka.EMR.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details for an Amazon EMR Studio including ID, creation time, name, and
-- so on.
--
-- /See:/ 'newStudio' smart constructor.
data Studio = Studio'
  { -- | The time the Amazon EMR Studio was created.
    Studio -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The ID of the Engine security group associated with the Amazon EMR
    -- Studio. The Engine security group allows inbound network traffic from
    -- resources in the Workspace security group.
    Studio -> Maybe Text
engineSecurityGroupId :: Prelude.Maybe Prelude.Text,
    -- | The list of IDs of the subnets associated with the Amazon EMR Studio.
    Studio -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the Amazon EMR Studio.
    Studio -> Maybe Text
studioId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the VPC associated with the Amazon EMR Studio.
    Studio -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | The unique access URL of the Amazon EMR Studio.
    Studio -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the Amazon EMR Studio authenticates users using IAM or
    -- Amazon Web Services SSO.
    Studio -> Maybe AuthMode
authMode :: Prelude.Maybe AuthMode,
    -- | The Amazon S3 location to back up Amazon EMR Studio Workspaces and
    -- notebook files.
    Studio -> Maybe Text
defaultS3Location :: Prelude.Maybe Prelude.Text,
    -- | Your identity provider\'s authentication endpoint. Amazon EMR Studio
    -- redirects federated users to this endpoint for authentication when
    -- logging in to a Studio with the Studio URL.
    Studio -> Maybe Text
idpAuthUrl :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Workspace security group associated with the Amazon EMR
    -- Studio. The Workspace security group allows outbound network traffic to
    -- resources in the Engine security group and to the internet.
    Studio -> Maybe Text
workspaceSecurityGroupId :: Prelude.Maybe Prelude.Text,
    -- | The name of the Amazon EMR Studio.
    Studio -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The name of your identity provider\'s @RelayState@ parameter.
    Studio -> Maybe Text
idpRelayStateParameterName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Amazon EMR Studio.
    Studio -> Maybe Text
studioArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the IAM role assumed by users logged in to the Amazon EMR
    -- Studio. A Studio only requires a @UserRole@ when you use IAM
    -- authentication.
    Studio -> Maybe Text
userRole :: Prelude.Maybe Prelude.Text,
    -- | The detailed description of the Amazon EMR Studio.
    Studio -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A list of tags associated with the Amazon EMR Studio.
    Studio -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the IAM role assumed by the Amazon EMR Studio.
    Studio -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text
  }
  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:
--
-- 'creationTime', 'studio_creationTime' - The time the Amazon EMR Studio was created.
--
-- 'engineSecurityGroupId', 'studio_engineSecurityGroupId' - The ID of the Engine security group associated with the Amazon EMR
-- Studio. The Engine security group allows inbound network traffic from
-- resources in the Workspace security group.
--
-- 'subnetIds', 'studio_subnetIds' - The list of IDs of the subnets associated with the Amazon EMR Studio.
--
-- 'studioId', 'studio_studioId' - The ID of the Amazon EMR Studio.
--
-- 'vpcId', 'studio_vpcId' - The ID of the VPC associated with the Amazon EMR Studio.
--
-- 'url', 'studio_url' - The unique access URL of the Amazon EMR Studio.
--
-- 'authMode', 'studio_authMode' - Specifies whether the Amazon EMR Studio authenticates users using IAM or
-- Amazon Web Services SSO.
--
-- 'defaultS3Location', 'studio_defaultS3Location' - The Amazon S3 location to back up Amazon EMR Studio Workspaces and
-- notebook files.
--
-- 'idpAuthUrl', 'studio_idpAuthUrl' - Your identity provider\'s authentication endpoint. Amazon EMR Studio
-- redirects federated users to this endpoint for authentication when
-- logging in to a Studio with the Studio URL.
--
-- 'workspaceSecurityGroupId', 'studio_workspaceSecurityGroupId' - The ID of the Workspace security group associated with the Amazon EMR
-- Studio. The Workspace security group allows outbound network traffic to
-- resources in the Engine security group and to the internet.
--
-- 'name', 'studio_name' - The name of the Amazon EMR Studio.
--
-- 'idpRelayStateParameterName', 'studio_idpRelayStateParameterName' - The name of your identity provider\'s @RelayState@ parameter.
--
-- 'studioArn', 'studio_studioArn' - The Amazon Resource Name (ARN) of the Amazon EMR Studio.
--
-- 'userRole', 'studio_userRole' - The name of the IAM role assumed by users logged in to the Amazon EMR
-- Studio. A Studio only requires a @UserRole@ when you use IAM
-- authentication.
--
-- 'description', 'studio_description' - The detailed description of the Amazon EMR Studio.
--
-- 'tags', 'studio_tags' - A list of tags associated with the Amazon EMR Studio.
--
-- 'serviceRole', 'studio_serviceRole' - The name of the IAM role assumed by the Amazon EMR Studio.
newStudio ::
  Studio
newStudio :: Studio
newStudio =
  Studio' :: Maybe POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AuthMode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Studio
Studio'
    { $sel:creationTime:Studio' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:engineSecurityGroupId:Studio' :: Maybe Text
engineSecurityGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:Studio' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:studioId:Studio' :: Maybe Text
studioId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:Studio' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:url:Studio' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authMode:Studio' :: Maybe AuthMode
authMode = Maybe AuthMode
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultS3Location:Studio' :: Maybe Text
defaultS3Location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:idpAuthUrl:Studio' :: Maybe Text
idpAuthUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workspaceSecurityGroupId:Studio' :: Maybe Text
workspaceSecurityGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Studio' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:idpRelayStateParameterName:Studio' :: Maybe Text
idpRelayStateParameterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:studioArn:Studio' :: Maybe Text
studioArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:userRole:Studio' :: Maybe Text
userRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Studio' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Studio' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRole:Studio' :: Maybe Text
serviceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The time the Amazon EMR Studio was created.
studio_creationTime :: Lens.Lens' Studio (Prelude.Maybe Prelude.UTCTime)
studio_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Studio -> f Studio
studio_creationTime = (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
creationTime :: Maybe POSIX
$sel:creationTime:Studio' :: Studio -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Studio
s@Studio' {} Maybe POSIX
a -> Studio
s {$sel:creationTime:Studio' :: Maybe POSIX
creationTime = 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 ID of the Engine security group associated with the Amazon EMR
-- Studio. The Engine security group allows inbound network traffic from
-- resources in the Workspace security group.
studio_engineSecurityGroupId :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_engineSecurityGroupId :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_engineSecurityGroupId = (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
engineSecurityGroupId :: Maybe Text
$sel:engineSecurityGroupId:Studio' :: Studio -> Maybe Text
engineSecurityGroupId} -> Maybe Text
engineSecurityGroupId) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:engineSecurityGroupId:Studio' :: Maybe Text
engineSecurityGroupId = Maybe Text
a} :: Studio)

-- | The list of IDs of the subnets associated with the Amazon EMR Studio.
studio_subnetIds :: Lens.Lens' Studio (Prelude.Maybe [Prelude.Text])
studio_subnetIds :: (Maybe [Text] -> f (Maybe [Text])) -> Studio -> f Studio
studio_subnetIds = (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]
subnetIds :: Maybe [Text]
$sel:subnetIds:Studio' :: Studio -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: Studio
s@Studio' {} Maybe [Text]
a -> Studio
s {$sel:subnetIds:Studio' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: Studio) ((Maybe [Text] -> f (Maybe [Text])) -> Studio -> f Studio)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Studio
-> f Studio
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the Amazon EMR Studio.
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 ID of the VPC associated with the Amazon EMR Studio.
studio_vpcId :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_vpcId :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_vpcId = (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
vpcId :: Maybe Text
$sel:vpcId:Studio' :: Studio -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:vpcId:Studio' :: Maybe Text
vpcId = Maybe Text
a} :: Studio)

-- | The unique access URL of the Amazon EMR Studio.
studio_url :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_url :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_url = (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
url :: Maybe Text
$sel:url:Studio' :: Studio -> Maybe Text
url} -> Maybe Text
url) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:url:Studio' :: Maybe Text
url = Maybe Text
a} :: Studio)

-- | Specifies whether the Amazon EMR Studio authenticates users using IAM or
-- Amazon Web Services SSO.
studio_authMode :: Lens.Lens' Studio (Prelude.Maybe AuthMode)
studio_authMode :: (Maybe AuthMode -> f (Maybe AuthMode)) -> Studio -> f Studio
studio_authMode = (Studio -> Maybe AuthMode)
-> (Studio -> Maybe AuthMode -> Studio)
-> Lens Studio Studio (Maybe AuthMode) (Maybe AuthMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe AuthMode
authMode :: Maybe AuthMode
$sel:authMode:Studio' :: Studio -> Maybe AuthMode
authMode} -> Maybe AuthMode
authMode) (\s :: Studio
s@Studio' {} Maybe AuthMode
a -> Studio
s {$sel:authMode:Studio' :: Maybe AuthMode
authMode = Maybe AuthMode
a} :: Studio)

-- | The Amazon S3 location to back up Amazon EMR Studio Workspaces and
-- notebook files.
studio_defaultS3Location :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_defaultS3Location :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_defaultS3Location = (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
defaultS3Location :: Maybe Text
$sel:defaultS3Location:Studio' :: Studio -> Maybe Text
defaultS3Location} -> Maybe Text
defaultS3Location) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:defaultS3Location:Studio' :: Maybe Text
defaultS3Location = Maybe Text
a} :: Studio)

-- | Your identity provider\'s authentication endpoint. Amazon EMR Studio
-- redirects federated users to this endpoint for authentication when
-- logging in to a Studio with the Studio URL.
studio_idpAuthUrl :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_idpAuthUrl :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_idpAuthUrl = (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
idpAuthUrl :: Maybe Text
$sel:idpAuthUrl:Studio' :: Studio -> Maybe Text
idpAuthUrl} -> Maybe Text
idpAuthUrl) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:idpAuthUrl:Studio' :: Maybe Text
idpAuthUrl = Maybe Text
a} :: Studio)

-- | The ID of the Workspace security group associated with the Amazon EMR
-- Studio. The Workspace security group allows outbound network traffic to
-- resources in the Engine security group and to the internet.
studio_workspaceSecurityGroupId :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_workspaceSecurityGroupId :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_workspaceSecurityGroupId = (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
workspaceSecurityGroupId :: Maybe Text
$sel:workspaceSecurityGroupId:Studio' :: Studio -> Maybe Text
workspaceSecurityGroupId} -> Maybe Text
workspaceSecurityGroupId) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:workspaceSecurityGroupId:Studio' :: Maybe Text
workspaceSecurityGroupId = Maybe Text
a} :: Studio)

-- | The name of the Amazon EMR Studio.
studio_name :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_name :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_name = (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
name :: Maybe Text
$sel:name:Studio' :: Studio -> Maybe Text
name} -> Maybe Text
name) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:name:Studio' :: Maybe Text
name = Maybe Text
a} :: Studio)

-- | The name of your identity provider\'s @RelayState@ parameter.
studio_idpRelayStateParameterName :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_idpRelayStateParameterName :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_idpRelayStateParameterName = (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
idpRelayStateParameterName :: Maybe Text
$sel:idpRelayStateParameterName:Studio' :: Studio -> Maybe Text
idpRelayStateParameterName} -> Maybe Text
idpRelayStateParameterName) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:idpRelayStateParameterName:Studio' :: Maybe Text
idpRelayStateParameterName = Maybe Text
a} :: Studio)

-- | The Amazon Resource Name (ARN) of the Amazon EMR Studio.
studio_studioArn :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_studioArn :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_studioArn = (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
studioArn :: Maybe Text
$sel:studioArn:Studio' :: Studio -> Maybe Text
studioArn} -> Maybe Text
studioArn) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:studioArn:Studio' :: Maybe Text
studioArn = Maybe Text
a} :: Studio)

-- | The name of the IAM role assumed by users logged in to the Amazon EMR
-- Studio. A Studio only requires a @UserRole@ when you use IAM
-- authentication.
studio_userRole :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_userRole :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_userRole = (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
userRole :: Maybe Text
$sel:userRole:Studio' :: Studio -> Maybe Text
userRole} -> Maybe Text
userRole) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:userRole:Studio' :: Maybe Text
userRole = Maybe Text
a} :: Studio)

-- | The detailed description of the Amazon EMR Studio.
studio_description :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_description :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_description = (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
description :: Maybe Text
$sel:description:Studio' :: Studio -> Maybe Text
description} -> Maybe Text
description) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:description:Studio' :: Maybe Text
description = Maybe Text
a} :: Studio)

-- | A list of tags associated with the Amazon EMR Studio.
studio_tags :: Lens.Lens' Studio (Prelude.Maybe [Tag])
studio_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Studio -> f Studio
studio_tags = (Studio -> Maybe [Tag])
-> (Studio -> Maybe [Tag] -> Studio)
-> Lens Studio Studio (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Studio' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Studio' :: Studio -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Studio
s@Studio' {} Maybe [Tag]
a -> Studio
s {$sel:tags:Studio' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Studio) ((Maybe [Tag] -> f (Maybe [Tag])) -> Studio -> f Studio)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Studio
-> f Studio
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the IAM role assumed by the Amazon EMR Studio.
studio_serviceRole :: Lens.Lens' Studio (Prelude.Maybe Prelude.Text)
studio_serviceRole :: (Maybe Text -> f (Maybe Text)) -> Studio -> f Studio
studio_serviceRole = (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
serviceRole :: Maybe Text
$sel:serviceRole:Studio' :: Studio -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: Studio
s@Studio' {} Maybe Text
a -> Studio
s {$sel:serviceRole:Studio' :: Maybe Text
serviceRole = Maybe Text
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 POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe AuthMode
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Studio
Studio'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe AuthMode
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Tag]
 -> Maybe Text
 -> Studio)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> Studio)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> 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
"EngineSecurityGroupId")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe AuthMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> Studio)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SubnetIds" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe AuthMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AuthMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> 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 AuthMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AuthMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> 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
"VpcId")
            Parser
  (Maybe Text
   -> Maybe AuthMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe AuthMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> 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
"Url")
            Parser
  (Maybe AuthMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe AuthMode)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> Studio)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AuthMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AuthMode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> 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
"DefaultS3Location")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> 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
"IdpAuthUrl")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> 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
"WorkspaceSecurityGroupId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Text
      -> 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
"Name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Text
   -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe [Tag] -> Maybe Text -> 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
"IdpRelayStateParameterName")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe [Tag] -> Maybe Text -> Studio)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe [Tag] -> Maybe Text -> 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
"StudioArn")
            Parser
  (Maybe Text -> Maybe Text -> Maybe [Tag] -> Maybe Text -> Studio)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Tag] -> Maybe Text -> 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
"UserRole")
            Parser (Maybe Text -> Maybe [Tag] -> Maybe Text -> Studio)
-> Parser (Maybe Text)
-> Parser (Maybe [Tag] -> Maybe Text -> 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
"Description")
            Parser (Maybe [Tag] -> Maybe Text -> Studio)
-> Parser (Maybe [Tag]) -> Parser (Maybe Text -> Studio)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Studio)
-> Parser (Maybe Text) -> Parser 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
"ServiceRole")
      )

instance Prelude.Hashable Studio

instance Prelude.NFData Studio