{-# 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.RegisterTransitGatewayMulticastGroupSources
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Registers sources (network interfaces) with the specified transit
-- gateway multicast group.
--
-- A multicast source is a network interface attached to a supported
-- instance that sends multicast traffic. For information about supported
-- instances, see
-- <https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits Multicast Considerations>
-- in /Amazon VPC Transit Gateways/.
--
-- After you add the source, use
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html SearchTransitGatewayMulticastGroups>
-- to verify that the source was added to the multicast group.
module Amazonka.EC2.RegisterTransitGatewayMulticastGroupSources
  ( -- * Creating a Request
    RegisterTransitGatewayMulticastGroupSources (..),
    newRegisterTransitGatewayMulticastGroupSources,

    -- * Request Lenses
    registerTransitGatewayMulticastGroupSources_dryRun,
    registerTransitGatewayMulticastGroupSources_groupIpAddress,
    registerTransitGatewayMulticastGroupSources_networkInterfaceIds,
    registerTransitGatewayMulticastGroupSources_transitGatewayMulticastDomainId,

    -- * Destructuring the Response
    RegisterTransitGatewayMulticastGroupSourcesResponse (..),
    newRegisterTransitGatewayMulticastGroupSourcesResponse,

    -- * Response Lenses
    registerTransitGatewayMulticastGroupSourcesResponse_registeredMulticastGroupSources,
    registerTransitGatewayMulticastGroupSourcesResponse_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:/ 'newRegisterTransitGatewayMulticastGroupSources' smart constructor.
data RegisterTransitGatewayMulticastGroupSources = RegisterTransitGatewayMulticastGroupSources'
  { -- | 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@.
    RegisterTransitGatewayMulticastGroupSources -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The IP address assigned to the transit gateway multicast group.
    RegisterTransitGatewayMulticastGroupSources -> Maybe Text
groupIpAddress :: Prelude.Maybe Prelude.Text,
    -- | The group sources\' network interface IDs to register with the transit
    -- gateway multicast group.
    RegisterTransitGatewayMulticastGroupSources -> Maybe [Text]
networkInterfaceIds :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the transit gateway multicast domain.
    RegisterTransitGatewayMulticastGroupSources -> Maybe Text
transitGatewayMulticastDomainId :: Prelude.Maybe Prelude.Text
  }
  deriving (RegisterTransitGatewayMulticastGroupSources
-> RegisterTransitGatewayMulticastGroupSources -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterTransitGatewayMulticastGroupSources
-> RegisterTransitGatewayMulticastGroupSources -> Bool
$c/= :: RegisterTransitGatewayMulticastGroupSources
-> RegisterTransitGatewayMulticastGroupSources -> Bool
== :: RegisterTransitGatewayMulticastGroupSources
-> RegisterTransitGatewayMulticastGroupSources -> Bool
$c== :: RegisterTransitGatewayMulticastGroupSources
-> RegisterTransitGatewayMulticastGroupSources -> Bool
Prelude.Eq, ReadPrec [RegisterTransitGatewayMulticastGroupSources]
ReadPrec RegisterTransitGatewayMulticastGroupSources
Int -> ReadS RegisterTransitGatewayMulticastGroupSources
ReadS [RegisterTransitGatewayMulticastGroupSources]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterTransitGatewayMulticastGroupSources]
$creadListPrec :: ReadPrec [RegisterTransitGatewayMulticastGroupSources]
readPrec :: ReadPrec RegisterTransitGatewayMulticastGroupSources
$creadPrec :: ReadPrec RegisterTransitGatewayMulticastGroupSources
readList :: ReadS [RegisterTransitGatewayMulticastGroupSources]
$creadList :: ReadS [RegisterTransitGatewayMulticastGroupSources]
readsPrec :: Int -> ReadS RegisterTransitGatewayMulticastGroupSources
$creadsPrec :: Int -> ReadS RegisterTransitGatewayMulticastGroupSources
Prelude.Read, Int -> RegisterTransitGatewayMulticastGroupSources -> ShowS
[RegisterTransitGatewayMulticastGroupSources] -> ShowS
RegisterTransitGatewayMulticastGroupSources -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterTransitGatewayMulticastGroupSources] -> ShowS
$cshowList :: [RegisterTransitGatewayMulticastGroupSources] -> ShowS
show :: RegisterTransitGatewayMulticastGroupSources -> String
$cshow :: RegisterTransitGatewayMulticastGroupSources -> String
showsPrec :: Int -> RegisterTransitGatewayMulticastGroupSources -> ShowS
$cshowsPrec :: Int -> RegisterTransitGatewayMulticastGroupSources -> ShowS
Prelude.Show, forall x.
Rep RegisterTransitGatewayMulticastGroupSources x
-> RegisterTransitGatewayMulticastGroupSources
forall x.
RegisterTransitGatewayMulticastGroupSources
-> Rep RegisterTransitGatewayMulticastGroupSources x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegisterTransitGatewayMulticastGroupSources x
-> RegisterTransitGatewayMulticastGroupSources
$cfrom :: forall x.
RegisterTransitGatewayMulticastGroupSources
-> Rep RegisterTransitGatewayMulticastGroupSources x
Prelude.Generic)

-- |
-- Create a value of 'RegisterTransitGatewayMulticastGroupSources' 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', 'registerTransitGatewayMulticastGroupSources_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@.
--
-- 'groupIpAddress', 'registerTransitGatewayMulticastGroupSources_groupIpAddress' - The IP address assigned to the transit gateway multicast group.
--
-- 'networkInterfaceIds', 'registerTransitGatewayMulticastGroupSources_networkInterfaceIds' - The group sources\' network interface IDs to register with the transit
-- gateway multicast group.
--
-- 'transitGatewayMulticastDomainId', 'registerTransitGatewayMulticastGroupSources_transitGatewayMulticastDomainId' - The ID of the transit gateway multicast domain.
newRegisterTransitGatewayMulticastGroupSources ::
  RegisterTransitGatewayMulticastGroupSources
newRegisterTransitGatewayMulticastGroupSources :: RegisterTransitGatewayMulticastGroupSources
newRegisterTransitGatewayMulticastGroupSources =
  RegisterTransitGatewayMulticastGroupSources'
    { $sel:dryRun:RegisterTransitGatewayMulticastGroupSources' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:groupIpAddress:RegisterTransitGatewayMulticastGroupSources' :: Maybe Text
groupIpAddress =
        forall a. Maybe a
Prelude.Nothing,
      $sel:networkInterfaceIds:RegisterTransitGatewayMulticastGroupSources' :: Maybe [Text]
networkInterfaceIds =
        forall a. Maybe a
Prelude.Nothing,
      $sel:transitGatewayMulticastDomainId:RegisterTransitGatewayMulticastGroupSources' :: 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@.
registerTransitGatewayMulticastGroupSources_dryRun :: Lens.Lens' RegisterTransitGatewayMulticastGroupSources (Prelude.Maybe Prelude.Bool)
registerTransitGatewayMulticastGroupSources_dryRun :: Lens' RegisterTransitGatewayMulticastGroupSources (Maybe Bool)
registerTransitGatewayMulticastGroupSources_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTransitGatewayMulticastGroupSources' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: RegisterTransitGatewayMulticastGroupSources
s@RegisterTransitGatewayMulticastGroupSources' {} Maybe Bool
a -> RegisterTransitGatewayMulticastGroupSources
s {$sel:dryRun:RegisterTransitGatewayMulticastGroupSources' :: Maybe Bool
dryRun = Maybe Bool
a} :: RegisterTransitGatewayMulticastGroupSources)

-- | The IP address assigned to the transit gateway multicast group.
registerTransitGatewayMulticastGroupSources_groupIpAddress :: Lens.Lens' RegisterTransitGatewayMulticastGroupSources (Prelude.Maybe Prelude.Text)
registerTransitGatewayMulticastGroupSources_groupIpAddress :: Lens' RegisterTransitGatewayMulticastGroupSources (Maybe Text)
registerTransitGatewayMulticastGroupSources_groupIpAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTransitGatewayMulticastGroupSources' {Maybe Text
groupIpAddress :: Maybe Text
$sel:groupIpAddress:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe Text
groupIpAddress} -> Maybe Text
groupIpAddress) (\s :: RegisterTransitGatewayMulticastGroupSources
s@RegisterTransitGatewayMulticastGroupSources' {} Maybe Text
a -> RegisterTransitGatewayMulticastGroupSources
s {$sel:groupIpAddress:RegisterTransitGatewayMulticastGroupSources' :: Maybe Text
groupIpAddress = Maybe Text
a} :: RegisterTransitGatewayMulticastGroupSources)

-- | The group sources\' network interface IDs to register with the transit
-- gateway multicast group.
registerTransitGatewayMulticastGroupSources_networkInterfaceIds :: Lens.Lens' RegisterTransitGatewayMulticastGroupSources (Prelude.Maybe [Prelude.Text])
registerTransitGatewayMulticastGroupSources_networkInterfaceIds :: Lens' RegisterTransitGatewayMulticastGroupSources (Maybe [Text])
registerTransitGatewayMulticastGroupSources_networkInterfaceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTransitGatewayMulticastGroupSources' {Maybe [Text]
networkInterfaceIds :: Maybe [Text]
$sel:networkInterfaceIds:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe [Text]
networkInterfaceIds} -> Maybe [Text]
networkInterfaceIds) (\s :: RegisterTransitGatewayMulticastGroupSources
s@RegisterTransitGatewayMulticastGroupSources' {} Maybe [Text]
a -> RegisterTransitGatewayMulticastGroupSources
s {$sel:networkInterfaceIds:RegisterTransitGatewayMulticastGroupSources' :: Maybe [Text]
networkInterfaceIds = Maybe [Text]
a} :: RegisterTransitGatewayMulticastGroupSources) 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 multicast domain.
registerTransitGatewayMulticastGroupSources_transitGatewayMulticastDomainId :: Lens.Lens' RegisterTransitGatewayMulticastGroupSources (Prelude.Maybe Prelude.Text)
registerTransitGatewayMulticastGroupSources_transitGatewayMulticastDomainId :: Lens' RegisterTransitGatewayMulticastGroupSources (Maybe Text)
registerTransitGatewayMulticastGroupSources_transitGatewayMulticastDomainId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTransitGatewayMulticastGroupSources' {Maybe Text
transitGatewayMulticastDomainId :: Maybe Text
$sel:transitGatewayMulticastDomainId:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe Text
transitGatewayMulticastDomainId} -> Maybe Text
transitGatewayMulticastDomainId) (\s :: RegisterTransitGatewayMulticastGroupSources
s@RegisterTransitGatewayMulticastGroupSources' {} Maybe Text
a -> RegisterTransitGatewayMulticastGroupSources
s {$sel:transitGatewayMulticastDomainId:RegisterTransitGatewayMulticastGroupSources' :: Maybe Text
transitGatewayMulticastDomainId = Maybe Text
a} :: RegisterTransitGatewayMulticastGroupSources)

instance
  Core.AWSRequest
    RegisterTransitGatewayMulticastGroupSources
  where
  type
    AWSResponse
      RegisterTransitGatewayMulticastGroupSources =
      RegisterTransitGatewayMulticastGroupSourcesResponse
  request :: (Service -> Service)
-> RegisterTransitGatewayMulticastGroupSources
-> Request RegisterTransitGatewayMulticastGroupSources
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 RegisterTransitGatewayMulticastGroupSources
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse RegisterTransitGatewayMulticastGroupSources)))
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 TransitGatewayMulticastRegisteredGroupSources
-> Int -> RegisterTransitGatewayMulticastGroupSourcesResponse
RegisterTransitGatewayMulticastGroupSourcesResponse'
            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
"registeredMulticastGroupSources")
            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
    RegisterTransitGatewayMulticastGroupSources
  where
  hashWithSalt :: Int -> RegisterTransitGatewayMulticastGroupSources -> Int
hashWithSalt
    Int
_salt
    RegisterTransitGatewayMulticastGroupSources' {Maybe Bool
Maybe [Text]
Maybe Text
transitGatewayMulticastDomainId :: Maybe Text
networkInterfaceIds :: Maybe [Text]
groupIpAddress :: Maybe Text
dryRun :: Maybe Bool
$sel:transitGatewayMulticastDomainId:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe Text
$sel:networkInterfaceIds:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe [Text]
$sel:groupIpAddress:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe Text
$sel:dryRun:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> 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
groupIpAddress
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
networkInterfaceIds
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transitGatewayMulticastDomainId

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

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

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

instance
  Data.ToQuery
    RegisterTransitGatewayMulticastGroupSources
  where
  toQuery :: RegisterTransitGatewayMulticastGroupSources -> QueryString
toQuery
    RegisterTransitGatewayMulticastGroupSources' {Maybe Bool
Maybe [Text]
Maybe Text
transitGatewayMulticastDomainId :: Maybe Text
networkInterfaceIds :: Maybe [Text]
groupIpAddress :: Maybe Text
dryRun :: Maybe Bool
$sel:transitGatewayMulticastDomainId:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe Text
$sel:networkInterfaceIds:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe [Text]
$sel:groupIpAddress:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe Text
$sel:dryRun:RegisterTransitGatewayMulticastGroupSources' :: RegisterTransitGatewayMulticastGroupSources -> Maybe Bool
..} =
      forall a. Monoid a => [a] -> a
Prelude.mconcat
        [ ByteString
"Action"
            forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"RegisterTransitGatewayMulticastGroupSources" ::
                        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
"GroupIpAddress" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
groupIpAddress,
          forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"NetworkInterfaceIds"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
networkInterfaceIds
            ),
          ByteString
"TransitGatewayMulticastDomainId"
            forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
transitGatewayMulticastDomainId
        ]

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

-- |
-- Create a value of 'RegisterTransitGatewayMulticastGroupSourcesResponse' 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:
--
-- 'registeredMulticastGroupSources', 'registerTransitGatewayMulticastGroupSourcesResponse_registeredMulticastGroupSources' - Information about the transit gateway multicast group sources.
--
-- 'httpStatus', 'registerTransitGatewayMulticastGroupSourcesResponse_httpStatus' - The response's http status code.
newRegisterTransitGatewayMulticastGroupSourcesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RegisterTransitGatewayMulticastGroupSourcesResponse
newRegisterTransitGatewayMulticastGroupSourcesResponse :: Int -> RegisterTransitGatewayMulticastGroupSourcesResponse
newRegisterTransitGatewayMulticastGroupSourcesResponse
  Int
pHttpStatus_ =
    RegisterTransitGatewayMulticastGroupSourcesResponse'
      { $sel:registeredMulticastGroupSources:RegisterTransitGatewayMulticastGroupSourcesResponse' :: Maybe TransitGatewayMulticastRegisteredGroupSources
registeredMulticastGroupSources =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:RegisterTransitGatewayMulticastGroupSourcesResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | Information about the transit gateway multicast group sources.
registerTransitGatewayMulticastGroupSourcesResponse_registeredMulticastGroupSources :: Lens.Lens' RegisterTransitGatewayMulticastGroupSourcesResponse (Prelude.Maybe TransitGatewayMulticastRegisteredGroupSources)
registerTransitGatewayMulticastGroupSourcesResponse_registeredMulticastGroupSources :: Lens'
  RegisterTransitGatewayMulticastGroupSourcesResponse
  (Maybe TransitGatewayMulticastRegisteredGroupSources)
registerTransitGatewayMulticastGroupSourcesResponse_registeredMulticastGroupSources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTransitGatewayMulticastGroupSourcesResponse' {Maybe TransitGatewayMulticastRegisteredGroupSources
registeredMulticastGroupSources :: Maybe TransitGatewayMulticastRegisteredGroupSources
$sel:registeredMulticastGroupSources:RegisterTransitGatewayMulticastGroupSourcesResponse' :: RegisterTransitGatewayMulticastGroupSourcesResponse
-> Maybe TransitGatewayMulticastRegisteredGroupSources
registeredMulticastGroupSources} -> Maybe TransitGatewayMulticastRegisteredGroupSources
registeredMulticastGroupSources) (\s :: RegisterTransitGatewayMulticastGroupSourcesResponse
s@RegisterTransitGatewayMulticastGroupSourcesResponse' {} Maybe TransitGatewayMulticastRegisteredGroupSources
a -> RegisterTransitGatewayMulticastGroupSourcesResponse
s {$sel:registeredMulticastGroupSources:RegisterTransitGatewayMulticastGroupSourcesResponse' :: Maybe TransitGatewayMulticastRegisteredGroupSources
registeredMulticastGroupSources = Maybe TransitGatewayMulticastRegisteredGroupSources
a} :: RegisterTransitGatewayMulticastGroupSourcesResponse)

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

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