{-# 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.IoTFleetWise.Types.TimestreamRegistrationResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTFleetWise.Types.RegistrationStatus
import qualified Amazonka.Prelude as Prelude
data TimestreamRegistrationResponse = TimestreamRegistrationResponse'
{
TimestreamRegistrationResponse -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
TimestreamRegistrationResponse -> Maybe Text
timestreamDatabaseArn :: Prelude.Maybe Prelude.Text,
TimestreamRegistrationResponse -> Maybe Text
timestreamTableArn :: Prelude.Maybe Prelude.Text,
TimestreamRegistrationResponse -> Text
timestreamDatabaseName :: Prelude.Text,
TimestreamRegistrationResponse -> Text
timestreamTableName :: Prelude.Text,
TimestreamRegistrationResponse -> RegistrationStatus
registrationStatus :: RegistrationStatus
}
deriving (TimestreamRegistrationResponse
-> TimestreamRegistrationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimestreamRegistrationResponse
-> TimestreamRegistrationResponse -> Bool
$c/= :: TimestreamRegistrationResponse
-> TimestreamRegistrationResponse -> Bool
== :: TimestreamRegistrationResponse
-> TimestreamRegistrationResponse -> Bool
$c== :: TimestreamRegistrationResponse
-> TimestreamRegistrationResponse -> Bool
Prelude.Eq, ReadPrec [TimestreamRegistrationResponse]
ReadPrec TimestreamRegistrationResponse
Int -> ReadS TimestreamRegistrationResponse
ReadS [TimestreamRegistrationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimestreamRegistrationResponse]
$creadListPrec :: ReadPrec [TimestreamRegistrationResponse]
readPrec :: ReadPrec TimestreamRegistrationResponse
$creadPrec :: ReadPrec TimestreamRegistrationResponse
readList :: ReadS [TimestreamRegistrationResponse]
$creadList :: ReadS [TimestreamRegistrationResponse]
readsPrec :: Int -> ReadS TimestreamRegistrationResponse
$creadsPrec :: Int -> ReadS TimestreamRegistrationResponse
Prelude.Read, Int -> TimestreamRegistrationResponse -> ShowS
[TimestreamRegistrationResponse] -> ShowS
TimestreamRegistrationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimestreamRegistrationResponse] -> ShowS
$cshowList :: [TimestreamRegistrationResponse] -> ShowS
show :: TimestreamRegistrationResponse -> String
$cshow :: TimestreamRegistrationResponse -> String
showsPrec :: Int -> TimestreamRegistrationResponse -> ShowS
$cshowsPrec :: Int -> TimestreamRegistrationResponse -> ShowS
Prelude.Show, forall x.
Rep TimestreamRegistrationResponse x
-> TimestreamRegistrationResponse
forall x.
TimestreamRegistrationResponse
-> Rep TimestreamRegistrationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TimestreamRegistrationResponse x
-> TimestreamRegistrationResponse
$cfrom :: forall x.
TimestreamRegistrationResponse
-> Rep TimestreamRegistrationResponse x
Prelude.Generic)
newTimestreamRegistrationResponse ::
Prelude.Text ->
Prelude.Text ->
RegistrationStatus ->
TimestreamRegistrationResponse
newTimestreamRegistrationResponse :: Text
-> Text -> RegistrationStatus -> TimestreamRegistrationResponse
newTimestreamRegistrationResponse
Text
pTimestreamDatabaseName_
Text
pTimestreamTableName_
RegistrationStatus
pRegistrationStatus_ =
TimestreamRegistrationResponse'
{ $sel:errorMessage:TimestreamRegistrationResponse' :: Maybe Text
errorMessage =
forall a. Maybe a
Prelude.Nothing,
$sel:timestreamDatabaseArn:TimestreamRegistrationResponse' :: Maybe Text
timestreamDatabaseArn = forall a. Maybe a
Prelude.Nothing,
$sel:timestreamTableArn:TimestreamRegistrationResponse' :: Maybe Text
timestreamTableArn = forall a. Maybe a
Prelude.Nothing,
$sel:timestreamDatabaseName:TimestreamRegistrationResponse' :: Text
timestreamDatabaseName =
Text
pTimestreamDatabaseName_,
$sel:timestreamTableName:TimestreamRegistrationResponse' :: Text
timestreamTableName = Text
pTimestreamTableName_,
$sel:registrationStatus:TimestreamRegistrationResponse' :: RegistrationStatus
registrationStatus = RegistrationStatus
pRegistrationStatus_
}
timestreamRegistrationResponse_errorMessage :: Lens.Lens' TimestreamRegistrationResponse (Prelude.Maybe Prelude.Text)
timestreamRegistrationResponse_errorMessage :: Lens' TimestreamRegistrationResponse (Maybe Text)
timestreamRegistrationResponse_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimestreamRegistrationResponse' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: TimestreamRegistrationResponse
s@TimestreamRegistrationResponse' {} Maybe Text
a -> TimestreamRegistrationResponse
s {$sel:errorMessage:TimestreamRegistrationResponse' :: Maybe Text
errorMessage = Maybe Text
a} :: TimestreamRegistrationResponse)
timestreamRegistrationResponse_timestreamDatabaseArn :: Lens.Lens' TimestreamRegistrationResponse (Prelude.Maybe Prelude.Text)
timestreamRegistrationResponse_timestreamDatabaseArn :: Lens' TimestreamRegistrationResponse (Maybe Text)
timestreamRegistrationResponse_timestreamDatabaseArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimestreamRegistrationResponse' {Maybe Text
timestreamDatabaseArn :: Maybe Text
$sel:timestreamDatabaseArn:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
timestreamDatabaseArn} -> Maybe Text
timestreamDatabaseArn) (\s :: TimestreamRegistrationResponse
s@TimestreamRegistrationResponse' {} Maybe Text
a -> TimestreamRegistrationResponse
s {$sel:timestreamDatabaseArn:TimestreamRegistrationResponse' :: Maybe Text
timestreamDatabaseArn = Maybe Text
a} :: TimestreamRegistrationResponse)
timestreamRegistrationResponse_timestreamTableArn :: Lens.Lens' TimestreamRegistrationResponse (Prelude.Maybe Prelude.Text)
timestreamRegistrationResponse_timestreamTableArn :: Lens' TimestreamRegistrationResponse (Maybe Text)
timestreamRegistrationResponse_timestreamTableArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimestreamRegistrationResponse' {Maybe Text
timestreamTableArn :: Maybe Text
$sel:timestreamTableArn:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
timestreamTableArn} -> Maybe Text
timestreamTableArn) (\s :: TimestreamRegistrationResponse
s@TimestreamRegistrationResponse' {} Maybe Text
a -> TimestreamRegistrationResponse
s {$sel:timestreamTableArn:TimestreamRegistrationResponse' :: Maybe Text
timestreamTableArn = Maybe Text
a} :: TimestreamRegistrationResponse)
timestreamRegistrationResponse_timestreamDatabaseName :: Lens.Lens' TimestreamRegistrationResponse Prelude.Text
timestreamRegistrationResponse_timestreamDatabaseName :: Lens' TimestreamRegistrationResponse Text
timestreamRegistrationResponse_timestreamDatabaseName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimestreamRegistrationResponse' {Text
timestreamDatabaseName :: Text
$sel:timestreamDatabaseName:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Text
timestreamDatabaseName} -> Text
timestreamDatabaseName) (\s :: TimestreamRegistrationResponse
s@TimestreamRegistrationResponse' {} Text
a -> TimestreamRegistrationResponse
s {$sel:timestreamDatabaseName:TimestreamRegistrationResponse' :: Text
timestreamDatabaseName = Text
a} :: TimestreamRegistrationResponse)
timestreamRegistrationResponse_timestreamTableName :: Lens.Lens' TimestreamRegistrationResponse Prelude.Text
timestreamRegistrationResponse_timestreamTableName :: Lens' TimestreamRegistrationResponse Text
timestreamRegistrationResponse_timestreamTableName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimestreamRegistrationResponse' {Text
timestreamTableName :: Text
$sel:timestreamTableName:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Text
timestreamTableName} -> Text
timestreamTableName) (\s :: TimestreamRegistrationResponse
s@TimestreamRegistrationResponse' {} Text
a -> TimestreamRegistrationResponse
s {$sel:timestreamTableName:TimestreamRegistrationResponse' :: Text
timestreamTableName = Text
a} :: TimestreamRegistrationResponse)
timestreamRegistrationResponse_registrationStatus :: Lens.Lens' TimestreamRegistrationResponse RegistrationStatus
timestreamRegistrationResponse_registrationStatus :: Lens' TimestreamRegistrationResponse RegistrationStatus
timestreamRegistrationResponse_registrationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TimestreamRegistrationResponse' {RegistrationStatus
registrationStatus :: RegistrationStatus
$sel:registrationStatus:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> RegistrationStatus
registrationStatus} -> RegistrationStatus
registrationStatus) (\s :: TimestreamRegistrationResponse
s@TimestreamRegistrationResponse' {} RegistrationStatus
a -> TimestreamRegistrationResponse
s {$sel:registrationStatus:TimestreamRegistrationResponse' :: RegistrationStatus
registrationStatus = RegistrationStatus
a} :: TimestreamRegistrationResponse)
instance Data.FromJSON TimestreamRegistrationResponse where
parseJSON :: Value -> Parser TimestreamRegistrationResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TimestreamRegistrationResponse"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> RegistrationStatus
-> TimestreamRegistrationResponse
TimestreamRegistrationResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"errorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"timestreamDatabaseArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"timestreamTableArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"timestreamDatabaseName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"timestreamTableName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"registrationStatus")
)
instance
Prelude.Hashable
TimestreamRegistrationResponse
where
hashWithSalt :: Int -> TimestreamRegistrationResponse -> Int
hashWithSalt
Int
_salt
TimestreamRegistrationResponse' {Maybe Text
Text
RegistrationStatus
registrationStatus :: RegistrationStatus
timestreamTableName :: Text
timestreamDatabaseName :: Text
timestreamTableArn :: Maybe Text
timestreamDatabaseArn :: Maybe Text
errorMessage :: Maybe Text
$sel:registrationStatus:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> RegistrationStatus
$sel:timestreamTableName:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Text
$sel:timestreamDatabaseName:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Text
$sel:timestreamTableArn:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
$sel:timestreamDatabaseArn:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
$sel:errorMessage:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
timestreamDatabaseArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
timestreamTableArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
timestreamDatabaseName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
timestreamTableName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RegistrationStatus
registrationStatus
instance
Prelude.NFData
TimestreamRegistrationResponse
where
rnf :: TimestreamRegistrationResponse -> ()
rnf TimestreamRegistrationResponse' {Maybe Text
Text
RegistrationStatus
registrationStatus :: RegistrationStatus
timestreamTableName :: Text
timestreamDatabaseName :: Text
timestreamTableArn :: Maybe Text
timestreamDatabaseArn :: Maybe Text
errorMessage :: Maybe Text
$sel:registrationStatus:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> RegistrationStatus
$sel:timestreamTableName:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Text
$sel:timestreamDatabaseName:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Text
$sel:timestreamTableArn:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
$sel:timestreamDatabaseArn:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
$sel:errorMessage:TimestreamRegistrationResponse' :: TimestreamRegistrationResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
timestreamDatabaseArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
timestreamTableArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
timestreamDatabaseName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
timestreamTableName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RegistrationStatus
registrationStatus