{-# 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.APIGateway.Types.VpcLink where
import Amazonka.APIGateway.Types.VpcLinkStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VpcLink = VpcLink'
{
VpcLink -> Maybe VpcLinkStatus
status :: Prelude.Maybe VpcLinkStatus,
VpcLink -> Maybe [Text]
targetArns :: Prelude.Maybe [Prelude.Text],
VpcLink -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
VpcLink -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
VpcLink -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
VpcLink -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
VpcLink -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (VpcLink -> VpcLink -> Bool
(VpcLink -> VpcLink -> Bool)
-> (VpcLink -> VpcLink -> Bool) -> Eq VpcLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcLink -> VpcLink -> Bool
$c/= :: VpcLink -> VpcLink -> Bool
== :: VpcLink -> VpcLink -> Bool
$c== :: VpcLink -> VpcLink -> Bool
Prelude.Eq, ReadPrec [VpcLink]
ReadPrec VpcLink
Int -> ReadS VpcLink
ReadS [VpcLink]
(Int -> ReadS VpcLink)
-> ReadS [VpcLink]
-> ReadPrec VpcLink
-> ReadPrec [VpcLink]
-> Read VpcLink
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcLink]
$creadListPrec :: ReadPrec [VpcLink]
readPrec :: ReadPrec VpcLink
$creadPrec :: ReadPrec VpcLink
readList :: ReadS [VpcLink]
$creadList :: ReadS [VpcLink]
readsPrec :: Int -> ReadS VpcLink
$creadsPrec :: Int -> ReadS VpcLink
Prelude.Read, Int -> VpcLink -> ShowS
[VpcLink] -> ShowS
VpcLink -> String
(Int -> VpcLink -> ShowS)
-> (VpcLink -> String) -> ([VpcLink] -> ShowS) -> Show VpcLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcLink] -> ShowS
$cshowList :: [VpcLink] -> ShowS
show :: VpcLink -> String
$cshow :: VpcLink -> String
showsPrec :: Int -> VpcLink -> ShowS
$cshowsPrec :: Int -> VpcLink -> ShowS
Prelude.Show, (forall x. VpcLink -> Rep VpcLink x)
-> (forall x. Rep VpcLink x -> VpcLink) -> Generic VpcLink
forall x. Rep VpcLink x -> VpcLink
forall x. VpcLink -> Rep VpcLink x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcLink x -> VpcLink
$cfrom :: forall x. VpcLink -> Rep VpcLink x
Prelude.Generic)
newVpcLink ::
VpcLink
newVpcLink :: VpcLink
newVpcLink =
VpcLink' :: Maybe VpcLinkStatus
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink
VpcLink'
{ $sel:status:VpcLink' :: Maybe VpcLinkStatus
status = Maybe VpcLinkStatus
forall a. Maybe a
Prelude.Nothing,
$sel:targetArns:VpcLink' :: Maybe [Text]
targetArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:name:VpcLink' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:VpcLink' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:VpcLink' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:VpcLink' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:VpcLink' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
vpcLink_status :: Lens.Lens' VpcLink (Prelude.Maybe VpcLinkStatus)
vpcLink_status :: (Maybe VpcLinkStatus -> f (Maybe VpcLinkStatus))
-> VpcLink -> f VpcLink
vpcLink_status = (VpcLink -> Maybe VpcLinkStatus)
-> (VpcLink -> Maybe VpcLinkStatus -> VpcLink)
-> Lens VpcLink VpcLink (Maybe VpcLinkStatus) (Maybe VpcLinkStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcLink' {Maybe VpcLinkStatus
status :: Maybe VpcLinkStatus
$sel:status:VpcLink' :: VpcLink -> Maybe VpcLinkStatus
status} -> Maybe VpcLinkStatus
status) (\s :: VpcLink
s@VpcLink' {} Maybe VpcLinkStatus
a -> VpcLink
s {$sel:status:VpcLink' :: Maybe VpcLinkStatus
status = Maybe VpcLinkStatus
a} :: VpcLink)
vpcLink_targetArns :: Lens.Lens' VpcLink (Prelude.Maybe [Prelude.Text])
vpcLink_targetArns :: (Maybe [Text] -> f (Maybe [Text])) -> VpcLink -> f VpcLink
vpcLink_targetArns = (VpcLink -> Maybe [Text])
-> (VpcLink -> Maybe [Text] -> VpcLink)
-> Lens VpcLink VpcLink (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcLink' {Maybe [Text]
targetArns :: Maybe [Text]
$sel:targetArns:VpcLink' :: VpcLink -> Maybe [Text]
targetArns} -> Maybe [Text]
targetArns) (\s :: VpcLink
s@VpcLink' {} Maybe [Text]
a -> VpcLink
s {$sel:targetArns:VpcLink' :: Maybe [Text]
targetArns = Maybe [Text]
a} :: VpcLink) ((Maybe [Text] -> f (Maybe [Text])) -> VpcLink -> f VpcLink)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> VpcLink
-> f VpcLink
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vpcLink_name :: Lens.Lens' VpcLink (Prelude.Maybe Prelude.Text)
vpcLink_name :: (Maybe Text -> f (Maybe Text)) -> VpcLink -> f VpcLink
vpcLink_name = (VpcLink -> Maybe Text)
-> (VpcLink -> Maybe Text -> VpcLink)
-> Lens VpcLink VpcLink (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcLink' {Maybe Text
name :: Maybe Text
$sel:name:VpcLink' :: VpcLink -> Maybe Text
name} -> Maybe Text
name) (\s :: VpcLink
s@VpcLink' {} Maybe Text
a -> VpcLink
s {$sel:name:VpcLink' :: Maybe Text
name = Maybe Text
a} :: VpcLink)
vpcLink_statusMessage :: Lens.Lens' VpcLink (Prelude.Maybe Prelude.Text)
vpcLink_statusMessage :: (Maybe Text -> f (Maybe Text)) -> VpcLink -> f VpcLink
vpcLink_statusMessage = (VpcLink -> Maybe Text)
-> (VpcLink -> Maybe Text -> VpcLink)
-> Lens VpcLink VpcLink (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcLink' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:VpcLink' :: VpcLink -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: VpcLink
s@VpcLink' {} Maybe Text
a -> VpcLink
s {$sel:statusMessage:VpcLink' :: Maybe Text
statusMessage = Maybe Text
a} :: VpcLink)
vpcLink_id :: Lens.Lens' VpcLink (Prelude.Maybe Prelude.Text)
vpcLink_id :: (Maybe Text -> f (Maybe Text)) -> VpcLink -> f VpcLink
vpcLink_id = (VpcLink -> Maybe Text)
-> (VpcLink -> Maybe Text -> VpcLink)
-> Lens VpcLink VpcLink (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcLink' {Maybe Text
id :: Maybe Text
$sel:id:VpcLink' :: VpcLink -> Maybe Text
id} -> Maybe Text
id) (\s :: VpcLink
s@VpcLink' {} Maybe Text
a -> VpcLink
s {$sel:id:VpcLink' :: Maybe Text
id = Maybe Text
a} :: VpcLink)
vpcLink_description :: Lens.Lens' VpcLink (Prelude.Maybe Prelude.Text)
vpcLink_description :: (Maybe Text -> f (Maybe Text)) -> VpcLink -> f VpcLink
vpcLink_description = (VpcLink -> Maybe Text)
-> (VpcLink -> Maybe Text -> VpcLink)
-> Lens VpcLink VpcLink (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcLink' {Maybe Text
description :: Maybe Text
$sel:description:VpcLink' :: VpcLink -> Maybe Text
description} -> Maybe Text
description) (\s :: VpcLink
s@VpcLink' {} Maybe Text
a -> VpcLink
s {$sel:description:VpcLink' :: Maybe Text
description = Maybe Text
a} :: VpcLink)
vpcLink_tags :: Lens.Lens' VpcLink (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
vpcLink_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> VpcLink -> f VpcLink
vpcLink_tags = (VpcLink -> Maybe (HashMap Text Text))
-> (VpcLink -> Maybe (HashMap Text Text) -> VpcLink)
-> Lens
VpcLink
VpcLink
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcLink' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:VpcLink' :: VpcLink -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: VpcLink
s@VpcLink' {} Maybe (HashMap Text Text)
a -> VpcLink
s {$sel:tags:VpcLink' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: VpcLink) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> VpcLink -> f VpcLink)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> VpcLink
-> f VpcLink
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON VpcLink where
parseJSON :: Value -> Parser VpcLink
parseJSON =
String -> (Object -> Parser VpcLink) -> Value -> Parser VpcLink
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VpcLink"
( \Object
x ->
Maybe VpcLinkStatus
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink
VpcLink'
(Maybe VpcLinkStatus
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink)
-> Parser (Maybe VpcLinkStatus)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe VpcLinkStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targetArns" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink)
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
"name")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> VpcLink)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe (HashMap Text Text) -> VpcLink)
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
"statusMessage")
Parser
(Maybe Text -> Maybe Text -> Maybe (HashMap Text Text) -> VpcLink)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> VpcLink)
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
"id")
Parser (Maybe Text -> Maybe (HashMap Text Text) -> VpcLink)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> VpcLink)
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
"description")
Parser (Maybe (HashMap Text Text) -> VpcLink)
-> Parser (Maybe (HashMap Text Text)) -> Parser VpcLink
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable VpcLink
instance Prelude.NFData VpcLink