{-# 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.LicenseManager.GetLicenseConversionTask
-- 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)
--
-- Gets information about the specified license type conversion task.
module Amazonka.LicenseManager.GetLicenseConversionTask
  ( -- * Creating a Request
    GetLicenseConversionTask (..),
    newGetLicenseConversionTask,

    -- * Request Lenses
    getLicenseConversionTask_licenseConversionTaskId,

    -- * Destructuring the Response
    GetLicenseConversionTaskResponse (..),
    newGetLicenseConversionTaskResponse,

    -- * Response Lenses
    getLicenseConversionTaskResponse_status,
    getLicenseConversionTaskResponse_startTime,
    getLicenseConversionTaskResponse_destinationLicenseContext,
    getLicenseConversionTaskResponse_licenseConversionTaskId,
    getLicenseConversionTaskResponse_resourceArn,
    getLicenseConversionTaskResponse_statusMessage,
    getLicenseConversionTaskResponse_endTime,
    getLicenseConversionTaskResponse_licenseConversionTime,
    getLicenseConversionTaskResponse_sourceLicenseContext,
    getLicenseConversionTaskResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LicenseManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetLicenseConversionTask' smart constructor.
data GetLicenseConversionTask = GetLicenseConversionTask'
  { -- | ID of the license type conversion task to retrieve information on.
    GetLicenseConversionTask -> Text
licenseConversionTaskId :: Prelude.Text
  }
  deriving (GetLicenseConversionTask -> GetLicenseConversionTask -> Bool
(GetLicenseConversionTask -> GetLicenseConversionTask -> Bool)
-> (GetLicenseConversionTask -> GetLicenseConversionTask -> Bool)
-> Eq GetLicenseConversionTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLicenseConversionTask -> GetLicenseConversionTask -> Bool
$c/= :: GetLicenseConversionTask -> GetLicenseConversionTask -> Bool
== :: GetLicenseConversionTask -> GetLicenseConversionTask -> Bool
$c== :: GetLicenseConversionTask -> GetLicenseConversionTask -> Bool
Prelude.Eq, ReadPrec [GetLicenseConversionTask]
ReadPrec GetLicenseConversionTask
Int -> ReadS GetLicenseConversionTask
ReadS [GetLicenseConversionTask]
(Int -> ReadS GetLicenseConversionTask)
-> ReadS [GetLicenseConversionTask]
-> ReadPrec GetLicenseConversionTask
-> ReadPrec [GetLicenseConversionTask]
-> Read GetLicenseConversionTask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLicenseConversionTask]
$creadListPrec :: ReadPrec [GetLicenseConversionTask]
readPrec :: ReadPrec GetLicenseConversionTask
$creadPrec :: ReadPrec GetLicenseConversionTask
readList :: ReadS [GetLicenseConversionTask]
$creadList :: ReadS [GetLicenseConversionTask]
readsPrec :: Int -> ReadS GetLicenseConversionTask
$creadsPrec :: Int -> ReadS GetLicenseConversionTask
Prelude.Read, Int -> GetLicenseConversionTask -> ShowS
[GetLicenseConversionTask] -> ShowS
GetLicenseConversionTask -> String
(Int -> GetLicenseConversionTask -> ShowS)
-> (GetLicenseConversionTask -> String)
-> ([GetLicenseConversionTask] -> ShowS)
-> Show GetLicenseConversionTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLicenseConversionTask] -> ShowS
$cshowList :: [GetLicenseConversionTask] -> ShowS
show :: GetLicenseConversionTask -> String
$cshow :: GetLicenseConversionTask -> String
showsPrec :: Int -> GetLicenseConversionTask -> ShowS
$cshowsPrec :: Int -> GetLicenseConversionTask -> ShowS
Prelude.Show, (forall x.
 GetLicenseConversionTask -> Rep GetLicenseConversionTask x)
-> (forall x.
    Rep GetLicenseConversionTask x -> GetLicenseConversionTask)
-> Generic GetLicenseConversionTask
forall x.
Rep GetLicenseConversionTask x -> GetLicenseConversionTask
forall x.
GetLicenseConversionTask -> Rep GetLicenseConversionTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLicenseConversionTask x -> GetLicenseConversionTask
$cfrom :: forall x.
GetLicenseConversionTask -> Rep GetLicenseConversionTask x
Prelude.Generic)

-- |
-- Create a value of 'GetLicenseConversionTask' 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:
--
-- 'licenseConversionTaskId', 'getLicenseConversionTask_licenseConversionTaskId' - ID of the license type conversion task to retrieve information on.
newGetLicenseConversionTask ::
  -- | 'licenseConversionTaskId'
  Prelude.Text ->
  GetLicenseConversionTask
newGetLicenseConversionTask :: Text -> GetLicenseConversionTask
newGetLicenseConversionTask Text
pLicenseConversionTaskId_ =
  GetLicenseConversionTask' :: Text -> GetLicenseConversionTask
GetLicenseConversionTask'
    { $sel:licenseConversionTaskId:GetLicenseConversionTask' :: Text
licenseConversionTaskId =
        Text
pLicenseConversionTaskId_
    }

-- | ID of the license type conversion task to retrieve information on.
getLicenseConversionTask_licenseConversionTaskId :: Lens.Lens' GetLicenseConversionTask Prelude.Text
getLicenseConversionTask_licenseConversionTaskId :: (Text -> f Text)
-> GetLicenseConversionTask -> f GetLicenseConversionTask
getLicenseConversionTask_licenseConversionTaskId = (GetLicenseConversionTask -> Text)
-> (GetLicenseConversionTask -> Text -> GetLicenseConversionTask)
-> Lens GetLicenseConversionTask GetLicenseConversionTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTask' {Text
licenseConversionTaskId :: Text
$sel:licenseConversionTaskId:GetLicenseConversionTask' :: GetLicenseConversionTask -> Text
licenseConversionTaskId} -> Text
licenseConversionTaskId) (\s :: GetLicenseConversionTask
s@GetLicenseConversionTask' {} Text
a -> GetLicenseConversionTask
s {$sel:licenseConversionTaskId:GetLicenseConversionTask' :: Text
licenseConversionTaskId = Text
a} :: GetLicenseConversionTask)

instance Core.AWSRequest GetLicenseConversionTask where
  type
    AWSResponse GetLicenseConversionTask =
      GetLicenseConversionTaskResponse
  request :: GetLicenseConversionTask -> Request GetLicenseConversionTask
request = Service
-> GetLicenseConversionTask -> Request GetLicenseConversionTask
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetLicenseConversionTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetLicenseConversionTask)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetLicenseConversionTask))
-> Logger
-> Service
-> Proxy GetLicenseConversionTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetLicenseConversionTask)))
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 LicenseConversionTaskStatus
-> Maybe POSIX
-> Maybe LicenseConversionContext
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe LicenseConversionContext
-> Int
-> GetLicenseConversionTaskResponse
GetLicenseConversionTaskResponse'
            (Maybe LicenseConversionTaskStatus
 -> Maybe POSIX
 -> Maybe LicenseConversionContext
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe LicenseConversionContext
 -> Int
 -> GetLicenseConversionTaskResponse)
-> Either String (Maybe LicenseConversionTaskStatus)
-> Either
     String
     (Maybe POSIX
      -> Maybe LicenseConversionContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe LicenseConversionContext
      -> Int
      -> GetLicenseConversionTaskResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe LicenseConversionTaskStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe POSIX
   -> Maybe LicenseConversionContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe LicenseConversionContext
   -> Int
   -> GetLicenseConversionTaskResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe LicenseConversionContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe LicenseConversionContext
      -> Int
      -> GetLicenseConversionTaskResponse)
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 LicenseConversionContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe LicenseConversionContext
   -> Int
   -> GetLicenseConversionTaskResponse)
-> Either String (Maybe LicenseConversionContext)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe LicenseConversionContext
      -> Int
      -> GetLicenseConversionTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LicenseConversionContext)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DestinationLicenseContext")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe LicenseConversionContext
   -> Int
   -> GetLicenseConversionTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe LicenseConversionContext
      -> Int
      -> GetLicenseConversionTaskResponse)
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
"LicenseConversionTaskId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe LicenseConversionContext
   -> Int
   -> GetLicenseConversionTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe LicenseConversionContext
      -> Int
      -> GetLicenseConversionTaskResponse)
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
"ResourceArn")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe LicenseConversionContext
   -> Int
   -> GetLicenseConversionTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe LicenseConversionContext
      -> Int
      -> GetLicenseConversionTaskResponse)
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
"StatusMessage")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe LicenseConversionContext
   -> Int
   -> GetLicenseConversionTaskResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe LicenseConversionContext
      -> Int
      -> GetLicenseConversionTaskResponse)
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 POSIX
   -> Maybe LicenseConversionContext
   -> Int
   -> GetLicenseConversionTaskResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe LicenseConversionContext
      -> Int -> GetLicenseConversionTaskResponse)
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
"LicenseConversionTime")
            Either
  String
  (Maybe LicenseConversionContext
   -> Int -> GetLicenseConversionTaskResponse)
-> Either String (Maybe LicenseConversionContext)
-> Either String (Int -> GetLicenseConversionTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LicenseConversionContext)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SourceLicenseContext")
            Either String (Int -> GetLicenseConversionTaskResponse)
-> Either String Int
-> Either String GetLicenseConversionTaskResponse
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 GetLicenseConversionTask

instance Prelude.NFData GetLicenseConversionTask

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

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

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

-- | /See:/ 'newGetLicenseConversionTaskResponse' smart constructor.
data GetLicenseConversionTaskResponse = GetLicenseConversionTaskResponse'
  { -- | Status of the license type conversion task.
    GetLicenseConversionTaskResponse
-> Maybe LicenseConversionTaskStatus
status :: Prelude.Maybe LicenseConversionTaskStatus,
    -- | Time at which the license type conversion task was started .
    GetLicenseConversionTaskResponse -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | Information about the license type converted to.
    GetLicenseConversionTaskResponse -> Maybe LicenseConversionContext
destinationLicenseContext :: Prelude.Maybe LicenseConversionContext,
    -- | ID of the license type conversion task.
    GetLicenseConversionTaskResponse -> Maybe Text
licenseConversionTaskId :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Names (ARN) of the resources the license conversion task
    -- is associated with.
    GetLicenseConversionTaskResponse -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The status message for the conversion task.
    GetLicenseConversionTaskResponse -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | Time at which the license type conversion task was completed.
    GetLicenseConversionTaskResponse -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
    -- | Amount of time to complete the license type conversion.
    GetLicenseConversionTaskResponse -> Maybe POSIX
licenseConversionTime :: Prelude.Maybe Core.POSIX,
    -- | Information about the license type converted from.
    GetLicenseConversionTaskResponse -> Maybe LicenseConversionContext
sourceLicenseContext :: Prelude.Maybe LicenseConversionContext,
    -- | The response's http status code.
    GetLicenseConversionTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetLicenseConversionTaskResponse
-> GetLicenseConversionTaskResponse -> Bool
(GetLicenseConversionTaskResponse
 -> GetLicenseConversionTaskResponse -> Bool)
-> (GetLicenseConversionTaskResponse
    -> GetLicenseConversionTaskResponse -> Bool)
-> Eq GetLicenseConversionTaskResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLicenseConversionTaskResponse
-> GetLicenseConversionTaskResponse -> Bool
$c/= :: GetLicenseConversionTaskResponse
-> GetLicenseConversionTaskResponse -> Bool
== :: GetLicenseConversionTaskResponse
-> GetLicenseConversionTaskResponse -> Bool
$c== :: GetLicenseConversionTaskResponse
-> GetLicenseConversionTaskResponse -> Bool
Prelude.Eq, ReadPrec [GetLicenseConversionTaskResponse]
ReadPrec GetLicenseConversionTaskResponse
Int -> ReadS GetLicenseConversionTaskResponse
ReadS [GetLicenseConversionTaskResponse]
(Int -> ReadS GetLicenseConversionTaskResponse)
-> ReadS [GetLicenseConversionTaskResponse]
-> ReadPrec GetLicenseConversionTaskResponse
-> ReadPrec [GetLicenseConversionTaskResponse]
-> Read GetLicenseConversionTaskResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLicenseConversionTaskResponse]
$creadListPrec :: ReadPrec [GetLicenseConversionTaskResponse]
readPrec :: ReadPrec GetLicenseConversionTaskResponse
$creadPrec :: ReadPrec GetLicenseConversionTaskResponse
readList :: ReadS [GetLicenseConversionTaskResponse]
$creadList :: ReadS [GetLicenseConversionTaskResponse]
readsPrec :: Int -> ReadS GetLicenseConversionTaskResponse
$creadsPrec :: Int -> ReadS GetLicenseConversionTaskResponse
Prelude.Read, Int -> GetLicenseConversionTaskResponse -> ShowS
[GetLicenseConversionTaskResponse] -> ShowS
GetLicenseConversionTaskResponse -> String
(Int -> GetLicenseConversionTaskResponse -> ShowS)
-> (GetLicenseConversionTaskResponse -> String)
-> ([GetLicenseConversionTaskResponse] -> ShowS)
-> Show GetLicenseConversionTaskResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLicenseConversionTaskResponse] -> ShowS
$cshowList :: [GetLicenseConversionTaskResponse] -> ShowS
show :: GetLicenseConversionTaskResponse -> String
$cshow :: GetLicenseConversionTaskResponse -> String
showsPrec :: Int -> GetLicenseConversionTaskResponse -> ShowS
$cshowsPrec :: Int -> GetLicenseConversionTaskResponse -> ShowS
Prelude.Show, (forall x.
 GetLicenseConversionTaskResponse
 -> Rep GetLicenseConversionTaskResponse x)
-> (forall x.
    Rep GetLicenseConversionTaskResponse x
    -> GetLicenseConversionTaskResponse)
-> Generic GetLicenseConversionTaskResponse
forall x.
Rep GetLicenseConversionTaskResponse x
-> GetLicenseConversionTaskResponse
forall x.
GetLicenseConversionTaskResponse
-> Rep GetLicenseConversionTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLicenseConversionTaskResponse x
-> GetLicenseConversionTaskResponse
$cfrom :: forall x.
GetLicenseConversionTaskResponse
-> Rep GetLicenseConversionTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetLicenseConversionTaskResponse' 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', 'getLicenseConversionTaskResponse_status' - Status of the license type conversion task.
--
-- 'startTime', 'getLicenseConversionTaskResponse_startTime' - Time at which the license type conversion task was started .
--
-- 'destinationLicenseContext', 'getLicenseConversionTaskResponse_destinationLicenseContext' - Information about the license type converted to.
--
-- 'licenseConversionTaskId', 'getLicenseConversionTaskResponse_licenseConversionTaskId' - ID of the license type conversion task.
--
-- 'resourceArn', 'getLicenseConversionTaskResponse_resourceArn' - Amazon Resource Names (ARN) of the resources the license conversion task
-- is associated with.
--
-- 'statusMessage', 'getLicenseConversionTaskResponse_statusMessage' - The status message for the conversion task.
--
-- 'endTime', 'getLicenseConversionTaskResponse_endTime' - Time at which the license type conversion task was completed.
--
-- 'licenseConversionTime', 'getLicenseConversionTaskResponse_licenseConversionTime' - Amount of time to complete the license type conversion.
--
-- 'sourceLicenseContext', 'getLicenseConversionTaskResponse_sourceLicenseContext' - Information about the license type converted from.
--
-- 'httpStatus', 'getLicenseConversionTaskResponse_httpStatus' - The response's http status code.
newGetLicenseConversionTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetLicenseConversionTaskResponse
newGetLicenseConversionTaskResponse :: Int -> GetLicenseConversionTaskResponse
newGetLicenseConversionTaskResponse Int
pHttpStatus_ =
  GetLicenseConversionTaskResponse' :: Maybe LicenseConversionTaskStatus
-> Maybe POSIX
-> Maybe LicenseConversionContext
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe LicenseConversionContext
-> Int
-> GetLicenseConversionTaskResponse
GetLicenseConversionTaskResponse'
    { $sel:status:GetLicenseConversionTaskResponse' :: Maybe LicenseConversionTaskStatus
status =
        Maybe LicenseConversionTaskStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:GetLicenseConversionTaskResponse' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationLicenseContext:GetLicenseConversionTaskResponse' :: Maybe LicenseConversionContext
destinationLicenseContext =
        Maybe LicenseConversionContext
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseConversionTaskId:GetLicenseConversionTaskResponse' :: Maybe Text
licenseConversionTaskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:GetLicenseConversionTaskResponse' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:GetLicenseConversionTaskResponse' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:GetLicenseConversionTaskResponse' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseConversionTime:GetLicenseConversionTaskResponse' :: Maybe POSIX
licenseConversionTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLicenseContext:GetLicenseConversionTaskResponse' :: Maybe LicenseConversionContext
sourceLicenseContext = Maybe LicenseConversionContext
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetLicenseConversionTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Status of the license type conversion task.
getLicenseConversionTaskResponse_status :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe LicenseConversionTaskStatus)
getLicenseConversionTaskResponse_status :: (Maybe LicenseConversionTaskStatus
 -> f (Maybe LicenseConversionTaskStatus))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_status = (GetLicenseConversionTaskResponse
 -> Maybe LicenseConversionTaskStatus)
-> (GetLicenseConversionTaskResponse
    -> Maybe LicenseConversionTaskStatus
    -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe LicenseConversionTaskStatus)
     (Maybe LicenseConversionTaskStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe LicenseConversionTaskStatus
status :: Maybe LicenseConversionTaskStatus
$sel:status:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse
-> Maybe LicenseConversionTaskStatus
status} -> Maybe LicenseConversionTaskStatus
status) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe LicenseConversionTaskStatus
a -> GetLicenseConversionTaskResponse
s {$sel:status:GetLicenseConversionTaskResponse' :: Maybe LicenseConversionTaskStatus
status = Maybe LicenseConversionTaskStatus
a} :: GetLicenseConversionTaskResponse)

-- | Time at which the license type conversion task was started .
getLicenseConversionTaskResponse_startTime :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe Prelude.UTCTime)
getLicenseConversionTaskResponse_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_startTime = (GetLicenseConversionTaskResponse -> Maybe POSIX)
-> (GetLicenseConversionTaskResponse
    -> Maybe POSIX -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe POSIX
a -> GetLicenseConversionTaskResponse
s {$sel:startTime:GetLicenseConversionTaskResponse' :: Maybe POSIX
startTime = Maybe POSIX
a} :: GetLicenseConversionTaskResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetLicenseConversionTaskResponse
 -> f GetLicenseConversionTaskResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
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

-- | Information about the license type converted to.
getLicenseConversionTaskResponse_destinationLicenseContext :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe LicenseConversionContext)
getLicenseConversionTaskResponse_destinationLicenseContext :: (Maybe LicenseConversionContext
 -> f (Maybe LicenseConversionContext))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_destinationLicenseContext = (GetLicenseConversionTaskResponse
 -> Maybe LicenseConversionContext)
-> (GetLicenseConversionTaskResponse
    -> Maybe LicenseConversionContext
    -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe LicenseConversionContext)
     (Maybe LicenseConversionContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe LicenseConversionContext
destinationLicenseContext :: Maybe LicenseConversionContext
$sel:destinationLicenseContext:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse -> Maybe LicenseConversionContext
destinationLicenseContext} -> Maybe LicenseConversionContext
destinationLicenseContext) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe LicenseConversionContext
a -> GetLicenseConversionTaskResponse
s {$sel:destinationLicenseContext:GetLicenseConversionTaskResponse' :: Maybe LicenseConversionContext
destinationLicenseContext = Maybe LicenseConversionContext
a} :: GetLicenseConversionTaskResponse)

-- | ID of the license type conversion task.
getLicenseConversionTaskResponse_licenseConversionTaskId :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe Prelude.Text)
getLicenseConversionTaskResponse_licenseConversionTaskId :: (Maybe Text -> f (Maybe Text))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_licenseConversionTaskId = (GetLicenseConversionTaskResponse -> Maybe Text)
-> (GetLicenseConversionTaskResponse
    -> Maybe Text -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe Text
licenseConversionTaskId :: Maybe Text
$sel:licenseConversionTaskId:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse -> Maybe Text
licenseConversionTaskId} -> Maybe Text
licenseConversionTaskId) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe Text
a -> GetLicenseConversionTaskResponse
s {$sel:licenseConversionTaskId:GetLicenseConversionTaskResponse' :: Maybe Text
licenseConversionTaskId = Maybe Text
a} :: GetLicenseConversionTaskResponse)

-- | Amazon Resource Names (ARN) of the resources the license conversion task
-- is associated with.
getLicenseConversionTaskResponse_resourceArn :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe Prelude.Text)
getLicenseConversionTaskResponse_resourceArn :: (Maybe Text -> f (Maybe Text))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_resourceArn = (GetLicenseConversionTaskResponse -> Maybe Text)
-> (GetLicenseConversionTaskResponse
    -> Maybe Text -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe Text
a -> GetLicenseConversionTaskResponse
s {$sel:resourceArn:GetLicenseConversionTaskResponse' :: Maybe Text
resourceArn = Maybe Text
a} :: GetLicenseConversionTaskResponse)

-- | The status message for the conversion task.
getLicenseConversionTaskResponse_statusMessage :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe Prelude.Text)
getLicenseConversionTaskResponse_statusMessage :: (Maybe Text -> f (Maybe Text))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_statusMessage = (GetLicenseConversionTaskResponse -> Maybe Text)
-> (GetLicenseConversionTaskResponse
    -> Maybe Text -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe Text
a -> GetLicenseConversionTaskResponse
s {$sel:statusMessage:GetLicenseConversionTaskResponse' :: Maybe Text
statusMessage = Maybe Text
a} :: GetLicenseConversionTaskResponse)

-- | Time at which the license type conversion task was completed.
getLicenseConversionTaskResponse_endTime :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe Prelude.UTCTime)
getLicenseConversionTaskResponse_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_endTime = (GetLicenseConversionTaskResponse -> Maybe POSIX)
-> (GetLicenseConversionTaskResponse
    -> Maybe POSIX -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe POSIX
a -> GetLicenseConversionTaskResponse
s {$sel:endTime:GetLicenseConversionTaskResponse' :: Maybe POSIX
endTime = Maybe POSIX
a} :: GetLicenseConversionTaskResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetLicenseConversionTaskResponse
 -> f GetLicenseConversionTaskResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
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

-- | Amount of time to complete the license type conversion.
getLicenseConversionTaskResponse_licenseConversionTime :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe Prelude.UTCTime)
getLicenseConversionTaskResponse_licenseConversionTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_licenseConversionTime = (GetLicenseConversionTaskResponse -> Maybe POSIX)
-> (GetLicenseConversionTaskResponse
    -> Maybe POSIX -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe POSIX
licenseConversionTime :: Maybe POSIX
$sel:licenseConversionTime:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse -> Maybe POSIX
licenseConversionTime} -> Maybe POSIX
licenseConversionTime) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe POSIX
a -> GetLicenseConversionTaskResponse
s {$sel:licenseConversionTime:GetLicenseConversionTaskResponse' :: Maybe POSIX
licenseConversionTime = Maybe POSIX
a} :: GetLicenseConversionTaskResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetLicenseConversionTaskResponse
 -> f GetLicenseConversionTaskResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
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

-- | Information about the license type converted from.
getLicenseConversionTaskResponse_sourceLicenseContext :: Lens.Lens' GetLicenseConversionTaskResponse (Prelude.Maybe LicenseConversionContext)
getLicenseConversionTaskResponse_sourceLicenseContext :: (Maybe LicenseConversionContext
 -> f (Maybe LicenseConversionContext))
-> GetLicenseConversionTaskResponse
-> f GetLicenseConversionTaskResponse
getLicenseConversionTaskResponse_sourceLicenseContext = (GetLicenseConversionTaskResponse
 -> Maybe LicenseConversionContext)
-> (GetLicenseConversionTaskResponse
    -> Maybe LicenseConversionContext
    -> GetLicenseConversionTaskResponse)
-> Lens
     GetLicenseConversionTaskResponse
     GetLicenseConversionTaskResponse
     (Maybe LicenseConversionContext)
     (Maybe LicenseConversionContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseConversionTaskResponse' {Maybe LicenseConversionContext
sourceLicenseContext :: Maybe LicenseConversionContext
$sel:sourceLicenseContext:GetLicenseConversionTaskResponse' :: GetLicenseConversionTaskResponse -> Maybe LicenseConversionContext
sourceLicenseContext} -> Maybe LicenseConversionContext
sourceLicenseContext) (\s :: GetLicenseConversionTaskResponse
s@GetLicenseConversionTaskResponse' {} Maybe LicenseConversionContext
a -> GetLicenseConversionTaskResponse
s {$sel:sourceLicenseContext:GetLicenseConversionTaskResponse' :: Maybe LicenseConversionContext
sourceLicenseContext = Maybe LicenseConversionContext
a} :: GetLicenseConversionTaskResponse)

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

instance
  Prelude.NFData
    GetLicenseConversionTaskResponse