{-# 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 #-}
module Amazonka.Evidently.Types.LaunchGroupConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data LaunchGroupConfig = LaunchGroupConfig'
{
LaunchGroupConfig -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
LaunchGroupConfig -> Text
feature :: Prelude.Text,
LaunchGroupConfig -> Text
name :: Prelude.Text,
LaunchGroupConfig -> Text
variation :: Prelude.Text
}
deriving (LaunchGroupConfig -> LaunchGroupConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchGroupConfig -> LaunchGroupConfig -> Bool
$c/= :: LaunchGroupConfig -> LaunchGroupConfig -> Bool
== :: LaunchGroupConfig -> LaunchGroupConfig -> Bool
$c== :: LaunchGroupConfig -> LaunchGroupConfig -> Bool
Prelude.Eq, ReadPrec [LaunchGroupConfig]
ReadPrec LaunchGroupConfig
Int -> ReadS LaunchGroupConfig
ReadS [LaunchGroupConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchGroupConfig]
$creadListPrec :: ReadPrec [LaunchGroupConfig]
readPrec :: ReadPrec LaunchGroupConfig
$creadPrec :: ReadPrec LaunchGroupConfig
readList :: ReadS [LaunchGroupConfig]
$creadList :: ReadS [LaunchGroupConfig]
readsPrec :: Int -> ReadS LaunchGroupConfig
$creadsPrec :: Int -> ReadS LaunchGroupConfig
Prelude.Read, Int -> LaunchGroupConfig -> ShowS
[LaunchGroupConfig] -> ShowS
LaunchGroupConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchGroupConfig] -> ShowS
$cshowList :: [LaunchGroupConfig] -> ShowS
show :: LaunchGroupConfig -> String
$cshow :: LaunchGroupConfig -> String
showsPrec :: Int -> LaunchGroupConfig -> ShowS
$cshowsPrec :: Int -> LaunchGroupConfig -> ShowS
Prelude.Show, forall x. Rep LaunchGroupConfig x -> LaunchGroupConfig
forall x. LaunchGroupConfig -> Rep LaunchGroupConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LaunchGroupConfig x -> LaunchGroupConfig
$cfrom :: forall x. LaunchGroupConfig -> Rep LaunchGroupConfig x
Prelude.Generic)
newLaunchGroupConfig ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
LaunchGroupConfig
newLaunchGroupConfig :: Text -> Text -> Text -> LaunchGroupConfig
newLaunchGroupConfig Text
pFeature_ Text
pName_ Text
pVariation_ =
LaunchGroupConfig'
{ $sel:description:LaunchGroupConfig' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:feature:LaunchGroupConfig' :: Text
feature = Text
pFeature_,
$sel:name:LaunchGroupConfig' :: Text
name = Text
pName_,
$sel:variation:LaunchGroupConfig' :: Text
variation = Text
pVariation_
}
launchGroupConfig_description :: Lens.Lens' LaunchGroupConfig (Prelude.Maybe Prelude.Text)
launchGroupConfig_description :: Lens' LaunchGroupConfig (Maybe Text)
launchGroupConfig_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchGroupConfig' {Maybe Text
description :: Maybe Text
$sel:description:LaunchGroupConfig' :: LaunchGroupConfig -> Maybe Text
description} -> Maybe Text
description) (\s :: LaunchGroupConfig
s@LaunchGroupConfig' {} Maybe Text
a -> LaunchGroupConfig
s {$sel:description:LaunchGroupConfig' :: Maybe Text
description = Maybe Text
a} :: LaunchGroupConfig)
launchGroupConfig_feature :: Lens.Lens' LaunchGroupConfig Prelude.Text
launchGroupConfig_feature :: Lens' LaunchGroupConfig Text
launchGroupConfig_feature = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchGroupConfig' {Text
feature :: Text
$sel:feature:LaunchGroupConfig' :: LaunchGroupConfig -> Text
feature} -> Text
feature) (\s :: LaunchGroupConfig
s@LaunchGroupConfig' {} Text
a -> LaunchGroupConfig
s {$sel:feature:LaunchGroupConfig' :: Text
feature = Text
a} :: LaunchGroupConfig)
launchGroupConfig_name :: Lens.Lens' LaunchGroupConfig Prelude.Text
launchGroupConfig_name :: Lens' LaunchGroupConfig Text
launchGroupConfig_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchGroupConfig' {Text
name :: Text
$sel:name:LaunchGroupConfig' :: LaunchGroupConfig -> Text
name} -> Text
name) (\s :: LaunchGroupConfig
s@LaunchGroupConfig' {} Text
a -> LaunchGroupConfig
s {$sel:name:LaunchGroupConfig' :: Text
name = Text
a} :: LaunchGroupConfig)
launchGroupConfig_variation :: Lens.Lens' LaunchGroupConfig Prelude.Text
launchGroupConfig_variation :: Lens' LaunchGroupConfig Text
launchGroupConfig_variation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchGroupConfig' {Text
variation :: Text
$sel:variation:LaunchGroupConfig' :: LaunchGroupConfig -> Text
variation} -> Text
variation) (\s :: LaunchGroupConfig
s@LaunchGroupConfig' {} Text
a -> LaunchGroupConfig
s {$sel:variation:LaunchGroupConfig' :: Text
variation = Text
a} :: LaunchGroupConfig)
instance Prelude.Hashable LaunchGroupConfig where
hashWithSalt :: Int -> LaunchGroupConfig -> Int
hashWithSalt Int
_salt LaunchGroupConfig' {Maybe Text
Text
variation :: Text
name :: Text
feature :: Text
description :: Maybe Text
$sel:variation:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:name:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:feature:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:description:LaunchGroupConfig' :: LaunchGroupConfig -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
feature
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
variation
instance Prelude.NFData LaunchGroupConfig where
rnf :: LaunchGroupConfig -> ()
rnf LaunchGroupConfig' {Maybe Text
Text
variation :: Text
name :: Text
feature :: Text
description :: Maybe Text
$sel:variation:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:name:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:feature:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:description:LaunchGroupConfig' :: LaunchGroupConfig -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
feature
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
variation
instance Data.ToJSON LaunchGroupConfig where
toJSON :: LaunchGroupConfig -> Value
toJSON LaunchGroupConfig' {Maybe Text
Text
variation :: Text
name :: Text
feature :: Text
description :: Maybe Text
$sel:variation:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:name:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:feature:LaunchGroupConfig' :: LaunchGroupConfig -> Text
$sel:description:LaunchGroupConfig' :: LaunchGroupConfig -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
forall a. a -> Maybe a
Prelude.Just (Key
"feature" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
feature),
forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"variation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
variation)
]
)