module Stratosphere.ElasticLoadBalancingV2.TargetGroup.MatcherProperty (
MatcherProperty(..), mkMatcherProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MatcherProperty
=
MatcherProperty {MatcherProperty -> ()
haddock_workaround_ :: (),
MatcherProperty -> Maybe (Value Text)
grpcCode :: (Prelude.Maybe (Value Prelude.Text)),
MatcherProperty -> Maybe (Value Text)
httpCode :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (MatcherProperty -> MatcherProperty -> Bool
(MatcherProperty -> MatcherProperty -> Bool)
-> (MatcherProperty -> MatcherProperty -> Bool)
-> Eq MatcherProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MatcherProperty -> MatcherProperty -> Bool
== :: MatcherProperty -> MatcherProperty -> Bool
$c/= :: MatcherProperty -> MatcherProperty -> Bool
/= :: MatcherProperty -> MatcherProperty -> Bool
Prelude.Eq, Int -> MatcherProperty -> ShowS
[MatcherProperty] -> ShowS
MatcherProperty -> String
(Int -> MatcherProperty -> ShowS)
-> (MatcherProperty -> String)
-> ([MatcherProperty] -> ShowS)
-> Show MatcherProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MatcherProperty -> ShowS
showsPrec :: Int -> MatcherProperty -> ShowS
$cshow :: MatcherProperty -> String
show :: MatcherProperty -> String
$cshowList :: [MatcherProperty] -> ShowS
showList :: [MatcherProperty] -> ShowS
Prelude.Show)
mkMatcherProperty :: MatcherProperty
mkMatcherProperty :: MatcherProperty
mkMatcherProperty
= MatcherProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), grpcCode :: Maybe (Value Text)
grpcCode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
httpCode :: Maybe (Value Text)
httpCode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MatcherProperty where
toResourceProperties :: MatcherProperty -> ResourceProperties
toResourceProperties MatcherProperty {Maybe (Value Text)
()
haddock_workaround_ :: MatcherProperty -> ()
grpcCode :: MatcherProperty -> Maybe (Value Text)
httpCode :: MatcherProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
grpcCode :: Maybe (Value Text)
httpCode :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ElasticLoadBalancingV2::TargetGroup.Matcher",
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
"GrpcCode" (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)
grpcCode,
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
"HttpCode" (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)
httpCode])}
instance JSON.ToJSON MatcherProperty where
toJSON :: MatcherProperty -> Value
toJSON MatcherProperty {Maybe (Value Text)
()
haddock_workaround_ :: MatcherProperty -> ()
grpcCode :: MatcherProperty -> Maybe (Value Text)
httpCode :: MatcherProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
grpcCode :: Maybe (Value Text)
httpCode :: 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
"GrpcCode" (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)
grpcCode,
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
"HttpCode" (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)
httpCode]))
instance Property "GrpcCode" MatcherProperty where
type PropertyType "GrpcCode" MatcherProperty = Value Prelude.Text
set :: PropertyType "GrpcCode" MatcherProperty
-> MatcherProperty -> MatcherProperty
set PropertyType "GrpcCode" MatcherProperty
newValue MatcherProperty {Maybe (Value Text)
()
haddock_workaround_ :: MatcherProperty -> ()
grpcCode :: MatcherProperty -> Maybe (Value Text)
httpCode :: MatcherProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
grpcCode :: Maybe (Value Text)
httpCode :: Maybe (Value Text)
..}
= MatcherProperty {grpcCode :: Maybe (Value Text)
grpcCode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GrpcCode" MatcherProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
httpCode :: Maybe (Value Text)
haddock_workaround_ :: ()
httpCode :: Maybe (Value Text)
..}
instance Property "HttpCode" MatcherProperty where
type PropertyType "HttpCode" MatcherProperty = Value Prelude.Text
set :: PropertyType "HttpCode" MatcherProperty
-> MatcherProperty -> MatcherProperty
set PropertyType "HttpCode" MatcherProperty
newValue MatcherProperty {Maybe (Value Text)
()
haddock_workaround_ :: MatcherProperty -> ()
grpcCode :: MatcherProperty -> Maybe (Value Text)
httpCode :: MatcherProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
grpcCode :: Maybe (Value Text)
httpCode :: Maybe (Value Text)
..}
= MatcherProperty {httpCode :: Maybe (Value Text)
httpCode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HttpCode" MatcherProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
grpcCode :: Maybe (Value Text)
haddock_workaround_ :: ()
grpcCode :: Maybe (Value Text)
..}