{-# 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.Glue.BatchGetBlueprints
-- 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 information about a list of blueprints.
module Amazonka.Glue.BatchGetBlueprints
  ( -- * Creating a Request
    BatchGetBlueprints (..),
    newBatchGetBlueprints,

    -- * Request Lenses
    batchGetBlueprints_includeParameterSpec,
    batchGetBlueprints_includeBlueprint,
    batchGetBlueprints_names,

    -- * Destructuring the Response
    BatchGetBlueprintsResponse (..),
    newBatchGetBlueprintsResponse,

    -- * Response Lenses
    batchGetBlueprintsResponse_blueprints,
    batchGetBlueprintsResponse_missingBlueprints,
    batchGetBlueprintsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
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:/ 'newBatchGetBlueprints' smart constructor.
data BatchGetBlueprints = BatchGetBlueprints'
  { -- | Specifies whether or not to include the parameters, as a JSON string,
    -- for the blueprint in the response.
    BatchGetBlueprints -> Maybe Bool
includeParameterSpec :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether or not to include the blueprint in the response.
    BatchGetBlueprints -> Maybe Bool
includeBlueprint :: Prelude.Maybe Prelude.Bool,
    -- | A list of blueprint names.
    BatchGetBlueprints -> NonEmpty Text
names :: Prelude.NonEmpty Prelude.Text
  }
  deriving (BatchGetBlueprints -> BatchGetBlueprints -> Bool
(BatchGetBlueprints -> BatchGetBlueprints -> Bool)
-> (BatchGetBlueprints -> BatchGetBlueprints -> Bool)
-> Eq BatchGetBlueprints
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetBlueprints -> BatchGetBlueprints -> Bool
$c/= :: BatchGetBlueprints -> BatchGetBlueprints -> Bool
== :: BatchGetBlueprints -> BatchGetBlueprints -> Bool
$c== :: BatchGetBlueprints -> BatchGetBlueprints -> Bool
Prelude.Eq, ReadPrec [BatchGetBlueprints]
ReadPrec BatchGetBlueprints
Int -> ReadS BatchGetBlueprints
ReadS [BatchGetBlueprints]
(Int -> ReadS BatchGetBlueprints)
-> ReadS [BatchGetBlueprints]
-> ReadPrec BatchGetBlueprints
-> ReadPrec [BatchGetBlueprints]
-> Read BatchGetBlueprints
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetBlueprints]
$creadListPrec :: ReadPrec [BatchGetBlueprints]
readPrec :: ReadPrec BatchGetBlueprints
$creadPrec :: ReadPrec BatchGetBlueprints
readList :: ReadS [BatchGetBlueprints]
$creadList :: ReadS [BatchGetBlueprints]
readsPrec :: Int -> ReadS BatchGetBlueprints
$creadsPrec :: Int -> ReadS BatchGetBlueprints
Prelude.Read, Int -> BatchGetBlueprints -> ShowS
[BatchGetBlueprints] -> ShowS
BatchGetBlueprints -> String
(Int -> BatchGetBlueprints -> ShowS)
-> (BatchGetBlueprints -> String)
-> ([BatchGetBlueprints] -> ShowS)
-> Show BatchGetBlueprints
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetBlueprints] -> ShowS
$cshowList :: [BatchGetBlueprints] -> ShowS
show :: BatchGetBlueprints -> String
$cshow :: BatchGetBlueprints -> String
showsPrec :: Int -> BatchGetBlueprints -> ShowS
$cshowsPrec :: Int -> BatchGetBlueprints -> ShowS
Prelude.Show, (forall x. BatchGetBlueprints -> Rep BatchGetBlueprints x)
-> (forall x. Rep BatchGetBlueprints x -> BatchGetBlueprints)
-> Generic BatchGetBlueprints
forall x. Rep BatchGetBlueprints x -> BatchGetBlueprints
forall x. BatchGetBlueprints -> Rep BatchGetBlueprints x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGetBlueprints x -> BatchGetBlueprints
$cfrom :: forall x. BatchGetBlueprints -> Rep BatchGetBlueprints x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetBlueprints' 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:
--
-- 'includeParameterSpec', 'batchGetBlueprints_includeParameterSpec' - Specifies whether or not to include the parameters, as a JSON string,
-- for the blueprint in the response.
--
-- 'includeBlueprint', 'batchGetBlueprints_includeBlueprint' - Specifies whether or not to include the blueprint in the response.
--
-- 'names', 'batchGetBlueprints_names' - A list of blueprint names.
newBatchGetBlueprints ::
  -- | 'names'
  Prelude.NonEmpty Prelude.Text ->
  BatchGetBlueprints
newBatchGetBlueprints :: NonEmpty Text -> BatchGetBlueprints
newBatchGetBlueprints NonEmpty Text
pNames_ =
  BatchGetBlueprints' :: Maybe Bool -> Maybe Bool -> NonEmpty Text -> BatchGetBlueprints
BatchGetBlueprints'
    { $sel:includeParameterSpec:BatchGetBlueprints' :: Maybe Bool
includeParameterSpec =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:includeBlueprint:BatchGetBlueprints' :: Maybe Bool
includeBlueprint = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:names:BatchGetBlueprints' :: NonEmpty Text
names = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pNames_
    }

-- | Specifies whether or not to include the parameters, as a JSON string,
-- for the blueprint in the response.
batchGetBlueprints_includeParameterSpec :: Lens.Lens' BatchGetBlueprints (Prelude.Maybe Prelude.Bool)
batchGetBlueprints_includeParameterSpec :: (Maybe Bool -> f (Maybe Bool))
-> BatchGetBlueprints -> f BatchGetBlueprints
batchGetBlueprints_includeParameterSpec = (BatchGetBlueprints -> Maybe Bool)
-> (BatchGetBlueprints -> Maybe Bool -> BatchGetBlueprints)
-> Lens
     BatchGetBlueprints BatchGetBlueprints (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetBlueprints' {Maybe Bool
includeParameterSpec :: Maybe Bool
$sel:includeParameterSpec:BatchGetBlueprints' :: BatchGetBlueprints -> Maybe Bool
includeParameterSpec} -> Maybe Bool
includeParameterSpec) (\s :: BatchGetBlueprints
s@BatchGetBlueprints' {} Maybe Bool
a -> BatchGetBlueprints
s {$sel:includeParameterSpec:BatchGetBlueprints' :: Maybe Bool
includeParameterSpec = Maybe Bool
a} :: BatchGetBlueprints)

-- | Specifies whether or not to include the blueprint in the response.
batchGetBlueprints_includeBlueprint :: Lens.Lens' BatchGetBlueprints (Prelude.Maybe Prelude.Bool)
batchGetBlueprints_includeBlueprint :: (Maybe Bool -> f (Maybe Bool))
-> BatchGetBlueprints -> f BatchGetBlueprints
batchGetBlueprints_includeBlueprint = (BatchGetBlueprints -> Maybe Bool)
-> (BatchGetBlueprints -> Maybe Bool -> BatchGetBlueprints)
-> Lens
     BatchGetBlueprints BatchGetBlueprints (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetBlueprints' {Maybe Bool
includeBlueprint :: Maybe Bool
$sel:includeBlueprint:BatchGetBlueprints' :: BatchGetBlueprints -> Maybe Bool
includeBlueprint} -> Maybe Bool
includeBlueprint) (\s :: BatchGetBlueprints
s@BatchGetBlueprints' {} Maybe Bool
a -> BatchGetBlueprints
s {$sel:includeBlueprint:BatchGetBlueprints' :: Maybe Bool
includeBlueprint = Maybe Bool
a} :: BatchGetBlueprints)

-- | A list of blueprint names.
batchGetBlueprints_names :: Lens.Lens' BatchGetBlueprints (Prelude.NonEmpty Prelude.Text)
batchGetBlueprints_names :: (NonEmpty Text -> f (NonEmpty Text))
-> BatchGetBlueprints -> f BatchGetBlueprints
batchGetBlueprints_names = (BatchGetBlueprints -> NonEmpty Text)
-> (BatchGetBlueprints -> NonEmpty Text -> BatchGetBlueprints)
-> Lens
     BatchGetBlueprints
     BatchGetBlueprints
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetBlueprints' {NonEmpty Text
names :: NonEmpty Text
$sel:names:BatchGetBlueprints' :: BatchGetBlueprints -> NonEmpty Text
names} -> NonEmpty Text
names) (\s :: BatchGetBlueprints
s@BatchGetBlueprints' {} NonEmpty Text
a -> BatchGetBlueprints
s {$sel:names:BatchGetBlueprints' :: NonEmpty Text
names = NonEmpty Text
a} :: BatchGetBlueprints) ((NonEmpty Text -> f (NonEmpty Text))
 -> BatchGetBlueprints -> f BatchGetBlueprints)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> BatchGetBlueprints
-> f BatchGetBlueprints
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData BatchGetBlueprints

instance Core.ToHeaders BatchGetBlueprints where
  toHeaders :: BatchGetBlueprints -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchGetBlueprints -> 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
"AWSGlue.BatchGetBlueprints" :: 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 BatchGetBlueprints where
  toJSON :: BatchGetBlueprints -> Value
toJSON BatchGetBlueprints' {Maybe Bool
NonEmpty Text
names :: NonEmpty Text
includeBlueprint :: Maybe Bool
includeParameterSpec :: Maybe Bool
$sel:names:BatchGetBlueprints' :: BatchGetBlueprints -> NonEmpty Text
$sel:includeBlueprint:BatchGetBlueprints' :: BatchGetBlueprints -> Maybe Bool
$sel:includeParameterSpec:BatchGetBlueprints' :: BatchGetBlueprints -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IncludeParameterSpec" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeParameterSpec,
            (Text
"IncludeBlueprint" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeBlueprint,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Names" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
names)
          ]
      )

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

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

-- | /See:/ 'newBatchGetBlueprintsResponse' smart constructor.
data BatchGetBlueprintsResponse = BatchGetBlueprintsResponse'
  { -- | Returns a list of blueprint as a @Blueprints@ object.
    BatchGetBlueprintsResponse -> Maybe [Blueprint]
blueprints :: Prelude.Maybe [Blueprint],
    -- | Returns a list of @BlueprintNames@ that were not found.
    BatchGetBlueprintsResponse -> Maybe [Text]
missingBlueprints :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    BatchGetBlueprintsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchGetBlueprintsResponse -> BatchGetBlueprintsResponse -> Bool
(BatchGetBlueprintsResponse -> BatchGetBlueprintsResponse -> Bool)
-> (BatchGetBlueprintsResponse
    -> BatchGetBlueprintsResponse -> Bool)
-> Eq BatchGetBlueprintsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetBlueprintsResponse -> BatchGetBlueprintsResponse -> Bool
$c/= :: BatchGetBlueprintsResponse -> BatchGetBlueprintsResponse -> Bool
== :: BatchGetBlueprintsResponse -> BatchGetBlueprintsResponse -> Bool
$c== :: BatchGetBlueprintsResponse -> BatchGetBlueprintsResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetBlueprintsResponse]
ReadPrec BatchGetBlueprintsResponse
Int -> ReadS BatchGetBlueprintsResponse
ReadS [BatchGetBlueprintsResponse]
(Int -> ReadS BatchGetBlueprintsResponse)
-> ReadS [BatchGetBlueprintsResponse]
-> ReadPrec BatchGetBlueprintsResponse
-> ReadPrec [BatchGetBlueprintsResponse]
-> Read BatchGetBlueprintsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetBlueprintsResponse]
$creadListPrec :: ReadPrec [BatchGetBlueprintsResponse]
readPrec :: ReadPrec BatchGetBlueprintsResponse
$creadPrec :: ReadPrec BatchGetBlueprintsResponse
readList :: ReadS [BatchGetBlueprintsResponse]
$creadList :: ReadS [BatchGetBlueprintsResponse]
readsPrec :: Int -> ReadS BatchGetBlueprintsResponse
$creadsPrec :: Int -> ReadS BatchGetBlueprintsResponse
Prelude.Read, Int -> BatchGetBlueprintsResponse -> ShowS
[BatchGetBlueprintsResponse] -> ShowS
BatchGetBlueprintsResponse -> String
(Int -> BatchGetBlueprintsResponse -> ShowS)
-> (BatchGetBlueprintsResponse -> String)
-> ([BatchGetBlueprintsResponse] -> ShowS)
-> Show BatchGetBlueprintsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetBlueprintsResponse] -> ShowS
$cshowList :: [BatchGetBlueprintsResponse] -> ShowS
show :: BatchGetBlueprintsResponse -> String
$cshow :: BatchGetBlueprintsResponse -> String
showsPrec :: Int -> BatchGetBlueprintsResponse -> ShowS
$cshowsPrec :: Int -> BatchGetBlueprintsResponse -> ShowS
Prelude.Show, (forall x.
 BatchGetBlueprintsResponse -> Rep BatchGetBlueprintsResponse x)
-> (forall x.
    Rep BatchGetBlueprintsResponse x -> BatchGetBlueprintsResponse)
-> Generic BatchGetBlueprintsResponse
forall x.
Rep BatchGetBlueprintsResponse x -> BatchGetBlueprintsResponse
forall x.
BatchGetBlueprintsResponse -> Rep BatchGetBlueprintsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetBlueprintsResponse x -> BatchGetBlueprintsResponse
$cfrom :: forall x.
BatchGetBlueprintsResponse -> Rep BatchGetBlueprintsResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchGetBlueprintsResponse' 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:
--
-- 'blueprints', 'batchGetBlueprintsResponse_blueprints' - Returns a list of blueprint as a @Blueprints@ object.
--
-- 'missingBlueprints', 'batchGetBlueprintsResponse_missingBlueprints' - Returns a list of @BlueprintNames@ that were not found.
--
-- 'httpStatus', 'batchGetBlueprintsResponse_httpStatus' - The response's http status code.
newBatchGetBlueprintsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchGetBlueprintsResponse
newBatchGetBlueprintsResponse :: Int -> BatchGetBlueprintsResponse
newBatchGetBlueprintsResponse Int
pHttpStatus_ =
  BatchGetBlueprintsResponse' :: Maybe [Blueprint]
-> Maybe [Text] -> Int -> BatchGetBlueprintsResponse
BatchGetBlueprintsResponse'
    { $sel:blueprints:BatchGetBlueprintsResponse' :: Maybe [Blueprint]
blueprints =
        Maybe [Blueprint]
forall a. Maybe a
Prelude.Nothing,
      $sel:missingBlueprints:BatchGetBlueprintsResponse' :: Maybe [Text]
missingBlueprints = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchGetBlueprintsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Returns a list of blueprint as a @Blueprints@ object.
batchGetBlueprintsResponse_blueprints :: Lens.Lens' BatchGetBlueprintsResponse (Prelude.Maybe [Blueprint])
batchGetBlueprintsResponse_blueprints :: (Maybe [Blueprint] -> f (Maybe [Blueprint]))
-> BatchGetBlueprintsResponse -> f BatchGetBlueprintsResponse
batchGetBlueprintsResponse_blueprints = (BatchGetBlueprintsResponse -> Maybe [Blueprint])
-> (BatchGetBlueprintsResponse
    -> Maybe [Blueprint] -> BatchGetBlueprintsResponse)
-> Lens
     BatchGetBlueprintsResponse
     BatchGetBlueprintsResponse
     (Maybe [Blueprint])
     (Maybe [Blueprint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetBlueprintsResponse' {Maybe [Blueprint]
blueprints :: Maybe [Blueprint]
$sel:blueprints:BatchGetBlueprintsResponse' :: BatchGetBlueprintsResponse -> Maybe [Blueprint]
blueprints} -> Maybe [Blueprint]
blueprints) (\s :: BatchGetBlueprintsResponse
s@BatchGetBlueprintsResponse' {} Maybe [Blueprint]
a -> BatchGetBlueprintsResponse
s {$sel:blueprints:BatchGetBlueprintsResponse' :: Maybe [Blueprint]
blueprints = Maybe [Blueprint]
a} :: BatchGetBlueprintsResponse) ((Maybe [Blueprint] -> f (Maybe [Blueprint]))
 -> BatchGetBlueprintsResponse -> f BatchGetBlueprintsResponse)
-> ((Maybe [Blueprint] -> f (Maybe [Blueprint]))
    -> Maybe [Blueprint] -> f (Maybe [Blueprint]))
-> (Maybe [Blueprint] -> f (Maybe [Blueprint]))
-> BatchGetBlueprintsResponse
-> f BatchGetBlueprintsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Blueprint] [Blueprint] [Blueprint] [Blueprint]
-> Iso
     (Maybe [Blueprint])
     (Maybe [Blueprint])
     (Maybe [Blueprint])
     (Maybe [Blueprint])
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 [Blueprint] [Blueprint] [Blueprint] [Blueprint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Returns a list of @BlueprintNames@ that were not found.
batchGetBlueprintsResponse_missingBlueprints :: Lens.Lens' BatchGetBlueprintsResponse (Prelude.Maybe [Prelude.Text])
batchGetBlueprintsResponse_missingBlueprints :: (Maybe [Text] -> f (Maybe [Text]))
-> BatchGetBlueprintsResponse -> f BatchGetBlueprintsResponse
batchGetBlueprintsResponse_missingBlueprints = (BatchGetBlueprintsResponse -> Maybe [Text])
-> (BatchGetBlueprintsResponse
    -> Maybe [Text] -> BatchGetBlueprintsResponse)
-> Lens
     BatchGetBlueprintsResponse
     BatchGetBlueprintsResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetBlueprintsResponse' {Maybe [Text]
missingBlueprints :: Maybe [Text]
$sel:missingBlueprints:BatchGetBlueprintsResponse' :: BatchGetBlueprintsResponse -> Maybe [Text]
missingBlueprints} -> Maybe [Text]
missingBlueprints) (\s :: BatchGetBlueprintsResponse
s@BatchGetBlueprintsResponse' {} Maybe [Text]
a -> BatchGetBlueprintsResponse
s {$sel:missingBlueprints:BatchGetBlueprintsResponse' :: Maybe [Text]
missingBlueprints = Maybe [Text]
a} :: BatchGetBlueprintsResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> BatchGetBlueprintsResponse -> f BatchGetBlueprintsResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchGetBlueprintsResponse
-> f BatchGetBlueprintsResponse
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 response's http status code.
batchGetBlueprintsResponse_httpStatus :: Lens.Lens' BatchGetBlueprintsResponse Prelude.Int
batchGetBlueprintsResponse_httpStatus :: (Int -> f Int)
-> BatchGetBlueprintsResponse -> f BatchGetBlueprintsResponse
batchGetBlueprintsResponse_httpStatus = (BatchGetBlueprintsResponse -> Int)
-> (BatchGetBlueprintsResponse
    -> Int -> BatchGetBlueprintsResponse)
-> Lens
     BatchGetBlueprintsResponse BatchGetBlueprintsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetBlueprintsResponse' {Int
httpStatus :: Int
$sel:httpStatus:BatchGetBlueprintsResponse' :: BatchGetBlueprintsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: BatchGetBlueprintsResponse
s@BatchGetBlueprintsResponse' {} Int
a -> BatchGetBlueprintsResponse
s {$sel:httpStatus:BatchGetBlueprintsResponse' :: Int
httpStatus = Int
a} :: BatchGetBlueprintsResponse)

instance Prelude.NFData BatchGetBlueprintsResponse