{-# 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.WorkSpacesWeb.Types.UserAccessLoggingSettingsSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.WorkSpacesWeb.Types.UserAccessLoggingSettingsSummary where

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

-- | The summary of user access logging settings.
--
-- /See:/ 'newUserAccessLoggingSettingsSummary' smart constructor.
data UserAccessLoggingSettingsSummary = UserAccessLoggingSettingsSummary'
  { -- | The ARN of the Kinesis stream.
    UserAccessLoggingSettingsSummary -> Maybe Text
kinesisStreamArn :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the user access logging settings.
    UserAccessLoggingSettingsSummary -> Maybe Text
userAccessLoggingSettingsArn :: Prelude.Maybe Prelude.Text
  }
  deriving (UserAccessLoggingSettingsSummary
-> UserAccessLoggingSettingsSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserAccessLoggingSettingsSummary
-> UserAccessLoggingSettingsSummary -> Bool
$c/= :: UserAccessLoggingSettingsSummary
-> UserAccessLoggingSettingsSummary -> Bool
== :: UserAccessLoggingSettingsSummary
-> UserAccessLoggingSettingsSummary -> Bool
$c== :: UserAccessLoggingSettingsSummary
-> UserAccessLoggingSettingsSummary -> Bool
Prelude.Eq, ReadPrec [UserAccessLoggingSettingsSummary]
ReadPrec UserAccessLoggingSettingsSummary
Int -> ReadS UserAccessLoggingSettingsSummary
ReadS [UserAccessLoggingSettingsSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UserAccessLoggingSettingsSummary]
$creadListPrec :: ReadPrec [UserAccessLoggingSettingsSummary]
readPrec :: ReadPrec UserAccessLoggingSettingsSummary
$creadPrec :: ReadPrec UserAccessLoggingSettingsSummary
readList :: ReadS [UserAccessLoggingSettingsSummary]
$creadList :: ReadS [UserAccessLoggingSettingsSummary]
readsPrec :: Int -> ReadS UserAccessLoggingSettingsSummary
$creadsPrec :: Int -> ReadS UserAccessLoggingSettingsSummary
Prelude.Read, Int -> UserAccessLoggingSettingsSummary -> ShowS
[UserAccessLoggingSettingsSummary] -> ShowS
UserAccessLoggingSettingsSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserAccessLoggingSettingsSummary] -> ShowS
$cshowList :: [UserAccessLoggingSettingsSummary] -> ShowS
show :: UserAccessLoggingSettingsSummary -> String
$cshow :: UserAccessLoggingSettingsSummary -> String
showsPrec :: Int -> UserAccessLoggingSettingsSummary -> ShowS
$cshowsPrec :: Int -> UserAccessLoggingSettingsSummary -> ShowS
Prelude.Show, forall x.
Rep UserAccessLoggingSettingsSummary x
-> UserAccessLoggingSettingsSummary
forall x.
UserAccessLoggingSettingsSummary
-> Rep UserAccessLoggingSettingsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UserAccessLoggingSettingsSummary x
-> UserAccessLoggingSettingsSummary
$cfrom :: forall x.
UserAccessLoggingSettingsSummary
-> Rep UserAccessLoggingSettingsSummary x
Prelude.Generic)

-- |
-- Create a value of 'UserAccessLoggingSettingsSummary' 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:
--
-- 'kinesisStreamArn', 'userAccessLoggingSettingsSummary_kinesisStreamArn' - The ARN of the Kinesis stream.
--
-- 'userAccessLoggingSettingsArn', 'userAccessLoggingSettingsSummary_userAccessLoggingSettingsArn' - The ARN of the user access logging settings.
newUserAccessLoggingSettingsSummary ::
  UserAccessLoggingSettingsSummary
newUserAccessLoggingSettingsSummary :: UserAccessLoggingSettingsSummary
newUserAccessLoggingSettingsSummary =
  UserAccessLoggingSettingsSummary'
    { $sel:kinesisStreamArn:UserAccessLoggingSettingsSummary' :: Maybe Text
kinesisStreamArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:userAccessLoggingSettingsArn:UserAccessLoggingSettingsSummary' :: Maybe Text
userAccessLoggingSettingsArn =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the Kinesis stream.
userAccessLoggingSettingsSummary_kinesisStreamArn :: Lens.Lens' UserAccessLoggingSettingsSummary (Prelude.Maybe Prelude.Text)
userAccessLoggingSettingsSummary_kinesisStreamArn :: Lens' UserAccessLoggingSettingsSummary (Maybe Text)
userAccessLoggingSettingsSummary_kinesisStreamArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserAccessLoggingSettingsSummary' {Maybe Text
kinesisStreamArn :: Maybe Text
$sel:kinesisStreamArn:UserAccessLoggingSettingsSummary' :: UserAccessLoggingSettingsSummary -> Maybe Text
kinesisStreamArn} -> Maybe Text
kinesisStreamArn) (\s :: UserAccessLoggingSettingsSummary
s@UserAccessLoggingSettingsSummary' {} Maybe Text
a -> UserAccessLoggingSettingsSummary
s {$sel:kinesisStreamArn:UserAccessLoggingSettingsSummary' :: Maybe Text
kinesisStreamArn = Maybe Text
a} :: UserAccessLoggingSettingsSummary)

-- | The ARN of the user access logging settings.
userAccessLoggingSettingsSummary_userAccessLoggingSettingsArn :: Lens.Lens' UserAccessLoggingSettingsSummary (Prelude.Maybe Prelude.Text)
userAccessLoggingSettingsSummary_userAccessLoggingSettingsArn :: Lens' UserAccessLoggingSettingsSummary (Maybe Text)
userAccessLoggingSettingsSummary_userAccessLoggingSettingsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserAccessLoggingSettingsSummary' {Maybe Text
userAccessLoggingSettingsArn :: Maybe Text
$sel:userAccessLoggingSettingsArn:UserAccessLoggingSettingsSummary' :: UserAccessLoggingSettingsSummary -> Maybe Text
userAccessLoggingSettingsArn} -> Maybe Text
userAccessLoggingSettingsArn) (\s :: UserAccessLoggingSettingsSummary
s@UserAccessLoggingSettingsSummary' {} Maybe Text
a -> UserAccessLoggingSettingsSummary
s {$sel:userAccessLoggingSettingsArn:UserAccessLoggingSettingsSummary' :: Maybe Text
userAccessLoggingSettingsArn = Maybe Text
a} :: UserAccessLoggingSettingsSummary)

instance
  Data.FromJSON
    UserAccessLoggingSettingsSummary
  where
  parseJSON :: Value -> Parser UserAccessLoggingSettingsSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"UserAccessLoggingSettingsSummary"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> UserAccessLoggingSettingsSummary
UserAccessLoggingSettingsSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"kinesisStreamArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"userAccessLoggingSettingsArn")
      )

instance
  Prelude.Hashable
    UserAccessLoggingSettingsSummary
  where
  hashWithSalt :: Int -> UserAccessLoggingSettingsSummary -> Int
hashWithSalt
    Int
_salt
    UserAccessLoggingSettingsSummary' {Maybe Text
userAccessLoggingSettingsArn :: Maybe Text
kinesisStreamArn :: Maybe Text
$sel:userAccessLoggingSettingsArn:UserAccessLoggingSettingsSummary' :: UserAccessLoggingSettingsSummary -> Maybe Text
$sel:kinesisStreamArn:UserAccessLoggingSettingsSummary' :: UserAccessLoggingSettingsSummary -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kinesisStreamArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userAccessLoggingSettingsArn

instance
  Prelude.NFData
    UserAccessLoggingSettingsSummary
  where
  rnf :: UserAccessLoggingSettingsSummary -> ()
rnf UserAccessLoggingSettingsSummary' {Maybe Text
userAccessLoggingSettingsArn :: Maybe Text
kinesisStreamArn :: Maybe Text
$sel:userAccessLoggingSettingsArn:UserAccessLoggingSettingsSummary' :: UserAccessLoggingSettingsSummary -> Maybe Text
$sel:kinesisStreamArn:UserAccessLoggingSettingsSummary' :: UserAccessLoggingSettingsSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kinesisStreamArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userAccessLoggingSettingsArn