{-# 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.CreateVpcLink
-- 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)
--
-- Creates a VPC link.
module Amazonka.ApiGatewayV2.CreateVpcLink
  ( -- * Creating a Request
    CreateVpcLink (..),
    newCreateVpcLink,

    -- * Request Lenses
    createVpcLink_securityGroupIds,
    createVpcLink_tags,
    createVpcLink_subnetIds,
    createVpcLink_name,

    -- * Destructuring the Response
    CreateVpcLinkResponse (..),
    newCreateVpcLinkResponse,

    -- * Response Lenses
    createVpcLinkResponse_securityGroupIds,
    createVpcLinkResponse_subnetIds,
    createVpcLinkResponse_vpcLinkId,
    createVpcLinkResponse_createdDate,
    createVpcLinkResponse_vpcLinkVersion,
    createVpcLinkResponse_name,
    createVpcLinkResponse_vpcLinkStatusMessage,
    createVpcLinkResponse_tags,
    createVpcLinkResponse_vpcLinkStatus,
    createVpcLinkResponse_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

-- | Creates a VPC link
--
-- /See:/ 'newCreateVpcLink' smart constructor.
data CreateVpcLink = CreateVpcLink'
  { -- | A list of security group IDs for the VPC link.
    CreateVpcLink -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | A list of tags.
    CreateVpcLink -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A list of subnet IDs to include in the VPC link.
    CreateVpcLink -> [Text]
subnetIds :: [Prelude.Text],
    -- | The name of the VPC link.
    CreateVpcLink -> Text
name :: Prelude.Text
  }
  deriving (CreateVpcLink -> CreateVpcLink -> Bool
(CreateVpcLink -> CreateVpcLink -> Bool)
-> (CreateVpcLink -> CreateVpcLink -> Bool) -> Eq CreateVpcLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVpcLink -> CreateVpcLink -> Bool
$c/= :: CreateVpcLink -> CreateVpcLink -> Bool
== :: CreateVpcLink -> CreateVpcLink -> Bool
$c== :: CreateVpcLink -> CreateVpcLink -> Bool
Prelude.Eq, ReadPrec [CreateVpcLink]
ReadPrec CreateVpcLink
Int -> ReadS CreateVpcLink
ReadS [CreateVpcLink]
(Int -> ReadS CreateVpcLink)
-> ReadS [CreateVpcLink]
-> ReadPrec CreateVpcLink
-> ReadPrec [CreateVpcLink]
-> Read CreateVpcLink
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVpcLink]
$creadListPrec :: ReadPrec [CreateVpcLink]
readPrec :: ReadPrec CreateVpcLink
$creadPrec :: ReadPrec CreateVpcLink
readList :: ReadS [CreateVpcLink]
$creadList :: ReadS [CreateVpcLink]
readsPrec :: Int -> ReadS CreateVpcLink
$creadsPrec :: Int -> ReadS CreateVpcLink
Prelude.Read, Int -> CreateVpcLink -> ShowS
[CreateVpcLink] -> ShowS
CreateVpcLink -> String
(Int -> CreateVpcLink -> ShowS)
-> (CreateVpcLink -> String)
-> ([CreateVpcLink] -> ShowS)
-> Show CreateVpcLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVpcLink] -> ShowS
$cshowList :: [CreateVpcLink] -> ShowS
show :: CreateVpcLink -> String
$cshow :: CreateVpcLink -> String
showsPrec :: Int -> CreateVpcLink -> ShowS
$cshowsPrec :: Int -> CreateVpcLink -> ShowS
Prelude.Show, (forall x. CreateVpcLink -> Rep CreateVpcLink x)
-> (forall x. Rep CreateVpcLink x -> CreateVpcLink)
-> Generic CreateVpcLink
forall x. Rep CreateVpcLink x -> CreateVpcLink
forall x. CreateVpcLink -> Rep CreateVpcLink x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateVpcLink x -> CreateVpcLink
$cfrom :: forall x. CreateVpcLink -> Rep CreateVpcLink x
Prelude.Generic)

-- |
-- Create a value of 'CreateVpcLink' 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', 'createVpcLink_securityGroupIds' - A list of security group IDs for the VPC link.
--
-- 'tags', 'createVpcLink_tags' - A list of tags.
--
-- 'subnetIds', 'createVpcLink_subnetIds' - A list of subnet IDs to include in the VPC link.
--
-- 'name', 'createVpcLink_name' - The name of the VPC link.
newCreateVpcLink ::
  -- | 'name'
  Prelude.Text ->
  CreateVpcLink
newCreateVpcLink :: Text -> CreateVpcLink
newCreateVpcLink Text
pName_ =
  CreateVpcLink' :: Maybe [Text]
-> Maybe (HashMap Text Text) -> [Text] -> Text -> CreateVpcLink
CreateVpcLink'
    { $sel:securityGroupIds:CreateVpcLink' :: Maybe [Text]
securityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateVpcLink' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:CreateVpcLink' :: [Text]
subnetIds = [Text]
forall a. Monoid a => a
Prelude.mempty,
      $sel:name:CreateVpcLink' :: Text
name = Text
pName_
    }

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

-- | A list of subnet IDs to include in the VPC link.
createVpcLink_subnetIds :: Lens.Lens' CreateVpcLink [Prelude.Text]
createVpcLink_subnetIds :: ([Text] -> f [Text]) -> CreateVpcLink -> f CreateVpcLink
createVpcLink_subnetIds = (CreateVpcLink -> [Text])
-> (CreateVpcLink -> [Text] -> CreateVpcLink)
-> Lens CreateVpcLink CreateVpcLink [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcLink' {[Text]
subnetIds :: [Text]
$sel:subnetIds:CreateVpcLink' :: CreateVpcLink -> [Text]
subnetIds} -> [Text]
subnetIds) (\s :: CreateVpcLink
s@CreateVpcLink' {} [Text]
a -> CreateVpcLink
s {$sel:subnetIds:CreateVpcLink' :: [Text]
subnetIds = [Text]
a} :: CreateVpcLink) (([Text] -> f [Text]) -> CreateVpcLink -> f CreateVpcLink)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CreateVpcLink
-> f CreateVpcLink
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Core.AWSRequest CreateVpcLink where
  type
    AWSResponse CreateVpcLink =
      CreateVpcLinkResponse
  request :: CreateVpcLink -> Request CreateVpcLink
request = Service -> CreateVpcLink -> Request CreateVpcLink
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateVpcLink
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateVpcLink)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateVpcLink))
-> Logger
-> Service
-> Proxy CreateVpcLink
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateVpcLink)))
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
-> CreateVpcLinkResponse
CreateVpcLinkResponse'
            (Maybe [Text]
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe VpcLinkVersion
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe VpcLinkStatus
 -> Int
 -> CreateVpcLinkResponse)
-> 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
      -> CreateVpcLinkResponse)
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
   -> CreateVpcLinkResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe VpcLinkVersion
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> CreateVpcLinkResponse)
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
   -> CreateVpcLinkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe VpcLinkVersion
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> CreateVpcLinkResponse)
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
   -> CreateVpcLinkResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe VpcLinkVersion
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> CreateVpcLinkResponse)
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
   -> CreateVpcLinkResponse)
-> Either String (Maybe VpcLinkVersion)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> CreateVpcLinkResponse)
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
   -> CreateVpcLinkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus
      -> Int
      -> CreateVpcLinkResponse)
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
   -> CreateVpcLinkResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe VpcLinkStatus -> Int -> CreateVpcLinkResponse)
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 -> CreateVpcLinkResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String (Maybe VpcLinkStatus -> Int -> CreateVpcLinkResponse)
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 -> CreateVpcLinkResponse)
-> Either String (Maybe VpcLinkStatus)
-> Either String (Int -> CreateVpcLinkResponse)
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 -> CreateVpcLinkResponse)
-> Either String Int -> Either String CreateVpcLinkResponse
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 CreateVpcLink

instance Prelude.NFData CreateVpcLink

instance Core.ToHeaders CreateVpcLink where
  toHeaders :: CreateVpcLink -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateVpcLink -> 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.ToJSON CreateVpcLink where
  toJSON :: CreateVpcLink -> Value
toJSON CreateVpcLink' {[Text]
Maybe [Text]
Maybe (HashMap Text Text)
Text
name :: Text
subnetIds :: [Text]
tags :: Maybe (HashMap Text Text)
securityGroupIds :: Maybe [Text]
$sel:name:CreateVpcLink' :: CreateVpcLink -> Text
$sel:subnetIds:CreateVpcLink' :: CreateVpcLink -> [Text]
$sel:tags:CreateVpcLink' :: CreateVpcLink -> Maybe (HashMap Text Text)
$sel:securityGroupIds:CreateVpcLink' :: CreateVpcLink -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"securityGroupIds" 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]
securityGroupIds,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"subnetIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
subnetIds),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
          ]
      )

instance Core.ToPath CreateVpcLink where
  toPath :: CreateVpcLink -> ByteString
toPath = ByteString -> CreateVpcLink -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v2/vpclinks"

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

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

-- |
-- Create a value of 'CreateVpcLinkResponse' 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', 'createVpcLinkResponse_securityGroupIds' - A list of security group IDs for the VPC link.
--
-- 'subnetIds', 'createVpcLinkResponse_subnetIds' - A list of subnet IDs to include in the VPC link.
--
-- 'vpcLinkId', 'createVpcLinkResponse_vpcLinkId' - The ID of the VPC link.
--
-- 'createdDate', 'createVpcLinkResponse_createdDate' - The timestamp when the VPC link was created.
--
-- 'vpcLinkVersion', 'createVpcLinkResponse_vpcLinkVersion' - The version of the VPC link.
--
-- 'name', 'createVpcLinkResponse_name' - The name of the VPC link.
--
-- 'vpcLinkStatusMessage', 'createVpcLinkResponse_vpcLinkStatusMessage' - A message summarizing the cause of the status of the VPC link.
--
-- 'tags', 'createVpcLinkResponse_tags' - Tags for the VPC link.
--
-- 'vpcLinkStatus', 'createVpcLinkResponse_vpcLinkStatus' - The status of the VPC link.
--
-- 'httpStatus', 'createVpcLinkResponse_httpStatus' - The response's http status code.
newCreateVpcLinkResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateVpcLinkResponse
newCreateVpcLinkResponse :: Int -> CreateVpcLinkResponse
newCreateVpcLinkResponse Int
pHttpStatus_ =
  CreateVpcLinkResponse' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe VpcLinkVersion
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe VpcLinkStatus
-> Int
-> CreateVpcLinkResponse
CreateVpcLinkResponse'
    { $sel:securityGroupIds:CreateVpcLinkResponse' :: Maybe [Text]
securityGroupIds =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:CreateVpcLinkResponse' :: Maybe [Text]
subnetIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcLinkId:CreateVpcLinkResponse' :: Maybe Text
vpcLinkId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:CreateVpcLinkResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcLinkVersion:CreateVpcLinkResponse' :: Maybe VpcLinkVersion
vpcLinkVersion = Maybe VpcLinkVersion
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateVpcLinkResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcLinkStatusMessage:CreateVpcLinkResponse' :: Maybe Text
vpcLinkStatusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateVpcLinkResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcLinkStatus:CreateVpcLinkResponse' :: Maybe VpcLinkStatus
vpcLinkStatus = Maybe VpcLinkStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateVpcLinkResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The timestamp when the VPC link was created.
createVpcLinkResponse_createdDate :: Lens.Lens' CreateVpcLinkResponse (Prelude.Maybe Prelude.UTCTime)
createVpcLinkResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateVpcLinkResponse -> f CreateVpcLinkResponse
createVpcLinkResponse_createdDate = (CreateVpcLinkResponse -> Maybe POSIX)
-> (CreateVpcLinkResponse -> Maybe POSIX -> CreateVpcLinkResponse)
-> Lens
     CreateVpcLinkResponse
     CreateVpcLinkResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcLinkResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:CreateVpcLinkResponse' :: CreateVpcLinkResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: CreateVpcLinkResponse
s@CreateVpcLinkResponse' {} Maybe POSIX
a -> CreateVpcLinkResponse
s {$sel:createdDate:CreateVpcLinkResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: CreateVpcLinkResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateVpcLinkResponse -> f CreateVpcLinkResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateVpcLinkResponse
-> f CreateVpcLinkResponse
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.
createVpcLinkResponse_vpcLinkVersion :: Lens.Lens' CreateVpcLinkResponse (Prelude.Maybe VpcLinkVersion)
createVpcLinkResponse_vpcLinkVersion :: (Maybe VpcLinkVersion -> f (Maybe VpcLinkVersion))
-> CreateVpcLinkResponse -> f CreateVpcLinkResponse
createVpcLinkResponse_vpcLinkVersion = (CreateVpcLinkResponse -> Maybe VpcLinkVersion)
-> (CreateVpcLinkResponse
    -> Maybe VpcLinkVersion -> CreateVpcLinkResponse)
-> Lens
     CreateVpcLinkResponse
     CreateVpcLinkResponse
     (Maybe VpcLinkVersion)
     (Maybe VpcLinkVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcLinkResponse' {Maybe VpcLinkVersion
vpcLinkVersion :: Maybe VpcLinkVersion
$sel:vpcLinkVersion:CreateVpcLinkResponse' :: CreateVpcLinkResponse -> Maybe VpcLinkVersion
vpcLinkVersion} -> Maybe VpcLinkVersion
vpcLinkVersion) (\s :: CreateVpcLinkResponse
s@CreateVpcLinkResponse' {} Maybe VpcLinkVersion
a -> CreateVpcLinkResponse
s {$sel:vpcLinkVersion:CreateVpcLinkResponse' :: Maybe VpcLinkVersion
vpcLinkVersion = Maybe VpcLinkVersion
a} :: CreateVpcLinkResponse)

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

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

-- | Tags for the VPC link.
createVpcLinkResponse_tags :: Lens.Lens' CreateVpcLinkResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createVpcLinkResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateVpcLinkResponse -> f CreateVpcLinkResponse
createVpcLinkResponse_tags = (CreateVpcLinkResponse -> Maybe (HashMap Text Text))
-> (CreateVpcLinkResponse
    -> Maybe (HashMap Text Text) -> CreateVpcLinkResponse)
-> Lens
     CreateVpcLinkResponse
     CreateVpcLinkResponse
     (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 (\CreateVpcLinkResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateVpcLinkResponse' :: CreateVpcLinkResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateVpcLinkResponse
s@CreateVpcLinkResponse' {} Maybe (HashMap Text Text)
a -> CreateVpcLinkResponse
s {$sel:tags:CreateVpcLinkResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateVpcLinkResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateVpcLinkResponse -> f CreateVpcLinkResponse)
-> ((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)))
-> CreateVpcLinkResponse
-> f CreateVpcLinkResponse
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.
createVpcLinkResponse_vpcLinkStatus :: Lens.Lens' CreateVpcLinkResponse (Prelude.Maybe VpcLinkStatus)
createVpcLinkResponse_vpcLinkStatus :: (Maybe VpcLinkStatus -> f (Maybe VpcLinkStatus))
-> CreateVpcLinkResponse -> f CreateVpcLinkResponse
createVpcLinkResponse_vpcLinkStatus = (CreateVpcLinkResponse -> Maybe VpcLinkStatus)
-> (CreateVpcLinkResponse
    -> Maybe VpcLinkStatus -> CreateVpcLinkResponse)
-> Lens
     CreateVpcLinkResponse
     CreateVpcLinkResponse
     (Maybe VpcLinkStatus)
     (Maybe VpcLinkStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcLinkResponse' {Maybe VpcLinkStatus
vpcLinkStatus :: Maybe VpcLinkStatus
$sel:vpcLinkStatus:CreateVpcLinkResponse' :: CreateVpcLinkResponse -> Maybe VpcLinkStatus
vpcLinkStatus} -> Maybe VpcLinkStatus
vpcLinkStatus) (\s :: CreateVpcLinkResponse
s@CreateVpcLinkResponse' {} Maybe VpcLinkStatus
a -> CreateVpcLinkResponse
s {$sel:vpcLinkStatus:CreateVpcLinkResponse' :: Maybe VpcLinkStatus
vpcLinkStatus = Maybe VpcLinkStatus
a} :: CreateVpcLinkResponse)

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

instance Prelude.NFData CreateVpcLinkResponse