{-# 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.BrowserSettingsSummary
-- 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.BrowserSettingsSummary 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 for browser settings.
--
-- /See:/ 'newBrowserSettingsSummary' smart constructor.
data BrowserSettingsSummary = BrowserSettingsSummary'
  { -- | The ARN of the browser settings.
    BrowserSettingsSummary -> Maybe Text
browserSettingsArn :: Prelude.Maybe Prelude.Text
  }
  deriving (BrowserSettingsSummary -> BrowserSettingsSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BrowserSettingsSummary -> BrowserSettingsSummary -> Bool
$c/= :: BrowserSettingsSummary -> BrowserSettingsSummary -> Bool
== :: BrowserSettingsSummary -> BrowserSettingsSummary -> Bool
$c== :: BrowserSettingsSummary -> BrowserSettingsSummary -> Bool
Prelude.Eq, ReadPrec [BrowserSettingsSummary]
ReadPrec BrowserSettingsSummary
Int -> ReadS BrowserSettingsSummary
ReadS [BrowserSettingsSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BrowserSettingsSummary]
$creadListPrec :: ReadPrec [BrowserSettingsSummary]
readPrec :: ReadPrec BrowserSettingsSummary
$creadPrec :: ReadPrec BrowserSettingsSummary
readList :: ReadS [BrowserSettingsSummary]
$creadList :: ReadS [BrowserSettingsSummary]
readsPrec :: Int -> ReadS BrowserSettingsSummary
$creadsPrec :: Int -> ReadS BrowserSettingsSummary
Prelude.Read, Int -> BrowserSettingsSummary -> ShowS
[BrowserSettingsSummary] -> ShowS
BrowserSettingsSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BrowserSettingsSummary] -> ShowS
$cshowList :: [BrowserSettingsSummary] -> ShowS
show :: BrowserSettingsSummary -> String
$cshow :: BrowserSettingsSummary -> String
showsPrec :: Int -> BrowserSettingsSummary -> ShowS
$cshowsPrec :: Int -> BrowserSettingsSummary -> ShowS
Prelude.Show, forall x. Rep BrowserSettingsSummary x -> BrowserSettingsSummary
forall x. BrowserSettingsSummary -> Rep BrowserSettingsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BrowserSettingsSummary x -> BrowserSettingsSummary
$cfrom :: forall x. BrowserSettingsSummary -> Rep BrowserSettingsSummary x
Prelude.Generic)

-- |
-- Create a value of 'BrowserSettingsSummary' 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:
--
-- 'browserSettingsArn', 'browserSettingsSummary_browserSettingsArn' - The ARN of the browser settings.
newBrowserSettingsSummary ::
  BrowserSettingsSummary
newBrowserSettingsSummary :: BrowserSettingsSummary
newBrowserSettingsSummary =
  BrowserSettingsSummary'
    { $sel:browserSettingsArn:BrowserSettingsSummary' :: Maybe Text
browserSettingsArn =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the browser settings.
browserSettingsSummary_browserSettingsArn :: Lens.Lens' BrowserSettingsSummary (Prelude.Maybe Prelude.Text)
browserSettingsSummary_browserSettingsArn :: Lens' BrowserSettingsSummary (Maybe Text)
browserSettingsSummary_browserSettingsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BrowserSettingsSummary' {Maybe Text
browserSettingsArn :: Maybe Text
$sel:browserSettingsArn:BrowserSettingsSummary' :: BrowserSettingsSummary -> Maybe Text
browserSettingsArn} -> Maybe Text
browserSettingsArn) (\s :: BrowserSettingsSummary
s@BrowserSettingsSummary' {} Maybe Text
a -> BrowserSettingsSummary
s {$sel:browserSettingsArn:BrowserSettingsSummary' :: Maybe Text
browserSettingsArn = Maybe Text
a} :: BrowserSettingsSummary)

instance Data.FromJSON BrowserSettingsSummary where
  parseJSON :: Value -> Parser BrowserSettingsSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BrowserSettingsSummary"
      ( \Object
x ->
          Maybe Text -> BrowserSettingsSummary
BrowserSettingsSummary'
            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
"browserSettingsArn")
      )

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

instance Prelude.NFData BrowserSettingsSummary where
  rnf :: BrowserSettingsSummary -> ()
rnf BrowserSettingsSummary' {Maybe Text
browserSettingsArn :: Maybe Text
$sel:browserSettingsArn:BrowserSettingsSummary' :: BrowserSettingsSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
browserSettingsArn