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