{-# 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.Greengrass.GetBulkDeploymentStatus
-- 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)
--
-- Returns the status of a bulk deployment.
module Amazonka.Greengrass.GetBulkDeploymentStatus
  ( -- * Creating a Request
    GetBulkDeploymentStatus (..),
    newGetBulkDeploymentStatus,

    -- * Request Lenses
    getBulkDeploymentStatus_bulkDeploymentId,

    -- * Destructuring the Response
    GetBulkDeploymentStatusResponse (..),
    newGetBulkDeploymentStatusResponse,

    -- * Response Lenses
    getBulkDeploymentStatusResponse_createdAt,
    getBulkDeploymentStatusResponse_errorDetails,
    getBulkDeploymentStatusResponse_bulkDeploymentStatus,
    getBulkDeploymentStatusResponse_errorMessage,
    getBulkDeploymentStatusResponse_bulkDeploymentMetrics,
    getBulkDeploymentStatusResponse_tags,
    getBulkDeploymentStatusResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Greengrass.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:/ 'newGetBulkDeploymentStatus' smart constructor.
data GetBulkDeploymentStatus = GetBulkDeploymentStatus'
  { -- | The ID of the bulk deployment.
    GetBulkDeploymentStatus -> Text
bulkDeploymentId :: Prelude.Text
  }
  deriving (GetBulkDeploymentStatus -> GetBulkDeploymentStatus -> Bool
(GetBulkDeploymentStatus -> GetBulkDeploymentStatus -> Bool)
-> (GetBulkDeploymentStatus -> GetBulkDeploymentStatus -> Bool)
-> Eq GetBulkDeploymentStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBulkDeploymentStatus -> GetBulkDeploymentStatus -> Bool
$c/= :: GetBulkDeploymentStatus -> GetBulkDeploymentStatus -> Bool
== :: GetBulkDeploymentStatus -> GetBulkDeploymentStatus -> Bool
$c== :: GetBulkDeploymentStatus -> GetBulkDeploymentStatus -> Bool
Prelude.Eq, ReadPrec [GetBulkDeploymentStatus]
ReadPrec GetBulkDeploymentStatus
Int -> ReadS GetBulkDeploymentStatus
ReadS [GetBulkDeploymentStatus]
(Int -> ReadS GetBulkDeploymentStatus)
-> ReadS [GetBulkDeploymentStatus]
-> ReadPrec GetBulkDeploymentStatus
-> ReadPrec [GetBulkDeploymentStatus]
-> Read GetBulkDeploymentStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBulkDeploymentStatus]
$creadListPrec :: ReadPrec [GetBulkDeploymentStatus]
readPrec :: ReadPrec GetBulkDeploymentStatus
$creadPrec :: ReadPrec GetBulkDeploymentStatus
readList :: ReadS [GetBulkDeploymentStatus]
$creadList :: ReadS [GetBulkDeploymentStatus]
readsPrec :: Int -> ReadS GetBulkDeploymentStatus
$creadsPrec :: Int -> ReadS GetBulkDeploymentStatus
Prelude.Read, Int -> GetBulkDeploymentStatus -> ShowS
[GetBulkDeploymentStatus] -> ShowS
GetBulkDeploymentStatus -> String
(Int -> GetBulkDeploymentStatus -> ShowS)
-> (GetBulkDeploymentStatus -> String)
-> ([GetBulkDeploymentStatus] -> ShowS)
-> Show GetBulkDeploymentStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBulkDeploymentStatus] -> ShowS
$cshowList :: [GetBulkDeploymentStatus] -> ShowS
show :: GetBulkDeploymentStatus -> String
$cshow :: GetBulkDeploymentStatus -> String
showsPrec :: Int -> GetBulkDeploymentStatus -> ShowS
$cshowsPrec :: Int -> GetBulkDeploymentStatus -> ShowS
Prelude.Show, (forall x.
 GetBulkDeploymentStatus -> Rep GetBulkDeploymentStatus x)
-> (forall x.
    Rep GetBulkDeploymentStatus x -> GetBulkDeploymentStatus)
-> Generic GetBulkDeploymentStatus
forall x. Rep GetBulkDeploymentStatus x -> GetBulkDeploymentStatus
forall x. GetBulkDeploymentStatus -> Rep GetBulkDeploymentStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBulkDeploymentStatus x -> GetBulkDeploymentStatus
$cfrom :: forall x. GetBulkDeploymentStatus -> Rep GetBulkDeploymentStatus x
Prelude.Generic)

-- |
-- Create a value of 'GetBulkDeploymentStatus' 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:
--
-- 'bulkDeploymentId', 'getBulkDeploymentStatus_bulkDeploymentId' - The ID of the bulk deployment.
newGetBulkDeploymentStatus ::
  -- | 'bulkDeploymentId'
  Prelude.Text ->
  GetBulkDeploymentStatus
newGetBulkDeploymentStatus :: Text -> GetBulkDeploymentStatus
newGetBulkDeploymentStatus Text
pBulkDeploymentId_ =
  GetBulkDeploymentStatus' :: Text -> GetBulkDeploymentStatus
GetBulkDeploymentStatus'
    { $sel:bulkDeploymentId:GetBulkDeploymentStatus' :: Text
bulkDeploymentId =
        Text
pBulkDeploymentId_
    }

-- | The ID of the bulk deployment.
getBulkDeploymentStatus_bulkDeploymentId :: Lens.Lens' GetBulkDeploymentStatus Prelude.Text
getBulkDeploymentStatus_bulkDeploymentId :: (Text -> f Text)
-> GetBulkDeploymentStatus -> f GetBulkDeploymentStatus
getBulkDeploymentStatus_bulkDeploymentId = (GetBulkDeploymentStatus -> Text)
-> (GetBulkDeploymentStatus -> Text -> GetBulkDeploymentStatus)
-> Lens GetBulkDeploymentStatus GetBulkDeploymentStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkDeploymentStatus' {Text
bulkDeploymentId :: Text
$sel:bulkDeploymentId:GetBulkDeploymentStatus' :: GetBulkDeploymentStatus -> Text
bulkDeploymentId} -> Text
bulkDeploymentId) (\s :: GetBulkDeploymentStatus
s@GetBulkDeploymentStatus' {} Text
a -> GetBulkDeploymentStatus
s {$sel:bulkDeploymentId:GetBulkDeploymentStatus' :: Text
bulkDeploymentId = Text
a} :: GetBulkDeploymentStatus)

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

instance Prelude.NFData GetBulkDeploymentStatus

instance Core.ToHeaders GetBulkDeploymentStatus where
  toHeaders :: GetBulkDeploymentStatus -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBulkDeploymentStatus -> 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 GetBulkDeploymentStatus where
  toPath :: GetBulkDeploymentStatus -> ByteString
toPath GetBulkDeploymentStatus' {Text
bulkDeploymentId :: Text
$sel:bulkDeploymentId:GetBulkDeploymentStatus' :: GetBulkDeploymentStatus -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/bulk/deployments/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
bulkDeploymentId,
        ByteString
"/status"
      ]

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

-- | /See:/ 'newGetBulkDeploymentStatusResponse' smart constructor.
data GetBulkDeploymentStatusResponse = GetBulkDeploymentStatusResponse'
  { -- | The time, in ISO format, when the deployment was created.
    GetBulkDeploymentStatusResponse -> Maybe Text
createdAt :: Prelude.Maybe Prelude.Text,
    -- | Error details
    GetBulkDeploymentStatusResponse -> Maybe [ErrorDetail]
errorDetails :: Prelude.Maybe [ErrorDetail],
    -- | The status of the bulk deployment.
    GetBulkDeploymentStatusResponse -> Maybe BulkDeploymentStatus
bulkDeploymentStatus :: Prelude.Maybe BulkDeploymentStatus,
    -- | Error message
    GetBulkDeploymentStatusResponse -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | Relevant metrics on input records processed during bulk deployment.
    GetBulkDeploymentStatusResponse -> Maybe BulkDeploymentMetrics
bulkDeploymentMetrics :: Prelude.Maybe BulkDeploymentMetrics,
    -- | Tag(s) attached to the resource arn.
    GetBulkDeploymentStatusResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    GetBulkDeploymentStatusResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBulkDeploymentStatusResponse
-> GetBulkDeploymentStatusResponse -> Bool
(GetBulkDeploymentStatusResponse
 -> GetBulkDeploymentStatusResponse -> Bool)
-> (GetBulkDeploymentStatusResponse
    -> GetBulkDeploymentStatusResponse -> Bool)
-> Eq GetBulkDeploymentStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBulkDeploymentStatusResponse
-> GetBulkDeploymentStatusResponse -> Bool
$c/= :: GetBulkDeploymentStatusResponse
-> GetBulkDeploymentStatusResponse -> Bool
== :: GetBulkDeploymentStatusResponse
-> GetBulkDeploymentStatusResponse -> Bool
$c== :: GetBulkDeploymentStatusResponse
-> GetBulkDeploymentStatusResponse -> Bool
Prelude.Eq, ReadPrec [GetBulkDeploymentStatusResponse]
ReadPrec GetBulkDeploymentStatusResponse
Int -> ReadS GetBulkDeploymentStatusResponse
ReadS [GetBulkDeploymentStatusResponse]
(Int -> ReadS GetBulkDeploymentStatusResponse)
-> ReadS [GetBulkDeploymentStatusResponse]
-> ReadPrec GetBulkDeploymentStatusResponse
-> ReadPrec [GetBulkDeploymentStatusResponse]
-> Read GetBulkDeploymentStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBulkDeploymentStatusResponse]
$creadListPrec :: ReadPrec [GetBulkDeploymentStatusResponse]
readPrec :: ReadPrec GetBulkDeploymentStatusResponse
$creadPrec :: ReadPrec GetBulkDeploymentStatusResponse
readList :: ReadS [GetBulkDeploymentStatusResponse]
$creadList :: ReadS [GetBulkDeploymentStatusResponse]
readsPrec :: Int -> ReadS GetBulkDeploymentStatusResponse
$creadsPrec :: Int -> ReadS GetBulkDeploymentStatusResponse
Prelude.Read, Int -> GetBulkDeploymentStatusResponse -> ShowS
[GetBulkDeploymentStatusResponse] -> ShowS
GetBulkDeploymentStatusResponse -> String
(Int -> GetBulkDeploymentStatusResponse -> ShowS)
-> (GetBulkDeploymentStatusResponse -> String)
-> ([GetBulkDeploymentStatusResponse] -> ShowS)
-> Show GetBulkDeploymentStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBulkDeploymentStatusResponse] -> ShowS
$cshowList :: [GetBulkDeploymentStatusResponse] -> ShowS
show :: GetBulkDeploymentStatusResponse -> String
$cshow :: GetBulkDeploymentStatusResponse -> String
showsPrec :: Int -> GetBulkDeploymentStatusResponse -> ShowS
$cshowsPrec :: Int -> GetBulkDeploymentStatusResponse -> ShowS
Prelude.Show, (forall x.
 GetBulkDeploymentStatusResponse
 -> Rep GetBulkDeploymentStatusResponse x)
-> (forall x.
    Rep GetBulkDeploymentStatusResponse x
    -> GetBulkDeploymentStatusResponse)
-> Generic GetBulkDeploymentStatusResponse
forall x.
Rep GetBulkDeploymentStatusResponse x
-> GetBulkDeploymentStatusResponse
forall x.
GetBulkDeploymentStatusResponse
-> Rep GetBulkDeploymentStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBulkDeploymentStatusResponse x
-> GetBulkDeploymentStatusResponse
$cfrom :: forall x.
GetBulkDeploymentStatusResponse
-> Rep GetBulkDeploymentStatusResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBulkDeploymentStatusResponse' 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:
--
-- 'createdAt', 'getBulkDeploymentStatusResponse_createdAt' - The time, in ISO format, when the deployment was created.
--
-- 'errorDetails', 'getBulkDeploymentStatusResponse_errorDetails' - Error details
--
-- 'bulkDeploymentStatus', 'getBulkDeploymentStatusResponse_bulkDeploymentStatus' - The status of the bulk deployment.
--
-- 'errorMessage', 'getBulkDeploymentStatusResponse_errorMessage' - Error message
--
-- 'bulkDeploymentMetrics', 'getBulkDeploymentStatusResponse_bulkDeploymentMetrics' - Relevant metrics on input records processed during bulk deployment.
--
-- 'tags', 'getBulkDeploymentStatusResponse_tags' - Tag(s) attached to the resource arn.
--
-- 'httpStatus', 'getBulkDeploymentStatusResponse_httpStatus' - The response's http status code.
newGetBulkDeploymentStatusResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBulkDeploymentStatusResponse
newGetBulkDeploymentStatusResponse :: Int -> GetBulkDeploymentStatusResponse
newGetBulkDeploymentStatusResponse Int
pHttpStatus_ =
  GetBulkDeploymentStatusResponse' :: Maybe Text
-> Maybe [ErrorDetail]
-> Maybe BulkDeploymentStatus
-> Maybe Text
-> Maybe BulkDeploymentMetrics
-> Maybe (HashMap Text Text)
-> Int
-> GetBulkDeploymentStatusResponse
GetBulkDeploymentStatusResponse'
    { $sel:createdAt:GetBulkDeploymentStatusResponse' :: Maybe Text
createdAt =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorDetails:GetBulkDeploymentStatusResponse' :: Maybe [ErrorDetail]
errorDetails = Maybe [ErrorDetail]
forall a. Maybe a
Prelude.Nothing,
      $sel:bulkDeploymentStatus:GetBulkDeploymentStatusResponse' :: Maybe BulkDeploymentStatus
bulkDeploymentStatus = Maybe BulkDeploymentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:GetBulkDeploymentStatusResponse' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bulkDeploymentMetrics:GetBulkDeploymentStatusResponse' :: Maybe BulkDeploymentMetrics
bulkDeploymentMetrics = Maybe BulkDeploymentMetrics
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetBulkDeploymentStatusResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBulkDeploymentStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time, in ISO format, when the deployment was created.
getBulkDeploymentStatusResponse_createdAt :: Lens.Lens' GetBulkDeploymentStatusResponse (Prelude.Maybe Prelude.Text)
getBulkDeploymentStatusResponse_createdAt :: (Maybe Text -> f (Maybe Text))
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
getBulkDeploymentStatusResponse_createdAt = (GetBulkDeploymentStatusResponse -> Maybe Text)
-> (GetBulkDeploymentStatusResponse
    -> Maybe Text -> GetBulkDeploymentStatusResponse)
-> Lens
     GetBulkDeploymentStatusResponse
     GetBulkDeploymentStatusResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkDeploymentStatusResponse' {Maybe Text
createdAt :: Maybe Text
$sel:createdAt:GetBulkDeploymentStatusResponse' :: GetBulkDeploymentStatusResponse -> Maybe Text
createdAt} -> Maybe Text
createdAt) (\s :: GetBulkDeploymentStatusResponse
s@GetBulkDeploymentStatusResponse' {} Maybe Text
a -> GetBulkDeploymentStatusResponse
s {$sel:createdAt:GetBulkDeploymentStatusResponse' :: Maybe Text
createdAt = Maybe Text
a} :: GetBulkDeploymentStatusResponse)

-- | Error details
getBulkDeploymentStatusResponse_errorDetails :: Lens.Lens' GetBulkDeploymentStatusResponse (Prelude.Maybe [ErrorDetail])
getBulkDeploymentStatusResponse_errorDetails :: (Maybe [ErrorDetail] -> f (Maybe [ErrorDetail]))
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
getBulkDeploymentStatusResponse_errorDetails = (GetBulkDeploymentStatusResponse -> Maybe [ErrorDetail])
-> (GetBulkDeploymentStatusResponse
    -> Maybe [ErrorDetail] -> GetBulkDeploymentStatusResponse)
-> Lens
     GetBulkDeploymentStatusResponse
     GetBulkDeploymentStatusResponse
     (Maybe [ErrorDetail])
     (Maybe [ErrorDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkDeploymentStatusResponse' {Maybe [ErrorDetail]
errorDetails :: Maybe [ErrorDetail]
$sel:errorDetails:GetBulkDeploymentStatusResponse' :: GetBulkDeploymentStatusResponse -> Maybe [ErrorDetail]
errorDetails} -> Maybe [ErrorDetail]
errorDetails) (\s :: GetBulkDeploymentStatusResponse
s@GetBulkDeploymentStatusResponse' {} Maybe [ErrorDetail]
a -> GetBulkDeploymentStatusResponse
s {$sel:errorDetails:GetBulkDeploymentStatusResponse' :: Maybe [ErrorDetail]
errorDetails = Maybe [ErrorDetail]
a} :: GetBulkDeploymentStatusResponse) ((Maybe [ErrorDetail] -> f (Maybe [ErrorDetail]))
 -> GetBulkDeploymentStatusResponse
 -> f GetBulkDeploymentStatusResponse)
-> ((Maybe [ErrorDetail] -> f (Maybe [ErrorDetail]))
    -> Maybe [ErrorDetail] -> f (Maybe [ErrorDetail]))
-> (Maybe [ErrorDetail] -> f (Maybe [ErrorDetail]))
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ErrorDetail] [ErrorDetail] [ErrorDetail] [ErrorDetail]
-> Iso
     (Maybe [ErrorDetail])
     (Maybe [ErrorDetail])
     (Maybe [ErrorDetail])
     (Maybe [ErrorDetail])
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 [ErrorDetail] [ErrorDetail] [ErrorDetail] [ErrorDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The status of the bulk deployment.
getBulkDeploymentStatusResponse_bulkDeploymentStatus :: Lens.Lens' GetBulkDeploymentStatusResponse (Prelude.Maybe BulkDeploymentStatus)
getBulkDeploymentStatusResponse_bulkDeploymentStatus :: (Maybe BulkDeploymentStatus -> f (Maybe BulkDeploymentStatus))
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
getBulkDeploymentStatusResponse_bulkDeploymentStatus = (GetBulkDeploymentStatusResponse -> Maybe BulkDeploymentStatus)
-> (GetBulkDeploymentStatusResponse
    -> Maybe BulkDeploymentStatus -> GetBulkDeploymentStatusResponse)
-> Lens
     GetBulkDeploymentStatusResponse
     GetBulkDeploymentStatusResponse
     (Maybe BulkDeploymentStatus)
     (Maybe BulkDeploymentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkDeploymentStatusResponse' {Maybe BulkDeploymentStatus
bulkDeploymentStatus :: Maybe BulkDeploymentStatus
$sel:bulkDeploymentStatus:GetBulkDeploymentStatusResponse' :: GetBulkDeploymentStatusResponse -> Maybe BulkDeploymentStatus
bulkDeploymentStatus} -> Maybe BulkDeploymentStatus
bulkDeploymentStatus) (\s :: GetBulkDeploymentStatusResponse
s@GetBulkDeploymentStatusResponse' {} Maybe BulkDeploymentStatus
a -> GetBulkDeploymentStatusResponse
s {$sel:bulkDeploymentStatus:GetBulkDeploymentStatusResponse' :: Maybe BulkDeploymentStatus
bulkDeploymentStatus = Maybe BulkDeploymentStatus
a} :: GetBulkDeploymentStatusResponse)

-- | Error message
getBulkDeploymentStatusResponse_errorMessage :: Lens.Lens' GetBulkDeploymentStatusResponse (Prelude.Maybe Prelude.Text)
getBulkDeploymentStatusResponse_errorMessage :: (Maybe Text -> f (Maybe Text))
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
getBulkDeploymentStatusResponse_errorMessage = (GetBulkDeploymentStatusResponse -> Maybe Text)
-> (GetBulkDeploymentStatusResponse
    -> Maybe Text -> GetBulkDeploymentStatusResponse)
-> Lens
     GetBulkDeploymentStatusResponse
     GetBulkDeploymentStatusResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkDeploymentStatusResponse' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:GetBulkDeploymentStatusResponse' :: GetBulkDeploymentStatusResponse -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: GetBulkDeploymentStatusResponse
s@GetBulkDeploymentStatusResponse' {} Maybe Text
a -> GetBulkDeploymentStatusResponse
s {$sel:errorMessage:GetBulkDeploymentStatusResponse' :: Maybe Text
errorMessage = Maybe Text
a} :: GetBulkDeploymentStatusResponse)

-- | Relevant metrics on input records processed during bulk deployment.
getBulkDeploymentStatusResponse_bulkDeploymentMetrics :: Lens.Lens' GetBulkDeploymentStatusResponse (Prelude.Maybe BulkDeploymentMetrics)
getBulkDeploymentStatusResponse_bulkDeploymentMetrics :: (Maybe BulkDeploymentMetrics -> f (Maybe BulkDeploymentMetrics))
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
getBulkDeploymentStatusResponse_bulkDeploymentMetrics = (GetBulkDeploymentStatusResponse -> Maybe BulkDeploymentMetrics)
-> (GetBulkDeploymentStatusResponse
    -> Maybe BulkDeploymentMetrics -> GetBulkDeploymentStatusResponse)
-> Lens
     GetBulkDeploymentStatusResponse
     GetBulkDeploymentStatusResponse
     (Maybe BulkDeploymentMetrics)
     (Maybe BulkDeploymentMetrics)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkDeploymentStatusResponse' {Maybe BulkDeploymentMetrics
bulkDeploymentMetrics :: Maybe BulkDeploymentMetrics
$sel:bulkDeploymentMetrics:GetBulkDeploymentStatusResponse' :: GetBulkDeploymentStatusResponse -> Maybe BulkDeploymentMetrics
bulkDeploymentMetrics} -> Maybe BulkDeploymentMetrics
bulkDeploymentMetrics) (\s :: GetBulkDeploymentStatusResponse
s@GetBulkDeploymentStatusResponse' {} Maybe BulkDeploymentMetrics
a -> GetBulkDeploymentStatusResponse
s {$sel:bulkDeploymentMetrics:GetBulkDeploymentStatusResponse' :: Maybe BulkDeploymentMetrics
bulkDeploymentMetrics = Maybe BulkDeploymentMetrics
a} :: GetBulkDeploymentStatusResponse)

-- | Tag(s) attached to the resource arn.
getBulkDeploymentStatusResponse_tags :: Lens.Lens' GetBulkDeploymentStatusResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getBulkDeploymentStatusResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
getBulkDeploymentStatusResponse_tags = (GetBulkDeploymentStatusResponse -> Maybe (HashMap Text Text))
-> (GetBulkDeploymentStatusResponse
    -> Maybe (HashMap Text Text) -> GetBulkDeploymentStatusResponse)
-> Lens
     GetBulkDeploymentStatusResponse
     GetBulkDeploymentStatusResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkDeploymentStatusResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetBulkDeploymentStatusResponse' :: GetBulkDeploymentStatusResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetBulkDeploymentStatusResponse
s@GetBulkDeploymentStatusResponse' {} Maybe (HashMap Text Text)
a -> GetBulkDeploymentStatusResponse
s {$sel:tags:GetBulkDeploymentStatusResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetBulkDeploymentStatusResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetBulkDeploymentStatusResponse
 -> f GetBulkDeploymentStatusResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap 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.
getBulkDeploymentStatusResponse_httpStatus :: Lens.Lens' GetBulkDeploymentStatusResponse Prelude.Int
getBulkDeploymentStatusResponse_httpStatus :: (Int -> f Int)
-> GetBulkDeploymentStatusResponse
-> f GetBulkDeploymentStatusResponse
getBulkDeploymentStatusResponse_httpStatus = (GetBulkDeploymentStatusResponse -> Int)
-> (GetBulkDeploymentStatusResponse
    -> Int -> GetBulkDeploymentStatusResponse)
-> Lens
     GetBulkDeploymentStatusResponse
     GetBulkDeploymentStatusResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkDeploymentStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetBulkDeploymentStatusResponse' :: GetBulkDeploymentStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetBulkDeploymentStatusResponse
s@GetBulkDeploymentStatusResponse' {} Int
a -> GetBulkDeploymentStatusResponse
s {$sel:httpStatus:GetBulkDeploymentStatusResponse' :: Int
httpStatus = Int
a} :: GetBulkDeploymentStatusResponse)

instance
  Prelude.NFData
    GetBulkDeploymentStatusResponse