module Network.AWS.ElasticBeanstalk.ValidateConfigurationSettings
(
ValidateConfigurationSettings
, validateConfigurationSettings
, vcsApplicationName
, vcsEnvironmentName
, vcsOptionSettings
, vcsTemplateName
, ValidateConfigurationSettingsResponse
, validateConfigurationSettingsResponse
, vcsrMessages
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElasticBeanstalk.Types
import qualified GHC.Exts
data ValidateConfigurationSettings = ValidateConfigurationSettings
{ _vcsApplicationName :: Text
, _vcsEnvironmentName :: Maybe Text
, _vcsOptionSettings :: List "member" ConfigurationOptionSetting
, _vcsTemplateName :: Maybe Text
} deriving (Eq, Read, Show)
validateConfigurationSettings :: Text
-> ValidateConfigurationSettings
validateConfigurationSettings p1 = ValidateConfigurationSettings
{ _vcsApplicationName = p1
, _vcsTemplateName = Nothing
, _vcsEnvironmentName = Nothing
, _vcsOptionSettings = mempty
}
vcsApplicationName :: Lens' ValidateConfigurationSettings Text
vcsApplicationName =
lens _vcsApplicationName (\s a -> s { _vcsApplicationName = a })
vcsEnvironmentName :: Lens' ValidateConfigurationSettings (Maybe Text)
vcsEnvironmentName =
lens _vcsEnvironmentName (\s a -> s { _vcsEnvironmentName = a })
vcsOptionSettings :: Lens' ValidateConfigurationSettings [ConfigurationOptionSetting]
vcsOptionSettings =
lens _vcsOptionSettings (\s a -> s { _vcsOptionSettings = a })
. _List
vcsTemplateName :: Lens' ValidateConfigurationSettings (Maybe Text)
vcsTemplateName = lens _vcsTemplateName (\s a -> s { _vcsTemplateName = a })
newtype ValidateConfigurationSettingsResponse = ValidateConfigurationSettingsResponse
{ _vcsrMessages :: List "member" ValidationMessage
} deriving (Eq, Read, Show, Monoid, Semigroup)
instance GHC.Exts.IsList ValidateConfigurationSettingsResponse where
type Item ValidateConfigurationSettingsResponse = ValidationMessage
fromList = ValidateConfigurationSettingsResponse . GHC.Exts.fromList
toList = GHC.Exts.toList . _vcsrMessages
validateConfigurationSettingsResponse :: ValidateConfigurationSettingsResponse
validateConfigurationSettingsResponse = ValidateConfigurationSettingsResponse
{ _vcsrMessages = mempty
}
vcsrMessages :: Lens' ValidateConfigurationSettingsResponse [ValidationMessage]
vcsrMessages = lens _vcsrMessages (\s a -> s { _vcsrMessages = a }) . _List
instance ToPath ValidateConfigurationSettings where
toPath = const "/"
instance ToQuery ValidateConfigurationSettings where
toQuery ValidateConfigurationSettings{..} = mconcat
[ "ApplicationName" =? _vcsApplicationName
, "EnvironmentName" =? _vcsEnvironmentName
, "OptionSettings" =? _vcsOptionSettings
, "TemplateName" =? _vcsTemplateName
]
instance ToHeaders ValidateConfigurationSettings
instance AWSRequest ValidateConfigurationSettings where
type Sv ValidateConfigurationSettings = ElasticBeanstalk
type Rs ValidateConfigurationSettings = ValidateConfigurationSettingsResponse
request = post "ValidateConfigurationSettings"
response = xmlResponse
instance FromXML ValidateConfigurationSettingsResponse where
parseXML = withElement "ValidateConfigurationSettingsResult" $ \x -> ValidateConfigurationSettingsResponse
<$> x .@? "Messages" .!@ mempty