{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.NetworkManager.Types.ConnectAttachment where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkManager.Types.Attachment
import Amazonka.NetworkManager.Types.ConnectAttachmentOptions
import qualified Amazonka.Prelude as Prelude
data ConnectAttachment = ConnectAttachment'
{
ConnectAttachment -> Maybe Attachment
attachment :: Prelude.Maybe Attachment,
ConnectAttachment -> Maybe ConnectAttachmentOptions
options :: Prelude.Maybe ConnectAttachmentOptions,
ConnectAttachment -> Maybe Text
transportAttachmentId :: Prelude.Maybe Prelude.Text
}
deriving (ConnectAttachment -> ConnectAttachment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectAttachment -> ConnectAttachment -> Bool
$c/= :: ConnectAttachment -> ConnectAttachment -> Bool
== :: ConnectAttachment -> ConnectAttachment -> Bool
$c== :: ConnectAttachment -> ConnectAttachment -> Bool
Prelude.Eq, ReadPrec [ConnectAttachment]
ReadPrec ConnectAttachment
Int -> ReadS ConnectAttachment
ReadS [ConnectAttachment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectAttachment]
$creadListPrec :: ReadPrec [ConnectAttachment]
readPrec :: ReadPrec ConnectAttachment
$creadPrec :: ReadPrec ConnectAttachment
readList :: ReadS [ConnectAttachment]
$creadList :: ReadS [ConnectAttachment]
readsPrec :: Int -> ReadS ConnectAttachment
$creadsPrec :: Int -> ReadS ConnectAttachment
Prelude.Read, Int -> ConnectAttachment -> ShowS
[ConnectAttachment] -> ShowS
ConnectAttachment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectAttachment] -> ShowS
$cshowList :: [ConnectAttachment] -> ShowS
show :: ConnectAttachment -> String
$cshow :: ConnectAttachment -> String
showsPrec :: Int -> ConnectAttachment -> ShowS
$cshowsPrec :: Int -> ConnectAttachment -> ShowS
Prelude.Show, forall x. Rep ConnectAttachment x -> ConnectAttachment
forall x. ConnectAttachment -> Rep ConnectAttachment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConnectAttachment x -> ConnectAttachment
$cfrom :: forall x. ConnectAttachment -> Rep ConnectAttachment x
Prelude.Generic)
newConnectAttachment ::
ConnectAttachment
newConnectAttachment :: ConnectAttachment
newConnectAttachment =
ConnectAttachment'
{ $sel:attachment:ConnectAttachment' :: Maybe Attachment
attachment = forall a. Maybe a
Prelude.Nothing,
$sel:options:ConnectAttachment' :: Maybe ConnectAttachmentOptions
options = forall a. Maybe a
Prelude.Nothing,
$sel:transportAttachmentId:ConnectAttachment' :: Maybe Text
transportAttachmentId = forall a. Maybe a
Prelude.Nothing
}
connectAttachment_attachment :: Lens.Lens' ConnectAttachment (Prelude.Maybe Attachment)
connectAttachment_attachment :: Lens' ConnectAttachment (Maybe Attachment)
connectAttachment_attachment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectAttachment' {Maybe Attachment
attachment :: Maybe Attachment
$sel:attachment:ConnectAttachment' :: ConnectAttachment -> Maybe Attachment
attachment} -> Maybe Attachment
attachment) (\s :: ConnectAttachment
s@ConnectAttachment' {} Maybe Attachment
a -> ConnectAttachment
s {$sel:attachment:ConnectAttachment' :: Maybe Attachment
attachment = Maybe Attachment
a} :: ConnectAttachment)
connectAttachment_options :: Lens.Lens' ConnectAttachment (Prelude.Maybe ConnectAttachmentOptions)
connectAttachment_options :: Lens' ConnectAttachment (Maybe ConnectAttachmentOptions)
connectAttachment_options = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectAttachment' {Maybe ConnectAttachmentOptions
options :: Maybe ConnectAttachmentOptions
$sel:options:ConnectAttachment' :: ConnectAttachment -> Maybe ConnectAttachmentOptions
options} -> Maybe ConnectAttachmentOptions
options) (\s :: ConnectAttachment
s@ConnectAttachment' {} Maybe ConnectAttachmentOptions
a -> ConnectAttachment
s {$sel:options:ConnectAttachment' :: Maybe ConnectAttachmentOptions
options = Maybe ConnectAttachmentOptions
a} :: ConnectAttachment)
connectAttachment_transportAttachmentId :: Lens.Lens' ConnectAttachment (Prelude.Maybe Prelude.Text)
connectAttachment_transportAttachmentId :: Lens' ConnectAttachment (Maybe Text)
connectAttachment_transportAttachmentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectAttachment' {Maybe Text
transportAttachmentId :: Maybe Text
$sel:transportAttachmentId:ConnectAttachment' :: ConnectAttachment -> Maybe Text
transportAttachmentId} -> Maybe Text
transportAttachmentId) (\s :: ConnectAttachment
s@ConnectAttachment' {} Maybe Text
a -> ConnectAttachment
s {$sel:transportAttachmentId:ConnectAttachment' :: Maybe Text
transportAttachmentId = Maybe Text
a} :: ConnectAttachment)
instance Data.FromJSON ConnectAttachment where
parseJSON :: Value -> Parser ConnectAttachment
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConnectAttachment"
( \Object
x ->
Maybe Attachment
-> Maybe ConnectAttachmentOptions
-> Maybe Text
-> ConnectAttachment
ConnectAttachment'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Attachment")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Options")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TransportAttachmentId")
)
instance Prelude.Hashable ConnectAttachment where
hashWithSalt :: Int -> ConnectAttachment -> Int
hashWithSalt Int
_salt ConnectAttachment' {Maybe Text
Maybe Attachment
Maybe ConnectAttachmentOptions
transportAttachmentId :: Maybe Text
options :: Maybe ConnectAttachmentOptions
attachment :: Maybe Attachment
$sel:transportAttachmentId:ConnectAttachment' :: ConnectAttachment -> Maybe Text
$sel:options:ConnectAttachment' :: ConnectAttachment -> Maybe ConnectAttachmentOptions
$sel:attachment:ConnectAttachment' :: ConnectAttachment -> Maybe Attachment
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Attachment
attachment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectAttachmentOptions
options
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transportAttachmentId
instance Prelude.NFData ConnectAttachment where
rnf :: ConnectAttachment -> ()
rnf ConnectAttachment' {Maybe Text
Maybe Attachment
Maybe ConnectAttachmentOptions
transportAttachmentId :: Maybe Text
options :: Maybe ConnectAttachmentOptions
attachment :: Maybe Attachment
$sel:transportAttachmentId:ConnectAttachment' :: ConnectAttachment -> Maybe Text
$sel:options:ConnectAttachment' :: ConnectAttachment -> Maybe ConnectAttachmentOptions
$sel:attachment:ConnectAttachment' :: ConnectAttachment -> Maybe Attachment
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Attachment
attachment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectAttachmentOptions
options
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
transportAttachmentId