{-# 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.ManagedBlockChain.Types.Member
-- 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.ManagedBlockChain.Types.Member where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.ManagedBlockChain.Types.MemberFrameworkAttributes
import Amazonka.ManagedBlockChain.Types.MemberLogPublishingConfiguration
import Amazonka.ManagedBlockChain.Types.MemberStatus
import qualified Amazonka.Prelude as Prelude

-- | Member configuration properties.
--
-- Applies only to Hyperledger Fabric.
--
-- /See:/ 'newMember' smart constructor.
data Member = Member'
  { -- | The status of a member.
    --
    -- -   @CREATING@ - The AWS account is in the process of creating a member.
    --
    -- -   @AVAILABLE@ - The member has been created and can participate in the
    --     network.
    --
    -- -   @CREATE_FAILED@ - The AWS account attempted to create a member and
    --     creation failed.
    --
    -- -   @UPDATING@ - The member is in the process of being updated.
    --
    -- -   @DELETING@ - The member and all associated resources are in the
    --     process of being deleted. Either the AWS account that owns the
    --     member deleted it, or the member is being deleted as the result of
    --     an @APPROVED@ @PROPOSAL@ to remove the member.
    --
    -- -   @DELETED@ - The member can no longer participate on the network and
    --     all associated resources are deleted. Either the AWS account that
    --     owns the member deleted it, or the member is being deleted as the
    --     result of an @APPROVED@ @PROPOSAL@ to remove the member.
    --
    -- -   @INACCESSIBLE_ENCRYPTION_KEY@ - The member is impaired and might not
    --     function as expected because it cannot access the specified customer
    --     managed key in AWS KMS for encryption at rest. Either the KMS key
    --     was disabled or deleted, or the grants on the key were revoked.
    --
    --     The effect of disabling or deleting a key, or revoking a grant is
    --     not immediate. The member resource might take some time to find that
    --     the key is inaccessible. When a resource is in this state, we
    --     recommend deleting and recreating the resource.
    Member -> Maybe MemberStatus
status :: Prelude.Maybe MemberStatus,
    -- | The Amazon Resource Name (ARN) of the customer managed key in AWS Key
    -- Management Service (AWS KMS) that the member uses for encryption at
    -- rest. If the value of this parameter is @\"AWS Owned KMS Key\"@, the
    -- member uses an AWS owned KMS key for encryption. This parameter is
    -- inherited by the nodes that this member owns.
    Member -> Maybe Text
kmsKeyArn :: Prelude.Maybe Prelude.Text,
    -- | Configuration properties for logging events associated with a member.
    Member -> Maybe MemberLogPublishingConfiguration
logPublishingConfiguration :: Prelude.Maybe MemberLogPublishingConfiguration,
    -- | The Amazon Resource Name (ARN) of the member. For more information about
    -- ARNs and their format, see
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
    -- in the /AWS General Reference/.
    Member -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the network to which the member belongs.
    Member -> Maybe Text
networkId :: Prelude.Maybe Prelude.Text,
    -- | The name of the member.
    Member -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the member.
    Member -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the member was created.
    Member -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | Attributes relevant to a member for the blockchain framework that the
    -- Managed Blockchain network uses.
    Member -> Maybe MemberFrameworkAttributes
frameworkAttributes :: Prelude.Maybe MemberFrameworkAttributes,
    -- | An optional description for the member.
    Member -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Tags assigned to the member. Tags consist of a key and optional value.
    -- For more information about tags, see
    -- <https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html Tagging Resources>
    -- in the /Amazon Managed Blockchain Hyperledger Fabric Developer Guide/.
    Member -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (Member -> Member -> Bool
(Member -> Member -> Bool)
-> (Member -> Member -> Bool) -> Eq Member
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Member -> Member -> Bool
$c/= :: Member -> Member -> Bool
== :: Member -> Member -> Bool
$c== :: Member -> Member -> Bool
Prelude.Eq, ReadPrec [Member]
ReadPrec Member
Int -> ReadS Member
ReadS [Member]
(Int -> ReadS Member)
-> ReadS [Member]
-> ReadPrec Member
-> ReadPrec [Member]
-> Read Member
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Member]
$creadListPrec :: ReadPrec [Member]
readPrec :: ReadPrec Member
$creadPrec :: ReadPrec Member
readList :: ReadS [Member]
$creadList :: ReadS [Member]
readsPrec :: Int -> ReadS Member
$creadsPrec :: Int -> ReadS Member
Prelude.Read, Int -> Member -> ShowS
[Member] -> ShowS
Member -> String
(Int -> Member -> ShowS)
-> (Member -> String) -> ([Member] -> ShowS) -> Show Member
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Member] -> ShowS
$cshowList :: [Member] -> ShowS
show :: Member -> String
$cshow :: Member -> String
showsPrec :: Int -> Member -> ShowS
$cshowsPrec :: Int -> Member -> ShowS
Prelude.Show, (forall x. Member -> Rep Member x)
-> (forall x. Rep Member x -> Member) -> Generic Member
forall x. Rep Member x -> Member
forall x. Member -> Rep Member x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Member x -> Member
$cfrom :: forall x. Member -> Rep Member x
Prelude.Generic)

-- |
-- Create a value of 'Member' 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:
--
-- 'status', 'member_status' - The status of a member.
--
-- -   @CREATING@ - The AWS account is in the process of creating a member.
--
-- -   @AVAILABLE@ - The member has been created and can participate in the
--     network.
--
-- -   @CREATE_FAILED@ - The AWS account attempted to create a member and
--     creation failed.
--
-- -   @UPDATING@ - The member is in the process of being updated.
--
-- -   @DELETING@ - The member and all associated resources are in the
--     process of being deleted. Either the AWS account that owns the
--     member deleted it, or the member is being deleted as the result of
--     an @APPROVED@ @PROPOSAL@ to remove the member.
--
-- -   @DELETED@ - The member can no longer participate on the network and
--     all associated resources are deleted. Either the AWS account that
--     owns the member deleted it, or the member is being deleted as the
--     result of an @APPROVED@ @PROPOSAL@ to remove the member.
--
-- -   @INACCESSIBLE_ENCRYPTION_KEY@ - The member is impaired and might not
--     function as expected because it cannot access the specified customer
--     managed key in AWS KMS for encryption at rest. Either the KMS key
--     was disabled or deleted, or the grants on the key were revoked.
--
--     The effect of disabling or deleting a key, or revoking a grant is
--     not immediate. The member resource might take some time to find that
--     the key is inaccessible. When a resource is in this state, we
--     recommend deleting and recreating the resource.
--
-- 'kmsKeyArn', 'member_kmsKeyArn' - The Amazon Resource Name (ARN) of the customer managed key in AWS Key
-- Management Service (AWS KMS) that the member uses for encryption at
-- rest. If the value of this parameter is @\"AWS Owned KMS Key\"@, the
-- member uses an AWS owned KMS key for encryption. This parameter is
-- inherited by the nodes that this member owns.
--
-- 'logPublishingConfiguration', 'member_logPublishingConfiguration' - Configuration properties for logging events associated with a member.
--
-- 'arn', 'member_arn' - The Amazon Resource Name (ARN) of the member. For more information about
-- ARNs and their format, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
--
-- 'networkId', 'member_networkId' - The unique identifier of the network to which the member belongs.
--
-- 'name', 'member_name' - The name of the member.
--
-- 'id', 'member_id' - The unique identifier of the member.
--
-- 'creationDate', 'member_creationDate' - The date and time that the member was created.
--
-- 'frameworkAttributes', 'member_frameworkAttributes' - Attributes relevant to a member for the blockchain framework that the
-- Managed Blockchain network uses.
--
-- 'description', 'member_description' - An optional description for the member.
--
-- 'tags', 'member_tags' - Tags assigned to the member. Tags consist of a key and optional value.
-- For more information about tags, see
-- <https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html Tagging Resources>
-- in the /Amazon Managed Blockchain Hyperledger Fabric Developer Guide/.
newMember ::
  Member
newMember :: Member
newMember =
  Member' :: Maybe MemberStatus
-> Maybe Text
-> Maybe MemberLogPublishingConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe MemberFrameworkAttributes
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Member
Member'
    { $sel:status:Member' :: Maybe MemberStatus
status = Maybe MemberStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyArn:Member' :: Maybe Text
kmsKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logPublishingConfiguration:Member' :: Maybe MemberLogPublishingConfiguration
logPublishingConfiguration = Maybe MemberLogPublishingConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Member' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:networkId:Member' :: Maybe Text
networkId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Member' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Member' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:Member' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:frameworkAttributes:Member' :: Maybe MemberFrameworkAttributes
frameworkAttributes = Maybe MemberFrameworkAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Member' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Member' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of a member.
--
-- -   @CREATING@ - The AWS account is in the process of creating a member.
--
-- -   @AVAILABLE@ - The member has been created and can participate in the
--     network.
--
-- -   @CREATE_FAILED@ - The AWS account attempted to create a member and
--     creation failed.
--
-- -   @UPDATING@ - The member is in the process of being updated.
--
-- -   @DELETING@ - The member and all associated resources are in the
--     process of being deleted. Either the AWS account that owns the
--     member deleted it, or the member is being deleted as the result of
--     an @APPROVED@ @PROPOSAL@ to remove the member.
--
-- -   @DELETED@ - The member can no longer participate on the network and
--     all associated resources are deleted. Either the AWS account that
--     owns the member deleted it, or the member is being deleted as the
--     result of an @APPROVED@ @PROPOSAL@ to remove the member.
--
-- -   @INACCESSIBLE_ENCRYPTION_KEY@ - The member is impaired and might not
--     function as expected because it cannot access the specified customer
--     managed key in AWS KMS for encryption at rest. Either the KMS key
--     was disabled or deleted, or the grants on the key were revoked.
--
--     The effect of disabling or deleting a key, or revoking a grant is
--     not immediate. The member resource might take some time to find that
--     the key is inaccessible. When a resource is in this state, we
--     recommend deleting and recreating the resource.
member_status :: Lens.Lens' Member (Prelude.Maybe MemberStatus)
member_status :: (Maybe MemberStatus -> f (Maybe MemberStatus))
-> Member -> f Member
member_status = (Member -> Maybe MemberStatus)
-> (Member -> Maybe MemberStatus -> Member)
-> Lens Member Member (Maybe MemberStatus) (Maybe MemberStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe MemberStatus
status :: Maybe MemberStatus
$sel:status:Member' :: Member -> Maybe MemberStatus
status} -> Maybe MemberStatus
status) (\s :: Member
s@Member' {} Maybe MemberStatus
a -> Member
s {$sel:status:Member' :: Maybe MemberStatus
status = Maybe MemberStatus
a} :: Member)

-- | The Amazon Resource Name (ARN) of the customer managed key in AWS Key
-- Management Service (AWS KMS) that the member uses for encryption at
-- rest. If the value of this parameter is @\"AWS Owned KMS Key\"@, the
-- member uses an AWS owned KMS key for encryption. This parameter is
-- inherited by the nodes that this member owns.
member_kmsKeyArn :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_kmsKeyArn :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_kmsKeyArn = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
kmsKeyArn :: Maybe Text
$sel:kmsKeyArn:Member' :: Member -> Maybe Text
kmsKeyArn} -> Maybe Text
kmsKeyArn) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:kmsKeyArn:Member' :: Maybe Text
kmsKeyArn = Maybe Text
a} :: Member)

-- | Configuration properties for logging events associated with a member.
member_logPublishingConfiguration :: Lens.Lens' Member (Prelude.Maybe MemberLogPublishingConfiguration)
member_logPublishingConfiguration :: (Maybe MemberLogPublishingConfiguration
 -> f (Maybe MemberLogPublishingConfiguration))
-> Member -> f Member
member_logPublishingConfiguration = (Member -> Maybe MemberLogPublishingConfiguration)
-> (Member -> Maybe MemberLogPublishingConfiguration -> Member)
-> Lens
     Member
     Member
     (Maybe MemberLogPublishingConfiguration)
     (Maybe MemberLogPublishingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe MemberLogPublishingConfiguration
logPublishingConfiguration :: Maybe MemberLogPublishingConfiguration
$sel:logPublishingConfiguration:Member' :: Member -> Maybe MemberLogPublishingConfiguration
logPublishingConfiguration} -> Maybe MemberLogPublishingConfiguration
logPublishingConfiguration) (\s :: Member
s@Member' {} Maybe MemberLogPublishingConfiguration
a -> Member
s {$sel:logPublishingConfiguration:Member' :: Maybe MemberLogPublishingConfiguration
logPublishingConfiguration = Maybe MemberLogPublishingConfiguration
a} :: Member)

-- | The Amazon Resource Name (ARN) of the member. For more information about
-- ARNs and their format, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon Resource Names (ARNs)>
-- in the /AWS General Reference/.
member_arn :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_arn :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_arn = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
arn :: Maybe Text
$sel:arn:Member' :: Member -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:arn:Member' :: Maybe Text
arn = Maybe Text
a} :: Member)

-- | The unique identifier of the network to which the member belongs.
member_networkId :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_networkId :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_networkId = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
networkId :: Maybe Text
$sel:networkId:Member' :: Member -> Maybe Text
networkId} -> Maybe Text
networkId) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:networkId:Member' :: Maybe Text
networkId = Maybe Text
a} :: Member)

-- | The name of the member.
member_name :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_name :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_name = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
name :: Maybe Text
$sel:name:Member' :: Member -> Maybe Text
name} -> Maybe Text
name) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:name:Member' :: Maybe Text
name = Maybe Text
a} :: Member)

-- | The unique identifier of the member.
member_id :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_id :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_id = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
id :: Maybe Text
$sel:id:Member' :: Member -> Maybe Text
id} -> Maybe Text
id) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:id:Member' :: Maybe Text
id = Maybe Text
a} :: Member)

-- | The date and time that the member was created.
member_creationDate :: Lens.Lens' Member (Prelude.Maybe Prelude.UTCTime)
member_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Member -> f Member
member_creationDate = (Member -> Maybe POSIX)
-> (Member -> Maybe POSIX -> Member)
-> Lens Member Member (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:Member' :: Member -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: Member
s@Member' {} Maybe POSIX
a -> Member
s {$sel:creationDate:Member' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: Member) ((Maybe POSIX -> f (Maybe POSIX)) -> Member -> f Member)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Member
-> f Member
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

-- | Attributes relevant to a member for the blockchain framework that the
-- Managed Blockchain network uses.
member_frameworkAttributes :: Lens.Lens' Member (Prelude.Maybe MemberFrameworkAttributes)
member_frameworkAttributes :: (Maybe MemberFrameworkAttributes
 -> f (Maybe MemberFrameworkAttributes))
-> Member -> f Member
member_frameworkAttributes = (Member -> Maybe MemberFrameworkAttributes)
-> (Member -> Maybe MemberFrameworkAttributes -> Member)
-> Lens
     Member
     Member
     (Maybe MemberFrameworkAttributes)
     (Maybe MemberFrameworkAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe MemberFrameworkAttributes
frameworkAttributes :: Maybe MemberFrameworkAttributes
$sel:frameworkAttributes:Member' :: Member -> Maybe MemberFrameworkAttributes
frameworkAttributes} -> Maybe MemberFrameworkAttributes
frameworkAttributes) (\s :: Member
s@Member' {} Maybe MemberFrameworkAttributes
a -> Member
s {$sel:frameworkAttributes:Member' :: Maybe MemberFrameworkAttributes
frameworkAttributes = Maybe MemberFrameworkAttributes
a} :: Member)

-- | An optional description for the member.
member_description :: Lens.Lens' Member (Prelude.Maybe Prelude.Text)
member_description :: (Maybe Text -> f (Maybe Text)) -> Member -> f Member
member_description = (Member -> Maybe Text)
-> (Member -> Maybe Text -> Member)
-> Lens Member Member (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe Text
description :: Maybe Text
$sel:description:Member' :: Member -> Maybe Text
description} -> Maybe Text
description) (\s :: Member
s@Member' {} Maybe Text
a -> Member
s {$sel:description:Member' :: Maybe Text
description = Maybe Text
a} :: Member)

-- | Tags assigned to the member. Tags consist of a key and optional value.
-- For more information about tags, see
-- <https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/tagging-resources.html Tagging Resources>
-- in the /Amazon Managed Blockchain Hyperledger Fabric Developer Guide/.
member_tags :: Lens.Lens' Member (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
member_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Member -> f Member
member_tags = (Member -> Maybe (HashMap Text Text))
-> (Member -> Maybe (HashMap Text Text) -> Member)
-> Lens
     Member
     Member
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Member' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Member' :: Member -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Member
s@Member' {} Maybe (HashMap Text Text)
a -> Member
s {$sel:tags:Member' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Member) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Member -> f Member)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Member
-> f Member
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON Member where
  parseJSON :: Value -> Parser Member
parseJSON =
    String -> (Object -> Parser Member) -> Value -> Parser Member
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Member"
      ( \Object
x ->
          Maybe MemberStatus
-> Maybe Text
-> Maybe MemberLogPublishingConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe MemberFrameworkAttributes
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Member
Member'
            (Maybe MemberStatus
 -> Maybe Text
 -> Maybe MemberLogPublishingConfiguration
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe MemberFrameworkAttributes
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Member)
-> Parser (Maybe MemberStatus)
-> Parser
     (Maybe Text
      -> Maybe MemberLogPublishingConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe MemberFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Member)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MemberStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe MemberLogPublishingConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe MemberFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Member)
-> Parser (Maybe Text)
-> Parser
     (Maybe MemberLogPublishingConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe MemberFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Member)
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
"KmsKeyArn")
            Parser
  (Maybe MemberLogPublishingConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe MemberFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Member)
-> Parser (Maybe MemberLogPublishingConfiguration)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe MemberFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Member)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MemberLogPublishingConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LogPublishingConfiguration")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe MemberFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Member)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe MemberFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Member)
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
"Arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe MemberFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Member)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe MemberFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Member)
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
"NetworkId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe MemberFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Member)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe MemberFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Member)
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 Text
   -> Maybe POSIX
   -> Maybe MemberFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Member)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe MemberFrameworkAttributes
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Member)
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
"Id")
            Parser
  (Maybe POSIX
   -> Maybe MemberFrameworkAttributes
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Member)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe MemberFrameworkAttributes
      -> Maybe Text -> Maybe (HashMap Text Text) -> Member)
forall (f :: * -> *) a b. Applicative f => 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
"CreationDate")
            Parser
  (Maybe MemberFrameworkAttributes
   -> Maybe Text -> Maybe (HashMap Text Text) -> Member)
-> Parser (Maybe MemberFrameworkAttributes)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> Member)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MemberFrameworkAttributes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FrameworkAttributes")
            Parser (Maybe Text -> Maybe (HashMap Text Text) -> Member)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Member)
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 (HashMap Text Text) -> Member)
-> Parser (Maybe (HashMap Text Text)) -> Parser Member
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable Member

instance Prelude.NFData Member