{-# 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.AssociateTransitGatewayPolicyTable
-- 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 transit gateway attachment with a transit
-- gateway policy table.
module Amazonka.EC2.AssociateTransitGatewayPolicyTable
  ( -- * Creating a Request
    AssociateTransitGatewayPolicyTable (..),
    newAssociateTransitGatewayPolicyTable,

    -- * Request Lenses
    associateTransitGatewayPolicyTable_dryRun,
    associateTransitGatewayPolicyTable_transitGatewayPolicyTableId,
    associateTransitGatewayPolicyTable_transitGatewayAttachmentId,

    -- * Destructuring the Response
    AssociateTransitGatewayPolicyTableResponse (..),
    newAssociateTransitGatewayPolicyTableResponse,

    -- * Response Lenses
    associateTransitGatewayPolicyTableResponse_association,
    associateTransitGatewayPolicyTableResponse_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:/ 'newAssociateTransitGatewayPolicyTable' smart constructor.
data AssociateTransitGatewayPolicyTable = AssociateTransitGatewayPolicyTable'
  { -- | 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@.
    AssociateTransitGatewayPolicyTable -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the transit gateway policy table to associate with the transit
    -- gateway attachment.
    AssociateTransitGatewayPolicyTable -> Text
transitGatewayPolicyTableId :: Prelude.Text,
    -- | The ID of the transit gateway attachment to associate with the policy
    -- table.
    AssociateTransitGatewayPolicyTable -> Text
transitGatewayAttachmentId :: Prelude.Text
  }
  deriving (AssociateTransitGatewayPolicyTable
-> AssociateTransitGatewayPolicyTable -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateTransitGatewayPolicyTable
-> AssociateTransitGatewayPolicyTable -> Bool
$c/= :: AssociateTransitGatewayPolicyTable
-> AssociateTransitGatewayPolicyTable -> Bool
== :: AssociateTransitGatewayPolicyTable
-> AssociateTransitGatewayPolicyTable -> Bool
$c== :: AssociateTransitGatewayPolicyTable
-> AssociateTransitGatewayPolicyTable -> Bool
Prelude.Eq, ReadPrec [AssociateTransitGatewayPolicyTable]
ReadPrec AssociateTransitGatewayPolicyTable
Int -> ReadS AssociateTransitGatewayPolicyTable
ReadS [AssociateTransitGatewayPolicyTable]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateTransitGatewayPolicyTable]
$creadListPrec :: ReadPrec [AssociateTransitGatewayPolicyTable]
readPrec :: ReadPrec AssociateTransitGatewayPolicyTable
$creadPrec :: ReadPrec AssociateTransitGatewayPolicyTable
readList :: ReadS [AssociateTransitGatewayPolicyTable]
$creadList :: ReadS [AssociateTransitGatewayPolicyTable]
readsPrec :: Int -> ReadS AssociateTransitGatewayPolicyTable
$creadsPrec :: Int -> ReadS AssociateTransitGatewayPolicyTable
Prelude.Read, Int -> AssociateTransitGatewayPolicyTable -> ShowS
[AssociateTransitGatewayPolicyTable] -> ShowS
AssociateTransitGatewayPolicyTable -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateTransitGatewayPolicyTable] -> ShowS
$cshowList :: [AssociateTransitGatewayPolicyTable] -> ShowS
show :: AssociateTransitGatewayPolicyTable -> String
$cshow :: AssociateTransitGatewayPolicyTable -> String
showsPrec :: Int -> AssociateTransitGatewayPolicyTable -> ShowS
$cshowsPrec :: Int -> AssociateTransitGatewayPolicyTable -> ShowS
Prelude.Show, forall x.
Rep AssociateTransitGatewayPolicyTable x
-> AssociateTransitGatewayPolicyTable
forall x.
AssociateTransitGatewayPolicyTable
-> Rep AssociateTransitGatewayPolicyTable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateTransitGatewayPolicyTable x
-> AssociateTransitGatewayPolicyTable
$cfrom :: forall x.
AssociateTransitGatewayPolicyTable
-> Rep AssociateTransitGatewayPolicyTable x
Prelude.Generic)

-- |
-- Create a value of 'AssociateTransitGatewayPolicyTable' 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', 'associateTransitGatewayPolicyTable_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@.
--
-- 'transitGatewayPolicyTableId', 'associateTransitGatewayPolicyTable_transitGatewayPolicyTableId' - The ID of the transit gateway policy table to associate with the transit
-- gateway attachment.
--
-- 'transitGatewayAttachmentId', 'associateTransitGatewayPolicyTable_transitGatewayAttachmentId' - The ID of the transit gateway attachment to associate with the policy
-- table.
newAssociateTransitGatewayPolicyTable ::
  -- | 'transitGatewayPolicyTableId'
  Prelude.Text ->
  -- | 'transitGatewayAttachmentId'
  Prelude.Text ->
  AssociateTransitGatewayPolicyTable
newAssociateTransitGatewayPolicyTable :: Text -> Text -> AssociateTransitGatewayPolicyTable
newAssociateTransitGatewayPolicyTable
  Text
pTransitGatewayPolicyTableId_
  Text
pTransitGatewayAttachmentId_ =
    AssociateTransitGatewayPolicyTable'
      { $sel:dryRun:AssociateTransitGatewayPolicyTable' :: Maybe Bool
dryRun =
          forall a. Maybe a
Prelude.Nothing,
        $sel:transitGatewayPolicyTableId:AssociateTransitGatewayPolicyTable' :: Text
transitGatewayPolicyTableId =
          Text
pTransitGatewayPolicyTableId_,
        $sel:transitGatewayAttachmentId:AssociateTransitGatewayPolicyTable' :: Text
transitGatewayAttachmentId =
          Text
pTransitGatewayAttachmentId_
      }

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

-- | The ID of the transit gateway policy table to associate with the transit
-- gateway attachment.
associateTransitGatewayPolicyTable_transitGatewayPolicyTableId :: Lens.Lens' AssociateTransitGatewayPolicyTable Prelude.Text
associateTransitGatewayPolicyTable_transitGatewayPolicyTableId :: Lens' AssociateTransitGatewayPolicyTable Text
associateTransitGatewayPolicyTable_transitGatewayPolicyTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTransitGatewayPolicyTable' {Text
transitGatewayPolicyTableId :: Text
$sel:transitGatewayPolicyTableId:AssociateTransitGatewayPolicyTable' :: AssociateTransitGatewayPolicyTable -> Text
transitGatewayPolicyTableId} -> Text
transitGatewayPolicyTableId) (\s :: AssociateTransitGatewayPolicyTable
s@AssociateTransitGatewayPolicyTable' {} Text
a -> AssociateTransitGatewayPolicyTable
s {$sel:transitGatewayPolicyTableId:AssociateTransitGatewayPolicyTable' :: Text
transitGatewayPolicyTableId = Text
a} :: AssociateTransitGatewayPolicyTable)

-- | The ID of the transit gateway attachment to associate with the policy
-- table.
associateTransitGatewayPolicyTable_transitGatewayAttachmentId :: Lens.Lens' AssociateTransitGatewayPolicyTable Prelude.Text
associateTransitGatewayPolicyTable_transitGatewayAttachmentId :: Lens' AssociateTransitGatewayPolicyTable Text
associateTransitGatewayPolicyTable_transitGatewayAttachmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTransitGatewayPolicyTable' {Text
transitGatewayAttachmentId :: Text
$sel:transitGatewayAttachmentId:AssociateTransitGatewayPolicyTable' :: AssociateTransitGatewayPolicyTable -> Text
transitGatewayAttachmentId} -> Text
transitGatewayAttachmentId) (\s :: AssociateTransitGatewayPolicyTable
s@AssociateTransitGatewayPolicyTable' {} Text
a -> AssociateTransitGatewayPolicyTable
s {$sel:transitGatewayAttachmentId:AssociateTransitGatewayPolicyTable' :: Text
transitGatewayAttachmentId = Text
a} :: AssociateTransitGatewayPolicyTable)

instance
  Core.AWSRequest
    AssociateTransitGatewayPolicyTable
  where
  type
    AWSResponse AssociateTransitGatewayPolicyTable =
      AssociateTransitGatewayPolicyTableResponse
  request :: (Service -> Service)
-> AssociateTransitGatewayPolicyTable
-> Request AssociateTransitGatewayPolicyTable
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 AssociateTransitGatewayPolicyTable
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse AssociateTransitGatewayPolicyTable)))
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 TransitGatewayPolicyTableAssociation
-> Int -> AssociateTransitGatewayPolicyTableResponse
AssociateTransitGatewayPolicyTableResponse'
            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
"association")
            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
    AssociateTransitGatewayPolicyTable
  where
  hashWithSalt :: Int -> AssociateTransitGatewayPolicyTable -> Int
hashWithSalt
    Int
_salt
    AssociateTransitGatewayPolicyTable' {Maybe Bool
Text
transitGatewayAttachmentId :: Text
transitGatewayPolicyTableId :: Text
dryRun :: Maybe Bool
$sel:transitGatewayAttachmentId:AssociateTransitGatewayPolicyTable' :: AssociateTransitGatewayPolicyTable -> Text
$sel:transitGatewayPolicyTableId:AssociateTransitGatewayPolicyTable' :: AssociateTransitGatewayPolicyTable -> Text
$sel:dryRun:AssociateTransitGatewayPolicyTable' :: AssociateTransitGatewayPolicyTable -> 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` Text
transitGatewayPolicyTableId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
transitGatewayAttachmentId

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

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

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

instance
  Data.ToQuery
    AssociateTransitGatewayPolicyTable
  where
  toQuery :: AssociateTransitGatewayPolicyTable -> QueryString
toQuery AssociateTransitGatewayPolicyTable' {Maybe Bool
Text
transitGatewayAttachmentId :: Text
transitGatewayPolicyTableId :: Text
dryRun :: Maybe Bool
$sel:transitGatewayAttachmentId:AssociateTransitGatewayPolicyTable' :: AssociateTransitGatewayPolicyTable -> Text
$sel:transitGatewayPolicyTableId:AssociateTransitGatewayPolicyTable' :: AssociateTransitGatewayPolicyTable -> Text
$sel:dryRun:AssociateTransitGatewayPolicyTable' :: AssociateTransitGatewayPolicyTable -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"AssociateTransitGatewayPolicyTable" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        ByteString
"TransitGatewayPolicyTableId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
transitGatewayPolicyTableId,
        ByteString
"TransitGatewayAttachmentId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
transitGatewayAttachmentId
      ]

-- | /See:/ 'newAssociateTransitGatewayPolicyTableResponse' smart constructor.
data AssociateTransitGatewayPolicyTableResponse = AssociateTransitGatewayPolicyTableResponse'
  { -- | Describes the association of a transit gateway and a transit gateway
    -- policy table.
    AssociateTransitGatewayPolicyTableResponse
-> Maybe TransitGatewayPolicyTableAssociation
association :: Prelude.Maybe TransitGatewayPolicyTableAssociation,
    -- | The response's http status code.
    AssociateTransitGatewayPolicyTableResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociateTransitGatewayPolicyTableResponse
-> AssociateTransitGatewayPolicyTableResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateTransitGatewayPolicyTableResponse
-> AssociateTransitGatewayPolicyTableResponse -> Bool
$c/= :: AssociateTransitGatewayPolicyTableResponse
-> AssociateTransitGatewayPolicyTableResponse -> Bool
== :: AssociateTransitGatewayPolicyTableResponse
-> AssociateTransitGatewayPolicyTableResponse -> Bool
$c== :: AssociateTransitGatewayPolicyTableResponse
-> AssociateTransitGatewayPolicyTableResponse -> Bool
Prelude.Eq, ReadPrec [AssociateTransitGatewayPolicyTableResponse]
ReadPrec AssociateTransitGatewayPolicyTableResponse
Int -> ReadS AssociateTransitGatewayPolicyTableResponse
ReadS [AssociateTransitGatewayPolicyTableResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateTransitGatewayPolicyTableResponse]
$creadListPrec :: ReadPrec [AssociateTransitGatewayPolicyTableResponse]
readPrec :: ReadPrec AssociateTransitGatewayPolicyTableResponse
$creadPrec :: ReadPrec AssociateTransitGatewayPolicyTableResponse
readList :: ReadS [AssociateTransitGatewayPolicyTableResponse]
$creadList :: ReadS [AssociateTransitGatewayPolicyTableResponse]
readsPrec :: Int -> ReadS AssociateTransitGatewayPolicyTableResponse
$creadsPrec :: Int -> ReadS AssociateTransitGatewayPolicyTableResponse
Prelude.Read, Int -> AssociateTransitGatewayPolicyTableResponse -> ShowS
[AssociateTransitGatewayPolicyTableResponse] -> ShowS
AssociateTransitGatewayPolicyTableResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateTransitGatewayPolicyTableResponse] -> ShowS
$cshowList :: [AssociateTransitGatewayPolicyTableResponse] -> ShowS
show :: AssociateTransitGatewayPolicyTableResponse -> String
$cshow :: AssociateTransitGatewayPolicyTableResponse -> String
showsPrec :: Int -> AssociateTransitGatewayPolicyTableResponse -> ShowS
$cshowsPrec :: Int -> AssociateTransitGatewayPolicyTableResponse -> ShowS
Prelude.Show, forall x.
Rep AssociateTransitGatewayPolicyTableResponse x
-> AssociateTransitGatewayPolicyTableResponse
forall x.
AssociateTransitGatewayPolicyTableResponse
-> Rep AssociateTransitGatewayPolicyTableResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateTransitGatewayPolicyTableResponse x
-> AssociateTransitGatewayPolicyTableResponse
$cfrom :: forall x.
AssociateTransitGatewayPolicyTableResponse
-> Rep AssociateTransitGatewayPolicyTableResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateTransitGatewayPolicyTableResponse' 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:
--
-- 'association', 'associateTransitGatewayPolicyTableResponse_association' - Describes the association of a transit gateway and a transit gateway
-- policy table.
--
-- 'httpStatus', 'associateTransitGatewayPolicyTableResponse_httpStatus' - The response's http status code.
newAssociateTransitGatewayPolicyTableResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateTransitGatewayPolicyTableResponse
newAssociateTransitGatewayPolicyTableResponse :: Int -> AssociateTransitGatewayPolicyTableResponse
newAssociateTransitGatewayPolicyTableResponse
  Int
pHttpStatus_ =
    AssociateTransitGatewayPolicyTableResponse'
      { $sel:association:AssociateTransitGatewayPolicyTableResponse' :: Maybe TransitGatewayPolicyTableAssociation
association =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AssociateTransitGatewayPolicyTableResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Describes the association of a transit gateway and a transit gateway
-- policy table.
associateTransitGatewayPolicyTableResponse_association :: Lens.Lens' AssociateTransitGatewayPolicyTableResponse (Prelude.Maybe TransitGatewayPolicyTableAssociation)
associateTransitGatewayPolicyTableResponse_association :: Lens'
  AssociateTransitGatewayPolicyTableResponse
  (Maybe TransitGatewayPolicyTableAssociation)
associateTransitGatewayPolicyTableResponse_association = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTransitGatewayPolicyTableResponse' {Maybe TransitGatewayPolicyTableAssociation
association :: Maybe TransitGatewayPolicyTableAssociation
$sel:association:AssociateTransitGatewayPolicyTableResponse' :: AssociateTransitGatewayPolicyTableResponse
-> Maybe TransitGatewayPolicyTableAssociation
association} -> Maybe TransitGatewayPolicyTableAssociation
association) (\s :: AssociateTransitGatewayPolicyTableResponse
s@AssociateTransitGatewayPolicyTableResponse' {} Maybe TransitGatewayPolicyTableAssociation
a -> AssociateTransitGatewayPolicyTableResponse
s {$sel:association:AssociateTransitGatewayPolicyTableResponse' :: Maybe TransitGatewayPolicyTableAssociation
association = Maybe TransitGatewayPolicyTableAssociation
a} :: AssociateTransitGatewayPolicyTableResponse)

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

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