{-# 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.DescribeConnectionAliasPermissions
-- 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)
--
-- Describes the permissions that the owner of a connection alias has
-- granted to another Amazon Web Services account for the specified
-- connection alias. 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.DescribeConnectionAliasPermissions
  ( -- * Creating a Request
    DescribeConnectionAliasPermissions (..),
    newDescribeConnectionAliasPermissions,

    -- * Request Lenses
    describeConnectionAliasPermissions_nextToken,
    describeConnectionAliasPermissions_maxResults,
    describeConnectionAliasPermissions_aliasId,

    -- * Destructuring the Response
    DescribeConnectionAliasPermissionsResponse (..),
    newDescribeConnectionAliasPermissionsResponse,

    -- * Response Lenses
    describeConnectionAliasPermissionsResponse_aliasId,
    describeConnectionAliasPermissionsResponse_nextToken,
    describeConnectionAliasPermissionsResponse_connectionAliasPermissions,
    describeConnectionAliasPermissionsResponse_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:/ 'newDescribeConnectionAliasPermissions' smart constructor.
data DescribeConnectionAliasPermissions = DescribeConnectionAliasPermissions'
  { -- | If you received a @NextToken@ from a previous call that was paginated,
    -- provide this token to receive the next set of results.
    DescribeConnectionAliasPermissions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return.
    DescribeConnectionAliasPermissions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the connection alias.
    DescribeConnectionAliasPermissions -> Text
aliasId :: Prelude.Text
  }
  deriving (DescribeConnectionAliasPermissions
-> DescribeConnectionAliasPermissions -> Bool
(DescribeConnectionAliasPermissions
 -> DescribeConnectionAliasPermissions -> Bool)
-> (DescribeConnectionAliasPermissions
    -> DescribeConnectionAliasPermissions -> Bool)
-> Eq DescribeConnectionAliasPermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeConnectionAliasPermissions
-> DescribeConnectionAliasPermissions -> Bool
$c/= :: DescribeConnectionAliasPermissions
-> DescribeConnectionAliasPermissions -> Bool
== :: DescribeConnectionAliasPermissions
-> DescribeConnectionAliasPermissions -> Bool
$c== :: DescribeConnectionAliasPermissions
-> DescribeConnectionAliasPermissions -> Bool
Prelude.Eq, ReadPrec [DescribeConnectionAliasPermissions]
ReadPrec DescribeConnectionAliasPermissions
Int -> ReadS DescribeConnectionAliasPermissions
ReadS [DescribeConnectionAliasPermissions]
(Int -> ReadS DescribeConnectionAliasPermissions)
-> ReadS [DescribeConnectionAliasPermissions]
-> ReadPrec DescribeConnectionAliasPermissions
-> ReadPrec [DescribeConnectionAliasPermissions]
-> Read DescribeConnectionAliasPermissions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeConnectionAliasPermissions]
$creadListPrec :: ReadPrec [DescribeConnectionAliasPermissions]
readPrec :: ReadPrec DescribeConnectionAliasPermissions
$creadPrec :: ReadPrec DescribeConnectionAliasPermissions
readList :: ReadS [DescribeConnectionAliasPermissions]
$creadList :: ReadS [DescribeConnectionAliasPermissions]
readsPrec :: Int -> ReadS DescribeConnectionAliasPermissions
$creadsPrec :: Int -> ReadS DescribeConnectionAliasPermissions
Prelude.Read, Int -> DescribeConnectionAliasPermissions -> ShowS
[DescribeConnectionAliasPermissions] -> ShowS
DescribeConnectionAliasPermissions -> String
(Int -> DescribeConnectionAliasPermissions -> ShowS)
-> (DescribeConnectionAliasPermissions -> String)
-> ([DescribeConnectionAliasPermissions] -> ShowS)
-> Show DescribeConnectionAliasPermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeConnectionAliasPermissions] -> ShowS
$cshowList :: [DescribeConnectionAliasPermissions] -> ShowS
show :: DescribeConnectionAliasPermissions -> String
$cshow :: DescribeConnectionAliasPermissions -> String
showsPrec :: Int -> DescribeConnectionAliasPermissions -> ShowS
$cshowsPrec :: Int -> DescribeConnectionAliasPermissions -> ShowS
Prelude.Show, (forall x.
 DescribeConnectionAliasPermissions
 -> Rep DescribeConnectionAliasPermissions x)
-> (forall x.
    Rep DescribeConnectionAliasPermissions x
    -> DescribeConnectionAliasPermissions)
-> Generic DescribeConnectionAliasPermissions
forall x.
Rep DescribeConnectionAliasPermissions x
-> DescribeConnectionAliasPermissions
forall x.
DescribeConnectionAliasPermissions
-> Rep DescribeConnectionAliasPermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeConnectionAliasPermissions x
-> DescribeConnectionAliasPermissions
$cfrom :: forall x.
DescribeConnectionAliasPermissions
-> Rep DescribeConnectionAliasPermissions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeConnectionAliasPermissions' 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', 'describeConnectionAliasPermissions_nextToken' - If you received a @NextToken@ from a previous call that was paginated,
-- provide this token to receive the next set of results.
--
-- 'maxResults', 'describeConnectionAliasPermissions_maxResults' - The maximum number of results to return.
--
-- 'aliasId', 'describeConnectionAliasPermissions_aliasId' - The identifier of the connection alias.
newDescribeConnectionAliasPermissions ::
  -- | 'aliasId'
  Prelude.Text ->
  DescribeConnectionAliasPermissions
newDescribeConnectionAliasPermissions :: Text -> DescribeConnectionAliasPermissions
newDescribeConnectionAliasPermissions Text
pAliasId_ =
  DescribeConnectionAliasPermissions' :: Maybe Text
-> Maybe Natural -> Text -> DescribeConnectionAliasPermissions
DescribeConnectionAliasPermissions'
    { $sel:nextToken:DescribeConnectionAliasPermissions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeConnectionAliasPermissions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:aliasId:DescribeConnectionAliasPermissions' :: Text
aliasId = Text
pAliasId_
    }

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

-- | The maximum number of results to return.
describeConnectionAliasPermissions_maxResults :: Lens.Lens' DescribeConnectionAliasPermissions (Prelude.Maybe Prelude.Natural)
describeConnectionAliasPermissions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeConnectionAliasPermissions
-> f DescribeConnectionAliasPermissions
describeConnectionAliasPermissions_maxResults = (DescribeConnectionAliasPermissions -> Maybe Natural)
-> (DescribeConnectionAliasPermissions
    -> Maybe Natural -> DescribeConnectionAliasPermissions)
-> Lens
     DescribeConnectionAliasPermissions
     DescribeConnectionAliasPermissions
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliasPermissions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeConnectionAliasPermissions' :: DescribeConnectionAliasPermissions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeConnectionAliasPermissions
s@DescribeConnectionAliasPermissions' {} Maybe Natural
a -> DescribeConnectionAliasPermissions
s {$sel:maxResults:DescribeConnectionAliasPermissions' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeConnectionAliasPermissions)

-- | The identifier of the connection alias.
describeConnectionAliasPermissions_aliasId :: Lens.Lens' DescribeConnectionAliasPermissions Prelude.Text
describeConnectionAliasPermissions_aliasId :: (Text -> f Text)
-> DescribeConnectionAliasPermissions
-> f DescribeConnectionAliasPermissions
describeConnectionAliasPermissions_aliasId = (DescribeConnectionAliasPermissions -> Text)
-> (DescribeConnectionAliasPermissions
    -> Text -> DescribeConnectionAliasPermissions)
-> Lens
     DescribeConnectionAliasPermissions
     DescribeConnectionAliasPermissions
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliasPermissions' {Text
aliasId :: Text
$sel:aliasId:DescribeConnectionAliasPermissions' :: DescribeConnectionAliasPermissions -> Text
aliasId} -> Text
aliasId) (\s :: DescribeConnectionAliasPermissions
s@DescribeConnectionAliasPermissions' {} Text
a -> DescribeConnectionAliasPermissions
s {$sel:aliasId:DescribeConnectionAliasPermissions' :: Text
aliasId = Text
a} :: DescribeConnectionAliasPermissions)

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

instance
  Prelude.NFData
    DescribeConnectionAliasPermissions

instance
  Core.ToHeaders
    DescribeConnectionAliasPermissions
  where
  toHeaders :: DescribeConnectionAliasPermissions -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeConnectionAliasPermissions -> 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.DescribeConnectionAliasPermissions" ::
                          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
    DescribeConnectionAliasPermissions
  where
  toJSON :: DescribeConnectionAliasPermissions -> Value
toJSON DescribeConnectionAliasPermissions' {Maybe Natural
Maybe Text
Text
aliasId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:aliasId:DescribeConnectionAliasPermissions' :: DescribeConnectionAliasPermissions -> Text
$sel:maxResults:DescribeConnectionAliasPermissions' :: DescribeConnectionAliasPermissions -> Maybe Natural
$sel:nextToken:DescribeConnectionAliasPermissions' :: DescribeConnectionAliasPermissions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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 -> 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
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AliasId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
aliasId)
          ]
      )

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

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

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

-- |
-- Create a value of 'DescribeConnectionAliasPermissionsResponse' 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:
--
-- 'aliasId', 'describeConnectionAliasPermissionsResponse_aliasId' - The identifier of the connection alias.
--
-- 'nextToken', 'describeConnectionAliasPermissionsResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- null when there are no more results to return.
--
-- 'connectionAliasPermissions', 'describeConnectionAliasPermissionsResponse_connectionAliasPermissions' - The permissions associated with a connection alias.
--
-- 'httpStatus', 'describeConnectionAliasPermissionsResponse_httpStatus' - The response's http status code.
newDescribeConnectionAliasPermissionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeConnectionAliasPermissionsResponse
newDescribeConnectionAliasPermissionsResponse :: Int -> DescribeConnectionAliasPermissionsResponse
newDescribeConnectionAliasPermissionsResponse
  Int
pHttpStatus_ =
    DescribeConnectionAliasPermissionsResponse' :: Maybe Text
-> Maybe Text
-> Maybe (NonEmpty ConnectionAliasPermission)
-> Int
-> DescribeConnectionAliasPermissionsResponse
DescribeConnectionAliasPermissionsResponse'
      { $sel:aliasId:DescribeConnectionAliasPermissionsResponse' :: Maybe Text
aliasId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeConnectionAliasPermissionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:connectionAliasPermissions:DescribeConnectionAliasPermissionsResponse' :: Maybe (NonEmpty ConnectionAliasPermission)
connectionAliasPermissions =
          Maybe (NonEmpty ConnectionAliasPermission)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeConnectionAliasPermissionsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The identifier of the connection alias.
describeConnectionAliasPermissionsResponse_aliasId :: Lens.Lens' DescribeConnectionAliasPermissionsResponse (Prelude.Maybe Prelude.Text)
describeConnectionAliasPermissionsResponse_aliasId :: (Maybe Text -> f (Maybe Text))
-> DescribeConnectionAliasPermissionsResponse
-> f DescribeConnectionAliasPermissionsResponse
describeConnectionAliasPermissionsResponse_aliasId = (DescribeConnectionAliasPermissionsResponse -> Maybe Text)
-> (DescribeConnectionAliasPermissionsResponse
    -> Maybe Text -> DescribeConnectionAliasPermissionsResponse)
-> Lens
     DescribeConnectionAliasPermissionsResponse
     DescribeConnectionAliasPermissionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliasPermissionsResponse' {Maybe Text
aliasId :: Maybe Text
$sel:aliasId:DescribeConnectionAliasPermissionsResponse' :: DescribeConnectionAliasPermissionsResponse -> Maybe Text
aliasId} -> Maybe Text
aliasId) (\s :: DescribeConnectionAliasPermissionsResponse
s@DescribeConnectionAliasPermissionsResponse' {} Maybe Text
a -> DescribeConnectionAliasPermissionsResponse
s {$sel:aliasId:DescribeConnectionAliasPermissionsResponse' :: Maybe Text
aliasId = Maybe Text
a} :: DescribeConnectionAliasPermissionsResponse)

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

-- | The permissions associated with a connection alias.
describeConnectionAliasPermissionsResponse_connectionAliasPermissions :: Lens.Lens' DescribeConnectionAliasPermissionsResponse (Prelude.Maybe (Prelude.NonEmpty ConnectionAliasPermission))
describeConnectionAliasPermissionsResponse_connectionAliasPermissions :: (Maybe (NonEmpty ConnectionAliasPermission)
 -> f (Maybe (NonEmpty ConnectionAliasPermission)))
-> DescribeConnectionAliasPermissionsResponse
-> f DescribeConnectionAliasPermissionsResponse
describeConnectionAliasPermissionsResponse_connectionAliasPermissions = (DescribeConnectionAliasPermissionsResponse
 -> Maybe (NonEmpty ConnectionAliasPermission))
-> (DescribeConnectionAliasPermissionsResponse
    -> Maybe (NonEmpty ConnectionAliasPermission)
    -> DescribeConnectionAliasPermissionsResponse)
-> Lens
     DescribeConnectionAliasPermissionsResponse
     DescribeConnectionAliasPermissionsResponse
     (Maybe (NonEmpty ConnectionAliasPermission))
     (Maybe (NonEmpty ConnectionAliasPermission))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeConnectionAliasPermissionsResponse' {Maybe (NonEmpty ConnectionAliasPermission)
connectionAliasPermissions :: Maybe (NonEmpty ConnectionAliasPermission)
$sel:connectionAliasPermissions:DescribeConnectionAliasPermissionsResponse' :: DescribeConnectionAliasPermissionsResponse
-> Maybe (NonEmpty ConnectionAliasPermission)
connectionAliasPermissions} -> Maybe (NonEmpty ConnectionAliasPermission)
connectionAliasPermissions) (\s :: DescribeConnectionAliasPermissionsResponse
s@DescribeConnectionAliasPermissionsResponse' {} Maybe (NonEmpty ConnectionAliasPermission)
a -> DescribeConnectionAliasPermissionsResponse
s {$sel:connectionAliasPermissions:DescribeConnectionAliasPermissionsResponse' :: Maybe (NonEmpty ConnectionAliasPermission)
connectionAliasPermissions = Maybe (NonEmpty ConnectionAliasPermission)
a} :: DescribeConnectionAliasPermissionsResponse) ((Maybe (NonEmpty ConnectionAliasPermission)
  -> f (Maybe (NonEmpty ConnectionAliasPermission)))
 -> DescribeConnectionAliasPermissionsResponse
 -> f DescribeConnectionAliasPermissionsResponse)
-> ((Maybe (NonEmpty ConnectionAliasPermission)
     -> f (Maybe (NonEmpty ConnectionAliasPermission)))
    -> Maybe (NonEmpty ConnectionAliasPermission)
    -> f (Maybe (NonEmpty ConnectionAliasPermission)))
-> (Maybe (NonEmpty ConnectionAliasPermission)
    -> f (Maybe (NonEmpty ConnectionAliasPermission)))
-> DescribeConnectionAliasPermissionsResponse
-> f DescribeConnectionAliasPermissionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty ConnectionAliasPermission)
  (NonEmpty ConnectionAliasPermission)
  (NonEmpty ConnectionAliasPermission)
  (NonEmpty ConnectionAliasPermission)
-> Iso
     (Maybe (NonEmpty ConnectionAliasPermission))
     (Maybe (NonEmpty ConnectionAliasPermission))
     (Maybe (NonEmpty ConnectionAliasPermission))
     (Maybe (NonEmpty ConnectionAliasPermission))
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 ConnectionAliasPermission)
  (NonEmpty ConnectionAliasPermission)
  (NonEmpty ConnectionAliasPermission)
  (NonEmpty ConnectionAliasPermission)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeConnectionAliasPermissionsResponse