{-# 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.AppStream.DescribeImageBuilders
-- 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)
--
-- Retrieves a list that describes one or more specified image builders, if
-- the image builder names are provided. Otherwise, all image builders in
-- the account are described.
--
-- This operation returns paginated results.
module Amazonka.AppStream.DescribeImageBuilders
  ( -- * Creating a Request
    DescribeImageBuilders (..),
    newDescribeImageBuilders,

    -- * Request Lenses
    describeImageBuilders_nextToken,
    describeImageBuilders_names,
    describeImageBuilders_maxResults,

    -- * Destructuring the Response
    DescribeImageBuildersResponse (..),
    newDescribeImageBuildersResponse,

    -- * Response Lenses
    describeImageBuildersResponse_imageBuilders,
    describeImageBuildersResponse_nextToken,
    describeImageBuildersResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeImageBuilders' smart constructor.
data DescribeImageBuilders = DescribeImageBuilders'
  { -- | The pagination token to use to retrieve the next page of results for
    -- this operation. If this value is null, it retrieves the first page.
    DescribeImageBuilders -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The names of the image builders to describe.
    DescribeImageBuilders -> Maybe [Text]
names :: Prelude.Maybe [Prelude.Text],
    -- | The maximum size of each page of results.
    DescribeImageBuilders -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeImageBuilders -> DescribeImageBuilders -> Bool
(DescribeImageBuilders -> DescribeImageBuilders -> Bool)
-> (DescribeImageBuilders -> DescribeImageBuilders -> Bool)
-> Eq DescribeImageBuilders
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImageBuilders -> DescribeImageBuilders -> Bool
$c/= :: DescribeImageBuilders -> DescribeImageBuilders -> Bool
== :: DescribeImageBuilders -> DescribeImageBuilders -> Bool
$c== :: DescribeImageBuilders -> DescribeImageBuilders -> Bool
Prelude.Eq, ReadPrec [DescribeImageBuilders]
ReadPrec DescribeImageBuilders
Int -> ReadS DescribeImageBuilders
ReadS [DescribeImageBuilders]
(Int -> ReadS DescribeImageBuilders)
-> ReadS [DescribeImageBuilders]
-> ReadPrec DescribeImageBuilders
-> ReadPrec [DescribeImageBuilders]
-> Read DescribeImageBuilders
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImageBuilders]
$creadListPrec :: ReadPrec [DescribeImageBuilders]
readPrec :: ReadPrec DescribeImageBuilders
$creadPrec :: ReadPrec DescribeImageBuilders
readList :: ReadS [DescribeImageBuilders]
$creadList :: ReadS [DescribeImageBuilders]
readsPrec :: Int -> ReadS DescribeImageBuilders
$creadsPrec :: Int -> ReadS DescribeImageBuilders
Prelude.Read, Int -> DescribeImageBuilders -> ShowS
[DescribeImageBuilders] -> ShowS
DescribeImageBuilders -> String
(Int -> DescribeImageBuilders -> ShowS)
-> (DescribeImageBuilders -> String)
-> ([DescribeImageBuilders] -> ShowS)
-> Show DescribeImageBuilders
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImageBuilders] -> ShowS
$cshowList :: [DescribeImageBuilders] -> ShowS
show :: DescribeImageBuilders -> String
$cshow :: DescribeImageBuilders -> String
showsPrec :: Int -> DescribeImageBuilders -> ShowS
$cshowsPrec :: Int -> DescribeImageBuilders -> ShowS
Prelude.Show, (forall x. DescribeImageBuilders -> Rep DescribeImageBuilders x)
-> (forall x. Rep DescribeImageBuilders x -> DescribeImageBuilders)
-> Generic DescribeImageBuilders
forall x. Rep DescribeImageBuilders x -> DescribeImageBuilders
forall x. DescribeImageBuilders -> Rep DescribeImageBuilders x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImageBuilders x -> DescribeImageBuilders
$cfrom :: forall x. DescribeImageBuilders -> Rep DescribeImageBuilders x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImageBuilders' 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', 'describeImageBuilders_nextToken' - The pagination token to use to retrieve the next page of results for
-- this operation. If this value is null, it retrieves the first page.
--
-- 'names', 'describeImageBuilders_names' - The names of the image builders to describe.
--
-- 'maxResults', 'describeImageBuilders_maxResults' - The maximum size of each page of results.
newDescribeImageBuilders ::
  DescribeImageBuilders
newDescribeImageBuilders :: DescribeImageBuilders
newDescribeImageBuilders =
  DescribeImageBuilders' :: Maybe Text -> Maybe [Text] -> Maybe Int -> DescribeImageBuilders
DescribeImageBuilders'
    { $sel:nextToken:DescribeImageBuilders' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:names:DescribeImageBuilders' :: Maybe [Text]
names = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeImageBuilders' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The pagination token to use to retrieve the next page of results for
-- this operation. If this value is null, it retrieves the first page.
describeImageBuilders_nextToken :: Lens.Lens' DescribeImageBuilders (Prelude.Maybe Prelude.Text)
describeImageBuilders_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeImageBuilders -> f DescribeImageBuilders
describeImageBuilders_nextToken = (DescribeImageBuilders -> Maybe Text)
-> (DescribeImageBuilders -> Maybe Text -> DescribeImageBuilders)
-> Lens
     DescribeImageBuilders
     DescribeImageBuilders
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageBuilders' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImageBuilders' :: DescribeImageBuilders -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImageBuilders
s@DescribeImageBuilders' {} Maybe Text
a -> DescribeImageBuilders
s {$sel:nextToken:DescribeImageBuilders' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImageBuilders)

-- | The names of the image builders to describe.
describeImageBuilders_names :: Lens.Lens' DescribeImageBuilders (Prelude.Maybe [Prelude.Text])
describeImageBuilders_names :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeImageBuilders -> f DescribeImageBuilders
describeImageBuilders_names = (DescribeImageBuilders -> Maybe [Text])
-> (DescribeImageBuilders -> Maybe [Text] -> DescribeImageBuilders)
-> Lens
     DescribeImageBuilders
     DescribeImageBuilders
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageBuilders' {Maybe [Text]
names :: Maybe [Text]
$sel:names:DescribeImageBuilders' :: DescribeImageBuilders -> Maybe [Text]
names} -> Maybe [Text]
names) (\s :: DescribeImageBuilders
s@DescribeImageBuilders' {} Maybe [Text]
a -> DescribeImageBuilders
s {$sel:names:DescribeImageBuilders' :: Maybe [Text]
names = Maybe [Text]
a} :: DescribeImageBuilders) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeImageBuilders -> f DescribeImageBuilders)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeImageBuilders
-> f DescribeImageBuilders
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum size of each page of results.
describeImageBuilders_maxResults :: Lens.Lens' DescribeImageBuilders (Prelude.Maybe Prelude.Int)
describeImageBuilders_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeImageBuilders -> f DescribeImageBuilders
describeImageBuilders_maxResults = (DescribeImageBuilders -> Maybe Int)
-> (DescribeImageBuilders -> Maybe Int -> DescribeImageBuilders)
-> Lens
     DescribeImageBuilders DescribeImageBuilders (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageBuilders' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeImageBuilders' :: DescribeImageBuilders -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeImageBuilders
s@DescribeImageBuilders' {} Maybe Int
a -> DescribeImageBuilders
s {$sel:maxResults:DescribeImageBuilders' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeImageBuilders)

instance Core.AWSPager DescribeImageBuilders where
  page :: DescribeImageBuilders
-> AWSResponse DescribeImageBuilders -> Maybe DescribeImageBuilders
page DescribeImageBuilders
rq AWSResponse DescribeImageBuilders
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeImageBuilders
DescribeImageBuildersResponse
rs
            DescribeImageBuildersResponse
-> Getting (First Text) DescribeImageBuildersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImageBuildersResponse
-> Const (First Text) DescribeImageBuildersResponse
Lens' DescribeImageBuildersResponse (Maybe Text)
describeImageBuildersResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeImageBuildersResponse
 -> Const (First Text) DescribeImageBuildersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeImageBuildersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeImageBuilders
forall a. Maybe a
Prelude.Nothing
    | Maybe [ImageBuilder] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeImageBuilders
DescribeImageBuildersResponse
rs
            DescribeImageBuildersResponse
-> Getting
     (First [ImageBuilder]) DescribeImageBuildersResponse [ImageBuilder]
-> Maybe [ImageBuilder]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ImageBuilder]
 -> Const (First [ImageBuilder]) (Maybe [ImageBuilder]))
-> DescribeImageBuildersResponse
-> Const (First [ImageBuilder]) DescribeImageBuildersResponse
Lens' DescribeImageBuildersResponse (Maybe [ImageBuilder])
describeImageBuildersResponse_imageBuilders
              ((Maybe [ImageBuilder]
  -> Const (First [ImageBuilder]) (Maybe [ImageBuilder]))
 -> DescribeImageBuildersResponse
 -> Const (First [ImageBuilder]) DescribeImageBuildersResponse)
-> (([ImageBuilder] -> Const (First [ImageBuilder]) [ImageBuilder])
    -> Maybe [ImageBuilder]
    -> Const (First [ImageBuilder]) (Maybe [ImageBuilder]))
-> Getting
     (First [ImageBuilder]) DescribeImageBuildersResponse [ImageBuilder]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ImageBuilder] -> Const (First [ImageBuilder]) [ImageBuilder])
-> Maybe [ImageBuilder]
-> Const (First [ImageBuilder]) (Maybe [ImageBuilder])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeImageBuilders
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeImageBuilders -> Maybe DescribeImageBuilders
forall a. a -> Maybe a
Prelude.Just (DescribeImageBuilders -> Maybe DescribeImageBuilders)
-> DescribeImageBuilders -> Maybe DescribeImageBuilders
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeImageBuilders
rq
          DescribeImageBuilders
-> (DescribeImageBuilders -> DescribeImageBuilders)
-> DescribeImageBuilders
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeImageBuilders -> Identity DescribeImageBuilders
Lens
  DescribeImageBuilders
  DescribeImageBuilders
  (Maybe Text)
  (Maybe Text)
describeImageBuilders_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeImageBuilders -> Identity DescribeImageBuilders)
-> Maybe Text -> DescribeImageBuilders -> DescribeImageBuilders
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeImageBuilders
DescribeImageBuildersResponse
rs
          DescribeImageBuildersResponse
-> Getting (First Text) DescribeImageBuildersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeImageBuildersResponse
-> Const (First Text) DescribeImageBuildersResponse
Lens' DescribeImageBuildersResponse (Maybe Text)
describeImageBuildersResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeImageBuildersResponse
 -> Const (First Text) DescribeImageBuildersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeImageBuildersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData DescribeImageBuilders

instance Core.ToHeaders DescribeImageBuilders where
  toHeaders :: DescribeImageBuilders -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeImageBuilders -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"PhotonAdminProxyService.DescribeImageBuilders" ::
                          Prelude.ByteString
                      ),
            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.ToJSON DescribeImageBuilders where
  toJSON :: DescribeImageBuilders -> Value
toJSON DescribeImageBuilders' {Maybe Int
Maybe [Text]
Maybe Text
maxResults :: Maybe Int
names :: Maybe [Text]
nextToken :: Maybe Text
$sel:maxResults:DescribeImageBuilders' :: DescribeImageBuilders -> Maybe Int
$sel:names:DescribeImageBuilders' :: DescribeImageBuilders -> Maybe [Text]
$sel:nextToken:DescribeImageBuilders' :: DescribeImageBuilders -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Names" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
names,
            (Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
          ]
      )

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

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

-- | /See:/ 'newDescribeImageBuildersResponse' smart constructor.
data DescribeImageBuildersResponse = DescribeImageBuildersResponse'
  { -- | Information about the image builders.
    DescribeImageBuildersResponse -> Maybe [ImageBuilder]
imageBuilders :: Prelude.Maybe [ImageBuilder],
    -- | The pagination token to use to retrieve the next page of results for
    -- this operation. If there are no more pages, this value is null.
    DescribeImageBuildersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeImageBuildersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeImageBuildersResponse
-> DescribeImageBuildersResponse -> Bool
(DescribeImageBuildersResponse
 -> DescribeImageBuildersResponse -> Bool)
-> (DescribeImageBuildersResponse
    -> DescribeImageBuildersResponse -> Bool)
-> Eq DescribeImageBuildersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImageBuildersResponse
-> DescribeImageBuildersResponse -> Bool
$c/= :: DescribeImageBuildersResponse
-> DescribeImageBuildersResponse -> Bool
== :: DescribeImageBuildersResponse
-> DescribeImageBuildersResponse -> Bool
$c== :: DescribeImageBuildersResponse
-> DescribeImageBuildersResponse -> Bool
Prelude.Eq, ReadPrec [DescribeImageBuildersResponse]
ReadPrec DescribeImageBuildersResponse
Int -> ReadS DescribeImageBuildersResponse
ReadS [DescribeImageBuildersResponse]
(Int -> ReadS DescribeImageBuildersResponse)
-> ReadS [DescribeImageBuildersResponse]
-> ReadPrec DescribeImageBuildersResponse
-> ReadPrec [DescribeImageBuildersResponse]
-> Read DescribeImageBuildersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImageBuildersResponse]
$creadListPrec :: ReadPrec [DescribeImageBuildersResponse]
readPrec :: ReadPrec DescribeImageBuildersResponse
$creadPrec :: ReadPrec DescribeImageBuildersResponse
readList :: ReadS [DescribeImageBuildersResponse]
$creadList :: ReadS [DescribeImageBuildersResponse]
readsPrec :: Int -> ReadS DescribeImageBuildersResponse
$creadsPrec :: Int -> ReadS DescribeImageBuildersResponse
Prelude.Read, Int -> DescribeImageBuildersResponse -> ShowS
[DescribeImageBuildersResponse] -> ShowS
DescribeImageBuildersResponse -> String
(Int -> DescribeImageBuildersResponse -> ShowS)
-> (DescribeImageBuildersResponse -> String)
-> ([DescribeImageBuildersResponse] -> ShowS)
-> Show DescribeImageBuildersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImageBuildersResponse] -> ShowS
$cshowList :: [DescribeImageBuildersResponse] -> ShowS
show :: DescribeImageBuildersResponse -> String
$cshow :: DescribeImageBuildersResponse -> String
showsPrec :: Int -> DescribeImageBuildersResponse -> ShowS
$cshowsPrec :: Int -> DescribeImageBuildersResponse -> ShowS
Prelude.Show, (forall x.
 DescribeImageBuildersResponse
 -> Rep DescribeImageBuildersResponse x)
-> (forall x.
    Rep DescribeImageBuildersResponse x
    -> DescribeImageBuildersResponse)
-> Generic DescribeImageBuildersResponse
forall x.
Rep DescribeImageBuildersResponse x
-> DescribeImageBuildersResponse
forall x.
DescribeImageBuildersResponse
-> Rep DescribeImageBuildersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeImageBuildersResponse x
-> DescribeImageBuildersResponse
$cfrom :: forall x.
DescribeImageBuildersResponse
-> Rep DescribeImageBuildersResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImageBuildersResponse' 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:
--
-- 'imageBuilders', 'describeImageBuildersResponse_imageBuilders' - Information about the image builders.
--
-- 'nextToken', 'describeImageBuildersResponse_nextToken' - The pagination token to use to retrieve the next page of results for
-- this operation. If there are no more pages, this value is null.
--
-- 'httpStatus', 'describeImageBuildersResponse_httpStatus' - The response's http status code.
newDescribeImageBuildersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeImageBuildersResponse
newDescribeImageBuildersResponse :: Int -> DescribeImageBuildersResponse
newDescribeImageBuildersResponse Int
pHttpStatus_ =
  DescribeImageBuildersResponse' :: Maybe [ImageBuilder]
-> Maybe Text -> Int -> DescribeImageBuildersResponse
DescribeImageBuildersResponse'
    { $sel:imageBuilders:DescribeImageBuildersResponse' :: Maybe [ImageBuilder]
imageBuilders =
        Maybe [ImageBuilder]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeImageBuildersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeImageBuildersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the image builders.
describeImageBuildersResponse_imageBuilders :: Lens.Lens' DescribeImageBuildersResponse (Prelude.Maybe [ImageBuilder])
describeImageBuildersResponse_imageBuilders :: (Maybe [ImageBuilder] -> f (Maybe [ImageBuilder]))
-> DescribeImageBuildersResponse -> f DescribeImageBuildersResponse
describeImageBuildersResponse_imageBuilders = (DescribeImageBuildersResponse -> Maybe [ImageBuilder])
-> (DescribeImageBuildersResponse
    -> Maybe [ImageBuilder] -> DescribeImageBuildersResponse)
-> Lens' DescribeImageBuildersResponse (Maybe [ImageBuilder])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageBuildersResponse' {Maybe [ImageBuilder]
imageBuilders :: Maybe [ImageBuilder]
$sel:imageBuilders:DescribeImageBuildersResponse' :: DescribeImageBuildersResponse -> Maybe [ImageBuilder]
imageBuilders} -> Maybe [ImageBuilder]
imageBuilders) (\s :: DescribeImageBuildersResponse
s@DescribeImageBuildersResponse' {} Maybe [ImageBuilder]
a -> DescribeImageBuildersResponse
s {$sel:imageBuilders:DescribeImageBuildersResponse' :: Maybe [ImageBuilder]
imageBuilders = Maybe [ImageBuilder]
a} :: DescribeImageBuildersResponse) ((Maybe [ImageBuilder] -> f (Maybe [ImageBuilder]))
 -> DescribeImageBuildersResponse
 -> f DescribeImageBuildersResponse)
-> ((Maybe [ImageBuilder] -> f (Maybe [ImageBuilder]))
    -> Maybe [ImageBuilder] -> f (Maybe [ImageBuilder]))
-> (Maybe [ImageBuilder] -> f (Maybe [ImageBuilder]))
-> DescribeImageBuildersResponse
-> f DescribeImageBuildersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ImageBuilder] [ImageBuilder] [ImageBuilder] [ImageBuilder]
-> Iso
     (Maybe [ImageBuilder])
     (Maybe [ImageBuilder])
     (Maybe [ImageBuilder])
     (Maybe [ImageBuilder])
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 [ImageBuilder] [ImageBuilder] [ImageBuilder] [ImageBuilder]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token to use to retrieve the next page of results for
-- this operation. If there are no more pages, this value is null.
describeImageBuildersResponse_nextToken :: Lens.Lens' DescribeImageBuildersResponse (Prelude.Maybe Prelude.Text)
describeImageBuildersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeImageBuildersResponse -> f DescribeImageBuildersResponse
describeImageBuildersResponse_nextToken = (DescribeImageBuildersResponse -> Maybe Text)
-> (DescribeImageBuildersResponse
    -> Maybe Text -> DescribeImageBuildersResponse)
-> Lens' DescribeImageBuildersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImageBuildersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImageBuildersResponse' :: DescribeImageBuildersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImageBuildersResponse
s@DescribeImageBuildersResponse' {} Maybe Text
a -> DescribeImageBuildersResponse
s {$sel:nextToken:DescribeImageBuildersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImageBuildersResponse)

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

instance Prelude.NFData DescribeImageBuildersResponse