{-# 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.ConnectCases.Types.LayoutSummary
-- 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.ConnectCases.Types.LayoutSummary 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

-- | Object for the summarized details of the layout.
--
-- /See:/ 'newLayoutSummary' smart constructor.
data LayoutSummary = LayoutSummary'
  { -- | The Amazon Resource Name (ARN) of the layout.
    LayoutSummary -> Text
layoutArn :: Prelude.Text,
    -- | The unique identifier for of the layout.
    LayoutSummary -> Text
layoutId :: Prelude.Text,
    -- | The name of the layout.
    LayoutSummary -> Text
name :: Prelude.Text
  }
  deriving (LayoutSummary -> LayoutSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LayoutSummary -> LayoutSummary -> Bool
$c/= :: LayoutSummary -> LayoutSummary -> Bool
== :: LayoutSummary -> LayoutSummary -> Bool
$c== :: LayoutSummary -> LayoutSummary -> Bool
Prelude.Eq, ReadPrec [LayoutSummary]
ReadPrec LayoutSummary
Int -> ReadS LayoutSummary
ReadS [LayoutSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LayoutSummary]
$creadListPrec :: ReadPrec [LayoutSummary]
readPrec :: ReadPrec LayoutSummary
$creadPrec :: ReadPrec LayoutSummary
readList :: ReadS [LayoutSummary]
$creadList :: ReadS [LayoutSummary]
readsPrec :: Int -> ReadS LayoutSummary
$creadsPrec :: Int -> ReadS LayoutSummary
Prelude.Read, Int -> LayoutSummary -> ShowS
[LayoutSummary] -> ShowS
LayoutSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LayoutSummary] -> ShowS
$cshowList :: [LayoutSummary] -> ShowS
show :: LayoutSummary -> String
$cshow :: LayoutSummary -> String
showsPrec :: Int -> LayoutSummary -> ShowS
$cshowsPrec :: Int -> LayoutSummary -> ShowS
Prelude.Show, forall x. Rep LayoutSummary x -> LayoutSummary
forall x. LayoutSummary -> Rep LayoutSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LayoutSummary x -> LayoutSummary
$cfrom :: forall x. LayoutSummary -> Rep LayoutSummary x
Prelude.Generic)

-- |
-- Create a value of 'LayoutSummary' 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:
--
-- 'layoutArn', 'layoutSummary_layoutArn' - The Amazon Resource Name (ARN) of the layout.
--
-- 'layoutId', 'layoutSummary_layoutId' - The unique identifier for of the layout.
--
-- 'name', 'layoutSummary_name' - The name of the layout.
newLayoutSummary ::
  -- | 'layoutArn'
  Prelude.Text ->
  -- | 'layoutId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  LayoutSummary
newLayoutSummary :: Text -> Text -> Text -> LayoutSummary
newLayoutSummary Text
pLayoutArn_ Text
pLayoutId_ Text
pName_ =
  LayoutSummary'
    { $sel:layoutArn:LayoutSummary' :: Text
layoutArn = Text
pLayoutArn_,
      $sel:layoutId:LayoutSummary' :: Text
layoutId = Text
pLayoutId_,
      $sel:name:LayoutSummary' :: Text
name = Text
pName_
    }

-- | The Amazon Resource Name (ARN) of the layout.
layoutSummary_layoutArn :: Lens.Lens' LayoutSummary Prelude.Text
layoutSummary_layoutArn :: Lens' LayoutSummary Text
layoutSummary_layoutArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayoutSummary' {Text
layoutArn :: Text
$sel:layoutArn:LayoutSummary' :: LayoutSummary -> Text
layoutArn} -> Text
layoutArn) (\s :: LayoutSummary
s@LayoutSummary' {} Text
a -> LayoutSummary
s {$sel:layoutArn:LayoutSummary' :: Text
layoutArn = Text
a} :: LayoutSummary)

-- | The unique identifier for of the layout.
layoutSummary_layoutId :: Lens.Lens' LayoutSummary Prelude.Text
layoutSummary_layoutId :: Lens' LayoutSummary Text
layoutSummary_layoutId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayoutSummary' {Text
layoutId :: Text
$sel:layoutId:LayoutSummary' :: LayoutSummary -> Text
layoutId} -> Text
layoutId) (\s :: LayoutSummary
s@LayoutSummary' {} Text
a -> LayoutSummary
s {$sel:layoutId:LayoutSummary' :: Text
layoutId = Text
a} :: LayoutSummary)

-- | The name of the layout.
layoutSummary_name :: Lens.Lens' LayoutSummary Prelude.Text
layoutSummary_name :: Lens' LayoutSummary Text
layoutSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LayoutSummary' {Text
name :: Text
$sel:name:LayoutSummary' :: LayoutSummary -> Text
name} -> Text
name) (\s :: LayoutSummary
s@LayoutSummary' {} Text
a -> LayoutSummary
s {$sel:name:LayoutSummary' :: Text
name = Text
a} :: LayoutSummary)

instance Data.FromJSON LayoutSummary where
  parseJSON :: Value -> Parser LayoutSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"LayoutSummary"
      ( \Object
x ->
          Text -> Text -> Text -> LayoutSummary
LayoutSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"layoutArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"layoutId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
      )

instance Prelude.Hashable LayoutSummary where
  hashWithSalt :: Int -> LayoutSummary -> Int
hashWithSalt Int
_salt LayoutSummary' {Text
name :: Text
layoutId :: Text
layoutArn :: Text
$sel:name:LayoutSummary' :: LayoutSummary -> Text
$sel:layoutId:LayoutSummary' :: LayoutSummary -> Text
$sel:layoutArn:LayoutSummary' :: LayoutSummary -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
layoutArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
layoutId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData LayoutSummary where
  rnf :: LayoutSummary -> ()
rnf LayoutSummary' {Text
name :: Text
layoutId :: Text
layoutArn :: Text
$sel:name:LayoutSummary' :: LayoutSummary -> Text
$sel:layoutId:LayoutSummary' :: LayoutSummary -> Text
$sel:layoutArn:LayoutSummary' :: LayoutSummary -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
layoutArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
layoutId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name