{-# 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.IoTEvents.Types.IotSiteWiseInputIdentifier
-- 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.IoTEvents.Types.IotSiteWiseInputIdentifier where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTEvents.Types.IotSiteWiseAssetModelPropertyIdentifier
import qualified Amazonka.Prelude as Prelude

-- | The identifer of the input routed from AWS IoT SiteWise.
--
-- /See:/ 'newIotSiteWiseInputIdentifier' smart constructor.
data IotSiteWiseInputIdentifier = IotSiteWiseInputIdentifier'
  { -- | The identifier of the AWS IoT SiteWise asset model property.
    IotSiteWiseInputIdentifier
-> Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier :: Prelude.Maybe IotSiteWiseAssetModelPropertyIdentifier
  }
  deriving (IotSiteWiseInputIdentifier -> IotSiteWiseInputIdentifier -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IotSiteWiseInputIdentifier -> IotSiteWiseInputIdentifier -> Bool
$c/= :: IotSiteWiseInputIdentifier -> IotSiteWiseInputIdentifier -> Bool
== :: IotSiteWiseInputIdentifier -> IotSiteWiseInputIdentifier -> Bool
$c== :: IotSiteWiseInputIdentifier -> IotSiteWiseInputIdentifier -> Bool
Prelude.Eq, ReadPrec [IotSiteWiseInputIdentifier]
ReadPrec IotSiteWiseInputIdentifier
Int -> ReadS IotSiteWiseInputIdentifier
ReadS [IotSiteWiseInputIdentifier]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IotSiteWiseInputIdentifier]
$creadListPrec :: ReadPrec [IotSiteWiseInputIdentifier]
readPrec :: ReadPrec IotSiteWiseInputIdentifier
$creadPrec :: ReadPrec IotSiteWiseInputIdentifier
readList :: ReadS [IotSiteWiseInputIdentifier]
$creadList :: ReadS [IotSiteWiseInputIdentifier]
readsPrec :: Int -> ReadS IotSiteWiseInputIdentifier
$creadsPrec :: Int -> ReadS IotSiteWiseInputIdentifier
Prelude.Read, Int -> IotSiteWiseInputIdentifier -> ShowS
[IotSiteWiseInputIdentifier] -> ShowS
IotSiteWiseInputIdentifier -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IotSiteWiseInputIdentifier] -> ShowS
$cshowList :: [IotSiteWiseInputIdentifier] -> ShowS
show :: IotSiteWiseInputIdentifier -> String
$cshow :: IotSiteWiseInputIdentifier -> String
showsPrec :: Int -> IotSiteWiseInputIdentifier -> ShowS
$cshowsPrec :: Int -> IotSiteWiseInputIdentifier -> ShowS
Prelude.Show, forall x.
Rep IotSiteWiseInputIdentifier x -> IotSiteWiseInputIdentifier
forall x.
IotSiteWiseInputIdentifier -> Rep IotSiteWiseInputIdentifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IotSiteWiseInputIdentifier x -> IotSiteWiseInputIdentifier
$cfrom :: forall x.
IotSiteWiseInputIdentifier -> Rep IotSiteWiseInputIdentifier x
Prelude.Generic)

-- |
-- Create a value of 'IotSiteWiseInputIdentifier' 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:
--
-- 'iotSiteWiseAssetModelPropertyIdentifier', 'iotSiteWiseInputIdentifier_iotSiteWiseAssetModelPropertyIdentifier' - The identifier of the AWS IoT SiteWise asset model property.
newIotSiteWiseInputIdentifier ::
  IotSiteWiseInputIdentifier
newIotSiteWiseInputIdentifier :: IotSiteWiseInputIdentifier
newIotSiteWiseInputIdentifier =
  IotSiteWiseInputIdentifier'
    { $sel:iotSiteWiseAssetModelPropertyIdentifier:IotSiteWiseInputIdentifier' :: Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The identifier of the AWS IoT SiteWise asset model property.
iotSiteWiseInputIdentifier_iotSiteWiseAssetModelPropertyIdentifier :: Lens.Lens' IotSiteWiseInputIdentifier (Prelude.Maybe IotSiteWiseAssetModelPropertyIdentifier)
iotSiteWiseInputIdentifier_iotSiteWiseAssetModelPropertyIdentifier :: Lens'
  IotSiteWiseInputIdentifier
  (Maybe IotSiteWiseAssetModelPropertyIdentifier)
iotSiteWiseInputIdentifier_iotSiteWiseAssetModelPropertyIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IotSiteWiseInputIdentifier' {Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier :: Maybe IotSiteWiseAssetModelPropertyIdentifier
$sel:iotSiteWiseAssetModelPropertyIdentifier:IotSiteWiseInputIdentifier' :: IotSiteWiseInputIdentifier
-> Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier} -> Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier) (\s :: IotSiteWiseInputIdentifier
s@IotSiteWiseInputIdentifier' {} Maybe IotSiteWiseAssetModelPropertyIdentifier
a -> IotSiteWiseInputIdentifier
s {$sel:iotSiteWiseAssetModelPropertyIdentifier:IotSiteWiseInputIdentifier' :: Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier = Maybe IotSiteWiseAssetModelPropertyIdentifier
a} :: IotSiteWiseInputIdentifier)

instance Prelude.Hashable IotSiteWiseInputIdentifier where
  hashWithSalt :: Int -> IotSiteWiseInputIdentifier -> Int
hashWithSalt Int
_salt IotSiteWiseInputIdentifier' {Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier :: Maybe IotSiteWiseAssetModelPropertyIdentifier
$sel:iotSiteWiseAssetModelPropertyIdentifier:IotSiteWiseInputIdentifier' :: IotSiteWiseInputIdentifier
-> Maybe IotSiteWiseAssetModelPropertyIdentifier
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier

instance Prelude.NFData IotSiteWiseInputIdentifier where
  rnf :: IotSiteWiseInputIdentifier -> ()
rnf IotSiteWiseInputIdentifier' {Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier :: Maybe IotSiteWiseAssetModelPropertyIdentifier
$sel:iotSiteWiseAssetModelPropertyIdentifier:IotSiteWiseInputIdentifier' :: IotSiteWiseInputIdentifier
-> Maybe IotSiteWiseAssetModelPropertyIdentifier
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier

instance Data.ToJSON IotSiteWiseInputIdentifier where
  toJSON :: IotSiteWiseInputIdentifier -> Value
toJSON IotSiteWiseInputIdentifier' {Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier :: Maybe IotSiteWiseAssetModelPropertyIdentifier
$sel:iotSiteWiseAssetModelPropertyIdentifier:IotSiteWiseInputIdentifier' :: IotSiteWiseInputIdentifier
-> Maybe IotSiteWiseAssetModelPropertyIdentifier
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"iotSiteWiseAssetModelPropertyIdentifier" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IotSiteWiseAssetModelPropertyIdentifier
iotSiteWiseAssetModelPropertyIdentifier
          ]
      )