{-# 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.NetworkManager.Types.CoreNetworkSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkManager.Types.CoreNetworkState
import Amazonka.NetworkManager.Types.Tag
import qualified Amazonka.Prelude as Prelude
data CoreNetworkSummary = CoreNetworkSummary'
{
CoreNetworkSummary -> Maybe Text
coreNetworkArn :: Prelude.Maybe Prelude.Text,
CoreNetworkSummary -> Maybe Text
coreNetworkId :: Prelude.Maybe Prelude.Text,
CoreNetworkSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CoreNetworkSummary -> Maybe Text
globalNetworkId :: Prelude.Maybe Prelude.Text,
CoreNetworkSummary -> Maybe Text
ownerAccountId :: Prelude.Maybe Prelude.Text,
CoreNetworkSummary -> Maybe CoreNetworkState
state :: Prelude.Maybe CoreNetworkState,
CoreNetworkSummary -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (CoreNetworkSummary -> CoreNetworkSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CoreNetworkSummary -> CoreNetworkSummary -> Bool
$c/= :: CoreNetworkSummary -> CoreNetworkSummary -> Bool
== :: CoreNetworkSummary -> CoreNetworkSummary -> Bool
$c== :: CoreNetworkSummary -> CoreNetworkSummary -> Bool
Prelude.Eq, ReadPrec [CoreNetworkSummary]
ReadPrec CoreNetworkSummary
Int -> ReadS CoreNetworkSummary
ReadS [CoreNetworkSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CoreNetworkSummary]
$creadListPrec :: ReadPrec [CoreNetworkSummary]
readPrec :: ReadPrec CoreNetworkSummary
$creadPrec :: ReadPrec CoreNetworkSummary
readList :: ReadS [CoreNetworkSummary]
$creadList :: ReadS [CoreNetworkSummary]
readsPrec :: Int -> ReadS CoreNetworkSummary
$creadsPrec :: Int -> ReadS CoreNetworkSummary
Prelude.Read, Int -> CoreNetworkSummary -> ShowS
[CoreNetworkSummary] -> ShowS
CoreNetworkSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CoreNetworkSummary] -> ShowS
$cshowList :: [CoreNetworkSummary] -> ShowS
show :: CoreNetworkSummary -> String
$cshow :: CoreNetworkSummary -> String
showsPrec :: Int -> CoreNetworkSummary -> ShowS
$cshowsPrec :: Int -> CoreNetworkSummary -> ShowS
Prelude.Show, forall x. Rep CoreNetworkSummary x -> CoreNetworkSummary
forall x. CoreNetworkSummary -> Rep CoreNetworkSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CoreNetworkSummary x -> CoreNetworkSummary
$cfrom :: forall x. CoreNetworkSummary -> Rep CoreNetworkSummary x
Prelude.Generic)
newCoreNetworkSummary ::
CoreNetworkSummary
newCoreNetworkSummary :: CoreNetworkSummary
newCoreNetworkSummary =
CoreNetworkSummary'
{ $sel:coreNetworkArn:CoreNetworkSummary' :: Maybe Text
coreNetworkArn =
forall a. Maybe a
Prelude.Nothing,
$sel:coreNetworkId:CoreNetworkSummary' :: Maybe Text
coreNetworkId = forall a. Maybe a
Prelude.Nothing,
$sel:description:CoreNetworkSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:globalNetworkId:CoreNetworkSummary' :: Maybe Text
globalNetworkId = forall a. Maybe a
Prelude.Nothing,
$sel:ownerAccountId:CoreNetworkSummary' :: Maybe Text
ownerAccountId = forall a. Maybe a
Prelude.Nothing,
$sel:state:CoreNetworkSummary' :: Maybe CoreNetworkState
state = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CoreNetworkSummary' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing
}
coreNetworkSummary_coreNetworkArn :: Lens.Lens' CoreNetworkSummary (Prelude.Maybe Prelude.Text)
coreNetworkSummary_coreNetworkArn :: Lens' CoreNetworkSummary (Maybe Text)
coreNetworkSummary_coreNetworkArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoreNetworkSummary' {Maybe Text
coreNetworkArn :: Maybe Text
$sel:coreNetworkArn:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
coreNetworkArn} -> Maybe Text
coreNetworkArn) (\s :: CoreNetworkSummary
s@CoreNetworkSummary' {} Maybe Text
a -> CoreNetworkSummary
s {$sel:coreNetworkArn:CoreNetworkSummary' :: Maybe Text
coreNetworkArn = Maybe Text
a} :: CoreNetworkSummary)
coreNetworkSummary_coreNetworkId :: Lens.Lens' CoreNetworkSummary (Prelude.Maybe Prelude.Text)
coreNetworkSummary_coreNetworkId :: Lens' CoreNetworkSummary (Maybe Text)
coreNetworkSummary_coreNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoreNetworkSummary' {Maybe Text
coreNetworkId :: Maybe Text
$sel:coreNetworkId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
coreNetworkId} -> Maybe Text
coreNetworkId) (\s :: CoreNetworkSummary
s@CoreNetworkSummary' {} Maybe Text
a -> CoreNetworkSummary
s {$sel:coreNetworkId:CoreNetworkSummary' :: Maybe Text
coreNetworkId = Maybe Text
a} :: CoreNetworkSummary)
coreNetworkSummary_description :: Lens.Lens' CoreNetworkSummary (Prelude.Maybe Prelude.Text)
coreNetworkSummary_description :: Lens' CoreNetworkSummary (Maybe Text)
coreNetworkSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoreNetworkSummary' {Maybe Text
description :: Maybe Text
$sel:description:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: CoreNetworkSummary
s@CoreNetworkSummary' {} Maybe Text
a -> CoreNetworkSummary
s {$sel:description:CoreNetworkSummary' :: Maybe Text
description = Maybe Text
a} :: CoreNetworkSummary)
coreNetworkSummary_globalNetworkId :: Lens.Lens' CoreNetworkSummary (Prelude.Maybe Prelude.Text)
coreNetworkSummary_globalNetworkId :: Lens' CoreNetworkSummary (Maybe Text)
coreNetworkSummary_globalNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoreNetworkSummary' {Maybe Text
globalNetworkId :: Maybe Text
$sel:globalNetworkId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
globalNetworkId} -> Maybe Text
globalNetworkId) (\s :: CoreNetworkSummary
s@CoreNetworkSummary' {} Maybe Text
a -> CoreNetworkSummary
s {$sel:globalNetworkId:CoreNetworkSummary' :: Maybe Text
globalNetworkId = Maybe Text
a} :: CoreNetworkSummary)
coreNetworkSummary_ownerAccountId :: Lens.Lens' CoreNetworkSummary (Prelude.Maybe Prelude.Text)
coreNetworkSummary_ownerAccountId :: Lens' CoreNetworkSummary (Maybe Text)
coreNetworkSummary_ownerAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoreNetworkSummary' {Maybe Text
ownerAccountId :: Maybe Text
$sel:ownerAccountId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
ownerAccountId} -> Maybe Text
ownerAccountId) (\s :: CoreNetworkSummary
s@CoreNetworkSummary' {} Maybe Text
a -> CoreNetworkSummary
s {$sel:ownerAccountId:CoreNetworkSummary' :: Maybe Text
ownerAccountId = Maybe Text
a} :: CoreNetworkSummary)
coreNetworkSummary_state :: Lens.Lens' CoreNetworkSummary (Prelude.Maybe CoreNetworkState)
coreNetworkSummary_state :: Lens' CoreNetworkSummary (Maybe CoreNetworkState)
coreNetworkSummary_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoreNetworkSummary' {Maybe CoreNetworkState
state :: Maybe CoreNetworkState
$sel:state:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe CoreNetworkState
state} -> Maybe CoreNetworkState
state) (\s :: CoreNetworkSummary
s@CoreNetworkSummary' {} Maybe CoreNetworkState
a -> CoreNetworkSummary
s {$sel:state:CoreNetworkSummary' :: Maybe CoreNetworkState
state = Maybe CoreNetworkState
a} :: CoreNetworkSummary)
coreNetworkSummary_tags :: Lens.Lens' CoreNetworkSummary (Prelude.Maybe [Tag])
coreNetworkSummary_tags :: Lens' CoreNetworkSummary (Maybe [Tag])
coreNetworkSummary_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoreNetworkSummary' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CoreNetworkSummary
s@CoreNetworkSummary' {} Maybe [Tag]
a -> CoreNetworkSummary
s {$sel:tags:CoreNetworkSummary' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CoreNetworkSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON CoreNetworkSummary where
parseJSON :: Value -> Parser CoreNetworkSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CoreNetworkSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe CoreNetworkState
-> Maybe [Tag]
-> CoreNetworkSummary
CoreNetworkSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CoreNetworkArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CoreNetworkId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GlobalNetworkId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OwnerAccountId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"State")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable CoreNetworkSummary where
hashWithSalt :: Int -> CoreNetworkSummary -> Int
hashWithSalt Int
_salt CoreNetworkSummary' {Maybe [Tag]
Maybe Text
Maybe CoreNetworkState
tags :: Maybe [Tag]
state :: Maybe CoreNetworkState
ownerAccountId :: Maybe Text
globalNetworkId :: Maybe Text
description :: Maybe Text
coreNetworkId :: Maybe Text
coreNetworkArn :: Maybe Text
$sel:tags:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe [Tag]
$sel:state:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe CoreNetworkState
$sel:ownerAccountId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
$sel:globalNetworkId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
$sel:description:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
$sel:coreNetworkId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
$sel:coreNetworkArn:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
coreNetworkArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
coreNetworkId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
globalNetworkId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownerAccountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CoreNetworkState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
instance Prelude.NFData CoreNetworkSummary where
rnf :: CoreNetworkSummary -> ()
rnf CoreNetworkSummary' {Maybe [Tag]
Maybe Text
Maybe CoreNetworkState
tags :: Maybe [Tag]
state :: Maybe CoreNetworkState
ownerAccountId :: Maybe Text
globalNetworkId :: Maybe Text
description :: Maybe Text
coreNetworkId :: Maybe Text
coreNetworkArn :: Maybe Text
$sel:tags:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe [Tag]
$sel:state:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe CoreNetworkState
$sel:ownerAccountId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
$sel:globalNetworkId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
$sel:description:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
$sel:coreNetworkId:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
$sel:coreNetworkArn:CoreNetworkSummary' :: CoreNetworkSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
coreNetworkArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
coreNetworkId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
globalNetworkId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CoreNetworkState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags