{-# 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.GetVpnConnectionDeviceTypes
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Obtain a list of customer gateway devices for which sample configuration
-- files can be provided. The request has no additional parameters. You can
-- also see the list of device types with sample configuration files
-- available under
-- <https://docs.aws.amazon.com/vpn/latest/s2svpn/your-cgw.html Your customer gateway device>
-- in the /Amazon Web Services Site-to-Site VPN User Guide/.
--
-- This operation returns paginated results.
module Amazonka.EC2.GetVpnConnectionDeviceTypes
  ( -- * Creating a Request
    GetVpnConnectionDeviceTypes (..),
    newGetVpnConnectionDeviceTypes,

    -- * Request Lenses
    getVpnConnectionDeviceTypes_dryRun,
    getVpnConnectionDeviceTypes_maxResults,
    getVpnConnectionDeviceTypes_nextToken,

    -- * Destructuring the Response
    GetVpnConnectionDeviceTypesResponse (..),
    newGetVpnConnectionDeviceTypesResponse,

    -- * Response Lenses
    getVpnConnectionDeviceTypesResponse_nextToken,
    getVpnConnectionDeviceTypesResponse_vpnConnectionDeviceTypes,
    getVpnConnectionDeviceTypesResponse_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:/ 'newGetVpnConnectionDeviceTypes' smart constructor.
data GetVpnConnectionDeviceTypes = GetVpnConnectionDeviceTypes'
  { -- | 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@.
    GetVpnConnectionDeviceTypes -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of results returned by @GetVpnConnectionDeviceTypes@
    -- in paginated output. When this parameter is used,
    -- @GetVpnConnectionDeviceTypes@ only returns @MaxResults@ results in a
    -- single page along with a @NextToken@ response element. The remaining
    -- results of the initial request can be seen by sending another
    -- @GetVpnConnectionDeviceTypes@ request with the returned @NextToken@
    -- value. This value can be between 200 and 1000. If this parameter is not
    -- used, then @GetVpnConnectionDeviceTypes@ returns all results.
    GetVpnConnectionDeviceTypes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The @NextToken@ value returned from a previous paginated
    -- @GetVpnConnectionDeviceTypes@ request where @MaxResults@ was used and
    -- the results exceeded the value of that parameter. Pagination continues
    -- from the end of the previous results that returned the @NextToken@
    -- value. This value is null when there are no more results to return.
    GetVpnConnectionDeviceTypes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (GetVpnConnectionDeviceTypes -> GetVpnConnectionDeviceTypes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVpnConnectionDeviceTypes -> GetVpnConnectionDeviceTypes -> Bool
$c/= :: GetVpnConnectionDeviceTypes -> GetVpnConnectionDeviceTypes -> Bool
== :: GetVpnConnectionDeviceTypes -> GetVpnConnectionDeviceTypes -> Bool
$c== :: GetVpnConnectionDeviceTypes -> GetVpnConnectionDeviceTypes -> Bool
Prelude.Eq, ReadPrec [GetVpnConnectionDeviceTypes]
ReadPrec GetVpnConnectionDeviceTypes
Int -> ReadS GetVpnConnectionDeviceTypes
ReadS [GetVpnConnectionDeviceTypes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVpnConnectionDeviceTypes]
$creadListPrec :: ReadPrec [GetVpnConnectionDeviceTypes]
readPrec :: ReadPrec GetVpnConnectionDeviceTypes
$creadPrec :: ReadPrec GetVpnConnectionDeviceTypes
readList :: ReadS [GetVpnConnectionDeviceTypes]
$creadList :: ReadS [GetVpnConnectionDeviceTypes]
readsPrec :: Int -> ReadS GetVpnConnectionDeviceTypes
$creadsPrec :: Int -> ReadS GetVpnConnectionDeviceTypes
Prelude.Read, Int -> GetVpnConnectionDeviceTypes -> ShowS
[GetVpnConnectionDeviceTypes] -> ShowS
GetVpnConnectionDeviceTypes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVpnConnectionDeviceTypes] -> ShowS
$cshowList :: [GetVpnConnectionDeviceTypes] -> ShowS
show :: GetVpnConnectionDeviceTypes -> String
$cshow :: GetVpnConnectionDeviceTypes -> String
showsPrec :: Int -> GetVpnConnectionDeviceTypes -> ShowS
$cshowsPrec :: Int -> GetVpnConnectionDeviceTypes -> ShowS
Prelude.Show, forall x.
Rep GetVpnConnectionDeviceTypes x -> GetVpnConnectionDeviceTypes
forall x.
GetVpnConnectionDeviceTypes -> Rep GetVpnConnectionDeviceTypes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetVpnConnectionDeviceTypes x -> GetVpnConnectionDeviceTypes
$cfrom :: forall x.
GetVpnConnectionDeviceTypes -> Rep GetVpnConnectionDeviceTypes x
Prelude.Generic)

-- |
-- Create a value of 'GetVpnConnectionDeviceTypes' 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', 'getVpnConnectionDeviceTypes_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@.
--
-- 'maxResults', 'getVpnConnectionDeviceTypes_maxResults' - The maximum number of results returned by @GetVpnConnectionDeviceTypes@
-- in paginated output. When this parameter is used,
-- @GetVpnConnectionDeviceTypes@ only returns @MaxResults@ results in a
-- single page along with a @NextToken@ response element. The remaining
-- results of the initial request can be seen by sending another
-- @GetVpnConnectionDeviceTypes@ request with the returned @NextToken@
-- value. This value can be between 200 and 1000. If this parameter is not
-- used, then @GetVpnConnectionDeviceTypes@ returns all results.
--
-- 'nextToken', 'getVpnConnectionDeviceTypes_nextToken' - The @NextToken@ value returned from a previous paginated
-- @GetVpnConnectionDeviceTypes@ request where @MaxResults@ was used and
-- the results exceeded the value of that parameter. Pagination continues
-- from the end of the previous results that returned the @NextToken@
-- value. This value is null when there are no more results to return.
newGetVpnConnectionDeviceTypes ::
  GetVpnConnectionDeviceTypes
newGetVpnConnectionDeviceTypes :: GetVpnConnectionDeviceTypes
newGetVpnConnectionDeviceTypes =
  GetVpnConnectionDeviceTypes'
    { $sel:dryRun:GetVpnConnectionDeviceTypes' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetVpnConnectionDeviceTypes' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetVpnConnectionDeviceTypes' :: 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@.
getVpnConnectionDeviceTypes_dryRun :: Lens.Lens' GetVpnConnectionDeviceTypes (Prelude.Maybe Prelude.Bool)
getVpnConnectionDeviceTypes_dryRun :: Lens' GetVpnConnectionDeviceTypes (Maybe Bool)
getVpnConnectionDeviceTypes_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpnConnectionDeviceTypes' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: GetVpnConnectionDeviceTypes
s@GetVpnConnectionDeviceTypes' {} Maybe Bool
a -> GetVpnConnectionDeviceTypes
s {$sel:dryRun:GetVpnConnectionDeviceTypes' :: Maybe Bool
dryRun = Maybe Bool
a} :: GetVpnConnectionDeviceTypes)

-- | The maximum number of results returned by @GetVpnConnectionDeviceTypes@
-- in paginated output. When this parameter is used,
-- @GetVpnConnectionDeviceTypes@ only returns @MaxResults@ results in a
-- single page along with a @NextToken@ response element. The remaining
-- results of the initial request can be seen by sending another
-- @GetVpnConnectionDeviceTypes@ request with the returned @NextToken@
-- value. This value can be between 200 and 1000. If this parameter is not
-- used, then @GetVpnConnectionDeviceTypes@ returns all results.
getVpnConnectionDeviceTypes_maxResults :: Lens.Lens' GetVpnConnectionDeviceTypes (Prelude.Maybe Prelude.Natural)
getVpnConnectionDeviceTypes_maxResults :: Lens' GetVpnConnectionDeviceTypes (Maybe Natural)
getVpnConnectionDeviceTypes_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpnConnectionDeviceTypes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetVpnConnectionDeviceTypes
s@GetVpnConnectionDeviceTypes' {} Maybe Natural
a -> GetVpnConnectionDeviceTypes
s {$sel:maxResults:GetVpnConnectionDeviceTypes' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetVpnConnectionDeviceTypes)

-- | The @NextToken@ value returned from a previous paginated
-- @GetVpnConnectionDeviceTypes@ request where @MaxResults@ was used and
-- the results exceeded the value of that parameter. Pagination continues
-- from the end of the previous results that returned the @NextToken@
-- value. This value is null when there are no more results to return.
getVpnConnectionDeviceTypes_nextToken :: Lens.Lens' GetVpnConnectionDeviceTypes (Prelude.Maybe Prelude.Text)
getVpnConnectionDeviceTypes_nextToken :: Lens' GetVpnConnectionDeviceTypes (Maybe Text)
getVpnConnectionDeviceTypes_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpnConnectionDeviceTypes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetVpnConnectionDeviceTypes
s@GetVpnConnectionDeviceTypes' {} Maybe Text
a -> GetVpnConnectionDeviceTypes
s {$sel:nextToken:GetVpnConnectionDeviceTypes' :: Maybe Text
nextToken = Maybe Text
a} :: GetVpnConnectionDeviceTypes)

instance Core.AWSPager GetVpnConnectionDeviceTypes where
  page :: GetVpnConnectionDeviceTypes
-> AWSResponse GetVpnConnectionDeviceTypes
-> Maybe GetVpnConnectionDeviceTypes
page GetVpnConnectionDeviceTypes
rq AWSResponse GetVpnConnectionDeviceTypes
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetVpnConnectionDeviceTypes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetVpnConnectionDeviceTypesResponse (Maybe Text)
getVpnConnectionDeviceTypesResponse_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 GetVpnConnectionDeviceTypes
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  GetVpnConnectionDeviceTypesResponse
  (Maybe [VpnConnectionDeviceType])
getVpnConnectionDeviceTypesResponse_vpnConnectionDeviceTypes
            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.$ GetVpnConnectionDeviceTypes
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetVpnConnectionDeviceTypes (Maybe Text)
getVpnConnectionDeviceTypes_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetVpnConnectionDeviceTypes
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetVpnConnectionDeviceTypesResponse (Maybe Text)
getVpnConnectionDeviceTypesResponse_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 GetVpnConnectionDeviceTypes where
  type
    AWSResponse GetVpnConnectionDeviceTypes =
      GetVpnConnectionDeviceTypesResponse
  request :: (Service -> Service)
-> GetVpnConnectionDeviceTypes
-> Request GetVpnConnectionDeviceTypes
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 GetVpnConnectionDeviceTypes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetVpnConnectionDeviceTypes)))
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 [VpnConnectionDeviceType]
-> Int
-> GetVpnConnectionDeviceTypesResponse
GetVpnConnectionDeviceTypesResponse'
            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
"vpnConnectionDeviceTypeSet"
                            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 GetVpnConnectionDeviceTypes where
  hashWithSalt :: Int -> GetVpnConnectionDeviceTypes -> Int
hashWithSalt Int
_salt GetVpnConnectionDeviceTypes' {Maybe Bool
Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:nextToken:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Text
$sel:maxResults:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Natural
$sel:dryRun:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> 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 Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData GetVpnConnectionDeviceTypes where
  rnf :: GetVpnConnectionDeviceTypes -> ()
rnf GetVpnConnectionDeviceTypes' {Maybe Bool
Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:nextToken:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Text
$sel:maxResults:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Natural
$sel:dryRun:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> 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 Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

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

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

instance Data.ToQuery GetVpnConnectionDeviceTypes where
  toQuery :: GetVpnConnectionDeviceTypes -> QueryString
toQuery GetVpnConnectionDeviceTypes' {Maybe Bool
Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:nextToken:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Text
$sel:maxResults:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Natural
$sel:dryRun:GetVpnConnectionDeviceTypes' :: GetVpnConnectionDeviceTypes -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"GetVpnConnectionDeviceTypes" ::
                      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,
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newGetVpnConnectionDeviceTypesResponse' smart constructor.
data GetVpnConnectionDeviceTypesResponse = GetVpnConnectionDeviceTypesResponse'
  { -- | The @NextToken@ value to include in a future
    -- @GetVpnConnectionDeviceTypes@ request. When the results of a
    -- @GetVpnConnectionDeviceTypes@ request exceed @MaxResults@, this value
    -- can be used to retrieve the next page of results. This value is null
    -- when there are no more results to return.
    GetVpnConnectionDeviceTypesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | List of customer gateway devices that have a sample configuration file
    -- available for use.
    GetVpnConnectionDeviceTypesResponse
-> Maybe [VpnConnectionDeviceType]
vpnConnectionDeviceTypes :: Prelude.Maybe [VpnConnectionDeviceType],
    -- | The response's http status code.
    GetVpnConnectionDeviceTypesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetVpnConnectionDeviceTypesResponse
-> GetVpnConnectionDeviceTypesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetVpnConnectionDeviceTypesResponse
-> GetVpnConnectionDeviceTypesResponse -> Bool
$c/= :: GetVpnConnectionDeviceTypesResponse
-> GetVpnConnectionDeviceTypesResponse -> Bool
== :: GetVpnConnectionDeviceTypesResponse
-> GetVpnConnectionDeviceTypesResponse -> Bool
$c== :: GetVpnConnectionDeviceTypesResponse
-> GetVpnConnectionDeviceTypesResponse -> Bool
Prelude.Eq, ReadPrec [GetVpnConnectionDeviceTypesResponse]
ReadPrec GetVpnConnectionDeviceTypesResponse
Int -> ReadS GetVpnConnectionDeviceTypesResponse
ReadS [GetVpnConnectionDeviceTypesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetVpnConnectionDeviceTypesResponse]
$creadListPrec :: ReadPrec [GetVpnConnectionDeviceTypesResponse]
readPrec :: ReadPrec GetVpnConnectionDeviceTypesResponse
$creadPrec :: ReadPrec GetVpnConnectionDeviceTypesResponse
readList :: ReadS [GetVpnConnectionDeviceTypesResponse]
$creadList :: ReadS [GetVpnConnectionDeviceTypesResponse]
readsPrec :: Int -> ReadS GetVpnConnectionDeviceTypesResponse
$creadsPrec :: Int -> ReadS GetVpnConnectionDeviceTypesResponse
Prelude.Read, Int -> GetVpnConnectionDeviceTypesResponse -> ShowS
[GetVpnConnectionDeviceTypesResponse] -> ShowS
GetVpnConnectionDeviceTypesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetVpnConnectionDeviceTypesResponse] -> ShowS
$cshowList :: [GetVpnConnectionDeviceTypesResponse] -> ShowS
show :: GetVpnConnectionDeviceTypesResponse -> String
$cshow :: GetVpnConnectionDeviceTypesResponse -> String
showsPrec :: Int -> GetVpnConnectionDeviceTypesResponse -> ShowS
$cshowsPrec :: Int -> GetVpnConnectionDeviceTypesResponse -> ShowS
Prelude.Show, forall x.
Rep GetVpnConnectionDeviceTypesResponse x
-> GetVpnConnectionDeviceTypesResponse
forall x.
GetVpnConnectionDeviceTypesResponse
-> Rep GetVpnConnectionDeviceTypesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetVpnConnectionDeviceTypesResponse x
-> GetVpnConnectionDeviceTypesResponse
$cfrom :: forall x.
GetVpnConnectionDeviceTypesResponse
-> Rep GetVpnConnectionDeviceTypesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetVpnConnectionDeviceTypesResponse' 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', 'getVpnConnectionDeviceTypesResponse_nextToken' - The @NextToken@ value to include in a future
-- @GetVpnConnectionDeviceTypes@ request. When the results of a
-- @GetVpnConnectionDeviceTypes@ request exceed @MaxResults@, this value
-- can be used to retrieve the next page of results. This value is null
-- when there are no more results to return.
--
-- 'vpnConnectionDeviceTypes', 'getVpnConnectionDeviceTypesResponse_vpnConnectionDeviceTypes' - List of customer gateway devices that have a sample configuration file
-- available for use.
--
-- 'httpStatus', 'getVpnConnectionDeviceTypesResponse_httpStatus' - The response's http status code.
newGetVpnConnectionDeviceTypesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetVpnConnectionDeviceTypesResponse
newGetVpnConnectionDeviceTypesResponse :: Int -> GetVpnConnectionDeviceTypesResponse
newGetVpnConnectionDeviceTypesResponse Int
pHttpStatus_ =
  GetVpnConnectionDeviceTypesResponse'
    { $sel:nextToken:GetVpnConnectionDeviceTypesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:vpnConnectionDeviceTypes:GetVpnConnectionDeviceTypesResponse' :: Maybe [VpnConnectionDeviceType]
vpnConnectionDeviceTypes =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetVpnConnectionDeviceTypesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The @NextToken@ value to include in a future
-- @GetVpnConnectionDeviceTypes@ request. When the results of a
-- @GetVpnConnectionDeviceTypes@ request exceed @MaxResults@, this value
-- can be used to retrieve the next page of results. This value is null
-- when there are no more results to return.
getVpnConnectionDeviceTypesResponse_nextToken :: Lens.Lens' GetVpnConnectionDeviceTypesResponse (Prelude.Maybe Prelude.Text)
getVpnConnectionDeviceTypesResponse_nextToken :: Lens' GetVpnConnectionDeviceTypesResponse (Maybe Text)
getVpnConnectionDeviceTypesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpnConnectionDeviceTypesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetVpnConnectionDeviceTypesResponse' :: GetVpnConnectionDeviceTypesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetVpnConnectionDeviceTypesResponse
s@GetVpnConnectionDeviceTypesResponse' {} Maybe Text
a -> GetVpnConnectionDeviceTypesResponse
s {$sel:nextToken:GetVpnConnectionDeviceTypesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetVpnConnectionDeviceTypesResponse)

-- | List of customer gateway devices that have a sample configuration file
-- available for use.
getVpnConnectionDeviceTypesResponse_vpnConnectionDeviceTypes :: Lens.Lens' GetVpnConnectionDeviceTypesResponse (Prelude.Maybe [VpnConnectionDeviceType])
getVpnConnectionDeviceTypesResponse_vpnConnectionDeviceTypes :: Lens'
  GetVpnConnectionDeviceTypesResponse
  (Maybe [VpnConnectionDeviceType])
getVpnConnectionDeviceTypesResponse_vpnConnectionDeviceTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpnConnectionDeviceTypesResponse' {Maybe [VpnConnectionDeviceType]
vpnConnectionDeviceTypes :: Maybe [VpnConnectionDeviceType]
$sel:vpnConnectionDeviceTypes:GetVpnConnectionDeviceTypesResponse' :: GetVpnConnectionDeviceTypesResponse
-> Maybe [VpnConnectionDeviceType]
vpnConnectionDeviceTypes} -> Maybe [VpnConnectionDeviceType]
vpnConnectionDeviceTypes) (\s :: GetVpnConnectionDeviceTypesResponse
s@GetVpnConnectionDeviceTypesResponse' {} Maybe [VpnConnectionDeviceType]
a -> GetVpnConnectionDeviceTypesResponse
s {$sel:vpnConnectionDeviceTypes:GetVpnConnectionDeviceTypesResponse' :: Maybe [VpnConnectionDeviceType]
vpnConnectionDeviceTypes = Maybe [VpnConnectionDeviceType]
a} :: GetVpnConnectionDeviceTypesResponse) 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.
getVpnConnectionDeviceTypesResponse_httpStatus :: Lens.Lens' GetVpnConnectionDeviceTypesResponse Prelude.Int
getVpnConnectionDeviceTypesResponse_httpStatus :: Lens' GetVpnConnectionDeviceTypesResponse Int
getVpnConnectionDeviceTypesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetVpnConnectionDeviceTypesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetVpnConnectionDeviceTypesResponse' :: GetVpnConnectionDeviceTypesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetVpnConnectionDeviceTypesResponse
s@GetVpnConnectionDeviceTypesResponse' {} Int
a -> GetVpnConnectionDeviceTypesResponse
s {$sel:httpStatus:GetVpnConnectionDeviceTypesResponse' :: Int
httpStatus = Int
a} :: GetVpnConnectionDeviceTypesResponse)

instance
  Prelude.NFData
    GetVpnConnectionDeviceTypesResponse
  where
  rnf :: GetVpnConnectionDeviceTypesResponse -> ()
rnf GetVpnConnectionDeviceTypesResponse' {Int
Maybe [VpnConnectionDeviceType]
Maybe Text
httpStatus :: Int
vpnConnectionDeviceTypes :: Maybe [VpnConnectionDeviceType]
nextToken :: Maybe Text
$sel:httpStatus:GetVpnConnectionDeviceTypesResponse' :: GetVpnConnectionDeviceTypesResponse -> Int
$sel:vpnConnectionDeviceTypes:GetVpnConnectionDeviceTypesResponse' :: GetVpnConnectionDeviceTypesResponse
-> Maybe [VpnConnectionDeviceType]
$sel:nextToken:GetVpnConnectionDeviceTypesResponse' :: GetVpnConnectionDeviceTypesResponse -> 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 [VpnConnectionDeviceType]
vpnConnectionDeviceTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus