{-# 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.KafkaConnect.Types.CustomPluginLocation where
import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.Types.S3Location
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomPluginLocation = CustomPluginLocation'
{
CustomPluginLocation -> S3Location
s3Location :: S3Location
}
deriving (CustomPluginLocation -> CustomPluginLocation -> Bool
(CustomPluginLocation -> CustomPluginLocation -> Bool)
-> (CustomPluginLocation -> CustomPluginLocation -> Bool)
-> Eq CustomPluginLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomPluginLocation -> CustomPluginLocation -> Bool
$c/= :: CustomPluginLocation -> CustomPluginLocation -> Bool
== :: CustomPluginLocation -> CustomPluginLocation -> Bool
$c== :: CustomPluginLocation -> CustomPluginLocation -> Bool
Prelude.Eq, ReadPrec [CustomPluginLocation]
ReadPrec CustomPluginLocation
Int -> ReadS CustomPluginLocation
ReadS [CustomPluginLocation]
(Int -> ReadS CustomPluginLocation)
-> ReadS [CustomPluginLocation]
-> ReadPrec CustomPluginLocation
-> ReadPrec [CustomPluginLocation]
-> Read CustomPluginLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomPluginLocation]
$creadListPrec :: ReadPrec [CustomPluginLocation]
readPrec :: ReadPrec CustomPluginLocation
$creadPrec :: ReadPrec CustomPluginLocation
readList :: ReadS [CustomPluginLocation]
$creadList :: ReadS [CustomPluginLocation]
readsPrec :: Int -> ReadS CustomPluginLocation
$creadsPrec :: Int -> ReadS CustomPluginLocation
Prelude.Read, Int -> CustomPluginLocation -> ShowS
[CustomPluginLocation] -> ShowS
CustomPluginLocation -> String
(Int -> CustomPluginLocation -> ShowS)
-> (CustomPluginLocation -> String)
-> ([CustomPluginLocation] -> ShowS)
-> Show CustomPluginLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomPluginLocation] -> ShowS
$cshowList :: [CustomPluginLocation] -> ShowS
show :: CustomPluginLocation -> String
$cshow :: CustomPluginLocation -> String
showsPrec :: Int -> CustomPluginLocation -> ShowS
$cshowsPrec :: Int -> CustomPluginLocation -> ShowS
Prelude.Show, (forall x. CustomPluginLocation -> Rep CustomPluginLocation x)
-> (forall x. Rep CustomPluginLocation x -> CustomPluginLocation)
-> Generic CustomPluginLocation
forall x. Rep CustomPluginLocation x -> CustomPluginLocation
forall x. CustomPluginLocation -> Rep CustomPluginLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomPluginLocation x -> CustomPluginLocation
$cfrom :: forall x. CustomPluginLocation -> Rep CustomPluginLocation x
Prelude.Generic)
newCustomPluginLocation ::
S3Location ->
CustomPluginLocation
newCustomPluginLocation :: S3Location -> CustomPluginLocation
newCustomPluginLocation S3Location
pS3Location_ =
CustomPluginLocation' :: S3Location -> CustomPluginLocation
CustomPluginLocation' {$sel:s3Location:CustomPluginLocation' :: S3Location
s3Location = S3Location
pS3Location_}
customPluginLocation_s3Location :: Lens.Lens' CustomPluginLocation S3Location
customPluginLocation_s3Location :: (S3Location -> f S3Location)
-> CustomPluginLocation -> f CustomPluginLocation
customPluginLocation_s3Location = (CustomPluginLocation -> S3Location)
-> (CustomPluginLocation -> S3Location -> CustomPluginLocation)
-> Lens
CustomPluginLocation CustomPluginLocation S3Location S3Location
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginLocation' {S3Location
s3Location :: S3Location
$sel:s3Location:CustomPluginLocation' :: CustomPluginLocation -> S3Location
s3Location} -> S3Location
s3Location) (\s :: CustomPluginLocation
s@CustomPluginLocation' {} S3Location
a -> CustomPluginLocation
s {$sel:s3Location:CustomPluginLocation' :: S3Location
s3Location = S3Location
a} :: CustomPluginLocation)
instance Prelude.Hashable CustomPluginLocation
instance Prelude.NFData CustomPluginLocation
instance Core.ToJSON CustomPluginLocation where
toJSON :: CustomPluginLocation -> Value
toJSON CustomPluginLocation' {S3Location
s3Location :: S3Location
$sel:s3Location:CustomPluginLocation' :: CustomPluginLocation -> S3Location
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"s3Location" Text -> S3Location -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3Location
s3Location)]
)