{-# 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.ValidateConfigurationSettings
-- 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)
--
-- Takes a set of configuration settings and either a configuration
-- template or environment, and determines whether those values are valid.
--
-- This action returns a list of messages indicating any errors or warnings
-- associated with the selection of option values.
module Amazonka.ElasticBeanstalk.ValidateConfigurationSettings
  ( -- * Creating a Request
    ValidateConfigurationSettings (..),
    newValidateConfigurationSettings,

    -- * Request Lenses
    validateConfigurationSettings_templateName,
    validateConfigurationSettings_environmentName,
    validateConfigurationSettings_applicationName,
    validateConfigurationSettings_optionSettings,

    -- * Destructuring the Response
    ValidateConfigurationSettingsResponse (..),
    newValidateConfigurationSettingsResponse,

    -- * Response Lenses
    validateConfigurationSettingsResponse_messages,
    validateConfigurationSettingsResponse_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

-- | A list of validation messages for a specified configuration template.
--
-- /See:/ 'newValidateConfigurationSettings' smart constructor.
data ValidateConfigurationSettings = ValidateConfigurationSettings'
  { -- | The name of the configuration template to validate the settings against.
    --
    -- Condition: You cannot specify both this and an environment name.
    ValidateConfigurationSettings -> Maybe Text
templateName :: Prelude.Maybe Prelude.Text,
    -- | The name of the environment to validate the settings against.
    --
    -- Condition: You cannot specify both this and a configuration template
    -- name.
    ValidateConfigurationSettings -> Maybe Text
environmentName :: Prelude.Maybe Prelude.Text,
    -- | The name of the application that the configuration template or
    -- environment belongs to.
    ValidateConfigurationSettings -> Text
applicationName :: Prelude.Text,
    -- | A list of the options and desired values to evaluate.
    ValidateConfigurationSettings -> [ConfigurationOptionSetting]
optionSettings :: [ConfigurationOptionSetting]
  }
  deriving (ValidateConfigurationSettings
-> ValidateConfigurationSettings -> Bool
(ValidateConfigurationSettings
 -> ValidateConfigurationSettings -> Bool)
-> (ValidateConfigurationSettings
    -> ValidateConfigurationSettings -> Bool)
-> Eq ValidateConfigurationSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ValidateConfigurationSettings
-> ValidateConfigurationSettings -> Bool
$c/= :: ValidateConfigurationSettings
-> ValidateConfigurationSettings -> Bool
== :: ValidateConfigurationSettings
-> ValidateConfigurationSettings -> Bool
$c== :: ValidateConfigurationSettings
-> ValidateConfigurationSettings -> Bool
Prelude.Eq, ReadPrec [ValidateConfigurationSettings]
ReadPrec ValidateConfigurationSettings
Int -> ReadS ValidateConfigurationSettings
ReadS [ValidateConfigurationSettings]
(Int -> ReadS ValidateConfigurationSettings)
-> ReadS [ValidateConfigurationSettings]
-> ReadPrec ValidateConfigurationSettings
-> ReadPrec [ValidateConfigurationSettings]
-> Read ValidateConfigurationSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ValidateConfigurationSettings]
$creadListPrec :: ReadPrec [ValidateConfigurationSettings]
readPrec :: ReadPrec ValidateConfigurationSettings
$creadPrec :: ReadPrec ValidateConfigurationSettings
readList :: ReadS [ValidateConfigurationSettings]
$creadList :: ReadS [ValidateConfigurationSettings]
readsPrec :: Int -> ReadS ValidateConfigurationSettings
$creadsPrec :: Int -> ReadS ValidateConfigurationSettings
Prelude.Read, Int -> ValidateConfigurationSettings -> ShowS
[ValidateConfigurationSettings] -> ShowS
ValidateConfigurationSettings -> String
(Int -> ValidateConfigurationSettings -> ShowS)
-> (ValidateConfigurationSettings -> String)
-> ([ValidateConfigurationSettings] -> ShowS)
-> Show ValidateConfigurationSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ValidateConfigurationSettings] -> ShowS
$cshowList :: [ValidateConfigurationSettings] -> ShowS
show :: ValidateConfigurationSettings -> String
$cshow :: ValidateConfigurationSettings -> String
showsPrec :: Int -> ValidateConfigurationSettings -> ShowS
$cshowsPrec :: Int -> ValidateConfigurationSettings -> ShowS
Prelude.Show, (forall x.
 ValidateConfigurationSettings
 -> Rep ValidateConfigurationSettings x)
-> (forall x.
    Rep ValidateConfigurationSettings x
    -> ValidateConfigurationSettings)
-> Generic ValidateConfigurationSettings
forall x.
Rep ValidateConfigurationSettings x
-> ValidateConfigurationSettings
forall x.
ValidateConfigurationSettings
-> Rep ValidateConfigurationSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ValidateConfigurationSettings x
-> ValidateConfigurationSettings
$cfrom :: forall x.
ValidateConfigurationSettings
-> Rep ValidateConfigurationSettings x
Prelude.Generic)

-- |
-- Create a value of 'ValidateConfigurationSettings' 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', 'validateConfigurationSettings_templateName' - The name of the configuration template to validate the settings against.
--
-- Condition: You cannot specify both this and an environment name.
--
-- 'environmentName', 'validateConfigurationSettings_environmentName' - The name of the environment to validate the settings against.
--
-- Condition: You cannot specify both this and a configuration template
-- name.
--
-- 'applicationName', 'validateConfigurationSettings_applicationName' - The name of the application that the configuration template or
-- environment belongs to.
--
-- 'optionSettings', 'validateConfigurationSettings_optionSettings' - A list of the options and desired values to evaluate.
newValidateConfigurationSettings ::
  -- | 'applicationName'
  Prelude.Text ->
  ValidateConfigurationSettings
newValidateConfigurationSettings :: Text -> ValidateConfigurationSettings
newValidateConfigurationSettings Text
pApplicationName_ =
  ValidateConfigurationSettings' :: Maybe Text
-> Maybe Text
-> Text
-> [ConfigurationOptionSetting]
-> ValidateConfigurationSettings
ValidateConfigurationSettings'
    { $sel:templateName:ValidateConfigurationSettings' :: Maybe Text
templateName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:environmentName:ValidateConfigurationSettings' :: Maybe Text
environmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationName:ValidateConfigurationSettings' :: Text
applicationName = Text
pApplicationName_,
      $sel:optionSettings:ValidateConfigurationSettings' :: [ConfigurationOptionSetting]
optionSettings = [ConfigurationOptionSetting]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The name of the configuration template to validate the settings against.
--
-- Condition: You cannot specify both this and an environment name.
validateConfigurationSettings_templateName :: Lens.Lens' ValidateConfigurationSettings (Prelude.Maybe Prelude.Text)
validateConfigurationSettings_templateName :: (Maybe Text -> f (Maybe Text))
-> ValidateConfigurationSettings -> f ValidateConfigurationSettings
validateConfigurationSettings_templateName = (ValidateConfigurationSettings -> Maybe Text)
-> (ValidateConfigurationSettings
    -> Maybe Text -> ValidateConfigurationSettings)
-> Lens
     ValidateConfigurationSettings
     ValidateConfigurationSettings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidateConfigurationSettings' {Maybe Text
templateName :: Maybe Text
$sel:templateName:ValidateConfigurationSettings' :: ValidateConfigurationSettings -> Maybe Text
templateName} -> Maybe Text
templateName) (\s :: ValidateConfigurationSettings
s@ValidateConfigurationSettings' {} Maybe Text
a -> ValidateConfigurationSettings
s {$sel:templateName:ValidateConfigurationSettings' :: Maybe Text
templateName = Maybe Text
a} :: ValidateConfigurationSettings)

-- | The name of the environment to validate the settings against.
--
-- Condition: You cannot specify both this and a configuration template
-- name.
validateConfigurationSettings_environmentName :: Lens.Lens' ValidateConfigurationSettings (Prelude.Maybe Prelude.Text)
validateConfigurationSettings_environmentName :: (Maybe Text -> f (Maybe Text))
-> ValidateConfigurationSettings -> f ValidateConfigurationSettings
validateConfigurationSettings_environmentName = (ValidateConfigurationSettings -> Maybe Text)
-> (ValidateConfigurationSettings
    -> Maybe Text -> ValidateConfigurationSettings)
-> Lens
     ValidateConfigurationSettings
     ValidateConfigurationSettings
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidateConfigurationSettings' {Maybe Text
environmentName :: Maybe Text
$sel:environmentName:ValidateConfigurationSettings' :: ValidateConfigurationSettings -> Maybe Text
environmentName} -> Maybe Text
environmentName) (\s :: ValidateConfigurationSettings
s@ValidateConfigurationSettings' {} Maybe Text
a -> ValidateConfigurationSettings
s {$sel:environmentName:ValidateConfigurationSettings' :: Maybe Text
environmentName = Maybe Text
a} :: ValidateConfigurationSettings)

-- | The name of the application that the configuration template or
-- environment belongs to.
validateConfigurationSettings_applicationName :: Lens.Lens' ValidateConfigurationSettings Prelude.Text
validateConfigurationSettings_applicationName :: (Text -> f Text)
-> ValidateConfigurationSettings -> f ValidateConfigurationSettings
validateConfigurationSettings_applicationName = (ValidateConfigurationSettings -> Text)
-> (ValidateConfigurationSettings
    -> Text -> ValidateConfigurationSettings)
-> Lens
     ValidateConfigurationSettings
     ValidateConfigurationSettings
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidateConfigurationSettings' {Text
applicationName :: Text
$sel:applicationName:ValidateConfigurationSettings' :: ValidateConfigurationSettings -> Text
applicationName} -> Text
applicationName) (\s :: ValidateConfigurationSettings
s@ValidateConfigurationSettings' {} Text
a -> ValidateConfigurationSettings
s {$sel:applicationName:ValidateConfigurationSettings' :: Text
applicationName = Text
a} :: ValidateConfigurationSettings)

-- | A list of the options and desired values to evaluate.
validateConfigurationSettings_optionSettings :: Lens.Lens' ValidateConfigurationSettings [ConfigurationOptionSetting]
validateConfigurationSettings_optionSettings :: ([ConfigurationOptionSetting] -> f [ConfigurationOptionSetting])
-> ValidateConfigurationSettings -> f ValidateConfigurationSettings
validateConfigurationSettings_optionSettings = (ValidateConfigurationSettings -> [ConfigurationOptionSetting])
-> (ValidateConfigurationSettings
    -> [ConfigurationOptionSetting] -> ValidateConfigurationSettings)
-> Lens
     ValidateConfigurationSettings
     ValidateConfigurationSettings
     [ConfigurationOptionSetting]
     [ConfigurationOptionSetting]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ValidateConfigurationSettings' {[ConfigurationOptionSetting]
optionSettings :: [ConfigurationOptionSetting]
$sel:optionSettings:ValidateConfigurationSettings' :: ValidateConfigurationSettings -> [ConfigurationOptionSetting]
optionSettings} -> [ConfigurationOptionSetting]
optionSettings) (\s :: ValidateConfigurationSettings
s@ValidateConfigurationSettings' {} [ConfigurationOptionSetting]
a -> ValidateConfigurationSettings
s {$sel:optionSettings:ValidateConfigurationSettings' :: [ConfigurationOptionSetting]
optionSettings = [ConfigurationOptionSetting]
a} :: ValidateConfigurationSettings) (([ConfigurationOptionSetting] -> f [ConfigurationOptionSetting])
 -> ValidateConfigurationSettings
 -> f ValidateConfigurationSettings)
-> (([ConfigurationOptionSetting]
     -> f [ConfigurationOptionSetting])
    -> [ConfigurationOptionSetting] -> f [ConfigurationOptionSetting])
-> ([ConfigurationOptionSetting] -> f [ConfigurationOptionSetting])
-> ValidateConfigurationSettings
-> f ValidateConfigurationSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ConfigurationOptionSetting] -> f [ConfigurationOptionSetting])
-> [ConfigurationOptionSetting] -> f [ConfigurationOptionSetting]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    ValidateConfigurationSettings
  where
  type
    AWSResponse ValidateConfigurationSettings =
      ValidateConfigurationSettingsResponse
  request :: ValidateConfigurationSettings
-> Request ValidateConfigurationSettings
request = Service
-> ValidateConfigurationSettings
-> Request ValidateConfigurationSettings
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ValidateConfigurationSettings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ValidateConfigurationSettings)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ValidateConfigurationSettings))
-> Logger
-> Service
-> Proxy ValidateConfigurationSettings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ValidateConfigurationSettings)))
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
"ValidateConfigurationSettingsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [ValidationMessage]
-> Int -> ValidateConfigurationSettingsResponse
ValidateConfigurationSettingsResponse'
            (Maybe [ValidationMessage]
 -> Int -> ValidateConfigurationSettingsResponse)
-> Either String (Maybe [ValidationMessage])
-> Either String (Int -> ValidateConfigurationSettingsResponse)
forall (f :: * -> *) a b. Functor 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
"Messages" 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 [ValidationMessage]))
-> Either String (Maybe [ValidationMessage])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ValidationMessage])
-> [Node] -> Either String (Maybe [ValidationMessage])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ValidationMessage]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> ValidateConfigurationSettingsResponse)
-> Either String Int
-> Either String ValidateConfigurationSettingsResponse
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
    ValidateConfigurationSettings

instance Prelude.NFData ValidateConfigurationSettings

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

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

instance Core.ToQuery ValidateConfigurationSettings where
  toQuery :: ValidateConfigurationSettings -> QueryString
toQuery ValidateConfigurationSettings' {[ConfigurationOptionSetting]
Maybe Text
Text
optionSettings :: [ConfigurationOptionSetting]
applicationName :: Text
environmentName :: Maybe Text
templateName :: Maybe Text
$sel:optionSettings:ValidateConfigurationSettings' :: ValidateConfigurationSettings -> [ConfigurationOptionSetting]
$sel:applicationName:ValidateConfigurationSettings' :: ValidateConfigurationSettings -> Text
$sel:environmentName:ValidateConfigurationSettings' :: ValidateConfigurationSettings -> Maybe Text
$sel:templateName:ValidateConfigurationSettings' :: ValidateConfigurationSettings -> 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
"ValidateConfigurationSettings" ::
                      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
"EnvironmentName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
environmentName,
        ByteString
"ApplicationName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
applicationName,
        ByteString
"OptionSettings"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [ConfigurationOptionSetting] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [ConfigurationOptionSetting]
optionSettings
      ]

-- | Provides a list of validation messages.
--
-- /See:/ 'newValidateConfigurationSettingsResponse' smart constructor.
data ValidateConfigurationSettingsResponse = ValidateConfigurationSettingsResponse'
  { -- | A list of ValidationMessage.
    ValidateConfigurationSettingsResponse -> Maybe [ValidationMessage]
messages :: Prelude.Maybe [ValidationMessage],
    -- | The response's http status code.
    ValidateConfigurationSettingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ValidateConfigurationSettingsResponse
-> ValidateConfigurationSettingsResponse -> Bool
(ValidateConfigurationSettingsResponse
 -> ValidateConfigurationSettingsResponse -> Bool)
-> (ValidateConfigurationSettingsResponse
    -> ValidateConfigurationSettingsResponse -> Bool)
-> Eq ValidateConfigurationSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ValidateConfigurationSettingsResponse
-> ValidateConfigurationSettingsResponse -> Bool
$c/= :: ValidateConfigurationSettingsResponse
-> ValidateConfigurationSettingsResponse -> Bool
== :: ValidateConfigurationSettingsResponse
-> ValidateConfigurationSettingsResponse -> Bool
$c== :: ValidateConfigurationSettingsResponse
-> ValidateConfigurationSettingsResponse -> Bool
Prelude.Eq, ReadPrec [ValidateConfigurationSettingsResponse]
ReadPrec ValidateConfigurationSettingsResponse
Int -> ReadS ValidateConfigurationSettingsResponse
ReadS [ValidateConfigurationSettingsResponse]
(Int -> ReadS ValidateConfigurationSettingsResponse)
-> ReadS [ValidateConfigurationSettingsResponse]
-> ReadPrec ValidateConfigurationSettingsResponse
-> ReadPrec [ValidateConfigurationSettingsResponse]
-> Read ValidateConfigurationSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ValidateConfigurationSettingsResponse]
$creadListPrec :: ReadPrec [ValidateConfigurationSettingsResponse]
readPrec :: ReadPrec ValidateConfigurationSettingsResponse
$creadPrec :: ReadPrec ValidateConfigurationSettingsResponse
readList :: ReadS [ValidateConfigurationSettingsResponse]
$creadList :: ReadS [ValidateConfigurationSettingsResponse]
readsPrec :: Int -> ReadS ValidateConfigurationSettingsResponse
$creadsPrec :: Int -> ReadS ValidateConfigurationSettingsResponse
Prelude.Read, Int -> ValidateConfigurationSettingsResponse -> ShowS
[ValidateConfigurationSettingsResponse] -> ShowS
ValidateConfigurationSettingsResponse -> String
(Int -> ValidateConfigurationSettingsResponse -> ShowS)
-> (ValidateConfigurationSettingsResponse -> String)
-> ([ValidateConfigurationSettingsResponse] -> ShowS)
-> Show ValidateConfigurationSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ValidateConfigurationSettingsResponse] -> ShowS
$cshowList :: [ValidateConfigurationSettingsResponse] -> ShowS
show :: ValidateConfigurationSettingsResponse -> String
$cshow :: ValidateConfigurationSettingsResponse -> String
showsPrec :: Int -> ValidateConfigurationSettingsResponse -> ShowS
$cshowsPrec :: Int -> ValidateConfigurationSettingsResponse -> ShowS
Prelude.Show, (forall x.
 ValidateConfigurationSettingsResponse
 -> Rep ValidateConfigurationSettingsResponse x)
-> (forall x.
    Rep ValidateConfigurationSettingsResponse x
    -> ValidateConfigurationSettingsResponse)
-> Generic ValidateConfigurationSettingsResponse
forall x.
Rep ValidateConfigurationSettingsResponse x
-> ValidateConfigurationSettingsResponse
forall x.
ValidateConfigurationSettingsResponse
-> Rep ValidateConfigurationSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ValidateConfigurationSettingsResponse x
-> ValidateConfigurationSettingsResponse
$cfrom :: forall x.
ValidateConfigurationSettingsResponse
-> Rep ValidateConfigurationSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ValidateConfigurationSettingsResponse' 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:
--
-- 'messages', 'validateConfigurationSettingsResponse_messages' - A list of ValidationMessage.
--
-- 'httpStatus', 'validateConfigurationSettingsResponse_httpStatus' - The response's http status code.
newValidateConfigurationSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ValidateConfigurationSettingsResponse
newValidateConfigurationSettingsResponse :: Int -> ValidateConfigurationSettingsResponse
newValidateConfigurationSettingsResponse Int
pHttpStatus_ =
  ValidateConfigurationSettingsResponse' :: Maybe [ValidationMessage]
-> Int -> ValidateConfigurationSettingsResponse
ValidateConfigurationSettingsResponse'
    { $sel:messages:ValidateConfigurationSettingsResponse' :: Maybe [ValidationMessage]
messages =
        Maybe [ValidationMessage]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ValidateConfigurationSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance
  Prelude.NFData
    ValidateConfigurationSettingsResponse