{-# 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.IoTFleetWise.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)
--
-- Lists information about created campaigns.
--
-- This API operation uses pagination. Specify the @nextToken@ parameter in
-- the request to return more results.
--
-- This operation returns paginated results.
module Amazonka.IoTFleetWise.ListCampaigns
  ( -- * Creating a Request
    ListCampaigns (..),
    newListCampaigns,

    -- * Request Lenses
    listCampaigns_maxResults,
    listCampaigns_nextToken,
    listCampaigns_status,

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

    -- * Response Lenses
    listCampaignsResponse_campaignSummaries,
    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.IoTFleetWise.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 items to return, between 1 and 100, inclusive.
    ListCampaigns -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A pagination token for the next set of results.
    --
    -- If the results of a search are large, only a portion of the results are
    -- returned, and a @nextToken@ pagination token is returned in the
    -- response. To retrieve the next set of results, reissue the search
    -- request and include the returned token. When all results have been
    -- returned, the response does not contain a pagination token value.
    ListCampaigns -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Optional parameter to filter the results by the status of each created
    -- campaign in your account. The status can be one of: @CREATING@,
    -- @WAITING_FOR_APPROVAL@, @RUNNING@, or @SUSPENDED@.
    ListCampaigns -> Maybe Text
status :: 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 items to return, between 1 and 100, inclusive.
--
-- 'nextToken', 'listCampaigns_nextToken' - A pagination token for the next set of results.
--
-- If the results of a search are large, only a portion of the results are
-- returned, and a @nextToken@ pagination token is returned in the
-- response. To retrieve the next set of results, reissue the search
-- request and include the returned token. When all results have been
-- returned, the response does not contain a pagination token value.
--
-- 'status', 'listCampaigns_status' - Optional parameter to filter the results by the status of each created
-- campaign in your account. The status can be one of: @CREATING@,
-- @WAITING_FOR_APPROVAL@, @RUNNING@, or @SUSPENDED@.
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:status:ListCampaigns' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of items to return, between 1 and 100, inclusive.
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 pagination token for the next set of results.
--
-- If the results of a search are large, only a portion of the results are
-- returned, and a @nextToken@ pagination token is returned in the
-- response. To retrieve the next set of results, reissue the search
-- request and include the returned token. When all results have been
-- returned, the response does not contain a pagination token value.
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)

-- | Optional parameter to filter the results by the status of each created
-- campaign in your account. The status can be one of: @CREATING@,
-- @WAITING_FOR_APPROVAL@, @RUNNING@, or @SUSPENDED@.
listCampaigns_status :: Lens.Lens' ListCampaigns (Prelude.Maybe Prelude.Text)
listCampaigns_status :: Lens' ListCampaigns (Maybe Text)
listCampaigns_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCampaigns' {Maybe Text
status :: Maybe Text
$sel:status:ListCampaigns' :: ListCampaigns -> Maybe Text
status} -> Maybe Text
status) (\s :: ListCampaigns
s@ListCampaigns' {} Maybe Text
a -> ListCampaigns
s {$sel:status:ListCampaigns' :: Maybe Text
status = 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_campaignSummaries
            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
"campaignSummaries"
                            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
status :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:status: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
status

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

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
"IoTAutobahnControlPlane.ListCampaigns" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

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

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 summary of information about each campaign.
    ListCampaignsResponse -> Maybe [CampaignSummary]
campaignSummaries :: Prelude.Maybe [CampaignSummary],
    -- | The token to retrieve the next set of results, or @null@ if there are no
    -- more results.
    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:
--
-- 'campaignSummaries', 'listCampaignsResponse_campaignSummaries' - A summary of information about each campaign.
--
-- 'nextToken', 'listCampaignsResponse_nextToken' - The token to retrieve the next set of results, or @null@ if there are no
-- more results.
--
-- 'httpStatus', 'listCampaignsResponse_httpStatus' - The response's http status code.
newListCampaignsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListCampaignsResponse
newListCampaignsResponse :: Int -> ListCampaignsResponse
newListCampaignsResponse Int
pHttpStatus_ =
  ListCampaignsResponse'
    { $sel:campaignSummaries:ListCampaignsResponse' :: Maybe [CampaignSummary]
campaignSummaries =
        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 summary of information about each campaign.
listCampaignsResponse_campaignSummaries :: Lens.Lens' ListCampaignsResponse (Prelude.Maybe [CampaignSummary])
listCampaignsResponse_campaignSummaries :: Lens' ListCampaignsResponse (Maybe [CampaignSummary])
listCampaignsResponse_campaignSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListCampaignsResponse' {Maybe [CampaignSummary]
campaignSummaries :: Maybe [CampaignSummary]
$sel:campaignSummaries:ListCampaignsResponse' :: ListCampaignsResponse -> Maybe [CampaignSummary]
campaignSummaries} -> Maybe [CampaignSummary]
campaignSummaries) (\s :: ListCampaignsResponse
s@ListCampaignsResponse' {} Maybe [CampaignSummary]
a -> ListCampaignsResponse
s {$sel:campaignSummaries:ListCampaignsResponse' :: Maybe [CampaignSummary]
campaignSummaries = 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

-- | The token to retrieve the next set of results, or @null@ if there are no
-- more results.
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
campaignSummaries :: Maybe [CampaignSummary]
$sel:httpStatus:ListCampaignsResponse' :: ListCampaignsResponse -> Int
$sel:nextToken:ListCampaignsResponse' :: ListCampaignsResponse -> Maybe Text
$sel:campaignSummaries:ListCampaignsResponse' :: ListCampaignsResponse -> Maybe [CampaignSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [CampaignSummary]
campaignSummaries
      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