{-# 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.DescribeVpcEndpointServiceConfigurations
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the VPC endpoint service configurations in your account (your
-- services).
--
-- This operation returns paginated results.
module Amazonka.EC2.DescribeVpcEndpointServiceConfigurations
  ( -- * Creating a Request
    DescribeVpcEndpointServiceConfigurations (..),
    newDescribeVpcEndpointServiceConfigurations,

    -- * Request Lenses
    describeVpcEndpointServiceConfigurations_dryRun,
    describeVpcEndpointServiceConfigurations_filters,
    describeVpcEndpointServiceConfigurations_maxResults,
    describeVpcEndpointServiceConfigurations_nextToken,
    describeVpcEndpointServiceConfigurations_serviceIds,

    -- * Destructuring the Response
    DescribeVpcEndpointServiceConfigurationsResponse (..),
    newDescribeVpcEndpointServiceConfigurationsResponse,

    -- * Response Lenses
    describeVpcEndpointServiceConfigurationsResponse_nextToken,
    describeVpcEndpointServiceConfigurationsResponse_serviceConfigurations,
    describeVpcEndpointServiceConfigurationsResponse_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:/ 'newDescribeVpcEndpointServiceConfigurations' smart constructor.
data DescribeVpcEndpointServiceConfigurations = DescribeVpcEndpointServiceConfigurations'
  { -- | 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@.
    DescribeVpcEndpointServiceConfigurations -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | One or more filters.
    --
    -- -   @service-name@ - The name of the service.
    --
    -- -   @service-id@ - The ID of the service.
    --
    -- -   @service-state@ - The state of the service (@Pending@ | @Available@
    --     | @Deleting@ | @Deleted@ | @Failed@).
    --
    -- -   @supported-ip-address-types@ - The IP address type (@ipv4@ |
    --     @ipv6@).
    --
    -- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
    --     resource. Use the tag key in the filter name and the tag value as
    --     the filter value. For example, to find all resources that have a tag
    --     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
    --     the filter name and @TeamA@ for the filter value.
    --
    -- -   @tag-key@ - The key of a tag assigned to the resource. Use this
    --     filter to find all resources assigned a tag with a specific key,
    --     regardless of the tag value.
    DescribeVpcEndpointServiceConfigurations -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The maximum number of results to return for the request in a single
    -- page. The remaining results of the initial request can be seen by
    -- sending another request with the returned @NextToken@ value. This value
    -- can be between 5 and 1,000; if @MaxResults@ is given a value larger than
    -- 1,000, only 1,000 results are returned.
    DescribeVpcEndpointServiceConfigurations -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The token to retrieve the next page of results.
    DescribeVpcEndpointServiceConfigurations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The IDs of one or more services.
    DescribeVpcEndpointServiceConfigurations -> Maybe [Text]
serviceIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeVpcEndpointServiceConfigurations
-> DescribeVpcEndpointServiceConfigurations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeVpcEndpointServiceConfigurations
-> DescribeVpcEndpointServiceConfigurations -> Bool
$c/= :: DescribeVpcEndpointServiceConfigurations
-> DescribeVpcEndpointServiceConfigurations -> Bool
== :: DescribeVpcEndpointServiceConfigurations
-> DescribeVpcEndpointServiceConfigurations -> Bool
$c== :: DescribeVpcEndpointServiceConfigurations
-> DescribeVpcEndpointServiceConfigurations -> Bool
Prelude.Eq, ReadPrec [DescribeVpcEndpointServiceConfigurations]
ReadPrec DescribeVpcEndpointServiceConfigurations
Int -> ReadS DescribeVpcEndpointServiceConfigurations
ReadS [DescribeVpcEndpointServiceConfigurations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeVpcEndpointServiceConfigurations]
$creadListPrec :: ReadPrec [DescribeVpcEndpointServiceConfigurations]
readPrec :: ReadPrec DescribeVpcEndpointServiceConfigurations
$creadPrec :: ReadPrec DescribeVpcEndpointServiceConfigurations
readList :: ReadS [DescribeVpcEndpointServiceConfigurations]
$creadList :: ReadS [DescribeVpcEndpointServiceConfigurations]
readsPrec :: Int -> ReadS DescribeVpcEndpointServiceConfigurations
$creadsPrec :: Int -> ReadS DescribeVpcEndpointServiceConfigurations
Prelude.Read, Int -> DescribeVpcEndpointServiceConfigurations -> ShowS
[DescribeVpcEndpointServiceConfigurations] -> ShowS
DescribeVpcEndpointServiceConfigurations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeVpcEndpointServiceConfigurations] -> ShowS
$cshowList :: [DescribeVpcEndpointServiceConfigurations] -> ShowS
show :: DescribeVpcEndpointServiceConfigurations -> String
$cshow :: DescribeVpcEndpointServiceConfigurations -> String
showsPrec :: Int -> DescribeVpcEndpointServiceConfigurations -> ShowS
$cshowsPrec :: Int -> DescribeVpcEndpointServiceConfigurations -> ShowS
Prelude.Show, forall x.
Rep DescribeVpcEndpointServiceConfigurations x
-> DescribeVpcEndpointServiceConfigurations
forall x.
DescribeVpcEndpointServiceConfigurations
-> Rep DescribeVpcEndpointServiceConfigurations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeVpcEndpointServiceConfigurations x
-> DescribeVpcEndpointServiceConfigurations
$cfrom :: forall x.
DescribeVpcEndpointServiceConfigurations
-> Rep DescribeVpcEndpointServiceConfigurations x
Prelude.Generic)

-- |
-- Create a value of 'DescribeVpcEndpointServiceConfigurations' 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', 'describeVpcEndpointServiceConfigurations_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'filters', 'describeVpcEndpointServiceConfigurations_filters' - One or more filters.
--
-- -   @service-name@ - The name of the service.
--
-- -   @service-id@ - The ID of the service.
--
-- -   @service-state@ - The state of the service (@Pending@ | @Available@
--     | @Deleting@ | @Deleted@ | @Failed@).
--
-- -   @supported-ip-address-types@ - The IP address type (@ipv4@ |
--     @ipv6@).
--
-- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
--
-- 'maxResults', 'describeVpcEndpointServiceConfigurations_maxResults' - The maximum number of results to return for the request in a single
-- page. The remaining results of the initial request can be seen by
-- sending another request with the returned @NextToken@ value. This value
-- can be between 5 and 1,000; if @MaxResults@ is given a value larger than
-- 1,000, only 1,000 results are returned.
--
-- 'nextToken', 'describeVpcEndpointServiceConfigurations_nextToken' - The token to retrieve the next page of results.
--
-- 'serviceIds', 'describeVpcEndpointServiceConfigurations_serviceIds' - The IDs of one or more services.
newDescribeVpcEndpointServiceConfigurations ::
  DescribeVpcEndpointServiceConfigurations
newDescribeVpcEndpointServiceConfigurations :: DescribeVpcEndpointServiceConfigurations
newDescribeVpcEndpointServiceConfigurations =
  DescribeVpcEndpointServiceConfigurations'
    { $sel:dryRun:DescribeVpcEndpointServiceConfigurations' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeVpcEndpointServiceConfigurations' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeVpcEndpointServiceConfigurations' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeVpcEndpointServiceConfigurations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceIds:DescribeVpcEndpointServiceConfigurations' :: Maybe [Text]
serviceIds = 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@.
describeVpcEndpointServiceConfigurations_dryRun :: Lens.Lens' DescribeVpcEndpointServiceConfigurations (Prelude.Maybe Prelude.Bool)
describeVpcEndpointServiceConfigurations_dryRun :: Lens' DescribeVpcEndpointServiceConfigurations (Maybe Bool)
describeVpcEndpointServiceConfigurations_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointServiceConfigurations' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DescribeVpcEndpointServiceConfigurations' :: DescribeVpcEndpointServiceConfigurations -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DescribeVpcEndpointServiceConfigurations
s@DescribeVpcEndpointServiceConfigurations' {} Maybe Bool
a -> DescribeVpcEndpointServiceConfigurations
s {$sel:dryRun:DescribeVpcEndpointServiceConfigurations' :: Maybe Bool
dryRun = Maybe Bool
a} :: DescribeVpcEndpointServiceConfigurations)

-- | One or more filters.
--
-- -   @service-name@ - The name of the service.
--
-- -   @service-id@ - The ID of the service.
--
-- -   @service-state@ - The state of the service (@Pending@ | @Available@
--     | @Deleting@ | @Deleted@ | @Failed@).
--
-- -   @supported-ip-address-types@ - The IP address type (@ipv4@ |
--     @ipv6@).
--
-- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
describeVpcEndpointServiceConfigurations_filters :: Lens.Lens' DescribeVpcEndpointServiceConfigurations (Prelude.Maybe [Filter])
describeVpcEndpointServiceConfigurations_filters :: Lens' DescribeVpcEndpointServiceConfigurations (Maybe [Filter])
describeVpcEndpointServiceConfigurations_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointServiceConfigurations' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeVpcEndpointServiceConfigurations' :: DescribeVpcEndpointServiceConfigurations -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeVpcEndpointServiceConfigurations
s@DescribeVpcEndpointServiceConfigurations' {} Maybe [Filter]
a -> DescribeVpcEndpointServiceConfigurations
s {$sel:filters:DescribeVpcEndpointServiceConfigurations' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeVpcEndpointServiceConfigurations) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

-- | The IDs of one or more services.
describeVpcEndpointServiceConfigurations_serviceIds :: Lens.Lens' DescribeVpcEndpointServiceConfigurations (Prelude.Maybe [Prelude.Text])
describeVpcEndpointServiceConfigurations_serviceIds :: Lens' DescribeVpcEndpointServiceConfigurations (Maybe [Text])
describeVpcEndpointServiceConfigurations_serviceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointServiceConfigurations' {Maybe [Text]
serviceIds :: Maybe [Text]
$sel:serviceIds:DescribeVpcEndpointServiceConfigurations' :: DescribeVpcEndpointServiceConfigurations -> Maybe [Text]
serviceIds} -> Maybe [Text]
serviceIds) (\s :: DescribeVpcEndpointServiceConfigurations
s@DescribeVpcEndpointServiceConfigurations' {} Maybe [Text]
a -> DescribeVpcEndpointServiceConfigurations
s {$sel:serviceIds:DescribeVpcEndpointServiceConfigurations' :: Maybe [Text]
serviceIds = Maybe [Text]
a} :: DescribeVpcEndpointServiceConfigurations) 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

instance
  Core.AWSPager
    DescribeVpcEndpointServiceConfigurations
  where
  page :: DescribeVpcEndpointServiceConfigurations
-> AWSResponse DescribeVpcEndpointServiceConfigurations
-> Maybe DescribeVpcEndpointServiceConfigurations
page DescribeVpcEndpointServiceConfigurations
rq AWSResponse DescribeVpcEndpointServiceConfigurations
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeVpcEndpointServiceConfigurations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeVpcEndpointServiceConfigurationsResponse (Maybe Text)
describeVpcEndpointServiceConfigurationsResponse_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 DescribeVpcEndpointServiceConfigurations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  DescribeVpcEndpointServiceConfigurationsResponse
  (Maybe [ServiceConfiguration])
describeVpcEndpointServiceConfigurationsResponse_serviceConfigurations
            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.$ DescribeVpcEndpointServiceConfigurations
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeVpcEndpointServiceConfigurations (Maybe Text)
describeVpcEndpointServiceConfigurations_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeVpcEndpointServiceConfigurations
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeVpcEndpointServiceConfigurationsResponse (Maybe Text)
describeVpcEndpointServiceConfigurationsResponse_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
    DescribeVpcEndpointServiceConfigurations
  where
  type
    AWSResponse
      DescribeVpcEndpointServiceConfigurations =
      DescribeVpcEndpointServiceConfigurationsResponse
  request :: (Service -> Service)
-> DescribeVpcEndpointServiceConfigurations
-> Request DescribeVpcEndpointServiceConfigurations
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 DescribeVpcEndpointServiceConfigurations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeVpcEndpointServiceConfigurations)))
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 [ServiceConfiguration]
-> Int
-> DescribeVpcEndpointServiceConfigurationsResponse
DescribeVpcEndpointServiceConfigurationsResponse'
            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
"serviceConfigurationSet"
                            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
    DescribeVpcEndpointServiceConfigurations
  where
  hashWithSalt :: Int -> DescribeVpcEndpointServiceConfigurations -> Int
hashWithSalt
    Int
_salt
    DescribeVpcEndpointServiceConfigurations' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
serviceIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:serviceIds:DescribeVpcEndpointServiceConfigurations' :: DescribeVpcEndpointServiceConfigurations -> Maybe [Text]
$sel:nextToken:DescribeVpcEndpointServiceConfigurations' :: DescribeVpcEndpointServiceConfigurations -> Maybe Text
$sel:maxResults:DescribeVpcEndpointServiceConfigurations' :: DescribeVpcEndpointServiceConfigurations -> Maybe Int
$sel:filters:DescribeVpcEndpointServiceConfigurations' :: DescribeVpcEndpointServiceConfigurations -> Maybe [Filter]
$sel:dryRun:DescribeVpcEndpointServiceConfigurations' :: DescribeVpcEndpointServiceConfigurations -> Maybe Bool
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
serviceIds

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

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

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

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

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

-- |
-- Create a value of 'DescribeVpcEndpointServiceConfigurationsResponse' 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', 'describeVpcEndpointServiceConfigurationsResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'serviceConfigurations', 'describeVpcEndpointServiceConfigurationsResponse_serviceConfigurations' - Information about one or more services.
--
-- 'httpStatus', 'describeVpcEndpointServiceConfigurationsResponse_httpStatus' - The response's http status code.
newDescribeVpcEndpointServiceConfigurationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeVpcEndpointServiceConfigurationsResponse
newDescribeVpcEndpointServiceConfigurationsResponse :: Int -> DescribeVpcEndpointServiceConfigurationsResponse
newDescribeVpcEndpointServiceConfigurationsResponse
  Int
pHttpStatus_ =
    DescribeVpcEndpointServiceConfigurationsResponse'
      { $sel:nextToken:DescribeVpcEndpointServiceConfigurationsResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:serviceConfigurations:DescribeVpcEndpointServiceConfigurationsResponse' :: Maybe [ServiceConfiguration]
serviceConfigurations =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeVpcEndpointServiceConfigurationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

-- | Information about one or more services.
describeVpcEndpointServiceConfigurationsResponse_serviceConfigurations :: Lens.Lens' DescribeVpcEndpointServiceConfigurationsResponse (Prelude.Maybe [ServiceConfiguration])
describeVpcEndpointServiceConfigurationsResponse_serviceConfigurations :: Lens'
  DescribeVpcEndpointServiceConfigurationsResponse
  (Maybe [ServiceConfiguration])
describeVpcEndpointServiceConfigurationsResponse_serviceConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointServiceConfigurationsResponse' {Maybe [ServiceConfiguration]
serviceConfigurations :: Maybe [ServiceConfiguration]
$sel:serviceConfigurations:DescribeVpcEndpointServiceConfigurationsResponse' :: DescribeVpcEndpointServiceConfigurationsResponse
-> Maybe [ServiceConfiguration]
serviceConfigurations} -> Maybe [ServiceConfiguration]
serviceConfigurations) (\s :: DescribeVpcEndpointServiceConfigurationsResponse
s@DescribeVpcEndpointServiceConfigurationsResponse' {} Maybe [ServiceConfiguration]
a -> DescribeVpcEndpointServiceConfigurationsResponse
s {$sel:serviceConfigurations:DescribeVpcEndpointServiceConfigurationsResponse' :: Maybe [ServiceConfiguration]
serviceConfigurations = Maybe [ServiceConfiguration]
a} :: DescribeVpcEndpointServiceConfigurationsResponse) 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.
describeVpcEndpointServiceConfigurationsResponse_httpStatus :: Lens.Lens' DescribeVpcEndpointServiceConfigurationsResponse Prelude.Int
describeVpcEndpointServiceConfigurationsResponse_httpStatus :: Lens' DescribeVpcEndpointServiceConfigurationsResponse Int
describeVpcEndpointServiceConfigurationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeVpcEndpointServiceConfigurationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeVpcEndpointServiceConfigurationsResponse' :: DescribeVpcEndpointServiceConfigurationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeVpcEndpointServiceConfigurationsResponse
s@DescribeVpcEndpointServiceConfigurationsResponse' {} Int
a -> DescribeVpcEndpointServiceConfigurationsResponse
s {$sel:httpStatus:DescribeVpcEndpointServiceConfigurationsResponse' :: Int
httpStatus = Int
a} :: DescribeVpcEndpointServiceConfigurationsResponse)

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