{-# 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.WorkSpaces.DescribeConnectionAliases
-- 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)
--
-- Retrieves a list that describes the connection aliases used for
-- cross-Region redirection. For more information, see
-- <https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html Cross-Region Redirection for Amazon WorkSpaces>.
module Amazonka.WorkSpaces.DescribeConnectionAliases
  ( -- * Creating a Request
    DescribeConnectionAliases (..),
    newDescribeConnectionAliases,

    -- * Request Lenses
    describeConnectionAliases_resourceId,
    describeConnectionAliases_aliasIds,
    describeConnectionAliases_nextToken,
    describeConnectionAliases_limit,

    -- * Destructuring the Response
    DescribeConnectionAliasesResponse (..),
    newDescribeConnectionAliasesResponse,

    -- * Response Lenses
    describeConnectionAliasesResponse_connectionAliases,
    describeConnectionAliasesResponse_nextToken,
    describeConnectionAliasesResponse_httpStatus,
  )
where

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
import Amazonka.WorkSpaces.Types

-- | /See:/ 'newDescribeConnectionAliases' smart constructor.
data DescribeConnectionAliases = DescribeConnectionAliases'
  { -- | The identifier of the directory associated with the connection alias.
    DescribeConnectionAliases -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
    -- | The identifiers of the connection aliases to describe.
    DescribeConnectionAliases -> Maybe (NonEmpty Text)
aliasIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | If you received a @NextToken@ from a previous call that was paginated,
    -- provide this token to receive the next set of results.
    DescribeConnectionAliases -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of connection aliases to return.
    DescribeConnectionAliases -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeConnectionAliases -> DescribeConnectionAliases -> Bool
(DescribeConnectionAliases -> DescribeConnectionAliases -> Bool)
-> (DescribeConnectionAliases -> DescribeConnectionAliases -> Bool)
-> Eq DescribeConnectionAliases
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConnectionAliases -> DescribeConnectionAliases -> Bool
$c/= :: DescribeConnectionAliases -> DescribeConnectionAliases -> Bool
== :: DescribeConnectionAliases -> DescribeConnectionAliases -> Bool
$c== :: DescribeConnectionAliases -> DescribeConnectionAliases -> Bool
Prelude.Eq, ReadPrec [DescribeConnectionAliases]
ReadPrec DescribeConnectionAliases
Int -> ReadS DescribeConnectionAliases
ReadS [DescribeConnectionAliases]
(Int -> ReadS DescribeConnectionAliases)
-> ReadS [DescribeConnectionAliases]
-> ReadPrec DescribeConnectionAliases
-> ReadPrec [DescribeConnectionAliases]
-> Read DescribeConnectionAliases
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConnectionAliases]
$creadListPrec :: ReadPrec [DescribeConnectionAliases]
readPrec :: ReadPrec DescribeConnectionAliases
$creadPrec :: ReadPrec DescribeConnectionAliases
readList :: ReadS [DescribeConnectionAliases]
$creadList :: ReadS [DescribeConnectionAliases]
readsPrec :: Int -> ReadS DescribeConnectionAliases
$creadsPrec :: Int -> ReadS DescribeConnectionAliases
Prelude.Read, Int -> DescribeConnectionAliases -> ShowS
[DescribeConnectionAliases] -> ShowS
DescribeConnectionAliases -> String
(Int -> DescribeConnectionAliases -> ShowS)
-> (DescribeConnectionAliases -> String)
-> ([DescribeConnectionAliases] -> ShowS)
-> Show DescribeConnectionAliases
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConnectionAliases] -> ShowS
$cshowList :: [DescribeConnectionAliases] -> ShowS
show :: DescribeConnectionAliases -> String
$cshow :: DescribeConnectionAliases -> String
showsPrec :: Int -> DescribeConnectionAliases -> ShowS
$cshowsPrec :: Int -> DescribeConnectionAliases -> ShowS
Prelude.Show, (forall x.
 DescribeConnectionAliases -> Rep DescribeConnectionAliases x)
-> (forall x.
    Rep DescribeConnectionAliases x -> DescribeConnectionAliases)
-> Generic DescribeConnectionAliases
forall x.
Rep DescribeConnectionAliases x -> DescribeConnectionAliases
forall x.
DescribeConnectionAliases -> Rep DescribeConnectionAliases x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConnectionAliases x -> DescribeConnectionAliases
$cfrom :: forall x.
DescribeConnectionAliases -> Rep DescribeConnectionAliases x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConnectionAliases' 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:
--
-- 'resourceId', 'describeConnectionAliases_resourceId' - The identifier of the directory associated with the connection alias.
--
-- 'aliasIds', 'describeConnectionAliases_aliasIds' - The identifiers of the connection aliases to describe.
--
-- 'nextToken', 'describeConnectionAliases_nextToken' - If you received a @NextToken@ from a previous call that was paginated,
-- provide this token to receive the next set of results.
--
-- 'limit', 'describeConnectionAliases_limit' - The maximum number of connection aliases to return.
newDescribeConnectionAliases ::
  DescribeConnectionAliases
newDescribeConnectionAliases :: DescribeConnectionAliases
newDescribeConnectionAliases =
  DescribeConnectionAliases' :: Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Natural
-> DescribeConnectionAliases
DescribeConnectionAliases'
    { $sel:resourceId:DescribeConnectionAliases' :: Maybe Text
resourceId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:aliasIds:DescribeConnectionAliases' :: Maybe (NonEmpty Text)
aliasIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConnectionAliases' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:DescribeConnectionAliases' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The identifier of the directory associated with the connection alias.
describeConnectionAliases_resourceId :: Lens.Lens' DescribeConnectionAliases (Prelude.Maybe Prelude.Text)
describeConnectionAliases_resourceId :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectionAliases -> f DescribeConnectionAliases
describeConnectionAliases_resourceId = (DescribeConnectionAliases -> Maybe Text)
-> (DescribeConnectionAliases
    -> Maybe Text -> DescribeConnectionAliases)
-> Lens
     DescribeConnectionAliases
     DescribeConnectionAliases
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliases' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:DescribeConnectionAliases' :: DescribeConnectionAliases -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: DescribeConnectionAliases
s@DescribeConnectionAliases' {} Maybe Text
a -> DescribeConnectionAliases
s {$sel:resourceId:DescribeConnectionAliases' :: Maybe Text
resourceId = Maybe Text
a} :: DescribeConnectionAliases)

-- | The identifiers of the connection aliases to describe.
describeConnectionAliases_aliasIds :: Lens.Lens' DescribeConnectionAliases (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeConnectionAliases_aliasIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeConnectionAliases -> f DescribeConnectionAliases
describeConnectionAliases_aliasIds = (DescribeConnectionAliases -> Maybe (NonEmpty Text))
-> (DescribeConnectionAliases
    -> Maybe (NonEmpty Text) -> DescribeConnectionAliases)
-> Lens
     DescribeConnectionAliases
     DescribeConnectionAliases
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliases' {Maybe (NonEmpty Text)
aliasIds :: Maybe (NonEmpty Text)
$sel:aliasIds:DescribeConnectionAliases' :: DescribeConnectionAliases -> Maybe (NonEmpty Text)
aliasIds} -> Maybe (NonEmpty Text)
aliasIds) (\s :: DescribeConnectionAliases
s@DescribeConnectionAliases' {} Maybe (NonEmpty Text)
a -> DescribeConnectionAliases
s {$sel:aliasIds:DescribeConnectionAliases' :: Maybe (NonEmpty Text)
aliasIds = Maybe (NonEmpty Text)
a} :: DescribeConnectionAliases) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> DescribeConnectionAliases -> f DescribeConnectionAliases)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeConnectionAliases
-> f DescribeConnectionAliases
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If you received a @NextToken@ from a previous call that was paginated,
-- provide this token to receive the next set of results.
describeConnectionAliases_nextToken :: Lens.Lens' DescribeConnectionAliases (Prelude.Maybe Prelude.Text)
describeConnectionAliases_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectionAliases -> f DescribeConnectionAliases
describeConnectionAliases_nextToken = (DescribeConnectionAliases -> Maybe Text)
-> (DescribeConnectionAliases
    -> Maybe Text -> DescribeConnectionAliases)
-> Lens
     DescribeConnectionAliases
     DescribeConnectionAliases
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliases' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeConnectionAliases' :: DescribeConnectionAliases -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeConnectionAliases
s@DescribeConnectionAliases' {} Maybe Text
a -> DescribeConnectionAliases
s {$sel:nextToken:DescribeConnectionAliases' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeConnectionAliases)

-- | The maximum number of connection aliases to return.
describeConnectionAliases_limit :: Lens.Lens' DescribeConnectionAliases (Prelude.Maybe Prelude.Natural)
describeConnectionAliases_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeConnectionAliases -> f DescribeConnectionAliases
describeConnectionAliases_limit = (DescribeConnectionAliases -> Maybe Natural)
-> (DescribeConnectionAliases
    -> Maybe Natural -> DescribeConnectionAliases)
-> Lens
     DescribeConnectionAliases
     DescribeConnectionAliases
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliases' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeConnectionAliases' :: DescribeConnectionAliases -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeConnectionAliases
s@DescribeConnectionAliases' {} Maybe Natural
a -> DescribeConnectionAliases
s {$sel:limit:DescribeConnectionAliases' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeConnectionAliases)

instance Core.AWSRequest DescribeConnectionAliases where
  type
    AWSResponse DescribeConnectionAliases =
      DescribeConnectionAliasesResponse
  request :: DescribeConnectionAliases -> Request DescribeConnectionAliases
request = Service
-> DescribeConnectionAliases -> Request DescribeConnectionAliases
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeConnectionAliases
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConnectionAliases)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeConnectionAliases))
-> Logger
-> Service
-> Proxy DescribeConnectionAliases
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeConnectionAliases)))
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 (NonEmpty ConnectionAlias)
-> Maybe Text -> Int -> DescribeConnectionAliasesResponse
DescribeConnectionAliasesResponse'
            (Maybe (NonEmpty ConnectionAlias)
 -> Maybe Text -> Int -> DescribeConnectionAliasesResponse)
-> Either String (Maybe (NonEmpty ConnectionAlias))
-> Either
     String (Maybe Text -> Int -> DescribeConnectionAliasesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (NonEmpty ConnectionAlias))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ConnectionAliases")
            Either
  String (Maybe Text -> Int -> DescribeConnectionAliasesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeConnectionAliasesResponse)
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 -> DescribeConnectionAliasesResponse)
-> Either String Int
-> Either String DescribeConnectionAliasesResponse
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 DescribeConnectionAliases

instance Prelude.NFData DescribeConnectionAliases

instance Core.ToHeaders DescribeConnectionAliases where
  toHeaders :: DescribeConnectionAliases -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeConnectionAliases -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"WorkspacesService.DescribeConnectionAliases" ::
                          Prelude.ByteString
                      ),
            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 DescribeConnectionAliases where
  toJSON :: DescribeConnectionAliases -> Value
toJSON DescribeConnectionAliases' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
limit :: Maybe Natural
nextToken :: Maybe Text
aliasIds :: Maybe (NonEmpty Text)
resourceId :: Maybe Text
$sel:limit:DescribeConnectionAliases' :: DescribeConnectionAliases -> Maybe Natural
$sel:nextToken:DescribeConnectionAliases' :: DescribeConnectionAliases -> Maybe Text
$sel:aliasIds:DescribeConnectionAliases' :: DescribeConnectionAliases -> Maybe (NonEmpty Text)
$sel:resourceId:DescribeConnectionAliases' :: DescribeConnectionAliases -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ResourceId" 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
resourceId,
            (Text
"AliasIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
aliasIds,
            (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
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit
          ]
      )

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

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

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

-- |
-- Create a value of 'DescribeConnectionAliasesResponse' 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:
--
-- 'connectionAliases', 'describeConnectionAliasesResponse_connectionAliases' - Information about the specified connection aliases.
--
-- 'nextToken', 'describeConnectionAliasesResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- null when there are no more results to return.
--
-- 'httpStatus', 'describeConnectionAliasesResponse_httpStatus' - The response's http status code.
newDescribeConnectionAliasesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConnectionAliasesResponse
newDescribeConnectionAliasesResponse :: Int -> DescribeConnectionAliasesResponse
newDescribeConnectionAliasesResponse Int
pHttpStatus_ =
  DescribeConnectionAliasesResponse' :: Maybe (NonEmpty ConnectionAlias)
-> Maybe Text -> Int -> DescribeConnectionAliasesResponse
DescribeConnectionAliasesResponse'
    { $sel:connectionAliases:DescribeConnectionAliasesResponse' :: Maybe (NonEmpty ConnectionAlias)
connectionAliases =
        Maybe (NonEmpty ConnectionAlias)
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeConnectionAliasesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeConnectionAliasesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the specified connection aliases.
describeConnectionAliasesResponse_connectionAliases :: Lens.Lens' DescribeConnectionAliasesResponse (Prelude.Maybe (Prelude.NonEmpty ConnectionAlias))
describeConnectionAliasesResponse_connectionAliases :: (Maybe (NonEmpty ConnectionAlias)
 -> f (Maybe (NonEmpty ConnectionAlias)))
-> DescribeConnectionAliasesResponse
-> f DescribeConnectionAliasesResponse
describeConnectionAliasesResponse_connectionAliases = (DescribeConnectionAliasesResponse
 -> Maybe (NonEmpty ConnectionAlias))
-> (DescribeConnectionAliasesResponse
    -> Maybe (NonEmpty ConnectionAlias)
    -> DescribeConnectionAliasesResponse)
-> Lens
     DescribeConnectionAliasesResponse
     DescribeConnectionAliasesResponse
     (Maybe (NonEmpty ConnectionAlias))
     (Maybe (NonEmpty ConnectionAlias))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliasesResponse' {Maybe (NonEmpty ConnectionAlias)
connectionAliases :: Maybe (NonEmpty ConnectionAlias)
$sel:connectionAliases:DescribeConnectionAliasesResponse' :: DescribeConnectionAliasesResponse
-> Maybe (NonEmpty ConnectionAlias)
connectionAliases} -> Maybe (NonEmpty ConnectionAlias)
connectionAliases) (\s :: DescribeConnectionAliasesResponse
s@DescribeConnectionAliasesResponse' {} Maybe (NonEmpty ConnectionAlias)
a -> DescribeConnectionAliasesResponse
s {$sel:connectionAliases:DescribeConnectionAliasesResponse' :: Maybe (NonEmpty ConnectionAlias)
connectionAliases = Maybe (NonEmpty ConnectionAlias)
a} :: DescribeConnectionAliasesResponse) ((Maybe (NonEmpty ConnectionAlias)
  -> f (Maybe (NonEmpty ConnectionAlias)))
 -> DescribeConnectionAliasesResponse
 -> f DescribeConnectionAliasesResponse)
-> ((Maybe (NonEmpty ConnectionAlias)
     -> f (Maybe (NonEmpty ConnectionAlias)))
    -> Maybe (NonEmpty ConnectionAlias)
    -> f (Maybe (NonEmpty ConnectionAlias)))
-> (Maybe (NonEmpty ConnectionAlias)
    -> f (Maybe (NonEmpty ConnectionAlias)))
-> DescribeConnectionAliasesResponse
-> f DescribeConnectionAliasesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty ConnectionAlias)
  (NonEmpty ConnectionAlias)
  (NonEmpty ConnectionAlias)
  (NonEmpty ConnectionAlias)
-> Iso
     (Maybe (NonEmpty ConnectionAlias))
     (Maybe (NonEmpty ConnectionAlias))
     (Maybe (NonEmpty ConnectionAlias))
     (Maybe (NonEmpty ConnectionAlias))
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
  (NonEmpty ConnectionAlias)
  (NonEmpty ConnectionAlias)
  (NonEmpty ConnectionAlias)
  (NonEmpty ConnectionAlias)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

instance
  Prelude.NFData
    DescribeConnectionAliasesResponse