{-# 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 #-}
module Amazonka.MediaConnect.Types.InterfaceRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InterfaceRequest = InterfaceRequest'
{
InterfaceRequest -> Text
name :: Prelude.Text
}
deriving (InterfaceRequest -> InterfaceRequest -> Bool
(InterfaceRequest -> InterfaceRequest -> Bool)
-> (InterfaceRequest -> InterfaceRequest -> Bool)
-> Eq InterfaceRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InterfaceRequest -> InterfaceRequest -> Bool
$c/= :: InterfaceRequest -> InterfaceRequest -> Bool
== :: InterfaceRequest -> InterfaceRequest -> Bool
$c== :: InterfaceRequest -> InterfaceRequest -> Bool
Prelude.Eq, ReadPrec [InterfaceRequest]
ReadPrec InterfaceRequest
Int -> ReadS InterfaceRequest
ReadS [InterfaceRequest]
(Int -> ReadS InterfaceRequest)
-> ReadS [InterfaceRequest]
-> ReadPrec InterfaceRequest
-> ReadPrec [InterfaceRequest]
-> Read InterfaceRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InterfaceRequest]
$creadListPrec :: ReadPrec [InterfaceRequest]
readPrec :: ReadPrec InterfaceRequest
$creadPrec :: ReadPrec InterfaceRequest
readList :: ReadS [InterfaceRequest]
$creadList :: ReadS [InterfaceRequest]
readsPrec :: Int -> ReadS InterfaceRequest
$creadsPrec :: Int -> ReadS InterfaceRequest
Prelude.Read, Int -> InterfaceRequest -> ShowS
[InterfaceRequest] -> ShowS
InterfaceRequest -> String
(Int -> InterfaceRequest -> ShowS)
-> (InterfaceRequest -> String)
-> ([InterfaceRequest] -> ShowS)
-> Show InterfaceRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InterfaceRequest] -> ShowS
$cshowList :: [InterfaceRequest] -> ShowS
show :: InterfaceRequest -> String
$cshow :: InterfaceRequest -> String
showsPrec :: Int -> InterfaceRequest -> ShowS
$cshowsPrec :: Int -> InterfaceRequest -> ShowS
Prelude.Show, (forall x. InterfaceRequest -> Rep InterfaceRequest x)
-> (forall x. Rep InterfaceRequest x -> InterfaceRequest)
-> Generic InterfaceRequest
forall x. Rep InterfaceRequest x -> InterfaceRequest
forall x. InterfaceRequest -> Rep InterfaceRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InterfaceRequest x -> InterfaceRequest
$cfrom :: forall x. InterfaceRequest -> Rep InterfaceRequest x
Prelude.Generic)
newInterfaceRequest ::
Prelude.Text ->
InterfaceRequest
newInterfaceRequest :: Text -> InterfaceRequest
newInterfaceRequest Text
pName_ =
InterfaceRequest' :: Text -> InterfaceRequest
InterfaceRequest' {$sel:name:InterfaceRequest' :: Text
name = Text
pName_}
interfaceRequest_name :: Lens.Lens' InterfaceRequest Prelude.Text
interfaceRequest_name :: (Text -> f Text) -> InterfaceRequest -> f InterfaceRequest
interfaceRequest_name = (InterfaceRequest -> Text)
-> (InterfaceRequest -> Text -> InterfaceRequest)
-> Lens InterfaceRequest InterfaceRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InterfaceRequest' {Text
name :: Text
$sel:name:InterfaceRequest' :: InterfaceRequest -> Text
name} -> Text
name) (\s :: InterfaceRequest
s@InterfaceRequest' {} Text
a -> InterfaceRequest
s {$sel:name:InterfaceRequest' :: Text
name = Text
a} :: InterfaceRequest)
instance Prelude.Hashable InterfaceRequest
instance Prelude.NFData InterfaceRequest
instance Core.ToJSON InterfaceRequest where
toJSON :: InterfaceRequest -> Value
toJSON InterfaceRequest' {Text
name :: Text
$sel:name:InterfaceRequest' :: InterfaceRequest -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
)