{-# 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.AssociateTransitGatewayMulticastDomain
-- 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 subnets and transit gateway attachments with
-- the specified transit gateway multicast domain.
--
-- The transit gateway attachment must be in the available state before you
-- can add a resource. Use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGatewayAttachments.html DescribeTransitGatewayAttachments>
-- to see the state of the attachment.
module Amazonka.EC2.AssociateTransitGatewayMulticastDomain
  ( -- * Creating a Request
    AssociateTransitGatewayMulticastDomain (..),
    newAssociateTransitGatewayMulticastDomain,

    -- * Request Lenses
    associateTransitGatewayMulticastDomain_dryRun,
    associateTransitGatewayMulticastDomain_subnetIds,
    associateTransitGatewayMulticastDomain_transitGatewayAttachmentId,
    associateTransitGatewayMulticastDomain_transitGatewayMulticastDomainId,

    -- * Destructuring the Response
    AssociateTransitGatewayMulticastDomainResponse (..),
    newAssociateTransitGatewayMulticastDomainResponse,

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

-- |
-- Create a value of 'AssociateTransitGatewayMulticastDomain' 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', 'associateTransitGatewayMulticastDomain_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@.
--
-- 'subnetIds', 'associateTransitGatewayMulticastDomain_subnetIds' - The IDs of the subnets to associate with the transit gateway multicast
-- domain.
--
-- 'transitGatewayAttachmentId', 'associateTransitGatewayMulticastDomain_transitGatewayAttachmentId' - The ID of the transit gateway attachment to associate with the transit
-- gateway multicast domain.
--
-- 'transitGatewayMulticastDomainId', 'associateTransitGatewayMulticastDomain_transitGatewayMulticastDomainId' - The ID of the transit gateway multicast domain.
newAssociateTransitGatewayMulticastDomain ::
  AssociateTransitGatewayMulticastDomain
newAssociateTransitGatewayMulticastDomain :: AssociateTransitGatewayMulticastDomain
newAssociateTransitGatewayMulticastDomain =
  AssociateTransitGatewayMulticastDomain'
    { $sel:dryRun:AssociateTransitGatewayMulticastDomain' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:AssociateTransitGatewayMulticastDomain' :: Maybe [Text]
subnetIds = forall a. Maybe a
Prelude.Nothing,
      $sel:transitGatewayAttachmentId:AssociateTransitGatewayMulticastDomain' :: Maybe Text
transitGatewayAttachmentId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:transitGatewayMulticastDomainId:AssociateTransitGatewayMulticastDomain' :: Maybe Text
transitGatewayMulticastDomainId =
        forall a. Maybe a
Prelude.Nothing
    }

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

-- | The IDs of the subnets to associate with the transit gateway multicast
-- domain.
associateTransitGatewayMulticastDomain_subnetIds :: Lens.Lens' AssociateTransitGatewayMulticastDomain (Prelude.Maybe [Prelude.Text])
associateTransitGatewayMulticastDomain_subnetIds :: Lens' AssociateTransitGatewayMulticastDomain (Maybe [Text])
associateTransitGatewayMulticastDomain_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTransitGatewayMulticastDomain' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: AssociateTransitGatewayMulticastDomain
s@AssociateTransitGatewayMulticastDomain' {} Maybe [Text]
a -> AssociateTransitGatewayMulticastDomain
s {$sel:subnetIds:AssociateTransitGatewayMulticastDomain' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: AssociateTransitGatewayMulticastDomain) 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 transit gateway attachment to associate with the transit
-- gateway multicast domain.
associateTransitGatewayMulticastDomain_transitGatewayAttachmentId :: Lens.Lens' AssociateTransitGatewayMulticastDomain (Prelude.Maybe Prelude.Text)
associateTransitGatewayMulticastDomain_transitGatewayAttachmentId :: Lens' AssociateTransitGatewayMulticastDomain (Maybe Text)
associateTransitGatewayMulticastDomain_transitGatewayAttachmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTransitGatewayMulticastDomain' {Maybe Text
transitGatewayAttachmentId :: Maybe Text
$sel:transitGatewayAttachmentId:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe Text
transitGatewayAttachmentId} -> Maybe Text
transitGatewayAttachmentId) (\s :: AssociateTransitGatewayMulticastDomain
s@AssociateTransitGatewayMulticastDomain' {} Maybe Text
a -> AssociateTransitGatewayMulticastDomain
s {$sel:transitGatewayAttachmentId:AssociateTransitGatewayMulticastDomain' :: Maybe Text
transitGatewayAttachmentId = Maybe Text
a} :: AssociateTransitGatewayMulticastDomain)

-- | The ID of the transit gateway multicast domain.
associateTransitGatewayMulticastDomain_transitGatewayMulticastDomainId :: Lens.Lens' AssociateTransitGatewayMulticastDomain (Prelude.Maybe Prelude.Text)
associateTransitGatewayMulticastDomain_transitGatewayMulticastDomainId :: Lens' AssociateTransitGatewayMulticastDomain (Maybe Text)
associateTransitGatewayMulticastDomain_transitGatewayMulticastDomainId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTransitGatewayMulticastDomain' {Maybe Text
transitGatewayMulticastDomainId :: Maybe Text
$sel:transitGatewayMulticastDomainId:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe Text
transitGatewayMulticastDomainId} -> Maybe Text
transitGatewayMulticastDomainId) (\s :: AssociateTransitGatewayMulticastDomain
s@AssociateTransitGatewayMulticastDomain' {} Maybe Text
a -> AssociateTransitGatewayMulticastDomain
s {$sel:transitGatewayMulticastDomainId:AssociateTransitGatewayMulticastDomain' :: Maybe Text
transitGatewayMulticastDomainId = Maybe Text
a} :: AssociateTransitGatewayMulticastDomain)

instance
  Core.AWSRequest
    AssociateTransitGatewayMulticastDomain
  where
  type
    AWSResponse
      AssociateTransitGatewayMulticastDomain =
      AssociateTransitGatewayMulticastDomainResponse
  request :: (Service -> Service)
-> AssociateTransitGatewayMulticastDomain
-> Request AssociateTransitGatewayMulticastDomain
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 AssociateTransitGatewayMulticastDomain
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse AssociateTransitGatewayMulticastDomain)))
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 TransitGatewayMulticastDomainAssociations
-> Int -> AssociateTransitGatewayMulticastDomainResponse
AssociateTransitGatewayMulticastDomainResponse'
            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
"associations")
            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
    AssociateTransitGatewayMulticastDomain
  where
  hashWithSalt :: Int -> AssociateTransitGatewayMulticastDomain -> Int
hashWithSalt
    Int
_salt
    AssociateTransitGatewayMulticastDomain' {Maybe Bool
Maybe [Text]
Maybe Text
transitGatewayMulticastDomainId :: Maybe Text
transitGatewayAttachmentId :: Maybe Text
subnetIds :: Maybe [Text]
dryRun :: Maybe Bool
$sel:transitGatewayMulticastDomainId:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe Text
$sel:transitGatewayAttachmentId:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe Text
$sel:subnetIds:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe [Text]
$sel:dryRun:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> 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 [Text]
subnetIds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transitGatewayAttachmentId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transitGatewayMulticastDomainId

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

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

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

instance
  Data.ToQuery
    AssociateTransitGatewayMulticastDomain
  where
  toQuery :: AssociateTransitGatewayMulticastDomain -> QueryString
toQuery AssociateTransitGatewayMulticastDomain' {Maybe Bool
Maybe [Text]
Maybe Text
transitGatewayMulticastDomainId :: Maybe Text
transitGatewayAttachmentId :: Maybe Text
subnetIds :: Maybe [Text]
dryRun :: Maybe Bool
$sel:transitGatewayMulticastDomainId:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe Text
$sel:transitGatewayAttachmentId:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe Text
$sel:subnetIds:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe [Text]
$sel:dryRun:AssociateTransitGatewayMulticastDomain' :: AssociateTransitGatewayMulticastDomain -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"AssociateTransitGatewayMulticastDomain" ::
                      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
"SubnetIds" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
subnetIds),
        ByteString
"TransitGatewayAttachmentId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
transitGatewayAttachmentId,
        ByteString
"TransitGatewayMulticastDomainId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
transitGatewayMulticastDomainId
      ]

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

-- |
-- Create a value of 'AssociateTransitGatewayMulticastDomainResponse' 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:
--
-- 'associations', 'associateTransitGatewayMulticastDomainResponse_associations' - Information about the transit gateway multicast domain associations.
--
-- 'httpStatus', 'associateTransitGatewayMulticastDomainResponse_httpStatus' - The response's http status code.
newAssociateTransitGatewayMulticastDomainResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateTransitGatewayMulticastDomainResponse
newAssociateTransitGatewayMulticastDomainResponse :: Int -> AssociateTransitGatewayMulticastDomainResponse
newAssociateTransitGatewayMulticastDomainResponse
  Int
pHttpStatus_ =
    AssociateTransitGatewayMulticastDomainResponse'
      { $sel:associations:AssociateTransitGatewayMulticastDomainResponse' :: Maybe TransitGatewayMulticastDomainAssociations
associations =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AssociateTransitGatewayMulticastDomainResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Information about the transit gateway multicast domain associations.
associateTransitGatewayMulticastDomainResponse_associations :: Lens.Lens' AssociateTransitGatewayMulticastDomainResponse (Prelude.Maybe TransitGatewayMulticastDomainAssociations)
associateTransitGatewayMulticastDomainResponse_associations :: Lens'
  AssociateTransitGatewayMulticastDomainResponse
  (Maybe TransitGatewayMulticastDomainAssociations)
associateTransitGatewayMulticastDomainResponse_associations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateTransitGatewayMulticastDomainResponse' {Maybe TransitGatewayMulticastDomainAssociations
associations :: Maybe TransitGatewayMulticastDomainAssociations
$sel:associations:AssociateTransitGatewayMulticastDomainResponse' :: AssociateTransitGatewayMulticastDomainResponse
-> Maybe TransitGatewayMulticastDomainAssociations
associations} -> Maybe TransitGatewayMulticastDomainAssociations
associations) (\s :: AssociateTransitGatewayMulticastDomainResponse
s@AssociateTransitGatewayMulticastDomainResponse' {} Maybe TransitGatewayMulticastDomainAssociations
a -> AssociateTransitGatewayMulticastDomainResponse
s {$sel:associations:AssociateTransitGatewayMulticastDomainResponse' :: Maybe TransitGatewayMulticastDomainAssociations
associations = Maybe TransitGatewayMulticastDomainAssociations
a} :: AssociateTransitGatewayMulticastDomainResponse)

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

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