{-# 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.HostedConfigurationVersion
-- 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.HostedConfigurationVersion where

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

-- | /See:/ 'newHostedConfigurationVersion' smart constructor.
data HostedConfigurationVersion = HostedConfigurationVersion'
  { -- | The content of the configuration or the configuration data.
    HostedConfigurationVersion -> Maybe (Sensitive ByteString)
content :: Prelude.Maybe (Core.Sensitive Prelude.ByteString),
    -- | The configuration version.
    HostedConfigurationVersion -> Maybe Int
versionNumber :: Prelude.Maybe Prelude.Int,
    -- | The application ID.
    HostedConfigurationVersion -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
    -- | A description of the configuration.
    HostedConfigurationVersion -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The configuration profile ID.
    HostedConfigurationVersion -> 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>.
    HostedConfigurationVersion -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text
  }
  deriving (HostedConfigurationVersion -> HostedConfigurationVersion -> Bool
(HostedConfigurationVersion -> HostedConfigurationVersion -> Bool)
-> (HostedConfigurationVersion
    -> HostedConfigurationVersion -> Bool)
-> Eq HostedConfigurationVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HostedConfigurationVersion -> HostedConfigurationVersion -> Bool
$c/= :: HostedConfigurationVersion -> HostedConfigurationVersion -> Bool
== :: HostedConfigurationVersion -> HostedConfigurationVersion -> Bool
$c== :: HostedConfigurationVersion -> HostedConfigurationVersion -> Bool
Prelude.Eq, Int -> HostedConfigurationVersion -> ShowS
[HostedConfigurationVersion] -> ShowS
HostedConfigurationVersion -> String
(Int -> HostedConfigurationVersion -> ShowS)
-> (HostedConfigurationVersion -> String)
-> ([HostedConfigurationVersion] -> ShowS)
-> Show HostedConfigurationVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HostedConfigurationVersion] -> ShowS
$cshowList :: [HostedConfigurationVersion] -> ShowS
show :: HostedConfigurationVersion -> String
$cshow :: HostedConfigurationVersion -> String
showsPrec :: Int -> HostedConfigurationVersion -> ShowS
$cshowsPrec :: Int -> HostedConfigurationVersion -> ShowS
Prelude.Show, (forall x.
 HostedConfigurationVersion -> Rep HostedConfigurationVersion x)
-> (forall x.
    Rep HostedConfigurationVersion x -> HostedConfigurationVersion)
-> Generic HostedConfigurationVersion
forall x.
Rep HostedConfigurationVersion x -> HostedConfigurationVersion
forall x.
HostedConfigurationVersion -> Rep HostedConfigurationVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HostedConfigurationVersion x -> HostedConfigurationVersion
$cfrom :: forall x.
HostedConfigurationVersion -> Rep HostedConfigurationVersion x
Prelude.Generic)

-- |
-- Create a value of 'HostedConfigurationVersion' 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:
--
-- 'content', 'hostedConfigurationVersion_content' - The content of the configuration or the configuration data.
--
-- 'versionNumber', 'hostedConfigurationVersion_versionNumber' - The configuration version.
--
-- 'applicationId', 'hostedConfigurationVersion_applicationId' - The application ID.
--
-- 'description', 'hostedConfigurationVersion_description' - A description of the configuration.
--
-- 'configurationProfileId', 'hostedConfigurationVersion_configurationProfileId' - The configuration profile ID.
--
-- 'contentType', 'hostedConfigurationVersion_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>.
newHostedConfigurationVersion ::
  HostedConfigurationVersion
newHostedConfigurationVersion :: HostedConfigurationVersion
newHostedConfigurationVersion =
  HostedConfigurationVersion' :: Maybe (Sensitive ByteString)
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> HostedConfigurationVersion
HostedConfigurationVersion'
    { $sel:content:HostedConfigurationVersion' :: Maybe (Sensitive ByteString)
content =
        Maybe (Sensitive ByteString)
forall a. Maybe a
Prelude.Nothing,
      $sel:versionNumber:HostedConfigurationVersion' :: Maybe Int
versionNumber = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationId:HostedConfigurationVersion' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:HostedConfigurationVersion' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationProfileId:HostedConfigurationVersion' :: Maybe Text
configurationProfileId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:HostedConfigurationVersion' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The content of the configuration or the configuration data.
hostedConfigurationVersion_content :: Lens.Lens' HostedConfigurationVersion (Prelude.Maybe Prelude.ByteString)
hostedConfigurationVersion_content :: (Maybe ByteString -> f (Maybe ByteString))
-> HostedConfigurationVersion -> f HostedConfigurationVersion
hostedConfigurationVersion_content = (HostedConfigurationVersion -> Maybe (Sensitive ByteString))
-> (HostedConfigurationVersion
    -> Maybe (Sensitive ByteString) -> HostedConfigurationVersion)
-> Lens
     HostedConfigurationVersion
     HostedConfigurationVersion
     (Maybe (Sensitive ByteString))
     (Maybe (Sensitive ByteString))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedConfigurationVersion' {Maybe (Sensitive ByteString)
content :: Maybe (Sensitive ByteString)
$sel:content:HostedConfigurationVersion' :: HostedConfigurationVersion -> Maybe (Sensitive ByteString)
content} -> Maybe (Sensitive ByteString)
content) (\s :: HostedConfigurationVersion
s@HostedConfigurationVersion' {} Maybe (Sensitive ByteString)
a -> HostedConfigurationVersion
s {$sel:content:HostedConfigurationVersion' :: Maybe (Sensitive ByteString)
content = Maybe (Sensitive ByteString)
a} :: HostedConfigurationVersion) ((Maybe (Sensitive ByteString) -> f (Maybe (Sensitive ByteString)))
 -> HostedConfigurationVersion -> f HostedConfigurationVersion)
-> ((Maybe ByteString -> f (Maybe ByteString))
    -> Maybe (Sensitive ByteString)
    -> f (Maybe (Sensitive ByteString)))
-> (Maybe ByteString -> f (Maybe ByteString))
-> HostedConfigurationVersion
-> f HostedConfigurationVersion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive ByteString) (Sensitive ByteString) ByteString ByteString
-> Iso
     (Maybe (Sensitive ByteString))
     (Maybe (Sensitive ByteString))
     (Maybe ByteString)
     (Maybe ByteString)
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 AnIso
  (Sensitive ByteString) (Sensitive ByteString) ByteString ByteString
forall a. Iso' (Sensitive a) a
Core._Sensitive

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

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

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

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

-- | 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>.
hostedConfigurationVersion_contentType :: Lens.Lens' HostedConfigurationVersion (Prelude.Maybe Prelude.Text)
hostedConfigurationVersion_contentType :: (Maybe Text -> f (Maybe Text))
-> HostedConfigurationVersion -> f HostedConfigurationVersion
hostedConfigurationVersion_contentType = (HostedConfigurationVersion -> Maybe Text)
-> (HostedConfigurationVersion
    -> Maybe Text -> HostedConfigurationVersion)
-> Lens
     HostedConfigurationVersion
     HostedConfigurationVersion
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HostedConfigurationVersion' {Maybe Text
contentType :: Maybe Text
$sel:contentType:HostedConfigurationVersion' :: HostedConfigurationVersion -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: HostedConfigurationVersion
s@HostedConfigurationVersion' {} Maybe Text
a -> HostedConfigurationVersion
s {$sel:contentType:HostedConfigurationVersion' :: Maybe Text
contentType = Maybe Text
a} :: HostedConfigurationVersion)

instance Prelude.Hashable HostedConfigurationVersion

instance Prelude.NFData HostedConfigurationVersion