{-# 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.AppConfig.Types.HostedConfigurationVersionSummary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AppConfig.Types.HostedConfigurationVersionSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the configuration.
--
-- /See:/ 'newHostedConfigurationVersionSummary' smart constructor.
data HostedConfigurationVersionSummary = HostedConfigurationVersionSummary'
  { -- | The configuration version.
    HostedConfigurationVersionSummary -> Maybe Int
versionNumber :: Prelude.Maybe Prelude.Int,
    -- | The application ID.
    HostedConfigurationVersionSummary -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | A description of the configuration.
    HostedConfigurationVersionSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The configuration profile ID.
    HostedConfigurationVersionSummary -> Maybe Text
configurationProfileId :: Prelude.Maybe Prelude.Text,
    -- | A standard MIME type describing the format of the configuration content.
    -- For more information, see
    -- <https://docs.aws.amazon.com/https:/www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 Content-Type>.
    HostedConfigurationVersionSummary -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text
  }
  deriving (HostedConfigurationVersionSummary
-> HostedConfigurationVersionSummary -> Bool
(HostedConfigurationVersionSummary
 -> HostedConfigurationVersionSummary -> Bool)
-> (HostedConfigurationVersionSummary
    -> HostedConfigurationVersionSummary -> Bool)
-> Eq HostedConfigurationVersionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HostedConfigurationVersionSummary
-> HostedConfigurationVersionSummary -> Bool
$c/= :: HostedConfigurationVersionSummary
-> HostedConfigurationVersionSummary -> Bool
== :: HostedConfigurationVersionSummary
-> HostedConfigurationVersionSummary -> Bool
$c== :: HostedConfigurationVersionSummary
-> HostedConfigurationVersionSummary -> Bool
Prelude.Eq, ReadPrec [HostedConfigurationVersionSummary]
ReadPrec HostedConfigurationVersionSummary
Int -> ReadS HostedConfigurationVersionSummary
ReadS [HostedConfigurationVersionSummary]
(Int -> ReadS HostedConfigurationVersionSummary)
-> ReadS [HostedConfigurationVersionSummary]
-> ReadPrec HostedConfigurationVersionSummary
-> ReadPrec [HostedConfigurationVersionSummary]
-> Read HostedConfigurationVersionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HostedConfigurationVersionSummary]
$creadListPrec :: ReadPrec [HostedConfigurationVersionSummary]
readPrec :: ReadPrec HostedConfigurationVersionSummary
$creadPrec :: ReadPrec HostedConfigurationVersionSummary
readList :: ReadS [HostedConfigurationVersionSummary]
$creadList :: ReadS [HostedConfigurationVersionSummary]
readsPrec :: Int -> ReadS HostedConfigurationVersionSummary
$creadsPrec :: Int -> ReadS HostedConfigurationVersionSummary
Prelude.Read, Int -> HostedConfigurationVersionSummary -> ShowS
[HostedConfigurationVersionSummary] -> ShowS
HostedConfigurationVersionSummary -> String
(Int -> HostedConfigurationVersionSummary -> ShowS)
-> (HostedConfigurationVersionSummary -> String)
-> ([HostedConfigurationVersionSummary] -> ShowS)
-> Show HostedConfigurationVersionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HostedConfigurationVersionSummary] -> ShowS
$cshowList :: [HostedConfigurationVersionSummary] -> ShowS
show :: HostedConfigurationVersionSummary -> String
$cshow :: HostedConfigurationVersionSummary -> String
showsPrec :: Int -> HostedConfigurationVersionSummary -> ShowS
$cshowsPrec :: Int -> HostedConfigurationVersionSummary -> ShowS
Prelude.Show, (forall x.
 HostedConfigurationVersionSummary
 -> Rep HostedConfigurationVersionSummary x)
-> (forall x.
    Rep HostedConfigurationVersionSummary x
    -> HostedConfigurationVersionSummary)
-> Generic HostedConfigurationVersionSummary
forall x.
Rep HostedConfigurationVersionSummary x
-> HostedConfigurationVersionSummary
forall x.
HostedConfigurationVersionSummary
-> Rep HostedConfigurationVersionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HostedConfigurationVersionSummary x
-> HostedConfigurationVersionSummary
$cfrom :: forall x.
HostedConfigurationVersionSummary
-> Rep HostedConfigurationVersionSummary x
Prelude.Generic)

-- |
-- Create a value of 'HostedConfigurationVersionSummary' 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:
--
-- 'versionNumber', 'hostedConfigurationVersionSummary_versionNumber' - The configuration version.
--
-- 'applicationId', 'hostedConfigurationVersionSummary_applicationId' - The application ID.
--
-- 'description', 'hostedConfigurationVersionSummary_description' - A description of the configuration.
--
-- 'configurationProfileId', 'hostedConfigurationVersionSummary_configurationProfileId' - The configuration profile ID.
--
-- 'contentType', 'hostedConfigurationVersionSummary_contentType' - A standard MIME type describing the format of the configuration content.
-- For more information, see
-- <https://docs.aws.amazon.com/https:/www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 Content-Type>.
newHostedConfigurationVersionSummary ::
  HostedConfigurationVersionSummary
newHostedConfigurationVersionSummary :: HostedConfigurationVersionSummary
newHostedConfigurationVersionSummary =
  HostedConfigurationVersionSummary' :: Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> HostedConfigurationVersionSummary
HostedConfigurationVersionSummary'
    { $sel:versionNumber:HostedConfigurationVersionSummary' :: Maybe Int
versionNumber =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:HostedConfigurationVersionSummary' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:HostedConfigurationVersionSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationProfileId:HostedConfigurationVersionSummary' :: Maybe Text
configurationProfileId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:HostedConfigurationVersionSummary' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The configuration version.
hostedConfigurationVersionSummary_versionNumber :: Lens.Lens' HostedConfigurationVersionSummary (Prelude.Maybe Prelude.Int)
hostedConfigurationVersionSummary_versionNumber :: (Maybe Int -> f (Maybe Int))
-> HostedConfigurationVersionSummary
-> f HostedConfigurationVersionSummary
hostedConfigurationVersionSummary_versionNumber = (HostedConfigurationVersionSummary -> Maybe Int)
-> (HostedConfigurationVersionSummary
    -> Maybe Int -> HostedConfigurationVersionSummary)
-> Lens
     HostedConfigurationVersionSummary
     HostedConfigurationVersionSummary
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedConfigurationVersionSummary' {Maybe Int
versionNumber :: Maybe Int
$sel:versionNumber:HostedConfigurationVersionSummary' :: HostedConfigurationVersionSummary -> Maybe Int
versionNumber} -> Maybe Int
versionNumber) (\s :: HostedConfigurationVersionSummary
s@HostedConfigurationVersionSummary' {} Maybe Int
a -> HostedConfigurationVersionSummary
s {$sel:versionNumber:HostedConfigurationVersionSummary' :: Maybe Int
versionNumber = Maybe Int
a} :: HostedConfigurationVersionSummary)

-- | The application ID.
hostedConfigurationVersionSummary_applicationId :: Lens.Lens' HostedConfigurationVersionSummary (Prelude.Maybe Prelude.Text)
hostedConfigurationVersionSummary_applicationId :: (Maybe Text -> f (Maybe Text))
-> HostedConfigurationVersionSummary
-> f HostedConfigurationVersionSummary
hostedConfigurationVersionSummary_applicationId = (HostedConfigurationVersionSummary -> Maybe Text)
-> (HostedConfigurationVersionSummary
    -> Maybe Text -> HostedConfigurationVersionSummary)
-> Lens
     HostedConfigurationVersionSummary
     HostedConfigurationVersionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedConfigurationVersionSummary' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:HostedConfigurationVersionSummary' :: HostedConfigurationVersionSummary -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: HostedConfigurationVersionSummary
s@HostedConfigurationVersionSummary' {} Maybe Text
a -> HostedConfigurationVersionSummary
s {$sel:applicationId:HostedConfigurationVersionSummary' :: Maybe Text
applicationId = Maybe Text
a} :: HostedConfigurationVersionSummary)

-- | A description of the configuration.
hostedConfigurationVersionSummary_description :: Lens.Lens' HostedConfigurationVersionSummary (Prelude.Maybe Prelude.Text)
hostedConfigurationVersionSummary_description :: (Maybe Text -> f (Maybe Text))
-> HostedConfigurationVersionSummary
-> f HostedConfigurationVersionSummary
hostedConfigurationVersionSummary_description = (HostedConfigurationVersionSummary -> Maybe Text)
-> (HostedConfigurationVersionSummary
    -> Maybe Text -> HostedConfigurationVersionSummary)
-> Lens
     HostedConfigurationVersionSummary
     HostedConfigurationVersionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedConfigurationVersionSummary' {Maybe Text
description :: Maybe Text
$sel:description:HostedConfigurationVersionSummary' :: HostedConfigurationVersionSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: HostedConfigurationVersionSummary
s@HostedConfigurationVersionSummary' {} Maybe Text
a -> HostedConfigurationVersionSummary
s {$sel:description:HostedConfigurationVersionSummary' :: Maybe Text
description = Maybe Text
a} :: HostedConfigurationVersionSummary)

-- | The configuration profile ID.
hostedConfigurationVersionSummary_configurationProfileId :: Lens.Lens' HostedConfigurationVersionSummary (Prelude.Maybe Prelude.Text)
hostedConfigurationVersionSummary_configurationProfileId :: (Maybe Text -> f (Maybe Text))
-> HostedConfigurationVersionSummary
-> f HostedConfigurationVersionSummary
hostedConfigurationVersionSummary_configurationProfileId = (HostedConfigurationVersionSummary -> Maybe Text)
-> (HostedConfigurationVersionSummary
    -> Maybe Text -> HostedConfigurationVersionSummary)
-> Lens
     HostedConfigurationVersionSummary
     HostedConfigurationVersionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedConfigurationVersionSummary' {Maybe Text
configurationProfileId :: Maybe Text
$sel:configurationProfileId:HostedConfigurationVersionSummary' :: HostedConfigurationVersionSummary -> Maybe Text
configurationProfileId} -> Maybe Text
configurationProfileId) (\s :: HostedConfigurationVersionSummary
s@HostedConfigurationVersionSummary' {} Maybe Text
a -> HostedConfigurationVersionSummary
s {$sel:configurationProfileId:HostedConfigurationVersionSummary' :: Maybe Text
configurationProfileId = Maybe Text
a} :: HostedConfigurationVersionSummary)

-- | A standard MIME type describing the format of the configuration content.
-- For more information, see
-- <https://docs.aws.amazon.com/https:/www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 Content-Type>.
hostedConfigurationVersionSummary_contentType :: Lens.Lens' HostedConfigurationVersionSummary (Prelude.Maybe Prelude.Text)
hostedConfigurationVersionSummary_contentType :: (Maybe Text -> f (Maybe Text))
-> HostedConfigurationVersionSummary
-> f HostedConfigurationVersionSummary
hostedConfigurationVersionSummary_contentType = (HostedConfigurationVersionSummary -> Maybe Text)
-> (HostedConfigurationVersionSummary
    -> Maybe Text -> HostedConfigurationVersionSummary)
-> Lens
     HostedConfigurationVersionSummary
     HostedConfigurationVersionSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedConfigurationVersionSummary' {Maybe Text
contentType :: Maybe Text
$sel:contentType:HostedConfigurationVersionSummary' :: HostedConfigurationVersionSummary -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: HostedConfigurationVersionSummary
s@HostedConfigurationVersionSummary' {} Maybe Text
a -> HostedConfigurationVersionSummary
s {$sel:contentType:HostedConfigurationVersionSummary' :: Maybe Text
contentType = Maybe Text
a} :: HostedConfigurationVersionSummary)

instance
  Core.FromJSON
    HostedConfigurationVersionSummary
  where
  parseJSON :: Value -> Parser HostedConfigurationVersionSummary
parseJSON =
    String
-> (Object -> Parser HostedConfigurationVersionSummary)
-> Value
-> Parser HostedConfigurationVersionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"HostedConfigurationVersionSummary"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> HostedConfigurationVersionSummary
HostedConfigurationVersionSummary'
            (Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> HostedConfigurationVersionSummary)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> HostedConfigurationVersionSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VersionNumber")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> HostedConfigurationVersionSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> HostedConfigurationVersionSummary)
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
"ApplicationId")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> HostedConfigurationVersionSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> HostedConfigurationVersionSummary)
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
"Description")
            Parser
  (Maybe Text -> Maybe Text -> HostedConfigurationVersionSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> HostedConfigurationVersionSummary)
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
"ConfigurationProfileId")
            Parser (Maybe Text -> HostedConfigurationVersionSummary)
-> Parser (Maybe Text) -> Parser HostedConfigurationVersionSummary
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
"ContentType")
      )

instance
  Prelude.Hashable
    HostedConfigurationVersionSummary

instance
  Prelude.NFData
    HostedConfigurationVersionSummary