{-# 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.IoT.DescribeProvisioningTemplateVersion
-- 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)
--
-- Returns information about a fleet provisioning template version.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeProvisioningTemplateVersion>
-- action.
module Amazonka.IoT.DescribeProvisioningTemplateVersion
  ( -- * Creating a Request
    DescribeProvisioningTemplateVersion (..),
    newDescribeProvisioningTemplateVersion,

    -- * Request Lenses
    describeProvisioningTemplateVersion_templateName,
    describeProvisioningTemplateVersion_versionId,

    -- * Destructuring the Response
    DescribeProvisioningTemplateVersionResponse (..),
    newDescribeProvisioningTemplateVersionResponse,

    -- * Response Lenses
    describeProvisioningTemplateVersionResponse_versionId,
    describeProvisioningTemplateVersionResponse_creationDate,
    describeProvisioningTemplateVersionResponse_templateBody,
    describeProvisioningTemplateVersionResponse_isDefaultVersion,
    describeProvisioningTemplateVersionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeProvisioningTemplateVersion' smart constructor.
data DescribeProvisioningTemplateVersion = DescribeProvisioningTemplateVersion'
  { -- | The template name.
    DescribeProvisioningTemplateVersion -> Text
templateName :: Prelude.Text,
    -- | The fleet provisioning template version ID.
    DescribeProvisioningTemplateVersion -> Int
versionId :: Prelude.Int
  }
  deriving (DescribeProvisioningTemplateVersion
-> DescribeProvisioningTemplateVersion -> Bool
(DescribeProvisioningTemplateVersion
 -> DescribeProvisioningTemplateVersion -> Bool)
-> (DescribeProvisioningTemplateVersion
    -> DescribeProvisioningTemplateVersion -> Bool)
-> Eq DescribeProvisioningTemplateVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProvisioningTemplateVersion
-> DescribeProvisioningTemplateVersion -> Bool
$c/= :: DescribeProvisioningTemplateVersion
-> DescribeProvisioningTemplateVersion -> Bool
== :: DescribeProvisioningTemplateVersion
-> DescribeProvisioningTemplateVersion -> Bool
$c== :: DescribeProvisioningTemplateVersion
-> DescribeProvisioningTemplateVersion -> Bool
Prelude.Eq, ReadPrec [DescribeProvisioningTemplateVersion]
ReadPrec DescribeProvisioningTemplateVersion
Int -> ReadS DescribeProvisioningTemplateVersion
ReadS [DescribeProvisioningTemplateVersion]
(Int -> ReadS DescribeProvisioningTemplateVersion)
-> ReadS [DescribeProvisioningTemplateVersion]
-> ReadPrec DescribeProvisioningTemplateVersion
-> ReadPrec [DescribeProvisioningTemplateVersion]
-> Read DescribeProvisioningTemplateVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProvisioningTemplateVersion]
$creadListPrec :: ReadPrec [DescribeProvisioningTemplateVersion]
readPrec :: ReadPrec DescribeProvisioningTemplateVersion
$creadPrec :: ReadPrec DescribeProvisioningTemplateVersion
readList :: ReadS [DescribeProvisioningTemplateVersion]
$creadList :: ReadS [DescribeProvisioningTemplateVersion]
readsPrec :: Int -> ReadS DescribeProvisioningTemplateVersion
$creadsPrec :: Int -> ReadS DescribeProvisioningTemplateVersion
Prelude.Read, Int -> DescribeProvisioningTemplateVersion -> ShowS
[DescribeProvisioningTemplateVersion] -> ShowS
DescribeProvisioningTemplateVersion -> String
(Int -> DescribeProvisioningTemplateVersion -> ShowS)
-> (DescribeProvisioningTemplateVersion -> String)
-> ([DescribeProvisioningTemplateVersion] -> ShowS)
-> Show DescribeProvisioningTemplateVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProvisioningTemplateVersion] -> ShowS
$cshowList :: [DescribeProvisioningTemplateVersion] -> ShowS
show :: DescribeProvisioningTemplateVersion -> String
$cshow :: DescribeProvisioningTemplateVersion -> String
showsPrec :: Int -> DescribeProvisioningTemplateVersion -> ShowS
$cshowsPrec :: Int -> DescribeProvisioningTemplateVersion -> ShowS
Prelude.Show, (forall x.
 DescribeProvisioningTemplateVersion
 -> Rep DescribeProvisioningTemplateVersion x)
-> (forall x.
    Rep DescribeProvisioningTemplateVersion x
    -> DescribeProvisioningTemplateVersion)
-> Generic DescribeProvisioningTemplateVersion
forall x.
Rep DescribeProvisioningTemplateVersion x
-> DescribeProvisioningTemplateVersion
forall x.
DescribeProvisioningTemplateVersion
-> Rep DescribeProvisioningTemplateVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProvisioningTemplateVersion x
-> DescribeProvisioningTemplateVersion
$cfrom :: forall x.
DescribeProvisioningTemplateVersion
-> Rep DescribeProvisioningTemplateVersion x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProvisioningTemplateVersion' 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:
--
-- 'templateName', 'describeProvisioningTemplateVersion_templateName' - The template name.
--
-- 'versionId', 'describeProvisioningTemplateVersion_versionId' - The fleet provisioning template version ID.
newDescribeProvisioningTemplateVersion ::
  -- | 'templateName'
  Prelude.Text ->
  -- | 'versionId'
  Prelude.Int ->
  DescribeProvisioningTemplateVersion
newDescribeProvisioningTemplateVersion :: Text -> Int -> DescribeProvisioningTemplateVersion
newDescribeProvisioningTemplateVersion
  Text
pTemplateName_
  Int
pVersionId_ =
    DescribeProvisioningTemplateVersion' :: Text -> Int -> DescribeProvisioningTemplateVersion
DescribeProvisioningTemplateVersion'
      { $sel:templateName:DescribeProvisioningTemplateVersion' :: Text
templateName =
          Text
pTemplateName_,
        $sel:versionId:DescribeProvisioningTemplateVersion' :: Int
versionId = Int
pVersionId_
      }

-- | The template name.
describeProvisioningTemplateVersion_templateName :: Lens.Lens' DescribeProvisioningTemplateVersion Prelude.Text
describeProvisioningTemplateVersion_templateName :: (Text -> f Text)
-> DescribeProvisioningTemplateVersion
-> f DescribeProvisioningTemplateVersion
describeProvisioningTemplateVersion_templateName = (DescribeProvisioningTemplateVersion -> Text)
-> (DescribeProvisioningTemplateVersion
    -> Text -> DescribeProvisioningTemplateVersion)
-> Lens
     DescribeProvisioningTemplateVersion
     DescribeProvisioningTemplateVersion
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningTemplateVersion' {Text
templateName :: Text
$sel:templateName:DescribeProvisioningTemplateVersion' :: DescribeProvisioningTemplateVersion -> Text
templateName} -> Text
templateName) (\s :: DescribeProvisioningTemplateVersion
s@DescribeProvisioningTemplateVersion' {} Text
a -> DescribeProvisioningTemplateVersion
s {$sel:templateName:DescribeProvisioningTemplateVersion' :: Text
templateName = Text
a} :: DescribeProvisioningTemplateVersion)

-- | The fleet provisioning template version ID.
describeProvisioningTemplateVersion_versionId :: Lens.Lens' DescribeProvisioningTemplateVersion Prelude.Int
describeProvisioningTemplateVersion_versionId :: (Int -> f Int)
-> DescribeProvisioningTemplateVersion
-> f DescribeProvisioningTemplateVersion
describeProvisioningTemplateVersion_versionId = (DescribeProvisioningTemplateVersion -> Int)
-> (DescribeProvisioningTemplateVersion
    -> Int -> DescribeProvisioningTemplateVersion)
-> Lens
     DescribeProvisioningTemplateVersion
     DescribeProvisioningTemplateVersion
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningTemplateVersion' {Int
versionId :: Int
$sel:versionId:DescribeProvisioningTemplateVersion' :: DescribeProvisioningTemplateVersion -> Int
versionId} -> Int
versionId) (\s :: DescribeProvisioningTemplateVersion
s@DescribeProvisioningTemplateVersion' {} Int
a -> DescribeProvisioningTemplateVersion
s {$sel:versionId:DescribeProvisioningTemplateVersion' :: Int
versionId = Int
a} :: DescribeProvisioningTemplateVersion)

instance
  Core.AWSRequest
    DescribeProvisioningTemplateVersion
  where
  type
    AWSResponse DescribeProvisioningTemplateVersion =
      DescribeProvisioningTemplateVersionResponse
  request :: DescribeProvisioningTemplateVersion
-> Request DescribeProvisioningTemplateVersion
request = Service
-> DescribeProvisioningTemplateVersion
-> Request DescribeProvisioningTemplateVersion
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeProvisioningTemplateVersion
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeProvisioningTemplateVersion)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeProvisioningTemplateVersion))
-> Logger
-> Service
-> Proxy DescribeProvisioningTemplateVersion
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeProvisioningTemplateVersion)))
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 Int
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> DescribeProvisioningTemplateVersionResponse
DescribeProvisioningTemplateVersionResponse'
            (Maybe Int
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Bool
 -> Int
 -> DescribeProvisioningTemplateVersionResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> DescribeProvisioningTemplateVersionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"versionId")
              Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> DescribeProvisioningTemplateVersionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Int
      -> DescribeProvisioningTemplateVersionResponse)
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
"creationDate")
              Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Int
   -> DescribeProvisioningTemplateVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool -> Int -> DescribeProvisioningTemplateVersionResponse)
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
"templateBody")
              Either
  String
  (Maybe Bool -> Int -> DescribeProvisioningTemplateVersionResponse)
-> Either String (Maybe Bool)
-> Either
     String (Int -> DescribeProvisioningTemplateVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"isDefaultVersion")
              Either String (Int -> DescribeProvisioningTemplateVersionResponse)
-> Either String Int
-> Either String DescribeProvisioningTemplateVersionResponse
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
    DescribeProvisioningTemplateVersion

instance
  Prelude.NFData
    DescribeProvisioningTemplateVersion

instance
  Core.ToHeaders
    DescribeProvisioningTemplateVersion
  where
  toHeaders :: DescribeProvisioningTemplateVersion -> ResponseHeaders
toHeaders = ResponseHeaders
-> DescribeProvisioningTemplateVersion -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance
  Core.ToPath
    DescribeProvisioningTemplateVersion
  where
  toPath :: DescribeProvisioningTemplateVersion -> ByteString
toPath DescribeProvisioningTemplateVersion' {Int
Text
versionId :: Int
templateName :: Text
$sel:versionId:DescribeProvisioningTemplateVersion' :: DescribeProvisioningTemplateVersion -> Int
$sel:templateName:DescribeProvisioningTemplateVersion' :: DescribeProvisioningTemplateVersion -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/provisioning-templates/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
templateName,
        ByteString
"/versions/",
        Int -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Int
versionId
      ]

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

-- | /See:/ 'newDescribeProvisioningTemplateVersionResponse' smart constructor.
data DescribeProvisioningTemplateVersionResponse = DescribeProvisioningTemplateVersionResponse'
  { -- | The fleet provisioning template version ID.
    DescribeProvisioningTemplateVersionResponse -> Maybe Int
versionId :: Prelude.Maybe Prelude.Int,
    -- | The date when the fleet provisioning template version was created.
    DescribeProvisioningTemplateVersionResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The JSON formatted contents of the fleet provisioning template version.
    DescribeProvisioningTemplateVersionResponse -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
    -- | True if the fleet provisioning template version is the default version.
    DescribeProvisioningTemplateVersionResponse -> Maybe Bool
isDefaultVersion :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    DescribeProvisioningTemplateVersionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeProvisioningTemplateVersionResponse
-> DescribeProvisioningTemplateVersionResponse -> Bool
(DescribeProvisioningTemplateVersionResponse
 -> DescribeProvisioningTemplateVersionResponse -> Bool)
-> (DescribeProvisioningTemplateVersionResponse
    -> DescribeProvisioningTemplateVersionResponse -> Bool)
-> Eq DescribeProvisioningTemplateVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeProvisioningTemplateVersionResponse
-> DescribeProvisioningTemplateVersionResponse -> Bool
$c/= :: DescribeProvisioningTemplateVersionResponse
-> DescribeProvisioningTemplateVersionResponse -> Bool
== :: DescribeProvisioningTemplateVersionResponse
-> DescribeProvisioningTemplateVersionResponse -> Bool
$c== :: DescribeProvisioningTemplateVersionResponse
-> DescribeProvisioningTemplateVersionResponse -> Bool
Prelude.Eq, ReadPrec [DescribeProvisioningTemplateVersionResponse]
ReadPrec DescribeProvisioningTemplateVersionResponse
Int -> ReadS DescribeProvisioningTemplateVersionResponse
ReadS [DescribeProvisioningTemplateVersionResponse]
(Int -> ReadS DescribeProvisioningTemplateVersionResponse)
-> ReadS [DescribeProvisioningTemplateVersionResponse]
-> ReadPrec DescribeProvisioningTemplateVersionResponse
-> ReadPrec [DescribeProvisioningTemplateVersionResponse]
-> Read DescribeProvisioningTemplateVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeProvisioningTemplateVersionResponse]
$creadListPrec :: ReadPrec [DescribeProvisioningTemplateVersionResponse]
readPrec :: ReadPrec DescribeProvisioningTemplateVersionResponse
$creadPrec :: ReadPrec DescribeProvisioningTemplateVersionResponse
readList :: ReadS [DescribeProvisioningTemplateVersionResponse]
$creadList :: ReadS [DescribeProvisioningTemplateVersionResponse]
readsPrec :: Int -> ReadS DescribeProvisioningTemplateVersionResponse
$creadsPrec :: Int -> ReadS DescribeProvisioningTemplateVersionResponse
Prelude.Read, Int -> DescribeProvisioningTemplateVersionResponse -> ShowS
[DescribeProvisioningTemplateVersionResponse] -> ShowS
DescribeProvisioningTemplateVersionResponse -> String
(Int -> DescribeProvisioningTemplateVersionResponse -> ShowS)
-> (DescribeProvisioningTemplateVersionResponse -> String)
-> ([DescribeProvisioningTemplateVersionResponse] -> ShowS)
-> Show DescribeProvisioningTemplateVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeProvisioningTemplateVersionResponse] -> ShowS
$cshowList :: [DescribeProvisioningTemplateVersionResponse] -> ShowS
show :: DescribeProvisioningTemplateVersionResponse -> String
$cshow :: DescribeProvisioningTemplateVersionResponse -> String
showsPrec :: Int -> DescribeProvisioningTemplateVersionResponse -> ShowS
$cshowsPrec :: Int -> DescribeProvisioningTemplateVersionResponse -> ShowS
Prelude.Show, (forall x.
 DescribeProvisioningTemplateVersionResponse
 -> Rep DescribeProvisioningTemplateVersionResponse x)
-> (forall x.
    Rep DescribeProvisioningTemplateVersionResponse x
    -> DescribeProvisioningTemplateVersionResponse)
-> Generic DescribeProvisioningTemplateVersionResponse
forall x.
Rep DescribeProvisioningTemplateVersionResponse x
-> DescribeProvisioningTemplateVersionResponse
forall x.
DescribeProvisioningTemplateVersionResponse
-> Rep DescribeProvisioningTemplateVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeProvisioningTemplateVersionResponse x
-> DescribeProvisioningTemplateVersionResponse
$cfrom :: forall x.
DescribeProvisioningTemplateVersionResponse
-> Rep DescribeProvisioningTemplateVersionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeProvisioningTemplateVersionResponse' 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:
--
-- 'versionId', 'describeProvisioningTemplateVersionResponse_versionId' - The fleet provisioning template version ID.
--
-- 'creationDate', 'describeProvisioningTemplateVersionResponse_creationDate' - The date when the fleet provisioning template version was created.
--
-- 'templateBody', 'describeProvisioningTemplateVersionResponse_templateBody' - The JSON formatted contents of the fleet provisioning template version.
--
-- 'isDefaultVersion', 'describeProvisioningTemplateVersionResponse_isDefaultVersion' - True if the fleet provisioning template version is the default version.
--
-- 'httpStatus', 'describeProvisioningTemplateVersionResponse_httpStatus' - The response's http status code.
newDescribeProvisioningTemplateVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeProvisioningTemplateVersionResponse
newDescribeProvisioningTemplateVersionResponse :: Int -> DescribeProvisioningTemplateVersionResponse
newDescribeProvisioningTemplateVersionResponse
  Int
pHttpStatus_ =
    DescribeProvisioningTemplateVersionResponse' :: Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Int
-> DescribeProvisioningTemplateVersionResponse
DescribeProvisioningTemplateVersionResponse'
      { $sel:versionId:DescribeProvisioningTemplateVersionResponse' :: Maybe Int
versionId =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:creationDate:DescribeProvisioningTemplateVersionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:templateBody:DescribeProvisioningTemplateVersionResponse' :: Maybe Text
templateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:isDefaultVersion:DescribeProvisioningTemplateVersionResponse' :: Maybe Bool
isDefaultVersion =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeProvisioningTemplateVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The fleet provisioning template version ID.
describeProvisioningTemplateVersionResponse_versionId :: Lens.Lens' DescribeProvisioningTemplateVersionResponse (Prelude.Maybe Prelude.Int)
describeProvisioningTemplateVersionResponse_versionId :: (Maybe Int -> f (Maybe Int))
-> DescribeProvisioningTemplateVersionResponse
-> f DescribeProvisioningTemplateVersionResponse
describeProvisioningTemplateVersionResponse_versionId = (DescribeProvisioningTemplateVersionResponse -> Maybe Int)
-> (DescribeProvisioningTemplateVersionResponse
    -> Maybe Int -> DescribeProvisioningTemplateVersionResponse)
-> Lens
     DescribeProvisioningTemplateVersionResponse
     DescribeProvisioningTemplateVersionResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningTemplateVersionResponse' {Maybe Int
versionId :: Maybe Int
$sel:versionId:DescribeProvisioningTemplateVersionResponse' :: DescribeProvisioningTemplateVersionResponse -> Maybe Int
versionId} -> Maybe Int
versionId) (\s :: DescribeProvisioningTemplateVersionResponse
s@DescribeProvisioningTemplateVersionResponse' {} Maybe Int
a -> DescribeProvisioningTemplateVersionResponse
s {$sel:versionId:DescribeProvisioningTemplateVersionResponse' :: Maybe Int
versionId = Maybe Int
a} :: DescribeProvisioningTemplateVersionResponse)

-- | The date when the fleet provisioning template version was created.
describeProvisioningTemplateVersionResponse_creationDate :: Lens.Lens' DescribeProvisioningTemplateVersionResponse (Prelude.Maybe Prelude.UTCTime)
describeProvisioningTemplateVersionResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeProvisioningTemplateVersionResponse
-> f DescribeProvisioningTemplateVersionResponse
describeProvisioningTemplateVersionResponse_creationDate = (DescribeProvisioningTemplateVersionResponse -> Maybe POSIX)
-> (DescribeProvisioningTemplateVersionResponse
    -> Maybe POSIX -> DescribeProvisioningTemplateVersionResponse)
-> Lens
     DescribeProvisioningTemplateVersionResponse
     DescribeProvisioningTemplateVersionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningTemplateVersionResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeProvisioningTemplateVersionResponse' :: DescribeProvisioningTemplateVersionResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeProvisioningTemplateVersionResponse
s@DescribeProvisioningTemplateVersionResponse' {} Maybe POSIX
a -> DescribeProvisioningTemplateVersionResponse
s {$sel:creationDate:DescribeProvisioningTemplateVersionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeProvisioningTemplateVersionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeProvisioningTemplateVersionResponse
 -> f DescribeProvisioningTemplateVersionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeProvisioningTemplateVersionResponse
-> f DescribeProvisioningTemplateVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The JSON formatted contents of the fleet provisioning template version.
describeProvisioningTemplateVersionResponse_templateBody :: Lens.Lens' DescribeProvisioningTemplateVersionResponse (Prelude.Maybe Prelude.Text)
describeProvisioningTemplateVersionResponse_templateBody :: (Maybe Text -> f (Maybe Text))
-> DescribeProvisioningTemplateVersionResponse
-> f DescribeProvisioningTemplateVersionResponse
describeProvisioningTemplateVersionResponse_templateBody = (DescribeProvisioningTemplateVersionResponse -> Maybe Text)
-> (DescribeProvisioningTemplateVersionResponse
    -> Maybe Text -> DescribeProvisioningTemplateVersionResponse)
-> Lens
     DescribeProvisioningTemplateVersionResponse
     DescribeProvisioningTemplateVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningTemplateVersionResponse' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:DescribeProvisioningTemplateVersionResponse' :: DescribeProvisioningTemplateVersionResponse -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: DescribeProvisioningTemplateVersionResponse
s@DescribeProvisioningTemplateVersionResponse' {} Maybe Text
a -> DescribeProvisioningTemplateVersionResponse
s {$sel:templateBody:DescribeProvisioningTemplateVersionResponse' :: Maybe Text
templateBody = Maybe Text
a} :: DescribeProvisioningTemplateVersionResponse)

-- | True if the fleet provisioning template version is the default version.
describeProvisioningTemplateVersionResponse_isDefaultVersion :: Lens.Lens' DescribeProvisioningTemplateVersionResponse (Prelude.Maybe Prelude.Bool)
describeProvisioningTemplateVersionResponse_isDefaultVersion :: (Maybe Bool -> f (Maybe Bool))
-> DescribeProvisioningTemplateVersionResponse
-> f DescribeProvisioningTemplateVersionResponse
describeProvisioningTemplateVersionResponse_isDefaultVersion = (DescribeProvisioningTemplateVersionResponse -> Maybe Bool)
-> (DescribeProvisioningTemplateVersionResponse
    -> Maybe Bool -> DescribeProvisioningTemplateVersionResponse)
-> Lens
     DescribeProvisioningTemplateVersionResponse
     DescribeProvisioningTemplateVersionResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeProvisioningTemplateVersionResponse' {Maybe Bool
isDefaultVersion :: Maybe Bool
$sel:isDefaultVersion:DescribeProvisioningTemplateVersionResponse' :: DescribeProvisioningTemplateVersionResponse -> Maybe Bool
isDefaultVersion} -> Maybe Bool
isDefaultVersion) (\s :: DescribeProvisioningTemplateVersionResponse
s@DescribeProvisioningTemplateVersionResponse' {} Maybe Bool
a -> DescribeProvisioningTemplateVersionResponse
s {$sel:isDefaultVersion:DescribeProvisioningTemplateVersionResponse' :: Maybe Bool
isDefaultVersion = Maybe Bool
a} :: DescribeProvisioningTemplateVersionResponse)

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

instance
  Prelude.NFData
    DescribeProvisioningTemplateVersionResponse