{-# 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.AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data =
{
:: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe Prelude.Text
}
deriving (AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Bool
(AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Bool)
-> (AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Bool)
-> Eq AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Bool
$c/= :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Bool
== :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Bool
$c== :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Bool
Prelude.Eq, ReadPrec
[AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
ReadPrec AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
Int
-> ReadS AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
ReadS [AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
(Int
-> ReadS AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
-> ReadS
[AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
-> ReadPrec
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> ReadPrec
[AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
-> Read AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
[AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
$creadListPrec :: ReadPrec
[AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
readPrec :: ReadPrec AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
$creadPrec :: ReadPrec AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
readList :: ReadS [AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
$creadList :: ReadS [AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
readsPrec :: Int
-> ReadS AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
$creadsPrec :: Int
-> ReadS AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
Prelude.Read, Int
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> ShowS
[AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
-> ShowS
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails -> String
(Int
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> ShowS)
-> (AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> String)
-> ([AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
-> ShowS)
-> Show AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
-> ShowS
$cshowList :: [AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails]
-> ShowS
show :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails -> String
$cshow :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails -> String
showsPrec :: Int
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> ShowS
$cshowsPrec :: Int
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> ShowS
Prelude.Show, (forall x.
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Rep AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails x)
-> (forall x.
Rep AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails x
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
-> Generic
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
forall x.
Rep AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails x
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
forall x.
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Rep AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails x
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
$cfrom :: forall x.
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Rep AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails x
Prelude.Generic)
newAwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails ::
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
=
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: Maybe Text
-> Maybe Text
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails'
{ $sel:hostname:AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: Maybe Text
hostname =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ipAddress:AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: Maybe Text
ipAddress =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails_hostname :: Lens.Lens' AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails (Prelude.Maybe Prelude.Text)
= (AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Maybe Text)
-> (AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Maybe Text
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
-> Lens
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' {Maybe Text
hostname :: Maybe Text
$sel:hostname:AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Maybe Text
hostname} -> Maybe Text
hostname) (\s :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
s@AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
s {$sel:hostname:AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: Maybe Text
hostname = Maybe Text
a} :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
awsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails_ipAddress :: Lens.Lens' AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails (Prelude.Maybe Prelude.Text)
= (AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Maybe Text)
-> (AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Maybe Text
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
-> Lens
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
s@AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
s {$sel:ipAddress:AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: Maybe Text
ipAddress = Maybe Text
a} :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
instance
Core.FromJSON
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
where
parseJSON :: Value
-> Parser AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
parseJSON =
String
-> (Object
-> Parser
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
-> Value
-> Parser AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails"
( \Object
x ->
Maybe Text
-> Maybe Text
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails'
(Maybe Text
-> Maybe Text
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
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
"Hostname")
Parser
(Maybe Text
-> AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails)
-> Parser (Maybe Text)
-> Parser AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
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
"IpAddress")
)
instance
Prelude.Hashable
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
instance
Prelude.NFData
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
instance
Core.ToJSON
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
where
toJSON :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails -> Value
toJSON
AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' {Maybe Text
ipAddress :: Maybe Text
hostname :: Maybe Text
$sel:ipAddress:AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Maybe Text
$sel:hostname:AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails' :: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails
-> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Hostname" 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
hostname,
(Text
"IpAddress" 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
ipAddress
]
)