{-# 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.SSM.Types.ParameterMetadata
-- 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.SSM.Types.ParameterMetadata where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.ParameterInlinePolicy
import Amazonka.SSM.Types.ParameterTier
import Amazonka.SSM.Types.ParameterType

-- | Metadata includes information like the ARN of the last user and the
-- date\/time the parameter was last used.
--
-- /See:/ 'newParameterMetadata' smart constructor.
data ParameterMetadata = ParameterMetadata'
  { -- | Date the parameter was last changed or updated.
    ParameterMetadata -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The ID of the query key used for this parameter.
    ParameterMetadata -> Maybe Text
keyId :: Prelude.Maybe Prelude.Text,
    -- | The parameter name.
    ParameterMetadata -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The parameter tier.
    ParameterMetadata -> Maybe ParameterTier
tier :: Prelude.Maybe ParameterTier,
    -- | The parameter version.
    ParameterMetadata -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
    -- | Amazon Resource Name (ARN) of the Amazon Web Services user who last
    -- changed the parameter.
    ParameterMetadata -> Maybe Text
lastModifiedUser :: Prelude.Maybe Prelude.Text,
    -- | A parameter name can include only the following letters and symbols.
    --
    -- a-zA-Z0-9_.-
    ParameterMetadata -> Maybe Text
allowedPattern :: Prelude.Maybe Prelude.Text,
    -- | The type of parameter. Valid parameter types include the following:
    -- @String@, @StringList@, and @SecureString@.
    ParameterMetadata -> Maybe ParameterType
type' :: Prelude.Maybe ParameterType,
    -- | The data type of the parameter, such as @text@ or @aws:ec2:image@. The
    -- default is @text@.
    ParameterMetadata -> Maybe Text
dataType :: Prelude.Maybe Prelude.Text,
    -- | Description of the parameter actions.
    ParameterMetadata -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A list of policies associated with a parameter.
    ParameterMetadata -> Maybe [ParameterInlinePolicy]
policies :: Prelude.Maybe [ParameterInlinePolicy]
  }
  deriving (ParameterMetadata -> ParameterMetadata -> Bool
(ParameterMetadata -> ParameterMetadata -> Bool)
-> (ParameterMetadata -> ParameterMetadata -> Bool)
-> Eq ParameterMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ParameterMetadata -> ParameterMetadata -> Bool
$c/= :: ParameterMetadata -> ParameterMetadata -> Bool
== :: ParameterMetadata -> ParameterMetadata -> Bool
$c== :: ParameterMetadata -> ParameterMetadata -> Bool
Prelude.Eq, ReadPrec [ParameterMetadata]
ReadPrec ParameterMetadata
Int -> ReadS ParameterMetadata
ReadS [ParameterMetadata]
(Int -> ReadS ParameterMetadata)
-> ReadS [ParameterMetadata]
-> ReadPrec ParameterMetadata
-> ReadPrec [ParameterMetadata]
-> Read ParameterMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ParameterMetadata]
$creadListPrec :: ReadPrec [ParameterMetadata]
readPrec :: ReadPrec ParameterMetadata
$creadPrec :: ReadPrec ParameterMetadata
readList :: ReadS [ParameterMetadata]
$creadList :: ReadS [ParameterMetadata]
readsPrec :: Int -> ReadS ParameterMetadata
$creadsPrec :: Int -> ReadS ParameterMetadata
Prelude.Read, Int -> ParameterMetadata -> ShowS
[ParameterMetadata] -> ShowS
ParameterMetadata -> String
(Int -> ParameterMetadata -> ShowS)
-> (ParameterMetadata -> String)
-> ([ParameterMetadata] -> ShowS)
-> Show ParameterMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ParameterMetadata] -> ShowS
$cshowList :: [ParameterMetadata] -> ShowS
show :: ParameterMetadata -> String
$cshow :: ParameterMetadata -> String
showsPrec :: Int -> ParameterMetadata -> ShowS
$cshowsPrec :: Int -> ParameterMetadata -> ShowS
Prelude.Show, (forall x. ParameterMetadata -> Rep ParameterMetadata x)
-> (forall x. Rep ParameterMetadata x -> ParameterMetadata)
-> Generic ParameterMetadata
forall x. Rep ParameterMetadata x -> ParameterMetadata
forall x. ParameterMetadata -> Rep ParameterMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ParameterMetadata x -> ParameterMetadata
$cfrom :: forall x. ParameterMetadata -> Rep ParameterMetadata x
Prelude.Generic)

-- |
-- Create a value of 'ParameterMetadata' 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:
--
-- 'lastModifiedDate', 'parameterMetadata_lastModifiedDate' - Date the parameter was last changed or updated.
--
-- 'keyId', 'parameterMetadata_keyId' - The ID of the query key used for this parameter.
--
-- 'name', 'parameterMetadata_name' - The parameter name.
--
-- 'tier', 'parameterMetadata_tier' - The parameter tier.
--
-- 'version', 'parameterMetadata_version' - The parameter version.
--
-- 'lastModifiedUser', 'parameterMetadata_lastModifiedUser' - Amazon Resource Name (ARN) of the Amazon Web Services user who last
-- changed the parameter.
--
-- 'allowedPattern', 'parameterMetadata_allowedPattern' - A parameter name can include only the following letters and symbols.
--
-- a-zA-Z0-9_.-
--
-- 'type'', 'parameterMetadata_type' - The type of parameter. Valid parameter types include the following:
-- @String@, @StringList@, and @SecureString@.
--
-- 'dataType', 'parameterMetadata_dataType' - The data type of the parameter, such as @text@ or @aws:ec2:image@. The
-- default is @text@.
--
-- 'description', 'parameterMetadata_description' - Description of the parameter actions.
--
-- 'policies', 'parameterMetadata_policies' - A list of policies associated with a parameter.
newParameterMetadata ::
  ParameterMetadata
newParameterMetadata :: ParameterMetadata
newParameterMetadata =
  ParameterMetadata' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ParameterTier
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe ParameterType
-> Maybe Text
-> Maybe Text
-> Maybe [ParameterInlinePolicy]
-> ParameterMetadata
ParameterMetadata'
    { $sel:lastModifiedDate:ParameterMetadata' :: Maybe POSIX
lastModifiedDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:keyId:ParameterMetadata' :: Maybe Text
keyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ParameterMetadata' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tier:ParameterMetadata' :: Maybe ParameterTier
tier = Maybe ParameterTier
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ParameterMetadata' :: Maybe Integer
version = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedUser:ParameterMetadata' :: Maybe Text
lastModifiedUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:allowedPattern:ParameterMetadata' :: Maybe Text
allowedPattern = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ParameterMetadata' :: Maybe ParameterType
type' = Maybe ParameterType
forall a. Maybe a
Prelude.Nothing,
      $sel:dataType:ParameterMetadata' :: Maybe Text
dataType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ParameterMetadata' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:policies:ParameterMetadata' :: Maybe [ParameterInlinePolicy]
policies = Maybe [ParameterInlinePolicy]
forall a. Maybe a
Prelude.Nothing
    }

-- | Date the parameter was last changed or updated.
parameterMetadata_lastModifiedDate :: Lens.Lens' ParameterMetadata (Prelude.Maybe Prelude.UTCTime)
parameterMetadata_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_lastModifiedDate = (ParameterMetadata -> Maybe POSIX)
-> (ParameterMetadata -> Maybe POSIX -> ParameterMetadata)
-> Lens
     ParameterMetadata ParameterMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:ParameterMetadata' :: ParameterMetadata -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe POSIX
a -> ParameterMetadata
s {$sel:lastModifiedDate:ParameterMetadata' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: ParameterMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> ParameterMetadata -> f ParameterMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ParameterMetadata
-> f ParameterMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ID of the query key used for this parameter.
parameterMetadata_keyId :: Lens.Lens' ParameterMetadata (Prelude.Maybe Prelude.Text)
parameterMetadata_keyId :: (Maybe Text -> f (Maybe Text))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_keyId = (ParameterMetadata -> Maybe Text)
-> (ParameterMetadata -> Maybe Text -> ParameterMetadata)
-> Lens
     ParameterMetadata ParameterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe Text
keyId :: Maybe Text
$sel:keyId:ParameterMetadata' :: ParameterMetadata -> Maybe Text
keyId} -> Maybe Text
keyId) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe Text
a -> ParameterMetadata
s {$sel:keyId:ParameterMetadata' :: Maybe Text
keyId = Maybe Text
a} :: ParameterMetadata)

-- | The parameter name.
parameterMetadata_name :: Lens.Lens' ParameterMetadata (Prelude.Maybe Prelude.Text)
parameterMetadata_name :: (Maybe Text -> f (Maybe Text))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_name = (ParameterMetadata -> Maybe Text)
-> (ParameterMetadata -> Maybe Text -> ParameterMetadata)
-> Lens
     ParameterMetadata ParameterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe Text
name :: Maybe Text
$sel:name:ParameterMetadata' :: ParameterMetadata -> Maybe Text
name} -> Maybe Text
name) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe Text
a -> ParameterMetadata
s {$sel:name:ParameterMetadata' :: Maybe Text
name = Maybe Text
a} :: ParameterMetadata)

-- | The parameter tier.
parameterMetadata_tier :: Lens.Lens' ParameterMetadata (Prelude.Maybe ParameterTier)
parameterMetadata_tier :: (Maybe ParameterTier -> f (Maybe ParameterTier))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_tier = (ParameterMetadata -> Maybe ParameterTier)
-> (ParameterMetadata -> Maybe ParameterTier -> ParameterMetadata)
-> Lens
     ParameterMetadata
     ParameterMetadata
     (Maybe ParameterTier)
     (Maybe ParameterTier)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe ParameterTier
tier :: Maybe ParameterTier
$sel:tier:ParameterMetadata' :: ParameterMetadata -> Maybe ParameterTier
tier} -> Maybe ParameterTier
tier) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe ParameterTier
a -> ParameterMetadata
s {$sel:tier:ParameterMetadata' :: Maybe ParameterTier
tier = Maybe ParameterTier
a} :: ParameterMetadata)

-- | The parameter version.
parameterMetadata_version :: Lens.Lens' ParameterMetadata (Prelude.Maybe Prelude.Integer)
parameterMetadata_version :: (Maybe Integer -> f (Maybe Integer))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_version = (ParameterMetadata -> Maybe Integer)
-> (ParameterMetadata -> Maybe Integer -> ParameterMetadata)
-> Lens
     ParameterMetadata ParameterMetadata (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe Integer
version :: Maybe Integer
$sel:version:ParameterMetadata' :: ParameterMetadata -> Maybe Integer
version} -> Maybe Integer
version) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe Integer
a -> ParameterMetadata
s {$sel:version:ParameterMetadata' :: Maybe Integer
version = Maybe Integer
a} :: ParameterMetadata)

-- | Amazon Resource Name (ARN) of the Amazon Web Services user who last
-- changed the parameter.
parameterMetadata_lastModifiedUser :: Lens.Lens' ParameterMetadata (Prelude.Maybe Prelude.Text)
parameterMetadata_lastModifiedUser :: (Maybe Text -> f (Maybe Text))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_lastModifiedUser = (ParameterMetadata -> Maybe Text)
-> (ParameterMetadata -> Maybe Text -> ParameterMetadata)
-> Lens
     ParameterMetadata ParameterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe Text
lastModifiedUser :: Maybe Text
$sel:lastModifiedUser:ParameterMetadata' :: ParameterMetadata -> Maybe Text
lastModifiedUser} -> Maybe Text
lastModifiedUser) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe Text
a -> ParameterMetadata
s {$sel:lastModifiedUser:ParameterMetadata' :: Maybe Text
lastModifiedUser = Maybe Text
a} :: ParameterMetadata)

-- | A parameter name can include only the following letters and symbols.
--
-- a-zA-Z0-9_.-
parameterMetadata_allowedPattern :: Lens.Lens' ParameterMetadata (Prelude.Maybe Prelude.Text)
parameterMetadata_allowedPattern :: (Maybe Text -> f (Maybe Text))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_allowedPattern = (ParameterMetadata -> Maybe Text)
-> (ParameterMetadata -> Maybe Text -> ParameterMetadata)
-> Lens
     ParameterMetadata ParameterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe Text
allowedPattern :: Maybe Text
$sel:allowedPattern:ParameterMetadata' :: ParameterMetadata -> Maybe Text
allowedPattern} -> Maybe Text
allowedPattern) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe Text
a -> ParameterMetadata
s {$sel:allowedPattern:ParameterMetadata' :: Maybe Text
allowedPattern = Maybe Text
a} :: ParameterMetadata)

-- | The type of parameter. Valid parameter types include the following:
-- @String@, @StringList@, and @SecureString@.
parameterMetadata_type :: Lens.Lens' ParameterMetadata (Prelude.Maybe ParameterType)
parameterMetadata_type :: (Maybe ParameterType -> f (Maybe ParameterType))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_type = (ParameterMetadata -> Maybe ParameterType)
-> (ParameterMetadata -> Maybe ParameterType -> ParameterMetadata)
-> Lens
     ParameterMetadata
     ParameterMetadata
     (Maybe ParameterType)
     (Maybe ParameterType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe ParameterType
type' :: Maybe ParameterType
$sel:type':ParameterMetadata' :: ParameterMetadata -> Maybe ParameterType
type'} -> Maybe ParameterType
type') (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe ParameterType
a -> ParameterMetadata
s {$sel:type':ParameterMetadata' :: Maybe ParameterType
type' = Maybe ParameterType
a} :: ParameterMetadata)

-- | The data type of the parameter, such as @text@ or @aws:ec2:image@. The
-- default is @text@.
parameterMetadata_dataType :: Lens.Lens' ParameterMetadata (Prelude.Maybe Prelude.Text)
parameterMetadata_dataType :: (Maybe Text -> f (Maybe Text))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_dataType = (ParameterMetadata -> Maybe Text)
-> (ParameterMetadata -> Maybe Text -> ParameterMetadata)
-> Lens
     ParameterMetadata ParameterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe Text
dataType :: Maybe Text
$sel:dataType:ParameterMetadata' :: ParameterMetadata -> Maybe Text
dataType} -> Maybe Text
dataType) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe Text
a -> ParameterMetadata
s {$sel:dataType:ParameterMetadata' :: Maybe Text
dataType = Maybe Text
a} :: ParameterMetadata)

-- | Description of the parameter actions.
parameterMetadata_description :: Lens.Lens' ParameterMetadata (Prelude.Maybe Prelude.Text)
parameterMetadata_description :: (Maybe Text -> f (Maybe Text))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_description = (ParameterMetadata -> Maybe Text)
-> (ParameterMetadata -> Maybe Text -> ParameterMetadata)
-> Lens
     ParameterMetadata ParameterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe Text
description :: Maybe Text
$sel:description:ParameterMetadata' :: ParameterMetadata -> Maybe Text
description} -> Maybe Text
description) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe Text
a -> ParameterMetadata
s {$sel:description:ParameterMetadata' :: Maybe Text
description = Maybe Text
a} :: ParameterMetadata)

-- | A list of policies associated with a parameter.
parameterMetadata_policies :: Lens.Lens' ParameterMetadata (Prelude.Maybe [ParameterInlinePolicy])
parameterMetadata_policies :: (Maybe [ParameterInlinePolicy]
 -> f (Maybe [ParameterInlinePolicy]))
-> ParameterMetadata -> f ParameterMetadata
parameterMetadata_policies = (ParameterMetadata -> Maybe [ParameterInlinePolicy])
-> (ParameterMetadata
    -> Maybe [ParameterInlinePolicy] -> ParameterMetadata)
-> Lens
     ParameterMetadata
     ParameterMetadata
     (Maybe [ParameterInlinePolicy])
     (Maybe [ParameterInlinePolicy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ParameterMetadata' {Maybe [ParameterInlinePolicy]
policies :: Maybe [ParameterInlinePolicy]
$sel:policies:ParameterMetadata' :: ParameterMetadata -> Maybe [ParameterInlinePolicy]
policies} -> Maybe [ParameterInlinePolicy]
policies) (\s :: ParameterMetadata
s@ParameterMetadata' {} Maybe [ParameterInlinePolicy]
a -> ParameterMetadata
s {$sel:policies:ParameterMetadata' :: Maybe [ParameterInlinePolicy]
policies = Maybe [ParameterInlinePolicy]
a} :: ParameterMetadata) ((Maybe [ParameterInlinePolicy]
  -> f (Maybe [ParameterInlinePolicy]))
 -> ParameterMetadata -> f ParameterMetadata)
-> ((Maybe [ParameterInlinePolicy]
     -> f (Maybe [ParameterInlinePolicy]))
    -> Maybe [ParameterInlinePolicy]
    -> f (Maybe [ParameterInlinePolicy]))
-> (Maybe [ParameterInlinePolicy]
    -> f (Maybe [ParameterInlinePolicy]))
-> ParameterMetadata
-> f ParameterMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ParameterInlinePolicy]
  [ParameterInlinePolicy]
  [ParameterInlinePolicy]
  [ParameterInlinePolicy]
-> Iso
     (Maybe [ParameterInlinePolicy])
     (Maybe [ParameterInlinePolicy])
     (Maybe [ParameterInlinePolicy])
     (Maybe [ParameterInlinePolicy])
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
  [ParameterInlinePolicy]
  [ParameterInlinePolicy]
  [ParameterInlinePolicy]
  [ParameterInlinePolicy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON ParameterMetadata where
  parseJSON :: Value -> Parser ParameterMetadata
parseJSON =
    String
-> (Object -> Parser ParameterMetadata)
-> Value
-> Parser ParameterMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ParameterMetadata"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ParameterTier
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe ParameterType
-> Maybe Text
-> Maybe Text
-> Maybe [ParameterInlinePolicy]
-> ParameterMetadata
ParameterMetadata'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe ParameterTier
 -> Maybe Integer
 -> Maybe Text
 -> Maybe Text
 -> Maybe ParameterType
 -> Maybe Text
 -> Maybe Text
 -> Maybe [ParameterInlinePolicy]
 -> ParameterMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ParameterTier
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe ParameterType
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ParameterInlinePolicy]
      -> ParameterMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedDate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ParameterTier
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe ParameterType
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ParameterInlinePolicy]
   -> ParameterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ParameterTier
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe ParameterType
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ParameterInlinePolicy]
      -> ParameterMetadata)
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
"KeyId")
            Parser
  (Maybe Text
   -> Maybe ParameterTier
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe ParameterType
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ParameterInlinePolicy]
   -> ParameterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe ParameterTier
      -> Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe ParameterType
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ParameterInlinePolicy]
      -> ParameterMetadata)
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
"Name")
            Parser
  (Maybe ParameterTier
   -> Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe ParameterType
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ParameterInlinePolicy]
   -> ParameterMetadata)
-> Parser (Maybe ParameterTier)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe Text
      -> Maybe ParameterType
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ParameterInlinePolicy]
      -> ParameterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ParameterTier)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tier")
            Parser
  (Maybe Integer
   -> Maybe Text
   -> Maybe Text
   -> Maybe ParameterType
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ParameterInlinePolicy]
   -> ParameterMetadata)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ParameterType
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ParameterInlinePolicy]
      -> ParameterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ParameterType
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ParameterInlinePolicy]
   -> ParameterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ParameterType
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ParameterInlinePolicy]
      -> ParameterMetadata)
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
"LastModifiedUser")
            Parser
  (Maybe Text
   -> Maybe ParameterType
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ParameterInlinePolicy]
   -> ParameterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe ParameterType
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ParameterInlinePolicy]
      -> ParameterMetadata)
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
"AllowedPattern")
            Parser
  (Maybe ParameterType
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ParameterInlinePolicy]
   -> ParameterMetadata)
-> Parser (Maybe ParameterType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [ParameterInlinePolicy]
      -> ParameterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ParameterType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [ParameterInlinePolicy]
   -> ParameterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe [ParameterInlinePolicy] -> ParameterMetadata)
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
"DataType")
            Parser
  (Maybe Text -> Maybe [ParameterInlinePolicy] -> ParameterMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe [ParameterInlinePolicy] -> ParameterMetadata)
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 [ParameterInlinePolicy] -> ParameterMetadata)
-> Parser (Maybe [ParameterInlinePolicy])
-> Parser ParameterMetadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ParameterInlinePolicy]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Policies" Parser (Maybe (Maybe [ParameterInlinePolicy]))
-> Maybe [ParameterInlinePolicy]
-> Parser (Maybe [ParameterInlinePolicy])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ParameterInlinePolicy]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ParameterMetadata

instance Prelude.NFData ParameterMetadata