{-# 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.OpenSearch.DescribeInboundConnections
-- 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)
--
-- Lists all the inbound cross-cluster connections for a remote domain.
module Amazonka.OpenSearch.DescribeInboundConnections
  ( -- * Creating a Request
    DescribeInboundConnections (..),
    newDescribeInboundConnections,

    -- * Request Lenses
    describeInboundConnections_filters,
    describeInboundConnections_nextToken,
    describeInboundConnections_maxResults,

    -- * Destructuring the Response
    DescribeInboundConnectionsResponse (..),
    newDescribeInboundConnectionsResponse,

    -- * Response Lenses
    describeInboundConnectionsResponse_connections,
    describeInboundConnectionsResponse_nextToken,
    describeInboundConnectionsResponse_httpStatus,
  )
where

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

-- | Container for the parameters to the @ DescribeInboundConnections @
-- operation.
--
-- /See:/ 'newDescribeInboundConnections' smart constructor.
data DescribeInboundConnections = DescribeInboundConnections'
  { -- | A list of filters used to match properties for inbound cross-cluster
    -- connections. Available @ Filter @ values are:
    --
    -- -   connection-id
    -- -   local-domain-info.domain-name
    -- -   local-domain-info.owner-id
    -- -   local-domain-info.region
    -- -   remote-domain-info.domain-name
    DescribeInboundConnections -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | If more results are available and NextToken is present, make the next
    -- request to the same API with the received NextToken to paginate the
    -- remaining results.
    DescribeInboundConnections -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Set this value to limit the number of results returned. If not
    -- specified, defaults to 100.
    DescribeInboundConnections -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeInboundConnections -> DescribeInboundConnections -> Bool
(DescribeInboundConnections -> DescribeInboundConnections -> Bool)
-> (DescribeInboundConnections
    -> DescribeInboundConnections -> Bool)
-> Eq DescribeInboundConnections
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInboundConnections -> DescribeInboundConnections -> Bool
$c/= :: DescribeInboundConnections -> DescribeInboundConnections -> Bool
== :: DescribeInboundConnections -> DescribeInboundConnections -> Bool
$c== :: DescribeInboundConnections -> DescribeInboundConnections -> Bool
Prelude.Eq, ReadPrec [DescribeInboundConnections]
ReadPrec DescribeInboundConnections
Int -> ReadS DescribeInboundConnections
ReadS [DescribeInboundConnections]
(Int -> ReadS DescribeInboundConnections)
-> ReadS [DescribeInboundConnections]
-> ReadPrec DescribeInboundConnections
-> ReadPrec [DescribeInboundConnections]
-> Read DescribeInboundConnections
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInboundConnections]
$creadListPrec :: ReadPrec [DescribeInboundConnections]
readPrec :: ReadPrec DescribeInboundConnections
$creadPrec :: ReadPrec DescribeInboundConnections
readList :: ReadS [DescribeInboundConnections]
$creadList :: ReadS [DescribeInboundConnections]
readsPrec :: Int -> ReadS DescribeInboundConnections
$creadsPrec :: Int -> ReadS DescribeInboundConnections
Prelude.Read, Int -> DescribeInboundConnections -> ShowS
[DescribeInboundConnections] -> ShowS
DescribeInboundConnections -> String
(Int -> DescribeInboundConnections -> ShowS)
-> (DescribeInboundConnections -> String)
-> ([DescribeInboundConnections] -> ShowS)
-> Show DescribeInboundConnections
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInboundConnections] -> ShowS
$cshowList :: [DescribeInboundConnections] -> ShowS
show :: DescribeInboundConnections -> String
$cshow :: DescribeInboundConnections -> String
showsPrec :: Int -> DescribeInboundConnections -> ShowS
$cshowsPrec :: Int -> DescribeInboundConnections -> ShowS
Prelude.Show, (forall x.
 DescribeInboundConnections -> Rep DescribeInboundConnections x)
-> (forall x.
    Rep DescribeInboundConnections x -> DescribeInboundConnections)
-> Generic DescribeInboundConnections
forall x.
Rep DescribeInboundConnections x -> DescribeInboundConnections
forall x.
DescribeInboundConnections -> Rep DescribeInboundConnections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeInboundConnections x -> DescribeInboundConnections
$cfrom :: forall x.
DescribeInboundConnections -> Rep DescribeInboundConnections x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInboundConnections' 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:
--
-- 'filters', 'describeInboundConnections_filters' - A list of filters used to match properties for inbound cross-cluster
-- connections. Available @ Filter @ values are:
--
-- -   connection-id
-- -   local-domain-info.domain-name
-- -   local-domain-info.owner-id
-- -   local-domain-info.region
-- -   remote-domain-info.domain-name
--
-- 'nextToken', 'describeInboundConnections_nextToken' - If more results are available and NextToken is present, make the next
-- request to the same API with the received NextToken to paginate the
-- remaining results.
--
-- 'maxResults', 'describeInboundConnections_maxResults' - Set this value to limit the number of results returned. If not
-- specified, defaults to 100.
newDescribeInboundConnections ::
  DescribeInboundConnections
newDescribeInboundConnections :: DescribeInboundConnections
newDescribeInboundConnections =
  DescribeInboundConnections' :: Maybe [Filter]
-> Maybe Text -> Maybe Int -> DescribeInboundConnections
DescribeInboundConnections'
    { $sel:filters:DescribeInboundConnections' :: Maybe [Filter]
filters =
        Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeInboundConnections' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeInboundConnections' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | A list of filters used to match properties for inbound cross-cluster
-- connections. Available @ Filter @ values are:
--
-- -   connection-id
-- -   local-domain-info.domain-name
-- -   local-domain-info.owner-id
-- -   local-domain-info.region
-- -   remote-domain-info.domain-name
describeInboundConnections_filters :: Lens.Lens' DescribeInboundConnections (Prelude.Maybe [Filter])
describeInboundConnections_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeInboundConnections -> f DescribeInboundConnections
describeInboundConnections_filters = (DescribeInboundConnections -> Maybe [Filter])
-> (DescribeInboundConnections
    -> Maybe [Filter] -> DescribeInboundConnections)
-> Lens
     DescribeInboundConnections
     DescribeInboundConnections
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInboundConnections' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeInboundConnections' :: DescribeInboundConnections -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeInboundConnections
s@DescribeInboundConnections' {} Maybe [Filter]
a -> DescribeInboundConnections
s {$sel:filters:DescribeInboundConnections' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeInboundConnections) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> DescribeInboundConnections -> f DescribeInboundConnections)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeInboundConnections
-> f DescribeInboundConnections
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If more results are available and NextToken is present, make the next
-- request to the same API with the received NextToken to paginate the
-- remaining results.
describeInboundConnections_nextToken :: Lens.Lens' DescribeInboundConnections (Prelude.Maybe Prelude.Text)
describeInboundConnections_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeInboundConnections -> f DescribeInboundConnections
describeInboundConnections_nextToken = (DescribeInboundConnections -> Maybe Text)
-> (DescribeInboundConnections
    -> Maybe Text -> DescribeInboundConnections)
-> Lens
     DescribeInboundConnections
     DescribeInboundConnections
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInboundConnections' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInboundConnections' :: DescribeInboundConnections -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInboundConnections
s@DescribeInboundConnections' {} Maybe Text
a -> DescribeInboundConnections
s {$sel:nextToken:DescribeInboundConnections' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInboundConnections)

-- | Set this value to limit the number of results returned. If not
-- specified, defaults to 100.
describeInboundConnections_maxResults :: Lens.Lens' DescribeInboundConnections (Prelude.Maybe Prelude.Int)
describeInboundConnections_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeInboundConnections -> f DescribeInboundConnections
describeInboundConnections_maxResults = (DescribeInboundConnections -> Maybe Int)
-> (DescribeInboundConnections
    -> Maybe Int -> DescribeInboundConnections)
-> Lens
     DescribeInboundConnections
     DescribeInboundConnections
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInboundConnections' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeInboundConnections' :: DescribeInboundConnections -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeInboundConnections
s@DescribeInboundConnections' {} Maybe Int
a -> DescribeInboundConnections
s {$sel:maxResults:DescribeInboundConnections' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeInboundConnections)

instance Core.AWSRequest DescribeInboundConnections where
  type
    AWSResponse DescribeInboundConnections =
      DescribeInboundConnectionsResponse
  request :: DescribeInboundConnections -> Request DescribeInboundConnections
request = Service
-> DescribeInboundConnections -> Request DescribeInboundConnections
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeInboundConnections
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeInboundConnections)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeInboundConnections))
-> Logger
-> Service
-> Proxy DescribeInboundConnections
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeInboundConnections)))
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 [InboundConnection]
-> Maybe Text -> Int -> DescribeInboundConnectionsResponse
DescribeInboundConnectionsResponse'
            (Maybe [InboundConnection]
 -> Maybe Text -> Int -> DescribeInboundConnectionsResponse)
-> Either String (Maybe [InboundConnection])
-> Either
     String (Maybe Text -> Int -> DescribeInboundConnectionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [InboundConnection]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Connections" Either String (Maybe (Maybe [InboundConnection]))
-> Maybe [InboundConnection]
-> Either String (Maybe [InboundConnection])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [InboundConnection]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String (Maybe Text -> Int -> DescribeInboundConnectionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeInboundConnectionsResponse)
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
"NextToken")
            Either String (Int -> DescribeInboundConnectionsResponse)
-> Either String Int
-> Either String DescribeInboundConnectionsResponse
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 DescribeInboundConnections

instance Prelude.NFData DescribeInboundConnections

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

instance Core.ToJSON DescribeInboundConnections where
  toJSON :: DescribeInboundConnections -> Value
toJSON DescribeInboundConnections' {Maybe Int
Maybe [Filter]
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
filters :: Maybe [Filter]
$sel:maxResults:DescribeInboundConnections' :: DescribeInboundConnections -> Maybe Int
$sel:nextToken:DescribeInboundConnections' :: DescribeInboundConnections -> Maybe Text
$sel:filters:DescribeInboundConnections' :: DescribeInboundConnections -> Maybe [Filter]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Filters" Text -> [Filter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Filter] -> Pair) -> Maybe [Filter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Text
"NextToken" 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
nextToken,
            (Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
          ]
      )

instance Core.ToPath DescribeInboundConnections where
  toPath :: DescribeInboundConnections -> ByteString
toPath =
    ByteString -> DescribeInboundConnections -> ByteString
forall a b. a -> b -> a
Prelude.const
      ByteString
"/2021-01-01/opensearch/cc/inboundConnection/search"

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

-- | The result of a @ DescribeInboundConnections @ request. Contains a list
-- of connections matching the filter criteria.
--
-- /See:/ 'newDescribeInboundConnectionsResponse' smart constructor.
data DescribeInboundConnectionsResponse = DescribeInboundConnectionsResponse'
  { -- | A list of @ InboundConnection @ matching the specified filter criteria.
    DescribeInboundConnectionsResponse -> Maybe [InboundConnection]
connections :: Prelude.Maybe [InboundConnection],
    -- | If more results are available and NextToken is present, make the next
    -- request to the same API with the received NextToken to paginate the
    -- remaining results.
    DescribeInboundConnectionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeInboundConnectionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeInboundConnectionsResponse
-> DescribeInboundConnectionsResponse -> Bool
(DescribeInboundConnectionsResponse
 -> DescribeInboundConnectionsResponse -> Bool)
-> (DescribeInboundConnectionsResponse
    -> DescribeInboundConnectionsResponse -> Bool)
-> Eq DescribeInboundConnectionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeInboundConnectionsResponse
-> DescribeInboundConnectionsResponse -> Bool
$c/= :: DescribeInboundConnectionsResponse
-> DescribeInboundConnectionsResponse -> Bool
== :: DescribeInboundConnectionsResponse
-> DescribeInboundConnectionsResponse -> Bool
$c== :: DescribeInboundConnectionsResponse
-> DescribeInboundConnectionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeInboundConnectionsResponse]
ReadPrec DescribeInboundConnectionsResponse
Int -> ReadS DescribeInboundConnectionsResponse
ReadS [DescribeInboundConnectionsResponse]
(Int -> ReadS DescribeInboundConnectionsResponse)
-> ReadS [DescribeInboundConnectionsResponse]
-> ReadPrec DescribeInboundConnectionsResponse
-> ReadPrec [DescribeInboundConnectionsResponse]
-> Read DescribeInboundConnectionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeInboundConnectionsResponse]
$creadListPrec :: ReadPrec [DescribeInboundConnectionsResponse]
readPrec :: ReadPrec DescribeInboundConnectionsResponse
$creadPrec :: ReadPrec DescribeInboundConnectionsResponse
readList :: ReadS [DescribeInboundConnectionsResponse]
$creadList :: ReadS [DescribeInboundConnectionsResponse]
readsPrec :: Int -> ReadS DescribeInboundConnectionsResponse
$creadsPrec :: Int -> ReadS DescribeInboundConnectionsResponse
Prelude.Read, Int -> DescribeInboundConnectionsResponse -> ShowS
[DescribeInboundConnectionsResponse] -> ShowS
DescribeInboundConnectionsResponse -> String
(Int -> DescribeInboundConnectionsResponse -> ShowS)
-> (DescribeInboundConnectionsResponse -> String)
-> ([DescribeInboundConnectionsResponse] -> ShowS)
-> Show DescribeInboundConnectionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeInboundConnectionsResponse] -> ShowS
$cshowList :: [DescribeInboundConnectionsResponse] -> ShowS
show :: DescribeInboundConnectionsResponse -> String
$cshow :: DescribeInboundConnectionsResponse -> String
showsPrec :: Int -> DescribeInboundConnectionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeInboundConnectionsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeInboundConnectionsResponse
 -> Rep DescribeInboundConnectionsResponse x)
-> (forall x.
    Rep DescribeInboundConnectionsResponse x
    -> DescribeInboundConnectionsResponse)
-> Generic DescribeInboundConnectionsResponse
forall x.
Rep DescribeInboundConnectionsResponse x
-> DescribeInboundConnectionsResponse
forall x.
DescribeInboundConnectionsResponse
-> Rep DescribeInboundConnectionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeInboundConnectionsResponse x
-> DescribeInboundConnectionsResponse
$cfrom :: forall x.
DescribeInboundConnectionsResponse
-> Rep DescribeInboundConnectionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeInboundConnectionsResponse' 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:
--
-- 'connections', 'describeInboundConnectionsResponse_connections' - A list of @ InboundConnection @ matching the specified filter criteria.
--
-- 'nextToken', 'describeInboundConnectionsResponse_nextToken' - If more results are available and NextToken is present, make the next
-- request to the same API with the received NextToken to paginate the
-- remaining results.
--
-- 'httpStatus', 'describeInboundConnectionsResponse_httpStatus' - The response's http status code.
newDescribeInboundConnectionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeInboundConnectionsResponse
newDescribeInboundConnectionsResponse :: Int -> DescribeInboundConnectionsResponse
newDescribeInboundConnectionsResponse Int
pHttpStatus_ =
  DescribeInboundConnectionsResponse' :: Maybe [InboundConnection]
-> Maybe Text -> Int -> DescribeInboundConnectionsResponse
DescribeInboundConnectionsResponse'
    { $sel:connections:DescribeInboundConnectionsResponse' :: Maybe [InboundConnection]
connections =
        Maybe [InboundConnection]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeInboundConnectionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeInboundConnectionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of @ InboundConnection @ matching the specified filter criteria.
describeInboundConnectionsResponse_connections :: Lens.Lens' DescribeInboundConnectionsResponse (Prelude.Maybe [InboundConnection])
describeInboundConnectionsResponse_connections :: (Maybe [InboundConnection] -> f (Maybe [InboundConnection]))
-> DescribeInboundConnectionsResponse
-> f DescribeInboundConnectionsResponse
describeInboundConnectionsResponse_connections = (DescribeInboundConnectionsResponse -> Maybe [InboundConnection])
-> (DescribeInboundConnectionsResponse
    -> Maybe [InboundConnection] -> DescribeInboundConnectionsResponse)
-> Lens
     DescribeInboundConnectionsResponse
     DescribeInboundConnectionsResponse
     (Maybe [InboundConnection])
     (Maybe [InboundConnection])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInboundConnectionsResponse' {Maybe [InboundConnection]
connections :: Maybe [InboundConnection]
$sel:connections:DescribeInboundConnectionsResponse' :: DescribeInboundConnectionsResponse -> Maybe [InboundConnection]
connections} -> Maybe [InboundConnection]
connections) (\s :: DescribeInboundConnectionsResponse
s@DescribeInboundConnectionsResponse' {} Maybe [InboundConnection]
a -> DescribeInboundConnectionsResponse
s {$sel:connections:DescribeInboundConnectionsResponse' :: Maybe [InboundConnection]
connections = Maybe [InboundConnection]
a} :: DescribeInboundConnectionsResponse) ((Maybe [InboundConnection] -> f (Maybe [InboundConnection]))
 -> DescribeInboundConnectionsResponse
 -> f DescribeInboundConnectionsResponse)
-> ((Maybe [InboundConnection] -> f (Maybe [InboundConnection]))
    -> Maybe [InboundConnection] -> f (Maybe [InboundConnection]))
-> (Maybe [InboundConnection] -> f (Maybe [InboundConnection]))
-> DescribeInboundConnectionsResponse
-> f DescribeInboundConnectionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InboundConnection]
  [InboundConnection]
  [InboundConnection]
  [InboundConnection]
-> Iso
     (Maybe [InboundConnection])
     (Maybe [InboundConnection])
     (Maybe [InboundConnection])
     (Maybe [InboundConnection])
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
  [InboundConnection]
  [InboundConnection]
  [InboundConnection]
  [InboundConnection]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If more results are available and NextToken is present, make the next
-- request to the same API with the received NextToken to paginate the
-- remaining results.
describeInboundConnectionsResponse_nextToken :: Lens.Lens' DescribeInboundConnectionsResponse (Prelude.Maybe Prelude.Text)
describeInboundConnectionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeInboundConnectionsResponse
-> f DescribeInboundConnectionsResponse
describeInboundConnectionsResponse_nextToken = (DescribeInboundConnectionsResponse -> Maybe Text)
-> (DescribeInboundConnectionsResponse
    -> Maybe Text -> DescribeInboundConnectionsResponse)
-> Lens
     DescribeInboundConnectionsResponse
     DescribeInboundConnectionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeInboundConnectionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeInboundConnectionsResponse' :: DescribeInboundConnectionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeInboundConnectionsResponse
s@DescribeInboundConnectionsResponse' {} Maybe Text
a -> DescribeInboundConnectionsResponse
s {$sel:nextToken:DescribeInboundConnectionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeInboundConnectionsResponse)

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

instance
  Prelude.NFData
    DescribeInboundConnectionsResponse