{-# 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.Route53Domains.GetOperationDetail
-- 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)
--
-- This operation returns the current status of an operation that is not
-- completed.
module Amazonka.Route53Domains.GetOperationDetail
  ( -- * Creating a Request
    GetOperationDetail (..),
    newGetOperationDetail,

    -- * Request Lenses
    getOperationDetail_operationId,

    -- * Destructuring the Response
    GetOperationDetailResponse (..),
    newGetOperationDetailResponse,

    -- * Response Lenses
    getOperationDetailResponse_status,
    getOperationDetailResponse_submittedDate,
    getOperationDetailResponse_domainName,
    getOperationDetailResponse_operationId,
    getOperationDetailResponse_type,
    getOperationDetailResponse_message,
    getOperationDetailResponse_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.Route53Domains.Types

-- | The
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_GetOperationDetail.html GetOperationDetail>
-- request includes the following element.
--
-- /See:/ 'newGetOperationDetail' smart constructor.
data GetOperationDetail = GetOperationDetail'
  { -- | The identifier for the operation for which you want to get the status.
    -- Route 53 returned the identifier in the response to the original
    -- request.
    GetOperationDetail -> Text
operationId :: Prelude.Text
  }
  deriving (GetOperationDetail -> GetOperationDetail -> Bool
(GetOperationDetail -> GetOperationDetail -> Bool)
-> (GetOperationDetail -> GetOperationDetail -> Bool)
-> Eq GetOperationDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOperationDetail -> GetOperationDetail -> Bool
$c/= :: GetOperationDetail -> GetOperationDetail -> Bool
== :: GetOperationDetail -> GetOperationDetail -> Bool
$c== :: GetOperationDetail -> GetOperationDetail -> Bool
Prelude.Eq, ReadPrec [GetOperationDetail]
ReadPrec GetOperationDetail
Int -> ReadS GetOperationDetail
ReadS [GetOperationDetail]
(Int -> ReadS GetOperationDetail)
-> ReadS [GetOperationDetail]
-> ReadPrec GetOperationDetail
-> ReadPrec [GetOperationDetail]
-> Read GetOperationDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOperationDetail]
$creadListPrec :: ReadPrec [GetOperationDetail]
readPrec :: ReadPrec GetOperationDetail
$creadPrec :: ReadPrec GetOperationDetail
readList :: ReadS [GetOperationDetail]
$creadList :: ReadS [GetOperationDetail]
readsPrec :: Int -> ReadS GetOperationDetail
$creadsPrec :: Int -> ReadS GetOperationDetail
Prelude.Read, Int -> GetOperationDetail -> ShowS
[GetOperationDetail] -> ShowS
GetOperationDetail -> String
(Int -> GetOperationDetail -> ShowS)
-> (GetOperationDetail -> String)
-> ([GetOperationDetail] -> ShowS)
-> Show GetOperationDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOperationDetail] -> ShowS
$cshowList :: [GetOperationDetail] -> ShowS
show :: GetOperationDetail -> String
$cshow :: GetOperationDetail -> String
showsPrec :: Int -> GetOperationDetail -> ShowS
$cshowsPrec :: Int -> GetOperationDetail -> ShowS
Prelude.Show, (forall x. GetOperationDetail -> Rep GetOperationDetail x)
-> (forall x. Rep GetOperationDetail x -> GetOperationDetail)
-> Generic GetOperationDetail
forall x. Rep GetOperationDetail x -> GetOperationDetail
forall x. GetOperationDetail -> Rep GetOperationDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetOperationDetail x -> GetOperationDetail
$cfrom :: forall x. GetOperationDetail -> Rep GetOperationDetail x
Prelude.Generic)

-- |
-- Create a value of 'GetOperationDetail' 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:
--
-- 'operationId', 'getOperationDetail_operationId' - The identifier for the operation for which you want to get the status.
-- Route 53 returned the identifier in the response to the original
-- request.
newGetOperationDetail ::
  -- | 'operationId'
  Prelude.Text ->
  GetOperationDetail
newGetOperationDetail :: Text -> GetOperationDetail
newGetOperationDetail Text
pOperationId_ =
  GetOperationDetail' :: Text -> GetOperationDetail
GetOperationDetail' {$sel:operationId:GetOperationDetail' :: Text
operationId = Text
pOperationId_}

-- | The identifier for the operation for which you want to get the status.
-- Route 53 returned the identifier in the response to the original
-- request.
getOperationDetail_operationId :: Lens.Lens' GetOperationDetail Prelude.Text
getOperationDetail_operationId :: (Text -> f Text) -> GetOperationDetail -> f GetOperationDetail
getOperationDetail_operationId = (GetOperationDetail -> Text)
-> (GetOperationDetail -> Text -> GetOperationDetail)
-> Lens GetOperationDetail GetOperationDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationDetail' {Text
operationId :: Text
$sel:operationId:GetOperationDetail' :: GetOperationDetail -> Text
operationId} -> Text
operationId) (\s :: GetOperationDetail
s@GetOperationDetail' {} Text
a -> GetOperationDetail
s {$sel:operationId:GetOperationDetail' :: Text
operationId = Text
a} :: GetOperationDetail)

instance Core.AWSRequest GetOperationDetail where
  type
    AWSResponse GetOperationDetail =
      GetOperationDetailResponse
  request :: GetOperationDetail -> Request GetOperationDetail
request = Service -> GetOperationDetail -> Request GetOperationDetail
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetOperationDetail
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetOperationDetail)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetOperationDetail))
-> Logger
-> Service
-> Proxy GetOperationDetail
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetOperationDetail)))
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 OperationStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Text
-> Int
-> GetOperationDetailResponse
GetOperationDetailResponse'
            (Maybe OperationStatus
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe OperationType
 -> Maybe Text
 -> Int
 -> GetOperationDetailResponse)
-> Either String (Maybe OperationStatus)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe OperationType
      -> Maybe Text
      -> Int
      -> GetOperationDetailResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe OperationStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe OperationType
   -> Maybe Text
   -> Int
   -> GetOperationDetailResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe OperationType
      -> Maybe Text
      -> Int
      -> GetOperationDetailResponse)
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
"SubmittedDate")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe OperationType
   -> Maybe Text
   -> Int
   -> GetOperationDetailResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe OperationType
      -> Maybe Text
      -> Int
      -> GetOperationDetailResponse)
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
"DomainName")
            Either
  String
  (Maybe Text
   -> Maybe OperationType
   -> Maybe Text
   -> Int
   -> GetOperationDetailResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe OperationType
      -> Maybe Text -> Int -> GetOperationDetailResponse)
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
"OperationId")
            Either
  String
  (Maybe OperationType
   -> Maybe Text -> Int -> GetOperationDetailResponse)
-> Either String (Maybe OperationType)
-> Either String (Maybe Text -> Int -> GetOperationDetailResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe OperationType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Type")
            Either String (Maybe Text -> Int -> GetOperationDetailResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetOperationDetailResponse)
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
"Message")
            Either String (Int -> GetOperationDetailResponse)
-> Either String Int -> Either String GetOperationDetailResponse
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 GetOperationDetail

instance Prelude.NFData GetOperationDetail

instance Core.ToHeaders GetOperationDetail where
  toHeaders :: GetOperationDetail -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetOperationDetail -> 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
"Route53Domains_v20140515.GetOperationDetail" ::
                          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 GetOperationDetail where
  toJSON :: GetOperationDetail -> Value
toJSON GetOperationDetail' {Text
operationId :: Text
$sel:operationId:GetOperationDetail' :: GetOperationDetail -> 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
"OperationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
operationId)]
      )

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

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

-- | The GetOperationDetail response includes the following elements.
--
-- /See:/ 'newGetOperationDetailResponse' smart constructor.
data GetOperationDetailResponse = GetOperationDetailResponse'
  { -- | The current status of the requested operation in the system.
    GetOperationDetailResponse -> Maybe OperationStatus
status :: Prelude.Maybe OperationStatus,
    -- | The date when the request was submitted.
    GetOperationDetailResponse -> Maybe POSIX
submittedDate :: Prelude.Maybe Core.POSIX,
    -- | The name of a domain.
    GetOperationDetailResponse -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | The identifier for the operation.
    GetOperationDetailResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
    -- | The type of operation that was requested.
    GetOperationDetailResponse -> Maybe OperationType
type' :: Prelude.Maybe OperationType,
    -- | Detailed information on the status including possible errors.
    GetOperationDetailResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetOperationDetailResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetOperationDetailResponse -> GetOperationDetailResponse -> Bool
(GetOperationDetailResponse -> GetOperationDetailResponse -> Bool)
-> (GetOperationDetailResponse
    -> GetOperationDetailResponse -> Bool)
-> Eq GetOperationDetailResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOperationDetailResponse -> GetOperationDetailResponse -> Bool
$c/= :: GetOperationDetailResponse -> GetOperationDetailResponse -> Bool
== :: GetOperationDetailResponse -> GetOperationDetailResponse -> Bool
$c== :: GetOperationDetailResponse -> GetOperationDetailResponse -> Bool
Prelude.Eq, ReadPrec [GetOperationDetailResponse]
ReadPrec GetOperationDetailResponse
Int -> ReadS GetOperationDetailResponse
ReadS [GetOperationDetailResponse]
(Int -> ReadS GetOperationDetailResponse)
-> ReadS [GetOperationDetailResponse]
-> ReadPrec GetOperationDetailResponse
-> ReadPrec [GetOperationDetailResponse]
-> Read GetOperationDetailResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOperationDetailResponse]
$creadListPrec :: ReadPrec [GetOperationDetailResponse]
readPrec :: ReadPrec GetOperationDetailResponse
$creadPrec :: ReadPrec GetOperationDetailResponse
readList :: ReadS [GetOperationDetailResponse]
$creadList :: ReadS [GetOperationDetailResponse]
readsPrec :: Int -> ReadS GetOperationDetailResponse
$creadsPrec :: Int -> ReadS GetOperationDetailResponse
Prelude.Read, Int -> GetOperationDetailResponse -> ShowS
[GetOperationDetailResponse] -> ShowS
GetOperationDetailResponse -> String
(Int -> GetOperationDetailResponse -> ShowS)
-> (GetOperationDetailResponse -> String)
-> ([GetOperationDetailResponse] -> ShowS)
-> Show GetOperationDetailResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOperationDetailResponse] -> ShowS
$cshowList :: [GetOperationDetailResponse] -> ShowS
show :: GetOperationDetailResponse -> String
$cshow :: GetOperationDetailResponse -> String
showsPrec :: Int -> GetOperationDetailResponse -> ShowS
$cshowsPrec :: Int -> GetOperationDetailResponse -> ShowS
Prelude.Show, (forall x.
 GetOperationDetailResponse -> Rep GetOperationDetailResponse x)
-> (forall x.
    Rep GetOperationDetailResponse x -> GetOperationDetailResponse)
-> Generic GetOperationDetailResponse
forall x.
Rep GetOperationDetailResponse x -> GetOperationDetailResponse
forall x.
GetOperationDetailResponse -> Rep GetOperationDetailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOperationDetailResponse x -> GetOperationDetailResponse
$cfrom :: forall x.
GetOperationDetailResponse -> Rep GetOperationDetailResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetOperationDetailResponse' 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:
--
-- 'status', 'getOperationDetailResponse_status' - The current status of the requested operation in the system.
--
-- 'submittedDate', 'getOperationDetailResponse_submittedDate' - The date when the request was submitted.
--
-- 'domainName', 'getOperationDetailResponse_domainName' - The name of a domain.
--
-- 'operationId', 'getOperationDetailResponse_operationId' - The identifier for the operation.
--
-- 'type'', 'getOperationDetailResponse_type' - The type of operation that was requested.
--
-- 'message', 'getOperationDetailResponse_message' - Detailed information on the status including possible errors.
--
-- 'httpStatus', 'getOperationDetailResponse_httpStatus' - The response's http status code.
newGetOperationDetailResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetOperationDetailResponse
newGetOperationDetailResponse :: Int -> GetOperationDetailResponse
newGetOperationDetailResponse Int
pHttpStatus_ =
  GetOperationDetailResponse' :: Maybe OperationStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Text
-> Int
-> GetOperationDetailResponse
GetOperationDetailResponse'
    { $sel:status:GetOperationDetailResponse' :: Maybe OperationStatus
status =
        Maybe OperationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:submittedDate:GetOperationDetailResponse' :: Maybe POSIX
submittedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:GetOperationDetailResponse' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:operationId:GetOperationDetailResponse' :: Maybe Text
operationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':GetOperationDetailResponse' :: Maybe OperationType
type' = Maybe OperationType
forall a. Maybe a
Prelude.Nothing,
      $sel:message:GetOperationDetailResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetOperationDetailResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current status of the requested operation in the system.
getOperationDetailResponse_status :: Lens.Lens' GetOperationDetailResponse (Prelude.Maybe OperationStatus)
getOperationDetailResponse_status :: (Maybe OperationStatus -> f (Maybe OperationStatus))
-> GetOperationDetailResponse -> f GetOperationDetailResponse
getOperationDetailResponse_status = (GetOperationDetailResponse -> Maybe OperationStatus)
-> (GetOperationDetailResponse
    -> Maybe OperationStatus -> GetOperationDetailResponse)
-> Lens
     GetOperationDetailResponse
     GetOperationDetailResponse
     (Maybe OperationStatus)
     (Maybe OperationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationDetailResponse' {Maybe OperationStatus
status :: Maybe OperationStatus
$sel:status:GetOperationDetailResponse' :: GetOperationDetailResponse -> Maybe OperationStatus
status} -> Maybe OperationStatus
status) (\s :: GetOperationDetailResponse
s@GetOperationDetailResponse' {} Maybe OperationStatus
a -> GetOperationDetailResponse
s {$sel:status:GetOperationDetailResponse' :: Maybe OperationStatus
status = Maybe OperationStatus
a} :: GetOperationDetailResponse)

-- | The date when the request was submitted.
getOperationDetailResponse_submittedDate :: Lens.Lens' GetOperationDetailResponse (Prelude.Maybe Prelude.UTCTime)
getOperationDetailResponse_submittedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetOperationDetailResponse -> f GetOperationDetailResponse
getOperationDetailResponse_submittedDate = (GetOperationDetailResponse -> Maybe POSIX)
-> (GetOperationDetailResponse
    -> Maybe POSIX -> GetOperationDetailResponse)
-> Lens
     GetOperationDetailResponse
     GetOperationDetailResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationDetailResponse' {Maybe POSIX
submittedDate :: Maybe POSIX
$sel:submittedDate:GetOperationDetailResponse' :: GetOperationDetailResponse -> Maybe POSIX
submittedDate} -> Maybe POSIX
submittedDate) (\s :: GetOperationDetailResponse
s@GetOperationDetailResponse' {} Maybe POSIX
a -> GetOperationDetailResponse
s {$sel:submittedDate:GetOperationDetailResponse' :: Maybe POSIX
submittedDate = Maybe POSIX
a} :: GetOperationDetailResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetOperationDetailResponse -> f GetOperationDetailResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetOperationDetailResponse
-> f GetOperationDetailResponse
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 name of a domain.
getOperationDetailResponse_domainName :: Lens.Lens' GetOperationDetailResponse (Prelude.Maybe Prelude.Text)
getOperationDetailResponse_domainName :: (Maybe Text -> f (Maybe Text))
-> GetOperationDetailResponse -> f GetOperationDetailResponse
getOperationDetailResponse_domainName = (GetOperationDetailResponse -> Maybe Text)
-> (GetOperationDetailResponse
    -> Maybe Text -> GetOperationDetailResponse)
-> Lens
     GetOperationDetailResponse
     GetOperationDetailResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationDetailResponse' {Maybe Text
domainName :: Maybe Text
$sel:domainName:GetOperationDetailResponse' :: GetOperationDetailResponse -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: GetOperationDetailResponse
s@GetOperationDetailResponse' {} Maybe Text
a -> GetOperationDetailResponse
s {$sel:domainName:GetOperationDetailResponse' :: Maybe Text
domainName = Maybe Text
a} :: GetOperationDetailResponse)

-- | The identifier for the operation.
getOperationDetailResponse_operationId :: Lens.Lens' GetOperationDetailResponse (Prelude.Maybe Prelude.Text)
getOperationDetailResponse_operationId :: (Maybe Text -> f (Maybe Text))
-> GetOperationDetailResponse -> f GetOperationDetailResponse
getOperationDetailResponse_operationId = (GetOperationDetailResponse -> Maybe Text)
-> (GetOperationDetailResponse
    -> Maybe Text -> GetOperationDetailResponse)
-> Lens
     GetOperationDetailResponse
     GetOperationDetailResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationDetailResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:GetOperationDetailResponse' :: GetOperationDetailResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: GetOperationDetailResponse
s@GetOperationDetailResponse' {} Maybe Text
a -> GetOperationDetailResponse
s {$sel:operationId:GetOperationDetailResponse' :: Maybe Text
operationId = Maybe Text
a} :: GetOperationDetailResponse)

-- | The type of operation that was requested.
getOperationDetailResponse_type :: Lens.Lens' GetOperationDetailResponse (Prelude.Maybe OperationType)
getOperationDetailResponse_type :: (Maybe OperationType -> f (Maybe OperationType))
-> GetOperationDetailResponse -> f GetOperationDetailResponse
getOperationDetailResponse_type = (GetOperationDetailResponse -> Maybe OperationType)
-> (GetOperationDetailResponse
    -> Maybe OperationType -> GetOperationDetailResponse)
-> Lens
     GetOperationDetailResponse
     GetOperationDetailResponse
     (Maybe OperationType)
     (Maybe OperationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationDetailResponse' {Maybe OperationType
type' :: Maybe OperationType
$sel:type':GetOperationDetailResponse' :: GetOperationDetailResponse -> Maybe OperationType
type'} -> Maybe OperationType
type') (\s :: GetOperationDetailResponse
s@GetOperationDetailResponse' {} Maybe OperationType
a -> GetOperationDetailResponse
s {$sel:type':GetOperationDetailResponse' :: Maybe OperationType
type' = Maybe OperationType
a} :: GetOperationDetailResponse)

-- | Detailed information on the status including possible errors.
getOperationDetailResponse_message :: Lens.Lens' GetOperationDetailResponse (Prelude.Maybe Prelude.Text)
getOperationDetailResponse_message :: (Maybe Text -> f (Maybe Text))
-> GetOperationDetailResponse -> f GetOperationDetailResponse
getOperationDetailResponse_message = (GetOperationDetailResponse -> Maybe Text)
-> (GetOperationDetailResponse
    -> Maybe Text -> GetOperationDetailResponse)
-> Lens
     GetOperationDetailResponse
     GetOperationDetailResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOperationDetailResponse' {Maybe Text
message :: Maybe Text
$sel:message:GetOperationDetailResponse' :: GetOperationDetailResponse -> Maybe Text
message} -> Maybe Text
message) (\s :: GetOperationDetailResponse
s@GetOperationDetailResponse' {} Maybe Text
a -> GetOperationDetailResponse
s {$sel:message:GetOperationDetailResponse' :: Maybe Text
message = Maybe Text
a} :: GetOperationDetailResponse)

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

instance Prelude.NFData GetOperationDetailResponse