{-# 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.Personalize.ListCampaigns
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of campaigns that use the given solution. When a solution
-- is not specified, all the campaigns associated with the account are
-- listed. The response provides the properties for each campaign,
-- including the Amazon Resource Name (ARN). For more information on
-- campaigns, see
-- <https://docs.aws.amazon.com/personalize/latest/dg/API_CreateCampaign.html CreateCampaign>.
--
-- This operation returns paginated results.
module Amazonka.Personalize.ListCampaigns
  ( -- * Creating a Request
    ListCampaigns (..),
    newListCampaigns,

    -- * Request Lenses
    listCampaigns_maxResults,
    listCampaigns_nextToken,
    listCampaigns_solutionArn,

    -- * Destructuring the Response
    ListCampaignsResponse (..),
    newListCampaignsResponse,

    -- * Response Lenses
    listCampaignsResponse_campaigns,
    listCampaignsResponse_nextToken,
    listCampaignsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListCampaigns' smart constructor.
data ListCampaigns = ListCampaigns'
  { -- | The maximum number of campaigns to return.
    ListCampaigns -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A token returned from the previous call to
    -- <https://docs.aws.amazon.com/personalize/latest/dg/API_ListCampaigns.html ListCampaigns>
    -- for getting the next set of campaigns (if they exist).
    ListCampaigns -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the solution to list the campaigns
    -- for. When a solution is not specified, all the campaigns associated with
    -- the account are listed.
    ListCampaigns -> Maybe Text
solutionArn :: Prelude.Maybe Prelude.Text
  }
  deriving (ListCampaigns -> ListCampaigns -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCampaigns -> ListCampaigns -> Bool
$c/= :: ListCampaigns -> ListCampaigns -> Bool
== :: ListCampaigns -> ListCampaigns -> Bool
$c== :: ListCampaigns -> ListCampaigns -> Bool
Prelude.Eq, ReadPrec [ListCampaigns]
ReadPrec ListCampaigns
Int -> ReadS ListCampaigns
ReadS [ListCampaigns]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCampaigns]
$creadListPrec :: ReadPrec [ListCampaigns]
readPrec :: ReadPrec ListCampaigns
$creadPrec :: ReadPrec ListCampaigns
readList :: ReadS [ListCampaigns]
$creadList :: ReadS [ListCampaigns]
readsPrec :: Int -> ReadS ListCampaigns
$creadsPrec :: Int -> ReadS ListCampaigns
Prelude.Read, Int -> ListCampaigns -> ShowS
[ListCampaigns] -> ShowS
ListCampaigns -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCampaigns] -> ShowS
$cshowList :: [ListCampaigns] -> ShowS
show :: ListCampaigns -> String
$cshow :: ListCampaigns -> String
showsPrec :: Int -> ListCampaigns -> ShowS
$cshowsPrec :: Int -> ListCampaigns -> ShowS
Prelude.Show, forall x. Rep ListCampaigns x -> ListCampaigns
forall x. ListCampaigns -> Rep ListCampaigns x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCampaigns x -> ListCampaigns
$cfrom :: forall x. ListCampaigns -> Rep ListCampaigns x
Prelude.Generic)

-- |
-- Create a value of 'ListCampaigns' 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', 'listCampaigns_maxResults' - The maximum number of campaigns to return.
--
-- 'nextToken', 'listCampaigns_nextToken' - A token returned from the previous call to
-- <https://docs.aws.amazon.com/personalize/latest/dg/API_ListCampaigns.html ListCampaigns>
-- for getting the next set of campaigns (if they exist).
--
-- 'solutionArn', 'listCampaigns_solutionArn' - The Amazon Resource Name (ARN) of the solution to list the campaigns
-- for. When a solution is not specified, all the campaigns associated with
-- the account are listed.
newListCampaigns ::
  ListCampaigns
newListCampaigns :: ListCampaigns
newListCampaigns =
  ListCampaigns'
    { $sel:maxResults:ListCampaigns' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCampaigns' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:solutionArn:ListCampaigns' :: Maybe Text
solutionArn = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of campaigns to return.
listCampaigns_maxResults :: Lens.Lens' ListCampaigns (Prelude.Maybe Prelude.Natural)
listCampaigns_maxResults :: Lens' ListCampaigns (Maybe Natural)
listCampaigns_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCampaigns' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListCampaigns' :: ListCampaigns -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListCampaigns
s@ListCampaigns' {} Maybe Natural
a -> ListCampaigns
s {$sel:maxResults:ListCampaigns' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListCampaigns)

-- | A token returned from the previous call to
-- <https://docs.aws.amazon.com/personalize/latest/dg/API_ListCampaigns.html ListCampaigns>
-- for getting the next set of campaigns (if they exist).
listCampaigns_nextToken :: Lens.Lens' ListCampaigns (Prelude.Maybe Prelude.Text)
listCampaigns_nextToken :: Lens' ListCampaigns (Maybe Text)
listCampaigns_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCampaigns' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCampaigns' :: ListCampaigns -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCampaigns
s@ListCampaigns' {} Maybe Text
a -> ListCampaigns
s {$sel:nextToken:ListCampaigns' :: Maybe Text
nextToken = Maybe Text
a} :: ListCampaigns)

-- | The Amazon Resource Name (ARN) of the solution to list the campaigns
-- for. When a solution is not specified, all the campaigns associated with
-- the account are listed.
listCampaigns_solutionArn :: Lens.Lens' ListCampaigns (Prelude.Maybe Prelude.Text)
listCampaigns_solutionArn :: Lens' ListCampaigns (Maybe Text)
listCampaigns_solutionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCampaigns' {Maybe Text
solutionArn :: Maybe Text
$sel:solutionArn:ListCampaigns' :: ListCampaigns -> Maybe Text
solutionArn} -> Maybe Text
solutionArn) (\s :: ListCampaigns
s@ListCampaigns' {} Maybe Text
a -> ListCampaigns
s {$sel:solutionArn:ListCampaigns' :: Maybe Text
solutionArn = Maybe Text
a} :: ListCampaigns)

instance Core.AWSPager ListCampaigns where
  page :: ListCampaigns -> AWSResponse ListCampaigns -> Maybe ListCampaigns
page ListCampaigns
rq AWSResponse ListCampaigns
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListCampaigns
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCampaignsResponse (Maybe Text)
listCampaignsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListCampaigns
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCampaignsResponse (Maybe [CampaignSummary])
listCampaignsResponse_campaigns
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListCampaigns
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListCampaigns (Maybe Text)
listCampaigns_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListCampaigns
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListCampaignsResponse (Maybe Text)
listCampaignsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListCampaigns where
  type
    AWSResponse ListCampaigns =
      ListCampaignsResponse
  request :: (Service -> Service) -> ListCampaigns -> Request ListCampaigns
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 ListCampaigns
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListCampaigns)))
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 [CampaignSummary]
-> Maybe Text -> Int -> ListCampaignsResponse
ListCampaignsResponse'
            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
"campaigns" 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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListCampaigns where
  hashWithSalt :: Int -> ListCampaigns -> Int
hashWithSalt Int
_salt ListCampaigns' {Maybe Natural
Maybe Text
solutionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:solutionArn:ListCampaigns' :: ListCampaigns -> Maybe Text
$sel:nextToken:ListCampaigns' :: ListCampaigns -> Maybe Text
$sel:maxResults:ListCampaigns' :: ListCampaigns -> 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
solutionArn

instance Prelude.NFData ListCampaigns where
  rnf :: ListCampaigns -> ()
rnf ListCampaigns' {Maybe Natural
Maybe Text
solutionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:solutionArn:ListCampaigns' :: ListCampaigns -> Maybe Text
$sel:nextToken:ListCampaigns' :: ListCampaigns -> Maybe Text
$sel:maxResults:ListCampaigns' :: ListCampaigns -> 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
solutionArn

instance Data.ToHeaders ListCampaigns where
  toHeaders :: ListCampaigns -> 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
"AmazonPersonalize.ListCampaigns" ::
                          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 ListCampaigns where
  toJSON :: ListCampaigns -> Value
toJSON ListCampaigns' {Maybe Natural
Maybe Text
solutionArn :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:solutionArn:ListCampaigns' :: ListCampaigns -> Maybe Text
$sel:nextToken:ListCampaigns' :: ListCampaigns -> Maybe Text
$sel:maxResults:ListCampaigns' :: ListCampaigns -> 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
"solutionArn" 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
solutionArn
          ]
      )

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

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

-- | /See:/ 'newListCampaignsResponse' smart constructor.
data ListCampaignsResponse = ListCampaignsResponse'
  { -- | A list of the campaigns.
    ListCampaignsResponse -> Maybe [CampaignSummary]
campaigns :: Prelude.Maybe [CampaignSummary],
    -- | A token for getting the next set of campaigns (if they exist).
    ListCampaignsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListCampaignsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListCampaignsResponse -> ListCampaignsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListCampaignsResponse -> ListCampaignsResponse -> Bool
$c/= :: ListCampaignsResponse -> ListCampaignsResponse -> Bool
== :: ListCampaignsResponse -> ListCampaignsResponse -> Bool
$c== :: ListCampaignsResponse -> ListCampaignsResponse -> Bool
Prelude.Eq, ReadPrec [ListCampaignsResponse]
ReadPrec ListCampaignsResponse
Int -> ReadS ListCampaignsResponse
ReadS [ListCampaignsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListCampaignsResponse]
$creadListPrec :: ReadPrec [ListCampaignsResponse]
readPrec :: ReadPrec ListCampaignsResponse
$creadPrec :: ReadPrec ListCampaignsResponse
readList :: ReadS [ListCampaignsResponse]
$creadList :: ReadS [ListCampaignsResponse]
readsPrec :: Int -> ReadS ListCampaignsResponse
$creadsPrec :: Int -> ReadS ListCampaignsResponse
Prelude.Read, Int -> ListCampaignsResponse -> ShowS
[ListCampaignsResponse] -> ShowS
ListCampaignsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListCampaignsResponse] -> ShowS
$cshowList :: [ListCampaignsResponse] -> ShowS
show :: ListCampaignsResponse -> String
$cshow :: ListCampaignsResponse -> String
showsPrec :: Int -> ListCampaignsResponse -> ShowS
$cshowsPrec :: Int -> ListCampaignsResponse -> ShowS
Prelude.Show, forall x. Rep ListCampaignsResponse x -> ListCampaignsResponse
forall x. ListCampaignsResponse -> Rep ListCampaignsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListCampaignsResponse x -> ListCampaignsResponse
$cfrom :: forall x. ListCampaignsResponse -> Rep ListCampaignsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListCampaignsResponse' 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:
--
-- 'campaigns', 'listCampaignsResponse_campaigns' - A list of the campaigns.
--
-- 'nextToken', 'listCampaignsResponse_nextToken' - A token for getting the next set of campaigns (if they exist).
--
-- 'httpStatus', 'listCampaignsResponse_httpStatus' - The response's http status code.
newListCampaignsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCampaignsResponse
newListCampaignsResponse :: Int -> ListCampaignsResponse
newListCampaignsResponse Int
pHttpStatus_ =
  ListCampaignsResponse'
    { $sel:campaigns:ListCampaignsResponse' :: Maybe [CampaignSummary]
campaigns = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListCampaignsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListCampaignsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of the campaigns.
listCampaignsResponse_campaigns :: Lens.Lens' ListCampaignsResponse (Prelude.Maybe [CampaignSummary])
listCampaignsResponse_campaigns :: Lens' ListCampaignsResponse (Maybe [CampaignSummary])
listCampaignsResponse_campaigns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCampaignsResponse' {Maybe [CampaignSummary]
campaigns :: Maybe [CampaignSummary]
$sel:campaigns:ListCampaignsResponse' :: ListCampaignsResponse -> Maybe [CampaignSummary]
campaigns} -> Maybe [CampaignSummary]
campaigns) (\s :: ListCampaignsResponse
s@ListCampaignsResponse' {} Maybe [CampaignSummary]
a -> ListCampaignsResponse
s {$sel:campaigns:ListCampaignsResponse' :: Maybe [CampaignSummary]
campaigns = Maybe [CampaignSummary]
a} :: ListCampaignsResponse) 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

-- | A token for getting the next set of campaigns (if they exist).
listCampaignsResponse_nextToken :: Lens.Lens' ListCampaignsResponse (Prelude.Maybe Prelude.Text)
listCampaignsResponse_nextToken :: Lens' ListCampaignsResponse (Maybe Text)
listCampaignsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCampaignsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListCampaignsResponse' :: ListCampaignsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListCampaignsResponse
s@ListCampaignsResponse' {} Maybe Text
a -> ListCampaignsResponse
s {$sel:nextToken:ListCampaignsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListCampaignsResponse)

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

instance Prelude.NFData ListCampaignsResponse where
  rnf :: ListCampaignsResponse -> ()
rnf ListCampaignsResponse' {Int
Maybe [CampaignSummary]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
campaigns :: Maybe [CampaignSummary]
$sel:httpStatus:ListCampaignsResponse' :: ListCampaignsResponse -> Int
$sel:nextToken:ListCampaignsResponse' :: ListCampaignsResponse -> Maybe Text
$sel:campaigns:ListCampaignsResponse' :: ListCampaignsResponse -> Maybe [CampaignSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [CampaignSummary]
campaigns
      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 Int
httpStatus