{-# 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.ModifyVpcEndpoint
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Modifies attributes of a specified VPC endpoint. The attributes that you
-- can modify depend on the type of VPC endpoint (interface, gateway, or
-- Gateway Load Balancer). For more information, see the
-- <https://docs.aws.amazon.com/vpc/latest/privatelink/ Amazon Web Services PrivateLink Guide>.
module Amazonka.EC2.ModifyVpcEndpoint
  ( -- * Creating a Request
    ModifyVpcEndpoint (..),
    newModifyVpcEndpoint,

    -- * Request Lenses
    modifyVpcEndpoint_addRouteTableIds,
    modifyVpcEndpoint_addSecurityGroupIds,
    modifyVpcEndpoint_addSubnetIds,
    modifyVpcEndpoint_dnsOptions,
    modifyVpcEndpoint_dryRun,
    modifyVpcEndpoint_ipAddressType,
    modifyVpcEndpoint_policyDocument,
    modifyVpcEndpoint_privateDnsEnabled,
    modifyVpcEndpoint_removeRouteTableIds,
    modifyVpcEndpoint_removeSecurityGroupIds,
    modifyVpcEndpoint_removeSubnetIds,
    modifyVpcEndpoint_resetPolicy,
    modifyVpcEndpoint_vpcEndpointId,

    -- * Destructuring the Response
    ModifyVpcEndpointResponse (..),
    newModifyVpcEndpointResponse,

    -- * Response Lenses
    modifyVpcEndpointResponse_return,
    modifyVpcEndpointResponse_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

-- | Contains the parameters for ModifyVpcEndpoint.
--
-- /See:/ 'newModifyVpcEndpoint' smart constructor.
data ModifyVpcEndpoint = ModifyVpcEndpoint'
  { -- | (Gateway endpoint) One or more route tables IDs to associate with the
    -- endpoint.
    ModifyVpcEndpoint -> Maybe [Text]
addRouteTableIds :: Prelude.Maybe [Prelude.Text],
    -- | (Interface endpoint) One or more security group IDs to associate with
    -- the network interface.
    ModifyVpcEndpoint -> Maybe [Text]
addSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | (Interface and Gateway Load Balancer endpoints) One or more subnet IDs
    -- in which to serve the endpoint. For a Gateway Load Balancer endpoint,
    -- you can specify only one subnet.
    ModifyVpcEndpoint -> Maybe [Text]
addSubnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The DNS options for the endpoint.
    ModifyVpcEndpoint -> Maybe DnsOptionsSpecification
dnsOptions :: Prelude.Maybe DnsOptionsSpecification,
    -- | 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@.
    ModifyVpcEndpoint -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The IP address type for the endpoint.
    ModifyVpcEndpoint -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
    -- | (Interface and gateway endpoints) A policy to attach to the endpoint
    -- that controls access to the service. The policy must be in valid JSON
    -- format.
    ModifyVpcEndpoint -> Maybe Text
policyDocument :: Prelude.Maybe Prelude.Text,
    -- | (Interface endpoint) Indicates whether a private hosted zone is
    -- associated with the VPC.
    ModifyVpcEndpoint -> Maybe Bool
privateDnsEnabled :: Prelude.Maybe Prelude.Bool,
    -- | (Gateway endpoint) One or more route table IDs to disassociate from the
    -- endpoint.
    ModifyVpcEndpoint -> Maybe [Text]
removeRouteTableIds :: Prelude.Maybe [Prelude.Text],
    -- | (Interface endpoint) One or more security group IDs to disassociate from
    -- the network interface.
    ModifyVpcEndpoint -> Maybe [Text]
removeSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | (Interface endpoint) One or more subnets IDs in which to remove the
    -- endpoint.
    ModifyVpcEndpoint -> Maybe [Text]
removeSubnetIds :: Prelude.Maybe [Prelude.Text],
    -- | (Gateway endpoint) Specify @true@ to reset the policy document to the
    -- default policy. The default policy allows full access to the service.
    ModifyVpcEndpoint -> Maybe Bool
resetPolicy :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the endpoint.
    ModifyVpcEndpoint -> Text
vpcEndpointId :: Prelude.Text
  }
  deriving (ModifyVpcEndpoint -> ModifyVpcEndpoint -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyVpcEndpoint -> ModifyVpcEndpoint -> Bool
$c/= :: ModifyVpcEndpoint -> ModifyVpcEndpoint -> Bool
== :: ModifyVpcEndpoint -> ModifyVpcEndpoint -> Bool
$c== :: ModifyVpcEndpoint -> ModifyVpcEndpoint -> Bool
Prelude.Eq, ReadPrec [ModifyVpcEndpoint]
ReadPrec ModifyVpcEndpoint
Int -> ReadS ModifyVpcEndpoint
ReadS [ModifyVpcEndpoint]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyVpcEndpoint]
$creadListPrec :: ReadPrec [ModifyVpcEndpoint]
readPrec :: ReadPrec ModifyVpcEndpoint
$creadPrec :: ReadPrec ModifyVpcEndpoint
readList :: ReadS [ModifyVpcEndpoint]
$creadList :: ReadS [ModifyVpcEndpoint]
readsPrec :: Int -> ReadS ModifyVpcEndpoint
$creadsPrec :: Int -> ReadS ModifyVpcEndpoint
Prelude.Read, Int -> ModifyVpcEndpoint -> ShowS
[ModifyVpcEndpoint] -> ShowS
ModifyVpcEndpoint -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyVpcEndpoint] -> ShowS
$cshowList :: [ModifyVpcEndpoint] -> ShowS
show :: ModifyVpcEndpoint -> String
$cshow :: ModifyVpcEndpoint -> String
showsPrec :: Int -> ModifyVpcEndpoint -> ShowS
$cshowsPrec :: Int -> ModifyVpcEndpoint -> ShowS
Prelude.Show, forall x. Rep ModifyVpcEndpoint x -> ModifyVpcEndpoint
forall x. ModifyVpcEndpoint -> Rep ModifyVpcEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyVpcEndpoint x -> ModifyVpcEndpoint
$cfrom :: forall x. ModifyVpcEndpoint -> Rep ModifyVpcEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'ModifyVpcEndpoint' 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:
--
-- 'addRouteTableIds', 'modifyVpcEndpoint_addRouteTableIds' - (Gateway endpoint) One or more route tables IDs to associate with the
-- endpoint.
--
-- 'addSecurityGroupIds', 'modifyVpcEndpoint_addSecurityGroupIds' - (Interface endpoint) One or more security group IDs to associate with
-- the network interface.
--
-- 'addSubnetIds', 'modifyVpcEndpoint_addSubnetIds' - (Interface and Gateway Load Balancer endpoints) One or more subnet IDs
-- in which to serve the endpoint. For a Gateway Load Balancer endpoint,
-- you can specify only one subnet.
--
-- 'dnsOptions', 'modifyVpcEndpoint_dnsOptions' - The DNS options for the endpoint.
--
-- 'dryRun', 'modifyVpcEndpoint_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@.
--
-- 'ipAddressType', 'modifyVpcEndpoint_ipAddressType' - The IP address type for the endpoint.
--
-- 'policyDocument', 'modifyVpcEndpoint_policyDocument' - (Interface and gateway endpoints) A policy to attach to the endpoint
-- that controls access to the service. The policy must be in valid JSON
-- format.
--
-- 'privateDnsEnabled', 'modifyVpcEndpoint_privateDnsEnabled' - (Interface endpoint) Indicates whether a private hosted zone is
-- associated with the VPC.
--
-- 'removeRouteTableIds', 'modifyVpcEndpoint_removeRouteTableIds' - (Gateway endpoint) One or more route table IDs to disassociate from the
-- endpoint.
--
-- 'removeSecurityGroupIds', 'modifyVpcEndpoint_removeSecurityGroupIds' - (Interface endpoint) One or more security group IDs to disassociate from
-- the network interface.
--
-- 'removeSubnetIds', 'modifyVpcEndpoint_removeSubnetIds' - (Interface endpoint) One or more subnets IDs in which to remove the
-- endpoint.
--
-- 'resetPolicy', 'modifyVpcEndpoint_resetPolicy' - (Gateway endpoint) Specify @true@ to reset the policy document to the
-- default policy. The default policy allows full access to the service.
--
-- 'vpcEndpointId', 'modifyVpcEndpoint_vpcEndpointId' - The ID of the endpoint.
newModifyVpcEndpoint ::
  -- | 'vpcEndpointId'
  Prelude.Text ->
  ModifyVpcEndpoint
newModifyVpcEndpoint :: Text -> ModifyVpcEndpoint
newModifyVpcEndpoint Text
pVpcEndpointId_ =
  ModifyVpcEndpoint'
    { $sel:addRouteTableIds:ModifyVpcEndpoint' :: Maybe [Text]
addRouteTableIds =
        forall a. Maybe a
Prelude.Nothing,
      $sel:addSecurityGroupIds:ModifyVpcEndpoint' :: Maybe [Text]
addSecurityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:addSubnetIds:ModifyVpcEndpoint' :: Maybe [Text]
addSubnetIds = forall a. Maybe a
Prelude.Nothing,
      $sel:dnsOptions:ModifyVpcEndpoint' :: Maybe DnsOptionsSpecification
dnsOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:dryRun:ModifyVpcEndpoint' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:ipAddressType:ModifyVpcEndpoint' :: Maybe IpAddressType
ipAddressType = forall a. Maybe a
Prelude.Nothing,
      $sel:policyDocument:ModifyVpcEndpoint' :: Maybe Text
policyDocument = forall a. Maybe a
Prelude.Nothing,
      $sel:privateDnsEnabled:ModifyVpcEndpoint' :: Maybe Bool
privateDnsEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:removeRouteTableIds:ModifyVpcEndpoint' :: Maybe [Text]
removeRouteTableIds = forall a. Maybe a
Prelude.Nothing,
      $sel:removeSecurityGroupIds:ModifyVpcEndpoint' :: Maybe [Text]
removeSecurityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:removeSubnetIds:ModifyVpcEndpoint' :: Maybe [Text]
removeSubnetIds = forall a. Maybe a
Prelude.Nothing,
      $sel:resetPolicy:ModifyVpcEndpoint' :: Maybe Bool
resetPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcEndpointId:ModifyVpcEndpoint' :: Text
vpcEndpointId = Text
pVpcEndpointId_
    }

-- | (Gateway endpoint) One or more route tables IDs to associate with the
-- endpoint.
modifyVpcEndpoint_addRouteTableIds :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe [Prelude.Text])
modifyVpcEndpoint_addRouteTableIds :: Lens' ModifyVpcEndpoint (Maybe [Text])
modifyVpcEndpoint_addRouteTableIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe [Text]
addRouteTableIds :: Maybe [Text]
$sel:addRouteTableIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
addRouteTableIds} -> Maybe [Text]
addRouteTableIds) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe [Text]
a -> ModifyVpcEndpoint
s {$sel:addRouteTableIds:ModifyVpcEndpoint' :: Maybe [Text]
addRouteTableIds = Maybe [Text]
a} :: ModifyVpcEndpoint) 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

-- | (Interface endpoint) One or more security group IDs to associate with
-- the network interface.
modifyVpcEndpoint_addSecurityGroupIds :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe [Prelude.Text])
modifyVpcEndpoint_addSecurityGroupIds :: Lens' ModifyVpcEndpoint (Maybe [Text])
modifyVpcEndpoint_addSecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe [Text]
addSecurityGroupIds :: Maybe [Text]
$sel:addSecurityGroupIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
addSecurityGroupIds} -> Maybe [Text]
addSecurityGroupIds) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe [Text]
a -> ModifyVpcEndpoint
s {$sel:addSecurityGroupIds:ModifyVpcEndpoint' :: Maybe [Text]
addSecurityGroupIds = Maybe [Text]
a} :: ModifyVpcEndpoint) 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

-- | (Interface and Gateway Load Balancer endpoints) One or more subnet IDs
-- in which to serve the endpoint. For a Gateway Load Balancer endpoint,
-- you can specify only one subnet.
modifyVpcEndpoint_addSubnetIds :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe [Prelude.Text])
modifyVpcEndpoint_addSubnetIds :: Lens' ModifyVpcEndpoint (Maybe [Text])
modifyVpcEndpoint_addSubnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe [Text]
addSubnetIds :: Maybe [Text]
$sel:addSubnetIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
addSubnetIds} -> Maybe [Text]
addSubnetIds) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe [Text]
a -> ModifyVpcEndpoint
s {$sel:addSubnetIds:ModifyVpcEndpoint' :: Maybe [Text]
addSubnetIds = Maybe [Text]
a} :: ModifyVpcEndpoint) 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 DNS options for the endpoint.
modifyVpcEndpoint_dnsOptions :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe DnsOptionsSpecification)
modifyVpcEndpoint_dnsOptions :: Lens' ModifyVpcEndpoint (Maybe DnsOptionsSpecification)
modifyVpcEndpoint_dnsOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe DnsOptionsSpecification
dnsOptions :: Maybe DnsOptionsSpecification
$sel:dnsOptions:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe DnsOptionsSpecification
dnsOptions} -> Maybe DnsOptionsSpecification
dnsOptions) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe DnsOptionsSpecification
a -> ModifyVpcEndpoint
s {$sel:dnsOptions:ModifyVpcEndpoint' :: Maybe DnsOptionsSpecification
dnsOptions = Maybe DnsOptionsSpecification
a} :: ModifyVpcEndpoint)

-- | 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@.
modifyVpcEndpoint_dryRun :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe Prelude.Bool)
modifyVpcEndpoint_dryRun :: Lens' ModifyVpcEndpoint (Maybe Bool)
modifyVpcEndpoint_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe Bool
a -> ModifyVpcEndpoint
s {$sel:dryRun:ModifyVpcEndpoint' :: Maybe Bool
dryRun = Maybe Bool
a} :: ModifyVpcEndpoint)

-- | The IP address type for the endpoint.
modifyVpcEndpoint_ipAddressType :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe IpAddressType)
modifyVpcEndpoint_ipAddressType :: Lens' ModifyVpcEndpoint (Maybe IpAddressType)
modifyVpcEndpoint_ipAddressType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe IpAddressType
a -> ModifyVpcEndpoint
s {$sel:ipAddressType:ModifyVpcEndpoint' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: ModifyVpcEndpoint)

-- | (Interface and gateway endpoints) A policy to attach to the endpoint
-- that controls access to the service. The policy must be in valid JSON
-- format.
modifyVpcEndpoint_policyDocument :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe Prelude.Text)
modifyVpcEndpoint_policyDocument :: Lens' ModifyVpcEndpoint (Maybe Text)
modifyVpcEndpoint_policyDocument = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe Text
policyDocument :: Maybe Text
$sel:policyDocument:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Text
policyDocument} -> Maybe Text
policyDocument) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe Text
a -> ModifyVpcEndpoint
s {$sel:policyDocument:ModifyVpcEndpoint' :: Maybe Text
policyDocument = Maybe Text
a} :: ModifyVpcEndpoint)

-- | (Interface endpoint) Indicates whether a private hosted zone is
-- associated with the VPC.
modifyVpcEndpoint_privateDnsEnabled :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe Prelude.Bool)
modifyVpcEndpoint_privateDnsEnabled :: Lens' ModifyVpcEndpoint (Maybe Bool)
modifyVpcEndpoint_privateDnsEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe Bool
privateDnsEnabled :: Maybe Bool
$sel:privateDnsEnabled:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
privateDnsEnabled} -> Maybe Bool
privateDnsEnabled) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe Bool
a -> ModifyVpcEndpoint
s {$sel:privateDnsEnabled:ModifyVpcEndpoint' :: Maybe Bool
privateDnsEnabled = Maybe Bool
a} :: ModifyVpcEndpoint)

-- | (Gateway endpoint) One or more route table IDs to disassociate from the
-- endpoint.
modifyVpcEndpoint_removeRouteTableIds :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe [Prelude.Text])
modifyVpcEndpoint_removeRouteTableIds :: Lens' ModifyVpcEndpoint (Maybe [Text])
modifyVpcEndpoint_removeRouteTableIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe [Text]
removeRouteTableIds :: Maybe [Text]
$sel:removeRouteTableIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
removeRouteTableIds} -> Maybe [Text]
removeRouteTableIds) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe [Text]
a -> ModifyVpcEndpoint
s {$sel:removeRouteTableIds:ModifyVpcEndpoint' :: Maybe [Text]
removeRouteTableIds = Maybe [Text]
a} :: ModifyVpcEndpoint) 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

-- | (Interface endpoint) One or more security group IDs to disassociate from
-- the network interface.
modifyVpcEndpoint_removeSecurityGroupIds :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe [Prelude.Text])
modifyVpcEndpoint_removeSecurityGroupIds :: Lens' ModifyVpcEndpoint (Maybe [Text])
modifyVpcEndpoint_removeSecurityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe [Text]
removeSecurityGroupIds :: Maybe [Text]
$sel:removeSecurityGroupIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
removeSecurityGroupIds} -> Maybe [Text]
removeSecurityGroupIds) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe [Text]
a -> ModifyVpcEndpoint
s {$sel:removeSecurityGroupIds:ModifyVpcEndpoint' :: Maybe [Text]
removeSecurityGroupIds = Maybe [Text]
a} :: ModifyVpcEndpoint) 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

-- | (Interface endpoint) One or more subnets IDs in which to remove the
-- endpoint.
modifyVpcEndpoint_removeSubnetIds :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe [Prelude.Text])
modifyVpcEndpoint_removeSubnetIds :: Lens' ModifyVpcEndpoint (Maybe [Text])
modifyVpcEndpoint_removeSubnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe [Text]
removeSubnetIds :: Maybe [Text]
$sel:removeSubnetIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
removeSubnetIds} -> Maybe [Text]
removeSubnetIds) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe [Text]
a -> ModifyVpcEndpoint
s {$sel:removeSubnetIds:ModifyVpcEndpoint' :: Maybe [Text]
removeSubnetIds = Maybe [Text]
a} :: ModifyVpcEndpoint) 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

-- | (Gateway endpoint) Specify @true@ to reset the policy document to the
-- default policy. The default policy allows full access to the service.
modifyVpcEndpoint_resetPolicy :: Lens.Lens' ModifyVpcEndpoint (Prelude.Maybe Prelude.Bool)
modifyVpcEndpoint_resetPolicy :: Lens' ModifyVpcEndpoint (Maybe Bool)
modifyVpcEndpoint_resetPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Maybe Bool
resetPolicy :: Maybe Bool
$sel:resetPolicy:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
resetPolicy} -> Maybe Bool
resetPolicy) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Maybe Bool
a -> ModifyVpcEndpoint
s {$sel:resetPolicy:ModifyVpcEndpoint' :: Maybe Bool
resetPolicy = Maybe Bool
a} :: ModifyVpcEndpoint)

-- | The ID of the endpoint.
modifyVpcEndpoint_vpcEndpointId :: Lens.Lens' ModifyVpcEndpoint Prelude.Text
modifyVpcEndpoint_vpcEndpointId :: Lens' ModifyVpcEndpoint Text
modifyVpcEndpoint_vpcEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpoint' {Text
vpcEndpointId :: Text
$sel:vpcEndpointId:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Text
vpcEndpointId} -> Text
vpcEndpointId) (\s :: ModifyVpcEndpoint
s@ModifyVpcEndpoint' {} Text
a -> ModifyVpcEndpoint
s {$sel:vpcEndpointId:ModifyVpcEndpoint' :: Text
vpcEndpointId = Text
a} :: ModifyVpcEndpoint)

instance Core.AWSRequest ModifyVpcEndpoint where
  type
    AWSResponse ModifyVpcEndpoint =
      ModifyVpcEndpointResponse
  request :: (Service -> Service)
-> ModifyVpcEndpoint -> Request ModifyVpcEndpoint
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 ModifyVpcEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyVpcEndpoint)))
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 Bool -> Int -> ModifyVpcEndpointResponse
ModifyVpcEndpointResponse'
            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
"return")
            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 ModifyVpcEndpoint where
  hashWithSalt :: Int -> ModifyVpcEndpoint -> Int
hashWithSalt Int
_salt ModifyVpcEndpoint' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe DnsOptionsSpecification
Maybe IpAddressType
Text
vpcEndpointId :: Text
resetPolicy :: Maybe Bool
removeSubnetIds :: Maybe [Text]
removeSecurityGroupIds :: Maybe [Text]
removeRouteTableIds :: Maybe [Text]
privateDnsEnabled :: Maybe Bool
policyDocument :: Maybe Text
ipAddressType :: Maybe IpAddressType
dryRun :: Maybe Bool
dnsOptions :: Maybe DnsOptionsSpecification
addSubnetIds :: Maybe [Text]
addSecurityGroupIds :: Maybe [Text]
addRouteTableIds :: Maybe [Text]
$sel:vpcEndpointId:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Text
$sel:resetPolicy:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:removeSubnetIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:removeSecurityGroupIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:removeRouteTableIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:privateDnsEnabled:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:policyDocument:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Text
$sel:ipAddressType:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe IpAddressType
$sel:dryRun:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:dnsOptions:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe DnsOptionsSpecification
$sel:addSubnetIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:addSecurityGroupIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:addRouteTableIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
addRouteTableIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
addSecurityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
addSubnetIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DnsOptionsSpecification
dnsOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpAddressType
ipAddressType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
policyDocument
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
privateDnsEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
removeRouteTableIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
removeSecurityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
removeSubnetIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
resetPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpcEndpointId

instance Prelude.NFData ModifyVpcEndpoint where
  rnf :: ModifyVpcEndpoint -> ()
rnf ModifyVpcEndpoint' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe DnsOptionsSpecification
Maybe IpAddressType
Text
vpcEndpointId :: Text
resetPolicy :: Maybe Bool
removeSubnetIds :: Maybe [Text]
removeSecurityGroupIds :: Maybe [Text]
removeRouteTableIds :: Maybe [Text]
privateDnsEnabled :: Maybe Bool
policyDocument :: Maybe Text
ipAddressType :: Maybe IpAddressType
dryRun :: Maybe Bool
dnsOptions :: Maybe DnsOptionsSpecification
addSubnetIds :: Maybe [Text]
addSecurityGroupIds :: Maybe [Text]
addRouteTableIds :: Maybe [Text]
$sel:vpcEndpointId:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Text
$sel:resetPolicy:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:removeSubnetIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:removeSecurityGroupIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:removeRouteTableIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:privateDnsEnabled:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:policyDocument:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Text
$sel:ipAddressType:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe IpAddressType
$sel:dryRun:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:dnsOptions:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe DnsOptionsSpecification
$sel:addSubnetIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:addSecurityGroupIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:addRouteTableIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
addRouteTableIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
addSecurityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
addSubnetIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DnsOptionsSpecification
dnsOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 IpAddressType
ipAddressType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
policyDocument
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
privateDnsEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
removeRouteTableIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
removeSecurityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
removeSubnetIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
resetPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vpcEndpointId

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

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

instance Data.ToQuery ModifyVpcEndpoint where
  toQuery :: ModifyVpcEndpoint -> QueryString
toQuery ModifyVpcEndpoint' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe DnsOptionsSpecification
Maybe IpAddressType
Text
vpcEndpointId :: Text
resetPolicy :: Maybe Bool
removeSubnetIds :: Maybe [Text]
removeSecurityGroupIds :: Maybe [Text]
removeRouteTableIds :: Maybe [Text]
privateDnsEnabled :: Maybe Bool
policyDocument :: Maybe Text
ipAddressType :: Maybe IpAddressType
dryRun :: Maybe Bool
dnsOptions :: Maybe DnsOptionsSpecification
addSubnetIds :: Maybe [Text]
addSecurityGroupIds :: Maybe [Text]
addRouteTableIds :: Maybe [Text]
$sel:vpcEndpointId:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Text
$sel:resetPolicy:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:removeSubnetIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:removeSecurityGroupIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:removeRouteTableIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:privateDnsEnabled:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:policyDocument:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Text
$sel:ipAddressType:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe IpAddressType
$sel:dryRun:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe Bool
$sel:dnsOptions:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe DnsOptionsSpecification
$sel:addSubnetIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:addSecurityGroupIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
$sel:addRouteTableIds:ModifyVpcEndpoint' :: ModifyVpcEndpoint -> Maybe [Text]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ModifyVpcEndpoint" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"AddRouteTableId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
addRouteTableIds
          ),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"AddSecurityGroupId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
addSecurityGroupIds
          ),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"AddSubnetId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
addSubnetIds
          ),
        ByteString
"DnsOptions" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe DnsOptionsSpecification
dnsOptions,
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        ByteString
"IpAddressType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe IpAddressType
ipAddressType,
        ByteString
"PolicyDocument" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
policyDocument,
        ByteString
"PrivateDnsEnabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
privateDnsEnabled,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"RemoveRouteTableId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
removeRouteTableIds
          ),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"RemoveSecurityGroupId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
removeSecurityGroupIds
          ),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"RemoveSubnetId"
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
removeSubnetIds
          ),
        ByteString
"ResetPolicy" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
resetPolicy,
        ByteString
"VpcEndpointId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
vpcEndpointId
      ]

-- | /See:/ 'newModifyVpcEndpointResponse' smart constructor.
data ModifyVpcEndpointResponse = ModifyVpcEndpointResponse'
  { -- | Returns @true@ if the request succeeds; otherwise, it returns an error.
    ModifyVpcEndpointResponse -> Maybe Bool
return' :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    ModifyVpcEndpointResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ModifyVpcEndpointResponse -> ModifyVpcEndpointResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyVpcEndpointResponse -> ModifyVpcEndpointResponse -> Bool
$c/= :: ModifyVpcEndpointResponse -> ModifyVpcEndpointResponse -> Bool
== :: ModifyVpcEndpointResponse -> ModifyVpcEndpointResponse -> Bool
$c== :: ModifyVpcEndpointResponse -> ModifyVpcEndpointResponse -> Bool
Prelude.Eq, ReadPrec [ModifyVpcEndpointResponse]
ReadPrec ModifyVpcEndpointResponse
Int -> ReadS ModifyVpcEndpointResponse
ReadS [ModifyVpcEndpointResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyVpcEndpointResponse]
$creadListPrec :: ReadPrec [ModifyVpcEndpointResponse]
readPrec :: ReadPrec ModifyVpcEndpointResponse
$creadPrec :: ReadPrec ModifyVpcEndpointResponse
readList :: ReadS [ModifyVpcEndpointResponse]
$creadList :: ReadS [ModifyVpcEndpointResponse]
readsPrec :: Int -> ReadS ModifyVpcEndpointResponse
$creadsPrec :: Int -> ReadS ModifyVpcEndpointResponse
Prelude.Read, Int -> ModifyVpcEndpointResponse -> ShowS
[ModifyVpcEndpointResponse] -> ShowS
ModifyVpcEndpointResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyVpcEndpointResponse] -> ShowS
$cshowList :: [ModifyVpcEndpointResponse] -> ShowS
show :: ModifyVpcEndpointResponse -> String
$cshow :: ModifyVpcEndpointResponse -> String
showsPrec :: Int -> ModifyVpcEndpointResponse -> ShowS
$cshowsPrec :: Int -> ModifyVpcEndpointResponse -> ShowS
Prelude.Show, forall x.
Rep ModifyVpcEndpointResponse x -> ModifyVpcEndpointResponse
forall x.
ModifyVpcEndpointResponse -> Rep ModifyVpcEndpointResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyVpcEndpointResponse x -> ModifyVpcEndpointResponse
$cfrom :: forall x.
ModifyVpcEndpointResponse -> Rep ModifyVpcEndpointResponse x
Prelude.Generic)

-- |
-- Create a value of 'ModifyVpcEndpointResponse' 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:
--
-- 'return'', 'modifyVpcEndpointResponse_return' - Returns @true@ if the request succeeds; otherwise, it returns an error.
--
-- 'httpStatus', 'modifyVpcEndpointResponse_httpStatus' - The response's http status code.
newModifyVpcEndpointResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyVpcEndpointResponse
newModifyVpcEndpointResponse :: Int -> ModifyVpcEndpointResponse
newModifyVpcEndpointResponse Int
pHttpStatus_ =
  ModifyVpcEndpointResponse'
    { $sel:return':ModifyVpcEndpointResponse' :: Maybe Bool
return' =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyVpcEndpointResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Returns @true@ if the request succeeds; otherwise, it returns an error.
modifyVpcEndpointResponse_return :: Lens.Lens' ModifyVpcEndpointResponse (Prelude.Maybe Prelude.Bool)
modifyVpcEndpointResponse_return :: Lens' ModifyVpcEndpointResponse (Maybe Bool)
modifyVpcEndpointResponse_return = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyVpcEndpointResponse' {Maybe Bool
return' :: Maybe Bool
$sel:return':ModifyVpcEndpointResponse' :: ModifyVpcEndpointResponse -> Maybe Bool
return'} -> Maybe Bool
return') (\s :: ModifyVpcEndpointResponse
s@ModifyVpcEndpointResponse' {} Maybe Bool
a -> ModifyVpcEndpointResponse
s {$sel:return':ModifyVpcEndpointResponse' :: Maybe Bool
return' = Maybe Bool
a} :: ModifyVpcEndpointResponse)

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

instance Prelude.NFData ModifyVpcEndpointResponse where
  rnf :: ModifyVpcEndpointResponse -> ()
rnf ModifyVpcEndpointResponse' {Int
Maybe Bool
httpStatus :: Int
return' :: Maybe Bool
$sel:httpStatus:ModifyVpcEndpointResponse' :: ModifyVpcEndpointResponse -> Int
$sel:return':ModifyVpcEndpointResponse' :: ModifyVpcEndpointResponse -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
return'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus