{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ApiGatewayV2.GetVpcLink
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a VPC link.
module Amazonka.ApiGatewayV2.GetVpcLink
  ( -- * Creating a Request
    GetVpcLink (..),
    newGetVpcLink,

    -- * Request Lenses
    getVpcLink_vpcLinkId,

    -- * Destructuring the Response
    GetVpcLinkResponse (..),
    newGetVpcLinkResponse,

    -- * Response Lenses
    getVpcLinkResponse_securityGroupIds,
    getVpcLinkResponse_subnetIds,
    getVpcLinkResponse_vpcLinkId,
    getVpcLinkResponse_createdDate,
    getVpcLinkResponse_vpcLinkVersion,
    getVpcLinkResponse_name,
    getVpcLinkResponse_vpcLinkStatusMessage,
    getVpcLinkResponse_tags,
    getVpcLinkResponse_vpcLinkStatus,
    getVpcLinkResponse_httpStatus,
  )
where

import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetVpcLink' smart constructor.
data GetVpcLink = GetVpcLink'
  { -- | The ID of the VPC link.
    GetVpcLink -> Text
vpcLinkId :: Prelude.Text
  }
  deriving (GetVpcLink -> GetVpcLink -> Bool
(GetVpcLink -> GetVpcLink -> Bool)
-> (GetVpcLink -> GetVpcLink -> Bool) -> Eq GetVpcLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVpcLink -> GetVpcLink -> Bool
$c/= :: GetVpcLink -> GetVpcLink -> Bool
== :: GetVpcLink -> GetVpcLink -> Bool
$c== :: GetVpcLink -> GetVpcLink -> Bool
Prelude.Eq, ReadPrec [GetVpcLink]
ReadPrec GetVpcLink
Int -> ReadS GetVpcLink
ReadS [GetVpcLink]
(Int -> ReadS GetVpcLink)
-> ReadS [GetVpcLink]
-> ReadPrec GetVpcLink
-> ReadPrec [GetVpcLink]
-> Read GetVpcLink
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVpcLink]
$creadListPrec :: ReadPrec [GetVpcLink]
readPrec :: ReadPrec GetVpcLink
$creadPrec :: ReadPrec GetVpcLink
readList :: ReadS [GetVpcLink]
$creadList :: ReadS [GetVpcLink]
readsPrec :: Int -> ReadS GetVpcLink
$creadsPrec :: Int -> ReadS GetVpcLink
Prelude.Read, Int -> GetVpcLink -> ShowS
[GetVpcLink] -> ShowS
GetVpcLink -> String
(Int -> GetVpcLink -> ShowS)
-> (GetVpcLink -> String)
-> ([GetVpcLink] -> ShowS)
-> Show GetVpcLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVpcLink] -> ShowS
$cshowList :: [GetVpcLink] -> ShowS
show :: GetVpcLink -> String
$cshow :: GetVpcLink -> String
showsPrec :: Int -> GetVpcLink -> ShowS
$cshowsPrec :: Int -> GetVpcLink -> ShowS
Prelude.Show, (forall x. GetVpcLink -> Rep GetVpcLink x)
-> (forall x. Rep GetVpcLink x -> GetVpcLink) -> Generic GetVpcLink
forall x. Rep GetVpcLink x -> GetVpcLink
forall x. GetVpcLink -> Rep GetVpcLink x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetVpcLink x -> GetVpcLink
$cfrom :: forall x. GetVpcLink -> Rep GetVpcLink x
Prelude.Generic)

-- |
-- Create a value of 'GetVpcLink' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'vpcLinkId', 'getVpcLink_vpcLinkId' - The ID of the VPC link.
newGetVpcLink ::
  -- | 'vpcLinkId'
  Prelude.Text ->
  GetVpcLink
newGetVpcLink :: Text -> GetVpcLink
newGetVpcLink Text
pVpcLinkId_ =
  GetVpcLink' :: Text -> GetVpcLink
GetVpcLink' {$sel:vpcLinkId:GetVpcLink' :: Text
vpcLinkId = Text
pVpcLinkId_}

-- | The ID of the VPC link.
getVpcLink_vpcLinkId :: Lens.Lens' GetVpcLink Prelude.Text
getVpcLink_vpcLinkId :: (Text -> f Text) -> GetVpcLink -> f GetVpcLink
getVpcLink_vpcLinkId = (GetVpcLink -> Text)
-> (GetVpcLink -> Text -> GetVpcLink)
-> Lens GetVpcLink GetVpcLink Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLink' {Text
vpcLinkId :: Text
$sel:vpcLinkId:GetVpcLink' :: GetVpcLink -> Text
vpcLinkId} -> Text
vpcLinkId) (\s :: GetVpcLink
s@GetVpcLink' {} Text
a -> GetVpcLink
s {$sel:vpcLinkId:GetVpcLink' :: Text
vpcLinkId = Text
a} :: GetVpcLink)

instance Core.AWSRequest GetVpcLink where
  type AWSResponse GetVpcLink = GetVpcLinkResponse
  request :: GetVpcLink -> Request GetVpcLink
request = Service -> GetVpcLink -> Request GetVpcLink
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetVpcLink
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetVpcLink)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetVpcLink))
-> Logger
-> Service
-> Proxy GetVpcLink
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetVpcLink)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe VpcLinkVersion
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe VpcLinkStatus
-> Int
-> GetVpcLinkResponse
GetVpcLinkResponse'
            (Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe VpcLinkVersion
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe VpcLinkStatus
 -> Int
 -> GetVpcLinkResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe VpcLinkVersion
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"securityGroupIds"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe VpcLinkVersion
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe VpcLinkStatus
   -> Int
   -> GetVpcLinkResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe VpcLinkVersion
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"subnetIds" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe VpcLinkVersion
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe VpcLinkStatus
   -> Int
   -> GetVpcLinkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe VpcLinkVersion
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"vpcLinkId")
            Either
  String
  (Maybe POSIX
   -> Maybe VpcLinkVersion
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe VpcLinkStatus
   -> Int
   -> GetVpcLinkResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe VpcLinkVersion
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdDate")
            Either
  String
  (Maybe VpcLinkVersion
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe VpcLinkStatus
   -> Int
   -> GetVpcLinkResponse)
-> Either String (Maybe VpcLinkVersion)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe VpcLinkVersion)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"vpcLinkVersion")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe VpcLinkStatus
   -> Int
   -> GetVpcLinkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe VpcLinkStatus
   -> Int
   -> GetVpcLinkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus -> Int -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"vpcLinkStatusMessage")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe VpcLinkStatus -> Int -> GetVpcLinkResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Maybe VpcLinkStatus -> Int -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe VpcLinkStatus -> Int -> GetVpcLinkResponse)
-> Either String (Maybe VpcLinkStatus)
-> Either String (Int -> GetVpcLinkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe VpcLinkStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"vpcLinkStatus")
            Either String (Int -> GetVpcLinkResponse)
-> Either String Int -> Either String GetVpcLinkResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetVpcLink

instance Prelude.NFData GetVpcLink

instance Core.ToHeaders GetVpcLink where
  toHeaders :: GetVpcLink -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetVpcLink -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath GetVpcLink where
  toPath :: GetVpcLink -> ByteString
toPath GetVpcLink' {Text
vpcLinkId :: Text
$sel:vpcLinkId:GetVpcLink' :: GetVpcLink -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v2/vpclinks/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
vpcLinkId]

instance Core.ToQuery GetVpcLink where
  toQuery :: GetVpcLink -> QueryString
toQuery = QueryString -> GetVpcLink -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetVpcLinkResponse' smart constructor.
data GetVpcLinkResponse = GetVpcLinkResponse'
  { -- | A list of security group IDs for the VPC link.
    GetVpcLinkResponse -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | A list of subnet IDs to include in the VPC link.
    GetVpcLinkResponse -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the VPC link.
    GetVpcLinkResponse -> Maybe Text
vpcLinkId :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the VPC link was created.
    GetVpcLinkResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The version of the VPC link.
    GetVpcLinkResponse -> Maybe VpcLinkVersion
vpcLinkVersion :: Prelude.Maybe VpcLinkVersion,
    -- | The name of the VPC link.
    GetVpcLinkResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A message summarizing the cause of the status of the VPC link.
    GetVpcLinkResponse -> Maybe Text
vpcLinkStatusMessage :: Prelude.Maybe Prelude.Text,
    -- | Tags for the VPC link.
    GetVpcLinkResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The status of the VPC link.
    GetVpcLinkResponse -> Maybe VpcLinkStatus
vpcLinkStatus :: Prelude.Maybe VpcLinkStatus,
    -- | The response's http status code.
    GetVpcLinkResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetVpcLinkResponse -> GetVpcLinkResponse -> Bool
(GetVpcLinkResponse -> GetVpcLinkResponse -> Bool)
-> (GetVpcLinkResponse -> GetVpcLinkResponse -> Bool)
-> Eq GetVpcLinkResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVpcLinkResponse -> GetVpcLinkResponse -> Bool
$c/= :: GetVpcLinkResponse -> GetVpcLinkResponse -> Bool
== :: GetVpcLinkResponse -> GetVpcLinkResponse -> Bool
$c== :: GetVpcLinkResponse -> GetVpcLinkResponse -> Bool
Prelude.Eq, ReadPrec [GetVpcLinkResponse]
ReadPrec GetVpcLinkResponse
Int -> ReadS GetVpcLinkResponse
ReadS [GetVpcLinkResponse]
(Int -> ReadS GetVpcLinkResponse)
-> ReadS [GetVpcLinkResponse]
-> ReadPrec GetVpcLinkResponse
-> ReadPrec [GetVpcLinkResponse]
-> Read GetVpcLinkResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVpcLinkResponse]
$creadListPrec :: ReadPrec [GetVpcLinkResponse]
readPrec :: ReadPrec GetVpcLinkResponse
$creadPrec :: ReadPrec GetVpcLinkResponse
readList :: ReadS [GetVpcLinkResponse]
$creadList :: ReadS [GetVpcLinkResponse]
readsPrec :: Int -> ReadS GetVpcLinkResponse
$creadsPrec :: Int -> ReadS GetVpcLinkResponse
Prelude.Read, Int -> GetVpcLinkResponse -> ShowS
[GetVpcLinkResponse] -> ShowS
GetVpcLinkResponse -> String
(Int -> GetVpcLinkResponse -> ShowS)
-> (GetVpcLinkResponse -> String)
-> ([GetVpcLinkResponse] -> ShowS)
-> Show GetVpcLinkResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVpcLinkResponse] -> ShowS
$cshowList :: [GetVpcLinkResponse] -> ShowS
show :: GetVpcLinkResponse -> String
$cshow :: GetVpcLinkResponse -> String
showsPrec :: Int -> GetVpcLinkResponse -> ShowS
$cshowsPrec :: Int -> GetVpcLinkResponse -> ShowS
Prelude.Show, (forall x. GetVpcLinkResponse -> Rep GetVpcLinkResponse x)
-> (forall x. Rep GetVpcLinkResponse x -> GetVpcLinkResponse)
-> Generic GetVpcLinkResponse
forall x. Rep GetVpcLinkResponse x -> GetVpcLinkResponse
forall x. GetVpcLinkResponse -> Rep GetVpcLinkResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetVpcLinkResponse x -> GetVpcLinkResponse
$cfrom :: forall x. GetVpcLinkResponse -> Rep GetVpcLinkResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetVpcLinkResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'securityGroupIds', 'getVpcLinkResponse_securityGroupIds' - A list of security group IDs for the VPC link.
--
-- 'subnetIds', 'getVpcLinkResponse_subnetIds' - A list of subnet IDs to include in the VPC link.
--
-- 'vpcLinkId', 'getVpcLinkResponse_vpcLinkId' - The ID of the VPC link.
--
-- 'createdDate', 'getVpcLinkResponse_createdDate' - The timestamp when the VPC link was created.
--
-- 'vpcLinkVersion', 'getVpcLinkResponse_vpcLinkVersion' - The version of the VPC link.
--
-- 'name', 'getVpcLinkResponse_name' - The name of the VPC link.
--
-- 'vpcLinkStatusMessage', 'getVpcLinkResponse_vpcLinkStatusMessage' - A message summarizing the cause of the status of the VPC link.
--
-- 'tags', 'getVpcLinkResponse_tags' - Tags for the VPC link.
--
-- 'vpcLinkStatus', 'getVpcLinkResponse_vpcLinkStatus' - The status of the VPC link.
--
-- 'httpStatus', 'getVpcLinkResponse_httpStatus' - The response's http status code.
newGetVpcLinkResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetVpcLinkResponse
newGetVpcLinkResponse :: Int -> GetVpcLinkResponse
newGetVpcLinkResponse Int
pHttpStatus_ =
  GetVpcLinkResponse' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe VpcLinkVersion
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe VpcLinkStatus
-> Int
-> GetVpcLinkResponse
GetVpcLinkResponse'
    { $sel:securityGroupIds:GetVpcLinkResponse' :: Maybe [Text]
securityGroupIds =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:GetVpcLinkResponse' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcLinkId:GetVpcLinkResponse' :: Maybe Text
vpcLinkId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:GetVpcLinkResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcLinkVersion:GetVpcLinkResponse' :: Maybe VpcLinkVersion
vpcLinkVersion = Maybe VpcLinkVersion
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetVpcLinkResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcLinkStatusMessage:GetVpcLinkResponse' :: Maybe Text
vpcLinkStatusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetVpcLinkResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcLinkStatus:GetVpcLinkResponse' :: Maybe VpcLinkStatus
vpcLinkStatus = Maybe VpcLinkStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetVpcLinkResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of security group IDs for the VPC link.
getVpcLinkResponse_securityGroupIds :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe [Prelude.Text])
getVpcLinkResponse_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_securityGroupIds = (GetVpcLinkResponse -> Maybe [Text])
-> (GetVpcLinkResponse -> Maybe [Text] -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse GetVpcLinkResponse (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe [Text]
a -> GetVpcLinkResponse
s {$sel:securityGroupIds:GetVpcLinkResponse' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: GetVpcLinkResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetVpcLinkResponse -> f GetVpcLinkResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetVpcLinkResponse
-> f GetVpcLinkResponse
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

-- | A list of subnet IDs to include in the VPC link.
getVpcLinkResponse_subnetIds :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe [Prelude.Text])
getVpcLinkResponse_subnetIds :: (Maybe [Text] -> f (Maybe [Text]))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_subnetIds = (GetVpcLinkResponse -> Maybe [Text])
-> (GetVpcLinkResponse -> Maybe [Text] -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse GetVpcLinkResponse (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe [Text]
a -> GetVpcLinkResponse
s {$sel:subnetIds:GetVpcLinkResponse' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: GetVpcLinkResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetVpcLinkResponse -> f GetVpcLinkResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetVpcLinkResponse
-> f GetVpcLinkResponse
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

-- | The ID of the VPC link.
getVpcLinkResponse_vpcLinkId :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe Prelude.Text)
getVpcLinkResponse_vpcLinkId :: (Maybe Text -> f (Maybe Text))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_vpcLinkId = (GetVpcLinkResponse -> Maybe Text)
-> (GetVpcLinkResponse -> Maybe Text -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse GetVpcLinkResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Maybe Text
vpcLinkId :: Maybe Text
$sel:vpcLinkId:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe Text
vpcLinkId} -> Maybe Text
vpcLinkId) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe Text
a -> GetVpcLinkResponse
s {$sel:vpcLinkId:GetVpcLinkResponse' :: Maybe Text
vpcLinkId = Maybe Text
a} :: GetVpcLinkResponse)

-- | The timestamp when the VPC link was created.
getVpcLinkResponse_createdDate :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe Prelude.UTCTime)
getVpcLinkResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_createdDate = (GetVpcLinkResponse -> Maybe POSIX)
-> (GetVpcLinkResponse -> Maybe POSIX -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse GetVpcLinkResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe POSIX
a -> GetVpcLinkResponse
s {$sel:createdDate:GetVpcLinkResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: GetVpcLinkResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetVpcLinkResponse -> f GetVpcLinkResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetVpcLinkResponse
-> f GetVpcLinkResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The version of the VPC link.
getVpcLinkResponse_vpcLinkVersion :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe VpcLinkVersion)
getVpcLinkResponse_vpcLinkVersion :: (Maybe VpcLinkVersion -> f (Maybe VpcLinkVersion))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_vpcLinkVersion = (GetVpcLinkResponse -> Maybe VpcLinkVersion)
-> (GetVpcLinkResponse
    -> Maybe VpcLinkVersion -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse
     GetVpcLinkResponse
     (Maybe VpcLinkVersion)
     (Maybe VpcLinkVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Maybe VpcLinkVersion
vpcLinkVersion :: Maybe VpcLinkVersion
$sel:vpcLinkVersion:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe VpcLinkVersion
vpcLinkVersion} -> Maybe VpcLinkVersion
vpcLinkVersion) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe VpcLinkVersion
a -> GetVpcLinkResponse
s {$sel:vpcLinkVersion:GetVpcLinkResponse' :: Maybe VpcLinkVersion
vpcLinkVersion = Maybe VpcLinkVersion
a} :: GetVpcLinkResponse)

-- | The name of the VPC link.
getVpcLinkResponse_name :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe Prelude.Text)
getVpcLinkResponse_name :: (Maybe Text -> f (Maybe Text))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_name = (GetVpcLinkResponse -> Maybe Text)
-> (GetVpcLinkResponse -> Maybe Text -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse GetVpcLinkResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe Text
a -> GetVpcLinkResponse
s {$sel:name:GetVpcLinkResponse' :: Maybe Text
name = Maybe Text
a} :: GetVpcLinkResponse)

-- | A message summarizing the cause of the status of the VPC link.
getVpcLinkResponse_vpcLinkStatusMessage :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe Prelude.Text)
getVpcLinkResponse_vpcLinkStatusMessage :: (Maybe Text -> f (Maybe Text))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_vpcLinkStatusMessage = (GetVpcLinkResponse -> Maybe Text)
-> (GetVpcLinkResponse -> Maybe Text -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse GetVpcLinkResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Maybe Text
vpcLinkStatusMessage :: Maybe Text
$sel:vpcLinkStatusMessage:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe Text
vpcLinkStatusMessage} -> Maybe Text
vpcLinkStatusMessage) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe Text
a -> GetVpcLinkResponse
s {$sel:vpcLinkStatusMessage:GetVpcLinkResponse' :: Maybe Text
vpcLinkStatusMessage = Maybe Text
a} :: GetVpcLinkResponse)

-- | Tags for the VPC link.
getVpcLinkResponse_tags :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getVpcLinkResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_tags = (GetVpcLinkResponse -> Maybe (HashMap Text Text))
-> (GetVpcLinkResponse
    -> Maybe (HashMap Text Text) -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse
     GetVpcLinkResponse
     (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 (\GetVpcLinkResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe (HashMap Text Text)
a -> GetVpcLinkResponse
s {$sel:tags:GetVpcLinkResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetVpcLinkResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetVpcLinkResponse -> f GetVpcLinkResponse)
-> ((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)))
-> GetVpcLinkResponse
-> f GetVpcLinkResponse
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

-- | The status of the VPC link.
getVpcLinkResponse_vpcLinkStatus :: Lens.Lens' GetVpcLinkResponse (Prelude.Maybe VpcLinkStatus)
getVpcLinkResponse_vpcLinkStatus :: (Maybe VpcLinkStatus -> f (Maybe VpcLinkStatus))
-> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_vpcLinkStatus = (GetVpcLinkResponse -> Maybe VpcLinkStatus)
-> (GetVpcLinkResponse
    -> Maybe VpcLinkStatus -> GetVpcLinkResponse)
-> Lens
     GetVpcLinkResponse
     GetVpcLinkResponse
     (Maybe VpcLinkStatus)
     (Maybe VpcLinkStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Maybe VpcLinkStatus
vpcLinkStatus :: Maybe VpcLinkStatus
$sel:vpcLinkStatus:GetVpcLinkResponse' :: GetVpcLinkResponse -> Maybe VpcLinkStatus
vpcLinkStatus} -> Maybe VpcLinkStatus
vpcLinkStatus) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Maybe VpcLinkStatus
a -> GetVpcLinkResponse
s {$sel:vpcLinkStatus:GetVpcLinkResponse' :: Maybe VpcLinkStatus
vpcLinkStatus = Maybe VpcLinkStatus
a} :: GetVpcLinkResponse)

-- | The response's http status code.
getVpcLinkResponse_httpStatus :: Lens.Lens' GetVpcLinkResponse Prelude.Int
getVpcLinkResponse_httpStatus :: (Int -> f Int) -> GetVpcLinkResponse -> f GetVpcLinkResponse
getVpcLinkResponse_httpStatus = (GetVpcLinkResponse -> Int)
-> (GetVpcLinkResponse -> Int -> GetVpcLinkResponse)
-> Lens GetVpcLinkResponse GetVpcLinkResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpcLinkResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetVpcLinkResponse' :: GetVpcLinkResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetVpcLinkResponse
s@GetVpcLinkResponse' {} Int
a -> GetVpcLinkResponse
s {$sel:httpStatus:GetVpcLinkResponse' :: Int
httpStatus = Int
a} :: GetVpcLinkResponse)

instance Prelude.NFData GetVpcLinkResponse