{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The data associated with a network profile.
--
-- /See:/ 'newNetworkProfileData' smart constructor.
data NetworkProfileData = NetworkProfileData'
  { -- | The name of the network profile associated with a device.
    NetworkProfileData -> Maybe Text
networkProfileName :: Prelude.Maybe Prelude.Text,
    -- | The SSID of the Wi-Fi network.
    NetworkProfileData -> Maybe Text
ssid :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the network profile associated with a device.
    NetworkProfileData -> Maybe Text
networkProfileArn :: 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 authentication standard that is used in the EAP framework.
    -- Currently, EAP_TLS is supported.
    NetworkProfileData -> Maybe NetworkEapMethod
eapMethod :: Prelude.Maybe NetworkEapMethod,
    -- | Detailed information about a device\'s network profile.
    NetworkProfileData -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | 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
  }
  deriving (NetworkProfileData -> NetworkProfileData -> Bool
(NetworkProfileData -> NetworkProfileData -> Bool)
-> (NetworkProfileData -> NetworkProfileData -> Bool)
-> Eq NetworkProfileData
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]
(Int -> ReadS NetworkProfileData)
-> ReadS [NetworkProfileData]
-> ReadPrec NetworkProfileData
-> ReadPrec [NetworkProfileData]
-> Read 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
(Int -> NetworkProfileData -> ShowS)
-> (NetworkProfileData -> String)
-> ([NetworkProfileData] -> ShowS)
-> Show NetworkProfileData
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. NetworkProfileData -> Rep NetworkProfileData x)
-> (forall x. Rep NetworkProfileData x -> NetworkProfileData)
-> Generic NetworkProfileData
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:
--
-- 'networkProfileName', 'networkProfileData_networkProfileName' - The name of the network profile associated with a device.
--
-- 'ssid', 'networkProfileData_ssid' - The SSID of the Wi-Fi network.
--
-- 'networkProfileArn', 'networkProfileData_networkProfileArn' - The ARN 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.
--
-- 'eapMethod', 'networkProfileData_eapMethod' - The authentication standard that is used in the EAP framework.
-- Currently, EAP_TLS is supported.
--
-- 'description', 'networkProfileData_description' - Detailed information about a device\'s network profile.
--
-- '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.
newNetworkProfileData ::
  NetworkProfileData
newNetworkProfileData :: NetworkProfileData
newNetworkProfileData =
  NetworkProfileData' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe NetworkSecurityType
-> Maybe NetworkEapMethod
-> Maybe Text
-> Maybe Text
-> NetworkProfileData
NetworkProfileData'
    { $sel:networkProfileName:NetworkProfileData' :: Maybe Text
networkProfileName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ssid:NetworkProfileData' :: Maybe Text
ssid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:networkProfileArn:NetworkProfileData' :: Maybe Text
networkProfileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityType:NetworkProfileData' :: Maybe NetworkSecurityType
securityType = Maybe NetworkSecurityType
forall a. Maybe a
Prelude.Nothing,
      $sel:eapMethod:NetworkProfileData' :: Maybe NetworkEapMethod
eapMethod = Maybe NetworkEapMethod
forall a. Maybe a
Prelude.Nothing,
      $sel:description:NetworkProfileData' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:certificateAuthorityArn:NetworkProfileData' :: Maybe Text
certificateAuthorityArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The name of the network profile associated with a device.
networkProfileData_networkProfileName :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_networkProfileName :: (Maybe Text -> f (Maybe Text))
-> NetworkProfileData -> f NetworkProfileData
networkProfileData_networkProfileName = (NetworkProfileData -> Maybe Text)
-> (NetworkProfileData -> Maybe Text -> NetworkProfileData)
-> Lens
     NetworkProfileData NetworkProfileData (Maybe Text) (Maybe Text)
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 SSID of the Wi-Fi network.
networkProfileData_ssid :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_ssid :: (Maybe Text -> f (Maybe Text))
-> NetworkProfileData -> f NetworkProfileData
networkProfileData_ssid = (NetworkProfileData -> Maybe Text)
-> (NetworkProfileData -> Maybe Text -> NetworkProfileData)
-> Lens
     NetworkProfileData NetworkProfileData (Maybe Text) (Maybe Text)
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)

-- | The ARN of the network profile associated with a device.
networkProfileData_networkProfileArn :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_networkProfileArn :: (Maybe Text -> f (Maybe Text))
-> NetworkProfileData -> f NetworkProfileData
networkProfileData_networkProfileArn = (NetworkProfileData -> Maybe Text)
-> (NetworkProfileData -> Maybe Text -> NetworkProfileData)
-> Lens
     NetworkProfileData NetworkProfileData (Maybe Text) (Maybe Text)
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 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 :: (Maybe NetworkSecurityType -> f (Maybe NetworkSecurityType))
-> NetworkProfileData -> f NetworkProfileData
networkProfileData_securityType = (NetworkProfileData -> Maybe NetworkSecurityType)
-> (NetworkProfileData
    -> Maybe NetworkSecurityType -> NetworkProfileData)
-> Lens
     NetworkProfileData
     NetworkProfileData
     (Maybe NetworkSecurityType)
     (Maybe NetworkSecurityType)
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 authentication standard that is used in the EAP framework.
-- Currently, EAP_TLS is supported.
networkProfileData_eapMethod :: Lens.Lens' NetworkProfileData (Prelude.Maybe NetworkEapMethod)
networkProfileData_eapMethod :: (Maybe NetworkEapMethod -> f (Maybe NetworkEapMethod))
-> NetworkProfileData -> f NetworkProfileData
networkProfileData_eapMethod = (NetworkProfileData -> Maybe NetworkEapMethod)
-> (NetworkProfileData
    -> Maybe NetworkEapMethod -> NetworkProfileData)
-> Lens
     NetworkProfileData
     NetworkProfileData
     (Maybe NetworkEapMethod)
     (Maybe NetworkEapMethod)
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)

-- | Detailed information about a device\'s network profile.
networkProfileData_description :: Lens.Lens' NetworkProfileData (Prelude.Maybe Prelude.Text)
networkProfileData_description :: (Maybe Text -> f (Maybe Text))
-> NetworkProfileData -> f NetworkProfileData
networkProfileData_description = (NetworkProfileData -> Maybe Text)
-> (NetworkProfileData -> Maybe Text -> NetworkProfileData)
-> Lens
     NetworkProfileData NetworkProfileData (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text))
-> NetworkProfileData -> f NetworkProfileData
networkProfileData_certificateAuthorityArn = (NetworkProfileData -> Maybe Text)
-> (NetworkProfileData -> Maybe Text -> NetworkProfileData)
-> Lens
     NetworkProfileData NetworkProfileData (Maybe Text) (Maybe Text)
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)

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

instance Prelude.Hashable NetworkProfileData

instance Prelude.NFData NetworkProfileData