{-# 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.EC2.DescribeVpcEndpointConnections
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the VPC endpoint connections to your VPC endpoint services,
-- including any endpoints that are pending your acceptance.
--
-- This operation returns paginated results.
module Amazonka.EC2.DescribeVpcEndpointConnections
  ( -- * Creating a Request
    DescribeVpcEndpointConnections (..),
    newDescribeVpcEndpointConnections,

    -- * Request Lenses
    describeVpcEndpointConnections_dryRun,
    describeVpcEndpointConnections_filters,
    describeVpcEndpointConnections_maxResults,
    describeVpcEndpointConnections_nextToken,

    -- * Destructuring the Response
    DescribeVpcEndpointConnectionsResponse (..),
    newDescribeVpcEndpointConnectionsResponse,

    -- * Response Lenses
    describeVpcEndpointConnectionsResponse_nextToken,
    describeVpcEndpointConnectionsResponse_vpcEndpointConnections,
    describeVpcEndpointConnectionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeVpcEndpointConnections' smart constructor.
data DescribeVpcEndpointConnections = DescribeVpcEndpointConnections'
  { -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    DescribeVpcEndpointConnections -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | One or more filters.
    --
    -- -   @ip-address-type@ - The IP address type (@ipv4@ | @ipv6@).
    --
    -- -   @service-id@ - The ID of the service.
    --
    -- -   @vpc-endpoint-owner@ - The ID of the Amazon Web Services account ID
    --     that owns the endpoint.
    --
    -- -   @vpc-endpoint-state@ - The state of the endpoint
    --     (@pendingAcceptance@ | @pending@ | @available@ | @deleting@ |
    --     @deleted@ | @rejected@ | @failed@).
    --
    -- -   @vpc-endpoint-id@ - The ID of the endpoint.
    DescribeVpcEndpointConnections -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The maximum number of results to return for the request in a single
    -- page. The remaining results of the initial request can be seen by
    -- sending another request with the returned @NextToken@ value. This value
    -- can be between 5 and 1,000; if @MaxResults@ is given a value larger than
    -- 1,000, only 1,000 results are returned.
    DescribeVpcEndpointConnections -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The token to retrieve the next page of results.
    DescribeVpcEndpointConnections -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeVpcEndpointConnections
-> DescribeVpcEndpointConnections -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVpcEndpointConnections
-> DescribeVpcEndpointConnections -> Bool
$c/= :: DescribeVpcEndpointConnections
-> DescribeVpcEndpointConnections -> Bool
== :: DescribeVpcEndpointConnections
-> DescribeVpcEndpointConnections -> Bool
$c== :: DescribeVpcEndpointConnections
-> DescribeVpcEndpointConnections -> Bool
Prelude.Eq, ReadPrec [DescribeVpcEndpointConnections]
ReadPrec DescribeVpcEndpointConnections
Int -> ReadS DescribeVpcEndpointConnections
ReadS [DescribeVpcEndpointConnections]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVpcEndpointConnections]
$creadListPrec :: ReadPrec [DescribeVpcEndpointConnections]
readPrec :: ReadPrec DescribeVpcEndpointConnections
$creadPrec :: ReadPrec DescribeVpcEndpointConnections
readList :: ReadS [DescribeVpcEndpointConnections]
$creadList :: ReadS [DescribeVpcEndpointConnections]
readsPrec :: Int -> ReadS DescribeVpcEndpointConnections
$creadsPrec :: Int -> ReadS DescribeVpcEndpointConnections
Prelude.Read, Int -> DescribeVpcEndpointConnections -> ShowS
[DescribeVpcEndpointConnections] -> ShowS
DescribeVpcEndpointConnections -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVpcEndpointConnections] -> ShowS
$cshowList :: [DescribeVpcEndpointConnections] -> ShowS
show :: DescribeVpcEndpointConnections -> String
$cshow :: DescribeVpcEndpointConnections -> String
showsPrec :: Int -> DescribeVpcEndpointConnections -> ShowS
$cshowsPrec :: Int -> DescribeVpcEndpointConnections -> ShowS
Prelude.Show, forall x.
Rep DescribeVpcEndpointConnections x
-> DescribeVpcEndpointConnections
forall x.
DescribeVpcEndpointConnections
-> Rep DescribeVpcEndpointConnections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeVpcEndpointConnections x
-> DescribeVpcEndpointConnections
$cfrom :: forall x.
DescribeVpcEndpointConnections
-> Rep DescribeVpcEndpointConnections x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVpcEndpointConnections' 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:
--
-- 'dryRun', 'describeVpcEndpointConnections_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'filters', 'describeVpcEndpointConnections_filters' - One or more filters.
--
-- -   @ip-address-type@ - The IP address type (@ipv4@ | @ipv6@).
--
-- -   @service-id@ - The ID of the service.
--
-- -   @vpc-endpoint-owner@ - The ID of the Amazon Web Services account ID
--     that owns the endpoint.
--
-- -   @vpc-endpoint-state@ - The state of the endpoint
--     (@pendingAcceptance@ | @pending@ | @available@ | @deleting@ |
--     @deleted@ | @rejected@ | @failed@).
--
-- -   @vpc-endpoint-id@ - The ID of the endpoint.
--
-- 'maxResults', 'describeVpcEndpointConnections_maxResults' - The maximum number of results to return for the request in a single
-- page. The remaining results of the initial request can be seen by
-- sending another request with the returned @NextToken@ value. This value
-- can be between 5 and 1,000; if @MaxResults@ is given a value larger than
-- 1,000, only 1,000 results are returned.
--
-- 'nextToken', 'describeVpcEndpointConnections_nextToken' - The token to retrieve the next page of results.
newDescribeVpcEndpointConnections ::
  DescribeVpcEndpointConnections
newDescribeVpcEndpointConnections :: DescribeVpcEndpointConnections
newDescribeVpcEndpointConnections =
  DescribeVpcEndpointConnections'
    { $sel:dryRun:DescribeVpcEndpointConnections' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeVpcEndpointConnections' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeVpcEndpointConnections' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeVpcEndpointConnections' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
describeVpcEndpointConnections_dryRun :: Lens.Lens' DescribeVpcEndpointConnections (Prelude.Maybe Prelude.Bool)
describeVpcEndpointConnections_dryRun :: Lens' DescribeVpcEndpointConnections (Maybe Bool)
describeVpcEndpointConnections_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointConnections' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeVpcEndpointConnections
s@DescribeVpcEndpointConnections' {} Maybe Bool
a -> DescribeVpcEndpointConnections
s {$sel:dryRun:DescribeVpcEndpointConnections' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeVpcEndpointConnections)

-- | One or more filters.
--
-- -   @ip-address-type@ - The IP address type (@ipv4@ | @ipv6@).
--
-- -   @service-id@ - The ID of the service.
--
-- -   @vpc-endpoint-owner@ - The ID of the Amazon Web Services account ID
--     that owns the endpoint.
--
-- -   @vpc-endpoint-state@ - The state of the endpoint
--     (@pendingAcceptance@ | @pending@ | @available@ | @deleting@ |
--     @deleted@ | @rejected@ | @failed@).
--
-- -   @vpc-endpoint-id@ - The ID of the endpoint.
describeVpcEndpointConnections_filters :: Lens.Lens' DescribeVpcEndpointConnections (Prelude.Maybe [Filter])
describeVpcEndpointConnections_filters :: Lens' DescribeVpcEndpointConnections (Maybe [Filter])
describeVpcEndpointConnections_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointConnections' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeVpcEndpointConnections
s@DescribeVpcEndpointConnections' {} Maybe [Filter]
a -> DescribeVpcEndpointConnections
s {$sel:filters:DescribeVpcEndpointConnections' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeVpcEndpointConnections) 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

-- | The maximum number of results to return for the request in a single
-- page. The remaining results of the initial request can be seen by
-- sending another request with the returned @NextToken@ value. This value
-- can be between 5 and 1,000; if @MaxResults@ is given a value larger than
-- 1,000, only 1,000 results are returned.
describeVpcEndpointConnections_maxResults :: Lens.Lens' DescribeVpcEndpointConnections (Prelude.Maybe Prelude.Int)
describeVpcEndpointConnections_maxResults :: Lens' DescribeVpcEndpointConnections (Maybe Int)
describeVpcEndpointConnections_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointConnections' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeVpcEndpointConnections
s@DescribeVpcEndpointConnections' {} Maybe Int
a -> DescribeVpcEndpointConnections
s {$sel:maxResults:DescribeVpcEndpointConnections' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeVpcEndpointConnections)

-- | The token to retrieve the next page of results.
describeVpcEndpointConnections_nextToken :: Lens.Lens' DescribeVpcEndpointConnections (Prelude.Maybe Prelude.Text)
describeVpcEndpointConnections_nextToken :: Lens' DescribeVpcEndpointConnections (Maybe Text)
describeVpcEndpointConnections_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointConnections' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeVpcEndpointConnections
s@DescribeVpcEndpointConnections' {} Maybe Text
a -> DescribeVpcEndpointConnections
s {$sel:nextToken:DescribeVpcEndpointConnections' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeVpcEndpointConnections)

instance Core.AWSPager DescribeVpcEndpointConnections where
  page :: DescribeVpcEndpointConnections
-> AWSResponse DescribeVpcEndpointConnections
-> Maybe DescribeVpcEndpointConnections
page DescribeVpcEndpointConnections
rq AWSResponse DescribeVpcEndpointConnections
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeVpcEndpointConnections
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeVpcEndpointConnectionsResponse (Maybe Text)
describeVpcEndpointConnectionsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeVpcEndpointConnections
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeVpcEndpointConnectionsResponse
  (Maybe [VpcEndpointConnection])
describeVpcEndpointConnectionsResponse_vpcEndpointConnections
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeVpcEndpointConnections
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeVpcEndpointConnections (Maybe Text)
describeVpcEndpointConnections_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeVpcEndpointConnections
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeVpcEndpointConnectionsResponse (Maybe Text)
describeVpcEndpointConnectionsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    DescribeVpcEndpointConnections
  where
  type
    AWSResponse DescribeVpcEndpointConnections =
      DescribeVpcEndpointConnectionsResponse
  request :: (Service -> Service)
-> DescribeVpcEndpointConnections
-> Request DescribeVpcEndpointConnections
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeVpcEndpointConnections
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse DescribeVpcEndpointConnections)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [VpcEndpointConnection]
-> Int
-> DescribeVpcEndpointConnectionsResponse
DescribeVpcEndpointConnectionsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"vpcEndpointConnectionSet"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    DescribeVpcEndpointConnections
  where
  hashWithSalt :: Int -> DescribeVpcEndpointConnections -> Int
hashWithSalt
    Int
_salt
    DescribeVpcEndpointConnections' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Text
$sel:maxResults:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Int
$sel:filters:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe [Filter]
$sel:dryRun:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance
  Prelude.NFData
    DescribeVpcEndpointConnections
  where
  rnf :: DescribeVpcEndpointConnections -> ()
rnf DescribeVpcEndpointConnections' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Text
$sel:maxResults:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Int
$sel:filters:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe [Filter]
$sel:dryRun:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance
  Data.ToHeaders
    DescribeVpcEndpointConnections
  where
  toHeaders :: DescribeVpcEndpointConnections -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath DescribeVpcEndpointConnections where
  toPath :: DescribeVpcEndpointConnections -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery DescribeVpcEndpointConnections where
  toQuery :: DescribeVpcEndpointConnections -> QueryString
toQuery DescribeVpcEndpointConnections' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:nextToken:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Text
$sel:maxResults:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Int
$sel:filters:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe [Filter]
$sel:dryRun:DescribeVpcEndpointConnections' :: DescribeVpcEndpointConnections -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DescribeVpcEndpointConnections" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Filter" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newDescribeVpcEndpointConnectionsResponse' smart constructor.
data DescribeVpcEndpointConnectionsResponse = DescribeVpcEndpointConnectionsResponse'
  { -- | The token to use to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    DescribeVpcEndpointConnectionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about one or more VPC endpoint connections.
    DescribeVpcEndpointConnectionsResponse
-> Maybe [VpcEndpointConnection]
vpcEndpointConnections :: Prelude.Maybe [VpcEndpointConnection],
    -- | The response's http status code.
    DescribeVpcEndpointConnectionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeVpcEndpointConnectionsResponse
-> DescribeVpcEndpointConnectionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVpcEndpointConnectionsResponse
-> DescribeVpcEndpointConnectionsResponse -> Bool
$c/= :: DescribeVpcEndpointConnectionsResponse
-> DescribeVpcEndpointConnectionsResponse -> Bool
== :: DescribeVpcEndpointConnectionsResponse
-> DescribeVpcEndpointConnectionsResponse -> Bool
$c== :: DescribeVpcEndpointConnectionsResponse
-> DescribeVpcEndpointConnectionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeVpcEndpointConnectionsResponse]
ReadPrec DescribeVpcEndpointConnectionsResponse
Int -> ReadS DescribeVpcEndpointConnectionsResponse
ReadS [DescribeVpcEndpointConnectionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVpcEndpointConnectionsResponse]
$creadListPrec :: ReadPrec [DescribeVpcEndpointConnectionsResponse]
readPrec :: ReadPrec DescribeVpcEndpointConnectionsResponse
$creadPrec :: ReadPrec DescribeVpcEndpointConnectionsResponse
readList :: ReadS [DescribeVpcEndpointConnectionsResponse]
$creadList :: ReadS [DescribeVpcEndpointConnectionsResponse]
readsPrec :: Int -> ReadS DescribeVpcEndpointConnectionsResponse
$creadsPrec :: Int -> ReadS DescribeVpcEndpointConnectionsResponse
Prelude.Read, Int -> DescribeVpcEndpointConnectionsResponse -> ShowS
[DescribeVpcEndpointConnectionsResponse] -> ShowS
DescribeVpcEndpointConnectionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVpcEndpointConnectionsResponse] -> ShowS
$cshowList :: [DescribeVpcEndpointConnectionsResponse] -> ShowS
show :: DescribeVpcEndpointConnectionsResponse -> String
$cshow :: DescribeVpcEndpointConnectionsResponse -> String
showsPrec :: Int -> DescribeVpcEndpointConnectionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeVpcEndpointConnectionsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeVpcEndpointConnectionsResponse x
-> DescribeVpcEndpointConnectionsResponse
forall x.
DescribeVpcEndpointConnectionsResponse
-> Rep DescribeVpcEndpointConnectionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeVpcEndpointConnectionsResponse x
-> DescribeVpcEndpointConnectionsResponse
$cfrom :: forall x.
DescribeVpcEndpointConnectionsResponse
-> Rep DescribeVpcEndpointConnectionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVpcEndpointConnectionsResponse' 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:
--
-- 'nextToken', 'describeVpcEndpointConnectionsResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'vpcEndpointConnections', 'describeVpcEndpointConnectionsResponse_vpcEndpointConnections' - Information about one or more VPC endpoint connections.
--
-- 'httpStatus', 'describeVpcEndpointConnectionsResponse_httpStatus' - The response's http status code.
newDescribeVpcEndpointConnectionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeVpcEndpointConnectionsResponse
newDescribeVpcEndpointConnectionsResponse :: Int -> DescribeVpcEndpointConnectionsResponse
newDescribeVpcEndpointConnectionsResponse
  Int
pHttpStatus_ =
    DescribeVpcEndpointConnectionsResponse'
      { $sel:nextToken:DescribeVpcEndpointConnectionsResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:vpcEndpointConnections:DescribeVpcEndpointConnectionsResponse' :: Maybe [VpcEndpointConnection]
vpcEndpointConnections =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeVpcEndpointConnectionsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
describeVpcEndpointConnectionsResponse_nextToken :: Lens.Lens' DescribeVpcEndpointConnectionsResponse (Prelude.Maybe Prelude.Text)
describeVpcEndpointConnectionsResponse_nextToken :: Lens' DescribeVpcEndpointConnectionsResponse (Maybe Text)
describeVpcEndpointConnectionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointConnectionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeVpcEndpointConnectionsResponse' :: DescribeVpcEndpointConnectionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeVpcEndpointConnectionsResponse
s@DescribeVpcEndpointConnectionsResponse' {} Maybe Text
a -> DescribeVpcEndpointConnectionsResponse
s {$sel:nextToken:DescribeVpcEndpointConnectionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeVpcEndpointConnectionsResponse)

-- | Information about one or more VPC endpoint connections.
describeVpcEndpointConnectionsResponse_vpcEndpointConnections :: Lens.Lens' DescribeVpcEndpointConnectionsResponse (Prelude.Maybe [VpcEndpointConnection])
describeVpcEndpointConnectionsResponse_vpcEndpointConnections :: Lens'
  DescribeVpcEndpointConnectionsResponse
  (Maybe [VpcEndpointConnection])
describeVpcEndpointConnectionsResponse_vpcEndpointConnections = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointConnectionsResponse' {Maybe [VpcEndpointConnection]
vpcEndpointConnections :: Maybe [VpcEndpointConnection]
$sel:vpcEndpointConnections:DescribeVpcEndpointConnectionsResponse' :: DescribeVpcEndpointConnectionsResponse
-> Maybe [VpcEndpointConnection]
vpcEndpointConnections} -> Maybe [VpcEndpointConnection]
vpcEndpointConnections) (\s :: DescribeVpcEndpointConnectionsResponse
s@DescribeVpcEndpointConnectionsResponse' {} Maybe [VpcEndpointConnection]
a -> DescribeVpcEndpointConnectionsResponse
s {$sel:vpcEndpointConnections:DescribeVpcEndpointConnectionsResponse' :: Maybe [VpcEndpointConnection]
vpcEndpointConnections = Maybe [VpcEndpointConnection]
a} :: DescribeVpcEndpointConnectionsResponse) 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

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

instance
  Prelude.NFData
    DescribeVpcEndpointConnectionsResponse
  where
  rnf :: DescribeVpcEndpointConnectionsResponse -> ()
rnf DescribeVpcEndpointConnectionsResponse' {Int
Maybe [VpcEndpointConnection]
Maybe Text
httpStatus :: Int
vpcEndpointConnections :: Maybe [VpcEndpointConnection]
nextToken :: Maybe Text
$sel:httpStatus:DescribeVpcEndpointConnectionsResponse' :: DescribeVpcEndpointConnectionsResponse -> Int
$sel:vpcEndpointConnections:DescribeVpcEndpointConnectionsResponse' :: DescribeVpcEndpointConnectionsResponse
-> Maybe [VpcEndpointConnection]
$sel:nextToken:DescribeVpcEndpointConnectionsResponse' :: DescribeVpcEndpointConnectionsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [VpcEndpointConnection]
vpcEndpointConnections
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus