{-# 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.ElasticBeanstalk.DescribeConfigurationOptions
-- 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)
--
-- Describes the configuration options that are used in a particular
-- configuration template or environment, or that a specified solution
-- stack defines. The description includes the values the options, their
-- default values, and an indication of the required action on a running
-- environment if an option value is changed.
module Amazonka.ElasticBeanstalk.DescribeConfigurationOptions
  ( -- * Creating a Request
    DescribeConfigurationOptions (..),
    newDescribeConfigurationOptions,

    -- * Request Lenses
    describeConfigurationOptions_templateName,
    describeConfigurationOptions_platformArn,
    describeConfigurationOptions_environmentName,
    describeConfigurationOptions_applicationName,
    describeConfigurationOptions_solutionStackName,
    describeConfigurationOptions_options,

    -- * Destructuring the Response
    DescribeConfigurationOptionsResponse (..),
    newDescribeConfigurationOptionsResponse,

    -- * Response Lenses
    describeConfigurationOptionsResponse_platformArn,
    describeConfigurationOptionsResponse_solutionStackName,
    describeConfigurationOptionsResponse_options,
    describeConfigurationOptionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.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

-- | Result message containing a list of application version descriptions.
--
-- /See:/ 'newDescribeConfigurationOptions' smart constructor.
data DescribeConfigurationOptions = DescribeConfigurationOptions'
  { -- | The name of the configuration template whose configuration options you
    -- want to describe.
    DescribeConfigurationOptions -> Maybe Text
templateName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the custom platform.
    DescribeConfigurationOptions -> Maybe Text
platformArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the environment whose configuration options you want to
    -- describe.
    DescribeConfigurationOptions -> Maybe Text
environmentName :: Prelude.Maybe Prelude.Text,
    -- | The name of the application associated with the configuration template
    -- or environment. Only needed if you want to describe the configuration
    -- options associated with either the configuration template or
    -- environment.
    DescribeConfigurationOptions -> Maybe Text
applicationName :: Prelude.Maybe Prelude.Text,
    -- | The name of the solution stack whose configuration options you want to
    -- describe.
    DescribeConfigurationOptions -> Maybe Text
solutionStackName :: Prelude.Maybe Prelude.Text,
    -- | If specified, restricts the descriptions to only the specified options.
    DescribeConfigurationOptions -> Maybe [OptionSpecification]
options :: Prelude.Maybe [OptionSpecification]
  }
  deriving (DescribeConfigurationOptions
-> DescribeConfigurationOptions -> Bool
(DescribeConfigurationOptions
 -> DescribeConfigurationOptions -> Bool)
-> (DescribeConfigurationOptions
    -> DescribeConfigurationOptions -> Bool)
-> Eq DescribeConfigurationOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConfigurationOptions
-> DescribeConfigurationOptions -> Bool
$c/= :: DescribeConfigurationOptions
-> DescribeConfigurationOptions -> Bool
== :: DescribeConfigurationOptions
-> DescribeConfigurationOptions -> Bool
$c== :: DescribeConfigurationOptions
-> DescribeConfigurationOptions -> Bool
Prelude.Eq, ReadPrec [DescribeConfigurationOptions]
ReadPrec DescribeConfigurationOptions
Int -> ReadS DescribeConfigurationOptions
ReadS [DescribeConfigurationOptions]
(Int -> ReadS DescribeConfigurationOptions)
-> ReadS [DescribeConfigurationOptions]
-> ReadPrec DescribeConfigurationOptions
-> ReadPrec [DescribeConfigurationOptions]
-> Read DescribeConfigurationOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConfigurationOptions]
$creadListPrec :: ReadPrec [DescribeConfigurationOptions]
readPrec :: ReadPrec DescribeConfigurationOptions
$creadPrec :: ReadPrec DescribeConfigurationOptions
readList :: ReadS [DescribeConfigurationOptions]
$creadList :: ReadS [DescribeConfigurationOptions]
readsPrec :: Int -> ReadS DescribeConfigurationOptions
$creadsPrec :: Int -> ReadS DescribeConfigurationOptions
Prelude.Read, Int -> DescribeConfigurationOptions -> ShowS
[DescribeConfigurationOptions] -> ShowS
DescribeConfigurationOptions -> String
(Int -> DescribeConfigurationOptions -> ShowS)
-> (DescribeConfigurationOptions -> String)
-> ([DescribeConfigurationOptions] -> ShowS)
-> Show DescribeConfigurationOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConfigurationOptions] -> ShowS
$cshowList :: [DescribeConfigurationOptions] -> ShowS
show :: DescribeConfigurationOptions -> String
$cshow :: DescribeConfigurationOptions -> String
showsPrec :: Int -> DescribeConfigurationOptions -> ShowS
$cshowsPrec :: Int -> DescribeConfigurationOptions -> ShowS
Prelude.Show, (forall x.
 DescribeConfigurationOptions -> Rep DescribeConfigurationOptions x)
-> (forall x.
    Rep DescribeConfigurationOptions x -> DescribeConfigurationOptions)
-> Generic DescribeConfigurationOptions
forall x.
Rep DescribeConfigurationOptions x -> DescribeConfigurationOptions
forall x.
DescribeConfigurationOptions -> Rep DescribeConfigurationOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConfigurationOptions x -> DescribeConfigurationOptions
$cfrom :: forall x.
DescribeConfigurationOptions -> Rep DescribeConfigurationOptions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConfigurationOptions' 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', 'describeConfigurationOptions_templateName' - The name of the configuration template whose configuration options you
-- want to describe.
--
-- 'platformArn', 'describeConfigurationOptions_platformArn' - The ARN of the custom platform.
--
-- 'environmentName', 'describeConfigurationOptions_environmentName' - The name of the environment whose configuration options you want to
-- describe.
--
-- 'applicationName', 'describeConfigurationOptions_applicationName' - The name of the application associated with the configuration template
-- or environment. Only needed if you want to describe the configuration
-- options associated with either the configuration template or
-- environment.
--
-- 'solutionStackName', 'describeConfigurationOptions_solutionStackName' - The name of the solution stack whose configuration options you want to
-- describe.
--
-- 'options', 'describeConfigurationOptions_options' - If specified, restricts the descriptions to only the specified options.
newDescribeConfigurationOptions ::
  DescribeConfigurationOptions
newDescribeConfigurationOptions :: DescribeConfigurationOptions
newDescribeConfigurationOptions =
  DescribeConfigurationOptions' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [OptionSpecification]
-> DescribeConfigurationOptions
DescribeConfigurationOptions'
    { $sel:templateName:DescribeConfigurationOptions' :: Maybe Text
templateName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:platformArn:DescribeConfigurationOptions' :: Maybe Text
platformArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:environmentName:DescribeConfigurationOptions' :: Maybe Text
environmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationName:DescribeConfigurationOptions' :: Maybe Text
applicationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:solutionStackName:DescribeConfigurationOptions' :: Maybe Text
solutionStackName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:options:DescribeConfigurationOptions' :: Maybe [OptionSpecification]
options = Maybe [OptionSpecification]
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the configuration template whose configuration options you
-- want to describe.
describeConfigurationOptions_templateName :: Lens.Lens' DescribeConfigurationOptions (Prelude.Maybe Prelude.Text)
describeConfigurationOptions_templateName :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationOptions -> f DescribeConfigurationOptions
describeConfigurationOptions_templateName = (DescribeConfigurationOptions -> Maybe Text)
-> (DescribeConfigurationOptions
    -> Maybe Text -> DescribeConfigurationOptions)
-> Lens
     DescribeConfigurationOptions
     DescribeConfigurationOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptions' {Maybe Text
templateName :: Maybe Text
$sel:templateName:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
templateName} -> Maybe Text
templateName) (\s :: DescribeConfigurationOptions
s@DescribeConfigurationOptions' {} Maybe Text
a -> DescribeConfigurationOptions
s {$sel:templateName:DescribeConfigurationOptions' :: Maybe Text
templateName = Maybe Text
a} :: DescribeConfigurationOptions)

-- | The ARN of the custom platform.
describeConfigurationOptions_platformArn :: Lens.Lens' DescribeConfigurationOptions (Prelude.Maybe Prelude.Text)
describeConfigurationOptions_platformArn :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationOptions -> f DescribeConfigurationOptions
describeConfigurationOptions_platformArn = (DescribeConfigurationOptions -> Maybe Text)
-> (DescribeConfigurationOptions
    -> Maybe Text -> DescribeConfigurationOptions)
-> Lens
     DescribeConfigurationOptions
     DescribeConfigurationOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptions' {Maybe Text
platformArn :: Maybe Text
$sel:platformArn:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
platformArn} -> Maybe Text
platformArn) (\s :: DescribeConfigurationOptions
s@DescribeConfigurationOptions' {} Maybe Text
a -> DescribeConfigurationOptions
s {$sel:platformArn:DescribeConfigurationOptions' :: Maybe Text
platformArn = Maybe Text
a} :: DescribeConfigurationOptions)

-- | The name of the environment whose configuration options you want to
-- describe.
describeConfigurationOptions_environmentName :: Lens.Lens' DescribeConfigurationOptions (Prelude.Maybe Prelude.Text)
describeConfigurationOptions_environmentName :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationOptions -> f DescribeConfigurationOptions
describeConfigurationOptions_environmentName = (DescribeConfigurationOptions -> Maybe Text)
-> (DescribeConfigurationOptions
    -> Maybe Text -> DescribeConfigurationOptions)
-> Lens
     DescribeConfigurationOptions
     DescribeConfigurationOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptions' {Maybe Text
environmentName :: Maybe Text
$sel:environmentName:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
environmentName} -> Maybe Text
environmentName) (\s :: DescribeConfigurationOptions
s@DescribeConfigurationOptions' {} Maybe Text
a -> DescribeConfigurationOptions
s {$sel:environmentName:DescribeConfigurationOptions' :: Maybe Text
environmentName = Maybe Text
a} :: DescribeConfigurationOptions)

-- | The name of the application associated with the configuration template
-- or environment. Only needed if you want to describe the configuration
-- options associated with either the configuration template or
-- environment.
describeConfigurationOptions_applicationName :: Lens.Lens' DescribeConfigurationOptions (Prelude.Maybe Prelude.Text)
describeConfigurationOptions_applicationName :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationOptions -> f DescribeConfigurationOptions
describeConfigurationOptions_applicationName = (DescribeConfigurationOptions -> Maybe Text)
-> (DescribeConfigurationOptions
    -> Maybe Text -> DescribeConfigurationOptions)
-> Lens
     DescribeConfigurationOptions
     DescribeConfigurationOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptions' {Maybe Text
applicationName :: Maybe Text
$sel:applicationName:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
applicationName} -> Maybe Text
applicationName) (\s :: DescribeConfigurationOptions
s@DescribeConfigurationOptions' {} Maybe Text
a -> DescribeConfigurationOptions
s {$sel:applicationName:DescribeConfigurationOptions' :: Maybe Text
applicationName = Maybe Text
a} :: DescribeConfigurationOptions)

-- | The name of the solution stack whose configuration options you want to
-- describe.
describeConfigurationOptions_solutionStackName :: Lens.Lens' DescribeConfigurationOptions (Prelude.Maybe Prelude.Text)
describeConfigurationOptions_solutionStackName :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationOptions -> f DescribeConfigurationOptions
describeConfigurationOptions_solutionStackName = (DescribeConfigurationOptions -> Maybe Text)
-> (DescribeConfigurationOptions
    -> Maybe Text -> DescribeConfigurationOptions)
-> Lens
     DescribeConfigurationOptions
     DescribeConfigurationOptions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptions' {Maybe Text
solutionStackName :: Maybe Text
$sel:solutionStackName:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
solutionStackName} -> Maybe Text
solutionStackName) (\s :: DescribeConfigurationOptions
s@DescribeConfigurationOptions' {} Maybe Text
a -> DescribeConfigurationOptions
s {$sel:solutionStackName:DescribeConfigurationOptions' :: Maybe Text
solutionStackName = Maybe Text
a} :: DescribeConfigurationOptions)

-- | If specified, restricts the descriptions to only the specified options.
describeConfigurationOptions_options :: Lens.Lens' DescribeConfigurationOptions (Prelude.Maybe [OptionSpecification])
describeConfigurationOptions_options :: (Maybe [OptionSpecification] -> f (Maybe [OptionSpecification]))
-> DescribeConfigurationOptions -> f DescribeConfigurationOptions
describeConfigurationOptions_options = (DescribeConfigurationOptions -> Maybe [OptionSpecification])
-> (DescribeConfigurationOptions
    -> Maybe [OptionSpecification] -> DescribeConfigurationOptions)
-> Lens
     DescribeConfigurationOptions
     DescribeConfigurationOptions
     (Maybe [OptionSpecification])
     (Maybe [OptionSpecification])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptions' {Maybe [OptionSpecification]
options :: Maybe [OptionSpecification]
$sel:options:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe [OptionSpecification]
options} -> Maybe [OptionSpecification]
options) (\s :: DescribeConfigurationOptions
s@DescribeConfigurationOptions' {} Maybe [OptionSpecification]
a -> DescribeConfigurationOptions
s {$sel:options:DescribeConfigurationOptions' :: Maybe [OptionSpecification]
options = Maybe [OptionSpecification]
a} :: DescribeConfigurationOptions) ((Maybe [OptionSpecification] -> f (Maybe [OptionSpecification]))
 -> DescribeConfigurationOptions -> f DescribeConfigurationOptions)
-> ((Maybe [OptionSpecification]
     -> f (Maybe [OptionSpecification]))
    -> Maybe [OptionSpecification] -> f (Maybe [OptionSpecification]))
-> (Maybe [OptionSpecification] -> f (Maybe [OptionSpecification]))
-> DescribeConfigurationOptions
-> f DescribeConfigurationOptions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OptionSpecification]
  [OptionSpecification]
  [OptionSpecification]
  [OptionSpecification]
-> Iso
     (Maybe [OptionSpecification])
     (Maybe [OptionSpecification])
     (Maybe [OptionSpecification])
     (Maybe [OptionSpecification])
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
  [OptionSpecification]
  [OptionSpecification]
  [OptionSpecification]
  [OptionSpecification]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest DescribeConfigurationOptions where
  type
    AWSResponse DescribeConfigurationOptions =
      DescribeConfigurationOptionsResponse
  request :: DescribeConfigurationOptions
-> Request DescribeConfigurationOptions
request = Service
-> DescribeConfigurationOptions
-> Request DescribeConfigurationOptions
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeConfigurationOptions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConfigurationOptions)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeConfigurationOptions))
-> Logger
-> Service
-> Proxy DescribeConfigurationOptions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConfigurationOptions)))
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
"DescribeConfigurationOptionsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe Text
-> Maybe [ConfigurationOptionDescription]
-> Int
-> DescribeConfigurationOptionsResponse
DescribeConfigurationOptionsResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe [ConfigurationOptionDescription]
 -> Int
 -> DescribeConfigurationOptionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [ConfigurationOptionDescription]
      -> Int
      -> DescribeConfigurationOptionsResponse)
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
"PlatformArn")
            Either
  String
  (Maybe Text
   -> Maybe [ConfigurationOptionDescription]
   -> Int
   -> DescribeConfigurationOptionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ConfigurationOptionDescription]
      -> Int -> DescribeConfigurationOptionsResponse)
forall (f :: * -> *) a b. Applicative f => 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
"SolutionStackName")
            Either
  String
  (Maybe [ConfigurationOptionDescription]
   -> Int -> DescribeConfigurationOptionsResponse)
-> Either String (Maybe [ConfigurationOptionDescription])
-> Either String (Int -> DescribeConfigurationOptionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Options" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node]
    -> Either String (Maybe [ConfigurationOptionDescription]))
-> Either String (Maybe [ConfigurationOptionDescription])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ConfigurationOptionDescription])
-> [Node] -> Either String (Maybe [ConfigurationOptionDescription])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ConfigurationOptionDescription]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> DescribeConfigurationOptionsResponse)
-> Either String Int
-> Either String DescribeConfigurationOptionsResponse
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
    DescribeConfigurationOptions

instance Prelude.NFData DescribeConfigurationOptions

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

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

instance Core.ToQuery DescribeConfigurationOptions where
  toQuery :: DescribeConfigurationOptions -> QueryString
toQuery DescribeConfigurationOptions' {Maybe [OptionSpecification]
Maybe Text
options :: Maybe [OptionSpecification]
solutionStackName :: Maybe Text
applicationName :: Maybe Text
environmentName :: Maybe Text
platformArn :: Maybe Text
templateName :: Maybe Text
$sel:options:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe [OptionSpecification]
$sel:solutionStackName:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
$sel:applicationName:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
$sel:environmentName:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
$sel:platformArn:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
$sel:templateName:DescribeConfigurationOptions' :: DescribeConfigurationOptions -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeConfigurationOptions" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
        ByteString
"TemplateName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateName,
        ByteString
"PlatformArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
platformArn,
        ByteString
"EnvironmentName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
environmentName,
        ByteString
"ApplicationName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
applicationName,
        ByteString
"SolutionStackName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
solutionStackName,
        ByteString
"Options"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [OptionSpecification] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([OptionSpecification] -> QueryString)
-> Maybe [OptionSpecification] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [OptionSpecification]
options)
      ]

-- | Describes the settings for a specified configuration set.
--
-- /See:/ 'newDescribeConfigurationOptionsResponse' smart constructor.
data DescribeConfigurationOptionsResponse = DescribeConfigurationOptionsResponse'
  { -- | The ARN of the platform version.
    DescribeConfigurationOptionsResponse -> Maybe Text
platformArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the solution stack these configuration options belong to.
    DescribeConfigurationOptionsResponse -> Maybe Text
solutionStackName :: Prelude.Maybe Prelude.Text,
    -- | A list of ConfigurationOptionDescription.
    DescribeConfigurationOptionsResponse
-> Maybe [ConfigurationOptionDescription]
options :: Prelude.Maybe [ConfigurationOptionDescription],
    -- | The response's http status code.
    DescribeConfigurationOptionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeConfigurationOptionsResponse
-> DescribeConfigurationOptionsResponse -> Bool
(DescribeConfigurationOptionsResponse
 -> DescribeConfigurationOptionsResponse -> Bool)
-> (DescribeConfigurationOptionsResponse
    -> DescribeConfigurationOptionsResponse -> Bool)
-> Eq DescribeConfigurationOptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConfigurationOptionsResponse
-> DescribeConfigurationOptionsResponse -> Bool
$c/= :: DescribeConfigurationOptionsResponse
-> DescribeConfigurationOptionsResponse -> Bool
== :: DescribeConfigurationOptionsResponse
-> DescribeConfigurationOptionsResponse -> Bool
$c== :: DescribeConfigurationOptionsResponse
-> DescribeConfigurationOptionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeConfigurationOptionsResponse]
ReadPrec DescribeConfigurationOptionsResponse
Int -> ReadS DescribeConfigurationOptionsResponse
ReadS [DescribeConfigurationOptionsResponse]
(Int -> ReadS DescribeConfigurationOptionsResponse)
-> ReadS [DescribeConfigurationOptionsResponse]
-> ReadPrec DescribeConfigurationOptionsResponse
-> ReadPrec [DescribeConfigurationOptionsResponse]
-> Read DescribeConfigurationOptionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConfigurationOptionsResponse]
$creadListPrec :: ReadPrec [DescribeConfigurationOptionsResponse]
readPrec :: ReadPrec DescribeConfigurationOptionsResponse
$creadPrec :: ReadPrec DescribeConfigurationOptionsResponse
readList :: ReadS [DescribeConfigurationOptionsResponse]
$creadList :: ReadS [DescribeConfigurationOptionsResponse]
readsPrec :: Int -> ReadS DescribeConfigurationOptionsResponse
$creadsPrec :: Int -> ReadS DescribeConfigurationOptionsResponse
Prelude.Read, Int -> DescribeConfigurationOptionsResponse -> ShowS
[DescribeConfigurationOptionsResponse] -> ShowS
DescribeConfigurationOptionsResponse -> String
(Int -> DescribeConfigurationOptionsResponse -> ShowS)
-> (DescribeConfigurationOptionsResponse -> String)
-> ([DescribeConfigurationOptionsResponse] -> ShowS)
-> Show DescribeConfigurationOptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConfigurationOptionsResponse] -> ShowS
$cshowList :: [DescribeConfigurationOptionsResponse] -> ShowS
show :: DescribeConfigurationOptionsResponse -> String
$cshow :: DescribeConfigurationOptionsResponse -> String
showsPrec :: Int -> DescribeConfigurationOptionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeConfigurationOptionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeConfigurationOptionsResponse
 -> Rep DescribeConfigurationOptionsResponse x)
-> (forall x.
    Rep DescribeConfigurationOptionsResponse x
    -> DescribeConfigurationOptionsResponse)
-> Generic DescribeConfigurationOptionsResponse
forall x.
Rep DescribeConfigurationOptionsResponse x
-> DescribeConfigurationOptionsResponse
forall x.
DescribeConfigurationOptionsResponse
-> Rep DescribeConfigurationOptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConfigurationOptionsResponse x
-> DescribeConfigurationOptionsResponse
$cfrom :: forall x.
DescribeConfigurationOptionsResponse
-> Rep DescribeConfigurationOptionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConfigurationOptionsResponse' 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:
--
-- 'platformArn', 'describeConfigurationOptionsResponse_platformArn' - The ARN of the platform version.
--
-- 'solutionStackName', 'describeConfigurationOptionsResponse_solutionStackName' - The name of the solution stack these configuration options belong to.
--
-- 'options', 'describeConfigurationOptionsResponse_options' - A list of ConfigurationOptionDescription.
--
-- 'httpStatus', 'describeConfigurationOptionsResponse_httpStatus' - The response's http status code.
newDescribeConfigurationOptionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConfigurationOptionsResponse
newDescribeConfigurationOptionsResponse :: Int -> DescribeConfigurationOptionsResponse
newDescribeConfigurationOptionsResponse Int
pHttpStatus_ =
  DescribeConfigurationOptionsResponse' :: Maybe Text
-> Maybe Text
-> Maybe [ConfigurationOptionDescription]
-> Int
-> DescribeConfigurationOptionsResponse
DescribeConfigurationOptionsResponse'
    { $sel:platformArn:DescribeConfigurationOptionsResponse' :: Maybe Text
platformArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:solutionStackName:DescribeConfigurationOptionsResponse' :: Maybe Text
solutionStackName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:options:DescribeConfigurationOptionsResponse' :: Maybe [ConfigurationOptionDescription]
options = Maybe [ConfigurationOptionDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConfigurationOptionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the platform version.
describeConfigurationOptionsResponse_platformArn :: Lens.Lens' DescribeConfigurationOptionsResponse (Prelude.Maybe Prelude.Text)
describeConfigurationOptionsResponse_platformArn :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationOptionsResponse
-> f DescribeConfigurationOptionsResponse
describeConfigurationOptionsResponse_platformArn = (DescribeConfigurationOptionsResponse -> Maybe Text)
-> (DescribeConfigurationOptionsResponse
    -> Maybe Text -> DescribeConfigurationOptionsResponse)
-> Lens
     DescribeConfigurationOptionsResponse
     DescribeConfigurationOptionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptionsResponse' {Maybe Text
platformArn :: Maybe Text
$sel:platformArn:DescribeConfigurationOptionsResponse' :: DescribeConfigurationOptionsResponse -> Maybe Text
platformArn} -> Maybe Text
platformArn) (\s :: DescribeConfigurationOptionsResponse
s@DescribeConfigurationOptionsResponse' {} Maybe Text
a -> DescribeConfigurationOptionsResponse
s {$sel:platformArn:DescribeConfigurationOptionsResponse' :: Maybe Text
platformArn = Maybe Text
a} :: DescribeConfigurationOptionsResponse)

-- | The name of the solution stack these configuration options belong to.
describeConfigurationOptionsResponse_solutionStackName :: Lens.Lens' DescribeConfigurationOptionsResponse (Prelude.Maybe Prelude.Text)
describeConfigurationOptionsResponse_solutionStackName :: (Maybe Text -> f (Maybe Text))
-> DescribeConfigurationOptionsResponse
-> f DescribeConfigurationOptionsResponse
describeConfigurationOptionsResponse_solutionStackName = (DescribeConfigurationOptionsResponse -> Maybe Text)
-> (DescribeConfigurationOptionsResponse
    -> Maybe Text -> DescribeConfigurationOptionsResponse)
-> Lens
     DescribeConfigurationOptionsResponse
     DescribeConfigurationOptionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptionsResponse' {Maybe Text
solutionStackName :: Maybe Text
$sel:solutionStackName:DescribeConfigurationOptionsResponse' :: DescribeConfigurationOptionsResponse -> Maybe Text
solutionStackName} -> Maybe Text
solutionStackName) (\s :: DescribeConfigurationOptionsResponse
s@DescribeConfigurationOptionsResponse' {} Maybe Text
a -> DescribeConfigurationOptionsResponse
s {$sel:solutionStackName:DescribeConfigurationOptionsResponse' :: Maybe Text
solutionStackName = Maybe Text
a} :: DescribeConfigurationOptionsResponse)

-- | A list of ConfigurationOptionDescription.
describeConfigurationOptionsResponse_options :: Lens.Lens' DescribeConfigurationOptionsResponse (Prelude.Maybe [ConfigurationOptionDescription])
describeConfigurationOptionsResponse_options :: (Maybe [ConfigurationOptionDescription]
 -> f (Maybe [ConfigurationOptionDescription]))
-> DescribeConfigurationOptionsResponse
-> f DescribeConfigurationOptionsResponse
describeConfigurationOptionsResponse_options = (DescribeConfigurationOptionsResponse
 -> Maybe [ConfigurationOptionDescription])
-> (DescribeConfigurationOptionsResponse
    -> Maybe [ConfigurationOptionDescription]
    -> DescribeConfigurationOptionsResponse)
-> Lens
     DescribeConfigurationOptionsResponse
     DescribeConfigurationOptionsResponse
     (Maybe [ConfigurationOptionDescription])
     (Maybe [ConfigurationOptionDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConfigurationOptionsResponse' {Maybe [ConfigurationOptionDescription]
options :: Maybe [ConfigurationOptionDescription]
$sel:options:DescribeConfigurationOptionsResponse' :: DescribeConfigurationOptionsResponse
-> Maybe [ConfigurationOptionDescription]
options} -> Maybe [ConfigurationOptionDescription]
options) (\s :: DescribeConfigurationOptionsResponse
s@DescribeConfigurationOptionsResponse' {} Maybe [ConfigurationOptionDescription]
a -> DescribeConfigurationOptionsResponse
s {$sel:options:DescribeConfigurationOptionsResponse' :: Maybe [ConfigurationOptionDescription]
options = Maybe [ConfigurationOptionDescription]
a} :: DescribeConfigurationOptionsResponse) ((Maybe [ConfigurationOptionDescription]
  -> f (Maybe [ConfigurationOptionDescription]))
 -> DescribeConfigurationOptionsResponse
 -> f DescribeConfigurationOptionsResponse)
-> ((Maybe [ConfigurationOptionDescription]
     -> f (Maybe [ConfigurationOptionDescription]))
    -> Maybe [ConfigurationOptionDescription]
    -> f (Maybe [ConfigurationOptionDescription]))
-> (Maybe [ConfigurationOptionDescription]
    -> f (Maybe [ConfigurationOptionDescription]))
-> DescribeConfigurationOptionsResponse
-> f DescribeConfigurationOptionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConfigurationOptionDescription]
  [ConfigurationOptionDescription]
  [ConfigurationOptionDescription]
  [ConfigurationOptionDescription]
-> Iso
     (Maybe [ConfigurationOptionDescription])
     (Maybe [ConfigurationOptionDescription])
     (Maybe [ConfigurationOptionDescription])
     (Maybe [ConfigurationOptionDescription])
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
  [ConfigurationOptionDescription]
  [ConfigurationOptionDescription]
  [ConfigurationOptionDescription]
  [ConfigurationOptionDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeConfigurationOptionsResponse