{-# 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.IoTRoboRunner.Types.Destination where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTRoboRunner.Types.DestinationState
import qualified Amazonka.Prelude as Prelude
data Destination = Destination'
{ Destination -> Maybe Text
additionalFixedProperties :: Prelude.Maybe Prelude.Text,
Destination -> Text
arn :: Prelude.Text,
Destination -> Text
id :: Prelude.Text,
Destination -> Text
name :: Prelude.Text,
Destination -> Text
site :: Prelude.Text,
Destination -> POSIX
createdAt :: Data.POSIX,
Destination -> POSIX
updatedAt :: Data.POSIX,
Destination -> DestinationState
state :: DestinationState
}
deriving (Destination -> Destination -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Destination -> Destination -> Bool
$c/= :: Destination -> Destination -> Bool
== :: Destination -> Destination -> Bool
$c== :: Destination -> Destination -> Bool
Prelude.Eq, ReadPrec [Destination]
ReadPrec Destination
Int -> ReadS Destination
ReadS [Destination]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Destination]
$creadListPrec :: ReadPrec [Destination]
readPrec :: ReadPrec Destination
$creadPrec :: ReadPrec Destination
readList :: ReadS [Destination]
$creadList :: ReadS [Destination]
readsPrec :: Int -> ReadS Destination
$creadsPrec :: Int -> ReadS Destination
Prelude.Read, Int -> Destination -> ShowS
[Destination] -> ShowS
Destination -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Destination] -> ShowS
$cshowList :: [Destination] -> ShowS
show :: Destination -> String
$cshow :: Destination -> String
showsPrec :: Int -> Destination -> ShowS
$cshowsPrec :: Int -> Destination -> ShowS
Prelude.Show, forall x. Rep Destination x -> Destination
forall x. Destination -> Rep Destination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Destination x -> Destination
$cfrom :: forall x. Destination -> Rep Destination x
Prelude.Generic)
newDestination ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
DestinationState ->
Destination
newDestination :: Text
-> Text
-> Text
-> Text
-> UTCTime
-> UTCTime
-> DestinationState
-> Destination
newDestination
Text
pArn_
Text
pId_
Text
pName_
Text
pSite_
UTCTime
pCreatedAt_
UTCTime
pUpdatedAt_
DestinationState
pState_ =
Destination'
{ $sel:additionalFixedProperties:Destination' :: Maybe Text
additionalFixedProperties =
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Destination' :: Text
arn = Text
pArn_,
$sel:id:Destination' :: Text
id = Text
pId_,
$sel:name:Destination' :: Text
name = Text
pName_,
$sel:site:Destination' :: Text
site = Text
pSite_,
$sel:createdAt:Destination' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:updatedAt:Destination' :: POSIX
updatedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedAt_,
$sel:state:Destination' :: DestinationState
state = DestinationState
pState_
}
destination_additionalFixedProperties :: Lens.Lens' Destination (Prelude.Maybe Prelude.Text)
destination_additionalFixedProperties :: Lens' Destination (Maybe Text)
destination_additionalFixedProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe Text
additionalFixedProperties :: Maybe Text
$sel:additionalFixedProperties:Destination' :: Destination -> Maybe Text
additionalFixedProperties} -> Maybe Text
additionalFixedProperties) (\s :: Destination
s@Destination' {} Maybe Text
a -> Destination
s {$sel:additionalFixedProperties:Destination' :: Maybe Text
additionalFixedProperties = Maybe Text
a} :: Destination)
destination_arn :: Lens.Lens' Destination Prelude.Text
destination_arn :: Lens' Destination Text
destination_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Text
arn :: Text
$sel:arn:Destination' :: Destination -> Text
arn} -> Text
arn) (\s :: Destination
s@Destination' {} Text
a -> Destination
s {$sel:arn:Destination' :: Text
arn = Text
a} :: Destination)
destination_id :: Lens.Lens' Destination Prelude.Text
destination_id :: Lens' Destination Text
destination_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Text
id :: Text
$sel:id:Destination' :: Destination -> Text
id} -> Text
id) (\s :: Destination
s@Destination' {} Text
a -> Destination
s {$sel:id:Destination' :: Text
id = Text
a} :: Destination)
destination_name :: Lens.Lens' Destination Prelude.Text
destination_name :: Lens' Destination Text
destination_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Text
name :: Text
$sel:name:Destination' :: Destination -> Text
name} -> Text
name) (\s :: Destination
s@Destination' {} Text
a -> Destination
s {$sel:name:Destination' :: Text
name = Text
a} :: Destination)
destination_site :: Lens.Lens' Destination Prelude.Text
destination_site :: Lens' Destination Text
destination_site = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Text
site :: Text
$sel:site:Destination' :: Destination -> Text
site} -> Text
site) (\s :: Destination
s@Destination' {} Text
a -> Destination
s {$sel:site:Destination' :: Text
site = Text
a} :: Destination)
destination_createdAt :: Lens.Lens' Destination Prelude.UTCTime
destination_createdAt :: Lens' Destination UTCTime
destination_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {POSIX
createdAt :: POSIX
$sel:createdAt:Destination' :: Destination -> POSIX
createdAt} -> POSIX
createdAt) (\s :: Destination
s@Destination' {} POSIX
a -> Destination
s {$sel:createdAt:Destination' :: POSIX
createdAt = POSIX
a} :: Destination) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
destination_updatedAt :: Lens.Lens' Destination Prelude.UTCTime
destination_updatedAt :: Lens' Destination UTCTime
destination_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {POSIX
updatedAt :: POSIX
$sel:updatedAt:Destination' :: Destination -> POSIX
updatedAt} -> POSIX
updatedAt) (\s :: Destination
s@Destination' {} POSIX
a -> Destination
s {$sel:updatedAt:Destination' :: POSIX
updatedAt = POSIX
a} :: Destination) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
destination_state :: Lens.Lens' Destination DestinationState
destination_state :: Lens' Destination DestinationState
destination_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {DestinationState
state :: DestinationState
$sel:state:Destination' :: Destination -> DestinationState
state} -> DestinationState
state) (\s :: Destination
s@Destination' {} DestinationState
a -> Destination
s {$sel:state:Destination' :: DestinationState
state = DestinationState
a} :: Destination)
instance Data.FromJSON Destination where
parseJSON :: Value -> Parser Destination
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Destination"
( \Object
x ->
Maybe Text
-> Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> DestinationState
-> Destination
Destination'
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
"additionalFixedProperties")
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
"arn")
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
"id")
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
"name")
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
"site")
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
"createdAt")
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
"updatedAt")
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
"state")
)
instance Prelude.Hashable Destination where
hashWithSalt :: Int -> Destination -> Int
hashWithSalt Int
_salt Destination' {Maybe Text
Text
POSIX
DestinationState
state :: DestinationState
updatedAt :: POSIX
createdAt :: POSIX
site :: Text
name :: Text
id :: Text
arn :: Text
additionalFixedProperties :: Maybe Text
$sel:state:Destination' :: Destination -> DestinationState
$sel:updatedAt:Destination' :: Destination -> POSIX
$sel:createdAt:Destination' :: Destination -> POSIX
$sel:site:Destination' :: Destination -> Text
$sel:name:Destination' :: Destination -> Text
$sel:id:Destination' :: Destination -> Text
$sel:arn:Destination' :: Destination -> Text
$sel:additionalFixedProperties:Destination' :: Destination -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
additionalFixedProperties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
site
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
updatedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DestinationState
state
instance Prelude.NFData Destination where
rnf :: Destination -> ()
rnf Destination' {Maybe Text
Text
POSIX
DestinationState
state :: DestinationState
updatedAt :: POSIX
createdAt :: POSIX
site :: Text
name :: Text
id :: Text
arn :: Text
additionalFixedProperties :: Maybe Text
$sel:state:Destination' :: Destination -> DestinationState
$sel:updatedAt:Destination' :: Destination -> POSIX
$sel:createdAt:Destination' :: Destination -> POSIX
$sel:site:Destination' :: Destination -> Text
$sel:name:Destination' :: Destination -> Text
$sel:id:Destination' :: Destination -> Text
$sel:arn:Destination' :: Destination -> Text
$sel:additionalFixedProperties:Destination' :: Destination -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
additionalFixedProperties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
site
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
updatedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DestinationState
state