{-# 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.IoTWireless.Types.SessionKeysAbpV1_0_x -- 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.IoTWireless.Types.SessionKeysAbpV1_0_x 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 -- | Session keys for ABP v1.1 -- -- /See:/ 'newSessionKeysAbpV1_0_x' smart constructor. data SessionKeysAbpV1_0_x = SessionKeysAbpV1_0_x' { -- | The AppSKey value. appSKey :: Prelude.Maybe Prelude.Text, -- | The NwkSKey value. nwkSKey :: Prelude.Maybe Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'SessionKeysAbpV1_0_x' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'appSKey', 'sessionKeysAbpV1_0_x_appSKey' - The AppSKey value. -- -- 'nwkSKey', 'sessionKeysAbpV1_0_x_nwkSKey' - The NwkSKey value. newSessionKeysAbpV1_0_x :: SessionKeysAbpV1_0_x newSessionKeysAbpV1_0_x = SessionKeysAbpV1_0_x' { appSKey = Prelude.Nothing, nwkSKey = Prelude.Nothing } -- | The AppSKey value. sessionKeysAbpV1_0_x_appSKey :: Lens.Lens' SessionKeysAbpV1_0_x (Prelude.Maybe Prelude.Text) sessionKeysAbpV1_0_x_appSKey = Lens.lens (\SessionKeysAbpV1_0_x' {appSKey} -> appSKey) (\s@SessionKeysAbpV1_0_x' {} a -> s {appSKey = a} :: SessionKeysAbpV1_0_x) -- | The NwkSKey value. sessionKeysAbpV1_0_x_nwkSKey :: Lens.Lens' SessionKeysAbpV1_0_x (Prelude.Maybe Prelude.Text) sessionKeysAbpV1_0_x_nwkSKey = Lens.lens (\SessionKeysAbpV1_0_x' {nwkSKey} -> nwkSKey) (\s@SessionKeysAbpV1_0_x' {} a -> s {nwkSKey = a} :: SessionKeysAbpV1_0_x) instance Data.FromJSON SessionKeysAbpV1_0_x where parseJSON = Data.withObject "SessionKeysAbpV1_0_x" ( \x -> SessionKeysAbpV1_0_x' Prelude.<$> (x Data..:? "AppSKey") Prelude.<*> (x Data..:? "NwkSKey") ) instance Prelude.Hashable SessionKeysAbpV1_0_x where hashWithSalt _salt SessionKeysAbpV1_0_x' {..} = _salt `Prelude.hashWithSalt` appSKey `Prelude.hashWithSalt` nwkSKey instance Prelude.NFData SessionKeysAbpV1_0_x where rnf SessionKeysAbpV1_0_x' {..} = Prelude.rnf appSKey `Prelude.seq` Prelude.rnf nwkSKey instance Data.ToJSON SessionKeysAbpV1_0_x where toJSON SessionKeysAbpV1_0_x' {..} = Data.object ( Prelude.catMaybes [ ("AppSKey" Data..=) Prelude.<$> appSKey, ("NwkSKey" Data..=) Prelude.<$> nwkSKey ] )