{-# 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.WorkMail.DescribeMailboxExportJob
-- 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)
--
-- Describes the current status of a mailbox export job.
module Amazonka.WorkMail.DescribeMailboxExportJob
  ( -- * Creating a Request
    DescribeMailboxExportJob (..),
    newDescribeMailboxExportJob,

    -- * Request Lenses
    describeMailboxExportJob_jobId,
    describeMailboxExportJob_organizationId,

    -- * Destructuring the Response
    DescribeMailboxExportJobResponse (..),
    newDescribeMailboxExportJobResponse,

    -- * Response Lenses
    describeMailboxExportJobResponse_state,
    describeMailboxExportJobResponse_kmsKeyArn,
    describeMailboxExportJobResponse_startTime,
    describeMailboxExportJobResponse_estimatedProgress,
    describeMailboxExportJobResponse_endTime,
    describeMailboxExportJobResponse_s3Path,
    describeMailboxExportJobResponse_s3Prefix,
    describeMailboxExportJobResponse_entityId,
    describeMailboxExportJobResponse_description,
    describeMailboxExportJobResponse_errorInfo,
    describeMailboxExportJobResponse_s3BucketName,
    describeMailboxExportJobResponse_roleArn,
    describeMailboxExportJobResponse_httpStatus,
  )
where

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
import Amazonka.WorkMail.Types

-- | /See:/ 'newDescribeMailboxExportJob' smart constructor.
data DescribeMailboxExportJob = DescribeMailboxExportJob'
  { -- | The mailbox export job ID.
    DescribeMailboxExportJob -> Text
jobId :: Prelude.Text,
    -- | The organization ID.
    DescribeMailboxExportJob -> Text
organizationId :: Prelude.Text
  }
  deriving (DescribeMailboxExportJob -> DescribeMailboxExportJob -> Bool
(DescribeMailboxExportJob -> DescribeMailboxExportJob -> Bool)
-> (DescribeMailboxExportJob -> DescribeMailboxExportJob -> Bool)
-> Eq DescribeMailboxExportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMailboxExportJob -> DescribeMailboxExportJob -> Bool
$c/= :: DescribeMailboxExportJob -> DescribeMailboxExportJob -> Bool
== :: DescribeMailboxExportJob -> DescribeMailboxExportJob -> Bool
$c== :: DescribeMailboxExportJob -> DescribeMailboxExportJob -> Bool
Prelude.Eq, ReadPrec [DescribeMailboxExportJob]
ReadPrec DescribeMailboxExportJob
Int -> ReadS DescribeMailboxExportJob
ReadS [DescribeMailboxExportJob]
(Int -> ReadS DescribeMailboxExportJob)
-> ReadS [DescribeMailboxExportJob]
-> ReadPrec DescribeMailboxExportJob
-> ReadPrec [DescribeMailboxExportJob]
-> Read DescribeMailboxExportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMailboxExportJob]
$creadListPrec :: ReadPrec [DescribeMailboxExportJob]
readPrec :: ReadPrec DescribeMailboxExportJob
$creadPrec :: ReadPrec DescribeMailboxExportJob
readList :: ReadS [DescribeMailboxExportJob]
$creadList :: ReadS [DescribeMailboxExportJob]
readsPrec :: Int -> ReadS DescribeMailboxExportJob
$creadsPrec :: Int -> ReadS DescribeMailboxExportJob
Prelude.Read, Int -> DescribeMailboxExportJob -> ShowS
[DescribeMailboxExportJob] -> ShowS
DescribeMailboxExportJob -> String
(Int -> DescribeMailboxExportJob -> ShowS)
-> (DescribeMailboxExportJob -> String)
-> ([DescribeMailboxExportJob] -> ShowS)
-> Show DescribeMailboxExportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMailboxExportJob] -> ShowS
$cshowList :: [DescribeMailboxExportJob] -> ShowS
show :: DescribeMailboxExportJob -> String
$cshow :: DescribeMailboxExportJob -> String
showsPrec :: Int -> DescribeMailboxExportJob -> ShowS
$cshowsPrec :: Int -> DescribeMailboxExportJob -> ShowS
Prelude.Show, (forall x.
 DescribeMailboxExportJob -> Rep DescribeMailboxExportJob x)
-> (forall x.
    Rep DescribeMailboxExportJob x -> DescribeMailboxExportJob)
-> Generic DescribeMailboxExportJob
forall x.
Rep DescribeMailboxExportJob x -> DescribeMailboxExportJob
forall x.
DescribeMailboxExportJob -> Rep DescribeMailboxExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMailboxExportJob x -> DescribeMailboxExportJob
$cfrom :: forall x.
DescribeMailboxExportJob -> Rep DescribeMailboxExportJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMailboxExportJob' 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:
--
-- 'jobId', 'describeMailboxExportJob_jobId' - The mailbox export job ID.
--
-- 'organizationId', 'describeMailboxExportJob_organizationId' - The organization ID.
newDescribeMailboxExportJob ::
  -- | 'jobId'
  Prelude.Text ->
  -- | 'organizationId'
  Prelude.Text ->
  DescribeMailboxExportJob
newDescribeMailboxExportJob :: Text -> Text -> DescribeMailboxExportJob
newDescribeMailboxExportJob Text
pJobId_ Text
pOrganizationId_ =
  DescribeMailboxExportJob' :: Text -> Text -> DescribeMailboxExportJob
DescribeMailboxExportJob'
    { $sel:jobId:DescribeMailboxExportJob' :: Text
jobId = Text
pJobId_,
      $sel:organizationId:DescribeMailboxExportJob' :: Text
organizationId = Text
pOrganizationId_
    }

-- | The mailbox export job ID.
describeMailboxExportJob_jobId :: Lens.Lens' DescribeMailboxExportJob Prelude.Text
describeMailboxExportJob_jobId :: (Text -> f Text)
-> DescribeMailboxExportJob -> f DescribeMailboxExportJob
describeMailboxExportJob_jobId = (DescribeMailboxExportJob -> Text)
-> (DescribeMailboxExportJob -> Text -> DescribeMailboxExportJob)
-> Lens DescribeMailboxExportJob DescribeMailboxExportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJob' {Text
jobId :: Text
$sel:jobId:DescribeMailboxExportJob' :: DescribeMailboxExportJob -> Text
jobId} -> Text
jobId) (\s :: DescribeMailboxExportJob
s@DescribeMailboxExportJob' {} Text
a -> DescribeMailboxExportJob
s {$sel:jobId:DescribeMailboxExportJob' :: Text
jobId = Text
a} :: DescribeMailboxExportJob)

-- | The organization ID.
describeMailboxExportJob_organizationId :: Lens.Lens' DescribeMailboxExportJob Prelude.Text
describeMailboxExportJob_organizationId :: (Text -> f Text)
-> DescribeMailboxExportJob -> f DescribeMailboxExportJob
describeMailboxExportJob_organizationId = (DescribeMailboxExportJob -> Text)
-> (DescribeMailboxExportJob -> Text -> DescribeMailboxExportJob)
-> Lens DescribeMailboxExportJob DescribeMailboxExportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJob' {Text
organizationId :: Text
$sel:organizationId:DescribeMailboxExportJob' :: DescribeMailboxExportJob -> Text
organizationId} -> Text
organizationId) (\s :: DescribeMailboxExportJob
s@DescribeMailboxExportJob' {} Text
a -> DescribeMailboxExportJob
s {$sel:organizationId:DescribeMailboxExportJob' :: Text
organizationId = Text
a} :: DescribeMailboxExportJob)

instance Core.AWSRequest DescribeMailboxExportJob where
  type
    AWSResponse DescribeMailboxExportJob =
      DescribeMailboxExportJobResponse
  request :: DescribeMailboxExportJob -> Request DescribeMailboxExportJob
request = Service
-> DescribeMailboxExportJob -> Request DescribeMailboxExportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeMailboxExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMailboxExportJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeMailboxExportJob))
-> Logger
-> Service
-> Proxy DescribeMailboxExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMailboxExportJob)))
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 MailboxExportJobState
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeMailboxExportJobResponse
DescribeMailboxExportJobResponse'
            (Maybe MailboxExportJobState
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Natural
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeMailboxExportJobResponse)
-> Either String (Maybe MailboxExportJobState)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe MailboxExportJobState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"State")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
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
"KmsKeyArn")
            Either
  String
  (Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
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
"StartTime")
            Either
  String
  (Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EstimatedProgress")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
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
"EndTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
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
"S3Path")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
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
"S3Prefix")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
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
"EntityId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeMailboxExportJobResponse)
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
"Description")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> DescribeMailboxExportJobResponse)
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
"ErrorInfo")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> DescribeMailboxExportJobResponse)
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
"S3BucketName")
            Either
  String (Maybe Text -> Int -> DescribeMailboxExportJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeMailboxExportJobResponse)
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
"RoleArn")
            Either String (Int -> DescribeMailboxExportJobResponse)
-> Either String Int
-> Either String DescribeMailboxExportJobResponse
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 DescribeMailboxExportJob

instance Prelude.NFData DescribeMailboxExportJob

instance Core.ToHeaders DescribeMailboxExportJob where
  toHeaders :: DescribeMailboxExportJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeMailboxExportJob -> 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
"WorkMailService.DescribeMailboxExportJob" ::
                          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 DescribeMailboxExportJob where
  toJSON :: DescribeMailboxExportJob -> Value
toJSON DescribeMailboxExportJob' {Text
organizationId :: Text
jobId :: Text
$sel:organizationId:DescribeMailboxExportJob' :: DescribeMailboxExportJob -> Text
$sel:jobId:DescribeMailboxExportJob' :: DescribeMailboxExportJob -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"JobId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"OrganizationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
organizationId)
          ]
      )

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

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

-- | /See:/ 'newDescribeMailboxExportJobResponse' smart constructor.
data DescribeMailboxExportJobResponse = DescribeMailboxExportJobResponse'
  { -- | The state of the mailbox export job.
    DescribeMailboxExportJobResponse -> Maybe MailboxExportJobState
state :: Prelude.Maybe MailboxExportJobState,
    -- | The Amazon Resource Name (ARN) of the symmetric AWS Key Management
    -- Service (AWS KMS) key that encrypts the exported mailbox content.
    DescribeMailboxExportJobResponse -> Maybe Text
kmsKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The mailbox export job start timestamp.
    DescribeMailboxExportJobResponse -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | The estimated progress of the mailbox export job, in percentage points.
    DescribeMailboxExportJobResponse -> Maybe Natural
estimatedProgress :: Prelude.Maybe Prelude.Natural,
    -- | The mailbox export job end timestamp.
    DescribeMailboxExportJobResponse -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
    -- | The path to the S3 bucket and file that the mailbox export job is
    -- exporting to.
    DescribeMailboxExportJobResponse -> Maybe Text
s3Path :: Prelude.Maybe Prelude.Text,
    -- | The S3 bucket prefix.
    DescribeMailboxExportJobResponse -> Maybe Text
s3Prefix :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the user or resource associated with the mailbox.
    DescribeMailboxExportJobResponse -> Maybe Text
entityId :: Prelude.Maybe Prelude.Text,
    -- | The mailbox export job description.
    DescribeMailboxExportJobResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Error information for failed mailbox export jobs.
    DescribeMailboxExportJobResponse -> Maybe Text
errorInfo :: Prelude.Maybe Prelude.Text,
    -- | The name of the S3 bucket.
    DescribeMailboxExportJobResponse -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the AWS Identity and Access Management (IAM) role that grants
    -- write permission to the Amazon Simple Storage Service (Amazon S3)
    -- bucket.
    DescribeMailboxExportJobResponse -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeMailboxExportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeMailboxExportJobResponse
-> DescribeMailboxExportJobResponse -> Bool
(DescribeMailboxExportJobResponse
 -> DescribeMailboxExportJobResponse -> Bool)
-> (DescribeMailboxExportJobResponse
    -> DescribeMailboxExportJobResponse -> Bool)
-> Eq DescribeMailboxExportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMailboxExportJobResponse
-> DescribeMailboxExportJobResponse -> Bool
$c/= :: DescribeMailboxExportJobResponse
-> DescribeMailboxExportJobResponse -> Bool
== :: DescribeMailboxExportJobResponse
-> DescribeMailboxExportJobResponse -> Bool
$c== :: DescribeMailboxExportJobResponse
-> DescribeMailboxExportJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMailboxExportJobResponse]
ReadPrec DescribeMailboxExportJobResponse
Int -> ReadS DescribeMailboxExportJobResponse
ReadS [DescribeMailboxExportJobResponse]
(Int -> ReadS DescribeMailboxExportJobResponse)
-> ReadS [DescribeMailboxExportJobResponse]
-> ReadPrec DescribeMailboxExportJobResponse
-> ReadPrec [DescribeMailboxExportJobResponse]
-> Read DescribeMailboxExportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMailboxExportJobResponse]
$creadListPrec :: ReadPrec [DescribeMailboxExportJobResponse]
readPrec :: ReadPrec DescribeMailboxExportJobResponse
$creadPrec :: ReadPrec DescribeMailboxExportJobResponse
readList :: ReadS [DescribeMailboxExportJobResponse]
$creadList :: ReadS [DescribeMailboxExportJobResponse]
readsPrec :: Int -> ReadS DescribeMailboxExportJobResponse
$creadsPrec :: Int -> ReadS DescribeMailboxExportJobResponse
Prelude.Read, Int -> DescribeMailboxExportJobResponse -> ShowS
[DescribeMailboxExportJobResponse] -> ShowS
DescribeMailboxExportJobResponse -> String
(Int -> DescribeMailboxExportJobResponse -> ShowS)
-> (DescribeMailboxExportJobResponse -> String)
-> ([DescribeMailboxExportJobResponse] -> ShowS)
-> Show DescribeMailboxExportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMailboxExportJobResponse] -> ShowS
$cshowList :: [DescribeMailboxExportJobResponse] -> ShowS
show :: DescribeMailboxExportJobResponse -> String
$cshow :: DescribeMailboxExportJobResponse -> String
showsPrec :: Int -> DescribeMailboxExportJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeMailboxExportJobResponse -> ShowS
Prelude.Show, (forall x.
 DescribeMailboxExportJobResponse
 -> Rep DescribeMailboxExportJobResponse x)
-> (forall x.
    Rep DescribeMailboxExportJobResponse x
    -> DescribeMailboxExportJobResponse)
-> Generic DescribeMailboxExportJobResponse
forall x.
Rep DescribeMailboxExportJobResponse x
-> DescribeMailboxExportJobResponse
forall x.
DescribeMailboxExportJobResponse
-> Rep DescribeMailboxExportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMailboxExportJobResponse x
-> DescribeMailboxExportJobResponse
$cfrom :: forall x.
DescribeMailboxExportJobResponse
-> Rep DescribeMailboxExportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMailboxExportJobResponse' 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:
--
-- 'state', 'describeMailboxExportJobResponse_state' - The state of the mailbox export job.
--
-- 'kmsKeyArn', 'describeMailboxExportJobResponse_kmsKeyArn' - The Amazon Resource Name (ARN) of the symmetric AWS Key Management
-- Service (AWS KMS) key that encrypts the exported mailbox content.
--
-- 'startTime', 'describeMailboxExportJobResponse_startTime' - The mailbox export job start timestamp.
--
-- 'estimatedProgress', 'describeMailboxExportJobResponse_estimatedProgress' - The estimated progress of the mailbox export job, in percentage points.
--
-- 'endTime', 'describeMailboxExportJobResponse_endTime' - The mailbox export job end timestamp.
--
-- 's3Path', 'describeMailboxExportJobResponse_s3Path' - The path to the S3 bucket and file that the mailbox export job is
-- exporting to.
--
-- 's3Prefix', 'describeMailboxExportJobResponse_s3Prefix' - The S3 bucket prefix.
--
-- 'entityId', 'describeMailboxExportJobResponse_entityId' - The identifier of the user or resource associated with the mailbox.
--
-- 'description', 'describeMailboxExportJobResponse_description' - The mailbox export job description.
--
-- 'errorInfo', 'describeMailboxExportJobResponse_errorInfo' - Error information for failed mailbox export jobs.
--
-- 's3BucketName', 'describeMailboxExportJobResponse_s3BucketName' - The name of the S3 bucket.
--
-- 'roleArn', 'describeMailboxExportJobResponse_roleArn' - The ARN of the AWS Identity and Access Management (IAM) role that grants
-- write permission to the Amazon Simple Storage Service (Amazon S3)
-- bucket.
--
-- 'httpStatus', 'describeMailboxExportJobResponse_httpStatus' - The response's http status code.
newDescribeMailboxExportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeMailboxExportJobResponse
newDescribeMailboxExportJobResponse :: Int -> DescribeMailboxExportJobResponse
newDescribeMailboxExportJobResponse Int
pHttpStatus_ =
  DescribeMailboxExportJobResponse' :: Maybe MailboxExportJobState
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeMailboxExportJobResponse
DescribeMailboxExportJobResponse'
    { $sel:state:DescribeMailboxExportJobResponse' :: Maybe MailboxExportJobState
state =
        Maybe MailboxExportJobState
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyArn:DescribeMailboxExportJobResponse' :: Maybe Text
kmsKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:DescribeMailboxExportJobResponse' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedProgress:DescribeMailboxExportJobResponse' :: Maybe Natural
estimatedProgress = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:DescribeMailboxExportJobResponse' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:s3Path:DescribeMailboxExportJobResponse' :: Maybe Text
s3Path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3Prefix:DescribeMailboxExportJobResponse' :: Maybe Text
s3Prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:entityId:DescribeMailboxExportJobResponse' :: Maybe Text
entityId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeMailboxExportJobResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorInfo:DescribeMailboxExportJobResponse' :: Maybe Text
errorInfo = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3BucketName:DescribeMailboxExportJobResponse' :: Maybe Text
s3BucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:DescribeMailboxExportJobResponse' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeMailboxExportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The state of the mailbox export job.
describeMailboxExportJobResponse_state :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe MailboxExportJobState)
describeMailboxExportJobResponse_state :: (Maybe MailboxExportJobState -> f (Maybe MailboxExportJobState))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_state = (DescribeMailboxExportJobResponse -> Maybe MailboxExportJobState)
-> (DescribeMailboxExportJobResponse
    -> Maybe MailboxExportJobState -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe MailboxExportJobState)
     (Maybe MailboxExportJobState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe MailboxExportJobState
state :: Maybe MailboxExportJobState
$sel:state:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe MailboxExportJobState
state} -> Maybe MailboxExportJobState
state) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe MailboxExportJobState
a -> DescribeMailboxExportJobResponse
s {$sel:state:DescribeMailboxExportJobResponse' :: Maybe MailboxExportJobState
state = Maybe MailboxExportJobState
a} :: DescribeMailboxExportJobResponse)

-- | The Amazon Resource Name (ARN) of the symmetric AWS Key Management
-- Service (AWS KMS) key that encrypts the exported mailbox content.
describeMailboxExportJobResponse_kmsKeyArn :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Text)
describeMailboxExportJobResponse_kmsKeyArn :: (Maybe Text -> f (Maybe Text))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_kmsKeyArn = (DescribeMailboxExportJobResponse -> Maybe Text)
-> (DescribeMailboxExportJobResponse
    -> Maybe Text -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Text
kmsKeyArn :: Maybe Text
$sel:kmsKeyArn:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Text
kmsKeyArn} -> Maybe Text
kmsKeyArn) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Text
a -> DescribeMailboxExportJobResponse
s {$sel:kmsKeyArn:DescribeMailboxExportJobResponse' :: Maybe Text
kmsKeyArn = Maybe Text
a} :: DescribeMailboxExportJobResponse)

-- | The mailbox export job start timestamp.
describeMailboxExportJobResponse_startTime :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.UTCTime)
describeMailboxExportJobResponse_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_startTime = (DescribeMailboxExportJobResponse -> Maybe POSIX)
-> (DescribeMailboxExportJobResponse
    -> Maybe POSIX -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe POSIX
a -> DescribeMailboxExportJobResponse
s {$sel:startTime:DescribeMailboxExportJobResponse' :: Maybe POSIX
startTime = Maybe POSIX
a} :: DescribeMailboxExportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeMailboxExportJobResponse
 -> f DescribeMailboxExportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
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

-- | The estimated progress of the mailbox export job, in percentage points.
describeMailboxExportJobResponse_estimatedProgress :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Natural)
describeMailboxExportJobResponse_estimatedProgress :: (Maybe Natural -> f (Maybe Natural))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_estimatedProgress = (DescribeMailboxExportJobResponse -> Maybe Natural)
-> (DescribeMailboxExportJobResponse
    -> Maybe Natural -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Natural
estimatedProgress :: Maybe Natural
$sel:estimatedProgress:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Natural
estimatedProgress} -> Maybe Natural
estimatedProgress) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Natural
a -> DescribeMailboxExportJobResponse
s {$sel:estimatedProgress:DescribeMailboxExportJobResponse' :: Maybe Natural
estimatedProgress = Maybe Natural
a} :: DescribeMailboxExportJobResponse)

-- | The mailbox export job end timestamp.
describeMailboxExportJobResponse_endTime :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.UTCTime)
describeMailboxExportJobResponse_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_endTime = (DescribeMailboxExportJobResponse -> Maybe POSIX)
-> (DescribeMailboxExportJobResponse
    -> Maybe POSIX -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe POSIX
a -> DescribeMailboxExportJobResponse
s {$sel:endTime:DescribeMailboxExportJobResponse' :: Maybe POSIX
endTime = Maybe POSIX
a} :: DescribeMailboxExportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeMailboxExportJobResponse
 -> f DescribeMailboxExportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
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

-- | The path to the S3 bucket and file that the mailbox export job is
-- exporting to.
describeMailboxExportJobResponse_s3Path :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Text)
describeMailboxExportJobResponse_s3Path :: (Maybe Text -> f (Maybe Text))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_s3Path = (DescribeMailboxExportJobResponse -> Maybe Text)
-> (DescribeMailboxExportJobResponse
    -> Maybe Text -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Text
s3Path :: Maybe Text
$sel:s3Path:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Text
s3Path} -> Maybe Text
s3Path) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Text
a -> DescribeMailboxExportJobResponse
s {$sel:s3Path:DescribeMailboxExportJobResponse' :: Maybe Text
s3Path = Maybe Text
a} :: DescribeMailboxExportJobResponse)

-- | The S3 bucket prefix.
describeMailboxExportJobResponse_s3Prefix :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Text)
describeMailboxExportJobResponse_s3Prefix :: (Maybe Text -> f (Maybe Text))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_s3Prefix = (DescribeMailboxExportJobResponse -> Maybe Text)
-> (DescribeMailboxExportJobResponse
    -> Maybe Text -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Text
s3Prefix :: Maybe Text
$sel:s3Prefix:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Text
s3Prefix} -> Maybe Text
s3Prefix) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Text
a -> DescribeMailboxExportJobResponse
s {$sel:s3Prefix:DescribeMailboxExportJobResponse' :: Maybe Text
s3Prefix = Maybe Text
a} :: DescribeMailboxExportJobResponse)

-- | The identifier of the user or resource associated with the mailbox.
describeMailboxExportJobResponse_entityId :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Text)
describeMailboxExportJobResponse_entityId :: (Maybe Text -> f (Maybe Text))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_entityId = (DescribeMailboxExportJobResponse -> Maybe Text)
-> (DescribeMailboxExportJobResponse
    -> Maybe Text -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Text
entityId :: Maybe Text
$sel:entityId:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Text
entityId} -> Maybe Text
entityId) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Text
a -> DescribeMailboxExportJobResponse
s {$sel:entityId:DescribeMailboxExportJobResponse' :: Maybe Text
entityId = Maybe Text
a} :: DescribeMailboxExportJobResponse)

-- | The mailbox export job description.
describeMailboxExportJobResponse_description :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Text)
describeMailboxExportJobResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_description = (DescribeMailboxExportJobResponse -> Maybe Text)
-> (DescribeMailboxExportJobResponse
    -> Maybe Text -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Text
a -> DescribeMailboxExportJobResponse
s {$sel:description:DescribeMailboxExportJobResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeMailboxExportJobResponse)

-- | Error information for failed mailbox export jobs.
describeMailboxExportJobResponse_errorInfo :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Text)
describeMailboxExportJobResponse_errorInfo :: (Maybe Text -> f (Maybe Text))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_errorInfo = (DescribeMailboxExportJobResponse -> Maybe Text)
-> (DescribeMailboxExportJobResponse
    -> Maybe Text -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Text
errorInfo :: Maybe Text
$sel:errorInfo:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Text
errorInfo} -> Maybe Text
errorInfo) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Text
a -> DescribeMailboxExportJobResponse
s {$sel:errorInfo:DescribeMailboxExportJobResponse' :: Maybe Text
errorInfo = Maybe Text
a} :: DescribeMailboxExportJobResponse)

-- | The name of the S3 bucket.
describeMailboxExportJobResponse_s3BucketName :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Text)
describeMailboxExportJobResponse_s3BucketName :: (Maybe Text -> f (Maybe Text))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_s3BucketName = (DescribeMailboxExportJobResponse -> Maybe Text)
-> (DescribeMailboxExportJobResponse
    -> Maybe Text -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Text
a -> DescribeMailboxExportJobResponse
s {$sel:s3BucketName:DescribeMailboxExportJobResponse' :: Maybe Text
s3BucketName = Maybe Text
a} :: DescribeMailboxExportJobResponse)

-- | The ARN of the AWS Identity and Access Management (IAM) role that grants
-- write permission to the Amazon Simple Storage Service (Amazon S3)
-- bucket.
describeMailboxExportJobResponse_roleArn :: Lens.Lens' DescribeMailboxExportJobResponse (Prelude.Maybe Prelude.Text)
describeMailboxExportJobResponse_roleArn :: (Maybe Text -> f (Maybe Text))
-> DescribeMailboxExportJobResponse
-> f DescribeMailboxExportJobResponse
describeMailboxExportJobResponse_roleArn = (DescribeMailboxExportJobResponse -> Maybe Text)
-> (DescribeMailboxExportJobResponse
    -> Maybe Text -> DescribeMailboxExportJobResponse)
-> Lens
     DescribeMailboxExportJobResponse
     DescribeMailboxExportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMailboxExportJobResponse' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:DescribeMailboxExportJobResponse' :: DescribeMailboxExportJobResponse -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: DescribeMailboxExportJobResponse
s@DescribeMailboxExportJobResponse' {} Maybe Text
a -> DescribeMailboxExportJobResponse
s {$sel:roleArn:DescribeMailboxExportJobResponse' :: Maybe Text
roleArn = Maybe Text
a} :: DescribeMailboxExportJobResponse)

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

instance
  Prelude.NFData
    DescribeMailboxExportJobResponse