{-# 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.SecurityHub.Types.AwsElasticBeanstalkEnvironmentEnvironmentLink where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsElasticBeanstalkEnvironmentEnvironmentLink = AwsElasticBeanstalkEnvironmentEnvironmentLink'
{
AwsElasticBeanstalkEnvironmentEnvironmentLink -> Maybe Text
linkName :: Prelude.Maybe Prelude.Text,
AwsElasticBeanstalkEnvironmentEnvironmentLink -> Maybe Text
environmentName :: Prelude.Maybe Prelude.Text
}
deriving (AwsElasticBeanstalkEnvironmentEnvironmentLink
-> AwsElasticBeanstalkEnvironmentEnvironmentLink -> Bool
(AwsElasticBeanstalkEnvironmentEnvironmentLink
-> AwsElasticBeanstalkEnvironmentEnvironmentLink -> Bool)
-> (AwsElasticBeanstalkEnvironmentEnvironmentLink
-> AwsElasticBeanstalkEnvironmentEnvironmentLink -> Bool)
-> Eq AwsElasticBeanstalkEnvironmentEnvironmentLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsElasticBeanstalkEnvironmentEnvironmentLink
-> AwsElasticBeanstalkEnvironmentEnvironmentLink -> Bool
$c/= :: AwsElasticBeanstalkEnvironmentEnvironmentLink
-> AwsElasticBeanstalkEnvironmentEnvironmentLink -> Bool
== :: AwsElasticBeanstalkEnvironmentEnvironmentLink
-> AwsElasticBeanstalkEnvironmentEnvironmentLink -> Bool
$c== :: AwsElasticBeanstalkEnvironmentEnvironmentLink
-> AwsElasticBeanstalkEnvironmentEnvironmentLink -> Bool
Prelude.Eq, ReadPrec [AwsElasticBeanstalkEnvironmentEnvironmentLink]
ReadPrec AwsElasticBeanstalkEnvironmentEnvironmentLink
Int -> ReadS AwsElasticBeanstalkEnvironmentEnvironmentLink
ReadS [AwsElasticBeanstalkEnvironmentEnvironmentLink]
(Int -> ReadS AwsElasticBeanstalkEnvironmentEnvironmentLink)
-> ReadS [AwsElasticBeanstalkEnvironmentEnvironmentLink]
-> ReadPrec AwsElasticBeanstalkEnvironmentEnvironmentLink
-> ReadPrec [AwsElasticBeanstalkEnvironmentEnvironmentLink]
-> Read AwsElasticBeanstalkEnvironmentEnvironmentLink
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsElasticBeanstalkEnvironmentEnvironmentLink]
$creadListPrec :: ReadPrec [AwsElasticBeanstalkEnvironmentEnvironmentLink]
readPrec :: ReadPrec AwsElasticBeanstalkEnvironmentEnvironmentLink
$creadPrec :: ReadPrec AwsElasticBeanstalkEnvironmentEnvironmentLink
readList :: ReadS [AwsElasticBeanstalkEnvironmentEnvironmentLink]
$creadList :: ReadS [AwsElasticBeanstalkEnvironmentEnvironmentLink]
readsPrec :: Int -> ReadS AwsElasticBeanstalkEnvironmentEnvironmentLink
$creadsPrec :: Int -> ReadS AwsElasticBeanstalkEnvironmentEnvironmentLink
Prelude.Read, Int -> AwsElasticBeanstalkEnvironmentEnvironmentLink -> ShowS
[AwsElasticBeanstalkEnvironmentEnvironmentLink] -> ShowS
AwsElasticBeanstalkEnvironmentEnvironmentLink -> String
(Int -> AwsElasticBeanstalkEnvironmentEnvironmentLink -> ShowS)
-> (AwsElasticBeanstalkEnvironmentEnvironmentLink -> String)
-> ([AwsElasticBeanstalkEnvironmentEnvironmentLink] -> ShowS)
-> Show AwsElasticBeanstalkEnvironmentEnvironmentLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsElasticBeanstalkEnvironmentEnvironmentLink] -> ShowS
$cshowList :: [AwsElasticBeanstalkEnvironmentEnvironmentLink] -> ShowS
show :: AwsElasticBeanstalkEnvironmentEnvironmentLink -> String
$cshow :: AwsElasticBeanstalkEnvironmentEnvironmentLink -> String
showsPrec :: Int -> AwsElasticBeanstalkEnvironmentEnvironmentLink -> ShowS
$cshowsPrec :: Int -> AwsElasticBeanstalkEnvironmentEnvironmentLink -> ShowS
Prelude.Show, (forall x.
AwsElasticBeanstalkEnvironmentEnvironmentLink
-> Rep AwsElasticBeanstalkEnvironmentEnvironmentLink x)
-> (forall x.
Rep AwsElasticBeanstalkEnvironmentEnvironmentLink x
-> AwsElasticBeanstalkEnvironmentEnvironmentLink)
-> Generic AwsElasticBeanstalkEnvironmentEnvironmentLink
forall x.
Rep AwsElasticBeanstalkEnvironmentEnvironmentLink x
-> AwsElasticBeanstalkEnvironmentEnvironmentLink
forall x.
AwsElasticBeanstalkEnvironmentEnvironmentLink
-> Rep AwsElasticBeanstalkEnvironmentEnvironmentLink x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsElasticBeanstalkEnvironmentEnvironmentLink x
-> AwsElasticBeanstalkEnvironmentEnvironmentLink
$cfrom :: forall x.
AwsElasticBeanstalkEnvironmentEnvironmentLink
-> Rep AwsElasticBeanstalkEnvironmentEnvironmentLink x
Prelude.Generic)
newAwsElasticBeanstalkEnvironmentEnvironmentLink ::
AwsElasticBeanstalkEnvironmentEnvironmentLink
newAwsElasticBeanstalkEnvironmentEnvironmentLink :: AwsElasticBeanstalkEnvironmentEnvironmentLink
newAwsElasticBeanstalkEnvironmentEnvironmentLink =
AwsElasticBeanstalkEnvironmentEnvironmentLink' :: Maybe Text
-> Maybe Text -> AwsElasticBeanstalkEnvironmentEnvironmentLink
AwsElasticBeanstalkEnvironmentEnvironmentLink'
{ $sel:linkName:AwsElasticBeanstalkEnvironmentEnvironmentLink' :: Maybe Text
linkName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:environmentName:AwsElasticBeanstalkEnvironmentEnvironmentLink' :: Maybe Text
environmentName =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsElasticBeanstalkEnvironmentEnvironmentLink_linkName :: Lens.Lens' AwsElasticBeanstalkEnvironmentEnvironmentLink (Prelude.Maybe Prelude.Text)
awsElasticBeanstalkEnvironmentEnvironmentLink_linkName :: (Maybe Text -> f (Maybe Text))
-> AwsElasticBeanstalkEnvironmentEnvironmentLink
-> f AwsElasticBeanstalkEnvironmentEnvironmentLink
awsElasticBeanstalkEnvironmentEnvironmentLink_linkName = (AwsElasticBeanstalkEnvironmentEnvironmentLink -> Maybe Text)
-> (AwsElasticBeanstalkEnvironmentEnvironmentLink
-> Maybe Text -> AwsElasticBeanstalkEnvironmentEnvironmentLink)
-> Lens
AwsElasticBeanstalkEnvironmentEnvironmentLink
AwsElasticBeanstalkEnvironmentEnvironmentLink
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticBeanstalkEnvironmentEnvironmentLink' {Maybe Text
linkName :: Maybe Text
$sel:linkName:AwsElasticBeanstalkEnvironmentEnvironmentLink' :: AwsElasticBeanstalkEnvironmentEnvironmentLink -> Maybe Text
linkName} -> Maybe Text
linkName) (\s :: AwsElasticBeanstalkEnvironmentEnvironmentLink
s@AwsElasticBeanstalkEnvironmentEnvironmentLink' {} Maybe Text
a -> AwsElasticBeanstalkEnvironmentEnvironmentLink
s {$sel:linkName:AwsElasticBeanstalkEnvironmentEnvironmentLink' :: Maybe Text
linkName = Maybe Text
a} :: AwsElasticBeanstalkEnvironmentEnvironmentLink)
awsElasticBeanstalkEnvironmentEnvironmentLink_environmentName :: Lens.Lens' AwsElasticBeanstalkEnvironmentEnvironmentLink (Prelude.Maybe Prelude.Text)
awsElasticBeanstalkEnvironmentEnvironmentLink_environmentName :: (Maybe Text -> f (Maybe Text))
-> AwsElasticBeanstalkEnvironmentEnvironmentLink
-> f AwsElasticBeanstalkEnvironmentEnvironmentLink
awsElasticBeanstalkEnvironmentEnvironmentLink_environmentName = (AwsElasticBeanstalkEnvironmentEnvironmentLink -> Maybe Text)
-> (AwsElasticBeanstalkEnvironmentEnvironmentLink
-> Maybe Text -> AwsElasticBeanstalkEnvironmentEnvironmentLink)
-> Lens
AwsElasticBeanstalkEnvironmentEnvironmentLink
AwsElasticBeanstalkEnvironmentEnvironmentLink
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsElasticBeanstalkEnvironmentEnvironmentLink' {Maybe Text
environmentName :: Maybe Text
$sel:environmentName:AwsElasticBeanstalkEnvironmentEnvironmentLink' :: AwsElasticBeanstalkEnvironmentEnvironmentLink -> Maybe Text
environmentName} -> Maybe Text
environmentName) (\s :: AwsElasticBeanstalkEnvironmentEnvironmentLink
s@AwsElasticBeanstalkEnvironmentEnvironmentLink' {} Maybe Text
a -> AwsElasticBeanstalkEnvironmentEnvironmentLink
s {$sel:environmentName:AwsElasticBeanstalkEnvironmentEnvironmentLink' :: Maybe Text
environmentName = Maybe Text
a} :: AwsElasticBeanstalkEnvironmentEnvironmentLink)
instance
Core.FromJSON
AwsElasticBeanstalkEnvironmentEnvironmentLink
where
parseJSON :: Value -> Parser AwsElasticBeanstalkEnvironmentEnvironmentLink
parseJSON =
String
-> (Object -> Parser AwsElasticBeanstalkEnvironmentEnvironmentLink)
-> Value
-> Parser AwsElasticBeanstalkEnvironmentEnvironmentLink
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsElasticBeanstalkEnvironmentEnvironmentLink"
( \Object
x ->
Maybe Text
-> Maybe Text -> AwsElasticBeanstalkEnvironmentEnvironmentLink
AwsElasticBeanstalkEnvironmentEnvironmentLink'
(Maybe Text
-> Maybe Text -> AwsElasticBeanstalkEnvironmentEnvironmentLink)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> AwsElasticBeanstalkEnvironmentEnvironmentLink)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LinkName")
Parser
(Maybe Text -> AwsElasticBeanstalkEnvironmentEnvironmentLink)
-> Parser (Maybe Text)
-> Parser AwsElasticBeanstalkEnvironmentEnvironmentLink
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnvironmentName")
)
instance
Prelude.Hashable
AwsElasticBeanstalkEnvironmentEnvironmentLink
instance
Prelude.NFData
AwsElasticBeanstalkEnvironmentEnvironmentLink
instance
Core.ToJSON
AwsElasticBeanstalkEnvironmentEnvironmentLink
where
toJSON :: AwsElasticBeanstalkEnvironmentEnvironmentLink -> Value
toJSON
AwsElasticBeanstalkEnvironmentEnvironmentLink' {Maybe Text
environmentName :: Maybe Text
linkName :: Maybe Text
$sel:environmentName:AwsElasticBeanstalkEnvironmentEnvironmentLink' :: AwsElasticBeanstalkEnvironmentEnvironmentLink -> Maybe Text
$sel:linkName:AwsElasticBeanstalkEnvironmentEnvironmentLink' :: AwsElasticBeanstalkEnvironmentEnvironmentLink -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"LinkName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
linkName,
(Text
"EnvironmentName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
environmentName
]
)