{-# 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-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)
--
-- Create a list of the Outposts for your AWS account. Add filters to your
-- request to return a more specific list of results. Use filters to match
-- an Outpost lifecycle status, Availibility Zone (@us-east-1a@), and AZ ID
-- (@use1-az1@).
--
-- If you specify multiple filters, the filters are joined with an @AND@,
-- and the request returns only results that match all of the specified
-- filters.
module Amazonka.Outposts.ListOutposts
  ( -- * Creating a Request
    ListOutposts (..),
    newListOutposts,

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

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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'
  { -- | A filter for the Availibility Zone (@us-east-1a@) of the Outpost.
    --
    -- Filter values are case sensitive. If you specify multiple values for a
    -- filter, the values are joined with an @OR@, and the request returns all
    -- results that match any of the specified values.
    ListOutposts -> Maybe (NonEmpty Text)
availabilityZoneFilter :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | A filter for the lifecycle status of the Outpost.
    --
    -- Filter values are case sensitive. If you specify multiple values for a
    -- filter, the values are joined with an @OR@, and the request returns all
    -- results that match any of the specified values.
    ListOutposts -> Maybe (NonEmpty Text)
lifeCycleStatusFilter :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    ListOutposts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A filter for the AZ IDs (@use1-az1@) of the Outpost.
    --
    -- Filter values are case sensitive. If you specify multiple values for a
    -- filter, the values are joined with an @OR@, and the request returns all
    -- results that match any of the specified values.
    ListOutposts -> Maybe (NonEmpty Text)
availabilityZoneIdFilter :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    ListOutposts -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListOutposts -> ListOutposts -> Bool
(ListOutposts -> ListOutposts -> Bool)
-> (ListOutposts -> ListOutposts -> Bool) -> Eq ListOutposts
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]
(Int -> ReadS ListOutposts)
-> ReadS [ListOutposts]
-> ReadPrec ListOutposts
-> ReadPrec [ListOutposts]
-> Read 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
(Int -> ListOutposts -> ShowS)
-> (ListOutposts -> String)
-> ([ListOutposts] -> ShowS)
-> Show ListOutposts
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. ListOutposts -> Rep ListOutposts x)
-> (forall x. Rep ListOutposts x -> ListOutposts)
-> Generic ListOutposts
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' - A filter for the Availibility Zone (@us-east-1a@) of the Outpost.
--
-- Filter values are case sensitive. If you specify multiple values for a
-- filter, the values are joined with an @OR@, and the request returns all
-- results that match any of the specified values.
--
-- 'lifeCycleStatusFilter', 'listOutposts_lifeCycleStatusFilter' - A filter for the lifecycle status of the Outpost.
--
-- Filter values are case sensitive. If you specify multiple values for a
-- filter, the values are joined with an @OR@, and the request returns all
-- results that match any of the specified values.
--
-- 'nextToken', 'listOutposts_nextToken' - Undocumented member.
--
-- 'availabilityZoneIdFilter', 'listOutposts_availabilityZoneIdFilter' - A filter for the AZ IDs (@use1-az1@) of the Outpost.
--
-- Filter values are case sensitive. If you specify multiple values for a
-- filter, the values are joined with an @OR@, and the request returns all
-- results that match any of the specified values.
--
-- 'maxResults', 'listOutposts_maxResults' - Undocumented member.
newListOutposts ::
  ListOutposts
newListOutposts :: ListOutposts
newListOutposts =
  ListOutposts' :: Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Natural
-> ListOutposts
ListOutposts'
    { $sel:availabilityZoneFilter:ListOutposts' :: Maybe (NonEmpty Text)
availabilityZoneFilter =
        Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:lifeCycleStatusFilter:ListOutposts' :: Maybe (NonEmpty Text)
lifeCycleStatusFilter = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListOutposts' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZoneIdFilter:ListOutposts' :: Maybe (NonEmpty Text)
availabilityZoneIdFilter = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListOutposts' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | A filter for the Availibility Zone (@us-east-1a@) of the Outpost.
--
-- Filter values are case sensitive. If you specify multiple values for a
-- filter, the values are joined with an @OR@, and the request returns all
-- results that match any of the specified values.
listOutposts_availabilityZoneFilter :: Lens.Lens' ListOutposts (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listOutposts_availabilityZoneFilter :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListOutposts -> f ListOutposts
listOutposts_availabilityZoneFilter = (ListOutposts -> Maybe (NonEmpty Text))
-> (ListOutposts -> Maybe (NonEmpty Text) -> ListOutposts)
-> Lens
     ListOutposts
     ListOutposts
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> ListOutposts -> f ListOutposts)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListOutposts
-> f ListOutposts
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A filter for the lifecycle status of the Outpost.
--
-- Filter values are case sensitive. If you specify multiple values for a
-- filter, the values are joined with an @OR@, and the request returns all
-- results that match any of the specified values.
listOutposts_lifeCycleStatusFilter :: Lens.Lens' ListOutposts (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listOutposts_lifeCycleStatusFilter :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListOutposts -> f ListOutposts
listOutposts_lifeCycleStatusFilter = (ListOutposts -> Maybe (NonEmpty Text))
-> (ListOutposts -> Maybe (NonEmpty Text) -> ListOutposts)
-> Lens
     ListOutposts
     ListOutposts
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> ListOutposts -> f ListOutposts)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListOutposts
-> f ListOutposts
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
listOutposts_nextToken :: Lens.Lens' ListOutposts (Prelude.Maybe Prelude.Text)
listOutposts_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListOutposts -> f ListOutposts
listOutposts_nextToken = (ListOutposts -> Maybe Text)
-> (ListOutposts -> Maybe Text -> ListOutposts)
-> Lens ListOutposts ListOutposts (Maybe Text) (Maybe Text)
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)

-- | A filter for the AZ IDs (@use1-az1@) of the Outpost.
--
-- Filter values are case sensitive. If you specify multiple values for a
-- filter, the values are joined with an @OR@, and the request returns all
-- results that match any of the specified values.
listOutposts_availabilityZoneIdFilter :: Lens.Lens' ListOutposts (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listOutposts_availabilityZoneIdFilter :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListOutposts -> f ListOutposts
listOutposts_availabilityZoneIdFilter = (ListOutposts -> Maybe (NonEmpty Text))
-> (ListOutposts -> Maybe (NonEmpty Text) -> ListOutposts)
-> Lens
     ListOutposts
     ListOutposts
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> ListOutposts -> f ListOutposts)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ListOutposts
-> f ListOutposts
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
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 :: (Maybe Natural -> f (Maybe Natural))
-> ListOutposts -> f ListOutposts
listOutposts_maxResults = (ListOutposts -> Maybe Natural)
-> (ListOutposts -> Maybe Natural -> ListOutposts)
-> Lens ListOutposts ListOutposts (Maybe Natural) (Maybe Natural)
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)

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

instance Prelude.NFData ListOutposts

instance Core.ToHeaders ListOutposts where
  toHeaders :: ListOutposts -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListOutposts -> 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 ListOutposts where
  toPath :: ListOutposts -> ByteString
toPath = ByteString -> ListOutposts -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/outposts"

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

-- | /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
(ListOutpostsResponse -> ListOutpostsResponse -> Bool)
-> (ListOutpostsResponse -> ListOutpostsResponse -> Bool)
-> Eq ListOutpostsResponse
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]
(Int -> ReadS ListOutpostsResponse)
-> ReadS [ListOutpostsResponse]
-> ReadPrec ListOutpostsResponse
-> ReadPrec [ListOutpostsResponse]
-> Read 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
(Int -> ListOutpostsResponse -> ShowS)
-> (ListOutpostsResponse -> String)
-> ([ListOutpostsResponse] -> ShowS)
-> Show ListOutpostsResponse
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. ListOutpostsResponse -> Rep ListOutpostsResponse x)
-> (forall x. Rep ListOutpostsResponse x -> ListOutpostsResponse)
-> Generic ListOutpostsResponse
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' :: Maybe Text -> Maybe [Outpost] -> Int -> ListOutpostsResponse
ListOutpostsResponse'
    { $sel:nextToken:ListOutpostsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outposts:ListOutpostsResponse' :: Maybe [Outpost]
outposts = Maybe [Outpost]
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 :: (Maybe Text -> f (Maybe Text))
-> ListOutpostsResponse -> f ListOutpostsResponse
listOutpostsResponse_nextToken = (ListOutpostsResponse -> Maybe Text)
-> (ListOutpostsResponse -> Maybe Text -> ListOutpostsResponse)
-> Lens
     ListOutpostsResponse ListOutpostsResponse (Maybe Text) (Maybe Text)
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 :: (Maybe [Outpost] -> f (Maybe [Outpost]))
-> ListOutpostsResponse -> f ListOutpostsResponse
listOutpostsResponse_outposts = (ListOutpostsResponse -> Maybe [Outpost])
-> (ListOutpostsResponse
    -> Maybe [Outpost] -> ListOutpostsResponse)
-> Lens
     ListOutpostsResponse
     ListOutpostsResponse
     (Maybe [Outpost])
     (Maybe [Outpost])
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) ((Maybe [Outpost] -> f (Maybe [Outpost]))
 -> ListOutpostsResponse -> f ListOutpostsResponse)
-> ((Maybe [Outpost] -> f (Maybe [Outpost]))
    -> Maybe [Outpost] -> f (Maybe [Outpost]))
-> (Maybe [Outpost] -> f (Maybe [Outpost]))
-> ListOutpostsResponse
-> f ListOutpostsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Outpost] [Outpost] [Outpost] [Outpost]
-> Iso
     (Maybe [Outpost])
     (Maybe [Outpost])
     (Maybe [Outpost])
     (Maybe [Outpost])
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 [Outpost] [Outpost] [Outpost] [Outpost]
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 :: (Int -> f Int) -> ListOutpostsResponse -> f ListOutpostsResponse
listOutpostsResponse_httpStatus = (ListOutpostsResponse -> Int)
-> (ListOutpostsResponse -> Int -> ListOutpostsResponse)
-> Lens ListOutpostsResponse ListOutpostsResponse Int Int
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