{-# 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.Outposts.ListOutposts
-- 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 the Outposts for your Amazon Web Services account.
--
-- Use filters to return specific results. If you specify multiple filters,
-- the results include only the resources that match all of the specified
-- filters. For a filter where you can specify multiple values, the results
-- include items that match any of the values that you specify for the
-- filter.
module Amazonka.Outposts.ListOutposts
  ( -- * Creating a Request
    ListOutposts (..),
    newListOutposts,

    -- * Request Lenses
    listOutposts_availabilityZoneFilter,
    listOutposts_availabilityZoneIdFilter,
    listOutposts_lifeCycleStatusFilter,
    listOutposts_maxResults,
    listOutposts_nextToken,

    -- * Destructuring the Response
    ListOutpostsResponse (..),
    newListOutpostsResponse,

    -- * Response Lenses
    listOutpostsResponse_nextToken,
    listOutpostsResponse_outposts,
    listOutpostsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListOutposts' smart constructor.
data ListOutposts = ListOutposts'
  { -- | Filters the results by Availability Zone (for example, @us-east-1a@).
    ListOutposts -> Maybe (NonEmpty Text)
availabilityZoneFilter :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Filters the results by AZ ID (for example, @use1-az1@).
    ListOutposts -> Maybe (NonEmpty Text)
availabilityZoneIdFilter :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Filters the results by the lifecycle status.
    ListOutposts -> Maybe (NonEmpty Text)
lifeCycleStatusFilter :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    ListOutposts -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    ListOutposts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListOutposts -> ListOutposts -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListOutposts -> ListOutposts -> Bool
$c/= :: ListOutposts -> ListOutposts -> Bool
== :: ListOutposts -> ListOutposts -> Bool
$c== :: ListOutposts -> ListOutposts -> Bool
Prelude.Eq, ReadPrec [ListOutposts]
ReadPrec ListOutposts
Int -> ReadS ListOutposts
ReadS [ListOutposts]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListOutposts]
$creadListPrec :: ReadPrec [ListOutposts]
readPrec :: ReadPrec ListOutposts
$creadPrec :: ReadPrec ListOutposts
readList :: ReadS [ListOutposts]
$creadList :: ReadS [ListOutposts]
readsPrec :: Int -> ReadS ListOutposts
$creadsPrec :: Int -> ReadS ListOutposts
Prelude.Read, Int -> ListOutposts -> ShowS
[ListOutposts] -> ShowS
ListOutposts -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListOutposts] -> ShowS
$cshowList :: [ListOutposts] -> ShowS
show :: ListOutposts -> String
$cshow :: ListOutposts -> String
showsPrec :: Int -> ListOutposts -> ShowS
$cshowsPrec :: Int -> ListOutposts -> ShowS
Prelude.Show, forall x. Rep ListOutposts x -> ListOutposts
forall x. ListOutposts -> Rep ListOutposts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListOutposts x -> ListOutposts
$cfrom :: forall x. ListOutposts -> Rep ListOutposts x
Prelude.Generic)

-- |
-- Create a value of 'ListOutposts' 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:
--
-- 'availabilityZoneFilter', 'listOutposts_availabilityZoneFilter' - Filters the results by Availability Zone (for example, @us-east-1a@).
--
-- 'availabilityZoneIdFilter', 'listOutposts_availabilityZoneIdFilter' - Filters the results by AZ ID (for example, @use1-az1@).
--
-- 'lifeCycleStatusFilter', 'listOutposts_lifeCycleStatusFilter' - Filters the results by the lifecycle status.
--
-- 'maxResults', 'listOutposts_maxResults' - Undocumented member.
--
-- 'nextToken', 'listOutposts_nextToken' - Undocumented member.
newListOutposts ::
  ListOutposts
newListOutposts :: ListOutposts
newListOutposts =
  ListOutposts'
    { $sel:availabilityZoneFilter:ListOutposts' :: Maybe (NonEmpty Text)
availabilityZoneFilter =
        forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZoneIdFilter:ListOutposts' :: Maybe (NonEmpty Text)
availabilityZoneIdFilter = forall a. Maybe a
Prelude.Nothing,
      $sel:lifeCycleStatusFilter:ListOutposts' :: Maybe (NonEmpty Text)
lifeCycleStatusFilter = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListOutposts' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListOutposts' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Filters the results by Availability Zone (for example, @us-east-1a@).
listOutposts_availabilityZoneFilter :: Lens.Lens' ListOutposts (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listOutposts_availabilityZoneFilter :: Lens' ListOutposts (Maybe (NonEmpty Text))
listOutposts_availabilityZoneFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutposts' {Maybe (NonEmpty Text)
availabilityZoneFilter :: Maybe (NonEmpty Text)
$sel:availabilityZoneFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
availabilityZoneFilter} -> Maybe (NonEmpty Text)
availabilityZoneFilter) (\s :: ListOutposts
s@ListOutposts' {} Maybe (NonEmpty Text)
a -> ListOutposts
s {$sel:availabilityZoneFilter:ListOutposts' :: Maybe (NonEmpty Text)
availabilityZoneFilter = Maybe (NonEmpty Text)
a} :: ListOutposts) 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

-- | Filters the results by AZ ID (for example, @use1-az1@).
listOutposts_availabilityZoneIdFilter :: Lens.Lens' ListOutposts (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listOutposts_availabilityZoneIdFilter :: Lens' ListOutposts (Maybe (NonEmpty Text))
listOutposts_availabilityZoneIdFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutposts' {Maybe (NonEmpty Text)
availabilityZoneIdFilter :: Maybe (NonEmpty Text)
$sel:availabilityZoneIdFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
availabilityZoneIdFilter} -> Maybe (NonEmpty Text)
availabilityZoneIdFilter) (\s :: ListOutposts
s@ListOutposts' {} Maybe (NonEmpty Text)
a -> ListOutposts
s {$sel:availabilityZoneIdFilter:ListOutposts' :: Maybe (NonEmpty Text)
availabilityZoneIdFilter = Maybe (NonEmpty Text)
a} :: ListOutposts) 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

-- | Filters the results by the lifecycle status.
listOutposts_lifeCycleStatusFilter :: Lens.Lens' ListOutposts (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listOutposts_lifeCycleStatusFilter :: Lens' ListOutposts (Maybe (NonEmpty Text))
listOutposts_lifeCycleStatusFilter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutposts' {Maybe (NonEmpty Text)
lifeCycleStatusFilter :: Maybe (NonEmpty Text)
$sel:lifeCycleStatusFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
lifeCycleStatusFilter} -> Maybe (NonEmpty Text)
lifeCycleStatusFilter) (\s :: ListOutposts
s@ListOutposts' {} Maybe (NonEmpty Text)
a -> ListOutposts
s {$sel:lifeCycleStatusFilter:ListOutposts' :: Maybe (NonEmpty Text)
lifeCycleStatusFilter = Maybe (NonEmpty Text)
a} :: ListOutposts) 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

-- | Undocumented member.
listOutposts_maxResults :: Lens.Lens' ListOutposts (Prelude.Maybe Prelude.Natural)
listOutposts_maxResults :: Lens' ListOutposts (Maybe Natural)
listOutposts_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutposts' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListOutposts' :: ListOutposts -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListOutposts
s@ListOutposts' {} Maybe Natural
a -> ListOutposts
s {$sel:maxResults:ListOutposts' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListOutposts)

-- | Undocumented member.
listOutposts_nextToken :: Lens.Lens' ListOutposts (Prelude.Maybe Prelude.Text)
listOutposts_nextToken :: Lens' ListOutposts (Maybe Text)
listOutposts_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutposts' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListOutposts' :: ListOutposts -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListOutposts
s@ListOutposts' {} Maybe Text
a -> ListOutposts
s {$sel:nextToken:ListOutposts' :: Maybe Text
nextToken = Maybe Text
a} :: ListOutposts)

instance Core.AWSRequest ListOutposts where
  type AWSResponse ListOutposts = ListOutpostsResponse
  request :: (Service -> Service) -> ListOutposts -> Request ListOutposts
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListOutposts
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListOutposts)))
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 [Outpost] -> Int -> ListOutpostsResponse
ListOutpostsResponse'
            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
"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
"Outposts" 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 ListOutposts where
  hashWithSalt :: Int -> ListOutposts -> Int
hashWithSalt Int
_salt ListOutposts' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
lifeCycleStatusFilter :: Maybe (NonEmpty Text)
availabilityZoneIdFilter :: Maybe (NonEmpty Text)
availabilityZoneFilter :: Maybe (NonEmpty Text)
$sel:nextToken:ListOutposts' :: ListOutposts -> Maybe Text
$sel:maxResults:ListOutposts' :: ListOutposts -> Maybe Natural
$sel:lifeCycleStatusFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
$sel:availabilityZoneIdFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
$sel:availabilityZoneFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
availabilityZoneFilter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
availabilityZoneIdFilter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
lifeCycleStatusFilter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListOutposts where
  rnf :: ListOutposts -> ()
rnf ListOutposts' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
lifeCycleStatusFilter :: Maybe (NonEmpty Text)
availabilityZoneIdFilter :: Maybe (NonEmpty Text)
availabilityZoneFilter :: Maybe (NonEmpty Text)
$sel:nextToken:ListOutposts' :: ListOutposts -> Maybe Text
$sel:maxResults:ListOutposts' :: ListOutposts -> Maybe Natural
$sel:lifeCycleStatusFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
$sel:availabilityZoneIdFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
$sel:availabilityZoneFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
availabilityZoneFilter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
availabilityZoneIdFilter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
lifeCycleStatusFilter
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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

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

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

instance Data.ToQuery ListOutposts where
  toQuery :: ListOutposts -> QueryString
toQuery ListOutposts' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
lifeCycleStatusFilter :: Maybe (NonEmpty Text)
availabilityZoneIdFilter :: Maybe (NonEmpty Text)
availabilityZoneFilter :: Maybe (NonEmpty Text)
$sel:nextToken:ListOutposts' :: ListOutposts -> Maybe Text
$sel:maxResults:ListOutposts' :: ListOutposts -> Maybe Natural
$sel:lifeCycleStatusFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
$sel:availabilityZoneIdFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
$sel:availabilityZoneFilter:ListOutposts' :: ListOutposts -> Maybe (NonEmpty Text)
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"AvailabilityZoneFilter"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
availabilityZoneFilter
            ),
        ByteString
"AvailabilityZoneIdFilter"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
availabilityZoneIdFilter
            ),
        ByteString
"LifeCycleStatusFilter"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
lifeCycleStatusFilter
            ),
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListOutpostsResponse' smart constructor.
data ListOutpostsResponse = ListOutpostsResponse'
  { ListOutpostsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    ListOutpostsResponse -> Maybe [Outpost]
outposts :: Prelude.Maybe [Outpost],
    -- | The response's http status code.
    ListOutpostsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListOutpostsResponse -> ListOutpostsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListOutpostsResponse -> ListOutpostsResponse -> Bool
$c/= :: ListOutpostsResponse -> ListOutpostsResponse -> Bool
== :: ListOutpostsResponse -> ListOutpostsResponse -> Bool
$c== :: ListOutpostsResponse -> ListOutpostsResponse -> Bool
Prelude.Eq, ReadPrec [ListOutpostsResponse]
ReadPrec ListOutpostsResponse
Int -> ReadS ListOutpostsResponse
ReadS [ListOutpostsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListOutpostsResponse]
$creadListPrec :: ReadPrec [ListOutpostsResponse]
readPrec :: ReadPrec ListOutpostsResponse
$creadPrec :: ReadPrec ListOutpostsResponse
readList :: ReadS [ListOutpostsResponse]
$creadList :: ReadS [ListOutpostsResponse]
readsPrec :: Int -> ReadS ListOutpostsResponse
$creadsPrec :: Int -> ReadS ListOutpostsResponse
Prelude.Read, Int -> ListOutpostsResponse -> ShowS
[ListOutpostsResponse] -> ShowS
ListOutpostsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListOutpostsResponse] -> ShowS
$cshowList :: [ListOutpostsResponse] -> ShowS
show :: ListOutpostsResponse -> String
$cshow :: ListOutpostsResponse -> String
showsPrec :: Int -> ListOutpostsResponse -> ShowS
$cshowsPrec :: Int -> ListOutpostsResponse -> ShowS
Prelude.Show, forall x. Rep ListOutpostsResponse x -> ListOutpostsResponse
forall x. ListOutpostsResponse -> Rep ListOutpostsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListOutpostsResponse x -> ListOutpostsResponse
$cfrom :: forall x. ListOutpostsResponse -> Rep ListOutpostsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListOutpostsResponse' 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', 'listOutpostsResponse_nextToken' - Undocumented member.
--
-- 'outposts', 'listOutpostsResponse_outposts' - Undocumented member.
--
-- 'httpStatus', 'listOutpostsResponse_httpStatus' - The response's http status code.
newListOutpostsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListOutpostsResponse
newListOutpostsResponse :: Int -> ListOutpostsResponse
newListOutpostsResponse Int
pHttpStatus_ =
  ListOutpostsResponse'
    { $sel:nextToken:ListOutpostsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:outposts:ListOutpostsResponse' :: Maybe [Outpost]
outposts = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListOutpostsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
listOutpostsResponse_nextToken :: Lens.Lens' ListOutpostsResponse (Prelude.Maybe Prelude.Text)
listOutpostsResponse_nextToken :: Lens' ListOutpostsResponse (Maybe Text)
listOutpostsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutpostsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListOutpostsResponse' :: ListOutpostsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListOutpostsResponse
s@ListOutpostsResponse' {} Maybe Text
a -> ListOutpostsResponse
s {$sel:nextToken:ListOutpostsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListOutpostsResponse)

-- | Undocumented member.
listOutpostsResponse_outposts :: Lens.Lens' ListOutpostsResponse (Prelude.Maybe [Outpost])
listOutpostsResponse_outposts :: Lens' ListOutpostsResponse (Maybe [Outpost])
listOutpostsResponse_outposts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutpostsResponse' {Maybe [Outpost]
outposts :: Maybe [Outpost]
$sel:outposts:ListOutpostsResponse' :: ListOutpostsResponse -> Maybe [Outpost]
outposts} -> Maybe [Outpost]
outposts) (\s :: ListOutpostsResponse
s@ListOutpostsResponse' {} Maybe [Outpost]
a -> ListOutpostsResponse
s {$sel:outposts:ListOutpostsResponse' :: Maybe [Outpost]
outposts = Maybe [Outpost]
a} :: ListOutpostsResponse) 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.
listOutpostsResponse_httpStatus :: Lens.Lens' ListOutpostsResponse Prelude.Int
listOutpostsResponse_httpStatus :: Lens' ListOutpostsResponse Int
listOutpostsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListOutpostsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListOutpostsResponse' :: ListOutpostsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListOutpostsResponse
s@ListOutpostsResponse' {} Int
a -> ListOutpostsResponse
s {$sel:httpStatus:ListOutpostsResponse' :: Int
httpStatus = Int
a} :: ListOutpostsResponse)

instance Prelude.NFData ListOutpostsResponse where
  rnf :: ListOutpostsResponse -> ()
rnf ListOutpostsResponse' {Int
Maybe [Outpost]
Maybe Text
httpStatus :: Int
outposts :: Maybe [Outpost]
nextToken :: Maybe Text
$sel:httpStatus:ListOutpostsResponse' :: ListOutpostsResponse -> Int
$sel:outposts:ListOutpostsResponse' :: ListOutpostsResponse -> Maybe [Outpost]
$sel:nextToken:ListOutpostsResponse' :: ListOutpostsResponse -> Maybe Text
..} =
    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 [Outpost]
outposts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus