{-# 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.ServiceCatalog.DescribeProvisioningArtifact
-- 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 provisioning artifact (also known
-- as a version) for the specified product.
module Amazonka.ServiceCatalog.DescribeProvisioningArtifact
  ( -- * Creating a Request
    DescribeProvisioningArtifact (..),
    newDescribeProvisioningArtifact,

    -- * Request Lenses
    describeProvisioningArtifact_productName,
    describeProvisioningArtifact_provisioningArtifactId,
    describeProvisioningArtifact_verbose,
    describeProvisioningArtifact_provisioningArtifactName,
    describeProvisioningArtifact_acceptLanguage,
    describeProvisioningArtifact_productId,

    -- * Destructuring the Response
    DescribeProvisioningArtifactResponse (..),
    newDescribeProvisioningArtifactResponse,

    -- * Response Lenses
    describeProvisioningArtifactResponse_status,
    describeProvisioningArtifactResponse_info,
    describeProvisioningArtifactResponse_provisioningArtifactDetail,
    describeProvisioningArtifactResponse_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.ServiceCatalog.Types

-- | /See:/ 'newDescribeProvisioningArtifact' smart constructor.
data DescribeProvisioningArtifact = DescribeProvisioningArtifact'
  { -- | The product name.
    DescribeProvisioningArtifact -> Maybe Text
productName :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the provisioning artifact.
    DescribeProvisioningArtifact -> Maybe Text
provisioningArtifactId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether a verbose level of detail is enabled.
    DescribeProvisioningArtifact -> Maybe Bool
verbose :: Prelude.Maybe Prelude.Bool,
    -- | The provisioning artifact name.
    DescribeProvisioningArtifact -> Maybe Text
provisioningArtifactName :: Prelude.Maybe Prelude.Text,
    -- | The language code.
    --
    -- -   @en@ - English (default)
    --
    -- -   @jp@ - Japanese
    --
    -- -   @zh@ - Chinese
    DescribeProvisioningArtifact -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
    -- | The product identifier.
    DescribeProvisioningArtifact -> Maybe Text
productId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeProvisioningArtifact
-> DescribeProvisioningArtifact -> Bool
(DescribeProvisioningArtifact
 -> DescribeProvisioningArtifact -> Bool)
-> (DescribeProvisioningArtifact
    -> DescribeProvisioningArtifact -> Bool)
-> Eq DescribeProvisioningArtifact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProvisioningArtifact
-> DescribeProvisioningArtifact -> Bool
$c/= :: DescribeProvisioningArtifact
-> DescribeProvisioningArtifact -> Bool
== :: DescribeProvisioningArtifact
-> DescribeProvisioningArtifact -> Bool
$c== :: DescribeProvisioningArtifact
-> DescribeProvisioningArtifact -> Bool
Prelude.Eq, ReadPrec [DescribeProvisioningArtifact]
ReadPrec DescribeProvisioningArtifact
Int -> ReadS DescribeProvisioningArtifact
ReadS [DescribeProvisioningArtifact]
(Int -> ReadS DescribeProvisioningArtifact)
-> ReadS [DescribeProvisioningArtifact]
-> ReadPrec DescribeProvisioningArtifact
-> ReadPrec [DescribeProvisioningArtifact]
-> Read DescribeProvisioningArtifact
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProvisioningArtifact]
$creadListPrec :: ReadPrec [DescribeProvisioningArtifact]
readPrec :: ReadPrec DescribeProvisioningArtifact
$creadPrec :: ReadPrec DescribeProvisioningArtifact
readList :: ReadS [DescribeProvisioningArtifact]
$creadList :: ReadS [DescribeProvisioningArtifact]
readsPrec :: Int -> ReadS DescribeProvisioningArtifact
$creadsPrec :: Int -> ReadS DescribeProvisioningArtifact
Prelude.Read, Int -> DescribeProvisioningArtifact -> ShowS
[DescribeProvisioningArtifact] -> ShowS
DescribeProvisioningArtifact -> String
(Int -> DescribeProvisioningArtifact -> ShowS)
-> (DescribeProvisioningArtifact -> String)
-> ([DescribeProvisioningArtifact] -> ShowS)
-> Show DescribeProvisioningArtifact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProvisioningArtifact] -> ShowS
$cshowList :: [DescribeProvisioningArtifact] -> ShowS
show :: DescribeProvisioningArtifact -> String
$cshow :: DescribeProvisioningArtifact -> String
showsPrec :: Int -> DescribeProvisioningArtifact -> ShowS
$cshowsPrec :: Int -> DescribeProvisioningArtifact -> ShowS
Prelude.Show, (forall x.
 DescribeProvisioningArtifact -> Rep DescribeProvisioningArtifact x)
-> (forall x.
    Rep DescribeProvisioningArtifact x -> DescribeProvisioningArtifact)
-> Generic DescribeProvisioningArtifact
forall x.
Rep DescribeProvisioningArtifact x -> DescribeProvisioningArtifact
forall x.
DescribeProvisioningArtifact -> Rep DescribeProvisioningArtifact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProvisioningArtifact x -> DescribeProvisioningArtifact
$cfrom :: forall x.
DescribeProvisioningArtifact -> Rep DescribeProvisioningArtifact x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProvisioningArtifact' 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:
--
-- 'productName', 'describeProvisioningArtifact_productName' - The product name.
--
-- 'provisioningArtifactId', 'describeProvisioningArtifact_provisioningArtifactId' - The identifier of the provisioning artifact.
--
-- 'verbose', 'describeProvisioningArtifact_verbose' - Indicates whether a verbose level of detail is enabled.
--
-- 'provisioningArtifactName', 'describeProvisioningArtifact_provisioningArtifactName' - The provisioning artifact name.
--
-- 'acceptLanguage', 'describeProvisioningArtifact_acceptLanguage' - The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
--
-- 'productId', 'describeProvisioningArtifact_productId' - The product identifier.
newDescribeProvisioningArtifact ::
  DescribeProvisioningArtifact
newDescribeProvisioningArtifact :: DescribeProvisioningArtifact
newDescribeProvisioningArtifact =
  DescribeProvisioningArtifact' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DescribeProvisioningArtifact
DescribeProvisioningArtifact'
    { $sel:productName:DescribeProvisioningArtifact' :: Maybe Text
productName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:provisioningArtifactId:DescribeProvisioningArtifact' :: Maybe Text
provisioningArtifactId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:verbose:DescribeProvisioningArtifact' :: Maybe Bool
verbose = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:provisioningArtifactName:DescribeProvisioningArtifact' :: Maybe Text
provisioningArtifactName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceptLanguage:DescribeProvisioningArtifact' :: Maybe Text
acceptLanguage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:productId:DescribeProvisioningArtifact' :: Maybe Text
productId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The product name.
describeProvisioningArtifact_productName :: Lens.Lens' DescribeProvisioningArtifact (Prelude.Maybe Prelude.Text)
describeProvisioningArtifact_productName :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisioningArtifact -> f DescribeProvisioningArtifact
describeProvisioningArtifact_productName = (DescribeProvisioningArtifact -> Maybe Text)
-> (DescribeProvisioningArtifact
    -> Maybe Text -> DescribeProvisioningArtifact)
-> Lens
     DescribeProvisioningArtifact
     DescribeProvisioningArtifact
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifact' {Maybe Text
productName :: Maybe Text
$sel:productName:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
productName} -> Maybe Text
productName) (\s :: DescribeProvisioningArtifact
s@DescribeProvisioningArtifact' {} Maybe Text
a -> DescribeProvisioningArtifact
s {$sel:productName:DescribeProvisioningArtifact' :: Maybe Text
productName = Maybe Text
a} :: DescribeProvisioningArtifact)

-- | The identifier of the provisioning artifact.
describeProvisioningArtifact_provisioningArtifactId :: Lens.Lens' DescribeProvisioningArtifact (Prelude.Maybe Prelude.Text)
describeProvisioningArtifact_provisioningArtifactId :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisioningArtifact -> f DescribeProvisioningArtifact
describeProvisioningArtifact_provisioningArtifactId = (DescribeProvisioningArtifact -> Maybe Text)
-> (DescribeProvisioningArtifact
    -> Maybe Text -> DescribeProvisioningArtifact)
-> Lens
     DescribeProvisioningArtifact
     DescribeProvisioningArtifact
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifact' {Maybe Text
provisioningArtifactId :: Maybe Text
$sel:provisioningArtifactId:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
provisioningArtifactId} -> Maybe Text
provisioningArtifactId) (\s :: DescribeProvisioningArtifact
s@DescribeProvisioningArtifact' {} Maybe Text
a -> DescribeProvisioningArtifact
s {$sel:provisioningArtifactId:DescribeProvisioningArtifact' :: Maybe Text
provisioningArtifactId = Maybe Text
a} :: DescribeProvisioningArtifact)

-- | Indicates whether a verbose level of detail is enabled.
describeProvisioningArtifact_verbose :: Lens.Lens' DescribeProvisioningArtifact (Prelude.Maybe Prelude.Bool)
describeProvisioningArtifact_verbose :: (Maybe Bool -> f (Maybe Bool))
-> DescribeProvisioningArtifact -> f DescribeProvisioningArtifact
describeProvisioningArtifact_verbose = (DescribeProvisioningArtifact -> Maybe Bool)
-> (DescribeProvisioningArtifact
    -> Maybe Bool -> DescribeProvisioningArtifact)
-> Lens
     DescribeProvisioningArtifact
     DescribeProvisioningArtifact
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifact' {Maybe Bool
verbose :: Maybe Bool
$sel:verbose:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Bool
verbose} -> Maybe Bool
verbose) (\s :: DescribeProvisioningArtifact
s@DescribeProvisioningArtifact' {} Maybe Bool
a -> DescribeProvisioningArtifact
s {$sel:verbose:DescribeProvisioningArtifact' :: Maybe Bool
verbose = Maybe Bool
a} :: DescribeProvisioningArtifact)

-- | The provisioning artifact name.
describeProvisioningArtifact_provisioningArtifactName :: Lens.Lens' DescribeProvisioningArtifact (Prelude.Maybe Prelude.Text)
describeProvisioningArtifact_provisioningArtifactName :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisioningArtifact -> f DescribeProvisioningArtifact
describeProvisioningArtifact_provisioningArtifactName = (DescribeProvisioningArtifact -> Maybe Text)
-> (DescribeProvisioningArtifact
    -> Maybe Text -> DescribeProvisioningArtifact)
-> Lens
     DescribeProvisioningArtifact
     DescribeProvisioningArtifact
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifact' {Maybe Text
provisioningArtifactName :: Maybe Text
$sel:provisioningArtifactName:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
provisioningArtifactName} -> Maybe Text
provisioningArtifactName) (\s :: DescribeProvisioningArtifact
s@DescribeProvisioningArtifact' {} Maybe Text
a -> DescribeProvisioningArtifact
s {$sel:provisioningArtifactName:DescribeProvisioningArtifact' :: Maybe Text
provisioningArtifactName = Maybe Text
a} :: DescribeProvisioningArtifact)

-- | The language code.
--
-- -   @en@ - English (default)
--
-- -   @jp@ - Japanese
--
-- -   @zh@ - Chinese
describeProvisioningArtifact_acceptLanguage :: Lens.Lens' DescribeProvisioningArtifact (Prelude.Maybe Prelude.Text)
describeProvisioningArtifact_acceptLanguage :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisioningArtifact -> f DescribeProvisioningArtifact
describeProvisioningArtifact_acceptLanguage = (DescribeProvisioningArtifact -> Maybe Text)
-> (DescribeProvisioningArtifact
    -> Maybe Text -> DescribeProvisioningArtifact)
-> Lens
     DescribeProvisioningArtifact
     DescribeProvisioningArtifact
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifact' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: DescribeProvisioningArtifact
s@DescribeProvisioningArtifact' {} Maybe Text
a -> DescribeProvisioningArtifact
s {$sel:acceptLanguage:DescribeProvisioningArtifact' :: Maybe Text
acceptLanguage = Maybe Text
a} :: DescribeProvisioningArtifact)

-- | The product identifier.
describeProvisioningArtifact_productId :: Lens.Lens' DescribeProvisioningArtifact (Prelude.Maybe Prelude.Text)
describeProvisioningArtifact_productId :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisioningArtifact -> f DescribeProvisioningArtifact
describeProvisioningArtifact_productId = (DescribeProvisioningArtifact -> Maybe Text)
-> (DescribeProvisioningArtifact
    -> Maybe Text -> DescribeProvisioningArtifact)
-> Lens
     DescribeProvisioningArtifact
     DescribeProvisioningArtifact
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifact' {Maybe Text
productId :: Maybe Text
$sel:productId:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
productId} -> Maybe Text
productId) (\s :: DescribeProvisioningArtifact
s@DescribeProvisioningArtifact' {} Maybe Text
a -> DescribeProvisioningArtifact
s {$sel:productId:DescribeProvisioningArtifact' :: Maybe Text
productId = Maybe Text
a} :: DescribeProvisioningArtifact)

instance Core.AWSRequest DescribeProvisioningArtifact where
  type
    AWSResponse DescribeProvisioningArtifact =
      DescribeProvisioningArtifactResponse
  request :: DescribeProvisioningArtifact
-> Request DescribeProvisioningArtifact
request = Service
-> DescribeProvisioningArtifact
-> Request DescribeProvisioningArtifact
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeProvisioningArtifact
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeProvisioningArtifact)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeProvisioningArtifact))
-> Logger
-> Service
-> Proxy DescribeProvisioningArtifact
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeProvisioningArtifact)))
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 RequestStatus
-> Maybe (HashMap Text Text)
-> Maybe ProvisioningArtifactDetail
-> Int
-> DescribeProvisioningArtifactResponse
DescribeProvisioningArtifactResponse'
            (Maybe RequestStatus
 -> Maybe (HashMap Text Text)
 -> Maybe ProvisioningArtifactDetail
 -> Int
 -> DescribeProvisioningArtifactResponse)
-> Either String (Maybe RequestStatus)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe ProvisioningArtifactDetail
      -> Int
      -> DescribeProvisioningArtifactResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe RequestStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe ProvisioningArtifactDetail
   -> Int
   -> DescribeProvisioningArtifactResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe ProvisioningArtifactDetail
      -> Int -> DescribeProvisioningArtifactResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Info" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe ProvisioningArtifactDetail
   -> Int -> DescribeProvisioningArtifactResponse)
-> Either String (Maybe ProvisioningArtifactDetail)
-> Either String (Int -> DescribeProvisioningArtifactResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ProvisioningArtifactDetail)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ProvisioningArtifactDetail")
            Either String (Int -> DescribeProvisioningArtifactResponse)
-> Either String Int
-> Either String DescribeProvisioningArtifactResponse
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
    DescribeProvisioningArtifact

instance Prelude.NFData DescribeProvisioningArtifact

instance Core.ToHeaders DescribeProvisioningArtifact where
  toHeaders :: DescribeProvisioningArtifact -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeProvisioningArtifact -> 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
"AWS242ServiceCatalogService.DescribeProvisioningArtifact" ::
                          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 DescribeProvisioningArtifact where
  toJSON :: DescribeProvisioningArtifact -> Value
toJSON DescribeProvisioningArtifact' {Maybe Bool
Maybe Text
productId :: Maybe Text
acceptLanguage :: Maybe Text
provisioningArtifactName :: Maybe Text
verbose :: Maybe Bool
provisioningArtifactId :: Maybe Text
productName :: Maybe Text
$sel:productId:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
$sel:acceptLanguage:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
$sel:provisioningArtifactName:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
$sel:verbose:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Bool
$sel:provisioningArtifactId:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
$sel:productName:DescribeProvisioningArtifact' :: DescribeProvisioningArtifact -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ProductName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
productName,
            (Text
"ProvisioningArtifactId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
provisioningArtifactId,
            (Text
"Verbose" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
verbose,
            (Text
"ProvisioningArtifactName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
provisioningArtifactName,
            (Text
"AcceptLanguage" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
acceptLanguage,
            (Text
"ProductId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
productId
          ]
      )

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

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

-- | /See:/ 'newDescribeProvisioningArtifactResponse' smart constructor.
data DescribeProvisioningArtifactResponse = DescribeProvisioningArtifactResponse'
  { -- | The status of the current request.
    DescribeProvisioningArtifactResponse -> Maybe RequestStatus
status :: Prelude.Maybe RequestStatus,
    -- | The URL of the CloudFormation template in Amazon S3.
    DescribeProvisioningArtifactResponse -> Maybe (HashMap Text Text)
info :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Information about the provisioning artifact.
    DescribeProvisioningArtifactResponse
-> Maybe ProvisioningArtifactDetail
provisioningArtifactDetail :: Prelude.Maybe ProvisioningArtifactDetail,
    -- | The response's http status code.
    DescribeProvisioningArtifactResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeProvisioningArtifactResponse
-> DescribeProvisioningArtifactResponse -> Bool
(DescribeProvisioningArtifactResponse
 -> DescribeProvisioningArtifactResponse -> Bool)
-> (DescribeProvisioningArtifactResponse
    -> DescribeProvisioningArtifactResponse -> Bool)
-> Eq DescribeProvisioningArtifactResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProvisioningArtifactResponse
-> DescribeProvisioningArtifactResponse -> Bool
$c/= :: DescribeProvisioningArtifactResponse
-> DescribeProvisioningArtifactResponse -> Bool
== :: DescribeProvisioningArtifactResponse
-> DescribeProvisioningArtifactResponse -> Bool
$c== :: DescribeProvisioningArtifactResponse
-> DescribeProvisioningArtifactResponse -> Bool
Prelude.Eq, ReadPrec [DescribeProvisioningArtifactResponse]
ReadPrec DescribeProvisioningArtifactResponse
Int -> ReadS DescribeProvisioningArtifactResponse
ReadS [DescribeProvisioningArtifactResponse]
(Int -> ReadS DescribeProvisioningArtifactResponse)
-> ReadS [DescribeProvisioningArtifactResponse]
-> ReadPrec DescribeProvisioningArtifactResponse
-> ReadPrec [DescribeProvisioningArtifactResponse]
-> Read DescribeProvisioningArtifactResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProvisioningArtifactResponse]
$creadListPrec :: ReadPrec [DescribeProvisioningArtifactResponse]
readPrec :: ReadPrec DescribeProvisioningArtifactResponse
$creadPrec :: ReadPrec DescribeProvisioningArtifactResponse
readList :: ReadS [DescribeProvisioningArtifactResponse]
$creadList :: ReadS [DescribeProvisioningArtifactResponse]
readsPrec :: Int -> ReadS DescribeProvisioningArtifactResponse
$creadsPrec :: Int -> ReadS DescribeProvisioningArtifactResponse
Prelude.Read, Int -> DescribeProvisioningArtifactResponse -> ShowS
[DescribeProvisioningArtifactResponse] -> ShowS
DescribeProvisioningArtifactResponse -> String
(Int -> DescribeProvisioningArtifactResponse -> ShowS)
-> (DescribeProvisioningArtifactResponse -> String)
-> ([DescribeProvisioningArtifactResponse] -> ShowS)
-> Show DescribeProvisioningArtifactResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProvisioningArtifactResponse] -> ShowS
$cshowList :: [DescribeProvisioningArtifactResponse] -> ShowS
show :: DescribeProvisioningArtifactResponse -> String
$cshow :: DescribeProvisioningArtifactResponse -> String
showsPrec :: Int -> DescribeProvisioningArtifactResponse -> ShowS
$cshowsPrec :: Int -> DescribeProvisioningArtifactResponse -> ShowS
Prelude.Show, (forall x.
 DescribeProvisioningArtifactResponse
 -> Rep DescribeProvisioningArtifactResponse x)
-> (forall x.
    Rep DescribeProvisioningArtifactResponse x
    -> DescribeProvisioningArtifactResponse)
-> Generic DescribeProvisioningArtifactResponse
forall x.
Rep DescribeProvisioningArtifactResponse x
-> DescribeProvisioningArtifactResponse
forall x.
DescribeProvisioningArtifactResponse
-> Rep DescribeProvisioningArtifactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProvisioningArtifactResponse x
-> DescribeProvisioningArtifactResponse
$cfrom :: forall x.
DescribeProvisioningArtifactResponse
-> Rep DescribeProvisioningArtifactResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProvisioningArtifactResponse' 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', 'describeProvisioningArtifactResponse_status' - The status of the current request.
--
-- 'info', 'describeProvisioningArtifactResponse_info' - The URL of the CloudFormation template in Amazon S3.
--
-- 'provisioningArtifactDetail', 'describeProvisioningArtifactResponse_provisioningArtifactDetail' - Information about the provisioning artifact.
--
-- 'httpStatus', 'describeProvisioningArtifactResponse_httpStatus' - The response's http status code.
newDescribeProvisioningArtifactResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeProvisioningArtifactResponse
newDescribeProvisioningArtifactResponse :: Int -> DescribeProvisioningArtifactResponse
newDescribeProvisioningArtifactResponse Int
pHttpStatus_ =
  DescribeProvisioningArtifactResponse' :: Maybe RequestStatus
-> Maybe (HashMap Text Text)
-> Maybe ProvisioningArtifactDetail
-> Int
-> DescribeProvisioningArtifactResponse
DescribeProvisioningArtifactResponse'
    { $sel:status:DescribeProvisioningArtifactResponse' :: Maybe RequestStatus
status =
        Maybe RequestStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:info:DescribeProvisioningArtifactResponse' :: Maybe (HashMap Text Text)
info = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:provisioningArtifactDetail:DescribeProvisioningArtifactResponse' :: Maybe ProvisioningArtifactDetail
provisioningArtifactDetail =
        Maybe ProvisioningArtifactDetail
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeProvisioningArtifactResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the current request.
describeProvisioningArtifactResponse_status :: Lens.Lens' DescribeProvisioningArtifactResponse (Prelude.Maybe RequestStatus)
describeProvisioningArtifactResponse_status :: (Maybe RequestStatus -> f (Maybe RequestStatus))
-> DescribeProvisioningArtifactResponse
-> f DescribeProvisioningArtifactResponse
describeProvisioningArtifactResponse_status = (DescribeProvisioningArtifactResponse -> Maybe RequestStatus)
-> (DescribeProvisioningArtifactResponse
    -> Maybe RequestStatus -> DescribeProvisioningArtifactResponse)
-> Lens
     DescribeProvisioningArtifactResponse
     DescribeProvisioningArtifactResponse
     (Maybe RequestStatus)
     (Maybe RequestStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifactResponse' {Maybe RequestStatus
status :: Maybe RequestStatus
$sel:status:DescribeProvisioningArtifactResponse' :: DescribeProvisioningArtifactResponse -> Maybe RequestStatus
status} -> Maybe RequestStatus
status) (\s :: DescribeProvisioningArtifactResponse
s@DescribeProvisioningArtifactResponse' {} Maybe RequestStatus
a -> DescribeProvisioningArtifactResponse
s {$sel:status:DescribeProvisioningArtifactResponse' :: Maybe RequestStatus
status = Maybe RequestStatus
a} :: DescribeProvisioningArtifactResponse)

-- | The URL of the CloudFormation template in Amazon S3.
describeProvisioningArtifactResponse_info :: Lens.Lens' DescribeProvisioningArtifactResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeProvisioningArtifactResponse_info :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeProvisioningArtifactResponse
-> f DescribeProvisioningArtifactResponse
describeProvisioningArtifactResponse_info = (DescribeProvisioningArtifactResponse -> Maybe (HashMap Text Text))
-> (DescribeProvisioningArtifactResponse
    -> Maybe (HashMap Text Text)
    -> DescribeProvisioningArtifactResponse)
-> Lens
     DescribeProvisioningArtifactResponse
     DescribeProvisioningArtifactResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifactResponse' {Maybe (HashMap Text Text)
info :: Maybe (HashMap Text Text)
$sel:info:DescribeProvisioningArtifactResponse' :: DescribeProvisioningArtifactResponse -> Maybe (HashMap Text Text)
info} -> Maybe (HashMap Text Text)
info) (\s :: DescribeProvisioningArtifactResponse
s@DescribeProvisioningArtifactResponse' {} Maybe (HashMap Text Text)
a -> DescribeProvisioningArtifactResponse
s {$sel:info:DescribeProvisioningArtifactResponse' :: Maybe (HashMap Text Text)
info = Maybe (HashMap Text Text)
a} :: DescribeProvisioningArtifactResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeProvisioningArtifactResponse
 -> f DescribeProvisioningArtifactResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeProvisioningArtifactResponse
-> f DescribeProvisioningArtifactResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the provisioning artifact.
describeProvisioningArtifactResponse_provisioningArtifactDetail :: Lens.Lens' DescribeProvisioningArtifactResponse (Prelude.Maybe ProvisioningArtifactDetail)
describeProvisioningArtifactResponse_provisioningArtifactDetail :: (Maybe ProvisioningArtifactDetail
 -> f (Maybe ProvisioningArtifactDetail))
-> DescribeProvisioningArtifactResponse
-> f DescribeProvisioningArtifactResponse
describeProvisioningArtifactResponse_provisioningArtifactDetail = (DescribeProvisioningArtifactResponse
 -> Maybe ProvisioningArtifactDetail)
-> (DescribeProvisioningArtifactResponse
    -> Maybe ProvisioningArtifactDetail
    -> DescribeProvisioningArtifactResponse)
-> Lens
     DescribeProvisioningArtifactResponse
     DescribeProvisioningArtifactResponse
     (Maybe ProvisioningArtifactDetail)
     (Maybe ProvisioningArtifactDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningArtifactResponse' {Maybe ProvisioningArtifactDetail
provisioningArtifactDetail :: Maybe ProvisioningArtifactDetail
$sel:provisioningArtifactDetail:DescribeProvisioningArtifactResponse' :: DescribeProvisioningArtifactResponse
-> Maybe ProvisioningArtifactDetail
provisioningArtifactDetail} -> Maybe ProvisioningArtifactDetail
provisioningArtifactDetail) (\s :: DescribeProvisioningArtifactResponse
s@DescribeProvisioningArtifactResponse' {} Maybe ProvisioningArtifactDetail
a -> DescribeProvisioningArtifactResponse
s {$sel:provisioningArtifactDetail:DescribeProvisioningArtifactResponse' :: Maybe ProvisioningArtifactDetail
provisioningArtifactDetail = Maybe ProvisioningArtifactDetail
a} :: DescribeProvisioningArtifactResponse)

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

instance
  Prelude.NFData
    DescribeProvisioningArtifactResponse