{-# 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.CloudFormation.Types.TypeSummary
-- 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.CloudFormation.Types.TypeSummary where

import Amazonka.CloudFormation.Types.IdentityProvider
import Amazonka.CloudFormation.Types.RegistryType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains summary information about the specified CloudFormation
-- extension.
--
-- /See:/ 'newTypeSummary' smart constructor.
data TypeSummary = TypeSummary'
  { -- | When the specified extension version was registered. This applies only
    -- to:
    --
    -- -   Private extensions you have registered in your account. For more
    --     information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html RegisterType>.
    --
    -- -   Public extensions you have activated in your account with
    --     auto-update specified. For more information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateType.html ActivateType>.
    --
    -- For all other extension types, CloudFormation returns @null@.
    TypeSummary -> Maybe ISO8601
lastUpdated :: Prelude.Maybe Core.ISO8601,
    -- | The name of the extension.
    --
    -- If you specified a @TypeNameAlias@ when you
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateType.html activate this extension>
    -- in your account and region, CloudFormation considers that alias as the
    -- type name.
    TypeSummary -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
    -- | For public extensions that have been activated for this account and
    -- region, the version of the public extension to be used for
    -- CloudFormation operations in this account and region.
    --
    -- How you specified @AutoUpdate@ when enabling the extension affects
    -- whether CloudFormation automatically updates the extention in this
    -- account and region when a new version is released. For more information,
    -- see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto Setting CloudFormation to automatically use new versions of extensions>
    -- in the /CloudFormation User Guide/.
    TypeSummary -> Maybe Text
publicVersionNumber :: Prelude.Maybe Prelude.Text,
    -- | The service used to verify the publisher identity.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html Registering your account to publish CloudFormation extensions>
    -- in the /CFN-CLI User Guide for Extension Development/.
    TypeSummary -> Maybe IdentityProvider
publisherIdentity :: Prelude.Maybe IdentityProvider,
    -- | For public extensions that have been activated for this account and
    -- region, the type name of the public extension.
    --
    -- If you specified a @TypeNameAlias@ when enabling the extension in this
    -- account and region, CloudFormation treats that alias as the extension\'s
    -- type name within the account and region, not the type name of the public
    -- extension. For more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-alias Specifying aliases to refer to extensions>
    -- in the /CloudFormation User Guide/.
    TypeSummary -> Maybe Text
originalTypeName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the default version of the extension. The default version is
    -- used when the extension version is not specified.
    --
    -- This applies only to private extensions you have registered in your
    -- account. For public extensions, both those provided by Amazon and
    -- published by third parties, CloudFormation returns @null@. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html RegisterType>.
    --
    -- To set the default version of an extension, use
    -- @ SetTypeDefaultVersion @.
    TypeSummary -> Maybe Text
defaultVersionId :: Prelude.Maybe Prelude.Text,
    -- | Whether or not the extension is activated for this account and region.
    --
    -- This applies only to third-party public extensions. Extensions published
    -- by Amazon are activated by default.
    TypeSummary -> Maybe Bool
isActivated :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the extension.
    TypeSummary -> Maybe Text
typeArn :: Prelude.Maybe Prelude.Text,
    -- | The kind of extension.
    TypeSummary -> Maybe RegistryType
type' :: Prelude.Maybe RegistryType,
    -- | For public extensions that have been activated for this account and
    -- region, the latest version of the public extension /that is available/.
    -- For any extensions other than activated third-arty extensions,
    -- CloudFormation returns @null@.
    --
    -- How you specified @AutoUpdate@ when enabling the extension affects
    -- whether CloudFormation automatically updates the extention in this
    -- account and region when a new version is released. For more information,
    -- see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto Setting CloudFormation to automatically use new versions of extensions>
    -- in the /CloudFormation User Guide/.
    TypeSummary -> Maybe Text
latestPublicVersion :: Prelude.Maybe Prelude.Text,
    -- | The ID of the extension publisher, if the extension is published by a
    -- third party. Extensions published by Amazon do not return a publisher
    -- ID.
    TypeSummary -> Maybe Text
publisherId :: Prelude.Maybe Prelude.Text,
    -- | The description of the extension.
    TypeSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The publisher name, as defined in the public profile for that publisher
    -- in the service used to verify the publisher identity.
    TypeSummary -> Maybe Text
publisherName :: Prelude.Maybe Prelude.Text
  }
  deriving (TypeSummary -> TypeSummary -> Bool
(TypeSummary -> TypeSummary -> Bool)
-> (TypeSummary -> TypeSummary -> Bool) -> Eq TypeSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeSummary -> TypeSummary -> Bool
$c/= :: TypeSummary -> TypeSummary -> Bool
== :: TypeSummary -> TypeSummary -> Bool
$c== :: TypeSummary -> TypeSummary -> Bool
Prelude.Eq, ReadPrec [TypeSummary]
ReadPrec TypeSummary
Int -> ReadS TypeSummary
ReadS [TypeSummary]
(Int -> ReadS TypeSummary)
-> ReadS [TypeSummary]
-> ReadPrec TypeSummary
-> ReadPrec [TypeSummary]
-> Read TypeSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TypeSummary]
$creadListPrec :: ReadPrec [TypeSummary]
readPrec :: ReadPrec TypeSummary
$creadPrec :: ReadPrec TypeSummary
readList :: ReadS [TypeSummary]
$creadList :: ReadS [TypeSummary]
readsPrec :: Int -> ReadS TypeSummary
$creadsPrec :: Int -> ReadS TypeSummary
Prelude.Read, Int -> TypeSummary -> ShowS
[TypeSummary] -> ShowS
TypeSummary -> String
(Int -> TypeSummary -> ShowS)
-> (TypeSummary -> String)
-> ([TypeSummary] -> ShowS)
-> Show TypeSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeSummary] -> ShowS
$cshowList :: [TypeSummary] -> ShowS
show :: TypeSummary -> String
$cshow :: TypeSummary -> String
showsPrec :: Int -> TypeSummary -> ShowS
$cshowsPrec :: Int -> TypeSummary -> ShowS
Prelude.Show, (forall x. TypeSummary -> Rep TypeSummary x)
-> (forall x. Rep TypeSummary x -> TypeSummary)
-> Generic TypeSummary
forall x. Rep TypeSummary x -> TypeSummary
forall x. TypeSummary -> Rep TypeSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TypeSummary x -> TypeSummary
$cfrom :: forall x. TypeSummary -> Rep TypeSummary x
Prelude.Generic)

-- |
-- Create a value of 'TypeSummary' 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:
--
-- 'lastUpdated', 'typeSummary_lastUpdated' - When the specified extension version was registered. This applies only
-- to:
--
-- -   Private extensions you have registered in your account. For more
--     information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html RegisterType>.
--
-- -   Public extensions you have activated in your account with
--     auto-update specified. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateType.html ActivateType>.
--
-- For all other extension types, CloudFormation returns @null@.
--
-- 'typeName', 'typeSummary_typeName' - The name of the extension.
--
-- If you specified a @TypeNameAlias@ when you
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateType.html activate this extension>
-- in your account and region, CloudFormation considers that alias as the
-- type name.
--
-- 'publicVersionNumber', 'typeSummary_publicVersionNumber' - For public extensions that have been activated for this account and
-- region, the version of the public extension to be used for
-- CloudFormation operations in this account and region.
--
-- How you specified @AutoUpdate@ when enabling the extension affects
-- whether CloudFormation automatically updates the extention in this
-- account and region when a new version is released. For more information,
-- see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto Setting CloudFormation to automatically use new versions of extensions>
-- in the /CloudFormation User Guide/.
--
-- 'publisherIdentity', 'typeSummary_publisherIdentity' - The service used to verify the publisher identity.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html Registering your account to publish CloudFormation extensions>
-- in the /CFN-CLI User Guide for Extension Development/.
--
-- 'originalTypeName', 'typeSummary_originalTypeName' - For public extensions that have been activated for this account and
-- region, the type name of the public extension.
--
-- If you specified a @TypeNameAlias@ when enabling the extension in this
-- account and region, CloudFormation treats that alias as the extension\'s
-- type name within the account and region, not the type name of the public
-- extension. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-alias Specifying aliases to refer to extensions>
-- in the /CloudFormation User Guide/.
--
-- 'defaultVersionId', 'typeSummary_defaultVersionId' - The ID of the default version of the extension. The default version is
-- used when the extension version is not specified.
--
-- This applies only to private extensions you have registered in your
-- account. For public extensions, both those provided by Amazon and
-- published by third parties, CloudFormation returns @null@. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html RegisterType>.
--
-- To set the default version of an extension, use
-- @ SetTypeDefaultVersion @.
--
-- 'isActivated', 'typeSummary_isActivated' - Whether or not the extension is activated for this account and region.
--
-- This applies only to third-party public extensions. Extensions published
-- by Amazon are activated by default.
--
-- 'typeArn', 'typeSummary_typeArn' - The Amazon Resource Name (ARN) of the extension.
--
-- 'type'', 'typeSummary_type' - The kind of extension.
--
-- 'latestPublicVersion', 'typeSummary_latestPublicVersion' - For public extensions that have been activated for this account and
-- region, the latest version of the public extension /that is available/.
-- For any extensions other than activated third-arty extensions,
-- CloudFormation returns @null@.
--
-- How you specified @AutoUpdate@ when enabling the extension affects
-- whether CloudFormation automatically updates the extention in this
-- account and region when a new version is released. For more information,
-- see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto Setting CloudFormation to automatically use new versions of extensions>
-- in the /CloudFormation User Guide/.
--
-- 'publisherId', 'typeSummary_publisherId' - The ID of the extension publisher, if the extension is published by a
-- third party. Extensions published by Amazon do not return a publisher
-- ID.
--
-- 'description', 'typeSummary_description' - The description of the extension.
--
-- 'publisherName', 'typeSummary_publisherName' - The publisher name, as defined in the public profile for that publisher
-- in the service used to verify the publisher identity.
newTypeSummary ::
  TypeSummary
newTypeSummary :: TypeSummary
newTypeSummary =
  TypeSummary' :: Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe IdentityProvider
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RegistryType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TypeSummary
TypeSummary'
    { $sel:lastUpdated:TypeSummary' :: Maybe ISO8601
lastUpdated = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:typeName:TypeSummary' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:publicVersionNumber:TypeSummary' :: Maybe Text
publicVersionNumber = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:publisherIdentity:TypeSummary' :: Maybe IdentityProvider
publisherIdentity = Maybe IdentityProvider
forall a. Maybe a
Prelude.Nothing,
      $sel:originalTypeName:TypeSummary' :: Maybe Text
originalTypeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultVersionId:TypeSummary' :: Maybe Text
defaultVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isActivated:TypeSummary' :: Maybe Bool
isActivated = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:typeArn:TypeSummary' :: Maybe Text
typeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':TypeSummary' :: Maybe RegistryType
type' = Maybe RegistryType
forall a. Maybe a
Prelude.Nothing,
      $sel:latestPublicVersion:TypeSummary' :: Maybe Text
latestPublicVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:publisherId:TypeSummary' :: Maybe Text
publisherId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:TypeSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:publisherName:TypeSummary' :: Maybe Text
publisherName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | When the specified extension version was registered. This applies only
-- to:
--
-- -   Private extensions you have registered in your account. For more
--     information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html RegisterType>.
--
-- -   Public extensions you have activated in your account with
--     auto-update specified. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateType.html ActivateType>.
--
-- For all other extension types, CloudFormation returns @null@.
typeSummary_lastUpdated :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.UTCTime)
typeSummary_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TypeSummary -> f TypeSummary
typeSummary_lastUpdated = (TypeSummary -> Maybe ISO8601)
-> (TypeSummary -> Maybe ISO8601 -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe ISO8601
lastUpdated :: Maybe ISO8601
$sel:lastUpdated:TypeSummary' :: TypeSummary -> Maybe ISO8601
lastUpdated} -> Maybe ISO8601
lastUpdated) (\s :: TypeSummary
s@TypeSummary' {} Maybe ISO8601
a -> TypeSummary
s {$sel:lastUpdated:TypeSummary' :: Maybe ISO8601
lastUpdated = Maybe ISO8601
a} :: TypeSummary) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> TypeSummary -> f TypeSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TypeSummary
-> f TypeSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the extension.
--
-- If you specified a @TypeNameAlias@ when you
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateType.html activate this extension>
-- in your account and region, CloudFormation considers that alias as the
-- type name.
typeSummary_typeName :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_typeName :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_typeName = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
typeName :: Maybe Text
$sel:typeName:TypeSummary' :: TypeSummary -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:typeName:TypeSummary' :: Maybe Text
typeName = Maybe Text
a} :: TypeSummary)

-- | For public extensions that have been activated for this account and
-- region, the version of the public extension to be used for
-- CloudFormation operations in this account and region.
--
-- How you specified @AutoUpdate@ when enabling the extension affects
-- whether CloudFormation automatically updates the extention in this
-- account and region when a new version is released. For more information,
-- see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto Setting CloudFormation to automatically use new versions of extensions>
-- in the /CloudFormation User Guide/.
typeSummary_publicVersionNumber :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_publicVersionNumber :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_publicVersionNumber = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
publicVersionNumber :: Maybe Text
$sel:publicVersionNumber:TypeSummary' :: TypeSummary -> Maybe Text
publicVersionNumber} -> Maybe Text
publicVersionNumber) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:publicVersionNumber:TypeSummary' :: Maybe Text
publicVersionNumber = Maybe Text
a} :: TypeSummary)

-- | The service used to verify the publisher identity.
--
-- For more information, see
-- <https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/publish-extension.html Registering your account to publish CloudFormation extensions>
-- in the /CFN-CLI User Guide for Extension Development/.
typeSummary_publisherIdentity :: Lens.Lens' TypeSummary (Prelude.Maybe IdentityProvider)
typeSummary_publisherIdentity :: (Maybe IdentityProvider -> f (Maybe IdentityProvider))
-> TypeSummary -> f TypeSummary
typeSummary_publisherIdentity = (TypeSummary -> Maybe IdentityProvider)
-> (TypeSummary -> Maybe IdentityProvider -> TypeSummary)
-> Lens
     TypeSummary
     TypeSummary
     (Maybe IdentityProvider)
     (Maybe IdentityProvider)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe IdentityProvider
publisherIdentity :: Maybe IdentityProvider
$sel:publisherIdentity:TypeSummary' :: TypeSummary -> Maybe IdentityProvider
publisherIdentity} -> Maybe IdentityProvider
publisherIdentity) (\s :: TypeSummary
s@TypeSummary' {} Maybe IdentityProvider
a -> TypeSummary
s {$sel:publisherIdentity:TypeSummary' :: Maybe IdentityProvider
publisherIdentity = Maybe IdentityProvider
a} :: TypeSummary)

-- | For public extensions that have been activated for this account and
-- region, the type name of the public extension.
--
-- If you specified a @TypeNameAlias@ when enabling the extension in this
-- account and region, CloudFormation treats that alias as the extension\'s
-- type name within the account and region, not the type name of the public
-- extension. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-alias Specifying aliases to refer to extensions>
-- in the /CloudFormation User Guide/.
typeSummary_originalTypeName :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_originalTypeName :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_originalTypeName = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
originalTypeName :: Maybe Text
$sel:originalTypeName:TypeSummary' :: TypeSummary -> Maybe Text
originalTypeName} -> Maybe Text
originalTypeName) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:originalTypeName:TypeSummary' :: Maybe Text
originalTypeName = Maybe Text
a} :: TypeSummary)

-- | The ID of the default version of the extension. The default version is
-- used when the extension version is not specified.
--
-- This applies only to private extensions you have registered in your
-- account. For public extensions, both those provided by Amazon and
-- published by third parties, CloudFormation returns @null@. For more
-- information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RegisterType.html RegisterType>.
--
-- To set the default version of an extension, use
-- @ SetTypeDefaultVersion @.
typeSummary_defaultVersionId :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_defaultVersionId :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_defaultVersionId = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
defaultVersionId :: Maybe Text
$sel:defaultVersionId:TypeSummary' :: TypeSummary -> Maybe Text
defaultVersionId} -> Maybe Text
defaultVersionId) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:defaultVersionId:TypeSummary' :: Maybe Text
defaultVersionId = Maybe Text
a} :: TypeSummary)

-- | Whether or not the extension is activated for this account and region.
--
-- This applies only to third-party public extensions. Extensions published
-- by Amazon are activated by default.
typeSummary_isActivated :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Bool)
typeSummary_isActivated :: (Maybe Bool -> f (Maybe Bool)) -> TypeSummary -> f TypeSummary
typeSummary_isActivated = (TypeSummary -> Maybe Bool)
-> (TypeSummary -> Maybe Bool -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Bool
isActivated :: Maybe Bool
$sel:isActivated:TypeSummary' :: TypeSummary -> Maybe Bool
isActivated} -> Maybe Bool
isActivated) (\s :: TypeSummary
s@TypeSummary' {} Maybe Bool
a -> TypeSummary
s {$sel:isActivated:TypeSummary' :: Maybe Bool
isActivated = Maybe Bool
a} :: TypeSummary)

-- | The Amazon Resource Name (ARN) of the extension.
typeSummary_typeArn :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_typeArn :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_typeArn = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
typeArn :: Maybe Text
$sel:typeArn:TypeSummary' :: TypeSummary -> Maybe Text
typeArn} -> Maybe Text
typeArn) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:typeArn:TypeSummary' :: Maybe Text
typeArn = Maybe Text
a} :: TypeSummary)

-- | The kind of extension.
typeSummary_type :: Lens.Lens' TypeSummary (Prelude.Maybe RegistryType)
typeSummary_type :: (Maybe RegistryType -> f (Maybe RegistryType))
-> TypeSummary -> f TypeSummary
typeSummary_type = (TypeSummary -> Maybe RegistryType)
-> (TypeSummary -> Maybe RegistryType -> TypeSummary)
-> Lens
     TypeSummary TypeSummary (Maybe RegistryType) (Maybe RegistryType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe RegistryType
type' :: Maybe RegistryType
$sel:type':TypeSummary' :: TypeSummary -> Maybe RegistryType
type'} -> Maybe RegistryType
type') (\s :: TypeSummary
s@TypeSummary' {} Maybe RegistryType
a -> TypeSummary
s {$sel:type':TypeSummary' :: Maybe RegistryType
type' = Maybe RegistryType
a} :: TypeSummary)

-- | For public extensions that have been activated for this account and
-- region, the latest version of the public extension /that is available/.
-- For any extensions other than activated third-arty extensions,
-- CloudFormation returns @null@.
--
-- How you specified @AutoUpdate@ when enabling the extension affects
-- whether CloudFormation automatically updates the extention in this
-- account and region when a new version is released. For more information,
-- see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-auto Setting CloudFormation to automatically use new versions of extensions>
-- in the /CloudFormation User Guide/.
typeSummary_latestPublicVersion :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_latestPublicVersion :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_latestPublicVersion = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
latestPublicVersion :: Maybe Text
$sel:latestPublicVersion:TypeSummary' :: TypeSummary -> Maybe Text
latestPublicVersion} -> Maybe Text
latestPublicVersion) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:latestPublicVersion:TypeSummary' :: Maybe Text
latestPublicVersion = Maybe Text
a} :: TypeSummary)

-- | The ID of the extension publisher, if the extension is published by a
-- third party. Extensions published by Amazon do not return a publisher
-- ID.
typeSummary_publisherId :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_publisherId :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_publisherId = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
publisherId :: Maybe Text
$sel:publisherId:TypeSummary' :: TypeSummary -> Maybe Text
publisherId} -> Maybe Text
publisherId) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:publisherId:TypeSummary' :: Maybe Text
publisherId = Maybe Text
a} :: TypeSummary)

-- | The description of the extension.
typeSummary_description :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_description :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_description = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
description :: Maybe Text
$sel:description:TypeSummary' :: TypeSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:description:TypeSummary' :: Maybe Text
description = Maybe Text
a} :: TypeSummary)

-- | The publisher name, as defined in the public profile for that publisher
-- in the service used to verify the publisher identity.
typeSummary_publisherName :: Lens.Lens' TypeSummary (Prelude.Maybe Prelude.Text)
typeSummary_publisherName :: (Maybe Text -> f (Maybe Text)) -> TypeSummary -> f TypeSummary
typeSummary_publisherName = (TypeSummary -> Maybe Text)
-> (TypeSummary -> Maybe Text -> TypeSummary)
-> Lens TypeSummary TypeSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TypeSummary' {Maybe Text
publisherName :: Maybe Text
$sel:publisherName:TypeSummary' :: TypeSummary -> Maybe Text
publisherName} -> Maybe Text
publisherName) (\s :: TypeSummary
s@TypeSummary' {} Maybe Text
a -> TypeSummary
s {$sel:publisherName:TypeSummary' :: Maybe Text
publisherName = Maybe Text
a} :: TypeSummary)

instance Core.FromXML TypeSummary where
  parseXML :: [Node] -> Either String TypeSummary
parseXML [Node]
x =
    Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe IdentityProvider
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RegistryType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TypeSummary
TypeSummary'
      (Maybe ISO8601
 -> Maybe Text
 -> Maybe Text
 -> Maybe IdentityProvider
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe RegistryType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> TypeSummary)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe IdentityProvider
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RegistryType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TypeSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LastUpdated")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe IdentityProvider
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RegistryType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TypeSummary)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe IdentityProvider
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RegistryType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TypeName")
      Either
  String
  (Maybe Text
   -> Maybe IdentityProvider
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RegistryType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TypeSummary)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe IdentityProvider
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RegistryType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PublicVersionNumber")
      Either
  String
  (Maybe IdentityProvider
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RegistryType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TypeSummary)
-> Either String (Maybe IdentityProvider)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RegistryType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe IdentityProvider)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PublisherIdentity")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RegistryType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TypeSummary)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RegistryType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OriginalTypeName")
      Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RegistryType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TypeSummary)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe RegistryType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DefaultVersionId")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe RegistryType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TypeSummary)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe RegistryType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsActivated")
      Either
  String
  (Maybe Text
   -> Maybe RegistryType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TypeSummary)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe RegistryType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TypeArn")
      Either
  String
  (Maybe RegistryType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> TypeSummary)
-> Either String (Maybe RegistryType)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Text -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe RegistryType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Type")
      Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Text -> TypeSummary)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Maybe Text -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LatestPublicVersion")
      Either
  String (Maybe Text -> Maybe Text -> Maybe Text -> TypeSummary)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Maybe Text -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PublisherId")
      Either String (Maybe Text -> Maybe Text -> TypeSummary)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> TypeSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Description")
      Either String (Maybe Text -> TypeSummary)
-> Either String (Maybe Text) -> Either String TypeSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PublisherName")

instance Prelude.Hashable TypeSummary

instance Prelude.NFData TypeSummary