{-# 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.AlexaBusiness.Types.NetworkProfileData
-- 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.AlexaBusiness.Types.NetworkProfileData where

import Amazonka.AlexaBusiness.Types.NetworkEapMethod
import Amazonka.AlexaBusiness.Types.NetworkSecurityType
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

-- | The data associated with a network profile.
--
-- /See:/ 'newNetworkProfileData' smart constructor.
data NetworkProfileData = NetworkProfileData'
  { -- | The ARN of the Private Certificate Authority (PCA) created in AWS
    -- Certificate Manager (ACM). This is used to issue certificates to the
    -- devices.
    NetworkProfileData -> Maybe Text
certificateAuthorityArn :: Prelude.Maybe Prelude.Text,
    -- | Detailed information about a device\'s network profile.
    NetworkProfileData -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The authentication standard that is used in the EAP framework.
    -- Currently, EAP_TLS is supported.
    NetworkProfileData -> Maybe NetworkEapMethod
eapMethod :: Prelude.Maybe NetworkEapMethod,
    -- | The ARN of the network profile associated with a device.
    NetworkProfileData -> Maybe Text
networkProfileArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the network profile associated with a device.
    NetworkProfileData -> Maybe Text
networkProfileName :: Prelude.Maybe Prelude.Text,
    -- | The security type of the Wi-Fi network. This can be WPA2_ENTERPRISE,
    -- WPA2_PSK, WPA_PSK, WEP, or OPEN.
    NetworkProfileData -> Maybe NetworkSecurityType
securityType :: Prelude.Maybe NetworkSecurityType,
    -- | The SSID of the Wi-Fi network.
    NetworkProfileData -> Maybe Text
ssid :: Prelude.Maybe Prelude.Text
  }
  deriving (NetworkProfileData -> NetworkProfileData -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkProfileData -> NetworkProfileData -> Bool
$c/= :: NetworkProfileData -> NetworkProfileData -> Bool
== :: NetworkProfileData -> NetworkProfileData -> Bool
$c== :: NetworkProfileData -> NetworkProfileData -> Bool
Prelude.Eq, ReadPrec [NetworkProfileData]
ReadPrec NetworkProfileData
Int -> ReadS NetworkProfileData
ReadS [NetworkProfileData]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkProfileData]
$creadListPrec :: ReadPrec [NetworkProfileData]
readPrec :: ReadPrec NetworkProfileData
$creadPrec :: ReadPrec NetworkProfileData
readList :: ReadS [NetworkProfileData]
$creadList :: ReadS [NetworkProfileData]
readsPrec :: Int -> ReadS NetworkProfileData
$creadsPrec :: Int -> ReadS NetworkProfileData
Prelude.Read, Int -> NetworkProfileData -> ShowS
[NetworkProfileData] -> ShowS
NetworkProfileData -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkProfileData] -> ShowS
$cshowList :: [NetworkProfileData] -> ShowS
show :: NetworkProfileData -> String
$cshow :: NetworkProfileData -> String
showsPrec :: Int -> NetworkProfileData -> ShowS
$cshowsPrec :: Int -> NetworkProfileData -> ShowS
Prelude.Show, forall x. Rep NetworkProfileData x -> NetworkProfileData
forall x. NetworkProfileData -> Rep NetworkProfileData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NetworkProfileData x -> NetworkProfileData
$cfrom :: forall x. NetworkProfileData -> Rep NetworkProfileData x
Prelude.Generic)

-- |
-- Create a value of 'NetworkProfileData' 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:
--
-- 'certificateAuthorityArn', 'networkProfileData_certificateAuthorityArn' - The ARN of the Private Certificate Authority (PCA) created in AWS
-- Certificate Manager (ACM). This is used to issue certificates to the
-- devices.
--
-- 'description', 'networkProfileData_description' - Detailed information about a device\'s network profile.
--
-- 'eapMethod', 'networkProfileData_eapMethod' - The authentication standard that is used in the EAP framework.
-- Currently, EAP_TLS is supported.
--
-- 'networkProfileArn', 'networkProfileData_networkProfileArn' - The ARN of the network profile associated with a device.
--
-- 'networkProfileName', 'networkProfileData_networkProfileName' - The name of the network profile associated with a device.
--
-- 'securityType', 'networkProfileData_securityType' - The security type of the Wi-Fi network. This can be WPA2_ENTERPRISE,
-- WPA2_PSK, WPA_PSK, WEP, or OPEN.
--
-- 'ssid', 'networkProfileData_ssid' - The SSID of the Wi-Fi network.
newNetworkProfileData ::
  NetworkProfileData
newNetworkProfileData :: NetworkProfileData
newNetworkProfileData =
  NetworkProfileData'
    { $sel:certificateAuthorityArn:NetworkProfileData' :: Maybe Text
certificateAuthorityArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:description:NetworkProfileData' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:eapMethod:NetworkProfileData' :: Maybe NetworkEapMethod
eapMethod = forall a. Maybe a
Prelude.Nothing,
      $sel:networkProfileArn:NetworkProfileData' :: Maybe Text
networkProfileArn = forall a. Maybe a
Prelude.Nothing,
      $sel:networkProfileName:NetworkProfileData' :: Maybe Text
networkProfileName = forall a. Maybe a
Prelude.Nothing,
      $sel:securityType:NetworkProfileData' :: Maybe NetworkSecurityType
securityType = forall a. Maybe a
Prelude.Nothing,
      $sel:ssid:NetworkProfileData' :: Maybe Text
ssid = forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the Private Certificate Authority (PCA) created in AWS
-- Certificate Manager (ACM). This is used to issue certificates to the
-- devices.
networkProfileData_certificateAuthorityArn :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_certificateAuthorityArn :: Lens' NetworkProfileData (Maybe Text)
networkProfileData_certificateAuthorityArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfileData' {Maybe Text
certificateAuthorityArn :: Maybe Text
$sel:certificateAuthorityArn:NetworkProfileData' :: NetworkProfileData -> Maybe Text
certificateAuthorityArn} -> Maybe Text
certificateAuthorityArn) (\s :: NetworkProfileData
s@NetworkProfileData' {} Maybe Text
a -> NetworkProfileData
s {$sel:certificateAuthorityArn:NetworkProfileData' :: Maybe Text
certificateAuthorityArn = Maybe Text
a} :: NetworkProfileData)

-- | Detailed information about a device\'s network profile.
networkProfileData_description :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_description :: Lens' NetworkProfileData (Maybe Text)
networkProfileData_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfileData' {Maybe Text
description :: Maybe Text
$sel:description:NetworkProfileData' :: NetworkProfileData -> Maybe Text
description} -> Maybe Text
description) (\s :: NetworkProfileData
s@NetworkProfileData' {} Maybe Text
a -> NetworkProfileData
s {$sel:description:NetworkProfileData' :: Maybe Text
description = Maybe Text
a} :: NetworkProfileData)

-- | The authentication standard that is used in the EAP framework.
-- Currently, EAP_TLS is supported.
networkProfileData_eapMethod :: Lens.Lens' NetworkProfileData (Prelude.Maybe NetworkEapMethod)
networkProfileData_eapMethod :: Lens' NetworkProfileData (Maybe NetworkEapMethod)
networkProfileData_eapMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfileData' {Maybe NetworkEapMethod
eapMethod :: Maybe NetworkEapMethod
$sel:eapMethod:NetworkProfileData' :: NetworkProfileData -> Maybe NetworkEapMethod
eapMethod} -> Maybe NetworkEapMethod
eapMethod) (\s :: NetworkProfileData
s@NetworkProfileData' {} Maybe NetworkEapMethod
a -> NetworkProfileData
s {$sel:eapMethod:NetworkProfileData' :: Maybe NetworkEapMethod
eapMethod = Maybe NetworkEapMethod
a} :: NetworkProfileData)

-- | The ARN of the network profile associated with a device.
networkProfileData_networkProfileArn :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_networkProfileArn :: Lens' NetworkProfileData (Maybe Text)
networkProfileData_networkProfileArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfileData' {Maybe Text
networkProfileArn :: Maybe Text
$sel:networkProfileArn:NetworkProfileData' :: NetworkProfileData -> Maybe Text
networkProfileArn} -> Maybe Text
networkProfileArn) (\s :: NetworkProfileData
s@NetworkProfileData' {} Maybe Text
a -> NetworkProfileData
s {$sel:networkProfileArn:NetworkProfileData' :: Maybe Text
networkProfileArn = Maybe Text
a} :: NetworkProfileData)

-- | The name of the network profile associated with a device.
networkProfileData_networkProfileName :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_networkProfileName :: Lens' NetworkProfileData (Maybe Text)
networkProfileData_networkProfileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfileData' {Maybe Text
networkProfileName :: Maybe Text
$sel:networkProfileName:NetworkProfileData' :: NetworkProfileData -> Maybe Text
networkProfileName} -> Maybe Text
networkProfileName) (\s :: NetworkProfileData
s@NetworkProfileData' {} Maybe Text
a -> NetworkProfileData
s {$sel:networkProfileName:NetworkProfileData' :: Maybe Text
networkProfileName = Maybe Text
a} :: NetworkProfileData)

-- | The security type of the Wi-Fi network. This can be WPA2_ENTERPRISE,
-- WPA2_PSK, WPA_PSK, WEP, or OPEN.
networkProfileData_securityType :: Lens.Lens' NetworkProfileData (Prelude.Maybe NetworkSecurityType)
networkProfileData_securityType :: Lens' NetworkProfileData (Maybe NetworkSecurityType)
networkProfileData_securityType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfileData' {Maybe NetworkSecurityType
securityType :: Maybe NetworkSecurityType
$sel:securityType:NetworkProfileData' :: NetworkProfileData -> Maybe NetworkSecurityType
securityType} -> Maybe NetworkSecurityType
securityType) (\s :: NetworkProfileData
s@NetworkProfileData' {} Maybe NetworkSecurityType
a -> NetworkProfileData
s {$sel:securityType:NetworkProfileData' :: Maybe NetworkSecurityType
securityType = Maybe NetworkSecurityType
a} :: NetworkProfileData)

-- | The SSID of the Wi-Fi network.
networkProfileData_ssid :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_ssid :: Lens' NetworkProfileData (Maybe Text)
networkProfileData_ssid = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkProfileData' {Maybe Text
ssid :: Maybe Text
$sel:ssid:NetworkProfileData' :: NetworkProfileData -> Maybe Text
ssid} -> Maybe Text
ssid) (\s :: NetworkProfileData
s@NetworkProfileData' {} Maybe Text
a -> NetworkProfileData
s {$sel:ssid:NetworkProfileData' :: Maybe Text
ssid = Maybe Text
a} :: NetworkProfileData)

instance Data.FromJSON NetworkProfileData where
  parseJSON :: Value -> Parser NetworkProfileData
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"NetworkProfileData"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe NetworkEapMethod
-> Maybe Text
-> Maybe Text
-> Maybe NetworkSecurityType
-> Maybe Text
-> NetworkProfileData
NetworkProfileData'
            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
"CertificateAuthorityArn")
            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
"Description")
            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
"EapMethod")
            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
"NetworkProfileArn")
            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
"NetworkProfileName")
            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
"SecurityType")
            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
"Ssid")
      )

instance Prelude.Hashable NetworkProfileData where
  hashWithSalt :: Int -> NetworkProfileData -> Int
hashWithSalt Int
_salt NetworkProfileData' {Maybe Text
Maybe NetworkEapMethod
Maybe NetworkSecurityType
ssid :: Maybe Text
securityType :: Maybe NetworkSecurityType
networkProfileName :: Maybe Text
networkProfileArn :: Maybe Text
eapMethod :: Maybe NetworkEapMethod
description :: Maybe Text
certificateAuthorityArn :: Maybe Text
$sel:ssid:NetworkProfileData' :: NetworkProfileData -> Maybe Text
$sel:securityType:NetworkProfileData' :: NetworkProfileData -> Maybe NetworkSecurityType
$sel:networkProfileName:NetworkProfileData' :: NetworkProfileData -> Maybe Text
$sel:networkProfileArn:NetworkProfileData' :: NetworkProfileData -> Maybe Text
$sel:eapMethod:NetworkProfileData' :: NetworkProfileData -> Maybe NetworkEapMethod
$sel:description:NetworkProfileData' :: NetworkProfileData -> Maybe Text
$sel:certificateAuthorityArn:NetworkProfileData' :: NetworkProfileData -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificateAuthorityArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkEapMethod
eapMethod
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkProfileArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkProfileName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkSecurityType
securityType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ssid

instance Prelude.NFData NetworkProfileData where
  rnf :: NetworkProfileData -> ()
rnf NetworkProfileData' {Maybe Text
Maybe NetworkEapMethod
Maybe NetworkSecurityType
ssid :: Maybe Text
securityType :: Maybe NetworkSecurityType
networkProfileName :: Maybe Text
networkProfileArn :: Maybe Text
eapMethod :: Maybe NetworkEapMethod
description :: Maybe Text
certificateAuthorityArn :: Maybe Text
$sel:ssid:NetworkProfileData' :: NetworkProfileData -> Maybe Text
$sel:securityType:NetworkProfileData' :: NetworkProfileData -> Maybe NetworkSecurityType
$sel:networkProfileName:NetworkProfileData' :: NetworkProfileData -> Maybe Text
$sel:networkProfileArn:NetworkProfileData' :: NetworkProfileData -> Maybe Text
$sel:eapMethod:NetworkProfileData' :: NetworkProfileData -> Maybe NetworkEapMethod
$sel:description:NetworkProfileData' :: NetworkProfileData -> Maybe Text
$sel:certificateAuthorityArn:NetworkProfileData' :: NetworkProfileData -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificateAuthorityArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkEapMethod
eapMethod
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkProfileArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkProfileName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkSecurityType
securityType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ssid