{-# 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.CreateLicenseConversionTaskForResource
-- 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)
--
-- Creates a new license conversion task.
module Amazonka.LicenseManager.CreateLicenseConversionTaskForResource
  ( -- * Creating a Request
    CreateLicenseConversionTaskForResource (..),
    newCreateLicenseConversionTaskForResource,

    -- * Request Lenses
    createLicenseConversionTaskForResource_resourceArn,
    createLicenseConversionTaskForResource_sourceLicenseContext,
    createLicenseConversionTaskForResource_destinationLicenseContext,

    -- * Destructuring the Response
    CreateLicenseConversionTaskForResourceResponse (..),
    newCreateLicenseConversionTaskForResourceResponse,

    -- * Response Lenses
    createLicenseConversionTaskForResourceResponse_licenseConversionTaskId,
    createLicenseConversionTaskForResourceResponse_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:/ 'newCreateLicenseConversionTaskForResource' smart constructor.
data CreateLicenseConversionTaskForResource = CreateLicenseConversionTaskForResource'
  { -- | Amazon Resource Name (ARN) of the resource you are converting the
    -- license type for.
    CreateLicenseConversionTaskForResource -> Text
resourceArn :: Prelude.Text,
    -- | Information that identifies the license type you are converting from.
    -- For the structure of the source license, see
    -- <https://docs.aws.amazon.com/license-manager/latest/userguide/conversion-procedures.html#conversion-cli Convert a license type using the AWS CLI>
    -- in the /License Manager User Guide/.
    CreateLicenseConversionTaskForResource -> LicenseConversionContext
sourceLicenseContext :: LicenseConversionContext,
    -- | Information that identifies the license type you are converting to. For
    -- the structure of the destination license, see
    -- <https://docs.aws.amazon.com/license-manager/latest/userguide/conversion-procedures.html#conversion-cli Convert a license type using the AWS CLI>
    -- in the /License Manager User Guide/.
    CreateLicenseConversionTaskForResource -> LicenseConversionContext
destinationLicenseContext :: LicenseConversionContext
  }
  deriving (CreateLicenseConversionTaskForResource
-> CreateLicenseConversionTaskForResource -> Bool
(CreateLicenseConversionTaskForResource
 -> CreateLicenseConversionTaskForResource -> Bool)
-> (CreateLicenseConversionTaskForResource
    -> CreateLicenseConversionTaskForResource -> Bool)
-> Eq CreateLicenseConversionTaskForResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLicenseConversionTaskForResource
-> CreateLicenseConversionTaskForResource -> Bool
$c/= :: CreateLicenseConversionTaskForResource
-> CreateLicenseConversionTaskForResource -> Bool
== :: CreateLicenseConversionTaskForResource
-> CreateLicenseConversionTaskForResource -> Bool
$c== :: CreateLicenseConversionTaskForResource
-> CreateLicenseConversionTaskForResource -> Bool
Prelude.Eq, ReadPrec [CreateLicenseConversionTaskForResource]
ReadPrec CreateLicenseConversionTaskForResource
Int -> ReadS CreateLicenseConversionTaskForResource
ReadS [CreateLicenseConversionTaskForResource]
(Int -> ReadS CreateLicenseConversionTaskForResource)
-> ReadS [CreateLicenseConversionTaskForResource]
-> ReadPrec CreateLicenseConversionTaskForResource
-> ReadPrec [CreateLicenseConversionTaskForResource]
-> Read CreateLicenseConversionTaskForResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLicenseConversionTaskForResource]
$creadListPrec :: ReadPrec [CreateLicenseConversionTaskForResource]
readPrec :: ReadPrec CreateLicenseConversionTaskForResource
$creadPrec :: ReadPrec CreateLicenseConversionTaskForResource
readList :: ReadS [CreateLicenseConversionTaskForResource]
$creadList :: ReadS [CreateLicenseConversionTaskForResource]
readsPrec :: Int -> ReadS CreateLicenseConversionTaskForResource
$creadsPrec :: Int -> ReadS CreateLicenseConversionTaskForResource
Prelude.Read, Int -> CreateLicenseConversionTaskForResource -> ShowS
[CreateLicenseConversionTaskForResource] -> ShowS
CreateLicenseConversionTaskForResource -> String
(Int -> CreateLicenseConversionTaskForResource -> ShowS)
-> (CreateLicenseConversionTaskForResource -> String)
-> ([CreateLicenseConversionTaskForResource] -> ShowS)
-> Show CreateLicenseConversionTaskForResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLicenseConversionTaskForResource] -> ShowS
$cshowList :: [CreateLicenseConversionTaskForResource] -> ShowS
show :: CreateLicenseConversionTaskForResource -> String
$cshow :: CreateLicenseConversionTaskForResource -> String
showsPrec :: Int -> CreateLicenseConversionTaskForResource -> ShowS
$cshowsPrec :: Int -> CreateLicenseConversionTaskForResource -> ShowS
Prelude.Show, (forall x.
 CreateLicenseConversionTaskForResource
 -> Rep CreateLicenseConversionTaskForResource x)
-> (forall x.
    Rep CreateLicenseConversionTaskForResource x
    -> CreateLicenseConversionTaskForResource)
-> Generic CreateLicenseConversionTaskForResource
forall x.
Rep CreateLicenseConversionTaskForResource x
-> CreateLicenseConversionTaskForResource
forall x.
CreateLicenseConversionTaskForResource
-> Rep CreateLicenseConversionTaskForResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLicenseConversionTaskForResource x
-> CreateLicenseConversionTaskForResource
$cfrom :: forall x.
CreateLicenseConversionTaskForResource
-> Rep CreateLicenseConversionTaskForResource x
Prelude.Generic)

-- |
-- Create a value of 'CreateLicenseConversionTaskForResource' 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:
--
-- 'resourceArn', 'createLicenseConversionTaskForResource_resourceArn' - Amazon Resource Name (ARN) of the resource you are converting the
-- license type for.
--
-- 'sourceLicenseContext', 'createLicenseConversionTaskForResource_sourceLicenseContext' - Information that identifies the license type you are converting from.
-- For the structure of the source license, see
-- <https://docs.aws.amazon.com/license-manager/latest/userguide/conversion-procedures.html#conversion-cli Convert a license type using the AWS CLI>
-- in the /License Manager User Guide/.
--
-- 'destinationLicenseContext', 'createLicenseConversionTaskForResource_destinationLicenseContext' - Information that identifies the license type you are converting to. For
-- the structure of the destination license, see
-- <https://docs.aws.amazon.com/license-manager/latest/userguide/conversion-procedures.html#conversion-cli Convert a license type using the AWS CLI>
-- in the /License Manager User Guide/.
newCreateLicenseConversionTaskForResource ::
  -- | 'resourceArn'
  Prelude.Text ->
  -- | 'sourceLicenseContext'
  LicenseConversionContext ->
  -- | 'destinationLicenseContext'
  LicenseConversionContext ->
  CreateLicenseConversionTaskForResource
newCreateLicenseConversionTaskForResource :: Text
-> LicenseConversionContext
-> LicenseConversionContext
-> CreateLicenseConversionTaskForResource
newCreateLicenseConversionTaskForResource
  Text
pResourceArn_
  LicenseConversionContext
pSourceLicenseContext_
  LicenseConversionContext
pDestinationLicenseContext_ =
    CreateLicenseConversionTaskForResource' :: Text
-> LicenseConversionContext
-> LicenseConversionContext
-> CreateLicenseConversionTaskForResource
CreateLicenseConversionTaskForResource'
      { $sel:resourceArn:CreateLicenseConversionTaskForResource' :: Text
resourceArn =
          Text
pResourceArn_,
        $sel:sourceLicenseContext:CreateLicenseConversionTaskForResource' :: LicenseConversionContext
sourceLicenseContext =
          LicenseConversionContext
pSourceLicenseContext_,
        $sel:destinationLicenseContext:CreateLicenseConversionTaskForResource' :: LicenseConversionContext
destinationLicenseContext =
          LicenseConversionContext
pDestinationLicenseContext_
      }

-- | Amazon Resource Name (ARN) of the resource you are converting the
-- license type for.
createLicenseConversionTaskForResource_resourceArn :: Lens.Lens' CreateLicenseConversionTaskForResource Prelude.Text
createLicenseConversionTaskForResource_resourceArn :: (Text -> f Text)
-> CreateLicenseConversionTaskForResource
-> f CreateLicenseConversionTaskForResource
createLicenseConversionTaskForResource_resourceArn = (CreateLicenseConversionTaskForResource -> Text)
-> (CreateLicenseConversionTaskForResource
    -> Text -> CreateLicenseConversionTaskForResource)
-> Lens
     CreateLicenseConversionTaskForResource
     CreateLicenseConversionTaskForResource
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConversionTaskForResource' {Text
resourceArn :: Text
$sel:resourceArn:CreateLicenseConversionTaskForResource' :: CreateLicenseConversionTaskForResource -> Text
resourceArn} -> Text
resourceArn) (\s :: CreateLicenseConversionTaskForResource
s@CreateLicenseConversionTaskForResource' {} Text
a -> CreateLicenseConversionTaskForResource
s {$sel:resourceArn:CreateLicenseConversionTaskForResource' :: Text
resourceArn = Text
a} :: CreateLicenseConversionTaskForResource)

-- | Information that identifies the license type you are converting from.
-- For the structure of the source license, see
-- <https://docs.aws.amazon.com/license-manager/latest/userguide/conversion-procedures.html#conversion-cli Convert a license type using the AWS CLI>
-- in the /License Manager User Guide/.
createLicenseConversionTaskForResource_sourceLicenseContext :: Lens.Lens' CreateLicenseConversionTaskForResource LicenseConversionContext
createLicenseConversionTaskForResource_sourceLicenseContext :: (LicenseConversionContext -> f LicenseConversionContext)
-> CreateLicenseConversionTaskForResource
-> f CreateLicenseConversionTaskForResource
createLicenseConversionTaskForResource_sourceLicenseContext = (CreateLicenseConversionTaskForResource
 -> LicenseConversionContext)
-> (CreateLicenseConversionTaskForResource
    -> LicenseConversionContext
    -> CreateLicenseConversionTaskForResource)
-> Lens
     CreateLicenseConversionTaskForResource
     CreateLicenseConversionTaskForResource
     LicenseConversionContext
     LicenseConversionContext
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConversionTaskForResource' {LicenseConversionContext
sourceLicenseContext :: LicenseConversionContext
$sel:sourceLicenseContext:CreateLicenseConversionTaskForResource' :: CreateLicenseConversionTaskForResource -> LicenseConversionContext
sourceLicenseContext} -> LicenseConversionContext
sourceLicenseContext) (\s :: CreateLicenseConversionTaskForResource
s@CreateLicenseConversionTaskForResource' {} LicenseConversionContext
a -> CreateLicenseConversionTaskForResource
s {$sel:sourceLicenseContext:CreateLicenseConversionTaskForResource' :: LicenseConversionContext
sourceLicenseContext = LicenseConversionContext
a} :: CreateLicenseConversionTaskForResource)

-- | Information that identifies the license type you are converting to. For
-- the structure of the destination license, see
-- <https://docs.aws.amazon.com/license-manager/latest/userguide/conversion-procedures.html#conversion-cli Convert a license type using the AWS CLI>
-- in the /License Manager User Guide/.
createLicenseConversionTaskForResource_destinationLicenseContext :: Lens.Lens' CreateLicenseConversionTaskForResource LicenseConversionContext
createLicenseConversionTaskForResource_destinationLicenseContext :: (LicenseConversionContext -> f LicenseConversionContext)
-> CreateLicenseConversionTaskForResource
-> f CreateLicenseConversionTaskForResource
createLicenseConversionTaskForResource_destinationLicenseContext = (CreateLicenseConversionTaskForResource
 -> LicenseConversionContext)
-> (CreateLicenseConversionTaskForResource
    -> LicenseConversionContext
    -> CreateLicenseConversionTaskForResource)
-> Lens
     CreateLicenseConversionTaskForResource
     CreateLicenseConversionTaskForResource
     LicenseConversionContext
     LicenseConversionContext
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConversionTaskForResource' {LicenseConversionContext
destinationLicenseContext :: LicenseConversionContext
$sel:destinationLicenseContext:CreateLicenseConversionTaskForResource' :: CreateLicenseConversionTaskForResource -> LicenseConversionContext
destinationLicenseContext} -> LicenseConversionContext
destinationLicenseContext) (\s :: CreateLicenseConversionTaskForResource
s@CreateLicenseConversionTaskForResource' {} LicenseConversionContext
a -> CreateLicenseConversionTaskForResource
s {$sel:destinationLicenseContext:CreateLicenseConversionTaskForResource' :: LicenseConversionContext
destinationLicenseContext = LicenseConversionContext
a} :: CreateLicenseConversionTaskForResource)

instance
  Core.AWSRequest
    CreateLicenseConversionTaskForResource
  where
  type
    AWSResponse
      CreateLicenseConversionTaskForResource =
      CreateLicenseConversionTaskForResourceResponse
  request :: CreateLicenseConversionTaskForResource
-> Request CreateLicenseConversionTaskForResource
request = Service
-> CreateLicenseConversionTaskForResource
-> Request CreateLicenseConversionTaskForResource
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateLicenseConversionTaskForResource
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse CreateLicenseConversionTaskForResource)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse CreateLicenseConversionTaskForResource))
-> Logger
-> Service
-> Proxy CreateLicenseConversionTaskForResource
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse CreateLicenseConversionTaskForResource)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateLicenseConversionTaskForResourceResponse
CreateLicenseConversionTaskForResourceResponse'
            (Maybe Text
 -> Int -> CreateLicenseConversionTaskForResourceResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> CreateLicenseConversionTaskForResourceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LicenseConversionTaskId")
              Either
  String (Int -> CreateLicenseConversionTaskForResourceResponse)
-> Either String Int
-> Either String CreateLicenseConversionTaskForResourceResponse
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
    CreateLicenseConversionTaskForResource

instance
  Prelude.NFData
    CreateLicenseConversionTaskForResource

instance
  Core.ToHeaders
    CreateLicenseConversionTaskForResource
  where
  toHeaders :: CreateLicenseConversionTaskForResource -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> CreateLicenseConversionTaskForResource -> 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.CreateLicenseConversionTaskForResource" ::
                          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
    CreateLicenseConversionTaskForResource
  where
  toJSON :: CreateLicenseConversionTaskForResource -> Value
toJSON CreateLicenseConversionTaskForResource' {Text
LicenseConversionContext
destinationLicenseContext :: LicenseConversionContext
sourceLicenseContext :: LicenseConversionContext
resourceArn :: Text
$sel:destinationLicenseContext:CreateLicenseConversionTaskForResource' :: CreateLicenseConversionTaskForResource -> LicenseConversionContext
$sel:sourceLicenseContext:CreateLicenseConversionTaskForResource' :: CreateLicenseConversionTaskForResource -> LicenseConversionContext
$sel:resourceArn:CreateLicenseConversionTaskForResource' :: CreateLicenseConversionTaskForResource -> 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
"ResourceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"SourceLicenseContext"
                  Text -> LicenseConversionContext -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LicenseConversionContext
sourceLicenseContext
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"DestinationLicenseContext"
                  Text -> LicenseConversionContext -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LicenseConversionContext
destinationLicenseContext
              )
          ]
      )

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

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

-- | /See:/ 'newCreateLicenseConversionTaskForResourceResponse' smart constructor.
data CreateLicenseConversionTaskForResourceResponse = CreateLicenseConversionTaskForResourceResponse'
  { -- | The ID of the created license type conversion task.
    CreateLicenseConversionTaskForResourceResponse -> Maybe Text
licenseConversionTaskId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateLicenseConversionTaskForResourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateLicenseConversionTaskForResourceResponse
-> CreateLicenseConversionTaskForResourceResponse -> Bool
(CreateLicenseConversionTaskForResourceResponse
 -> CreateLicenseConversionTaskForResourceResponse -> Bool)
-> (CreateLicenseConversionTaskForResourceResponse
    -> CreateLicenseConversionTaskForResourceResponse -> Bool)
-> Eq CreateLicenseConversionTaskForResourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLicenseConversionTaskForResourceResponse
-> CreateLicenseConversionTaskForResourceResponse -> Bool
$c/= :: CreateLicenseConversionTaskForResourceResponse
-> CreateLicenseConversionTaskForResourceResponse -> Bool
== :: CreateLicenseConversionTaskForResourceResponse
-> CreateLicenseConversionTaskForResourceResponse -> Bool
$c== :: CreateLicenseConversionTaskForResourceResponse
-> CreateLicenseConversionTaskForResourceResponse -> Bool
Prelude.Eq, ReadPrec [CreateLicenseConversionTaskForResourceResponse]
ReadPrec CreateLicenseConversionTaskForResourceResponse
Int -> ReadS CreateLicenseConversionTaskForResourceResponse
ReadS [CreateLicenseConversionTaskForResourceResponse]
(Int -> ReadS CreateLicenseConversionTaskForResourceResponse)
-> ReadS [CreateLicenseConversionTaskForResourceResponse]
-> ReadPrec CreateLicenseConversionTaskForResourceResponse
-> ReadPrec [CreateLicenseConversionTaskForResourceResponse]
-> Read CreateLicenseConversionTaskForResourceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLicenseConversionTaskForResourceResponse]
$creadListPrec :: ReadPrec [CreateLicenseConversionTaskForResourceResponse]
readPrec :: ReadPrec CreateLicenseConversionTaskForResourceResponse
$creadPrec :: ReadPrec CreateLicenseConversionTaskForResourceResponse
readList :: ReadS [CreateLicenseConversionTaskForResourceResponse]
$creadList :: ReadS [CreateLicenseConversionTaskForResourceResponse]
readsPrec :: Int -> ReadS CreateLicenseConversionTaskForResourceResponse
$creadsPrec :: Int -> ReadS CreateLicenseConversionTaskForResourceResponse
Prelude.Read, Int -> CreateLicenseConversionTaskForResourceResponse -> ShowS
[CreateLicenseConversionTaskForResourceResponse] -> ShowS
CreateLicenseConversionTaskForResourceResponse -> String
(Int -> CreateLicenseConversionTaskForResourceResponse -> ShowS)
-> (CreateLicenseConversionTaskForResourceResponse -> String)
-> ([CreateLicenseConversionTaskForResourceResponse] -> ShowS)
-> Show CreateLicenseConversionTaskForResourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLicenseConversionTaskForResourceResponse] -> ShowS
$cshowList :: [CreateLicenseConversionTaskForResourceResponse] -> ShowS
show :: CreateLicenseConversionTaskForResourceResponse -> String
$cshow :: CreateLicenseConversionTaskForResourceResponse -> String
showsPrec :: Int -> CreateLicenseConversionTaskForResourceResponse -> ShowS
$cshowsPrec :: Int -> CreateLicenseConversionTaskForResourceResponse -> ShowS
Prelude.Show, (forall x.
 CreateLicenseConversionTaskForResourceResponse
 -> Rep CreateLicenseConversionTaskForResourceResponse x)
-> (forall x.
    Rep CreateLicenseConversionTaskForResourceResponse x
    -> CreateLicenseConversionTaskForResourceResponse)
-> Generic CreateLicenseConversionTaskForResourceResponse
forall x.
Rep CreateLicenseConversionTaskForResourceResponse x
-> CreateLicenseConversionTaskForResourceResponse
forall x.
CreateLicenseConversionTaskForResourceResponse
-> Rep CreateLicenseConversionTaskForResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLicenseConversionTaskForResourceResponse x
-> CreateLicenseConversionTaskForResourceResponse
$cfrom :: forall x.
CreateLicenseConversionTaskForResourceResponse
-> Rep CreateLicenseConversionTaskForResourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateLicenseConversionTaskForResourceResponse' 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', 'createLicenseConversionTaskForResourceResponse_licenseConversionTaskId' - The ID of the created license type conversion task.
--
-- 'httpStatus', 'createLicenseConversionTaskForResourceResponse_httpStatus' - The response's http status code.
newCreateLicenseConversionTaskForResourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateLicenseConversionTaskForResourceResponse
newCreateLicenseConversionTaskForResourceResponse :: Int -> CreateLicenseConversionTaskForResourceResponse
newCreateLicenseConversionTaskForResourceResponse
  Int
pHttpStatus_ =
    CreateLicenseConversionTaskForResourceResponse' :: Maybe Text -> Int -> CreateLicenseConversionTaskForResourceResponse
CreateLicenseConversionTaskForResourceResponse'
      { $sel:licenseConversionTaskId:CreateLicenseConversionTaskForResourceResponse' :: Maybe Text
licenseConversionTaskId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:CreateLicenseConversionTaskForResourceResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

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

instance
  Prelude.NFData
    CreateLicenseConversionTaskForResourceResponse