{-# 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.CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a local gateway route table virtual interface group association.
module Amazonka.EC2.CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
  ( -- * Creating a Request
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation (..),
    newCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation,

    -- * Request Lenses
    createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_dryRun,
    createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_tagSpecifications,
    createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayRouteTableId,
    createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayVirtualInterfaceGroupId,

    -- * Destructuring the Response
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse (..),
    newCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse,

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

-- |
-- Create a value of 'CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' 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', 'createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_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', 'createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_tagSpecifications' - The tags assigned to the local gateway route table virtual interface
-- group association.
--
-- 'localGatewayRouteTableId', 'createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayRouteTableId' - The ID of the local gateway route table.
--
-- 'localGatewayVirtualInterfaceGroupId', 'createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayVirtualInterfaceGroupId' - The ID of the local gateway route table virtual interface group
-- association.
newCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation ::
  -- | 'localGatewayRouteTableId'
  Prelude.Text ->
  -- | 'localGatewayVirtualInterfaceGroupId'
  Prelude.Text ->
  CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
newCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation :: Text
-> Text
-> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
newCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
  Text
pLocalGatewayRouteTableId_
  Text
pLocalGatewayVirtualInterfaceGroupId_ =
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation'
      { $sel:dryRun:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: Maybe Bool
dryRun =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tagSpecifications:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: Maybe [TagSpecification]
tagSpecifications =
          forall a. Maybe a
Prelude.Nothing,
        $sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: Text
localGatewayRouteTableId =
          Text
pLocalGatewayRouteTableId_,
        $sel:localGatewayVirtualInterfaceGroupId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: Text
localGatewayVirtualInterfaceGroupId =
          Text
pLocalGatewayVirtualInterfaceGroupId_
      }

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

-- | The tags assigned to the local gateway route table virtual interface
-- group association.
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_tagSpecifications :: Lens.Lens' CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation (Prelude.Maybe [TagSpecification])
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_tagSpecifications :: Lens'
  CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
  (Maybe [TagSpecification])
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_tagSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {Maybe [TagSpecification]
tagSpecifications :: Maybe [TagSpecification]
$sel:tagSpecifications:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Maybe [TagSpecification]
tagSpecifications} -> Maybe [TagSpecification]
tagSpecifications) (\s :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
s@CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {} Maybe [TagSpecification]
a -> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
s {$sel:tagSpecifications:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: Maybe [TagSpecification]
tagSpecifications = Maybe [TagSpecification]
a} :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation) 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.
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayRouteTableId :: Lens.Lens' CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation Prelude.Text
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayRouteTableId :: Lens'
  CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation Text
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayRouteTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {Text
localGatewayRouteTableId :: Text
$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Text
localGatewayRouteTableId} -> Text
localGatewayRouteTableId) (\s :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
s@CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {} Text
a -> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
s {$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: Text
localGatewayRouteTableId = Text
a} :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation)

-- | The ID of the local gateway route table virtual interface group
-- association.
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayVirtualInterfaceGroupId :: Lens.Lens' CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation Prelude.Text
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayVirtualInterfaceGroupId :: Lens'
  CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation Text
createLocalGatewayRouteTableVirtualInterfaceGroupAssociation_localGatewayVirtualInterfaceGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {Text
localGatewayVirtualInterfaceGroupId :: Text
$sel:localGatewayVirtualInterfaceGroupId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Text
localGatewayVirtualInterfaceGroupId} -> Text
localGatewayVirtualInterfaceGroupId) (\s :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
s@CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {} Text
a -> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
s {$sel:localGatewayVirtualInterfaceGroupId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: Text
localGatewayVirtualInterfaceGroupId = Text
a} :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation)

instance
  Core.AWSRequest
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
  where
  type
    AWSResponse
      CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation =
      CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
  request :: (Service -> Service)
-> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Request
     CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
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
     CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse
              CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation)))
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 LocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Int
-> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse'
            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
"localGatewayRouteTableVirtualInterfaceGroupAssociation"
                        )
            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
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
  where
  hashWithSalt :: Int
-> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Int
hashWithSalt
    Int
_salt
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {Maybe Bool
Maybe [TagSpecification]
Text
localGatewayVirtualInterfaceGroupId :: Text
localGatewayRouteTableId :: Text
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
$sel:localGatewayVirtualInterfaceGroupId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Text
$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Text
$sel:tagSpecifications:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Maybe [TagSpecification]
$sel:dryRun:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> 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
localGatewayVirtualInterfaceGroupId

instance
  Prelude.NFData
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
  where
  rnf :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation -> ()
rnf
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {Maybe Bool
Maybe [TagSpecification]
Text
localGatewayVirtualInterfaceGroupId :: Text
localGatewayRouteTableId :: Text
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
$sel:localGatewayVirtualInterfaceGroupId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Text
$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Text
$sel:tagSpecifications:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Maybe [TagSpecification]
$sel:dryRun:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> 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
localGatewayVirtualInterfaceGroupId

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

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

instance
  Data.ToQuery
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
  where
  toQuery :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> QueryString
toQuery
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' {Maybe Bool
Maybe [TagSpecification]
Text
localGatewayVirtualInterfaceGroupId :: Text
localGatewayRouteTableId :: Text
tagSpecifications :: Maybe [TagSpecification]
dryRun :: Maybe Bool
$sel:localGatewayVirtualInterfaceGroupId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Text
$sel:localGatewayRouteTableId:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Text
$sel:tagSpecifications:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Maybe [TagSpecification]
$sel:dryRun:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation
-> Maybe Bool
..} =
      forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"Action"
            forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation" ::
                        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
"LocalGatewayVirtualInterfaceGroupId"
            forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
localGatewayVirtualInterfaceGroupId
        ]

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

-- |
-- Create a value of 'CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse' 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:
--
-- 'localGatewayRouteTableVirtualInterfaceGroupAssociation', 'createLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse_localGatewayRouteTableVirtualInterfaceGroupAssociation' - Information about the local gateway route table virtual interface group
-- association.
--
-- 'httpStatus', 'createLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse_httpStatus' - The response's http status code.
newCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
newCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse :: Int
-> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
newCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
  Int
pHttpStatus_ =
    CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse'
      { $sel:localGatewayRouteTableVirtualInterfaceGroupAssociation:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse' :: Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation
localGatewayRouteTableVirtualInterfaceGroupAssociation =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | Information about the local gateway route table virtual interface group
-- association.
createLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse_localGatewayRouteTableVirtualInterfaceGroupAssociation :: Lens.Lens' CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse (Prelude.Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation)
createLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse_localGatewayRouteTableVirtualInterfaceGroupAssociation :: Lens'
  CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
  (Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation)
createLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse_localGatewayRouteTableVirtualInterfaceGroupAssociation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse' {Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation
localGatewayRouteTableVirtualInterfaceGroupAssociation :: Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation
$sel:localGatewayRouteTableVirtualInterfaceGroupAssociation:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse' :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
-> Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation
localGatewayRouteTableVirtualInterfaceGroupAssociation} -> Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation
localGatewayRouteTableVirtualInterfaceGroupAssociation) (\s :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
s@CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse' {} Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation
a -> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse
s {$sel:localGatewayRouteTableVirtualInterfaceGroupAssociation:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse' :: Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation
localGatewayRouteTableVirtualInterfaceGroupAssociation = Maybe LocalGatewayRouteTableVirtualInterfaceGroupAssociation
a} :: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationResponse)

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

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