{-# 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.Nimble.ListEulaAcceptances
-- 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)
--
-- List Eula Acceptances.
--
-- This operation returns paginated results.
module Amazonka.Nimble.ListEulaAcceptances
  ( -- * Creating a Request
    ListEulaAcceptances (..),
    newListEulaAcceptances,

    -- * Request Lenses
    listEulaAcceptances_nextToken,
    listEulaAcceptances_eulaIds,
    listEulaAcceptances_studioId,

    -- * Destructuring the Response
    ListEulaAcceptancesResponse (..),
    newListEulaAcceptancesResponse,

    -- * Response Lenses
    listEulaAcceptancesResponse_nextToken,
    listEulaAcceptancesResponse_eulaAcceptances,
    listEulaAcceptancesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListEulaAcceptances' smart constructor.
data ListEulaAcceptances = ListEulaAcceptances'
  { -- | The token for the next set of results, or null if there are no more
    -- results.
    ListEulaAcceptances -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A collection of EULA IDs.
    ListEulaAcceptances -> Maybe [Text]
eulaIds :: Prelude.Maybe [Prelude.Text],
    -- | The studio ID.
    ListEulaAcceptances -> Text
studioId :: Prelude.Text
  }
  deriving (ListEulaAcceptances -> ListEulaAcceptances -> Bool
(ListEulaAcceptances -> ListEulaAcceptances -> Bool)
-> (ListEulaAcceptances -> ListEulaAcceptances -> Bool)
-> Eq ListEulaAcceptances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEulaAcceptances -> ListEulaAcceptances -> Bool
$c/= :: ListEulaAcceptances -> ListEulaAcceptances -> Bool
== :: ListEulaAcceptances -> ListEulaAcceptances -> Bool
$c== :: ListEulaAcceptances -> ListEulaAcceptances -> Bool
Prelude.Eq, ReadPrec [ListEulaAcceptances]
ReadPrec ListEulaAcceptances
Int -> ReadS ListEulaAcceptances
ReadS [ListEulaAcceptances]
(Int -> ReadS ListEulaAcceptances)
-> ReadS [ListEulaAcceptances]
-> ReadPrec ListEulaAcceptances
-> ReadPrec [ListEulaAcceptances]
-> Read ListEulaAcceptances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEulaAcceptances]
$creadListPrec :: ReadPrec [ListEulaAcceptances]
readPrec :: ReadPrec ListEulaAcceptances
$creadPrec :: ReadPrec ListEulaAcceptances
readList :: ReadS [ListEulaAcceptances]
$creadList :: ReadS [ListEulaAcceptances]
readsPrec :: Int -> ReadS ListEulaAcceptances
$creadsPrec :: Int -> ReadS ListEulaAcceptances
Prelude.Read, Int -> ListEulaAcceptances -> ShowS
[ListEulaAcceptances] -> ShowS
ListEulaAcceptances -> String
(Int -> ListEulaAcceptances -> ShowS)
-> (ListEulaAcceptances -> String)
-> ([ListEulaAcceptances] -> ShowS)
-> Show ListEulaAcceptances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEulaAcceptances] -> ShowS
$cshowList :: [ListEulaAcceptances] -> ShowS
show :: ListEulaAcceptances -> String
$cshow :: ListEulaAcceptances -> String
showsPrec :: Int -> ListEulaAcceptances -> ShowS
$cshowsPrec :: Int -> ListEulaAcceptances -> ShowS
Prelude.Show, (forall x. ListEulaAcceptances -> Rep ListEulaAcceptances x)
-> (forall x. Rep ListEulaAcceptances x -> ListEulaAcceptances)
-> Generic ListEulaAcceptances
forall x. Rep ListEulaAcceptances x -> ListEulaAcceptances
forall x. ListEulaAcceptances -> Rep ListEulaAcceptances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEulaAcceptances x -> ListEulaAcceptances
$cfrom :: forall x. ListEulaAcceptances -> Rep ListEulaAcceptances x
Prelude.Generic)

-- |
-- Create a value of 'ListEulaAcceptances' 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:
--
-- 'nextToken', 'listEulaAcceptances_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'eulaIds', 'listEulaAcceptances_eulaIds' - A collection of EULA IDs.
--
-- 'studioId', 'listEulaAcceptances_studioId' - The studio ID.
newListEulaAcceptances ::
  -- | 'studioId'
  Prelude.Text ->
  ListEulaAcceptances
newListEulaAcceptances :: Text -> ListEulaAcceptances
newListEulaAcceptances Text
pStudioId_ =
  ListEulaAcceptances' :: Maybe Text -> Maybe [Text] -> Text -> ListEulaAcceptances
ListEulaAcceptances'
    { $sel:nextToken:ListEulaAcceptances' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eulaIds:ListEulaAcceptances' :: Maybe [Text]
eulaIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:studioId:ListEulaAcceptances' :: Text
studioId = Text
pStudioId_
    }

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

-- | A collection of EULA IDs.
listEulaAcceptances_eulaIds :: Lens.Lens' ListEulaAcceptances (Prelude.Maybe [Prelude.Text])
listEulaAcceptances_eulaIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ListEulaAcceptances -> f ListEulaAcceptances
listEulaAcceptances_eulaIds = (ListEulaAcceptances -> Maybe [Text])
-> (ListEulaAcceptances -> Maybe [Text] -> ListEulaAcceptances)
-> Lens
     ListEulaAcceptances
     ListEulaAcceptances
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEulaAcceptances' {Maybe [Text]
eulaIds :: Maybe [Text]
$sel:eulaIds:ListEulaAcceptances' :: ListEulaAcceptances -> Maybe [Text]
eulaIds} -> Maybe [Text]
eulaIds) (\s :: ListEulaAcceptances
s@ListEulaAcceptances' {} Maybe [Text]
a -> ListEulaAcceptances
s {$sel:eulaIds:ListEulaAcceptances' :: Maybe [Text]
eulaIds = Maybe [Text]
a} :: ListEulaAcceptances) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListEulaAcceptances -> f ListEulaAcceptances)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListEulaAcceptances
-> f ListEulaAcceptances
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 studio ID.
listEulaAcceptances_studioId :: Lens.Lens' ListEulaAcceptances Prelude.Text
listEulaAcceptances_studioId :: (Text -> f Text) -> ListEulaAcceptances -> f ListEulaAcceptances
listEulaAcceptances_studioId = (ListEulaAcceptances -> Text)
-> (ListEulaAcceptances -> Text -> ListEulaAcceptances)
-> Lens ListEulaAcceptances ListEulaAcceptances Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEulaAcceptances' {Text
studioId :: Text
$sel:studioId:ListEulaAcceptances' :: ListEulaAcceptances -> Text
studioId} -> Text
studioId) (\s :: ListEulaAcceptances
s@ListEulaAcceptances' {} Text
a -> ListEulaAcceptances
s {$sel:studioId:ListEulaAcceptances' :: Text
studioId = Text
a} :: ListEulaAcceptances)

instance Core.AWSPager ListEulaAcceptances where
  page :: ListEulaAcceptances
-> AWSResponse ListEulaAcceptances -> Maybe ListEulaAcceptances
page ListEulaAcceptances
rq AWSResponse ListEulaAcceptances
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEulaAcceptances
ListEulaAcceptancesResponse
rs
            ListEulaAcceptancesResponse
-> Getting (First Text) ListEulaAcceptancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEulaAcceptancesResponse
-> Const (First Text) ListEulaAcceptancesResponse
Lens' ListEulaAcceptancesResponse (Maybe Text)
listEulaAcceptancesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListEulaAcceptancesResponse
 -> Const (First Text) ListEulaAcceptancesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEulaAcceptancesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListEulaAcceptances
forall a. Maybe a
Prelude.Nothing
    | Maybe [EulaAcceptance] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEulaAcceptances
ListEulaAcceptancesResponse
rs
            ListEulaAcceptancesResponse
-> Getting
     (First [EulaAcceptance])
     ListEulaAcceptancesResponse
     [EulaAcceptance]
-> Maybe [EulaAcceptance]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [EulaAcceptance]
 -> Const (First [EulaAcceptance]) (Maybe [EulaAcceptance]))
-> ListEulaAcceptancesResponse
-> Const (First [EulaAcceptance]) ListEulaAcceptancesResponse
Lens' ListEulaAcceptancesResponse (Maybe [EulaAcceptance])
listEulaAcceptancesResponse_eulaAcceptances
              ((Maybe [EulaAcceptance]
  -> Const (First [EulaAcceptance]) (Maybe [EulaAcceptance]))
 -> ListEulaAcceptancesResponse
 -> Const (First [EulaAcceptance]) ListEulaAcceptancesResponse)
-> (([EulaAcceptance]
     -> Const (First [EulaAcceptance]) [EulaAcceptance])
    -> Maybe [EulaAcceptance]
    -> Const (First [EulaAcceptance]) (Maybe [EulaAcceptance]))
-> Getting
     (First [EulaAcceptance])
     ListEulaAcceptancesResponse
     [EulaAcceptance]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EulaAcceptance]
 -> Const (First [EulaAcceptance]) [EulaAcceptance])
-> Maybe [EulaAcceptance]
-> Const (First [EulaAcceptance]) (Maybe [EulaAcceptance])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListEulaAcceptances
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListEulaAcceptances -> Maybe ListEulaAcceptances
forall a. a -> Maybe a
Prelude.Just (ListEulaAcceptances -> Maybe ListEulaAcceptances)
-> ListEulaAcceptances -> Maybe ListEulaAcceptances
forall a b. (a -> b) -> a -> b
Prelude.$
        ListEulaAcceptances
rq
          ListEulaAcceptances
-> (ListEulaAcceptances -> ListEulaAcceptances)
-> ListEulaAcceptances
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListEulaAcceptances -> Identity ListEulaAcceptances
Lens
  ListEulaAcceptances ListEulaAcceptances (Maybe Text) (Maybe Text)
listEulaAcceptances_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListEulaAcceptances -> Identity ListEulaAcceptances)
-> Maybe Text -> ListEulaAcceptances -> ListEulaAcceptances
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEulaAcceptances
ListEulaAcceptancesResponse
rs
          ListEulaAcceptancesResponse
-> Getting (First Text) ListEulaAcceptancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEulaAcceptancesResponse
-> Const (First Text) ListEulaAcceptancesResponse
Lens' ListEulaAcceptancesResponse (Maybe Text)
listEulaAcceptancesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListEulaAcceptancesResponse
 -> Const (First Text) ListEulaAcceptancesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEulaAcceptancesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListEulaAcceptances where
  type
    AWSResponse ListEulaAcceptances =
      ListEulaAcceptancesResponse
  request :: ListEulaAcceptances -> Request ListEulaAcceptances
request = Service -> ListEulaAcceptances -> Request ListEulaAcceptances
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListEulaAcceptances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEulaAcceptances)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListEulaAcceptances))
-> Logger
-> Service
-> Proxy ListEulaAcceptances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEulaAcceptances)))
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 Text
-> Maybe [EulaAcceptance] -> Int -> ListEulaAcceptancesResponse
ListEulaAcceptancesResponse'
            (Maybe Text
 -> Maybe [EulaAcceptance] -> Int -> ListEulaAcceptancesResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [EulaAcceptance] -> Int -> ListEulaAcceptancesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
            Either
  String
  (Maybe [EulaAcceptance] -> Int -> ListEulaAcceptancesResponse)
-> Either String (Maybe [EulaAcceptance])
-> Either String (Int -> ListEulaAcceptancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [EulaAcceptance]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"eulaAcceptances"
                            Either String (Maybe (Maybe [EulaAcceptance]))
-> Maybe [EulaAcceptance] -> Either String (Maybe [EulaAcceptance])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EulaAcceptance]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListEulaAcceptancesResponse)
-> Either String Int -> Either String ListEulaAcceptancesResponse
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 ListEulaAcceptances

instance Prelude.NFData ListEulaAcceptances

instance Core.ToHeaders ListEulaAcceptances where
  toHeaders :: ListEulaAcceptances -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListEulaAcceptances -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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.ToPath ListEulaAcceptances where
  toPath :: ListEulaAcceptances -> ByteString
toPath ListEulaAcceptances' {Maybe [Text]
Maybe Text
Text
studioId :: Text
eulaIds :: Maybe [Text]
nextToken :: Maybe Text
$sel:studioId:ListEulaAcceptances' :: ListEulaAcceptances -> Text
$sel:eulaIds:ListEulaAcceptances' :: ListEulaAcceptances -> Maybe [Text]
$sel:nextToken:ListEulaAcceptances' :: ListEulaAcceptances -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-08-01/studios/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
studioId,
        ByteString
"/eula-acceptances"
      ]

instance Core.ToQuery ListEulaAcceptances where
  toQuery :: ListEulaAcceptances -> QueryString
toQuery ListEulaAcceptances' {Maybe [Text]
Maybe Text
Text
studioId :: Text
eulaIds :: Maybe [Text]
nextToken :: Maybe Text
$sel:studioId:ListEulaAcceptances' :: ListEulaAcceptances -> Text
$sel:eulaIds:ListEulaAcceptances' :: ListEulaAcceptances -> Maybe [Text]
$sel:nextToken:ListEulaAcceptances' :: ListEulaAcceptances -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"eulaIds"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
eulaIds)
      ]

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

-- |
-- Create a value of 'ListEulaAcceptancesResponse' 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:
--
-- 'nextToken', 'listEulaAcceptancesResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'eulaAcceptances', 'listEulaAcceptancesResponse_eulaAcceptances' - A collection of EULA acceptances.
--
-- 'httpStatus', 'listEulaAcceptancesResponse_httpStatus' - The response's http status code.
newListEulaAcceptancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEulaAcceptancesResponse
newListEulaAcceptancesResponse :: Int -> ListEulaAcceptancesResponse
newListEulaAcceptancesResponse Int
pHttpStatus_ =
  ListEulaAcceptancesResponse' :: Maybe Text
-> Maybe [EulaAcceptance] -> Int -> ListEulaAcceptancesResponse
ListEulaAcceptancesResponse'
    { $sel:nextToken:ListEulaAcceptancesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eulaAcceptances:ListEulaAcceptancesResponse' :: Maybe [EulaAcceptance]
eulaAcceptances = Maybe [EulaAcceptance]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEulaAcceptancesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | A collection of EULA acceptances.
listEulaAcceptancesResponse_eulaAcceptances :: Lens.Lens' ListEulaAcceptancesResponse (Prelude.Maybe [EulaAcceptance])
listEulaAcceptancesResponse_eulaAcceptances :: (Maybe [EulaAcceptance] -> f (Maybe [EulaAcceptance]))
-> ListEulaAcceptancesResponse -> f ListEulaAcceptancesResponse
listEulaAcceptancesResponse_eulaAcceptances = (ListEulaAcceptancesResponse -> Maybe [EulaAcceptance])
-> (ListEulaAcceptancesResponse
    -> Maybe [EulaAcceptance] -> ListEulaAcceptancesResponse)
-> Lens' ListEulaAcceptancesResponse (Maybe [EulaAcceptance])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEulaAcceptancesResponse' {Maybe [EulaAcceptance]
eulaAcceptances :: Maybe [EulaAcceptance]
$sel:eulaAcceptances:ListEulaAcceptancesResponse' :: ListEulaAcceptancesResponse -> Maybe [EulaAcceptance]
eulaAcceptances} -> Maybe [EulaAcceptance]
eulaAcceptances) (\s :: ListEulaAcceptancesResponse
s@ListEulaAcceptancesResponse' {} Maybe [EulaAcceptance]
a -> ListEulaAcceptancesResponse
s {$sel:eulaAcceptances:ListEulaAcceptancesResponse' :: Maybe [EulaAcceptance]
eulaAcceptances = Maybe [EulaAcceptance]
a} :: ListEulaAcceptancesResponse) ((Maybe [EulaAcceptance] -> f (Maybe [EulaAcceptance]))
 -> ListEulaAcceptancesResponse -> f ListEulaAcceptancesResponse)
-> ((Maybe [EulaAcceptance] -> f (Maybe [EulaAcceptance]))
    -> Maybe [EulaAcceptance] -> f (Maybe [EulaAcceptance]))
-> (Maybe [EulaAcceptance] -> f (Maybe [EulaAcceptance]))
-> ListEulaAcceptancesResponse
-> f ListEulaAcceptancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EulaAcceptance] [EulaAcceptance] [EulaAcceptance] [EulaAcceptance]
-> Iso
     (Maybe [EulaAcceptance])
     (Maybe [EulaAcceptance])
     (Maybe [EulaAcceptance])
     (Maybe [EulaAcceptance])
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
  [EulaAcceptance] [EulaAcceptance] [EulaAcceptance] [EulaAcceptance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListEulaAcceptancesResponse