{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.GetStudioSessionMapping
-- 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)
--
-- Fetches mapping details for the specified Amazon EMR Studio and identity
-- (user or group).
module Amazonka.EMR.GetStudioSessionMapping
  ( -- * Creating a Request
    GetStudioSessionMapping (..),
    newGetStudioSessionMapping,

    -- * Request Lenses
    getStudioSessionMapping_identityId,
    getStudioSessionMapping_identityName,
    getStudioSessionMapping_studioId,
    getStudioSessionMapping_identityType,

    -- * Destructuring the Response
    GetStudioSessionMappingResponse (..),
    newGetStudioSessionMappingResponse,

    -- * Response Lenses
    getStudioSessionMappingResponse_sessionMapping,
    getStudioSessionMappingResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.EMR.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetStudioSessionMapping' smart constructor.
data GetStudioSessionMapping = GetStudioSessionMapping'
  { -- | The globally unique identifier (GUID) of the user or group. For more
    -- information, see
    -- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId UserId>
    -- and
    -- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-GroupId GroupId>
    -- in the /Amazon Web Services SSO Identity Store API Reference/. Either
    -- @IdentityName@ or @IdentityId@ must be specified.
    GetStudioSessionMapping -> Maybe Text
identityId :: Prelude.Maybe Prelude.Text,
    -- | The name of the user or group to fetch. For more information, see
    -- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserName UserName>
    -- and
    -- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName DisplayName>
    -- in the /Amazon Web Services SSO Identity Store API Reference/. Either
    -- @IdentityName@ or @IdentityId@ must be specified.
    GetStudioSessionMapping -> Maybe Text
identityName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon EMR Studio.
    GetStudioSessionMapping -> Text
studioId :: Prelude.Text,
    -- | Specifies whether the identity to fetch is a user or a group.
    GetStudioSessionMapping -> IdentityType
identityType :: IdentityType
  }
  deriving (GetStudioSessionMapping -> GetStudioSessionMapping -> Bool
(GetStudioSessionMapping -> GetStudioSessionMapping -> Bool)
-> (GetStudioSessionMapping -> GetStudioSessionMapping -> Bool)
-> Eq GetStudioSessionMapping
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetStudioSessionMapping -> GetStudioSessionMapping -> Bool
$c/= :: GetStudioSessionMapping -> GetStudioSessionMapping -> Bool
== :: GetStudioSessionMapping -> GetStudioSessionMapping -> Bool
$c== :: GetStudioSessionMapping -> GetStudioSessionMapping -> Bool
Prelude.Eq, ReadPrec [GetStudioSessionMapping]
ReadPrec GetStudioSessionMapping
Int -> ReadS GetStudioSessionMapping
ReadS [GetStudioSessionMapping]
(Int -> ReadS GetStudioSessionMapping)
-> ReadS [GetStudioSessionMapping]
-> ReadPrec GetStudioSessionMapping
-> ReadPrec [GetStudioSessionMapping]
-> Read GetStudioSessionMapping
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetStudioSessionMapping]
$creadListPrec :: ReadPrec [GetStudioSessionMapping]
readPrec :: ReadPrec GetStudioSessionMapping
$creadPrec :: ReadPrec GetStudioSessionMapping
readList :: ReadS [GetStudioSessionMapping]
$creadList :: ReadS [GetStudioSessionMapping]
readsPrec :: Int -> ReadS GetStudioSessionMapping
$creadsPrec :: Int -> ReadS GetStudioSessionMapping
Prelude.Read, Int -> GetStudioSessionMapping -> ShowS
[GetStudioSessionMapping] -> ShowS
GetStudioSessionMapping -> String
(Int -> GetStudioSessionMapping -> ShowS)
-> (GetStudioSessionMapping -> String)
-> ([GetStudioSessionMapping] -> ShowS)
-> Show GetStudioSessionMapping
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetStudioSessionMapping] -> ShowS
$cshowList :: [GetStudioSessionMapping] -> ShowS
show :: GetStudioSessionMapping -> String
$cshow :: GetStudioSessionMapping -> String
showsPrec :: Int -> GetStudioSessionMapping -> ShowS
$cshowsPrec :: Int -> GetStudioSessionMapping -> ShowS
Prelude.Show, (forall x.
 GetStudioSessionMapping -> Rep GetStudioSessionMapping x)
-> (forall x.
    Rep GetStudioSessionMapping x -> GetStudioSessionMapping)
-> Generic GetStudioSessionMapping
forall x. Rep GetStudioSessionMapping x -> GetStudioSessionMapping
forall x. GetStudioSessionMapping -> Rep GetStudioSessionMapping x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetStudioSessionMapping x -> GetStudioSessionMapping
$cfrom :: forall x. GetStudioSessionMapping -> Rep GetStudioSessionMapping x
Prelude.Generic)

-- |
-- Create a value of 'GetStudioSessionMapping' 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:
--
-- 'identityId', 'getStudioSessionMapping_identityId' - The globally unique identifier (GUID) of the user or group. For more
-- information, see
-- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId UserId>
-- and
-- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-GroupId GroupId>
-- in the /Amazon Web Services SSO Identity Store API Reference/. Either
-- @IdentityName@ or @IdentityId@ must be specified.
--
-- 'identityName', 'getStudioSessionMapping_identityName' - The name of the user or group to fetch. For more information, see
-- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserName UserName>
-- and
-- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName DisplayName>
-- in the /Amazon Web Services SSO Identity Store API Reference/. Either
-- @IdentityName@ or @IdentityId@ must be specified.
--
-- 'studioId', 'getStudioSessionMapping_studioId' - The ID of the Amazon EMR Studio.
--
-- 'identityType', 'getStudioSessionMapping_identityType' - Specifies whether the identity to fetch is a user or a group.
newGetStudioSessionMapping ::
  -- | 'studioId'
  Prelude.Text ->
  -- | 'identityType'
  IdentityType ->
  GetStudioSessionMapping
newGetStudioSessionMapping :: Text -> IdentityType -> GetStudioSessionMapping
newGetStudioSessionMapping Text
pStudioId_ IdentityType
pIdentityType_ =
  GetStudioSessionMapping' :: Maybe Text
-> Maybe Text -> Text -> IdentityType -> GetStudioSessionMapping
GetStudioSessionMapping'
    { $sel:identityId:GetStudioSessionMapping' :: Maybe Text
identityId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:identityName:GetStudioSessionMapping' :: Maybe Text
identityName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:studioId:GetStudioSessionMapping' :: Text
studioId = Text
pStudioId_,
      $sel:identityType:GetStudioSessionMapping' :: IdentityType
identityType = IdentityType
pIdentityType_
    }

-- | The globally unique identifier (GUID) of the user or group. For more
-- information, see
-- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId UserId>
-- and
-- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-GroupId GroupId>
-- in the /Amazon Web Services SSO Identity Store API Reference/. Either
-- @IdentityName@ or @IdentityId@ must be specified.
getStudioSessionMapping_identityId :: Lens.Lens' GetStudioSessionMapping (Prelude.Maybe Prelude.Text)
getStudioSessionMapping_identityId :: (Maybe Text -> f (Maybe Text))
-> GetStudioSessionMapping -> f GetStudioSessionMapping
getStudioSessionMapping_identityId = (GetStudioSessionMapping -> Maybe Text)
-> (GetStudioSessionMapping
    -> Maybe Text -> GetStudioSessionMapping)
-> Lens
     GetStudioSessionMapping
     GetStudioSessionMapping
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStudioSessionMapping' {Maybe Text
identityId :: Maybe Text
$sel:identityId:GetStudioSessionMapping' :: GetStudioSessionMapping -> Maybe Text
identityId} -> Maybe Text
identityId) (\s :: GetStudioSessionMapping
s@GetStudioSessionMapping' {} Maybe Text
a -> GetStudioSessionMapping
s {$sel:identityId:GetStudioSessionMapping' :: Maybe Text
identityId = Maybe Text
a} :: GetStudioSessionMapping)

-- | The name of the user or group to fetch. For more information, see
-- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserName UserName>
-- and
-- <https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName DisplayName>
-- in the /Amazon Web Services SSO Identity Store API Reference/. Either
-- @IdentityName@ or @IdentityId@ must be specified.
getStudioSessionMapping_identityName :: Lens.Lens' GetStudioSessionMapping (Prelude.Maybe Prelude.Text)
getStudioSessionMapping_identityName :: (Maybe Text -> f (Maybe Text))
-> GetStudioSessionMapping -> f GetStudioSessionMapping
getStudioSessionMapping_identityName = (GetStudioSessionMapping -> Maybe Text)
-> (GetStudioSessionMapping
    -> Maybe Text -> GetStudioSessionMapping)
-> Lens
     GetStudioSessionMapping
     GetStudioSessionMapping
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStudioSessionMapping' {Maybe Text
identityName :: Maybe Text
$sel:identityName:GetStudioSessionMapping' :: GetStudioSessionMapping -> Maybe Text
identityName} -> Maybe Text
identityName) (\s :: GetStudioSessionMapping
s@GetStudioSessionMapping' {} Maybe Text
a -> GetStudioSessionMapping
s {$sel:identityName:GetStudioSessionMapping' :: Maybe Text
identityName = Maybe Text
a} :: GetStudioSessionMapping)

-- | The ID of the Amazon EMR Studio.
getStudioSessionMapping_studioId :: Lens.Lens' GetStudioSessionMapping Prelude.Text
getStudioSessionMapping_studioId :: (Text -> f Text)
-> GetStudioSessionMapping -> f GetStudioSessionMapping
getStudioSessionMapping_studioId = (GetStudioSessionMapping -> Text)
-> (GetStudioSessionMapping -> Text -> GetStudioSessionMapping)
-> Lens GetStudioSessionMapping GetStudioSessionMapping Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStudioSessionMapping' {Text
studioId :: Text
$sel:studioId:GetStudioSessionMapping' :: GetStudioSessionMapping -> Text
studioId} -> Text
studioId) (\s :: GetStudioSessionMapping
s@GetStudioSessionMapping' {} Text
a -> GetStudioSessionMapping
s {$sel:studioId:GetStudioSessionMapping' :: Text
studioId = Text
a} :: GetStudioSessionMapping)

-- | Specifies whether the identity to fetch is a user or a group.
getStudioSessionMapping_identityType :: Lens.Lens' GetStudioSessionMapping IdentityType
getStudioSessionMapping_identityType :: (IdentityType -> f IdentityType)
-> GetStudioSessionMapping -> f GetStudioSessionMapping
getStudioSessionMapping_identityType = (GetStudioSessionMapping -> IdentityType)
-> (GetStudioSessionMapping
    -> IdentityType -> GetStudioSessionMapping)
-> Lens
     GetStudioSessionMapping
     GetStudioSessionMapping
     IdentityType
     IdentityType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStudioSessionMapping' {IdentityType
identityType :: IdentityType
$sel:identityType:GetStudioSessionMapping' :: GetStudioSessionMapping -> IdentityType
identityType} -> IdentityType
identityType) (\s :: GetStudioSessionMapping
s@GetStudioSessionMapping' {} IdentityType
a -> GetStudioSessionMapping
s {$sel:identityType:GetStudioSessionMapping' :: IdentityType
identityType = IdentityType
a} :: GetStudioSessionMapping)

instance Core.AWSRequest GetStudioSessionMapping where
  type
    AWSResponse GetStudioSessionMapping =
      GetStudioSessionMappingResponse
  request :: GetStudioSessionMapping -> Request GetStudioSessionMapping
request = Service
-> GetStudioSessionMapping -> Request GetStudioSessionMapping
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetStudioSessionMapping
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetStudioSessionMapping)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetStudioSessionMapping))
-> Logger
-> Service
-> Proxy GetStudioSessionMapping
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetStudioSessionMapping)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe SessionMappingDetail
-> Int -> GetStudioSessionMappingResponse
GetStudioSessionMappingResponse'
            (Maybe SessionMappingDetail
 -> Int -> GetStudioSessionMappingResponse)
-> Either String (Maybe SessionMappingDetail)
-> Either String (Int -> GetStudioSessionMappingResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe SessionMappingDetail)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SessionMapping")
            Either String (Int -> GetStudioSessionMappingResponse)
-> Either String Int
-> Either String GetStudioSessionMappingResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetStudioSessionMapping

instance Prelude.NFData GetStudioSessionMapping

instance Core.ToHeaders GetStudioSessionMapping where
  toHeaders :: GetStudioSessionMapping -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetStudioSessionMapping -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"ElasticMapReduce.GetStudioSessionMapping" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetStudioSessionMapping where
  toJSON :: GetStudioSessionMapping -> Value
toJSON GetStudioSessionMapping' {Maybe Text
Text
IdentityType
identityType :: IdentityType
studioId :: Text
identityName :: Maybe Text
identityId :: Maybe Text
$sel:identityType:GetStudioSessionMapping' :: GetStudioSessionMapping -> IdentityType
$sel:studioId:GetStudioSessionMapping' :: GetStudioSessionMapping -> Text
$sel:identityName:GetStudioSessionMapping' :: GetStudioSessionMapping -> Maybe Text
$sel:identityId:GetStudioSessionMapping' :: GetStudioSessionMapping -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IdentityId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
identityId,
            (Text
"IdentityName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
identityName,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StudioId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
studioId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IdentityType" Text -> IdentityType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= IdentityType
identityType)
          ]
      )

instance Core.ToPath GetStudioSessionMapping where
  toPath :: GetStudioSessionMapping -> ByteString
toPath = ByteString -> GetStudioSessionMapping -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetStudioSessionMapping where
  toQuery :: GetStudioSessionMapping -> QueryString
toQuery = QueryString -> GetStudioSessionMapping -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetStudioSessionMappingResponse' smart constructor.
data GetStudioSessionMappingResponse = GetStudioSessionMappingResponse'
  { -- | The session mapping details for the specified Amazon EMR Studio and
    -- identity, including session policy ARN and creation time.
    GetStudioSessionMappingResponse -> Maybe SessionMappingDetail
sessionMapping :: Prelude.Maybe SessionMappingDetail,
    -- | The response's http status code.
    GetStudioSessionMappingResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetStudioSessionMappingResponse
-> GetStudioSessionMappingResponse -> Bool
(GetStudioSessionMappingResponse
 -> GetStudioSessionMappingResponse -> Bool)
-> (GetStudioSessionMappingResponse
    -> GetStudioSessionMappingResponse -> Bool)
-> Eq GetStudioSessionMappingResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetStudioSessionMappingResponse
-> GetStudioSessionMappingResponse -> Bool
$c/= :: GetStudioSessionMappingResponse
-> GetStudioSessionMappingResponse -> Bool
== :: GetStudioSessionMappingResponse
-> GetStudioSessionMappingResponse -> Bool
$c== :: GetStudioSessionMappingResponse
-> GetStudioSessionMappingResponse -> Bool
Prelude.Eq, ReadPrec [GetStudioSessionMappingResponse]
ReadPrec GetStudioSessionMappingResponse
Int -> ReadS GetStudioSessionMappingResponse
ReadS [GetStudioSessionMappingResponse]
(Int -> ReadS GetStudioSessionMappingResponse)
-> ReadS [GetStudioSessionMappingResponse]
-> ReadPrec GetStudioSessionMappingResponse
-> ReadPrec [GetStudioSessionMappingResponse]
-> Read GetStudioSessionMappingResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetStudioSessionMappingResponse]
$creadListPrec :: ReadPrec [GetStudioSessionMappingResponse]
readPrec :: ReadPrec GetStudioSessionMappingResponse
$creadPrec :: ReadPrec GetStudioSessionMappingResponse
readList :: ReadS [GetStudioSessionMappingResponse]
$creadList :: ReadS [GetStudioSessionMappingResponse]
readsPrec :: Int -> ReadS GetStudioSessionMappingResponse
$creadsPrec :: Int -> ReadS GetStudioSessionMappingResponse
Prelude.Read, Int -> GetStudioSessionMappingResponse -> ShowS
[GetStudioSessionMappingResponse] -> ShowS
GetStudioSessionMappingResponse -> String
(Int -> GetStudioSessionMappingResponse -> ShowS)
-> (GetStudioSessionMappingResponse -> String)
-> ([GetStudioSessionMappingResponse] -> ShowS)
-> Show GetStudioSessionMappingResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetStudioSessionMappingResponse] -> ShowS
$cshowList :: [GetStudioSessionMappingResponse] -> ShowS
show :: GetStudioSessionMappingResponse -> String
$cshow :: GetStudioSessionMappingResponse -> String
showsPrec :: Int -> GetStudioSessionMappingResponse -> ShowS
$cshowsPrec :: Int -> GetStudioSessionMappingResponse -> ShowS
Prelude.Show, (forall x.
 GetStudioSessionMappingResponse
 -> Rep GetStudioSessionMappingResponse x)
-> (forall x.
    Rep GetStudioSessionMappingResponse x
    -> GetStudioSessionMappingResponse)
-> Generic GetStudioSessionMappingResponse
forall x.
Rep GetStudioSessionMappingResponse x
-> GetStudioSessionMappingResponse
forall x.
GetStudioSessionMappingResponse
-> Rep GetStudioSessionMappingResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetStudioSessionMappingResponse x
-> GetStudioSessionMappingResponse
$cfrom :: forall x.
GetStudioSessionMappingResponse
-> Rep GetStudioSessionMappingResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetStudioSessionMappingResponse' 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:
--
-- 'sessionMapping', 'getStudioSessionMappingResponse_sessionMapping' - The session mapping details for the specified Amazon EMR Studio and
-- identity, including session policy ARN and creation time.
--
-- 'httpStatus', 'getStudioSessionMappingResponse_httpStatus' - The response's http status code.
newGetStudioSessionMappingResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetStudioSessionMappingResponse
newGetStudioSessionMappingResponse :: Int -> GetStudioSessionMappingResponse
newGetStudioSessionMappingResponse Int
pHttpStatus_ =
  GetStudioSessionMappingResponse' :: Maybe SessionMappingDetail
-> Int -> GetStudioSessionMappingResponse
GetStudioSessionMappingResponse'
    { $sel:sessionMapping:GetStudioSessionMappingResponse' :: Maybe SessionMappingDetail
sessionMapping =
        Maybe SessionMappingDetail
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetStudioSessionMappingResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The session mapping details for the specified Amazon EMR Studio and
-- identity, including session policy ARN and creation time.
getStudioSessionMappingResponse_sessionMapping :: Lens.Lens' GetStudioSessionMappingResponse (Prelude.Maybe SessionMappingDetail)
getStudioSessionMappingResponse_sessionMapping :: (Maybe SessionMappingDetail -> f (Maybe SessionMappingDetail))
-> GetStudioSessionMappingResponse
-> f GetStudioSessionMappingResponse
getStudioSessionMappingResponse_sessionMapping = (GetStudioSessionMappingResponse -> Maybe SessionMappingDetail)
-> (GetStudioSessionMappingResponse
    -> Maybe SessionMappingDetail -> GetStudioSessionMappingResponse)
-> Lens
     GetStudioSessionMappingResponse
     GetStudioSessionMappingResponse
     (Maybe SessionMappingDetail)
     (Maybe SessionMappingDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStudioSessionMappingResponse' {Maybe SessionMappingDetail
sessionMapping :: Maybe SessionMappingDetail
$sel:sessionMapping:GetStudioSessionMappingResponse' :: GetStudioSessionMappingResponse -> Maybe SessionMappingDetail
sessionMapping} -> Maybe SessionMappingDetail
sessionMapping) (\s :: GetStudioSessionMappingResponse
s@GetStudioSessionMappingResponse' {} Maybe SessionMappingDetail
a -> GetStudioSessionMappingResponse
s {$sel:sessionMapping:GetStudioSessionMappingResponse' :: Maybe SessionMappingDetail
sessionMapping = Maybe SessionMappingDetail
a} :: GetStudioSessionMappingResponse)

-- | The response's http status code.
getStudioSessionMappingResponse_httpStatus :: Lens.Lens' GetStudioSessionMappingResponse Prelude.Int
getStudioSessionMappingResponse_httpStatus :: (Int -> f Int)
-> GetStudioSessionMappingResponse
-> f GetStudioSessionMappingResponse
getStudioSessionMappingResponse_httpStatus = (GetStudioSessionMappingResponse -> Int)
-> (GetStudioSessionMappingResponse
    -> Int -> GetStudioSessionMappingResponse)
-> Lens
     GetStudioSessionMappingResponse
     GetStudioSessionMappingResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetStudioSessionMappingResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetStudioSessionMappingResponse' :: GetStudioSessionMappingResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetStudioSessionMappingResponse
s@GetStudioSessionMappingResponse' {} Int
a -> GetStudioSessionMappingResponse
s {$sel:httpStatus:GetStudioSessionMappingResponse' :: Int
httpStatus = Int
a} :: GetStudioSessionMappingResponse)

instance
  Prelude.NFData
    GetStudioSessionMappingResponse