{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.KafkaConnect.Types.CustomPluginRevisionSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.KafkaConnect.Types.CustomPluginRevisionSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KafkaConnect.Types.CustomPluginContentType
import Amazonka.KafkaConnect.Types.CustomPluginFileDescription
import Amazonka.KafkaConnect.Types.CustomPluginLocationDescription
import qualified Amazonka.Prelude as Prelude

-- | Details about the revision of a custom plugin.
--
-- /See:/ 'newCustomPluginRevisionSummary' smart constructor.
data CustomPluginRevisionSummary = CustomPluginRevisionSummary'
  { -- | The format of the plugin file.
    CustomPluginRevisionSummary -> Maybe CustomPluginContentType
contentType :: Prelude.Maybe CustomPluginContentType,
    -- | The time that the custom plugin was created.
    CustomPluginRevisionSummary -> Maybe ISO8601
creationTime :: Prelude.Maybe Data.ISO8601,
    -- | The description of the custom plugin.
    CustomPluginRevisionSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Details about the custom plugin file.
    CustomPluginRevisionSummary -> Maybe CustomPluginFileDescription
fileDescription :: Prelude.Maybe CustomPluginFileDescription,
    -- | Information about the location of the custom plugin.
    CustomPluginRevisionSummary
-> Maybe CustomPluginLocationDescription
location :: Prelude.Maybe CustomPluginLocationDescription,
    -- | The revision of the custom plugin.
    CustomPluginRevisionSummary -> Maybe Integer
revision :: Prelude.Maybe Prelude.Integer
  }
  deriving (CustomPluginRevisionSummary -> CustomPluginRevisionSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomPluginRevisionSummary -> CustomPluginRevisionSummary -> Bool
$c/= :: CustomPluginRevisionSummary -> CustomPluginRevisionSummary -> Bool
== :: CustomPluginRevisionSummary -> CustomPluginRevisionSummary -> Bool
$c== :: CustomPluginRevisionSummary -> CustomPluginRevisionSummary -> Bool
Prelude.Eq, ReadPrec [CustomPluginRevisionSummary]
ReadPrec CustomPluginRevisionSummary
Int -> ReadS CustomPluginRevisionSummary
ReadS [CustomPluginRevisionSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomPluginRevisionSummary]
$creadListPrec :: ReadPrec [CustomPluginRevisionSummary]
readPrec :: ReadPrec CustomPluginRevisionSummary
$creadPrec :: ReadPrec CustomPluginRevisionSummary
readList :: ReadS [CustomPluginRevisionSummary]
$creadList :: ReadS [CustomPluginRevisionSummary]
readsPrec :: Int -> ReadS CustomPluginRevisionSummary
$creadsPrec :: Int -> ReadS CustomPluginRevisionSummary
Prelude.Read, Int -> CustomPluginRevisionSummary -> ShowS
[CustomPluginRevisionSummary] -> ShowS
CustomPluginRevisionSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomPluginRevisionSummary] -> ShowS
$cshowList :: [CustomPluginRevisionSummary] -> ShowS
show :: CustomPluginRevisionSummary -> String
$cshow :: CustomPluginRevisionSummary -> String
showsPrec :: Int -> CustomPluginRevisionSummary -> ShowS
$cshowsPrec :: Int -> CustomPluginRevisionSummary -> ShowS
Prelude.Show, forall x.
Rep CustomPluginRevisionSummary x -> CustomPluginRevisionSummary
forall x.
CustomPluginRevisionSummary -> Rep CustomPluginRevisionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomPluginRevisionSummary x -> CustomPluginRevisionSummary
$cfrom :: forall x.
CustomPluginRevisionSummary -> Rep CustomPluginRevisionSummary x
Prelude.Generic)

-- |
-- Create a value of 'CustomPluginRevisionSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'contentType', 'customPluginRevisionSummary_contentType' - The format of the plugin file.
--
-- 'creationTime', 'customPluginRevisionSummary_creationTime' - The time that the custom plugin was created.
--
-- 'description', 'customPluginRevisionSummary_description' - The description of the custom plugin.
--
-- 'fileDescription', 'customPluginRevisionSummary_fileDescription' - Details about the custom plugin file.
--
-- 'location', 'customPluginRevisionSummary_location' - Information about the location of the custom plugin.
--
-- 'revision', 'customPluginRevisionSummary_revision' - The revision of the custom plugin.
newCustomPluginRevisionSummary ::
  CustomPluginRevisionSummary
newCustomPluginRevisionSummary :: CustomPluginRevisionSummary
newCustomPluginRevisionSummary =
  CustomPluginRevisionSummary'
    { $sel:contentType:CustomPluginRevisionSummary' :: Maybe CustomPluginContentType
contentType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:CustomPluginRevisionSummary' :: Maybe ISO8601
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:description:CustomPluginRevisionSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:fileDescription:CustomPluginRevisionSummary' :: Maybe CustomPluginFileDescription
fileDescription = forall a. Maybe a
Prelude.Nothing,
      $sel:location:CustomPluginRevisionSummary' :: Maybe CustomPluginLocationDescription
location = forall a. Maybe a
Prelude.Nothing,
      $sel:revision:CustomPluginRevisionSummary' :: Maybe Integer
revision = forall a. Maybe a
Prelude.Nothing
    }

-- | The format of the plugin file.
customPluginRevisionSummary_contentType :: Lens.Lens' CustomPluginRevisionSummary (Prelude.Maybe CustomPluginContentType)
customPluginRevisionSummary_contentType :: Lens' CustomPluginRevisionSummary (Maybe CustomPluginContentType)
customPluginRevisionSummary_contentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginRevisionSummary' {Maybe CustomPluginContentType
contentType :: Maybe CustomPluginContentType
$sel:contentType:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe CustomPluginContentType
contentType} -> Maybe CustomPluginContentType
contentType) (\s :: CustomPluginRevisionSummary
s@CustomPluginRevisionSummary' {} Maybe CustomPluginContentType
a -> CustomPluginRevisionSummary
s {$sel:contentType:CustomPluginRevisionSummary' :: Maybe CustomPluginContentType
contentType = Maybe CustomPluginContentType
a} :: CustomPluginRevisionSummary)

-- | The time that the custom plugin was created.
customPluginRevisionSummary_creationTime :: Lens.Lens' CustomPluginRevisionSummary (Prelude.Maybe Prelude.UTCTime)
customPluginRevisionSummary_creationTime :: Lens' CustomPluginRevisionSummary (Maybe UTCTime)
customPluginRevisionSummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginRevisionSummary' {Maybe ISO8601
creationTime :: Maybe ISO8601
$sel:creationTime:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe ISO8601
creationTime} -> Maybe ISO8601
creationTime) (\s :: CustomPluginRevisionSummary
s@CustomPluginRevisionSummary' {} Maybe ISO8601
a -> CustomPluginRevisionSummary
s {$sel:creationTime:CustomPluginRevisionSummary' :: Maybe ISO8601
creationTime = Maybe ISO8601
a} :: CustomPluginRevisionSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The description of the custom plugin.
customPluginRevisionSummary_description :: Lens.Lens' CustomPluginRevisionSummary (Prelude.Maybe Prelude.Text)
customPluginRevisionSummary_description :: Lens' CustomPluginRevisionSummary (Maybe Text)
customPluginRevisionSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginRevisionSummary' {Maybe Text
description :: Maybe Text
$sel:description:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: CustomPluginRevisionSummary
s@CustomPluginRevisionSummary' {} Maybe Text
a -> CustomPluginRevisionSummary
s {$sel:description:CustomPluginRevisionSummary' :: Maybe Text
description = Maybe Text
a} :: CustomPluginRevisionSummary)

-- | Details about the custom plugin file.
customPluginRevisionSummary_fileDescription :: Lens.Lens' CustomPluginRevisionSummary (Prelude.Maybe CustomPluginFileDescription)
customPluginRevisionSummary_fileDescription :: Lens'
  CustomPluginRevisionSummary (Maybe CustomPluginFileDescription)
customPluginRevisionSummary_fileDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginRevisionSummary' {Maybe CustomPluginFileDescription
fileDescription :: Maybe CustomPluginFileDescription
$sel:fileDescription:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe CustomPluginFileDescription
fileDescription} -> Maybe CustomPluginFileDescription
fileDescription) (\s :: CustomPluginRevisionSummary
s@CustomPluginRevisionSummary' {} Maybe CustomPluginFileDescription
a -> CustomPluginRevisionSummary
s {$sel:fileDescription:CustomPluginRevisionSummary' :: Maybe CustomPluginFileDescription
fileDescription = Maybe CustomPluginFileDescription
a} :: CustomPluginRevisionSummary)

-- | Information about the location of the custom plugin.
customPluginRevisionSummary_location :: Lens.Lens' CustomPluginRevisionSummary (Prelude.Maybe CustomPluginLocationDescription)
customPluginRevisionSummary_location :: Lens'
  CustomPluginRevisionSummary (Maybe CustomPluginLocationDescription)
customPluginRevisionSummary_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginRevisionSummary' {Maybe CustomPluginLocationDescription
location :: Maybe CustomPluginLocationDescription
$sel:location:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary
-> Maybe CustomPluginLocationDescription
location} -> Maybe CustomPluginLocationDescription
location) (\s :: CustomPluginRevisionSummary
s@CustomPluginRevisionSummary' {} Maybe CustomPluginLocationDescription
a -> CustomPluginRevisionSummary
s {$sel:location:CustomPluginRevisionSummary' :: Maybe CustomPluginLocationDescription
location = Maybe CustomPluginLocationDescription
a} :: CustomPluginRevisionSummary)

-- | The revision of the custom plugin.
customPluginRevisionSummary_revision :: Lens.Lens' CustomPluginRevisionSummary (Prelude.Maybe Prelude.Integer)
customPluginRevisionSummary_revision :: Lens' CustomPluginRevisionSummary (Maybe Integer)
customPluginRevisionSummary_revision = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomPluginRevisionSummary' {Maybe Integer
revision :: Maybe Integer
$sel:revision:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe Integer
revision} -> Maybe Integer
revision) (\s :: CustomPluginRevisionSummary
s@CustomPluginRevisionSummary' {} Maybe Integer
a -> CustomPluginRevisionSummary
s {$sel:revision:CustomPluginRevisionSummary' :: Maybe Integer
revision = Maybe Integer
a} :: CustomPluginRevisionSummary)

instance Data.FromJSON CustomPluginRevisionSummary where
  parseJSON :: Value -> Parser CustomPluginRevisionSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"CustomPluginRevisionSummary"
      ( \Object
x ->
          Maybe CustomPluginContentType
-> Maybe ISO8601
-> Maybe Text
-> Maybe CustomPluginFileDescription
-> Maybe CustomPluginLocationDescription
-> Maybe Integer
-> CustomPluginRevisionSummary
CustomPluginRevisionSummary'
            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
"contentType")
            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
"creationTime")
            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
"description")
            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
"fileDescription")
            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
"location")
            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
"revision")
      )

instance Prelude.Hashable CustomPluginRevisionSummary where
  hashWithSalt :: Int -> CustomPluginRevisionSummary -> Int
hashWithSalt Int
_salt CustomPluginRevisionSummary' {Maybe Integer
Maybe Text
Maybe ISO8601
Maybe CustomPluginContentType
Maybe CustomPluginFileDescription
Maybe CustomPluginLocationDescription
revision :: Maybe Integer
location :: Maybe CustomPluginLocationDescription
fileDescription :: Maybe CustomPluginFileDescription
description :: Maybe Text
creationTime :: Maybe ISO8601
contentType :: Maybe CustomPluginContentType
$sel:revision:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe Integer
$sel:location:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary
-> Maybe CustomPluginLocationDescription
$sel:fileDescription:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe CustomPluginFileDescription
$sel:description:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe Text
$sel:creationTime:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe ISO8601
$sel:contentType:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe CustomPluginContentType
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CustomPluginContentType
contentType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CustomPluginFileDescription
fileDescription
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CustomPluginLocationDescription
location
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
revision

instance Prelude.NFData CustomPluginRevisionSummary where
  rnf :: CustomPluginRevisionSummary -> ()
rnf CustomPluginRevisionSummary' {Maybe Integer
Maybe Text
Maybe ISO8601
Maybe CustomPluginContentType
Maybe CustomPluginFileDescription
Maybe CustomPluginLocationDescription
revision :: Maybe Integer
location :: Maybe CustomPluginLocationDescription
fileDescription :: Maybe CustomPluginFileDescription
description :: Maybe Text
creationTime :: Maybe ISO8601
contentType :: Maybe CustomPluginContentType
$sel:revision:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe Integer
$sel:location:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary
-> Maybe CustomPluginLocationDescription
$sel:fileDescription:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe CustomPluginFileDescription
$sel:description:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe Text
$sel:creationTime:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe ISO8601
$sel:contentType:CustomPluginRevisionSummary' :: CustomPluginRevisionSummary -> Maybe CustomPluginContentType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomPluginContentType
contentType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomPluginFileDescription
fileDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomPluginLocationDescription
location
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
revision