{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.ConfigurationOptionDescription
-- 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)
module Amazonka.ElasticBeanstalk.Types.ConfigurationOptionDescription where

import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.Types.ConfigurationOptionValueType
import Amazonka.ElasticBeanstalk.Types.OptionRestrictionRegex
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes the possible values for a configuration option.
--
-- /See:/ 'newConfigurationOptionDescription' smart constructor.
data ConfigurationOptionDescription = ConfigurationOptionDescription'
  { -- | If specified, the configuration option must be a numeric value less than
    -- this value.
    ConfigurationOptionDescription -> Maybe Int
maxValue :: Prelude.Maybe Prelude.Int,
    -- | If specified, the configuration option must be a string value that
    -- satisfies this regular expression.
    ConfigurationOptionDescription -> Maybe OptionRestrictionRegex
regex :: Prelude.Maybe OptionRestrictionRegex,
    -- | If specified, the configuration option must be a string value no longer
    -- than this value.
    ConfigurationOptionDescription -> Maybe Int
maxLength :: Prelude.Maybe Prelude.Int,
    -- | An indication of whether the user defined this configuration option:
    --
    -- -   @true@ : This configuration option was defined by the user. It is a
    --     valid choice for specifying if this as an @Option to Remove@ when
    --     updating configuration settings.
    --
    -- -   @false@ : This configuration was not defined by the user.
    --
    -- Constraint: You can remove only @UserDefined@ options from a
    -- configuration.
    --
    -- Valid Values: @true@ | @false@
    ConfigurationOptionDescription -> Maybe Bool
userDefined :: Prelude.Maybe Prelude.Bool,
    -- | A unique namespace identifying the option\'s associated AWS resource.
    ConfigurationOptionDescription -> Maybe Text
namespace :: Prelude.Maybe Prelude.Text,
    -- | If specified, values for the configuration option are selected from this
    -- list.
    ConfigurationOptionDescription -> Maybe [Text]
valueOptions :: Prelude.Maybe [Prelude.Text],
    -- | The name of the configuration option.
    ConfigurationOptionDescription -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | An indication of which action is required if the value for this
    -- configuration option changes:
    --
    -- -   @NoInterruption@ : There is no interruption to the environment or
    --     application availability.
    --
    -- -   @RestartEnvironment@ : The environment is entirely restarted, all
    --     AWS resources are deleted and recreated, and the environment is
    --     unavailable during the process.
    --
    -- -   @RestartApplicationServer@ : The environment is available the entire
    --     time. However, a short application outage occurs when the
    --     application servers on the running Amazon EC2 instances are
    --     restarted.
    ConfigurationOptionDescription -> Maybe Text
changeSeverity :: Prelude.Maybe Prelude.Text,
    -- | The default value for this configuration option.
    ConfigurationOptionDescription -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
    -- | An indication of which type of values this option has and whether it is
    -- allowable to select one or more than one of the possible values:
    --
    -- -   @Scalar@ : Values for this option are a single selection from the
    --     possible values, or an unformatted string, or numeric value governed
    --     by the @MIN\/MAX\/Regex@ constraints.
    --
    -- -   @List@ : Values for this option are multiple selections from the
    --     possible values.
    --
    -- -   @Boolean@ : Values for this option are either @true@ or @false@ .
    --
    -- -   @Json@ : Values for this option are a JSON representation of a
    --     @ConfigDocument@.
    ConfigurationOptionDescription
-> Maybe ConfigurationOptionValueType
valueType :: Prelude.Maybe ConfigurationOptionValueType,
    -- | If specified, the configuration option must be a numeric value greater
    -- than this value.
    ConfigurationOptionDescription -> Maybe Int
minValue :: Prelude.Maybe Prelude.Int
  }
  deriving (ConfigurationOptionDescription
-> ConfigurationOptionDescription -> Bool
(ConfigurationOptionDescription
 -> ConfigurationOptionDescription -> Bool)
-> (ConfigurationOptionDescription
    -> ConfigurationOptionDescription -> Bool)
-> Eq ConfigurationOptionDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationOptionDescription
-> ConfigurationOptionDescription -> Bool
$c/= :: ConfigurationOptionDescription
-> ConfigurationOptionDescription -> Bool
== :: ConfigurationOptionDescription
-> ConfigurationOptionDescription -> Bool
$c== :: ConfigurationOptionDescription
-> ConfigurationOptionDescription -> Bool
Prelude.Eq, ReadPrec [ConfigurationOptionDescription]
ReadPrec ConfigurationOptionDescription
Int -> ReadS ConfigurationOptionDescription
ReadS [ConfigurationOptionDescription]
(Int -> ReadS ConfigurationOptionDescription)
-> ReadS [ConfigurationOptionDescription]
-> ReadPrec ConfigurationOptionDescription
-> ReadPrec [ConfigurationOptionDescription]
-> Read ConfigurationOptionDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationOptionDescription]
$creadListPrec :: ReadPrec [ConfigurationOptionDescription]
readPrec :: ReadPrec ConfigurationOptionDescription
$creadPrec :: ReadPrec ConfigurationOptionDescription
readList :: ReadS [ConfigurationOptionDescription]
$creadList :: ReadS [ConfigurationOptionDescription]
readsPrec :: Int -> ReadS ConfigurationOptionDescription
$creadsPrec :: Int -> ReadS ConfigurationOptionDescription
Prelude.Read, Int -> ConfigurationOptionDescription -> ShowS
[ConfigurationOptionDescription] -> ShowS
ConfigurationOptionDescription -> String
(Int -> ConfigurationOptionDescription -> ShowS)
-> (ConfigurationOptionDescription -> String)
-> ([ConfigurationOptionDescription] -> ShowS)
-> Show ConfigurationOptionDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationOptionDescription] -> ShowS
$cshowList :: [ConfigurationOptionDescription] -> ShowS
show :: ConfigurationOptionDescription -> String
$cshow :: ConfigurationOptionDescription -> String
showsPrec :: Int -> ConfigurationOptionDescription -> ShowS
$cshowsPrec :: Int -> ConfigurationOptionDescription -> ShowS
Prelude.Show, (forall x.
 ConfigurationOptionDescription
 -> Rep ConfigurationOptionDescription x)
-> (forall x.
    Rep ConfigurationOptionDescription x
    -> ConfigurationOptionDescription)
-> Generic ConfigurationOptionDescription
forall x.
Rep ConfigurationOptionDescription x
-> ConfigurationOptionDescription
forall x.
ConfigurationOptionDescription
-> Rep ConfigurationOptionDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigurationOptionDescription x
-> ConfigurationOptionDescription
$cfrom :: forall x.
ConfigurationOptionDescription
-> Rep ConfigurationOptionDescription x
Prelude.Generic)

-- |
-- Create a value of 'ConfigurationOptionDescription' 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:
--
-- 'maxValue', 'configurationOptionDescription_maxValue' - If specified, the configuration option must be a numeric value less than
-- this value.
--
-- 'regex', 'configurationOptionDescription_regex' - If specified, the configuration option must be a string value that
-- satisfies this regular expression.
--
-- 'maxLength', 'configurationOptionDescription_maxLength' - If specified, the configuration option must be a string value no longer
-- than this value.
--
-- 'userDefined', 'configurationOptionDescription_userDefined' - An indication of whether the user defined this configuration option:
--
-- -   @true@ : This configuration option was defined by the user. It is a
--     valid choice for specifying if this as an @Option to Remove@ when
--     updating configuration settings.
--
-- -   @false@ : This configuration was not defined by the user.
--
-- Constraint: You can remove only @UserDefined@ options from a
-- configuration.
--
-- Valid Values: @true@ | @false@
--
-- 'namespace', 'configurationOptionDescription_namespace' - A unique namespace identifying the option\'s associated AWS resource.
--
-- 'valueOptions', 'configurationOptionDescription_valueOptions' - If specified, values for the configuration option are selected from this
-- list.
--
-- 'name', 'configurationOptionDescription_name' - The name of the configuration option.
--
-- 'changeSeverity', 'configurationOptionDescription_changeSeverity' - An indication of which action is required if the value for this
-- configuration option changes:
--
-- -   @NoInterruption@ : There is no interruption to the environment or
--     application availability.
--
-- -   @RestartEnvironment@ : The environment is entirely restarted, all
--     AWS resources are deleted and recreated, and the environment is
--     unavailable during the process.
--
-- -   @RestartApplicationServer@ : The environment is available the entire
--     time. However, a short application outage occurs when the
--     application servers on the running Amazon EC2 instances are
--     restarted.
--
-- 'defaultValue', 'configurationOptionDescription_defaultValue' - The default value for this configuration option.
--
-- 'valueType', 'configurationOptionDescription_valueType' - An indication of which type of values this option has and whether it is
-- allowable to select one or more than one of the possible values:
--
-- -   @Scalar@ : Values for this option are a single selection from the
--     possible values, or an unformatted string, or numeric value governed
--     by the @MIN\/MAX\/Regex@ constraints.
--
-- -   @List@ : Values for this option are multiple selections from the
--     possible values.
--
-- -   @Boolean@ : Values for this option are either @true@ or @false@ .
--
-- -   @Json@ : Values for this option are a JSON representation of a
--     @ConfigDocument@.
--
-- 'minValue', 'configurationOptionDescription_minValue' - If specified, the configuration option must be a numeric value greater
-- than this value.
newConfigurationOptionDescription ::
  ConfigurationOptionDescription
newConfigurationOptionDescription :: ConfigurationOptionDescription
newConfigurationOptionDescription =
  ConfigurationOptionDescription' :: Maybe Int
-> Maybe OptionRestrictionRegex
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ConfigurationOptionValueType
-> Maybe Int
-> ConfigurationOptionDescription
ConfigurationOptionDescription'
    { $sel:maxValue:ConfigurationOptionDescription' :: Maybe Int
maxValue =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:regex:ConfigurationOptionDescription' :: Maybe OptionRestrictionRegex
regex = Maybe OptionRestrictionRegex
forall a. Maybe a
Prelude.Nothing,
      $sel:maxLength:ConfigurationOptionDescription' :: Maybe Int
maxLength = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:userDefined:ConfigurationOptionDescription' :: Maybe Bool
userDefined = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:namespace:ConfigurationOptionDescription' :: Maybe Text
namespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:valueOptions:ConfigurationOptionDescription' :: Maybe [Text]
valueOptions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ConfigurationOptionDescription' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeSeverity:ConfigurationOptionDescription' :: Maybe Text
changeSeverity = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultValue:ConfigurationOptionDescription' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:valueType:ConfigurationOptionDescription' :: Maybe ConfigurationOptionValueType
valueType = Maybe ConfigurationOptionValueType
forall a. Maybe a
Prelude.Nothing,
      $sel:minValue:ConfigurationOptionDescription' :: Maybe Int
minValue = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | If specified, the configuration option must be a numeric value less than
-- this value.
configurationOptionDescription_maxValue :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe Prelude.Int)
configurationOptionDescription_maxValue :: (Maybe Int -> f (Maybe Int))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_maxValue = (ConfigurationOptionDescription -> Maybe Int)
-> (ConfigurationOptionDescription
    -> Maybe Int -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe Int
maxValue :: Maybe Int
$sel:maxValue:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe Int
maxValue} -> Maybe Int
maxValue) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe Int
a -> ConfigurationOptionDescription
s {$sel:maxValue:ConfigurationOptionDescription' :: Maybe Int
maxValue = Maybe Int
a} :: ConfigurationOptionDescription)

-- | If specified, the configuration option must be a string value that
-- satisfies this regular expression.
configurationOptionDescription_regex :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe OptionRestrictionRegex)
configurationOptionDescription_regex :: (Maybe OptionRestrictionRegex -> f (Maybe OptionRestrictionRegex))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_regex = (ConfigurationOptionDescription -> Maybe OptionRestrictionRegex)
-> (ConfigurationOptionDescription
    -> Maybe OptionRestrictionRegex -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe OptionRestrictionRegex)
     (Maybe OptionRestrictionRegex)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe OptionRestrictionRegex
regex :: Maybe OptionRestrictionRegex
$sel:regex:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe OptionRestrictionRegex
regex} -> Maybe OptionRestrictionRegex
regex) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe OptionRestrictionRegex
a -> ConfigurationOptionDescription
s {$sel:regex:ConfigurationOptionDescription' :: Maybe OptionRestrictionRegex
regex = Maybe OptionRestrictionRegex
a} :: ConfigurationOptionDescription)

-- | If specified, the configuration option must be a string value no longer
-- than this value.
configurationOptionDescription_maxLength :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe Prelude.Int)
configurationOptionDescription_maxLength :: (Maybe Int -> f (Maybe Int))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_maxLength = (ConfigurationOptionDescription -> Maybe Int)
-> (ConfigurationOptionDescription
    -> Maybe Int -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe Int
maxLength :: Maybe Int
$sel:maxLength:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe Int
maxLength} -> Maybe Int
maxLength) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe Int
a -> ConfigurationOptionDescription
s {$sel:maxLength:ConfigurationOptionDescription' :: Maybe Int
maxLength = Maybe Int
a} :: ConfigurationOptionDescription)

-- | An indication of whether the user defined this configuration option:
--
-- -   @true@ : This configuration option was defined by the user. It is a
--     valid choice for specifying if this as an @Option to Remove@ when
--     updating configuration settings.
--
-- -   @false@ : This configuration was not defined by the user.
--
-- Constraint: You can remove only @UserDefined@ options from a
-- configuration.
--
-- Valid Values: @true@ | @false@
configurationOptionDescription_userDefined :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe Prelude.Bool)
configurationOptionDescription_userDefined :: (Maybe Bool -> f (Maybe Bool))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_userDefined = (ConfigurationOptionDescription -> Maybe Bool)
-> (ConfigurationOptionDescription
    -> Maybe Bool -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe Bool
userDefined :: Maybe Bool
$sel:userDefined:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe Bool
userDefined} -> Maybe Bool
userDefined) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe Bool
a -> ConfigurationOptionDescription
s {$sel:userDefined:ConfigurationOptionDescription' :: Maybe Bool
userDefined = Maybe Bool
a} :: ConfigurationOptionDescription)

-- | A unique namespace identifying the option\'s associated AWS resource.
configurationOptionDescription_namespace :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe Prelude.Text)
configurationOptionDescription_namespace :: (Maybe Text -> f (Maybe Text))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_namespace = (ConfigurationOptionDescription -> Maybe Text)
-> (ConfigurationOptionDescription
    -> Maybe Text -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe Text
namespace :: Maybe Text
$sel:namespace:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe Text
namespace} -> Maybe Text
namespace) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe Text
a -> ConfigurationOptionDescription
s {$sel:namespace:ConfigurationOptionDescription' :: Maybe Text
namespace = Maybe Text
a} :: ConfigurationOptionDescription)

-- | If specified, values for the configuration option are selected from this
-- list.
configurationOptionDescription_valueOptions :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe [Prelude.Text])
configurationOptionDescription_valueOptions :: (Maybe [Text] -> f (Maybe [Text]))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_valueOptions = (ConfigurationOptionDescription -> Maybe [Text])
-> (ConfigurationOptionDescription
    -> Maybe [Text] -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe [Text]
valueOptions :: Maybe [Text]
$sel:valueOptions:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe [Text]
valueOptions} -> Maybe [Text]
valueOptions) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe [Text]
a -> ConfigurationOptionDescription
s {$sel:valueOptions:ConfigurationOptionDescription' :: Maybe [Text]
valueOptions = Maybe [Text]
a} :: ConfigurationOptionDescription) ((Maybe [Text] -> f (Maybe [Text]))
 -> ConfigurationOptionDescription
 -> f ConfigurationOptionDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the configuration option.
configurationOptionDescription_name :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe Prelude.Text)
configurationOptionDescription_name :: (Maybe Text -> f (Maybe Text))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_name = (ConfigurationOptionDescription -> Maybe Text)
-> (ConfigurationOptionDescription
    -> Maybe Text -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe Text
name :: Maybe Text
$sel:name:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe Text
name} -> Maybe Text
name) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe Text
a -> ConfigurationOptionDescription
s {$sel:name:ConfigurationOptionDescription' :: Maybe Text
name = Maybe Text
a} :: ConfigurationOptionDescription)

-- | An indication of which action is required if the value for this
-- configuration option changes:
--
-- -   @NoInterruption@ : There is no interruption to the environment or
--     application availability.
--
-- -   @RestartEnvironment@ : The environment is entirely restarted, all
--     AWS resources are deleted and recreated, and the environment is
--     unavailable during the process.
--
-- -   @RestartApplicationServer@ : The environment is available the entire
--     time. However, a short application outage occurs when the
--     application servers on the running Amazon EC2 instances are
--     restarted.
configurationOptionDescription_changeSeverity :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe Prelude.Text)
configurationOptionDescription_changeSeverity :: (Maybe Text -> f (Maybe Text))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_changeSeverity = (ConfigurationOptionDescription -> Maybe Text)
-> (ConfigurationOptionDescription
    -> Maybe Text -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe Text
changeSeverity :: Maybe Text
$sel:changeSeverity:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe Text
changeSeverity} -> Maybe Text
changeSeverity) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe Text
a -> ConfigurationOptionDescription
s {$sel:changeSeverity:ConfigurationOptionDescription' :: Maybe Text
changeSeverity = Maybe Text
a} :: ConfigurationOptionDescription)

-- | The default value for this configuration option.
configurationOptionDescription_defaultValue :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe Prelude.Text)
configurationOptionDescription_defaultValue :: (Maybe Text -> f (Maybe Text))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_defaultValue = (ConfigurationOptionDescription -> Maybe Text)
-> (ConfigurationOptionDescription
    -> Maybe Text -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe Text
a -> ConfigurationOptionDescription
s {$sel:defaultValue:ConfigurationOptionDescription' :: Maybe Text
defaultValue = Maybe Text
a} :: ConfigurationOptionDescription)

-- | An indication of which type of values this option has and whether it is
-- allowable to select one or more than one of the possible values:
--
-- -   @Scalar@ : Values for this option are a single selection from the
--     possible values, or an unformatted string, or numeric value governed
--     by the @MIN\/MAX\/Regex@ constraints.
--
-- -   @List@ : Values for this option are multiple selections from the
--     possible values.
--
-- -   @Boolean@ : Values for this option are either @true@ or @false@ .
--
-- -   @Json@ : Values for this option are a JSON representation of a
--     @ConfigDocument@.
configurationOptionDescription_valueType :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe ConfigurationOptionValueType)
configurationOptionDescription_valueType :: (Maybe ConfigurationOptionValueType
 -> f (Maybe ConfigurationOptionValueType))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_valueType = (ConfigurationOptionDescription
 -> Maybe ConfigurationOptionValueType)
-> (ConfigurationOptionDescription
    -> Maybe ConfigurationOptionValueType
    -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe ConfigurationOptionValueType)
     (Maybe ConfigurationOptionValueType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe ConfigurationOptionValueType
valueType :: Maybe ConfigurationOptionValueType
$sel:valueType:ConfigurationOptionDescription' :: ConfigurationOptionDescription
-> Maybe ConfigurationOptionValueType
valueType} -> Maybe ConfigurationOptionValueType
valueType) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe ConfigurationOptionValueType
a -> ConfigurationOptionDescription
s {$sel:valueType:ConfigurationOptionDescription' :: Maybe ConfigurationOptionValueType
valueType = Maybe ConfigurationOptionValueType
a} :: ConfigurationOptionDescription)

-- | If specified, the configuration option must be a numeric value greater
-- than this value.
configurationOptionDescription_minValue :: Lens.Lens' ConfigurationOptionDescription (Prelude.Maybe Prelude.Int)
configurationOptionDescription_minValue :: (Maybe Int -> f (Maybe Int))
-> ConfigurationOptionDescription
-> f ConfigurationOptionDescription
configurationOptionDescription_minValue = (ConfigurationOptionDescription -> Maybe Int)
-> (ConfigurationOptionDescription
    -> Maybe Int -> ConfigurationOptionDescription)
-> Lens
     ConfigurationOptionDescription
     ConfigurationOptionDescription
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationOptionDescription' {Maybe Int
minValue :: Maybe Int
$sel:minValue:ConfigurationOptionDescription' :: ConfigurationOptionDescription -> Maybe Int
minValue} -> Maybe Int
minValue) (\s :: ConfigurationOptionDescription
s@ConfigurationOptionDescription' {} Maybe Int
a -> ConfigurationOptionDescription
s {$sel:minValue:ConfigurationOptionDescription' :: Maybe Int
minValue = Maybe Int
a} :: ConfigurationOptionDescription)

instance Core.FromXML ConfigurationOptionDescription where
  parseXML :: [Node] -> Either String ConfigurationOptionDescription
parseXML [Node]
x =
    Maybe Int
-> Maybe OptionRestrictionRegex
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ConfigurationOptionValueType
-> Maybe Int
-> ConfigurationOptionDescription
ConfigurationOptionDescription'
      (Maybe Int
 -> Maybe OptionRestrictionRegex
 -> Maybe Int
 -> Maybe Bool
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ConfigurationOptionValueType
 -> Maybe Int
 -> ConfigurationOptionDescription)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe OptionRestrictionRegex
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConfigurationOptionValueType
      -> Maybe Int
      -> ConfigurationOptionDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MaxValue")
      Either
  String
  (Maybe OptionRestrictionRegex
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConfigurationOptionValueType
   -> Maybe Int
   -> ConfigurationOptionDescription)
-> Either String (Maybe OptionRestrictionRegex)
-> Either
     String
     (Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConfigurationOptionValueType
      -> Maybe Int
      -> ConfigurationOptionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe OptionRestrictionRegex)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Regex")
      Either
  String
  (Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConfigurationOptionValueType
   -> Maybe Int
   -> ConfigurationOptionDescription)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConfigurationOptionValueType
      -> Maybe Int
      -> ConfigurationOptionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MaxLength")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConfigurationOptionValueType
   -> Maybe Int
   -> ConfigurationOptionDescription)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConfigurationOptionValueType
      -> Maybe Int
      -> ConfigurationOptionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"UserDefined")
      Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConfigurationOptionValueType
   -> Maybe Int
   -> ConfigurationOptionDescription)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConfigurationOptionValueType
      -> Maybe Int
      -> ConfigurationOptionDescription)
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
"Namespace")
      Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConfigurationOptionValueType
   -> Maybe Int
   -> ConfigurationOptionDescription)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ConfigurationOptionValueType
      -> Maybe Int
      -> ConfigurationOptionDescription)
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
"ValueOptions" 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 [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ConfigurationOptionValueType
   -> Maybe Int
   -> ConfigurationOptionDescription)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ConfigurationOptionValueType
      -> Maybe Int
      -> ConfigurationOptionDescription)
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
"Name")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ConfigurationOptionValueType
   -> Maybe Int
   -> ConfigurationOptionDescription)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ConfigurationOptionValueType
      -> Maybe Int
      -> ConfigurationOptionDescription)
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
"ChangeSeverity")
      Either
  String
  (Maybe Text
   -> Maybe ConfigurationOptionValueType
   -> Maybe Int
   -> ConfigurationOptionDescription)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ConfigurationOptionValueType
      -> Maybe Int -> ConfigurationOptionDescription)
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
"DefaultValue")
      Either
  String
  (Maybe ConfigurationOptionValueType
   -> Maybe Int -> ConfigurationOptionDescription)
-> Either String (Maybe ConfigurationOptionValueType)
-> Either String (Maybe Int -> ConfigurationOptionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node]
-> Text -> Either String (Maybe ConfigurationOptionValueType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ValueType")
      Either String (Maybe Int -> ConfigurationOptionDescription)
-> Either String (Maybe Int)
-> Either String ConfigurationOptionDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"MinValue")

instance
  Prelude.Hashable
    ConfigurationOptionDescription

instance
  Prelude.NFData
    ConfigurationOptionDescription