module Stratosphere.ElasticLoadBalancingV2.TargetGroup.TargetGroupAttributeProperty (
TargetGroupAttributeProperty(..), mkTargetGroupAttributeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TargetGroupAttributeProperty
=
TargetGroupAttributeProperty {TargetGroupAttributeProperty -> ()
haddock_workaround_ :: (),
TargetGroupAttributeProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text)),
TargetGroupAttributeProperty -> Maybe (Value Text)
value :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> Bool
(TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> Bool)
-> (TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> Bool)
-> Eq TargetGroupAttributeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> Bool
== :: TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> Bool
$c/= :: TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> Bool
/= :: TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> Bool
Prelude.Eq, Int -> TargetGroupAttributeProperty -> ShowS
[TargetGroupAttributeProperty] -> ShowS
TargetGroupAttributeProperty -> String
(Int -> TargetGroupAttributeProperty -> ShowS)
-> (TargetGroupAttributeProperty -> String)
-> ([TargetGroupAttributeProperty] -> ShowS)
-> Show TargetGroupAttributeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetGroupAttributeProperty -> ShowS
showsPrec :: Int -> TargetGroupAttributeProperty -> ShowS
$cshow :: TargetGroupAttributeProperty -> String
show :: TargetGroupAttributeProperty -> String
$cshowList :: [TargetGroupAttributeProperty] -> ShowS
showList :: [TargetGroupAttributeProperty] -> ShowS
Prelude.Show)
mkTargetGroupAttributeProperty :: TargetGroupAttributeProperty
mkTargetGroupAttributeProperty :: TargetGroupAttributeProperty
mkTargetGroupAttributeProperty
= TargetGroupAttributeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Maybe (Value Text)
key = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
value :: Maybe (Value Text)
value = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetGroupAttributeProperty where
toResourceProperties :: TargetGroupAttributeProperty -> ResourceProperties
toResourceProperties TargetGroupAttributeProperty {Maybe (Value Text)
()
haddock_workaround_ :: TargetGroupAttributeProperty -> ()
key :: TargetGroupAttributeProperty -> Maybe (Value Text)
value :: TargetGroupAttributeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancingV2::TargetGroup.TargetGroupAttribute",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Key" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
key,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Value" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
value])}
instance JSON.ToJSON TargetGroupAttributeProperty where
toJSON :: TargetGroupAttributeProperty -> Value
toJSON TargetGroupAttributeProperty {Maybe (Value Text)
()
haddock_workaround_ :: TargetGroupAttributeProperty -> ()
key :: TargetGroupAttributeProperty -> Maybe (Value Text)
value :: TargetGroupAttributeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Key" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
key,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Value" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
value]))
instance Property "Key" TargetGroupAttributeProperty where
type PropertyType "Key" TargetGroupAttributeProperty = Value Prelude.Text
set :: PropertyType "Key" TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> TargetGroupAttributeProperty
set PropertyType "Key" TargetGroupAttributeProperty
newValue TargetGroupAttributeProperty {Maybe (Value Text)
()
haddock_workaround_ :: TargetGroupAttributeProperty -> ()
key :: TargetGroupAttributeProperty -> Maybe (Value Text)
value :: TargetGroupAttributeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= TargetGroupAttributeProperty {key :: Maybe (Value Text)
key = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Key" TargetGroupAttributeProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
value :: Maybe (Value Text)
haddock_workaround_ :: ()
value :: Maybe (Value Text)
..}
instance Property "Value" TargetGroupAttributeProperty where
type PropertyType "Value" TargetGroupAttributeProperty = Value Prelude.Text
set :: PropertyType "Value" TargetGroupAttributeProperty
-> TargetGroupAttributeProperty -> TargetGroupAttributeProperty
set PropertyType "Value" TargetGroupAttributeProperty
newValue TargetGroupAttributeProperty {Maybe (Value Text)
()
haddock_workaround_ :: TargetGroupAttributeProperty -> ()
key :: TargetGroupAttributeProperty -> Maybe (Value Text)
value :: TargetGroupAttributeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe (Value Text)
..}
= TargetGroupAttributeProperty {value :: Maybe (Value Text)
value = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" TargetGroupAttributeProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
key :: Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
..}