{-# 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.AssociateVpcCidrBlock
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Associates a CIDR block with your VPC. You can associate a secondary
-- IPv4 CIDR block, an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR
-- block from an IPv6 address pool that you provisioned through bring your
-- own IP addresses
-- (<https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html BYOIP>).
-- The IPv6 CIDR block size is fixed at \/56.
--
-- You must specify one of the following in the request: an IPv4 CIDR
-- block, an IPv6 pool, or an Amazon-provided IPv6 CIDR block.
--
-- For more information about associating CIDR blocks with your VPC and
-- applicable restrictions, see
-- <https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#VPC_Sizing VPC and subnet sizing>
-- in the /Amazon Virtual Private Cloud User Guide/.
module Amazonka.EC2.AssociateVpcCidrBlock
  ( -- * Creating a Request
    AssociateVpcCidrBlock (..),
    newAssociateVpcCidrBlock,

    -- * Request Lenses
    associateVpcCidrBlock_amazonProvidedIpv6CidrBlock,
    associateVpcCidrBlock_cidrBlock,
    associateVpcCidrBlock_ipv4IpamPoolId,
    associateVpcCidrBlock_ipv4NetmaskLength,
    associateVpcCidrBlock_ipv6CidrBlock,
    associateVpcCidrBlock_ipv6CidrBlockNetworkBorderGroup,
    associateVpcCidrBlock_ipv6IpamPoolId,
    associateVpcCidrBlock_ipv6NetmaskLength,
    associateVpcCidrBlock_ipv6Pool,
    associateVpcCidrBlock_vpcId,

    -- * Destructuring the Response
    AssociateVpcCidrBlockResponse (..),
    newAssociateVpcCidrBlockResponse,

    -- * Response Lenses
    associateVpcCidrBlockResponse_cidrBlockAssociation,
    associateVpcCidrBlockResponse_ipv6CidrBlockAssociation,
    associateVpcCidrBlockResponse_vpcId,
    associateVpcCidrBlockResponse_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:/ 'newAssociateVpcCidrBlock' smart constructor.
data AssociateVpcCidrBlock = AssociateVpcCidrBlock'
  { -- | Requests an Amazon-provided IPv6 CIDR block with a \/56 prefix length
    -- for the VPC. You cannot specify the range of IPv6 addresses, or the size
    -- of the CIDR block.
    AssociateVpcCidrBlock -> Maybe Bool
amazonProvidedIpv6CidrBlock :: Prelude.Maybe Prelude.Bool,
    -- | An IPv4 CIDR block to associate with the VPC.
    AssociateVpcCidrBlock -> Maybe Text
cidrBlock :: Prelude.Maybe Prelude.Text,
    -- | Associate a CIDR allocated from an IPv4 IPAM pool to a VPC. For more
    -- information about Amazon VPC IP Address Manager (IPAM), see
    -- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
    -- in the /Amazon VPC IPAM User Guide/.
    AssociateVpcCidrBlock -> Maybe Text
ipv4IpamPoolId :: Prelude.Maybe Prelude.Text,
    -- | The netmask length of the IPv4 CIDR you would like to associate from an
    -- Amazon VPC IP Address Manager (IPAM) pool. For more information about
    -- IPAM, see
    -- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
    -- in the /Amazon VPC IPAM User Guide/.
    AssociateVpcCidrBlock -> Maybe Int
ipv4NetmaskLength :: Prelude.Maybe Prelude.Int,
    -- | An IPv6 CIDR block from the IPv6 address pool. You must also specify
    -- @Ipv6Pool@ in the request.
    --
    -- To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
    AssociateVpcCidrBlock -> Maybe Text
ipv6CidrBlock :: Prelude.Maybe Prelude.Text,
    -- | The name of the location from which we advertise the IPV6 CIDR block.
    -- Use this parameter to limit the CIDR block to this location.
    --
    -- You must set @AmazonProvidedIpv6CidrBlock@ to @true@ to use this
    -- parameter.
    --
    -- You can have one IPv6 CIDR block association per network border group.
    AssociateVpcCidrBlock -> Maybe Text
ipv6CidrBlockNetworkBorderGroup :: Prelude.Maybe Prelude.Text,
    -- | Associates a CIDR allocated from an IPv6 IPAM pool to a VPC. For more
    -- information about Amazon VPC IP Address Manager (IPAM), see
    -- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
    -- in the /Amazon VPC IPAM User Guide/.
    AssociateVpcCidrBlock -> Maybe Text
ipv6IpamPoolId :: Prelude.Maybe Prelude.Text,
    -- | The netmask length of the IPv6 CIDR you would like to associate from an
    -- Amazon VPC IP Address Manager (IPAM) pool. For more information about
    -- IPAM, see
    -- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
    -- in the /Amazon VPC IPAM User Guide/.
    AssociateVpcCidrBlock -> Maybe Int
ipv6NetmaskLength :: Prelude.Maybe Prelude.Int,
    -- | The ID of an IPv6 address pool from which to allocate the IPv6 CIDR
    -- block.
    AssociateVpcCidrBlock -> Maybe Text
ipv6Pool :: Prelude.Maybe Prelude.Text,
    -- | The ID of the VPC.
    AssociateVpcCidrBlock -> Text
vpcId :: Prelude.Text
  }
  deriving (AssociateVpcCidrBlock -> AssociateVpcCidrBlock -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateVpcCidrBlock -> AssociateVpcCidrBlock -> Bool
$c/= :: AssociateVpcCidrBlock -> AssociateVpcCidrBlock -> Bool
== :: AssociateVpcCidrBlock -> AssociateVpcCidrBlock -> Bool
$c== :: AssociateVpcCidrBlock -> AssociateVpcCidrBlock -> Bool
Prelude.Eq, ReadPrec [AssociateVpcCidrBlock]
ReadPrec AssociateVpcCidrBlock
Int -> ReadS AssociateVpcCidrBlock
ReadS [AssociateVpcCidrBlock]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateVpcCidrBlock]
$creadListPrec :: ReadPrec [AssociateVpcCidrBlock]
readPrec :: ReadPrec AssociateVpcCidrBlock
$creadPrec :: ReadPrec AssociateVpcCidrBlock
readList :: ReadS [AssociateVpcCidrBlock]
$creadList :: ReadS [AssociateVpcCidrBlock]
readsPrec :: Int -> ReadS AssociateVpcCidrBlock
$creadsPrec :: Int -> ReadS AssociateVpcCidrBlock
Prelude.Read, Int -> AssociateVpcCidrBlock -> ShowS
[AssociateVpcCidrBlock] -> ShowS
AssociateVpcCidrBlock -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateVpcCidrBlock] -> ShowS
$cshowList :: [AssociateVpcCidrBlock] -> ShowS
show :: AssociateVpcCidrBlock -> String
$cshow :: AssociateVpcCidrBlock -> String
showsPrec :: Int -> AssociateVpcCidrBlock -> ShowS
$cshowsPrec :: Int -> AssociateVpcCidrBlock -> ShowS
Prelude.Show, forall x. Rep AssociateVpcCidrBlock x -> AssociateVpcCidrBlock
forall x. AssociateVpcCidrBlock -> Rep AssociateVpcCidrBlock x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssociateVpcCidrBlock x -> AssociateVpcCidrBlock
$cfrom :: forall x. AssociateVpcCidrBlock -> Rep AssociateVpcCidrBlock x
Prelude.Generic)

-- |
-- Create a value of 'AssociateVpcCidrBlock' 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:
--
-- 'amazonProvidedIpv6CidrBlock', 'associateVpcCidrBlock_amazonProvidedIpv6CidrBlock' - Requests an Amazon-provided IPv6 CIDR block with a \/56 prefix length
-- for the VPC. You cannot specify the range of IPv6 addresses, or the size
-- of the CIDR block.
--
-- 'cidrBlock', 'associateVpcCidrBlock_cidrBlock' - An IPv4 CIDR block to associate with the VPC.
--
-- 'ipv4IpamPoolId', 'associateVpcCidrBlock_ipv4IpamPoolId' - Associate a CIDR allocated from an IPv4 IPAM pool to a VPC. For more
-- information about Amazon VPC IP Address Manager (IPAM), see
-- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
-- in the /Amazon VPC IPAM User Guide/.
--
-- 'ipv4NetmaskLength', 'associateVpcCidrBlock_ipv4NetmaskLength' - The netmask length of the IPv4 CIDR you would like to associate from an
-- Amazon VPC IP Address Manager (IPAM) pool. For more information about
-- IPAM, see
-- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
-- in the /Amazon VPC IPAM User Guide/.
--
-- 'ipv6CidrBlock', 'associateVpcCidrBlock_ipv6CidrBlock' - An IPv6 CIDR block from the IPv6 address pool. You must also specify
-- @Ipv6Pool@ in the request.
--
-- To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
--
-- 'ipv6CidrBlockNetworkBorderGroup', 'associateVpcCidrBlock_ipv6CidrBlockNetworkBorderGroup' - The name of the location from which we advertise the IPV6 CIDR block.
-- Use this parameter to limit the CIDR block to this location.
--
-- You must set @AmazonProvidedIpv6CidrBlock@ to @true@ to use this
-- parameter.
--
-- You can have one IPv6 CIDR block association per network border group.
--
-- 'ipv6IpamPoolId', 'associateVpcCidrBlock_ipv6IpamPoolId' - Associates a CIDR allocated from an IPv6 IPAM pool to a VPC. For more
-- information about Amazon VPC IP Address Manager (IPAM), see
-- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
-- in the /Amazon VPC IPAM User Guide/.
--
-- 'ipv6NetmaskLength', 'associateVpcCidrBlock_ipv6NetmaskLength' - The netmask length of the IPv6 CIDR you would like to associate from an
-- Amazon VPC IP Address Manager (IPAM) pool. For more information about
-- IPAM, see
-- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
-- in the /Amazon VPC IPAM User Guide/.
--
-- 'ipv6Pool', 'associateVpcCidrBlock_ipv6Pool' - The ID of an IPv6 address pool from which to allocate the IPv6 CIDR
-- block.
--
-- 'vpcId', 'associateVpcCidrBlock_vpcId' - The ID of the VPC.
newAssociateVpcCidrBlock ::
  -- | 'vpcId'
  Prelude.Text ->
  AssociateVpcCidrBlock
newAssociateVpcCidrBlock :: Text -> AssociateVpcCidrBlock
newAssociateVpcCidrBlock Text
pVpcId_ =
  AssociateVpcCidrBlock'
    { $sel:amazonProvidedIpv6CidrBlock:AssociateVpcCidrBlock' :: Maybe Bool
amazonProvidedIpv6CidrBlock =
        forall a. Maybe a
Prelude.Nothing,
      $sel:cidrBlock:AssociateVpcCidrBlock' :: Maybe Text
cidrBlock = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv4IpamPoolId:AssociateVpcCidrBlock' :: Maybe Text
ipv4IpamPoolId = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv4NetmaskLength:AssociateVpcCidrBlock' :: Maybe Int
ipv4NetmaskLength = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6CidrBlock:AssociateVpcCidrBlock' :: Maybe Text
ipv6CidrBlock = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6CidrBlockNetworkBorderGroup:AssociateVpcCidrBlock' :: Maybe Text
ipv6CidrBlockNetworkBorderGroup = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6IpamPoolId:AssociateVpcCidrBlock' :: Maybe Text
ipv6IpamPoolId = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6NetmaskLength:AssociateVpcCidrBlock' :: Maybe Int
ipv6NetmaskLength = forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6Pool:AssociateVpcCidrBlock' :: Maybe Text
ipv6Pool = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:AssociateVpcCidrBlock' :: Text
vpcId = Text
pVpcId_
    }

-- | Requests an Amazon-provided IPv6 CIDR block with a \/56 prefix length
-- for the VPC. You cannot specify the range of IPv6 addresses, or the size
-- of the CIDR block.
associateVpcCidrBlock_amazonProvidedIpv6CidrBlock :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Bool)
associateVpcCidrBlock_amazonProvidedIpv6CidrBlock :: Lens' AssociateVpcCidrBlock (Maybe Bool)
associateVpcCidrBlock_amazonProvidedIpv6CidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Bool
amazonProvidedIpv6CidrBlock :: Maybe Bool
$sel:amazonProvidedIpv6CidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Bool
amazonProvidedIpv6CidrBlock} -> Maybe Bool
amazonProvidedIpv6CidrBlock) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Bool
a -> AssociateVpcCidrBlock
s {$sel:amazonProvidedIpv6CidrBlock:AssociateVpcCidrBlock' :: Maybe Bool
amazonProvidedIpv6CidrBlock = Maybe Bool
a} :: AssociateVpcCidrBlock)

-- | An IPv4 CIDR block to associate with the VPC.
associateVpcCidrBlock_cidrBlock :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Text)
associateVpcCidrBlock_cidrBlock :: Lens' AssociateVpcCidrBlock (Maybe Text)
associateVpcCidrBlock_cidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Text
cidrBlock :: Maybe Text
$sel:cidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
cidrBlock} -> Maybe Text
cidrBlock) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Text
a -> AssociateVpcCidrBlock
s {$sel:cidrBlock:AssociateVpcCidrBlock' :: Maybe Text
cidrBlock = Maybe Text
a} :: AssociateVpcCidrBlock)

-- | Associate a CIDR allocated from an IPv4 IPAM pool to a VPC. For more
-- information about Amazon VPC IP Address Manager (IPAM), see
-- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
-- in the /Amazon VPC IPAM User Guide/.
associateVpcCidrBlock_ipv4IpamPoolId :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Text)
associateVpcCidrBlock_ipv4IpamPoolId :: Lens' AssociateVpcCidrBlock (Maybe Text)
associateVpcCidrBlock_ipv4IpamPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Text
ipv4IpamPoolId :: Maybe Text
$sel:ipv4IpamPoolId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
ipv4IpamPoolId} -> Maybe Text
ipv4IpamPoolId) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Text
a -> AssociateVpcCidrBlock
s {$sel:ipv4IpamPoolId:AssociateVpcCidrBlock' :: Maybe Text
ipv4IpamPoolId = Maybe Text
a} :: AssociateVpcCidrBlock)

-- | The netmask length of the IPv4 CIDR you would like to associate from an
-- Amazon VPC IP Address Manager (IPAM) pool. For more information about
-- IPAM, see
-- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
-- in the /Amazon VPC IPAM User Guide/.
associateVpcCidrBlock_ipv4NetmaskLength :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Int)
associateVpcCidrBlock_ipv4NetmaskLength :: Lens' AssociateVpcCidrBlock (Maybe Int)
associateVpcCidrBlock_ipv4NetmaskLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Int
ipv4NetmaskLength :: Maybe Int
$sel:ipv4NetmaskLength:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Int
ipv4NetmaskLength} -> Maybe Int
ipv4NetmaskLength) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Int
a -> AssociateVpcCidrBlock
s {$sel:ipv4NetmaskLength:AssociateVpcCidrBlock' :: Maybe Int
ipv4NetmaskLength = Maybe Int
a} :: AssociateVpcCidrBlock)

-- | An IPv6 CIDR block from the IPv6 address pool. You must also specify
-- @Ipv6Pool@ in the request.
--
-- To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
associateVpcCidrBlock_ipv6CidrBlock :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Text)
associateVpcCidrBlock_ipv6CidrBlock :: Lens' AssociateVpcCidrBlock (Maybe Text)
associateVpcCidrBlock_ipv6CidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Text
ipv6CidrBlock :: Maybe Text
$sel:ipv6CidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
ipv6CidrBlock} -> Maybe Text
ipv6CidrBlock) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Text
a -> AssociateVpcCidrBlock
s {$sel:ipv6CidrBlock:AssociateVpcCidrBlock' :: Maybe Text
ipv6CidrBlock = Maybe Text
a} :: AssociateVpcCidrBlock)

-- | The name of the location from which we advertise the IPV6 CIDR block.
-- Use this parameter to limit the CIDR block to this location.
--
-- You must set @AmazonProvidedIpv6CidrBlock@ to @true@ to use this
-- parameter.
--
-- You can have one IPv6 CIDR block association per network border group.
associateVpcCidrBlock_ipv6CidrBlockNetworkBorderGroup :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Text)
associateVpcCidrBlock_ipv6CidrBlockNetworkBorderGroup :: Lens' AssociateVpcCidrBlock (Maybe Text)
associateVpcCidrBlock_ipv6CidrBlockNetworkBorderGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Text
ipv6CidrBlockNetworkBorderGroup :: Maybe Text
$sel:ipv6CidrBlockNetworkBorderGroup:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
ipv6CidrBlockNetworkBorderGroup} -> Maybe Text
ipv6CidrBlockNetworkBorderGroup) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Text
a -> AssociateVpcCidrBlock
s {$sel:ipv6CidrBlockNetworkBorderGroup:AssociateVpcCidrBlock' :: Maybe Text
ipv6CidrBlockNetworkBorderGroup = Maybe Text
a} :: AssociateVpcCidrBlock)

-- | Associates a CIDR allocated from an IPv6 IPAM pool to a VPC. For more
-- information about Amazon VPC IP Address Manager (IPAM), see
-- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
-- in the /Amazon VPC IPAM User Guide/.
associateVpcCidrBlock_ipv6IpamPoolId :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Text)
associateVpcCidrBlock_ipv6IpamPoolId :: Lens' AssociateVpcCidrBlock (Maybe Text)
associateVpcCidrBlock_ipv6IpamPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Text
ipv6IpamPoolId :: Maybe Text
$sel:ipv6IpamPoolId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
ipv6IpamPoolId} -> Maybe Text
ipv6IpamPoolId) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Text
a -> AssociateVpcCidrBlock
s {$sel:ipv6IpamPoolId:AssociateVpcCidrBlock' :: Maybe Text
ipv6IpamPoolId = Maybe Text
a} :: AssociateVpcCidrBlock)

-- | The netmask length of the IPv6 CIDR you would like to associate from an
-- Amazon VPC IP Address Manager (IPAM) pool. For more information about
-- IPAM, see
-- <https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html What is IPAM?>
-- in the /Amazon VPC IPAM User Guide/.
associateVpcCidrBlock_ipv6NetmaskLength :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Int)
associateVpcCidrBlock_ipv6NetmaskLength :: Lens' AssociateVpcCidrBlock (Maybe Int)
associateVpcCidrBlock_ipv6NetmaskLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Int
ipv6NetmaskLength :: Maybe Int
$sel:ipv6NetmaskLength:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Int
ipv6NetmaskLength} -> Maybe Int
ipv6NetmaskLength) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Int
a -> AssociateVpcCidrBlock
s {$sel:ipv6NetmaskLength:AssociateVpcCidrBlock' :: Maybe Int
ipv6NetmaskLength = Maybe Int
a} :: AssociateVpcCidrBlock)

-- | The ID of an IPv6 address pool from which to allocate the IPv6 CIDR
-- block.
associateVpcCidrBlock_ipv6Pool :: Lens.Lens' AssociateVpcCidrBlock (Prelude.Maybe Prelude.Text)
associateVpcCidrBlock_ipv6Pool :: Lens' AssociateVpcCidrBlock (Maybe Text)
associateVpcCidrBlock_ipv6Pool = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Maybe Text
ipv6Pool :: Maybe Text
$sel:ipv6Pool:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
ipv6Pool} -> Maybe Text
ipv6Pool) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Maybe Text
a -> AssociateVpcCidrBlock
s {$sel:ipv6Pool:AssociateVpcCidrBlock' :: Maybe Text
ipv6Pool = Maybe Text
a} :: AssociateVpcCidrBlock)

-- | The ID of the VPC.
associateVpcCidrBlock_vpcId :: Lens.Lens' AssociateVpcCidrBlock Prelude.Text
associateVpcCidrBlock_vpcId :: Lens' AssociateVpcCidrBlock Text
associateVpcCidrBlock_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlock' {Text
vpcId :: Text
$sel:vpcId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Text
vpcId} -> Text
vpcId) (\s :: AssociateVpcCidrBlock
s@AssociateVpcCidrBlock' {} Text
a -> AssociateVpcCidrBlock
s {$sel:vpcId:AssociateVpcCidrBlock' :: Text
vpcId = Text
a} :: AssociateVpcCidrBlock)

instance Core.AWSRequest AssociateVpcCidrBlock where
  type
    AWSResponse AssociateVpcCidrBlock =
      AssociateVpcCidrBlockResponse
  request :: (Service -> Service)
-> AssociateVpcCidrBlock -> Request AssociateVpcCidrBlock
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 AssociateVpcCidrBlock
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AssociateVpcCidrBlock)))
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 VpcCidrBlockAssociation
-> Maybe VpcIpv6CidrBlockAssociation
-> Maybe Text
-> Int
-> AssociateVpcCidrBlockResponse
AssociateVpcCidrBlockResponse'
            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
"cidrBlockAssociation")
            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
"ipv6CidrBlockAssociation")
            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
"vpcId")
            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 AssociateVpcCidrBlock where
  hashWithSalt :: Int -> AssociateVpcCidrBlock -> Int
hashWithSalt Int
_salt AssociateVpcCidrBlock' {Maybe Bool
Maybe Int
Maybe Text
Text
vpcId :: Text
ipv6Pool :: Maybe Text
ipv6NetmaskLength :: Maybe Int
ipv6IpamPoolId :: Maybe Text
ipv6CidrBlockNetworkBorderGroup :: Maybe Text
ipv6CidrBlock :: Maybe Text
ipv4NetmaskLength :: Maybe Int
ipv4IpamPoolId :: Maybe Text
cidrBlock :: Maybe Text
amazonProvidedIpv6CidrBlock :: Maybe Bool
$sel:vpcId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Text
$sel:ipv6Pool:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6NetmaskLength:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Int
$sel:ipv6IpamPoolId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6CidrBlockNetworkBorderGroup:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6CidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv4NetmaskLength:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Int
$sel:ipv4IpamPoolId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:cidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:amazonProvidedIpv6CidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
amazonProvidedIpv6CidrBlock
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cidrBlock
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipv4IpamPoolId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
ipv4NetmaskLength
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipv6CidrBlock
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipv6CidrBlockNetworkBorderGroup
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipv6IpamPoolId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
ipv6NetmaskLength
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipv6Pool
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpcId

instance Prelude.NFData AssociateVpcCidrBlock where
  rnf :: AssociateVpcCidrBlock -> ()
rnf AssociateVpcCidrBlock' {Maybe Bool
Maybe Int
Maybe Text
Text
vpcId :: Text
ipv6Pool :: Maybe Text
ipv6NetmaskLength :: Maybe Int
ipv6IpamPoolId :: Maybe Text
ipv6CidrBlockNetworkBorderGroup :: Maybe Text
ipv6CidrBlock :: Maybe Text
ipv4NetmaskLength :: Maybe Int
ipv4IpamPoolId :: Maybe Text
cidrBlock :: Maybe Text
amazonProvidedIpv6CidrBlock :: Maybe Bool
$sel:vpcId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Text
$sel:ipv6Pool:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6NetmaskLength:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Int
$sel:ipv6IpamPoolId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6CidrBlockNetworkBorderGroup:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6CidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv4NetmaskLength:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Int
$sel:ipv4IpamPoolId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:cidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:amazonProvidedIpv6CidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
amazonProvidedIpv6CidrBlock
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cidrBlock
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipv4IpamPoolId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
ipv4NetmaskLength
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipv6CidrBlock
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipv6CidrBlockNetworkBorderGroup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipv6IpamPoolId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
ipv6NetmaskLength
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipv6Pool
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vpcId

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

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

instance Data.ToQuery AssociateVpcCidrBlock where
  toQuery :: AssociateVpcCidrBlock -> QueryString
toQuery AssociateVpcCidrBlock' {Maybe Bool
Maybe Int
Maybe Text
Text
vpcId :: Text
ipv6Pool :: Maybe Text
ipv6NetmaskLength :: Maybe Int
ipv6IpamPoolId :: Maybe Text
ipv6CidrBlockNetworkBorderGroup :: Maybe Text
ipv6CidrBlock :: Maybe Text
ipv4NetmaskLength :: Maybe Int
ipv4IpamPoolId :: Maybe Text
cidrBlock :: Maybe Text
amazonProvidedIpv6CidrBlock :: Maybe Bool
$sel:vpcId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Text
$sel:ipv6Pool:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6NetmaskLength:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Int
$sel:ipv6IpamPoolId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6CidrBlockNetworkBorderGroup:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv6CidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:ipv4NetmaskLength:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Int
$sel:ipv4IpamPoolId:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:cidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Text
$sel:amazonProvidedIpv6CidrBlock:AssociateVpcCidrBlock' :: AssociateVpcCidrBlock -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"AssociateVpcCidrBlock" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"AmazonProvidedIpv6CidrBlock"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
amazonProvidedIpv6CidrBlock,
        ByteString
"CidrBlock" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
cidrBlock,
        ByteString
"Ipv4IpamPoolId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ipv4IpamPoolId,
        ByteString
"Ipv4NetmaskLength" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
ipv4NetmaskLength,
        ByteString
"Ipv6CidrBlock" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ipv6CidrBlock,
        ByteString
"Ipv6CidrBlockNetworkBorderGroup"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ipv6CidrBlockNetworkBorderGroup,
        ByteString
"Ipv6IpamPoolId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ipv6IpamPoolId,
        ByteString
"Ipv6NetmaskLength" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
ipv6NetmaskLength,
        ByteString
"Ipv6Pool" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ipv6Pool,
        ByteString
"VpcId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
vpcId
      ]

-- | /See:/ 'newAssociateVpcCidrBlockResponse' smart constructor.
data AssociateVpcCidrBlockResponse = AssociateVpcCidrBlockResponse'
  { -- | Information about the IPv4 CIDR block association.
    AssociateVpcCidrBlockResponse -> Maybe VpcCidrBlockAssociation
cidrBlockAssociation :: Prelude.Maybe VpcCidrBlockAssociation,
    -- | Information about the IPv6 CIDR block association.
    AssociateVpcCidrBlockResponse -> Maybe VpcIpv6CidrBlockAssociation
ipv6CidrBlockAssociation :: Prelude.Maybe VpcIpv6CidrBlockAssociation,
    -- | The ID of the VPC.
    AssociateVpcCidrBlockResponse -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    AssociateVpcCidrBlockResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociateVpcCidrBlockResponse
-> AssociateVpcCidrBlockResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateVpcCidrBlockResponse
-> AssociateVpcCidrBlockResponse -> Bool
$c/= :: AssociateVpcCidrBlockResponse
-> AssociateVpcCidrBlockResponse -> Bool
== :: AssociateVpcCidrBlockResponse
-> AssociateVpcCidrBlockResponse -> Bool
$c== :: AssociateVpcCidrBlockResponse
-> AssociateVpcCidrBlockResponse -> Bool
Prelude.Eq, ReadPrec [AssociateVpcCidrBlockResponse]
ReadPrec AssociateVpcCidrBlockResponse
Int -> ReadS AssociateVpcCidrBlockResponse
ReadS [AssociateVpcCidrBlockResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateVpcCidrBlockResponse]
$creadListPrec :: ReadPrec [AssociateVpcCidrBlockResponse]
readPrec :: ReadPrec AssociateVpcCidrBlockResponse
$creadPrec :: ReadPrec AssociateVpcCidrBlockResponse
readList :: ReadS [AssociateVpcCidrBlockResponse]
$creadList :: ReadS [AssociateVpcCidrBlockResponse]
readsPrec :: Int -> ReadS AssociateVpcCidrBlockResponse
$creadsPrec :: Int -> ReadS AssociateVpcCidrBlockResponse
Prelude.Read, Int -> AssociateVpcCidrBlockResponse -> ShowS
[AssociateVpcCidrBlockResponse] -> ShowS
AssociateVpcCidrBlockResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateVpcCidrBlockResponse] -> ShowS
$cshowList :: [AssociateVpcCidrBlockResponse] -> ShowS
show :: AssociateVpcCidrBlockResponse -> String
$cshow :: AssociateVpcCidrBlockResponse -> String
showsPrec :: Int -> AssociateVpcCidrBlockResponse -> ShowS
$cshowsPrec :: Int -> AssociateVpcCidrBlockResponse -> ShowS
Prelude.Show, forall x.
Rep AssociateVpcCidrBlockResponse x
-> AssociateVpcCidrBlockResponse
forall x.
AssociateVpcCidrBlockResponse
-> Rep AssociateVpcCidrBlockResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateVpcCidrBlockResponse x
-> AssociateVpcCidrBlockResponse
$cfrom :: forall x.
AssociateVpcCidrBlockResponse
-> Rep AssociateVpcCidrBlockResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateVpcCidrBlockResponse' 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:
--
-- 'cidrBlockAssociation', 'associateVpcCidrBlockResponse_cidrBlockAssociation' - Information about the IPv4 CIDR block association.
--
-- 'ipv6CidrBlockAssociation', 'associateVpcCidrBlockResponse_ipv6CidrBlockAssociation' - Information about the IPv6 CIDR block association.
--
-- 'vpcId', 'associateVpcCidrBlockResponse_vpcId' - The ID of the VPC.
--
-- 'httpStatus', 'associateVpcCidrBlockResponse_httpStatus' - The response's http status code.
newAssociateVpcCidrBlockResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateVpcCidrBlockResponse
newAssociateVpcCidrBlockResponse :: Int -> AssociateVpcCidrBlockResponse
newAssociateVpcCidrBlockResponse Int
pHttpStatus_ =
  AssociateVpcCidrBlockResponse'
    { $sel:cidrBlockAssociation:AssociateVpcCidrBlockResponse' :: Maybe VpcCidrBlockAssociation
cidrBlockAssociation =
        forall a. Maybe a
Prelude.Nothing,
      $sel:ipv6CidrBlockAssociation:AssociateVpcCidrBlockResponse' :: Maybe VpcIpv6CidrBlockAssociation
ipv6CidrBlockAssociation = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:AssociateVpcCidrBlockResponse' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:AssociateVpcCidrBlockResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the IPv4 CIDR block association.
associateVpcCidrBlockResponse_cidrBlockAssociation :: Lens.Lens' AssociateVpcCidrBlockResponse (Prelude.Maybe VpcCidrBlockAssociation)
associateVpcCidrBlockResponse_cidrBlockAssociation :: Lens' AssociateVpcCidrBlockResponse (Maybe VpcCidrBlockAssociation)
associateVpcCidrBlockResponse_cidrBlockAssociation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlockResponse' {Maybe VpcCidrBlockAssociation
cidrBlockAssociation :: Maybe VpcCidrBlockAssociation
$sel:cidrBlockAssociation:AssociateVpcCidrBlockResponse' :: AssociateVpcCidrBlockResponse -> Maybe VpcCidrBlockAssociation
cidrBlockAssociation} -> Maybe VpcCidrBlockAssociation
cidrBlockAssociation) (\s :: AssociateVpcCidrBlockResponse
s@AssociateVpcCidrBlockResponse' {} Maybe VpcCidrBlockAssociation
a -> AssociateVpcCidrBlockResponse
s {$sel:cidrBlockAssociation:AssociateVpcCidrBlockResponse' :: Maybe VpcCidrBlockAssociation
cidrBlockAssociation = Maybe VpcCidrBlockAssociation
a} :: AssociateVpcCidrBlockResponse)

-- | Information about the IPv6 CIDR block association.
associateVpcCidrBlockResponse_ipv6CidrBlockAssociation :: Lens.Lens' AssociateVpcCidrBlockResponse (Prelude.Maybe VpcIpv6CidrBlockAssociation)
associateVpcCidrBlockResponse_ipv6CidrBlockAssociation :: Lens'
  AssociateVpcCidrBlockResponse (Maybe VpcIpv6CidrBlockAssociation)
associateVpcCidrBlockResponse_ipv6CidrBlockAssociation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlockResponse' {Maybe VpcIpv6CidrBlockAssociation
ipv6CidrBlockAssociation :: Maybe VpcIpv6CidrBlockAssociation
$sel:ipv6CidrBlockAssociation:AssociateVpcCidrBlockResponse' :: AssociateVpcCidrBlockResponse -> Maybe VpcIpv6CidrBlockAssociation
ipv6CidrBlockAssociation} -> Maybe VpcIpv6CidrBlockAssociation
ipv6CidrBlockAssociation) (\s :: AssociateVpcCidrBlockResponse
s@AssociateVpcCidrBlockResponse' {} Maybe VpcIpv6CidrBlockAssociation
a -> AssociateVpcCidrBlockResponse
s {$sel:ipv6CidrBlockAssociation:AssociateVpcCidrBlockResponse' :: Maybe VpcIpv6CidrBlockAssociation
ipv6CidrBlockAssociation = Maybe VpcIpv6CidrBlockAssociation
a} :: AssociateVpcCidrBlockResponse)

-- | The ID of the VPC.
associateVpcCidrBlockResponse_vpcId :: Lens.Lens' AssociateVpcCidrBlockResponse (Prelude.Maybe Prelude.Text)
associateVpcCidrBlockResponse_vpcId :: Lens' AssociateVpcCidrBlockResponse (Maybe Text)
associateVpcCidrBlockResponse_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateVpcCidrBlockResponse' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:AssociateVpcCidrBlockResponse' :: AssociateVpcCidrBlockResponse -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: AssociateVpcCidrBlockResponse
s@AssociateVpcCidrBlockResponse' {} Maybe Text
a -> AssociateVpcCidrBlockResponse
s {$sel:vpcId:AssociateVpcCidrBlockResponse' :: Maybe Text
vpcId = Maybe Text
a} :: AssociateVpcCidrBlockResponse)

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

instance Prelude.NFData AssociateVpcCidrBlockResponse where
  rnf :: AssociateVpcCidrBlockResponse -> ()
rnf AssociateVpcCidrBlockResponse' {Int
Maybe Text
Maybe VpcCidrBlockAssociation
Maybe VpcIpv6CidrBlockAssociation
httpStatus :: Int
vpcId :: Maybe Text
ipv6CidrBlockAssociation :: Maybe VpcIpv6CidrBlockAssociation
cidrBlockAssociation :: Maybe VpcCidrBlockAssociation
$sel:httpStatus:AssociateVpcCidrBlockResponse' :: AssociateVpcCidrBlockResponse -> Int
$sel:vpcId:AssociateVpcCidrBlockResponse' :: AssociateVpcCidrBlockResponse -> Maybe Text
$sel:ipv6CidrBlockAssociation:AssociateVpcCidrBlockResponse' :: AssociateVpcCidrBlockResponse -> Maybe VpcIpv6CidrBlockAssociation
$sel:cidrBlockAssociation:AssociateVpcCidrBlockResponse' :: AssociateVpcCidrBlockResponse -> Maybe VpcCidrBlockAssociation
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcCidrBlockAssociation
cidrBlockAssociation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcIpv6CidrBlockAssociation
ipv6CidrBlockAssociation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus