{-# 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.SidewalkAccountInfoWithFingerprint
-- 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.IoTWireless.Types.SidewalkAccountInfoWithFingerprint where

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

-- | Information about a Sidewalk account.
--
-- /See:/ 'newSidewalkAccountInfoWithFingerprint' smart constructor.
data SidewalkAccountInfoWithFingerprint = SidewalkAccountInfoWithFingerprint'
  { -- | The Amazon Resource Name of the resource.
    SidewalkAccountInfoWithFingerprint -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The fingerprint of the Sidewalk application server private key.
    SidewalkAccountInfoWithFingerprint -> Maybe (Sensitive Text)
fingerprint :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The Sidewalk Amazon ID.
    SidewalkAccountInfoWithFingerprint -> Maybe Text
amazonId :: Prelude.Maybe Prelude.Text
  }
  deriving (SidewalkAccountInfoWithFingerprint
-> SidewalkAccountInfoWithFingerprint -> Bool
(SidewalkAccountInfoWithFingerprint
 -> SidewalkAccountInfoWithFingerprint -> Bool)
-> (SidewalkAccountInfoWithFingerprint
    -> SidewalkAccountInfoWithFingerprint -> Bool)
-> Eq SidewalkAccountInfoWithFingerprint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SidewalkAccountInfoWithFingerprint
-> SidewalkAccountInfoWithFingerprint -> Bool
$c/= :: SidewalkAccountInfoWithFingerprint
-> SidewalkAccountInfoWithFingerprint -> Bool
== :: SidewalkAccountInfoWithFingerprint
-> SidewalkAccountInfoWithFingerprint -> Bool
$c== :: SidewalkAccountInfoWithFingerprint
-> SidewalkAccountInfoWithFingerprint -> Bool
Prelude.Eq, Int -> SidewalkAccountInfoWithFingerprint -> ShowS
[SidewalkAccountInfoWithFingerprint] -> ShowS
SidewalkAccountInfoWithFingerprint -> String
(Int -> SidewalkAccountInfoWithFingerprint -> ShowS)
-> (SidewalkAccountInfoWithFingerprint -> String)
-> ([SidewalkAccountInfoWithFingerprint] -> ShowS)
-> Show SidewalkAccountInfoWithFingerprint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SidewalkAccountInfoWithFingerprint] -> ShowS
$cshowList :: [SidewalkAccountInfoWithFingerprint] -> ShowS
show :: SidewalkAccountInfoWithFingerprint -> String
$cshow :: SidewalkAccountInfoWithFingerprint -> String
showsPrec :: Int -> SidewalkAccountInfoWithFingerprint -> ShowS
$cshowsPrec :: Int -> SidewalkAccountInfoWithFingerprint -> ShowS
Prelude.Show, (forall x.
 SidewalkAccountInfoWithFingerprint
 -> Rep SidewalkAccountInfoWithFingerprint x)
-> (forall x.
    Rep SidewalkAccountInfoWithFingerprint x
    -> SidewalkAccountInfoWithFingerprint)
-> Generic SidewalkAccountInfoWithFingerprint
forall x.
Rep SidewalkAccountInfoWithFingerprint x
-> SidewalkAccountInfoWithFingerprint
forall x.
SidewalkAccountInfoWithFingerprint
-> Rep SidewalkAccountInfoWithFingerprint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SidewalkAccountInfoWithFingerprint x
-> SidewalkAccountInfoWithFingerprint
$cfrom :: forall x.
SidewalkAccountInfoWithFingerprint
-> Rep SidewalkAccountInfoWithFingerprint x
Prelude.Generic)

-- |
-- Create a value of 'SidewalkAccountInfoWithFingerprint' 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:
--
-- 'arn', 'sidewalkAccountInfoWithFingerprint_arn' - The Amazon Resource Name of the resource.
--
-- 'fingerprint', 'sidewalkAccountInfoWithFingerprint_fingerprint' - The fingerprint of the Sidewalk application server private key.
--
-- 'amazonId', 'sidewalkAccountInfoWithFingerprint_amazonId' - The Sidewalk Amazon ID.
newSidewalkAccountInfoWithFingerprint ::
  SidewalkAccountInfoWithFingerprint
newSidewalkAccountInfoWithFingerprint :: SidewalkAccountInfoWithFingerprint
newSidewalkAccountInfoWithFingerprint =
  SidewalkAccountInfoWithFingerprint' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> SidewalkAccountInfoWithFingerprint
SidewalkAccountInfoWithFingerprint'
    { $sel:arn:SidewalkAccountInfoWithFingerprint' :: Maybe Text
arn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:fingerprint:SidewalkAccountInfoWithFingerprint' :: Maybe (Sensitive Text)
fingerprint = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:amazonId:SidewalkAccountInfoWithFingerprint' :: Maybe Text
amazonId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name of the resource.
sidewalkAccountInfoWithFingerprint_arn :: Lens.Lens' SidewalkAccountInfoWithFingerprint (Prelude.Maybe Prelude.Text)
sidewalkAccountInfoWithFingerprint_arn :: (Maybe Text -> f (Maybe Text))
-> SidewalkAccountInfoWithFingerprint
-> f SidewalkAccountInfoWithFingerprint
sidewalkAccountInfoWithFingerprint_arn = (SidewalkAccountInfoWithFingerprint -> Maybe Text)
-> (SidewalkAccountInfoWithFingerprint
    -> Maybe Text -> SidewalkAccountInfoWithFingerprint)
-> Lens
     SidewalkAccountInfoWithFingerprint
     SidewalkAccountInfoWithFingerprint
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SidewalkAccountInfoWithFingerprint' {Maybe Text
arn :: Maybe Text
$sel:arn:SidewalkAccountInfoWithFingerprint' :: SidewalkAccountInfoWithFingerprint -> Maybe Text
arn} -> Maybe Text
arn) (\s :: SidewalkAccountInfoWithFingerprint
s@SidewalkAccountInfoWithFingerprint' {} Maybe Text
a -> SidewalkAccountInfoWithFingerprint
s {$sel:arn:SidewalkAccountInfoWithFingerprint' :: Maybe Text
arn = Maybe Text
a} :: SidewalkAccountInfoWithFingerprint)

-- | The fingerprint of the Sidewalk application server private key.
sidewalkAccountInfoWithFingerprint_fingerprint :: Lens.Lens' SidewalkAccountInfoWithFingerprint (Prelude.Maybe Prelude.Text)
sidewalkAccountInfoWithFingerprint_fingerprint :: (Maybe Text -> f (Maybe Text))
-> SidewalkAccountInfoWithFingerprint
-> f SidewalkAccountInfoWithFingerprint
sidewalkAccountInfoWithFingerprint_fingerprint = (SidewalkAccountInfoWithFingerprint -> Maybe (Sensitive Text))
-> (SidewalkAccountInfoWithFingerprint
    -> Maybe (Sensitive Text) -> SidewalkAccountInfoWithFingerprint)
-> Lens
     SidewalkAccountInfoWithFingerprint
     SidewalkAccountInfoWithFingerprint
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SidewalkAccountInfoWithFingerprint' {Maybe (Sensitive Text)
fingerprint :: Maybe (Sensitive Text)
$sel:fingerprint:SidewalkAccountInfoWithFingerprint' :: SidewalkAccountInfoWithFingerprint -> Maybe (Sensitive Text)
fingerprint} -> Maybe (Sensitive Text)
fingerprint) (\s :: SidewalkAccountInfoWithFingerprint
s@SidewalkAccountInfoWithFingerprint' {} Maybe (Sensitive Text)
a -> SidewalkAccountInfoWithFingerprint
s {$sel:fingerprint:SidewalkAccountInfoWithFingerprint' :: Maybe (Sensitive Text)
fingerprint = Maybe (Sensitive Text)
a} :: SidewalkAccountInfoWithFingerprint) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> SidewalkAccountInfoWithFingerprint
 -> f SidewalkAccountInfoWithFingerprint)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SidewalkAccountInfoWithFingerprint
-> f SidewalkAccountInfoWithFingerprint
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The Sidewalk Amazon ID.
sidewalkAccountInfoWithFingerprint_amazonId :: Lens.Lens' SidewalkAccountInfoWithFingerprint (Prelude.Maybe Prelude.Text)
sidewalkAccountInfoWithFingerprint_amazonId :: (Maybe Text -> f (Maybe Text))
-> SidewalkAccountInfoWithFingerprint
-> f SidewalkAccountInfoWithFingerprint
sidewalkAccountInfoWithFingerprint_amazonId = (SidewalkAccountInfoWithFingerprint -> Maybe Text)
-> (SidewalkAccountInfoWithFingerprint
    -> Maybe Text -> SidewalkAccountInfoWithFingerprint)
-> Lens
     SidewalkAccountInfoWithFingerprint
     SidewalkAccountInfoWithFingerprint
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SidewalkAccountInfoWithFingerprint' {Maybe Text
amazonId :: Maybe Text
$sel:amazonId:SidewalkAccountInfoWithFingerprint' :: SidewalkAccountInfoWithFingerprint -> Maybe Text
amazonId} -> Maybe Text
amazonId) (\s :: SidewalkAccountInfoWithFingerprint
s@SidewalkAccountInfoWithFingerprint' {} Maybe Text
a -> SidewalkAccountInfoWithFingerprint
s {$sel:amazonId:SidewalkAccountInfoWithFingerprint' :: Maybe Text
amazonId = Maybe Text
a} :: SidewalkAccountInfoWithFingerprint)

instance
  Core.FromJSON
    SidewalkAccountInfoWithFingerprint
  where
  parseJSON :: Value -> Parser SidewalkAccountInfoWithFingerprint
parseJSON =
    String
-> (Object -> Parser SidewalkAccountInfoWithFingerprint)
-> Value
-> Parser SidewalkAccountInfoWithFingerprint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SidewalkAccountInfoWithFingerprint"
      ( \Object
x ->
          Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> SidewalkAccountInfoWithFingerprint
SidewalkAccountInfoWithFingerprint'
            (Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> SidewalkAccountInfoWithFingerprint)
-> Parser (Maybe Text)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Text -> SidewalkAccountInfoWithFingerprint)
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
"Arn")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Text -> SidewalkAccountInfoWithFingerprint)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe Text -> SidewalkAccountInfoWithFingerprint)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Fingerprint")
            Parser (Maybe Text -> SidewalkAccountInfoWithFingerprint)
-> Parser (Maybe Text) -> Parser SidewalkAccountInfoWithFingerprint
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
"AmazonId")
      )

instance
  Prelude.Hashable
    SidewalkAccountInfoWithFingerprint

instance
  Prelude.NFData
    SidewalkAccountInfoWithFingerprint