{-# 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.RouterType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RouterType = RouterType'
{
RouterType -> Maybe Text
vendor :: Prelude.Maybe Prelude.Text,
RouterType -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
RouterType -> Maybe Text
xsltTemplateName :: Prelude.Maybe Prelude.Text,
RouterType -> Maybe Text
software :: Prelude.Maybe Prelude.Text,
RouterType -> Maybe Text
xsltTemplateNameForMacSec :: Prelude.Maybe Prelude.Text,
RouterType -> Maybe Text
routerTypeIdentifier :: Prelude.Maybe Prelude.Text
}
deriving (RouterType -> RouterType -> Bool
(RouterType -> RouterType -> Bool)
-> (RouterType -> RouterType -> Bool) -> Eq RouterType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RouterType -> RouterType -> Bool
$c/= :: RouterType -> RouterType -> Bool
== :: RouterType -> RouterType -> Bool
$c== :: RouterType -> RouterType -> Bool
Prelude.Eq, ReadPrec [RouterType]
ReadPrec RouterType
Int -> ReadS RouterType
ReadS [RouterType]
(Int -> ReadS RouterType)
-> ReadS [RouterType]
-> ReadPrec RouterType
-> ReadPrec [RouterType]
-> Read RouterType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RouterType]
$creadListPrec :: ReadPrec [RouterType]
readPrec :: ReadPrec RouterType
$creadPrec :: ReadPrec RouterType
readList :: ReadS [RouterType]
$creadList :: ReadS [RouterType]
readsPrec :: Int -> ReadS RouterType
$creadsPrec :: Int -> ReadS RouterType
Prelude.Read, Int -> RouterType -> ShowS
[RouterType] -> ShowS
RouterType -> String
(Int -> RouterType -> ShowS)
-> (RouterType -> String)
-> ([RouterType] -> ShowS)
-> Show RouterType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RouterType] -> ShowS
$cshowList :: [RouterType] -> ShowS
show :: RouterType -> String
$cshow :: RouterType -> String
showsPrec :: Int -> RouterType -> ShowS
$cshowsPrec :: Int -> RouterType -> ShowS
Prelude.Show, (forall x. RouterType -> Rep RouterType x)
-> (forall x. Rep RouterType x -> RouterType) -> Generic RouterType
forall x. Rep RouterType x -> RouterType
forall x. RouterType -> Rep RouterType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RouterType x -> RouterType
$cfrom :: forall x. RouterType -> Rep RouterType x
Prelude.Generic)
newRouterType ::
RouterType
newRouterType :: RouterType
newRouterType =
RouterType' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RouterType
RouterType'
{ $sel:vendor:RouterType' :: Maybe Text
vendor = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:platform:RouterType' :: Maybe Text
platform = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:xsltTemplateName:RouterType' :: Maybe Text
xsltTemplateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:software:RouterType' :: Maybe Text
software = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:xsltTemplateNameForMacSec:RouterType' :: Maybe Text
xsltTemplateNameForMacSec = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:routerTypeIdentifier:RouterType' :: Maybe Text
routerTypeIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
routerType_vendor :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_vendor :: (Maybe Text -> f (Maybe Text)) -> RouterType -> f RouterType
routerType_vendor = (RouterType -> Maybe Text)
-> (RouterType -> Maybe Text -> RouterType)
-> Lens RouterType RouterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouterType' {Maybe Text
vendor :: Maybe Text
$sel:vendor:RouterType' :: RouterType -> Maybe Text
vendor} -> Maybe Text
vendor) (\s :: RouterType
s@RouterType' {} Maybe Text
a -> RouterType
s {$sel:vendor:RouterType' :: Maybe Text
vendor = Maybe Text
a} :: RouterType)
routerType_platform :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_platform :: (Maybe Text -> f (Maybe Text)) -> RouterType -> f RouterType
routerType_platform = (RouterType -> Maybe Text)
-> (RouterType -> Maybe Text -> RouterType)
-> Lens RouterType RouterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouterType' {Maybe Text
platform :: Maybe Text
$sel:platform:RouterType' :: RouterType -> Maybe Text
platform} -> Maybe Text
platform) (\s :: RouterType
s@RouterType' {} Maybe Text
a -> RouterType
s {$sel:platform:RouterType' :: Maybe Text
platform = Maybe Text
a} :: RouterType)
routerType_xsltTemplateName :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_xsltTemplateName :: (Maybe Text -> f (Maybe Text)) -> RouterType -> f RouterType
routerType_xsltTemplateName = (RouterType -> Maybe Text)
-> (RouterType -> Maybe Text -> RouterType)
-> Lens RouterType RouterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouterType' {Maybe Text
xsltTemplateName :: Maybe Text
$sel:xsltTemplateName:RouterType' :: RouterType -> Maybe Text
xsltTemplateName} -> Maybe Text
xsltTemplateName) (\s :: RouterType
s@RouterType' {} Maybe Text
a -> RouterType
s {$sel:xsltTemplateName:RouterType' :: Maybe Text
xsltTemplateName = Maybe Text
a} :: RouterType)
routerType_software :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_software :: (Maybe Text -> f (Maybe Text)) -> RouterType -> f RouterType
routerType_software = (RouterType -> Maybe Text)
-> (RouterType -> Maybe Text -> RouterType)
-> Lens RouterType RouterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouterType' {Maybe Text
software :: Maybe Text
$sel:software:RouterType' :: RouterType -> Maybe Text
software} -> Maybe Text
software) (\s :: RouterType
s@RouterType' {} Maybe Text
a -> RouterType
s {$sel:software:RouterType' :: Maybe Text
software = Maybe Text
a} :: RouterType)
routerType_xsltTemplateNameForMacSec :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_xsltTemplateNameForMacSec :: (Maybe Text -> f (Maybe Text)) -> RouterType -> f RouterType
routerType_xsltTemplateNameForMacSec = (RouterType -> Maybe Text)
-> (RouterType -> Maybe Text -> RouterType)
-> Lens RouterType RouterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouterType' {Maybe Text
xsltTemplateNameForMacSec :: Maybe Text
$sel:xsltTemplateNameForMacSec:RouterType' :: RouterType -> Maybe Text
xsltTemplateNameForMacSec} -> Maybe Text
xsltTemplateNameForMacSec) (\s :: RouterType
s@RouterType' {} Maybe Text
a -> RouterType
s {$sel:xsltTemplateNameForMacSec:RouterType' :: Maybe Text
xsltTemplateNameForMacSec = Maybe Text
a} :: RouterType)
routerType_routerTypeIdentifier :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_routerTypeIdentifier :: (Maybe Text -> f (Maybe Text)) -> RouterType -> f RouterType
routerType_routerTypeIdentifier = (RouterType -> Maybe Text)
-> (RouterType -> Maybe Text -> RouterType)
-> Lens RouterType RouterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RouterType' {Maybe Text
routerTypeIdentifier :: Maybe Text
$sel:routerTypeIdentifier:RouterType' :: RouterType -> Maybe Text
routerTypeIdentifier} -> Maybe Text
routerTypeIdentifier) (\s :: RouterType
s@RouterType' {} Maybe Text
a -> RouterType
s {$sel:routerTypeIdentifier:RouterType' :: Maybe Text
routerTypeIdentifier = Maybe Text
a} :: RouterType)
instance Core.FromJSON RouterType where
parseJSON :: Value -> Parser RouterType
parseJSON =
String
-> (Object -> Parser RouterType) -> Value -> Parser RouterType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RouterType"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RouterType
RouterType'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RouterType)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RouterType)
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
"vendor")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RouterType)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> RouterType)
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
"platform")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> RouterType)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> RouterType)
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
"xsltTemplateName")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> RouterType)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RouterType)
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
"software")
Parser (Maybe Text -> Maybe Text -> RouterType)
-> Parser (Maybe Text) -> Parser (Maybe Text -> RouterType)
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
"xsltTemplateNameForMacSec")
Parser (Maybe Text -> RouterType)
-> Parser (Maybe Text) -> Parser RouterType
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
"routerTypeIdentifier")
)
instance Prelude.Hashable RouterType
instance Prelude.NFData RouterType