{-# 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.CloudFormation.EstimateTemplateCost
-- 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 the estimated monthly cost of a template. The return value is an
-- Amazon Web Services Simple Monthly Calculator URL with a query string
-- that describes the resources required to run the template.
module Amazonka.CloudFormation.EstimateTemplateCost
  ( -- * Creating a Request
    EstimateTemplateCost (..),
    newEstimateTemplateCost,

    -- * Request Lenses
    estimateTemplateCost_parameters,
    estimateTemplateCost_templateBody,
    estimateTemplateCost_templateURL,

    -- * Destructuring the Response
    EstimateTemplateCostResponse (..),
    newEstimateTemplateCostResponse,

    -- * Response Lenses
    estimateTemplateCostResponse_url,
    estimateTemplateCostResponse_httpStatus,
  )
where

import Amazonka.CloudFormation.Types
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

-- | The input for an EstimateTemplateCost action.
--
-- /See:/ 'newEstimateTemplateCost' smart constructor.
data EstimateTemplateCost = EstimateTemplateCost'
  { -- | A list of @Parameter@ structures that specify input parameters.
    EstimateTemplateCost -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | Structure containing the template body with a minimum length of 1 byte
    -- and a maximum length of 51,200 bytes. (For more information, go to
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
    -- in the CloudFormation User Guide.)
    --
    -- Conditional: You must pass @TemplateBody@ or @TemplateURL@. If both are
    -- passed, only @TemplateBody@ is used.
    EstimateTemplateCost -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
    -- | Location of file containing the template body. The URL must point to a
    -- template that is located in an Amazon S3 bucket or a Systems Manager
    -- document. For more information, go to
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
    -- in the CloudFormation User Guide.
    --
    -- Conditional: You must pass @TemplateURL@ or @TemplateBody@. If both are
    -- passed, only @TemplateBody@ is used.
    EstimateTemplateCost -> Maybe Text
templateURL :: Prelude.Maybe Prelude.Text
  }
  deriving (EstimateTemplateCost -> EstimateTemplateCost -> Bool
(EstimateTemplateCost -> EstimateTemplateCost -> Bool)
-> (EstimateTemplateCost -> EstimateTemplateCost -> Bool)
-> Eq EstimateTemplateCost
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EstimateTemplateCost -> EstimateTemplateCost -> Bool
$c/= :: EstimateTemplateCost -> EstimateTemplateCost -> Bool
== :: EstimateTemplateCost -> EstimateTemplateCost -> Bool
$c== :: EstimateTemplateCost -> EstimateTemplateCost -> Bool
Prelude.Eq, ReadPrec [EstimateTemplateCost]
ReadPrec EstimateTemplateCost
Int -> ReadS EstimateTemplateCost
ReadS [EstimateTemplateCost]
(Int -> ReadS EstimateTemplateCost)
-> ReadS [EstimateTemplateCost]
-> ReadPrec EstimateTemplateCost
-> ReadPrec [EstimateTemplateCost]
-> Read EstimateTemplateCost
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EstimateTemplateCost]
$creadListPrec :: ReadPrec [EstimateTemplateCost]
readPrec :: ReadPrec EstimateTemplateCost
$creadPrec :: ReadPrec EstimateTemplateCost
readList :: ReadS [EstimateTemplateCost]
$creadList :: ReadS [EstimateTemplateCost]
readsPrec :: Int -> ReadS EstimateTemplateCost
$creadsPrec :: Int -> ReadS EstimateTemplateCost
Prelude.Read, Int -> EstimateTemplateCost -> ShowS
[EstimateTemplateCost] -> ShowS
EstimateTemplateCost -> String
(Int -> EstimateTemplateCost -> ShowS)
-> (EstimateTemplateCost -> String)
-> ([EstimateTemplateCost] -> ShowS)
-> Show EstimateTemplateCost
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EstimateTemplateCost] -> ShowS
$cshowList :: [EstimateTemplateCost] -> ShowS
show :: EstimateTemplateCost -> String
$cshow :: EstimateTemplateCost -> String
showsPrec :: Int -> EstimateTemplateCost -> ShowS
$cshowsPrec :: Int -> EstimateTemplateCost -> ShowS
Prelude.Show, (forall x. EstimateTemplateCost -> Rep EstimateTemplateCost x)
-> (forall x. Rep EstimateTemplateCost x -> EstimateTemplateCost)
-> Generic EstimateTemplateCost
forall x. Rep EstimateTemplateCost x -> EstimateTemplateCost
forall x. EstimateTemplateCost -> Rep EstimateTemplateCost x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EstimateTemplateCost x -> EstimateTemplateCost
$cfrom :: forall x. EstimateTemplateCost -> Rep EstimateTemplateCost x
Prelude.Generic)

-- |
-- Create a value of 'EstimateTemplateCost' 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:
--
-- 'parameters', 'estimateTemplateCost_parameters' - A list of @Parameter@ structures that specify input parameters.
--
-- 'templateBody', 'estimateTemplateCost_templateBody' - Structure containing the template body with a minimum length of 1 byte
-- and a maximum length of 51,200 bytes. (For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.)
--
-- Conditional: You must pass @TemplateBody@ or @TemplateURL@. If both are
-- passed, only @TemplateBody@ is used.
--
-- 'templateURL', 'estimateTemplateCost_templateURL' - Location of file containing the template body. The URL must point to a
-- template that is located in an Amazon S3 bucket or a Systems Manager
-- document. For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must pass @TemplateURL@ or @TemplateBody@. If both are
-- passed, only @TemplateBody@ is used.
newEstimateTemplateCost ::
  EstimateTemplateCost
newEstimateTemplateCost :: EstimateTemplateCost
newEstimateTemplateCost =
  EstimateTemplateCost' :: Maybe [Parameter]
-> Maybe Text -> Maybe Text -> EstimateTemplateCost
EstimateTemplateCost'
    { $sel:parameters:EstimateTemplateCost' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:EstimateTemplateCost' :: Maybe Text
templateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateURL:EstimateTemplateCost' :: Maybe Text
templateURL = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A list of @Parameter@ structures that specify input parameters.
estimateTemplateCost_parameters :: Lens.Lens' EstimateTemplateCost (Prelude.Maybe [Parameter])
estimateTemplateCost_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> EstimateTemplateCost -> f EstimateTemplateCost
estimateTemplateCost_parameters = (EstimateTemplateCost -> Maybe [Parameter])
-> (EstimateTemplateCost
    -> Maybe [Parameter] -> EstimateTemplateCost)
-> Lens
     EstimateTemplateCost
     EstimateTemplateCost
     (Maybe [Parameter])
     (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EstimateTemplateCost' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:EstimateTemplateCost' :: EstimateTemplateCost -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: EstimateTemplateCost
s@EstimateTemplateCost' {} Maybe [Parameter]
a -> EstimateTemplateCost
s {$sel:parameters:EstimateTemplateCost' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: EstimateTemplateCost) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> EstimateTemplateCost -> f EstimateTemplateCost)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> EstimateTemplateCost
-> f EstimateTemplateCost
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Parameter] [Parameter] [Parameter] [Parameter]
-> Iso
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
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 [Parameter] [Parameter] [Parameter] [Parameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Structure containing the template body with a minimum length of 1 byte
-- and a maximum length of 51,200 bytes. (For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.)
--
-- Conditional: You must pass @TemplateBody@ or @TemplateURL@. If both are
-- passed, only @TemplateBody@ is used.
estimateTemplateCost_templateBody :: Lens.Lens' EstimateTemplateCost (Prelude.Maybe Prelude.Text)
estimateTemplateCost_templateBody :: (Maybe Text -> f (Maybe Text))
-> EstimateTemplateCost -> f EstimateTemplateCost
estimateTemplateCost_templateBody = (EstimateTemplateCost -> Maybe Text)
-> (EstimateTemplateCost -> Maybe Text -> EstimateTemplateCost)
-> Lens
     EstimateTemplateCost EstimateTemplateCost (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EstimateTemplateCost' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:EstimateTemplateCost' :: EstimateTemplateCost -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: EstimateTemplateCost
s@EstimateTemplateCost' {} Maybe Text
a -> EstimateTemplateCost
s {$sel:templateBody:EstimateTemplateCost' :: Maybe Text
templateBody = Maybe Text
a} :: EstimateTemplateCost)

-- | Location of file containing the template body. The URL must point to a
-- template that is located in an Amazon S3 bucket or a Systems Manager
-- document. For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html Template Anatomy>
-- in the CloudFormation User Guide.
--
-- Conditional: You must pass @TemplateURL@ or @TemplateBody@. If both are
-- passed, only @TemplateBody@ is used.
estimateTemplateCost_templateURL :: Lens.Lens' EstimateTemplateCost (Prelude.Maybe Prelude.Text)
estimateTemplateCost_templateURL :: (Maybe Text -> f (Maybe Text))
-> EstimateTemplateCost -> f EstimateTemplateCost
estimateTemplateCost_templateURL = (EstimateTemplateCost -> Maybe Text)
-> (EstimateTemplateCost -> Maybe Text -> EstimateTemplateCost)
-> Lens
     EstimateTemplateCost EstimateTemplateCost (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EstimateTemplateCost' {Maybe Text
templateURL :: Maybe Text
$sel:templateURL:EstimateTemplateCost' :: EstimateTemplateCost -> Maybe Text
templateURL} -> Maybe Text
templateURL) (\s :: EstimateTemplateCost
s@EstimateTemplateCost' {} Maybe Text
a -> EstimateTemplateCost
s {$sel:templateURL:EstimateTemplateCost' :: Maybe Text
templateURL = Maybe Text
a} :: EstimateTemplateCost)

instance Core.AWSRequest EstimateTemplateCost where
  type
    AWSResponse EstimateTemplateCost =
      EstimateTemplateCostResponse
  request :: EstimateTemplateCost -> Request EstimateTemplateCost
request = Service -> EstimateTemplateCost -> Request EstimateTemplateCost
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy EstimateTemplateCost
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse EstimateTemplateCost)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse EstimateTemplateCost))
-> Logger
-> Service
-> Proxy EstimateTemplateCost
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse EstimateTemplateCost)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"EstimateTemplateCostResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> EstimateTemplateCostResponse
EstimateTemplateCostResponse'
            (Maybe Text -> Int -> EstimateTemplateCostResponse)
-> Either String (Maybe Text)
-> Either String (Int -> EstimateTemplateCostResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Url")
            Either String (Int -> EstimateTemplateCostResponse)
-> Either String Int -> Either String EstimateTemplateCostResponse
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 EstimateTemplateCost

instance Prelude.NFData EstimateTemplateCost

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

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

instance Core.ToQuery EstimateTemplateCost where
  toQuery :: EstimateTemplateCost -> QueryString
toQuery EstimateTemplateCost' {Maybe [Parameter]
Maybe Text
templateURL :: Maybe Text
templateBody :: Maybe Text
parameters :: Maybe [Parameter]
$sel:templateURL:EstimateTemplateCost' :: EstimateTemplateCost -> Maybe Text
$sel:templateBody:EstimateTemplateCost' :: EstimateTemplateCost -> Maybe Text
$sel:parameters:EstimateTemplateCost' :: EstimateTemplateCost -> Maybe [Parameter]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"EstimateTemplateCost" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"Parameters"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Parameter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Parameter] -> QueryString)
-> Maybe [Parameter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Parameter]
parameters),
        ByteString
"TemplateBody" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateBody,
        ByteString
"TemplateURL" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateURL
      ]

-- | The output for a EstimateTemplateCost action.
--
-- /See:/ 'newEstimateTemplateCostResponse' smart constructor.
data EstimateTemplateCostResponse = EstimateTemplateCostResponse'
  { -- | An Amazon Web Services Simple Monthly Calculator URL with a query string
    -- that describes the resources required to run the template.
    EstimateTemplateCostResponse -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    EstimateTemplateCostResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (EstimateTemplateCostResponse
-> EstimateTemplateCostResponse -> Bool
(EstimateTemplateCostResponse
 -> EstimateTemplateCostResponse -> Bool)
-> (EstimateTemplateCostResponse
    -> EstimateTemplateCostResponse -> Bool)
-> Eq EstimateTemplateCostResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EstimateTemplateCostResponse
-> EstimateTemplateCostResponse -> Bool
$c/= :: EstimateTemplateCostResponse
-> EstimateTemplateCostResponse -> Bool
== :: EstimateTemplateCostResponse
-> EstimateTemplateCostResponse -> Bool
$c== :: EstimateTemplateCostResponse
-> EstimateTemplateCostResponse -> Bool
Prelude.Eq, ReadPrec [EstimateTemplateCostResponse]
ReadPrec EstimateTemplateCostResponse
Int -> ReadS EstimateTemplateCostResponse
ReadS [EstimateTemplateCostResponse]
(Int -> ReadS EstimateTemplateCostResponse)
-> ReadS [EstimateTemplateCostResponse]
-> ReadPrec EstimateTemplateCostResponse
-> ReadPrec [EstimateTemplateCostResponse]
-> Read EstimateTemplateCostResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EstimateTemplateCostResponse]
$creadListPrec :: ReadPrec [EstimateTemplateCostResponse]
readPrec :: ReadPrec EstimateTemplateCostResponse
$creadPrec :: ReadPrec EstimateTemplateCostResponse
readList :: ReadS [EstimateTemplateCostResponse]
$creadList :: ReadS [EstimateTemplateCostResponse]
readsPrec :: Int -> ReadS EstimateTemplateCostResponse
$creadsPrec :: Int -> ReadS EstimateTemplateCostResponse
Prelude.Read, Int -> EstimateTemplateCostResponse -> ShowS
[EstimateTemplateCostResponse] -> ShowS
EstimateTemplateCostResponse -> String
(Int -> EstimateTemplateCostResponse -> ShowS)
-> (EstimateTemplateCostResponse -> String)
-> ([EstimateTemplateCostResponse] -> ShowS)
-> Show EstimateTemplateCostResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EstimateTemplateCostResponse] -> ShowS
$cshowList :: [EstimateTemplateCostResponse] -> ShowS
show :: EstimateTemplateCostResponse -> String
$cshow :: EstimateTemplateCostResponse -> String
showsPrec :: Int -> EstimateTemplateCostResponse -> ShowS
$cshowsPrec :: Int -> EstimateTemplateCostResponse -> ShowS
Prelude.Show, (forall x.
 EstimateTemplateCostResponse -> Rep EstimateTemplateCostResponse x)
-> (forall x.
    Rep EstimateTemplateCostResponse x -> EstimateTemplateCostResponse)
-> Generic EstimateTemplateCostResponse
forall x.
Rep EstimateTemplateCostResponse x -> EstimateTemplateCostResponse
forall x.
EstimateTemplateCostResponse -> Rep EstimateTemplateCostResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EstimateTemplateCostResponse x -> EstimateTemplateCostResponse
$cfrom :: forall x.
EstimateTemplateCostResponse -> Rep EstimateTemplateCostResponse x
Prelude.Generic)

-- |
-- Create a value of 'EstimateTemplateCostResponse' 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:
--
-- 'url', 'estimateTemplateCostResponse_url' - An Amazon Web Services Simple Monthly Calculator URL with a query string
-- that describes the resources required to run the template.
--
-- 'httpStatus', 'estimateTemplateCostResponse_httpStatus' - The response's http status code.
newEstimateTemplateCostResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  EstimateTemplateCostResponse
newEstimateTemplateCostResponse :: Int -> EstimateTemplateCostResponse
newEstimateTemplateCostResponse Int
pHttpStatus_ =
  EstimateTemplateCostResponse' :: Maybe Text -> Int -> EstimateTemplateCostResponse
EstimateTemplateCostResponse'
    { $sel:url:EstimateTemplateCostResponse' :: Maybe Text
url =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:EstimateTemplateCostResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An Amazon Web Services Simple Monthly Calculator URL with a query string
-- that describes the resources required to run the template.
estimateTemplateCostResponse_url :: Lens.Lens' EstimateTemplateCostResponse (Prelude.Maybe Prelude.Text)
estimateTemplateCostResponse_url :: (Maybe Text -> f (Maybe Text))
-> EstimateTemplateCostResponse -> f EstimateTemplateCostResponse
estimateTemplateCostResponse_url = (EstimateTemplateCostResponse -> Maybe Text)
-> (EstimateTemplateCostResponse
    -> Maybe Text -> EstimateTemplateCostResponse)
-> Lens
     EstimateTemplateCostResponse
     EstimateTemplateCostResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EstimateTemplateCostResponse' {Maybe Text
url :: Maybe Text
$sel:url:EstimateTemplateCostResponse' :: EstimateTemplateCostResponse -> Maybe Text
url} -> Maybe Text
url) (\s :: EstimateTemplateCostResponse
s@EstimateTemplateCostResponse' {} Maybe Text
a -> EstimateTemplateCostResponse
s {$sel:url:EstimateTemplateCostResponse' :: Maybe Text
url = Maybe Text
a} :: EstimateTemplateCostResponse)

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

instance Prelude.NFData EstimateTemplateCostResponse