{-# 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.Glue.ListSessions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieve a list of sessions.
module Amazonka.Glue.ListSessions
  ( -- * Creating a Request
    ListSessions (..),
    newListSessions,

    -- * Request Lenses
    listSessions_maxResults,
    listSessions_nextToken,
    listSessions_requestOrigin,
    listSessions_tags,

    -- * Destructuring the Response
    ListSessionsResponse (..),
    newListSessionsResponse,

    -- * Response Lenses
    listSessionsResponse_ids,
    listSessionsResponse_nextToken,
    listSessionsResponse_sessions,
    listSessionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListSessions' smart constructor.
data ListSessions = ListSessions'
  { -- | The maximum number of results.
    ListSessions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results, or null if there are no more
    -- result.
    ListSessions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The origin of the request.
    ListSessions -> Maybe Text
requestOrigin :: Prelude.Maybe Prelude.Text,
    -- | Tags belonging to the session.
    ListSessions -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (ListSessions -> ListSessions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSessions -> ListSessions -> Bool
$c/= :: ListSessions -> ListSessions -> Bool
== :: ListSessions -> ListSessions -> Bool
$c== :: ListSessions -> ListSessions -> Bool
Prelude.Eq, ReadPrec [ListSessions]
ReadPrec ListSessions
Int -> ReadS ListSessions
ReadS [ListSessions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSessions]
$creadListPrec :: ReadPrec [ListSessions]
readPrec :: ReadPrec ListSessions
$creadPrec :: ReadPrec ListSessions
readList :: ReadS [ListSessions]
$creadList :: ReadS [ListSessions]
readsPrec :: Int -> ReadS ListSessions
$creadsPrec :: Int -> ReadS ListSessions
Prelude.Read, Int -> ListSessions -> ShowS
[ListSessions] -> ShowS
ListSessions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSessions] -> ShowS
$cshowList :: [ListSessions] -> ShowS
show :: ListSessions -> String
$cshow :: ListSessions -> String
showsPrec :: Int -> ListSessions -> ShowS
$cshowsPrec :: Int -> ListSessions -> ShowS
Prelude.Show, forall x. Rep ListSessions x -> ListSessions
forall x. ListSessions -> Rep ListSessions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSessions x -> ListSessions
$cfrom :: forall x. ListSessions -> Rep ListSessions x
Prelude.Generic)

-- |
-- Create a value of 'ListSessions' 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:
--
-- 'maxResults', 'listSessions_maxResults' - The maximum number of results.
--
-- 'nextToken', 'listSessions_nextToken' - The token for the next set of results, or null if there are no more
-- result.
--
-- 'requestOrigin', 'listSessions_requestOrigin' - The origin of the request.
--
-- 'tags', 'listSessions_tags' - Tags belonging to the session.
newListSessions ::
  ListSessions
newListSessions :: ListSessions
newListSessions =
  ListSessions'
    { $sel:maxResults:ListSessions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSessions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:requestOrigin:ListSessions' :: Maybe Text
requestOrigin = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ListSessions' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of results.
listSessions_maxResults :: Lens.Lens' ListSessions (Prelude.Maybe Prelude.Natural)
listSessions_maxResults :: Lens' ListSessions (Maybe Natural)
listSessions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSessions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListSessions' :: ListSessions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListSessions
s@ListSessions' {} Maybe Natural
a -> ListSessions
s {$sel:maxResults:ListSessions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListSessions)

-- | The token for the next set of results, or null if there are no more
-- result.
listSessions_nextToken :: Lens.Lens' ListSessions (Prelude.Maybe Prelude.Text)
listSessions_nextToken :: Lens' ListSessions (Maybe Text)
listSessions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSessions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSessions' :: ListSessions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSessions
s@ListSessions' {} Maybe Text
a -> ListSessions
s {$sel:nextToken:ListSessions' :: Maybe Text
nextToken = Maybe Text
a} :: ListSessions)

-- | The origin of the request.
listSessions_requestOrigin :: Lens.Lens' ListSessions (Prelude.Maybe Prelude.Text)
listSessions_requestOrigin :: Lens' ListSessions (Maybe Text)
listSessions_requestOrigin = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSessions' {Maybe Text
requestOrigin :: Maybe Text
$sel:requestOrigin:ListSessions' :: ListSessions -> Maybe Text
requestOrigin} -> Maybe Text
requestOrigin) (\s :: ListSessions
s@ListSessions' {} Maybe Text
a -> ListSessions
s {$sel:requestOrigin:ListSessions' :: Maybe Text
requestOrigin = Maybe Text
a} :: ListSessions)

-- | Tags belonging to the session.
listSessions_tags :: Lens.Lens' ListSessions (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
listSessions_tags :: Lens' ListSessions (Maybe (HashMap Text Text))
listSessions_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSessions' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ListSessions' :: ListSessions -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ListSessions
s@ListSessions' {} Maybe (HashMap Text Text)
a -> ListSessions
s {$sel:tags:ListSessions' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ListSessions) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest ListSessions where
  type AWSResponse ListSessions = ListSessionsResponse
  request :: (Service -> Service) -> ListSessions -> Request ListSessions
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListSessions
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListSessions)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Text]
-> Maybe Text -> Maybe [Session] -> Int -> ListSessionsResponse
ListSessionsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Ids" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Sessions" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListSessions where
  hashWithSalt :: Int -> ListSessions -> Int
hashWithSalt Int
_salt ListSessions' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
requestOrigin :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:tags:ListSessions' :: ListSessions -> Maybe (HashMap Text Text)
$sel:requestOrigin:ListSessions' :: ListSessions -> Maybe Text
$sel:nextToken:ListSessions' :: ListSessions -> Maybe Text
$sel:maxResults:ListSessions' :: ListSessions -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
requestOrigin
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags

instance Prelude.NFData ListSessions where
  rnf :: ListSessions -> ()
rnf ListSessions' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
requestOrigin :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:tags:ListSessions' :: ListSessions -> Maybe (HashMap Text Text)
$sel:requestOrigin:ListSessions' :: ListSessions -> Maybe Text
$sel:nextToken:ListSessions' :: ListSessions -> Maybe Text
$sel:maxResults:ListSessions' :: ListSessions -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestOrigin
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags

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

instance Data.ToJSON ListSessions where
  toJSON :: ListSessions -> Value
toJSON ListSessions' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
requestOrigin :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:tags:ListSessions' :: ListSessions -> Maybe (HashMap Text Text)
$sel:requestOrigin:ListSessions' :: ListSessions -> Maybe Text
$sel:nextToken:ListSessions' :: ListSessions -> Maybe Text
$sel:maxResults:ListSessions' :: ListSessions -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"RequestOrigin" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
requestOrigin,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
          ]
      )

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

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

-- | /See:/ 'newListSessionsResponse' smart constructor.
data ListSessionsResponse = ListSessionsResponse'
  { -- | Returns the ID of the session.
    ListSessionsResponse -> Maybe [Text]
ids :: Prelude.Maybe [Prelude.Text],
    -- | The token for the next set of results, or null if there are no more
    -- result.
    ListSessionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Returns the session object.
    ListSessionsResponse -> Maybe [Session]
sessions :: Prelude.Maybe [Session],
    -- | The response's http status code.
    ListSessionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSessionsResponse -> ListSessionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSessionsResponse -> ListSessionsResponse -> Bool
$c/= :: ListSessionsResponse -> ListSessionsResponse -> Bool
== :: ListSessionsResponse -> ListSessionsResponse -> Bool
$c== :: ListSessionsResponse -> ListSessionsResponse -> Bool
Prelude.Eq, ReadPrec [ListSessionsResponse]
ReadPrec ListSessionsResponse
Int -> ReadS ListSessionsResponse
ReadS [ListSessionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSessionsResponse]
$creadListPrec :: ReadPrec [ListSessionsResponse]
readPrec :: ReadPrec ListSessionsResponse
$creadPrec :: ReadPrec ListSessionsResponse
readList :: ReadS [ListSessionsResponse]
$creadList :: ReadS [ListSessionsResponse]
readsPrec :: Int -> ReadS ListSessionsResponse
$creadsPrec :: Int -> ReadS ListSessionsResponse
Prelude.Read, Int -> ListSessionsResponse -> ShowS
[ListSessionsResponse] -> ShowS
ListSessionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSessionsResponse] -> ShowS
$cshowList :: [ListSessionsResponse] -> ShowS
show :: ListSessionsResponse -> String
$cshow :: ListSessionsResponse -> String
showsPrec :: Int -> ListSessionsResponse -> ShowS
$cshowsPrec :: Int -> ListSessionsResponse -> ShowS
Prelude.Show, forall x. Rep ListSessionsResponse x -> ListSessionsResponse
forall x. ListSessionsResponse -> Rep ListSessionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSessionsResponse x -> ListSessionsResponse
$cfrom :: forall x. ListSessionsResponse -> Rep ListSessionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSessionsResponse' 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:
--
-- 'ids', 'listSessionsResponse_ids' - Returns the ID of the session.
--
-- 'nextToken', 'listSessionsResponse_nextToken' - The token for the next set of results, or null if there are no more
-- result.
--
-- 'sessions', 'listSessionsResponse_sessions' - Returns the session object.
--
-- 'httpStatus', 'listSessionsResponse_httpStatus' - The response's http status code.
newListSessionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSessionsResponse
newListSessionsResponse :: Int -> ListSessionsResponse
newListSessionsResponse Int
pHttpStatus_ =
  ListSessionsResponse'
    { $sel:ids:ListSessionsResponse' :: Maybe [Text]
ids = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSessionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sessions:ListSessionsResponse' :: Maybe [Session]
sessions = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSessionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Returns the ID of the session.
listSessionsResponse_ids :: Lens.Lens' ListSessionsResponse (Prelude.Maybe [Prelude.Text])
listSessionsResponse_ids :: Lens' ListSessionsResponse (Maybe [Text])
listSessionsResponse_ids = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSessionsResponse' {Maybe [Text]
ids :: Maybe [Text]
$sel:ids:ListSessionsResponse' :: ListSessionsResponse -> Maybe [Text]
ids} -> Maybe [Text]
ids) (\s :: ListSessionsResponse
s@ListSessionsResponse' {} Maybe [Text]
a -> ListSessionsResponse
s {$sel:ids:ListSessionsResponse' :: Maybe [Text]
ids = Maybe [Text]
a} :: ListSessionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token for the next set of results, or null if there are no more
-- result.
listSessionsResponse_nextToken :: Lens.Lens' ListSessionsResponse (Prelude.Maybe Prelude.Text)
listSessionsResponse_nextToken :: Lens' ListSessionsResponse (Maybe Text)
listSessionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSessionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSessionsResponse' :: ListSessionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSessionsResponse
s@ListSessionsResponse' {} Maybe Text
a -> ListSessionsResponse
s {$sel:nextToken:ListSessionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSessionsResponse)

-- | Returns the session object.
listSessionsResponse_sessions :: Lens.Lens' ListSessionsResponse (Prelude.Maybe [Session])
listSessionsResponse_sessions :: Lens' ListSessionsResponse (Maybe [Session])
listSessionsResponse_sessions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSessionsResponse' {Maybe [Session]
sessions :: Maybe [Session]
$sel:sessions:ListSessionsResponse' :: ListSessionsResponse -> Maybe [Session]
sessions} -> Maybe [Session]
sessions) (\s :: ListSessionsResponse
s@ListSessionsResponse' {} Maybe [Session]
a -> ListSessionsResponse
s {$sel:sessions:ListSessionsResponse' :: Maybe [Session]
sessions = Maybe [Session]
a} :: ListSessionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListSessionsResponse where
  rnf :: ListSessionsResponse -> ()
rnf ListSessionsResponse' {Int
Maybe [Text]
Maybe [Session]
Maybe Text
httpStatus :: Int
sessions :: Maybe [Session]
nextToken :: Maybe Text
ids :: Maybe [Text]
$sel:httpStatus:ListSessionsResponse' :: ListSessionsResponse -> Int
$sel:sessions:ListSessionsResponse' :: ListSessionsResponse -> Maybe [Session]
$sel:nextToken:ListSessionsResponse' :: ListSessionsResponse -> Maybe Text
$sel:ids:ListSessionsResponse' :: ListSessionsResponse -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
ids
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Session]
sessions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus