{-# 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.CreateLocalGatewayRouteTableVpcAssociation
-- 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 the specified VPC with the specified local gateway route
-- table.
module Amazonka.EC2.CreateLocalGatewayRouteTableVpcAssociation
  ( -- * Creating a Request
    CreateLocalGatewayRouteTableVpcAssociation (..),
    newCreateLocalGatewayRouteTableVpcAssociation,

    -- * Request Lenses
    createLocalGatewayRouteTableVpcAssociation_dryRun,
    createLocalGatewayRouteTableVpcAssociation_tagSpecifications,
    createLocalGatewayRouteTableVpcAssociation_localGatewayRouteTableId,
    createLocalGatewayRouteTableVpcAssociation_vpcId,

    -- * Destructuring the Response
    CreateLocalGatewayRouteTableVpcAssociationResponse (..),
    newCreateLocalGatewayRouteTableVpcAssociationResponse,

    -- * Response Lenses
    createLocalGatewayRouteTableVpcAssociationResponse_localGatewayRouteTableVpcAssociation,
    createLocalGatewayRouteTableVpcAssociationResponse_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:/ 'newCreateLocalGatewayRouteTableVpcAssociation' smart constructor.
data CreateLocalGatewayRouteTableVpcAssociation = CreateLocalGatewayRouteTableVpcAssociation'
  { -- | 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@.
    CreateLocalGatewayRouteTableVpcAssociation -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The tags to assign to the local gateway route table VPC association.
    CreateLocalGatewayRouteTableVpcAssociation
-> Maybe [TagSpecification]
tagSpecifications :: Prelude.Maybe [TagSpecification],
    -- | The ID of the local gateway route table.
    CreateLocalGatewayRouteTableVpcAssociation -> Text
localGatewayRouteTableId :: Prelude.Text,
    -- | The ID of the VPC.
    CreateLocalGatewayRouteTableVpcAssociation -> Text
vpcId :: Prelude.Text
  }
  deriving (CreateLocalGatewayRouteTableVpcAssociation
-> CreateLocalGatewayRouteTableVpcAssociation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLocalGatewayRouteTableVpcAssociation
-> CreateLocalGatewayRouteTableVpcAssociation -> Bool
$c/= :: CreateLocalGatewayRouteTableVpcAssociation
-> CreateLocalGatewayRouteTableVpcAssociation -> Bool
== :: CreateLocalGatewayRouteTableVpcAssociation
-> CreateLocalGatewayRouteTableVpcAssociation -> Bool
$c== :: CreateLocalGatewayRouteTableVpcAssociation
-> CreateLocalGatewayRouteTableVpcAssociation -> Bool
Prelude.Eq, ReadPrec [CreateLocalGatewayRouteTableVpcAssociation]
ReadPrec CreateLocalGatewayRouteTableVpcAssociation
Int -> ReadS CreateLocalGatewayRouteTableVpcAssociation
ReadS [CreateLocalGatewayRouteTableVpcAssociation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLocalGatewayRouteTableVpcAssociation]
$creadListPrec :: ReadPrec [CreateLocalGatewayRouteTableVpcAssociation]
readPrec :: ReadPrec CreateLocalGatewayRouteTableVpcAssociation
$creadPrec :: ReadPrec CreateLocalGatewayRouteTableVpcAssociation
readList :: ReadS [CreateLocalGatewayRouteTableVpcAssociation]
$creadList :: ReadS [CreateLocalGatewayRouteTableVpcAssociation]
readsPrec :: Int -> ReadS CreateLocalGatewayRouteTableVpcAssociation
$creadsPrec :: Int -> ReadS CreateLocalGatewayRouteTableVpcAssociation
Prelude.Read, Int -> CreateLocalGatewayRouteTableVpcAssociation -> ShowS
[CreateLocalGatewayRouteTableVpcAssociation] -> ShowS
CreateLocalGatewayRouteTableVpcAssociation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLocalGatewayRouteTableVpcAssociation] -> ShowS
$cshowList :: [CreateLocalGatewayRouteTableVpcAssociation] -> ShowS
show :: CreateLocalGatewayRouteTableVpcAssociation -> String
$cshow :: CreateLocalGatewayRouteTableVpcAssociation -> String
showsPrec :: Int -> CreateLocalGatewayRouteTableVpcAssociation -> ShowS
$cshowsPrec :: Int -> CreateLocalGatewayRouteTableVpcAssociation -> ShowS
Prelude.Show, forall x.
Rep CreateLocalGatewayRouteTableVpcAssociation x
-> CreateLocalGatewayRouteTableVpcAssociation
forall x.
CreateLocalGatewayRouteTableVpcAssociation
-> Rep CreateLocalGatewayRouteTableVpcAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLocalGatewayRouteTableVpcAssociation x
-> CreateLocalGatewayRouteTableVpcAssociation
$cfrom :: forall x.
CreateLocalGatewayRouteTableVpcAssociation
-> Rep CreateLocalGatewayRouteTableVpcAssociation x
Prelude.Generic)

-- |
-- Create a value of 'CreateLocalGatewayRouteTableVpcAssociation' 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', 'createLocalGatewayRouteTableVpcAssociation_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@.
--
-- 'tagSpecifications', 'createLocalGatewayRouteTableVpcAssociation_tagSpecifications' - The tags to assign to the local gateway route table VPC association.
--
-- 'localGatewayRouteTableId', 'createLocalGatewayRouteTableVpcAssociation_localGatewayRouteTableId' - The ID of the local gateway route table.
--
-- 'vpcId', 'createLocalGatewayRouteTableVpcAssociation_vpcId' - The ID of the VPC.
newCreateLocalGatewayRouteTableVpcAssociation ::
  -- | 'localGatewayRouteTableId'
  Prelude.Text ->
  -- | 'vpcId'
  Prelude.Text ->
  CreateLocalGatewayRouteTableVpcAssociation
newCreateLocalGatewayRouteTableVpcAssociation :: Text -> Text -> CreateLocalGatewayRouteTableVpcAssociation
newCreateLocalGatewayRouteTableVpcAssociation
  Text
pLocalGatewayRouteTableId_
  Text
pVpcId_ =
    CreateLocalGatewayRouteTableVpcAssociation'
      { $sel:dryRun:CreateLocalGatewayRouteTableVpcAssociation' :: Maybe Bool
dryRun =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tagSpecifications:CreateLocalGatewayRouteTableVpcAssociation' :: Maybe [TagSpecification]
tagSpecifications =
          forall a. Maybe a
Prelude.Nothing,
        $sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVpcAssociation' :: Text
localGatewayRouteTableId =
          Text
pLocalGatewayRouteTableId_,
        $sel:vpcId:CreateLocalGatewayRouteTableVpcAssociation' :: Text
vpcId = Text
pVpcId_
      }

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

-- | The tags to assign to the local gateway route table VPC association.
createLocalGatewayRouteTableVpcAssociation_tagSpecifications :: Lens.Lens' CreateLocalGatewayRouteTableVpcAssociation (Prelude.Maybe [TagSpecification])
createLocalGatewayRouteTableVpcAssociation_tagSpecifications :: Lens'
  CreateLocalGatewayRouteTableVpcAssociation
  (Maybe [TagSpecification])
createLocalGatewayRouteTableVpcAssociation_tagSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocalGatewayRouteTableVpcAssociation' {Maybe [TagSpecification]
tagSpecifications :: Maybe [TagSpecification]
$sel:tagSpecifications:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation
-> Maybe [TagSpecification]
tagSpecifications} -> Maybe [TagSpecification]
tagSpecifications) (\s :: CreateLocalGatewayRouteTableVpcAssociation
s@CreateLocalGatewayRouteTableVpcAssociation' {} Maybe [TagSpecification]
a -> CreateLocalGatewayRouteTableVpcAssociation
s {$sel:tagSpecifications:CreateLocalGatewayRouteTableVpcAssociation' :: Maybe [TagSpecification]
tagSpecifications = Maybe [TagSpecification]
a} :: CreateLocalGatewayRouteTableVpcAssociation) 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 ID of the local gateway route table.
createLocalGatewayRouteTableVpcAssociation_localGatewayRouteTableId :: Lens.Lens' CreateLocalGatewayRouteTableVpcAssociation Prelude.Text
createLocalGatewayRouteTableVpcAssociation_localGatewayRouteTableId :: Lens' CreateLocalGatewayRouteTableVpcAssociation Text
createLocalGatewayRouteTableVpcAssociation_localGatewayRouteTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocalGatewayRouteTableVpcAssociation' {Text
localGatewayRouteTableId :: Text
$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> Text
localGatewayRouteTableId} -> Text
localGatewayRouteTableId) (\s :: CreateLocalGatewayRouteTableVpcAssociation
s@CreateLocalGatewayRouteTableVpcAssociation' {} Text
a -> CreateLocalGatewayRouteTableVpcAssociation
s {$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVpcAssociation' :: Text
localGatewayRouteTableId = Text
a} :: CreateLocalGatewayRouteTableVpcAssociation)

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

instance
  Core.AWSRequest
    CreateLocalGatewayRouteTableVpcAssociation
  where
  type
    AWSResponse
      CreateLocalGatewayRouteTableVpcAssociation =
      CreateLocalGatewayRouteTableVpcAssociationResponse
  request :: (Service -> Service)
-> CreateLocalGatewayRouteTableVpcAssociation
-> Request CreateLocalGatewayRouteTableVpcAssociation
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 CreateLocalGatewayRouteTableVpcAssociation
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse CreateLocalGatewayRouteTableVpcAssociation)))
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 LocalGatewayRouteTableVpcAssociation
-> Int -> CreateLocalGatewayRouteTableVpcAssociationResponse
CreateLocalGatewayRouteTableVpcAssociationResponse'
            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
"localGatewayRouteTableVpcAssociation")
            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
    CreateLocalGatewayRouteTableVpcAssociation
  where
  hashWithSalt :: Int -> CreateLocalGatewayRouteTableVpcAssociation -> Int
hashWithSalt
    Int
_salt
    CreateLocalGatewayRouteTableVpcAssociation' {Maybe Bool
Maybe [TagSpecification]
Text
vpcId :: Text
localGatewayRouteTableId :: Text
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
$sel:vpcId:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> Text
$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> Text
$sel:tagSpecifications:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation
-> Maybe [TagSpecification]
$sel:dryRun:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> 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 [TagSpecification]
tagSpecifications
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
localGatewayRouteTableId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpcId

instance
  Prelude.NFData
    CreateLocalGatewayRouteTableVpcAssociation
  where
  rnf :: CreateLocalGatewayRouteTableVpcAssociation -> ()
rnf CreateLocalGatewayRouteTableVpcAssociation' {Maybe Bool
Maybe [TagSpecification]
Text
vpcId :: Text
localGatewayRouteTableId :: Text
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
$sel:vpcId:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> Text
$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> Text
$sel:tagSpecifications:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation
-> Maybe [TagSpecification]
$sel:dryRun:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> 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 [TagSpecification]
tagSpecifications
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
localGatewayRouteTableId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vpcId

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

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

instance
  Data.ToQuery
    CreateLocalGatewayRouteTableVpcAssociation
  where
  toQuery :: CreateLocalGatewayRouteTableVpcAssociation -> QueryString
toQuery
    CreateLocalGatewayRouteTableVpcAssociation' {Maybe Bool
Maybe [TagSpecification]
Text
vpcId :: Text
localGatewayRouteTableId :: Text
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
$sel:vpcId:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> Text
$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> Text
$sel:tagSpecifications:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation
-> Maybe [TagSpecification]
$sel:dryRun:CreateLocalGatewayRouteTableVpcAssociation' :: CreateLocalGatewayRouteTableVpcAssociation -> Maybe Bool
..} =
      forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"Action"
            forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"CreateLocalGatewayRouteTableVpcAssociation" ::
                        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
"TagSpecification"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagSpecification]
tagSpecifications
            ),
          ByteString
"LocalGatewayRouteTableId"
            forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
localGatewayRouteTableId,
          ByteString
"VpcId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
vpcId
        ]

-- | /See:/ 'newCreateLocalGatewayRouteTableVpcAssociationResponse' smart constructor.
data CreateLocalGatewayRouteTableVpcAssociationResponse = CreateLocalGatewayRouteTableVpcAssociationResponse'
  { -- | Information about the association.
    CreateLocalGatewayRouteTableVpcAssociationResponse
-> Maybe LocalGatewayRouteTableVpcAssociation
localGatewayRouteTableVpcAssociation :: Prelude.Maybe LocalGatewayRouteTableVpcAssociation,
    -- | The response's http status code.
    CreateLocalGatewayRouteTableVpcAssociationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateLocalGatewayRouteTableVpcAssociationResponse
-> CreateLocalGatewayRouteTableVpcAssociationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLocalGatewayRouteTableVpcAssociationResponse
-> CreateLocalGatewayRouteTableVpcAssociationResponse -> Bool
$c/= :: CreateLocalGatewayRouteTableVpcAssociationResponse
-> CreateLocalGatewayRouteTableVpcAssociationResponse -> Bool
== :: CreateLocalGatewayRouteTableVpcAssociationResponse
-> CreateLocalGatewayRouteTableVpcAssociationResponse -> Bool
$c== :: CreateLocalGatewayRouteTableVpcAssociationResponse
-> CreateLocalGatewayRouteTableVpcAssociationResponse -> Bool
Prelude.Eq, ReadPrec [CreateLocalGatewayRouteTableVpcAssociationResponse]
ReadPrec CreateLocalGatewayRouteTableVpcAssociationResponse
Int -> ReadS CreateLocalGatewayRouteTableVpcAssociationResponse
ReadS [CreateLocalGatewayRouteTableVpcAssociationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLocalGatewayRouteTableVpcAssociationResponse]
$creadListPrec :: ReadPrec [CreateLocalGatewayRouteTableVpcAssociationResponse]
readPrec :: ReadPrec CreateLocalGatewayRouteTableVpcAssociationResponse
$creadPrec :: ReadPrec CreateLocalGatewayRouteTableVpcAssociationResponse
readList :: ReadS [CreateLocalGatewayRouteTableVpcAssociationResponse]
$creadList :: ReadS [CreateLocalGatewayRouteTableVpcAssociationResponse]
readsPrec :: Int -> ReadS CreateLocalGatewayRouteTableVpcAssociationResponse
$creadsPrec :: Int -> ReadS CreateLocalGatewayRouteTableVpcAssociationResponse
Prelude.Read, Int -> CreateLocalGatewayRouteTableVpcAssociationResponse -> ShowS
[CreateLocalGatewayRouteTableVpcAssociationResponse] -> ShowS
CreateLocalGatewayRouteTableVpcAssociationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLocalGatewayRouteTableVpcAssociationResponse] -> ShowS
$cshowList :: [CreateLocalGatewayRouteTableVpcAssociationResponse] -> ShowS
show :: CreateLocalGatewayRouteTableVpcAssociationResponse -> String
$cshow :: CreateLocalGatewayRouteTableVpcAssociationResponse -> String
showsPrec :: Int -> CreateLocalGatewayRouteTableVpcAssociationResponse -> ShowS
$cshowsPrec :: Int -> CreateLocalGatewayRouteTableVpcAssociationResponse -> ShowS
Prelude.Show, forall x.
Rep CreateLocalGatewayRouteTableVpcAssociationResponse x
-> CreateLocalGatewayRouteTableVpcAssociationResponse
forall x.
CreateLocalGatewayRouteTableVpcAssociationResponse
-> Rep CreateLocalGatewayRouteTableVpcAssociationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLocalGatewayRouteTableVpcAssociationResponse x
-> CreateLocalGatewayRouteTableVpcAssociationResponse
$cfrom :: forall x.
CreateLocalGatewayRouteTableVpcAssociationResponse
-> Rep CreateLocalGatewayRouteTableVpcAssociationResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateLocalGatewayRouteTableVpcAssociationResponse' 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:
--
-- 'localGatewayRouteTableVpcAssociation', 'createLocalGatewayRouteTableVpcAssociationResponse_localGatewayRouteTableVpcAssociation' - Information about the association.
--
-- 'httpStatus', 'createLocalGatewayRouteTableVpcAssociationResponse_httpStatus' - The response's http status code.
newCreateLocalGatewayRouteTableVpcAssociationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateLocalGatewayRouteTableVpcAssociationResponse
newCreateLocalGatewayRouteTableVpcAssociationResponse :: Int -> CreateLocalGatewayRouteTableVpcAssociationResponse
newCreateLocalGatewayRouteTableVpcAssociationResponse
  Int
pHttpStatus_ =
    CreateLocalGatewayRouteTableVpcAssociationResponse'
      { $sel:localGatewayRouteTableVpcAssociation:CreateLocalGatewayRouteTableVpcAssociationResponse' :: Maybe LocalGatewayRouteTableVpcAssociation
localGatewayRouteTableVpcAssociation =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:CreateLocalGatewayRouteTableVpcAssociationResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | Information about the association.
createLocalGatewayRouteTableVpcAssociationResponse_localGatewayRouteTableVpcAssociation :: Lens.Lens' CreateLocalGatewayRouteTableVpcAssociationResponse (Prelude.Maybe LocalGatewayRouteTableVpcAssociation)
createLocalGatewayRouteTableVpcAssociationResponse_localGatewayRouteTableVpcAssociation :: Lens'
  CreateLocalGatewayRouteTableVpcAssociationResponse
  (Maybe LocalGatewayRouteTableVpcAssociation)
createLocalGatewayRouteTableVpcAssociationResponse_localGatewayRouteTableVpcAssociation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocalGatewayRouteTableVpcAssociationResponse' {Maybe LocalGatewayRouteTableVpcAssociation
localGatewayRouteTableVpcAssociation :: Maybe LocalGatewayRouteTableVpcAssociation
$sel:localGatewayRouteTableVpcAssociation:CreateLocalGatewayRouteTableVpcAssociationResponse' :: CreateLocalGatewayRouteTableVpcAssociationResponse
-> Maybe LocalGatewayRouteTableVpcAssociation
localGatewayRouteTableVpcAssociation} -> Maybe LocalGatewayRouteTableVpcAssociation
localGatewayRouteTableVpcAssociation) (\s :: CreateLocalGatewayRouteTableVpcAssociationResponse
s@CreateLocalGatewayRouteTableVpcAssociationResponse' {} Maybe LocalGatewayRouteTableVpcAssociation
a -> CreateLocalGatewayRouteTableVpcAssociationResponse
s {$sel:localGatewayRouteTableVpcAssociation:CreateLocalGatewayRouteTableVpcAssociationResponse' :: Maybe LocalGatewayRouteTableVpcAssociation
localGatewayRouteTableVpcAssociation = Maybe LocalGatewayRouteTableVpcAssociation
a} :: CreateLocalGatewayRouteTableVpcAssociationResponse)

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

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