{-# 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.DirectConnect.Types.DirectConnectGatewayAttachment where
import qualified Amazonka.Core as Core
import Amazonka.DirectConnect.Types.DirectConnectGatewayAttachmentState
import Amazonka.DirectConnect.Types.DirectConnectGatewayAttachmentType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DirectConnectGatewayAttachment = DirectConnectGatewayAttachment'
{
DirectConnectGatewayAttachment -> Maybe Text
directConnectGatewayId :: Prelude.Maybe Prelude.Text,
DirectConnectGatewayAttachment
-> Maybe DirectConnectGatewayAttachmentState
attachmentState :: Prelude.Maybe DirectConnectGatewayAttachmentState,
DirectConnectGatewayAttachment -> Maybe Text
stateChangeError :: Prelude.Maybe Prelude.Text,
DirectConnectGatewayAttachment -> Maybe Text
virtualInterfaceRegion :: Prelude.Maybe Prelude.Text,
DirectConnectGatewayAttachment -> Maybe Text
virtualInterfaceOwnerAccount :: Prelude.Maybe Prelude.Text,
DirectConnectGatewayAttachment -> Maybe Text
virtualInterfaceId :: Prelude.Maybe Prelude.Text,
DirectConnectGatewayAttachment
-> Maybe DirectConnectGatewayAttachmentType
attachmentType :: Prelude.Maybe DirectConnectGatewayAttachmentType
}
deriving (DirectConnectGatewayAttachment
-> DirectConnectGatewayAttachment -> Bool
(DirectConnectGatewayAttachment
-> DirectConnectGatewayAttachment -> Bool)
-> (DirectConnectGatewayAttachment
-> DirectConnectGatewayAttachment -> Bool)
-> Eq DirectConnectGatewayAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DirectConnectGatewayAttachment
-> DirectConnectGatewayAttachment -> Bool
$c/= :: DirectConnectGatewayAttachment
-> DirectConnectGatewayAttachment -> Bool
== :: DirectConnectGatewayAttachment
-> DirectConnectGatewayAttachment -> Bool
$c== :: DirectConnectGatewayAttachment
-> DirectConnectGatewayAttachment -> Bool
Prelude.Eq, ReadPrec [DirectConnectGatewayAttachment]
ReadPrec DirectConnectGatewayAttachment
Int -> ReadS DirectConnectGatewayAttachment
ReadS [DirectConnectGatewayAttachment]
(Int -> ReadS DirectConnectGatewayAttachment)
-> ReadS [DirectConnectGatewayAttachment]
-> ReadPrec DirectConnectGatewayAttachment
-> ReadPrec [DirectConnectGatewayAttachment]
-> Read DirectConnectGatewayAttachment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DirectConnectGatewayAttachment]
$creadListPrec :: ReadPrec [DirectConnectGatewayAttachment]
readPrec :: ReadPrec DirectConnectGatewayAttachment
$creadPrec :: ReadPrec DirectConnectGatewayAttachment
readList :: ReadS [DirectConnectGatewayAttachment]
$creadList :: ReadS [DirectConnectGatewayAttachment]
readsPrec :: Int -> ReadS DirectConnectGatewayAttachment
$creadsPrec :: Int -> ReadS DirectConnectGatewayAttachment
Prelude.Read, Int -> DirectConnectGatewayAttachment -> ShowS
[DirectConnectGatewayAttachment] -> ShowS
DirectConnectGatewayAttachment -> String
(Int -> DirectConnectGatewayAttachment -> ShowS)
-> (DirectConnectGatewayAttachment -> String)
-> ([DirectConnectGatewayAttachment] -> ShowS)
-> Show DirectConnectGatewayAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DirectConnectGatewayAttachment] -> ShowS
$cshowList :: [DirectConnectGatewayAttachment] -> ShowS
show :: DirectConnectGatewayAttachment -> String
$cshow :: DirectConnectGatewayAttachment -> String
showsPrec :: Int -> DirectConnectGatewayAttachment -> ShowS
$cshowsPrec :: Int -> DirectConnectGatewayAttachment -> ShowS
Prelude.Show, (forall x.
DirectConnectGatewayAttachment
-> Rep DirectConnectGatewayAttachment x)
-> (forall x.
Rep DirectConnectGatewayAttachment x
-> DirectConnectGatewayAttachment)
-> Generic DirectConnectGatewayAttachment
forall x.
Rep DirectConnectGatewayAttachment x
-> DirectConnectGatewayAttachment
forall x.
DirectConnectGatewayAttachment
-> Rep DirectConnectGatewayAttachment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DirectConnectGatewayAttachment x
-> DirectConnectGatewayAttachment
$cfrom :: forall x.
DirectConnectGatewayAttachment
-> Rep DirectConnectGatewayAttachment x
Prelude.Generic)
newDirectConnectGatewayAttachment ::
DirectConnectGatewayAttachment
newDirectConnectGatewayAttachment :: DirectConnectGatewayAttachment
newDirectConnectGatewayAttachment =
DirectConnectGatewayAttachment' :: Maybe Text
-> Maybe DirectConnectGatewayAttachmentState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment
DirectConnectGatewayAttachment'
{ $sel:directConnectGatewayId:DirectConnectGatewayAttachment' :: Maybe Text
directConnectGatewayId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attachmentState:DirectConnectGatewayAttachment' :: Maybe DirectConnectGatewayAttachmentState
attachmentState = Maybe DirectConnectGatewayAttachmentState
forall a. Maybe a
Prelude.Nothing,
$sel:stateChangeError:DirectConnectGatewayAttachment' :: Maybe Text
stateChangeError = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:virtualInterfaceRegion:DirectConnectGatewayAttachment' :: Maybe Text
virtualInterfaceRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:virtualInterfaceOwnerAccount:DirectConnectGatewayAttachment' :: Maybe Text
virtualInterfaceOwnerAccount =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:virtualInterfaceId:DirectConnectGatewayAttachment' :: Maybe Text
virtualInterfaceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attachmentType:DirectConnectGatewayAttachment' :: Maybe DirectConnectGatewayAttachmentType
attachmentType = Maybe DirectConnectGatewayAttachmentType
forall a. Maybe a
Prelude.Nothing
}
directConnectGatewayAttachment_directConnectGatewayId :: Lens.Lens' DirectConnectGatewayAttachment (Prelude.Maybe Prelude.Text)
directConnectGatewayAttachment_directConnectGatewayId :: (Maybe Text -> f (Maybe Text))
-> DirectConnectGatewayAttachment
-> f DirectConnectGatewayAttachment
directConnectGatewayAttachment_directConnectGatewayId = (DirectConnectGatewayAttachment -> Maybe Text)
-> (DirectConnectGatewayAttachment
-> Maybe Text -> DirectConnectGatewayAttachment)
-> Lens
DirectConnectGatewayAttachment
DirectConnectGatewayAttachment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAttachment' {Maybe Text
directConnectGatewayId :: Maybe Text
$sel:directConnectGatewayId:DirectConnectGatewayAttachment' :: DirectConnectGatewayAttachment -> Maybe Text
directConnectGatewayId} -> Maybe Text
directConnectGatewayId) (\s :: DirectConnectGatewayAttachment
s@DirectConnectGatewayAttachment' {} Maybe Text
a -> DirectConnectGatewayAttachment
s {$sel:directConnectGatewayId:DirectConnectGatewayAttachment' :: Maybe Text
directConnectGatewayId = Maybe Text
a} :: DirectConnectGatewayAttachment)
directConnectGatewayAttachment_attachmentState :: Lens.Lens' DirectConnectGatewayAttachment (Prelude.Maybe DirectConnectGatewayAttachmentState)
directConnectGatewayAttachment_attachmentState :: (Maybe DirectConnectGatewayAttachmentState
-> f (Maybe DirectConnectGatewayAttachmentState))
-> DirectConnectGatewayAttachment
-> f DirectConnectGatewayAttachment
directConnectGatewayAttachment_attachmentState = (DirectConnectGatewayAttachment
-> Maybe DirectConnectGatewayAttachmentState)
-> (DirectConnectGatewayAttachment
-> Maybe DirectConnectGatewayAttachmentState
-> DirectConnectGatewayAttachment)
-> Lens
DirectConnectGatewayAttachment
DirectConnectGatewayAttachment
(Maybe DirectConnectGatewayAttachmentState)
(Maybe DirectConnectGatewayAttachmentState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAttachment' {Maybe DirectConnectGatewayAttachmentState
attachmentState :: Maybe DirectConnectGatewayAttachmentState
$sel:attachmentState:DirectConnectGatewayAttachment' :: DirectConnectGatewayAttachment
-> Maybe DirectConnectGatewayAttachmentState
attachmentState} -> Maybe DirectConnectGatewayAttachmentState
attachmentState) (\s :: DirectConnectGatewayAttachment
s@DirectConnectGatewayAttachment' {} Maybe DirectConnectGatewayAttachmentState
a -> DirectConnectGatewayAttachment
s {$sel:attachmentState:DirectConnectGatewayAttachment' :: Maybe DirectConnectGatewayAttachmentState
attachmentState = Maybe DirectConnectGatewayAttachmentState
a} :: DirectConnectGatewayAttachment)
directConnectGatewayAttachment_stateChangeError :: Lens.Lens' DirectConnectGatewayAttachment (Prelude.Maybe Prelude.Text)
directConnectGatewayAttachment_stateChangeError :: (Maybe Text -> f (Maybe Text))
-> DirectConnectGatewayAttachment
-> f DirectConnectGatewayAttachment
directConnectGatewayAttachment_stateChangeError = (DirectConnectGatewayAttachment -> Maybe Text)
-> (DirectConnectGatewayAttachment
-> Maybe Text -> DirectConnectGatewayAttachment)
-> Lens
DirectConnectGatewayAttachment
DirectConnectGatewayAttachment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAttachment' {Maybe Text
stateChangeError :: Maybe Text
$sel:stateChangeError:DirectConnectGatewayAttachment' :: DirectConnectGatewayAttachment -> Maybe Text
stateChangeError} -> Maybe Text
stateChangeError) (\s :: DirectConnectGatewayAttachment
s@DirectConnectGatewayAttachment' {} Maybe Text
a -> DirectConnectGatewayAttachment
s {$sel:stateChangeError:DirectConnectGatewayAttachment' :: Maybe Text
stateChangeError = Maybe Text
a} :: DirectConnectGatewayAttachment)
directConnectGatewayAttachment_virtualInterfaceRegion :: Lens.Lens' DirectConnectGatewayAttachment (Prelude.Maybe Prelude.Text)
directConnectGatewayAttachment_virtualInterfaceRegion :: (Maybe Text -> f (Maybe Text))
-> DirectConnectGatewayAttachment
-> f DirectConnectGatewayAttachment
directConnectGatewayAttachment_virtualInterfaceRegion = (DirectConnectGatewayAttachment -> Maybe Text)
-> (DirectConnectGatewayAttachment
-> Maybe Text -> DirectConnectGatewayAttachment)
-> Lens
DirectConnectGatewayAttachment
DirectConnectGatewayAttachment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAttachment' {Maybe Text
virtualInterfaceRegion :: Maybe Text
$sel:virtualInterfaceRegion:DirectConnectGatewayAttachment' :: DirectConnectGatewayAttachment -> Maybe Text
virtualInterfaceRegion} -> Maybe Text
virtualInterfaceRegion) (\s :: DirectConnectGatewayAttachment
s@DirectConnectGatewayAttachment' {} Maybe Text
a -> DirectConnectGatewayAttachment
s {$sel:virtualInterfaceRegion:DirectConnectGatewayAttachment' :: Maybe Text
virtualInterfaceRegion = Maybe Text
a} :: DirectConnectGatewayAttachment)
directConnectGatewayAttachment_virtualInterfaceOwnerAccount :: Lens.Lens' DirectConnectGatewayAttachment (Prelude.Maybe Prelude.Text)
directConnectGatewayAttachment_virtualInterfaceOwnerAccount :: (Maybe Text -> f (Maybe Text))
-> DirectConnectGatewayAttachment
-> f DirectConnectGatewayAttachment
directConnectGatewayAttachment_virtualInterfaceOwnerAccount = (DirectConnectGatewayAttachment -> Maybe Text)
-> (DirectConnectGatewayAttachment
-> Maybe Text -> DirectConnectGatewayAttachment)
-> Lens
DirectConnectGatewayAttachment
DirectConnectGatewayAttachment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAttachment' {Maybe Text
virtualInterfaceOwnerAccount :: Maybe Text
$sel:virtualInterfaceOwnerAccount:DirectConnectGatewayAttachment' :: DirectConnectGatewayAttachment -> Maybe Text
virtualInterfaceOwnerAccount} -> Maybe Text
virtualInterfaceOwnerAccount) (\s :: DirectConnectGatewayAttachment
s@DirectConnectGatewayAttachment' {} Maybe Text
a -> DirectConnectGatewayAttachment
s {$sel:virtualInterfaceOwnerAccount:DirectConnectGatewayAttachment' :: Maybe Text
virtualInterfaceOwnerAccount = Maybe Text
a} :: DirectConnectGatewayAttachment)
directConnectGatewayAttachment_virtualInterfaceId :: Lens.Lens' DirectConnectGatewayAttachment (Prelude.Maybe Prelude.Text)
directConnectGatewayAttachment_virtualInterfaceId :: (Maybe Text -> f (Maybe Text))
-> DirectConnectGatewayAttachment
-> f DirectConnectGatewayAttachment
directConnectGatewayAttachment_virtualInterfaceId = (DirectConnectGatewayAttachment -> Maybe Text)
-> (DirectConnectGatewayAttachment
-> Maybe Text -> DirectConnectGatewayAttachment)
-> Lens
DirectConnectGatewayAttachment
DirectConnectGatewayAttachment
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAttachment' {Maybe Text
virtualInterfaceId :: Maybe Text
$sel:virtualInterfaceId:DirectConnectGatewayAttachment' :: DirectConnectGatewayAttachment -> Maybe Text
virtualInterfaceId} -> Maybe Text
virtualInterfaceId) (\s :: DirectConnectGatewayAttachment
s@DirectConnectGatewayAttachment' {} Maybe Text
a -> DirectConnectGatewayAttachment
s {$sel:virtualInterfaceId:DirectConnectGatewayAttachment' :: Maybe Text
virtualInterfaceId = Maybe Text
a} :: DirectConnectGatewayAttachment)
directConnectGatewayAttachment_attachmentType :: Lens.Lens' DirectConnectGatewayAttachment (Prelude.Maybe DirectConnectGatewayAttachmentType)
directConnectGatewayAttachment_attachmentType :: (Maybe DirectConnectGatewayAttachmentType
-> f (Maybe DirectConnectGatewayAttachmentType))
-> DirectConnectGatewayAttachment
-> f DirectConnectGatewayAttachment
directConnectGatewayAttachment_attachmentType = (DirectConnectGatewayAttachment
-> Maybe DirectConnectGatewayAttachmentType)
-> (DirectConnectGatewayAttachment
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
-> Lens
DirectConnectGatewayAttachment
DirectConnectGatewayAttachment
(Maybe DirectConnectGatewayAttachmentType)
(Maybe DirectConnectGatewayAttachmentType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAttachment' {Maybe DirectConnectGatewayAttachmentType
attachmentType :: Maybe DirectConnectGatewayAttachmentType
$sel:attachmentType:DirectConnectGatewayAttachment' :: DirectConnectGatewayAttachment
-> Maybe DirectConnectGatewayAttachmentType
attachmentType} -> Maybe DirectConnectGatewayAttachmentType
attachmentType) (\s :: DirectConnectGatewayAttachment
s@DirectConnectGatewayAttachment' {} Maybe DirectConnectGatewayAttachmentType
a -> DirectConnectGatewayAttachment
s {$sel:attachmentType:DirectConnectGatewayAttachment' :: Maybe DirectConnectGatewayAttachmentType
attachmentType = Maybe DirectConnectGatewayAttachmentType
a} :: DirectConnectGatewayAttachment)
instance Core.FromJSON DirectConnectGatewayAttachment where
parseJSON :: Value -> Parser DirectConnectGatewayAttachment
parseJSON =
String
-> (Object -> Parser DirectConnectGatewayAttachment)
-> Value
-> Parser DirectConnectGatewayAttachment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DirectConnectGatewayAttachment"
( \Object
x ->
Maybe Text
-> Maybe DirectConnectGatewayAttachmentState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment
DirectConnectGatewayAttachment'
(Maybe Text
-> Maybe DirectConnectGatewayAttachmentState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
-> Parser (Maybe Text)
-> Parser
(Maybe DirectConnectGatewayAttachmentState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"directConnectGatewayId")
Parser
(Maybe DirectConnectGatewayAttachmentState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
-> Parser (Maybe DirectConnectGatewayAttachmentState)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe DirectConnectGatewayAttachmentState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"attachmentState")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"stateChangeError")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"virtualInterfaceRegion")
Parser
(Maybe Text
-> Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"virtualInterfaceOwnerAccount")
Parser
(Maybe Text
-> Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
-> Parser (Maybe Text)
-> Parser
(Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"virtualInterfaceId")
Parser
(Maybe DirectConnectGatewayAttachmentType
-> DirectConnectGatewayAttachment)
-> Parser (Maybe DirectConnectGatewayAttachmentType)
-> Parser DirectConnectGatewayAttachment
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DirectConnectGatewayAttachmentType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"attachmentType")
)
instance
Prelude.Hashable
DirectConnectGatewayAttachment
instance
Prelude.NFData
DirectConnectGatewayAttachment