{-# 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.CognitoSync.GetBulkPublishDetails
-- 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)
--
-- Get the status of the last BulkPublish operation for an identity pool.
--
-- This API can only be called with developer credentials. You cannot call
-- this API with the temporary user credentials provided by Cognito
-- Identity.
module Amazonka.CognitoSync.GetBulkPublishDetails
  ( -- * Creating a Request
    GetBulkPublishDetails (..),
    newGetBulkPublishDetails,

    -- * Request Lenses
    getBulkPublishDetails_identityPoolId,

    -- * Destructuring the Response
    GetBulkPublishDetailsResponse (..),
    newGetBulkPublishDetailsResponse,

    -- * Response Lenses
    getBulkPublishDetailsResponse_bulkPublishStartTime,
    getBulkPublishDetailsResponse_identityPoolId,
    getBulkPublishDetailsResponse_bulkPublishCompleteTime,
    getBulkPublishDetailsResponse_failureMessage,
    getBulkPublishDetailsResponse_bulkPublishStatus,
    getBulkPublishDetailsResponse_httpStatus,
  )
where

import Amazonka.CognitoSync.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

-- | The input for the GetBulkPublishDetails operation.
--
-- /See:/ 'newGetBulkPublishDetails' smart constructor.
data GetBulkPublishDetails = GetBulkPublishDetails'
  { -- | A name-spaced GUID (for example,
    -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
    -- Cognito. GUID generation is unique within a region.
    GetBulkPublishDetails -> Text
identityPoolId :: Prelude.Text
  }
  deriving (GetBulkPublishDetails -> GetBulkPublishDetails -> Bool
(GetBulkPublishDetails -> GetBulkPublishDetails -> Bool)
-> (GetBulkPublishDetails -> GetBulkPublishDetails -> Bool)
-> Eq GetBulkPublishDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBulkPublishDetails -> GetBulkPublishDetails -> Bool
$c/= :: GetBulkPublishDetails -> GetBulkPublishDetails -> Bool
== :: GetBulkPublishDetails -> GetBulkPublishDetails -> Bool
$c== :: GetBulkPublishDetails -> GetBulkPublishDetails -> Bool
Prelude.Eq, ReadPrec [GetBulkPublishDetails]
ReadPrec GetBulkPublishDetails
Int -> ReadS GetBulkPublishDetails
ReadS [GetBulkPublishDetails]
(Int -> ReadS GetBulkPublishDetails)
-> ReadS [GetBulkPublishDetails]
-> ReadPrec GetBulkPublishDetails
-> ReadPrec [GetBulkPublishDetails]
-> Read GetBulkPublishDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBulkPublishDetails]
$creadListPrec :: ReadPrec [GetBulkPublishDetails]
readPrec :: ReadPrec GetBulkPublishDetails
$creadPrec :: ReadPrec GetBulkPublishDetails
readList :: ReadS [GetBulkPublishDetails]
$creadList :: ReadS [GetBulkPublishDetails]
readsPrec :: Int -> ReadS GetBulkPublishDetails
$creadsPrec :: Int -> ReadS GetBulkPublishDetails
Prelude.Read, Int -> GetBulkPublishDetails -> ShowS
[GetBulkPublishDetails] -> ShowS
GetBulkPublishDetails -> String
(Int -> GetBulkPublishDetails -> ShowS)
-> (GetBulkPublishDetails -> String)
-> ([GetBulkPublishDetails] -> ShowS)
-> Show GetBulkPublishDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBulkPublishDetails] -> ShowS
$cshowList :: [GetBulkPublishDetails] -> ShowS
show :: GetBulkPublishDetails -> String
$cshow :: GetBulkPublishDetails -> String
showsPrec :: Int -> GetBulkPublishDetails -> ShowS
$cshowsPrec :: Int -> GetBulkPublishDetails -> ShowS
Prelude.Show, (forall x. GetBulkPublishDetails -> Rep GetBulkPublishDetails x)
-> (forall x. Rep GetBulkPublishDetails x -> GetBulkPublishDetails)
-> Generic GetBulkPublishDetails
forall x. Rep GetBulkPublishDetails x -> GetBulkPublishDetails
forall x. GetBulkPublishDetails -> Rep GetBulkPublishDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBulkPublishDetails x -> GetBulkPublishDetails
$cfrom :: forall x. GetBulkPublishDetails -> Rep GetBulkPublishDetails x
Prelude.Generic)

-- |
-- Create a value of 'GetBulkPublishDetails' 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:
--
-- 'identityPoolId', 'getBulkPublishDetails_identityPoolId' - A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. GUID generation is unique within a region.
newGetBulkPublishDetails ::
  -- | 'identityPoolId'
  Prelude.Text ->
  GetBulkPublishDetails
newGetBulkPublishDetails :: Text -> GetBulkPublishDetails
newGetBulkPublishDetails Text
pIdentityPoolId_ =
  GetBulkPublishDetails' :: Text -> GetBulkPublishDetails
GetBulkPublishDetails'
    { $sel:identityPoolId:GetBulkPublishDetails' :: Text
identityPoolId =
        Text
pIdentityPoolId_
    }

-- | A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. GUID generation is unique within a region.
getBulkPublishDetails_identityPoolId :: Lens.Lens' GetBulkPublishDetails Prelude.Text
getBulkPublishDetails_identityPoolId :: (Text -> f Text)
-> GetBulkPublishDetails -> f GetBulkPublishDetails
getBulkPublishDetails_identityPoolId = (GetBulkPublishDetails -> Text)
-> (GetBulkPublishDetails -> Text -> GetBulkPublishDetails)
-> Lens GetBulkPublishDetails GetBulkPublishDetails Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkPublishDetails' {Text
identityPoolId :: Text
$sel:identityPoolId:GetBulkPublishDetails' :: GetBulkPublishDetails -> Text
identityPoolId} -> Text
identityPoolId) (\s :: GetBulkPublishDetails
s@GetBulkPublishDetails' {} Text
a -> GetBulkPublishDetails
s {$sel:identityPoolId:GetBulkPublishDetails' :: Text
identityPoolId = Text
a} :: GetBulkPublishDetails)

instance Core.AWSRequest GetBulkPublishDetails where
  type
    AWSResponse GetBulkPublishDetails =
      GetBulkPublishDetailsResponse
  request :: GetBulkPublishDetails -> Request GetBulkPublishDetails
request = Service -> GetBulkPublishDetails -> Request GetBulkPublishDetails
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetBulkPublishDetails
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBulkPublishDetails)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetBulkPublishDetails))
-> Logger
-> Service
-> Proxy GetBulkPublishDetails
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetBulkPublishDetails)))
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 POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe BulkPublishStatus
-> Int
-> GetBulkPublishDetailsResponse
GetBulkPublishDetailsResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe BulkPublishStatus
 -> Int
 -> GetBulkPublishDetailsResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe BulkPublishStatus
      -> Int
      -> GetBulkPublishDetailsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BulkPublishStartTime")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe BulkPublishStatus
   -> Int
   -> GetBulkPublishDetailsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe BulkPublishStatus
      -> Int
      -> GetBulkPublishDetailsResponse)
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
"IdentityPoolId")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe BulkPublishStatus
   -> Int
   -> GetBulkPublishDetailsResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe BulkPublishStatus -> Int -> GetBulkPublishDetailsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BulkPublishCompleteTime")
            Either
  String
  (Maybe Text
   -> Maybe BulkPublishStatus -> Int -> GetBulkPublishDetailsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe BulkPublishStatus -> Int -> GetBulkPublishDetailsResponse)
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
"FailureMessage")
            Either
  String
  (Maybe BulkPublishStatus -> Int -> GetBulkPublishDetailsResponse)
-> Either String (Maybe BulkPublishStatus)
-> Either String (Int -> GetBulkPublishDetailsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe BulkPublishStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"BulkPublishStatus")
            Either String (Int -> GetBulkPublishDetailsResponse)
-> Either String Int -> Either String GetBulkPublishDetailsResponse
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 GetBulkPublishDetails

instance Prelude.NFData GetBulkPublishDetails

instance Core.ToHeaders GetBulkPublishDetails where
  toHeaders :: GetBulkPublishDetails -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBulkPublishDetails -> 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.ToJSON GetBulkPublishDetails where
  toJSON :: GetBulkPublishDetails -> Value
toJSON = Value -> GetBulkPublishDetails -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)

instance Core.ToPath GetBulkPublishDetails where
  toPath :: GetBulkPublishDetails -> ByteString
toPath GetBulkPublishDetails' {Text
identityPoolId :: Text
$sel:identityPoolId:GetBulkPublishDetails' :: GetBulkPublishDetails -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/identitypools/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
identityPoolId,
        ByteString
"/getBulkPublishDetails"
      ]

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

-- | The output for the GetBulkPublishDetails operation.
--
-- /See:/ 'newGetBulkPublishDetailsResponse' smart constructor.
data GetBulkPublishDetailsResponse = GetBulkPublishDetailsResponse'
  { -- | The date\/time at which the last bulk publish was initiated.
    GetBulkPublishDetailsResponse -> Maybe POSIX
bulkPublishStartTime :: Prelude.Maybe Core.POSIX,
    -- | A name-spaced GUID (for example,
    -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
    -- Cognito. GUID generation is unique within a region.
    GetBulkPublishDetailsResponse -> Maybe Text
identityPoolId :: Prelude.Maybe Prelude.Text,
    -- | If BulkPublishStatus is SUCCEEDED, the time the last bulk publish
    -- operation completed.
    GetBulkPublishDetailsResponse -> Maybe POSIX
bulkPublishCompleteTime :: Prelude.Maybe Core.POSIX,
    -- | If BulkPublishStatus is FAILED this field will contain the error message
    -- that caused the bulk publish to fail.
    GetBulkPublishDetailsResponse -> Maybe Text
failureMessage :: Prelude.Maybe Prelude.Text,
    -- | Status of the last bulk publish operation, valid values are:
    --
    -- NOT_STARTED - No bulk publish has been requested for this identity pool
    --
    -- IN_PROGRESS - Data is being published to the configured stream
    --
    -- SUCCEEDED - All data for the identity pool has been published to the
    -- configured stream
    --
    -- FAILED - Some portion of the data has failed to publish, check
    -- FailureMessage for the cause.
    GetBulkPublishDetailsResponse -> Maybe BulkPublishStatus
bulkPublishStatus :: Prelude.Maybe BulkPublishStatus,
    -- | The response's http status code.
    GetBulkPublishDetailsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBulkPublishDetailsResponse
-> GetBulkPublishDetailsResponse -> Bool
(GetBulkPublishDetailsResponse
 -> GetBulkPublishDetailsResponse -> Bool)
-> (GetBulkPublishDetailsResponse
    -> GetBulkPublishDetailsResponse -> Bool)
-> Eq GetBulkPublishDetailsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBulkPublishDetailsResponse
-> GetBulkPublishDetailsResponse -> Bool
$c/= :: GetBulkPublishDetailsResponse
-> GetBulkPublishDetailsResponse -> Bool
== :: GetBulkPublishDetailsResponse
-> GetBulkPublishDetailsResponse -> Bool
$c== :: GetBulkPublishDetailsResponse
-> GetBulkPublishDetailsResponse -> Bool
Prelude.Eq, ReadPrec [GetBulkPublishDetailsResponse]
ReadPrec GetBulkPublishDetailsResponse
Int -> ReadS GetBulkPublishDetailsResponse
ReadS [GetBulkPublishDetailsResponse]
(Int -> ReadS GetBulkPublishDetailsResponse)
-> ReadS [GetBulkPublishDetailsResponse]
-> ReadPrec GetBulkPublishDetailsResponse
-> ReadPrec [GetBulkPublishDetailsResponse]
-> Read GetBulkPublishDetailsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBulkPublishDetailsResponse]
$creadListPrec :: ReadPrec [GetBulkPublishDetailsResponse]
readPrec :: ReadPrec GetBulkPublishDetailsResponse
$creadPrec :: ReadPrec GetBulkPublishDetailsResponse
readList :: ReadS [GetBulkPublishDetailsResponse]
$creadList :: ReadS [GetBulkPublishDetailsResponse]
readsPrec :: Int -> ReadS GetBulkPublishDetailsResponse
$creadsPrec :: Int -> ReadS GetBulkPublishDetailsResponse
Prelude.Read, Int -> GetBulkPublishDetailsResponse -> ShowS
[GetBulkPublishDetailsResponse] -> ShowS
GetBulkPublishDetailsResponse -> String
(Int -> GetBulkPublishDetailsResponse -> ShowS)
-> (GetBulkPublishDetailsResponse -> String)
-> ([GetBulkPublishDetailsResponse] -> ShowS)
-> Show GetBulkPublishDetailsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBulkPublishDetailsResponse] -> ShowS
$cshowList :: [GetBulkPublishDetailsResponse] -> ShowS
show :: GetBulkPublishDetailsResponse -> String
$cshow :: GetBulkPublishDetailsResponse -> String
showsPrec :: Int -> GetBulkPublishDetailsResponse -> ShowS
$cshowsPrec :: Int -> GetBulkPublishDetailsResponse -> ShowS
Prelude.Show, (forall x.
 GetBulkPublishDetailsResponse
 -> Rep GetBulkPublishDetailsResponse x)
-> (forall x.
    Rep GetBulkPublishDetailsResponse x
    -> GetBulkPublishDetailsResponse)
-> Generic GetBulkPublishDetailsResponse
forall x.
Rep GetBulkPublishDetailsResponse x
-> GetBulkPublishDetailsResponse
forall x.
GetBulkPublishDetailsResponse
-> Rep GetBulkPublishDetailsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBulkPublishDetailsResponse x
-> GetBulkPublishDetailsResponse
$cfrom :: forall x.
GetBulkPublishDetailsResponse
-> Rep GetBulkPublishDetailsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBulkPublishDetailsResponse' 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:
--
-- 'bulkPublishStartTime', 'getBulkPublishDetailsResponse_bulkPublishStartTime' - The date\/time at which the last bulk publish was initiated.
--
-- 'identityPoolId', 'getBulkPublishDetailsResponse_identityPoolId' - A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. GUID generation is unique within a region.
--
-- 'bulkPublishCompleteTime', 'getBulkPublishDetailsResponse_bulkPublishCompleteTime' - If BulkPublishStatus is SUCCEEDED, the time the last bulk publish
-- operation completed.
--
-- 'failureMessage', 'getBulkPublishDetailsResponse_failureMessage' - If BulkPublishStatus is FAILED this field will contain the error message
-- that caused the bulk publish to fail.
--
-- 'bulkPublishStatus', 'getBulkPublishDetailsResponse_bulkPublishStatus' - Status of the last bulk publish operation, valid values are:
--
-- NOT_STARTED - No bulk publish has been requested for this identity pool
--
-- IN_PROGRESS - Data is being published to the configured stream
--
-- SUCCEEDED - All data for the identity pool has been published to the
-- configured stream
--
-- FAILED - Some portion of the data has failed to publish, check
-- FailureMessage for the cause.
--
-- 'httpStatus', 'getBulkPublishDetailsResponse_httpStatus' - The response's http status code.
newGetBulkPublishDetailsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBulkPublishDetailsResponse
newGetBulkPublishDetailsResponse :: Int -> GetBulkPublishDetailsResponse
newGetBulkPublishDetailsResponse Int
pHttpStatus_ =
  GetBulkPublishDetailsResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe BulkPublishStatus
-> Int
-> GetBulkPublishDetailsResponse
GetBulkPublishDetailsResponse'
    { $sel:bulkPublishStartTime:GetBulkPublishDetailsResponse' :: Maybe POSIX
bulkPublishStartTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:identityPoolId:GetBulkPublishDetailsResponse' :: Maybe Text
identityPoolId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bulkPublishCompleteTime:GetBulkPublishDetailsResponse' :: Maybe POSIX
bulkPublishCompleteTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:failureMessage:GetBulkPublishDetailsResponse' :: Maybe Text
failureMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bulkPublishStatus:GetBulkPublishDetailsResponse' :: Maybe BulkPublishStatus
bulkPublishStatus = Maybe BulkPublishStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBulkPublishDetailsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date\/time at which the last bulk publish was initiated.
getBulkPublishDetailsResponse_bulkPublishStartTime :: Lens.Lens' GetBulkPublishDetailsResponse (Prelude.Maybe Prelude.UTCTime)
getBulkPublishDetailsResponse_bulkPublishStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetBulkPublishDetailsResponse -> f GetBulkPublishDetailsResponse
getBulkPublishDetailsResponse_bulkPublishStartTime = (GetBulkPublishDetailsResponse -> Maybe POSIX)
-> (GetBulkPublishDetailsResponse
    -> Maybe POSIX -> GetBulkPublishDetailsResponse)
-> Lens
     GetBulkPublishDetailsResponse
     GetBulkPublishDetailsResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkPublishDetailsResponse' {Maybe POSIX
bulkPublishStartTime :: Maybe POSIX
$sel:bulkPublishStartTime:GetBulkPublishDetailsResponse' :: GetBulkPublishDetailsResponse -> Maybe POSIX
bulkPublishStartTime} -> Maybe POSIX
bulkPublishStartTime) (\s :: GetBulkPublishDetailsResponse
s@GetBulkPublishDetailsResponse' {} Maybe POSIX
a -> GetBulkPublishDetailsResponse
s {$sel:bulkPublishStartTime:GetBulkPublishDetailsResponse' :: Maybe POSIX
bulkPublishStartTime = Maybe POSIX
a} :: GetBulkPublishDetailsResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetBulkPublishDetailsResponse
 -> f GetBulkPublishDetailsResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetBulkPublishDetailsResponse
-> f GetBulkPublishDetailsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. GUID generation is unique within a region.
getBulkPublishDetailsResponse_identityPoolId :: Lens.Lens' GetBulkPublishDetailsResponse (Prelude.Maybe Prelude.Text)
getBulkPublishDetailsResponse_identityPoolId :: (Maybe Text -> f (Maybe Text))
-> GetBulkPublishDetailsResponse -> f GetBulkPublishDetailsResponse
getBulkPublishDetailsResponse_identityPoolId = (GetBulkPublishDetailsResponse -> Maybe Text)
-> (GetBulkPublishDetailsResponse
    -> Maybe Text -> GetBulkPublishDetailsResponse)
-> Lens
     GetBulkPublishDetailsResponse
     GetBulkPublishDetailsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkPublishDetailsResponse' {Maybe Text
identityPoolId :: Maybe Text
$sel:identityPoolId:GetBulkPublishDetailsResponse' :: GetBulkPublishDetailsResponse -> Maybe Text
identityPoolId} -> Maybe Text
identityPoolId) (\s :: GetBulkPublishDetailsResponse
s@GetBulkPublishDetailsResponse' {} Maybe Text
a -> GetBulkPublishDetailsResponse
s {$sel:identityPoolId:GetBulkPublishDetailsResponse' :: Maybe Text
identityPoolId = Maybe Text
a} :: GetBulkPublishDetailsResponse)

-- | If BulkPublishStatus is SUCCEEDED, the time the last bulk publish
-- operation completed.
getBulkPublishDetailsResponse_bulkPublishCompleteTime :: Lens.Lens' GetBulkPublishDetailsResponse (Prelude.Maybe Prelude.UTCTime)
getBulkPublishDetailsResponse_bulkPublishCompleteTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetBulkPublishDetailsResponse -> f GetBulkPublishDetailsResponse
getBulkPublishDetailsResponse_bulkPublishCompleteTime = (GetBulkPublishDetailsResponse -> Maybe POSIX)
-> (GetBulkPublishDetailsResponse
    -> Maybe POSIX -> GetBulkPublishDetailsResponse)
-> Lens
     GetBulkPublishDetailsResponse
     GetBulkPublishDetailsResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkPublishDetailsResponse' {Maybe POSIX
bulkPublishCompleteTime :: Maybe POSIX
$sel:bulkPublishCompleteTime:GetBulkPublishDetailsResponse' :: GetBulkPublishDetailsResponse -> Maybe POSIX
bulkPublishCompleteTime} -> Maybe POSIX
bulkPublishCompleteTime) (\s :: GetBulkPublishDetailsResponse
s@GetBulkPublishDetailsResponse' {} Maybe POSIX
a -> GetBulkPublishDetailsResponse
s {$sel:bulkPublishCompleteTime:GetBulkPublishDetailsResponse' :: Maybe POSIX
bulkPublishCompleteTime = Maybe POSIX
a} :: GetBulkPublishDetailsResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetBulkPublishDetailsResponse
 -> f GetBulkPublishDetailsResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetBulkPublishDetailsResponse
-> f GetBulkPublishDetailsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | If BulkPublishStatus is FAILED this field will contain the error message
-- that caused the bulk publish to fail.
getBulkPublishDetailsResponse_failureMessage :: Lens.Lens' GetBulkPublishDetailsResponse (Prelude.Maybe Prelude.Text)
getBulkPublishDetailsResponse_failureMessage :: (Maybe Text -> f (Maybe Text))
-> GetBulkPublishDetailsResponse -> f GetBulkPublishDetailsResponse
getBulkPublishDetailsResponse_failureMessage = (GetBulkPublishDetailsResponse -> Maybe Text)
-> (GetBulkPublishDetailsResponse
    -> Maybe Text -> GetBulkPublishDetailsResponse)
-> Lens
     GetBulkPublishDetailsResponse
     GetBulkPublishDetailsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkPublishDetailsResponse' {Maybe Text
failureMessage :: Maybe Text
$sel:failureMessage:GetBulkPublishDetailsResponse' :: GetBulkPublishDetailsResponse -> Maybe Text
failureMessage} -> Maybe Text
failureMessage) (\s :: GetBulkPublishDetailsResponse
s@GetBulkPublishDetailsResponse' {} Maybe Text
a -> GetBulkPublishDetailsResponse
s {$sel:failureMessage:GetBulkPublishDetailsResponse' :: Maybe Text
failureMessage = Maybe Text
a} :: GetBulkPublishDetailsResponse)

-- | Status of the last bulk publish operation, valid values are:
--
-- NOT_STARTED - No bulk publish has been requested for this identity pool
--
-- IN_PROGRESS - Data is being published to the configured stream
--
-- SUCCEEDED - All data for the identity pool has been published to the
-- configured stream
--
-- FAILED - Some portion of the data has failed to publish, check
-- FailureMessage for the cause.
getBulkPublishDetailsResponse_bulkPublishStatus :: Lens.Lens' GetBulkPublishDetailsResponse (Prelude.Maybe BulkPublishStatus)
getBulkPublishDetailsResponse_bulkPublishStatus :: (Maybe BulkPublishStatus -> f (Maybe BulkPublishStatus))
-> GetBulkPublishDetailsResponse -> f GetBulkPublishDetailsResponse
getBulkPublishDetailsResponse_bulkPublishStatus = (GetBulkPublishDetailsResponse -> Maybe BulkPublishStatus)
-> (GetBulkPublishDetailsResponse
    -> Maybe BulkPublishStatus -> GetBulkPublishDetailsResponse)
-> Lens
     GetBulkPublishDetailsResponse
     GetBulkPublishDetailsResponse
     (Maybe BulkPublishStatus)
     (Maybe BulkPublishStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBulkPublishDetailsResponse' {Maybe BulkPublishStatus
bulkPublishStatus :: Maybe BulkPublishStatus
$sel:bulkPublishStatus:GetBulkPublishDetailsResponse' :: GetBulkPublishDetailsResponse -> Maybe BulkPublishStatus
bulkPublishStatus} -> Maybe BulkPublishStatus
bulkPublishStatus) (\s :: GetBulkPublishDetailsResponse
s@GetBulkPublishDetailsResponse' {} Maybe BulkPublishStatus
a -> GetBulkPublishDetailsResponse
s {$sel:bulkPublishStatus:GetBulkPublishDetailsResponse' :: Maybe BulkPublishStatus
bulkPublishStatus = Maybe BulkPublishStatus
a} :: GetBulkPublishDetailsResponse)

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

instance Prelude.NFData GetBulkPublishDetailsResponse