{-# 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.GroundStation.Types.Destination where
import qualified Amazonka.Core as Core
import Amazonka.GroundStation.Types.ConfigCapabilityType
import Amazonka.GroundStation.Types.ConfigDetails
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Destination = Destination'
{
Destination -> Maybe Text
dataflowDestinationRegion :: Prelude.Maybe Prelude.Text,
Destination -> Maybe Text
configId :: Prelude.Maybe Prelude.Text,
Destination -> Maybe ConfigCapabilityType
configType :: Prelude.Maybe ConfigCapabilityType,
Destination -> Maybe ConfigDetails
configDetails :: Prelude.Maybe ConfigDetails
}
deriving (Destination -> Destination -> Bool
(Destination -> Destination -> Bool)
-> (Destination -> Destination -> Bool) -> Eq Destination
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]
(Int -> ReadS Destination)
-> ReadS [Destination]
-> ReadPrec Destination
-> ReadPrec [Destination]
-> Read 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
(Int -> Destination -> ShowS)
-> (Destination -> String)
-> ([Destination] -> ShowS)
-> Show Destination
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. Destination -> Rep Destination x)
-> (forall x. Rep Destination x -> Destination)
-> Generic Destination
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 ::
Destination
newDestination :: Destination
newDestination =
Destination' :: Maybe Text
-> Maybe Text
-> Maybe ConfigCapabilityType
-> Maybe ConfigDetails
-> Destination
Destination'
{ $sel:dataflowDestinationRegion:Destination' :: Maybe Text
dataflowDestinationRegion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configId:Destination' :: Maybe Text
configId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configType:Destination' :: Maybe ConfigCapabilityType
configType = Maybe ConfigCapabilityType
forall a. Maybe a
Prelude.Nothing,
$sel:configDetails:Destination' :: Maybe ConfigDetails
configDetails = Maybe ConfigDetails
forall a. Maybe a
Prelude.Nothing
}
destination_dataflowDestinationRegion :: Lens.Lens' Destination (Prelude.Maybe Prelude.Text)
destination_dataflowDestinationRegion :: (Maybe Text -> f (Maybe Text)) -> Destination -> f Destination
destination_dataflowDestinationRegion = (Destination -> Maybe Text)
-> (Destination -> Maybe Text -> Destination)
-> Lens Destination Destination (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe Text
dataflowDestinationRegion :: Maybe Text
$sel:dataflowDestinationRegion:Destination' :: Destination -> Maybe Text
dataflowDestinationRegion} -> Maybe Text
dataflowDestinationRegion) (\s :: Destination
s@Destination' {} Maybe Text
a -> Destination
s {$sel:dataflowDestinationRegion:Destination' :: Maybe Text
dataflowDestinationRegion = Maybe Text
a} :: Destination)
destination_configId :: Lens.Lens' Destination (Prelude.Maybe Prelude.Text)
destination_configId :: (Maybe Text -> f (Maybe Text)) -> Destination -> f Destination
destination_configId = (Destination -> Maybe Text)
-> (Destination -> Maybe Text -> Destination)
-> Lens Destination Destination (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe Text
configId :: Maybe Text
$sel:configId:Destination' :: Destination -> Maybe Text
configId} -> Maybe Text
configId) (\s :: Destination
s@Destination' {} Maybe Text
a -> Destination
s {$sel:configId:Destination' :: Maybe Text
configId = Maybe Text
a} :: Destination)
destination_configType :: Lens.Lens' Destination (Prelude.Maybe ConfigCapabilityType)
destination_configType :: (Maybe ConfigCapabilityType -> f (Maybe ConfigCapabilityType))
-> Destination -> f Destination
destination_configType = (Destination -> Maybe ConfigCapabilityType)
-> (Destination -> Maybe ConfigCapabilityType -> Destination)
-> Lens
Destination
Destination
(Maybe ConfigCapabilityType)
(Maybe ConfigCapabilityType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe ConfigCapabilityType
configType :: Maybe ConfigCapabilityType
$sel:configType:Destination' :: Destination -> Maybe ConfigCapabilityType
configType} -> Maybe ConfigCapabilityType
configType) (\s :: Destination
s@Destination' {} Maybe ConfigCapabilityType
a -> Destination
s {$sel:configType:Destination' :: Maybe ConfigCapabilityType
configType = Maybe ConfigCapabilityType
a} :: Destination)
destination_configDetails :: Lens.Lens' Destination (Prelude.Maybe ConfigDetails)
destination_configDetails :: (Maybe ConfigDetails -> f (Maybe ConfigDetails))
-> Destination -> f Destination
destination_configDetails = (Destination -> Maybe ConfigDetails)
-> (Destination -> Maybe ConfigDetails -> Destination)
-> Lens
Destination Destination (Maybe ConfigDetails) (Maybe ConfigDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Destination' {Maybe ConfigDetails
configDetails :: Maybe ConfigDetails
$sel:configDetails:Destination' :: Destination -> Maybe ConfigDetails
configDetails} -> Maybe ConfigDetails
configDetails) (\s :: Destination
s@Destination' {} Maybe ConfigDetails
a -> Destination
s {$sel:configDetails:Destination' :: Maybe ConfigDetails
configDetails = Maybe ConfigDetails
a} :: Destination)
instance Core.FromJSON Destination where
parseJSON :: Value -> Parser Destination
parseJSON =
String
-> (Object -> Parser Destination) -> Value -> Parser Destination
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Destination"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe ConfigCapabilityType
-> Maybe ConfigDetails
-> Destination
Destination'
(Maybe Text
-> Maybe Text
-> Maybe ConfigCapabilityType
-> Maybe ConfigDetails
-> Destination)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ConfigCapabilityType
-> Maybe ConfigDetails
-> Destination)
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
"dataflowDestinationRegion")
Parser
(Maybe Text
-> Maybe ConfigCapabilityType
-> Maybe ConfigDetails
-> Destination)
-> Parser (Maybe Text)
-> Parser
(Maybe ConfigCapabilityType -> Maybe ConfigDetails -> Destination)
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
"configId")
Parser
(Maybe ConfigCapabilityType -> Maybe ConfigDetails -> Destination)
-> Parser (Maybe ConfigCapabilityType)
-> Parser (Maybe ConfigDetails -> Destination)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfigCapabilityType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configType")
Parser (Maybe ConfigDetails -> Destination)
-> Parser (Maybe ConfigDetails) -> Parser Destination
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConfigDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"configDetails")
)
instance Prelude.Hashable Destination
instance Prelude.NFData Destination