{-# 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.EC2.Types.VpnConnectionDeviceType
-- 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.EC2.Types.VpnConnectionDeviceType where

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

-- | List of customer gateway devices that have a sample configuration file
-- available for use. You can also see the list of device types with sample
-- configuration files available under
-- <https://docs.aws.amazon.com/vpn/latest/s2svpn/your-cgw.html Your customer gateway device>
-- in the /Amazon Web Services Site-to-Site VPN User Guide/.
--
-- /See:/ 'newVpnConnectionDeviceType' smart constructor.
data VpnConnectionDeviceType = VpnConnectionDeviceType'
  { -- | Customer gateway device platform.
    VpnConnectionDeviceType -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
    -- | Customer gateway device software version.
    VpnConnectionDeviceType -> Maybe Text
software :: Prelude.Maybe Prelude.Text,
    -- | Customer gateway device vendor.
    VpnConnectionDeviceType -> Maybe Text
vendor :: Prelude.Maybe Prelude.Text,
    -- | Customer gateway device identifier.
    VpnConnectionDeviceType -> Maybe Text
vpnConnectionDeviceTypeId :: Prelude.Maybe Prelude.Text
  }
  deriving (VpnConnectionDeviceType -> VpnConnectionDeviceType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpnConnectionDeviceType -> VpnConnectionDeviceType -> Bool
$c/= :: VpnConnectionDeviceType -> VpnConnectionDeviceType -> Bool
== :: VpnConnectionDeviceType -> VpnConnectionDeviceType -> Bool
$c== :: VpnConnectionDeviceType -> VpnConnectionDeviceType -> Bool
Prelude.Eq, ReadPrec [VpnConnectionDeviceType]
ReadPrec VpnConnectionDeviceType
Int -> ReadS VpnConnectionDeviceType
ReadS [VpnConnectionDeviceType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpnConnectionDeviceType]
$creadListPrec :: ReadPrec [VpnConnectionDeviceType]
readPrec :: ReadPrec VpnConnectionDeviceType
$creadPrec :: ReadPrec VpnConnectionDeviceType
readList :: ReadS [VpnConnectionDeviceType]
$creadList :: ReadS [VpnConnectionDeviceType]
readsPrec :: Int -> ReadS VpnConnectionDeviceType
$creadsPrec :: Int -> ReadS VpnConnectionDeviceType
Prelude.Read, Int -> VpnConnectionDeviceType -> ShowS
[VpnConnectionDeviceType] -> ShowS
VpnConnectionDeviceType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpnConnectionDeviceType] -> ShowS
$cshowList :: [VpnConnectionDeviceType] -> ShowS
show :: VpnConnectionDeviceType -> String
$cshow :: VpnConnectionDeviceType -> String
showsPrec :: Int -> VpnConnectionDeviceType -> ShowS
$cshowsPrec :: Int -> VpnConnectionDeviceType -> ShowS
Prelude.Show, forall x. Rep VpnConnectionDeviceType x -> VpnConnectionDeviceType
forall x. VpnConnectionDeviceType -> Rep VpnConnectionDeviceType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpnConnectionDeviceType x -> VpnConnectionDeviceType
$cfrom :: forall x. VpnConnectionDeviceType -> Rep VpnConnectionDeviceType x
Prelude.Generic)

-- |
-- Create a value of 'VpnConnectionDeviceType' 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', 'vpnConnectionDeviceType_platform' - Customer gateway device platform.
--
-- 'software', 'vpnConnectionDeviceType_software' - Customer gateway device software version.
--
-- 'vendor', 'vpnConnectionDeviceType_vendor' - Customer gateway device vendor.
--
-- 'vpnConnectionDeviceTypeId', 'vpnConnectionDeviceType_vpnConnectionDeviceTypeId' - Customer gateway device identifier.
newVpnConnectionDeviceType ::
  VpnConnectionDeviceType
newVpnConnectionDeviceType :: VpnConnectionDeviceType
newVpnConnectionDeviceType =
  VpnConnectionDeviceType'
    { $sel:platform:VpnConnectionDeviceType' :: Maybe Text
platform =
        forall a. Maybe a
Prelude.Nothing,
      $sel:software:VpnConnectionDeviceType' :: Maybe Text
software = forall a. Maybe a
Prelude.Nothing,
      $sel:vendor:VpnConnectionDeviceType' :: Maybe Text
vendor = forall a. Maybe a
Prelude.Nothing,
      $sel:vpnConnectionDeviceTypeId:VpnConnectionDeviceType' :: Maybe Text
vpnConnectionDeviceTypeId = forall a. Maybe a
Prelude.Nothing
    }

-- | Customer gateway device platform.
vpnConnectionDeviceType_platform :: Lens.Lens' VpnConnectionDeviceType (Prelude.Maybe Prelude.Text)
vpnConnectionDeviceType_platform :: Lens' VpnConnectionDeviceType (Maybe Text)
vpnConnectionDeviceType_platform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnConnectionDeviceType' {Maybe Text
platform :: Maybe Text
$sel:platform:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
platform} -> Maybe Text
platform) (\s :: VpnConnectionDeviceType
s@VpnConnectionDeviceType' {} Maybe Text
a -> VpnConnectionDeviceType
s {$sel:platform:VpnConnectionDeviceType' :: Maybe Text
platform = Maybe Text
a} :: VpnConnectionDeviceType)

-- | Customer gateway device software version.
vpnConnectionDeviceType_software :: Lens.Lens' VpnConnectionDeviceType (Prelude.Maybe Prelude.Text)
vpnConnectionDeviceType_software :: Lens' VpnConnectionDeviceType (Maybe Text)
vpnConnectionDeviceType_software = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnConnectionDeviceType' {Maybe Text
software :: Maybe Text
$sel:software:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
software} -> Maybe Text
software) (\s :: VpnConnectionDeviceType
s@VpnConnectionDeviceType' {} Maybe Text
a -> VpnConnectionDeviceType
s {$sel:software:VpnConnectionDeviceType' :: Maybe Text
software = Maybe Text
a} :: VpnConnectionDeviceType)

-- | Customer gateway device vendor.
vpnConnectionDeviceType_vendor :: Lens.Lens' VpnConnectionDeviceType (Prelude.Maybe Prelude.Text)
vpnConnectionDeviceType_vendor :: Lens' VpnConnectionDeviceType (Maybe Text)
vpnConnectionDeviceType_vendor = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnConnectionDeviceType' {Maybe Text
vendor :: Maybe Text
$sel:vendor:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
vendor} -> Maybe Text
vendor) (\s :: VpnConnectionDeviceType
s@VpnConnectionDeviceType' {} Maybe Text
a -> VpnConnectionDeviceType
s {$sel:vendor:VpnConnectionDeviceType' :: Maybe Text
vendor = Maybe Text
a} :: VpnConnectionDeviceType)

-- | Customer gateway device identifier.
vpnConnectionDeviceType_vpnConnectionDeviceTypeId :: Lens.Lens' VpnConnectionDeviceType (Prelude.Maybe Prelude.Text)
vpnConnectionDeviceType_vpnConnectionDeviceTypeId :: Lens' VpnConnectionDeviceType (Maybe Text)
vpnConnectionDeviceType_vpnConnectionDeviceTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpnConnectionDeviceType' {Maybe Text
vpnConnectionDeviceTypeId :: Maybe Text
$sel:vpnConnectionDeviceTypeId:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
vpnConnectionDeviceTypeId} -> Maybe Text
vpnConnectionDeviceTypeId) (\s :: VpnConnectionDeviceType
s@VpnConnectionDeviceType' {} Maybe Text
a -> VpnConnectionDeviceType
s {$sel:vpnConnectionDeviceTypeId:VpnConnectionDeviceType' :: Maybe Text
vpnConnectionDeviceTypeId = Maybe Text
a} :: VpnConnectionDeviceType)

instance Data.FromXML VpnConnectionDeviceType where
  parseXML :: [Node] -> Either String VpnConnectionDeviceType
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpnConnectionDeviceType
VpnConnectionDeviceType'
      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
"platform")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"software")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"vendor")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"vpnConnectionDeviceTypeId")

instance Prelude.Hashable VpnConnectionDeviceType where
  hashWithSalt :: Int -> VpnConnectionDeviceType -> Int
hashWithSalt Int
_salt VpnConnectionDeviceType' {Maybe Text
vpnConnectionDeviceTypeId :: Maybe Text
vendor :: Maybe Text
software :: Maybe Text
platform :: Maybe Text
$sel:vpnConnectionDeviceTypeId:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
$sel:vendor:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
$sel:software:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
$sel:platform:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> 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
software
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vendor
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpnConnectionDeviceTypeId

instance Prelude.NFData VpnConnectionDeviceType where
  rnf :: VpnConnectionDeviceType -> ()
rnf VpnConnectionDeviceType' {Maybe Text
vpnConnectionDeviceTypeId :: Maybe Text
vendor :: Maybe Text
software :: Maybe Text
platform :: Maybe Text
$sel:vpnConnectionDeviceTypeId:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
$sel:vendor:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
$sel:software:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> Maybe Text
$sel:platform:VpnConnectionDeviceType' :: VpnConnectionDeviceType -> 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
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
vpnConnectionDeviceTypeId