{-# 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.KinesisVideo.Types.MappedResourceConfigurationListItem
-- 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.KinesisVideo.Types.MappedResourceConfigurationListItem 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

-- | A structure that encapsulates, or contains, the media storage
-- configuration properties.
--
-- /See:/ 'newMappedResourceConfigurationListItem' smart constructor.
data MappedResourceConfigurationListItem = MappedResourceConfigurationListItem'
  { -- | The Amazon Resource Name (ARN) of the Kinesis Video Stream resource,
    -- associated with the stream.
    MappedResourceConfigurationListItem -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The type of the associated resource for the kinesis video stream.
    MappedResourceConfigurationListItem -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
  }
  deriving (MappedResourceConfigurationListItem
-> MappedResourceConfigurationListItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MappedResourceConfigurationListItem
-> MappedResourceConfigurationListItem -> Bool
$c/= :: MappedResourceConfigurationListItem
-> MappedResourceConfigurationListItem -> Bool
== :: MappedResourceConfigurationListItem
-> MappedResourceConfigurationListItem -> Bool
$c== :: MappedResourceConfigurationListItem
-> MappedResourceConfigurationListItem -> Bool
Prelude.Eq, ReadPrec [MappedResourceConfigurationListItem]
ReadPrec MappedResourceConfigurationListItem
Int -> ReadS MappedResourceConfigurationListItem
ReadS [MappedResourceConfigurationListItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MappedResourceConfigurationListItem]
$creadListPrec :: ReadPrec [MappedResourceConfigurationListItem]
readPrec :: ReadPrec MappedResourceConfigurationListItem
$creadPrec :: ReadPrec MappedResourceConfigurationListItem
readList :: ReadS [MappedResourceConfigurationListItem]
$creadList :: ReadS [MappedResourceConfigurationListItem]
readsPrec :: Int -> ReadS MappedResourceConfigurationListItem
$creadsPrec :: Int -> ReadS MappedResourceConfigurationListItem
Prelude.Read, Int -> MappedResourceConfigurationListItem -> ShowS
[MappedResourceConfigurationListItem] -> ShowS
MappedResourceConfigurationListItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MappedResourceConfigurationListItem] -> ShowS
$cshowList :: [MappedResourceConfigurationListItem] -> ShowS
show :: MappedResourceConfigurationListItem -> String
$cshow :: MappedResourceConfigurationListItem -> String
showsPrec :: Int -> MappedResourceConfigurationListItem -> ShowS
$cshowsPrec :: Int -> MappedResourceConfigurationListItem -> ShowS
Prelude.Show, forall x.
Rep MappedResourceConfigurationListItem x
-> MappedResourceConfigurationListItem
forall x.
MappedResourceConfigurationListItem
-> Rep MappedResourceConfigurationListItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MappedResourceConfigurationListItem x
-> MappedResourceConfigurationListItem
$cfrom :: forall x.
MappedResourceConfigurationListItem
-> Rep MappedResourceConfigurationListItem x
Prelude.Generic)

-- |
-- Create a value of 'MappedResourceConfigurationListItem' 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:
--
-- 'arn', 'mappedResourceConfigurationListItem_arn' - The Amazon Resource Name (ARN) of the Kinesis Video Stream resource,
-- associated with the stream.
--
-- 'type'', 'mappedResourceConfigurationListItem_type' - The type of the associated resource for the kinesis video stream.
newMappedResourceConfigurationListItem ::
  MappedResourceConfigurationListItem
newMappedResourceConfigurationListItem :: MappedResourceConfigurationListItem
newMappedResourceConfigurationListItem =
  MappedResourceConfigurationListItem'
    { $sel:arn:MappedResourceConfigurationListItem' :: Maybe Text
arn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:type':MappedResourceConfigurationListItem' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the Kinesis Video Stream resource,
-- associated with the stream.
mappedResourceConfigurationListItem_arn :: Lens.Lens' MappedResourceConfigurationListItem (Prelude.Maybe Prelude.Text)
mappedResourceConfigurationListItem_arn :: Lens' MappedResourceConfigurationListItem (Maybe Text)
mappedResourceConfigurationListItem_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MappedResourceConfigurationListItem' {Maybe Text
arn :: Maybe Text
$sel:arn:MappedResourceConfigurationListItem' :: MappedResourceConfigurationListItem -> Maybe Text
arn} -> Maybe Text
arn) (\s :: MappedResourceConfigurationListItem
s@MappedResourceConfigurationListItem' {} Maybe Text
a -> MappedResourceConfigurationListItem
s {$sel:arn:MappedResourceConfigurationListItem' :: Maybe Text
arn = Maybe Text
a} :: MappedResourceConfigurationListItem)

-- | The type of the associated resource for the kinesis video stream.
mappedResourceConfigurationListItem_type :: Lens.Lens' MappedResourceConfigurationListItem (Prelude.Maybe Prelude.Text)
mappedResourceConfigurationListItem_type :: Lens' MappedResourceConfigurationListItem (Maybe Text)
mappedResourceConfigurationListItem_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MappedResourceConfigurationListItem' {Maybe Text
type' :: Maybe Text
$sel:type':MappedResourceConfigurationListItem' :: MappedResourceConfigurationListItem -> Maybe Text
type'} -> Maybe Text
type') (\s :: MappedResourceConfigurationListItem
s@MappedResourceConfigurationListItem' {} Maybe Text
a -> MappedResourceConfigurationListItem
s {$sel:type':MappedResourceConfigurationListItem' :: Maybe Text
type' = Maybe Text
a} :: MappedResourceConfigurationListItem)

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

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

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