{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DirectConnect.Types.RouterType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DirectConnect.Types.RouterType where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Information about the virtual router.
--
-- /See:/ 'newRouterType' smart constructor.
data RouterType = RouterType'
  { -- | The virtual interface router platform.
    RouterType -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
    -- | Identifies the router by a combination of vendor, platform, and software
    -- version. For example, @CiscoSystemsInc-2900SeriesRouters-IOS124@.
    RouterType -> Maybe Text
routerTypeIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The router software.
    RouterType -> Maybe Text
software :: Prelude.Maybe Prelude.Text,
    -- | The vendor for the virtual interface\'s router.
    RouterType -> Maybe Text
vendor :: Prelude.Maybe Prelude.Text,
    -- | The template for the virtual interface\'s router.
    RouterType -> Maybe Text
xsltTemplateName :: Prelude.Maybe Prelude.Text,
    -- | The MAC Security (MACsec) template for the virtual interface\'s router.
    RouterType -> Maybe Text
xsltTemplateNameForMacSec :: Prelude.Maybe Prelude.Text
  }
  deriving (RouterType -> RouterType -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'RouterType' 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:
--
-- 'platform', 'routerType_platform' - The virtual interface router platform.
--
-- 'routerTypeIdentifier', 'routerType_routerTypeIdentifier' - Identifies the router by a combination of vendor, platform, and software
-- version. For example, @CiscoSystemsInc-2900SeriesRouters-IOS124@.
--
-- 'software', 'routerType_software' - The router software.
--
-- 'vendor', 'routerType_vendor' - The vendor for the virtual interface\'s router.
--
-- 'xsltTemplateName', 'routerType_xsltTemplateName' - The template for the virtual interface\'s router.
--
-- 'xsltTemplateNameForMacSec', 'routerType_xsltTemplateNameForMacSec' - The MAC Security (MACsec) template for the virtual interface\'s router.
newRouterType ::
  RouterType
newRouterType :: RouterType
newRouterType =
  RouterType'
    { $sel:platform:RouterType' :: Maybe Text
platform = forall a. Maybe a
Prelude.Nothing,
      $sel:routerTypeIdentifier:RouterType' :: Maybe Text
routerTypeIdentifier = forall a. Maybe a
Prelude.Nothing,
      $sel:software:RouterType' :: Maybe Text
software = forall a. Maybe a
Prelude.Nothing,
      $sel:vendor:RouterType' :: Maybe Text
vendor = forall a. Maybe a
Prelude.Nothing,
      $sel:xsltTemplateName:RouterType' :: Maybe Text
xsltTemplateName = forall a. Maybe a
Prelude.Nothing,
      $sel:xsltTemplateNameForMacSec:RouterType' :: Maybe Text
xsltTemplateNameForMacSec = forall a. Maybe a
Prelude.Nothing
    }

-- | The virtual interface router platform.
routerType_platform :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_platform :: Lens' RouterType (Maybe Text)
routerType_platform = 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)

-- | Identifies the router by a combination of vendor, platform, and software
-- version. For example, @CiscoSystemsInc-2900SeriesRouters-IOS124@.
routerType_routerTypeIdentifier :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_routerTypeIdentifier :: Lens' RouterType (Maybe Text)
routerType_routerTypeIdentifier = 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)

-- | The router software.
routerType_software :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_software :: Lens' RouterType (Maybe Text)
routerType_software = 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)

-- | The vendor for the virtual interface\'s router.
routerType_vendor :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_vendor :: Lens' RouterType (Maybe Text)
routerType_vendor = 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)

-- | The template for the virtual interface\'s router.
routerType_xsltTemplateName :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_xsltTemplateName :: Lens' RouterType (Maybe Text)
routerType_xsltTemplateName = 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)

-- | The MAC Security (MACsec) template for the virtual interface\'s router.
routerType_xsltTemplateNameForMacSec :: Lens.Lens' RouterType (Prelude.Maybe Prelude.Text)
routerType_xsltTemplateNameForMacSec :: Lens' RouterType (Maybe Text)
routerType_xsltTemplateNameForMacSec = 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)

instance Data.FromJSON RouterType where
  parseJSON :: Value -> Parser RouterType
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RouterType"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RouterType
RouterType'
            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
"platform")
            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
"routerTypeIdentifier")
            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
"software")
            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
"vendor")
            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
"xsltTemplateName")
            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
"xsltTemplateNameForMacSec")
      )

instance Prelude.Hashable RouterType where
  hashWithSalt :: Int -> RouterType -> Int
hashWithSalt Int
_salt RouterType' {Maybe Text
xsltTemplateNameForMacSec :: Maybe Text
xsltTemplateName :: Maybe Text
vendor :: Maybe Text
software :: Maybe Text
routerTypeIdentifier :: Maybe Text
platform :: Maybe Text
$sel:xsltTemplateNameForMacSec:RouterType' :: RouterType -> Maybe Text
$sel:xsltTemplateName:RouterType' :: RouterType -> Maybe Text
$sel:vendor:RouterType' :: RouterType -> Maybe Text
$sel:software:RouterType' :: RouterType -> Maybe Text
$sel:routerTypeIdentifier:RouterType' :: RouterType -> Maybe Text
$sel:platform:RouterType' :: RouterType -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
platform
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
routerTypeIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
software
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vendor
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
xsltTemplateName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
xsltTemplateNameForMacSec

instance Prelude.NFData RouterType where
  rnf :: RouterType -> ()
rnf RouterType' {Maybe Text
xsltTemplateNameForMacSec :: Maybe Text
xsltTemplateName :: Maybe Text
vendor :: Maybe Text
software :: Maybe Text
routerTypeIdentifier :: Maybe Text
platform :: Maybe Text
$sel:xsltTemplateNameForMacSec:RouterType' :: RouterType -> Maybe Text
$sel:xsltTemplateName:RouterType' :: RouterType -> Maybe Text
$sel:vendor:RouterType' :: RouterType -> Maybe Text
$sel:software:RouterType' :: RouterType -> Maybe Text
$sel:routerTypeIdentifier:RouterType' :: RouterType -> Maybe Text
$sel:platform:RouterType' :: RouterType -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
platform
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
routerTypeIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
software
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vendor
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
xsltTemplateName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
xsltTemplateNameForMacSec