{-# 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 #-}
module Amazonka.CognitoIdentityProvider.Types.NewDeviceMetadataType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NewDeviceMetadataType = NewDeviceMetadataType'
{
NewDeviceMetadataType -> Maybe Text
deviceGroupKey :: Prelude.Maybe Prelude.Text,
NewDeviceMetadataType -> Maybe Text
deviceKey :: Prelude.Maybe Prelude.Text
}
deriving (NewDeviceMetadataType -> NewDeviceMetadataType -> Bool
(NewDeviceMetadataType -> NewDeviceMetadataType -> Bool)
-> (NewDeviceMetadataType -> NewDeviceMetadataType -> Bool)
-> Eq NewDeviceMetadataType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NewDeviceMetadataType -> NewDeviceMetadataType -> Bool
$c/= :: NewDeviceMetadataType -> NewDeviceMetadataType -> Bool
== :: NewDeviceMetadataType -> NewDeviceMetadataType -> Bool
$c== :: NewDeviceMetadataType -> NewDeviceMetadataType -> Bool
Prelude.Eq, ReadPrec [NewDeviceMetadataType]
ReadPrec NewDeviceMetadataType
Int -> ReadS NewDeviceMetadataType
ReadS [NewDeviceMetadataType]
(Int -> ReadS NewDeviceMetadataType)
-> ReadS [NewDeviceMetadataType]
-> ReadPrec NewDeviceMetadataType
-> ReadPrec [NewDeviceMetadataType]
-> Read NewDeviceMetadataType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NewDeviceMetadataType]
$creadListPrec :: ReadPrec [NewDeviceMetadataType]
readPrec :: ReadPrec NewDeviceMetadataType
$creadPrec :: ReadPrec NewDeviceMetadataType
readList :: ReadS [NewDeviceMetadataType]
$creadList :: ReadS [NewDeviceMetadataType]
readsPrec :: Int -> ReadS NewDeviceMetadataType
$creadsPrec :: Int -> ReadS NewDeviceMetadataType
Prelude.Read, Int -> NewDeviceMetadataType -> ShowS
[NewDeviceMetadataType] -> ShowS
NewDeviceMetadataType -> String
(Int -> NewDeviceMetadataType -> ShowS)
-> (NewDeviceMetadataType -> String)
-> ([NewDeviceMetadataType] -> ShowS)
-> Show NewDeviceMetadataType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NewDeviceMetadataType] -> ShowS
$cshowList :: [NewDeviceMetadataType] -> ShowS
show :: NewDeviceMetadataType -> String
$cshow :: NewDeviceMetadataType -> String
showsPrec :: Int -> NewDeviceMetadataType -> ShowS
$cshowsPrec :: Int -> NewDeviceMetadataType -> ShowS
Prelude.Show, (forall x. NewDeviceMetadataType -> Rep NewDeviceMetadataType x)
-> (forall x. Rep NewDeviceMetadataType x -> NewDeviceMetadataType)
-> Generic NewDeviceMetadataType
forall x. Rep NewDeviceMetadataType x -> NewDeviceMetadataType
forall x. NewDeviceMetadataType -> Rep NewDeviceMetadataType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NewDeviceMetadataType x -> NewDeviceMetadataType
$cfrom :: forall x. NewDeviceMetadataType -> Rep NewDeviceMetadataType x
Prelude.Generic)
newNewDeviceMetadataType ::
NewDeviceMetadataType
newNewDeviceMetadataType :: NewDeviceMetadataType
newNewDeviceMetadataType =
NewDeviceMetadataType' :: Maybe Text -> Maybe Text -> NewDeviceMetadataType
NewDeviceMetadataType'
{ $sel:deviceGroupKey:NewDeviceMetadataType' :: Maybe Text
deviceGroupKey =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deviceKey:NewDeviceMetadataType' :: Maybe Text
deviceKey = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
newDeviceMetadataType_deviceGroupKey :: Lens.Lens' NewDeviceMetadataType (Prelude.Maybe Prelude.Text)
newDeviceMetadataType_deviceGroupKey :: (Maybe Text -> f (Maybe Text))
-> NewDeviceMetadataType -> f NewDeviceMetadataType
newDeviceMetadataType_deviceGroupKey = (NewDeviceMetadataType -> Maybe Text)
-> (NewDeviceMetadataType -> Maybe Text -> NewDeviceMetadataType)
-> Lens
NewDeviceMetadataType
NewDeviceMetadataType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewDeviceMetadataType' {Maybe Text
deviceGroupKey :: Maybe Text
$sel:deviceGroupKey:NewDeviceMetadataType' :: NewDeviceMetadataType -> Maybe Text
deviceGroupKey} -> Maybe Text
deviceGroupKey) (\s :: NewDeviceMetadataType
s@NewDeviceMetadataType' {} Maybe Text
a -> NewDeviceMetadataType
s {$sel:deviceGroupKey:NewDeviceMetadataType' :: Maybe Text
deviceGroupKey = Maybe Text
a} :: NewDeviceMetadataType)
newDeviceMetadataType_deviceKey :: Lens.Lens' NewDeviceMetadataType (Prelude.Maybe Prelude.Text)
newDeviceMetadataType_deviceKey :: (Maybe Text -> f (Maybe Text))
-> NewDeviceMetadataType -> f NewDeviceMetadataType
newDeviceMetadataType_deviceKey = (NewDeviceMetadataType -> Maybe Text)
-> (NewDeviceMetadataType -> Maybe Text -> NewDeviceMetadataType)
-> Lens
NewDeviceMetadataType
NewDeviceMetadataType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NewDeviceMetadataType' {Maybe Text
deviceKey :: Maybe Text
$sel:deviceKey:NewDeviceMetadataType' :: NewDeviceMetadataType -> Maybe Text
deviceKey} -> Maybe Text
deviceKey) (\s :: NewDeviceMetadataType
s@NewDeviceMetadataType' {} Maybe Text
a -> NewDeviceMetadataType
s {$sel:deviceKey:NewDeviceMetadataType' :: Maybe Text
deviceKey = Maybe Text
a} :: NewDeviceMetadataType)
instance Core.FromJSON NewDeviceMetadataType where
parseJSON :: Value -> Parser NewDeviceMetadataType
parseJSON =
String
-> (Object -> Parser NewDeviceMetadataType)
-> Value
-> Parser NewDeviceMetadataType
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NewDeviceMetadataType"
( \Object
x ->
Maybe Text -> Maybe Text -> NewDeviceMetadataType
NewDeviceMetadataType'
(Maybe Text -> Maybe Text -> NewDeviceMetadataType)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NewDeviceMetadataType)
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
"DeviceGroupKey")
Parser (Maybe Text -> NewDeviceMetadataType)
-> Parser (Maybe Text) -> Parser NewDeviceMetadataType
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
"DeviceKey")
)
instance Prelude.Hashable NewDeviceMetadataType
instance Prelude.NFData NewDeviceMetadataType