{-# 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.Connect.Types.QuickConnect where
import Amazonka.Connect.Types.QuickConnectConfig
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
data QuickConnect = QuickConnect'
{
QuickConnect -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
QuickConnect -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
QuickConnect -> Maybe Text
quickConnectARN :: Prelude.Maybe Prelude.Text,
QuickConnect -> Maybe QuickConnectConfig
quickConnectConfig :: Prelude.Maybe QuickConnectConfig,
QuickConnect -> Maybe Text
quickConnectId :: Prelude.Maybe Prelude.Text,
QuickConnect -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (QuickConnect -> QuickConnect -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: QuickConnect -> QuickConnect -> Bool
$c/= :: QuickConnect -> QuickConnect -> Bool
== :: QuickConnect -> QuickConnect -> Bool
$c== :: QuickConnect -> QuickConnect -> Bool
Prelude.Eq, ReadPrec [QuickConnect]
ReadPrec QuickConnect
Int -> ReadS QuickConnect
ReadS [QuickConnect]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [QuickConnect]
$creadListPrec :: ReadPrec [QuickConnect]
readPrec :: ReadPrec QuickConnect
$creadPrec :: ReadPrec QuickConnect
readList :: ReadS [QuickConnect]
$creadList :: ReadS [QuickConnect]
readsPrec :: Int -> ReadS QuickConnect
$creadsPrec :: Int -> ReadS QuickConnect
Prelude.Read, Int -> QuickConnect -> ShowS
[QuickConnect] -> ShowS
QuickConnect -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [QuickConnect] -> ShowS
$cshowList :: [QuickConnect] -> ShowS
show :: QuickConnect -> String
$cshow :: QuickConnect -> String
showsPrec :: Int -> QuickConnect -> ShowS
$cshowsPrec :: Int -> QuickConnect -> ShowS
Prelude.Show, forall x. Rep QuickConnect x -> QuickConnect
forall x. QuickConnect -> Rep QuickConnect x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep QuickConnect x -> QuickConnect
$cfrom :: forall x. QuickConnect -> Rep QuickConnect x
Prelude.Generic)
newQuickConnect ::
QuickConnect
newQuickConnect :: QuickConnect
newQuickConnect =
QuickConnect'
{ $sel:description:QuickConnect' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:name:QuickConnect' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:quickConnectARN:QuickConnect' :: Maybe Text
quickConnectARN = forall a. Maybe a
Prelude.Nothing,
$sel:quickConnectConfig:QuickConnect' :: Maybe QuickConnectConfig
quickConnectConfig = forall a. Maybe a
Prelude.Nothing,
$sel:quickConnectId:QuickConnect' :: Maybe Text
quickConnectId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:QuickConnect' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
quickConnect_description :: Lens.Lens' QuickConnect (Prelude.Maybe Prelude.Text)
quickConnect_description :: Lens' QuickConnect (Maybe Text)
quickConnect_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnect' {Maybe Text
description :: Maybe Text
$sel:description:QuickConnect' :: QuickConnect -> Maybe Text
description} -> Maybe Text
description) (\s :: QuickConnect
s@QuickConnect' {} Maybe Text
a -> QuickConnect
s {$sel:description:QuickConnect' :: Maybe Text
description = Maybe Text
a} :: QuickConnect)
quickConnect_name :: Lens.Lens' QuickConnect (Prelude.Maybe Prelude.Text)
quickConnect_name :: Lens' QuickConnect (Maybe Text)
quickConnect_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnect' {Maybe Text
name :: Maybe Text
$sel:name:QuickConnect' :: QuickConnect -> Maybe Text
name} -> Maybe Text
name) (\s :: QuickConnect
s@QuickConnect' {} Maybe Text
a -> QuickConnect
s {$sel:name:QuickConnect' :: Maybe Text
name = Maybe Text
a} :: QuickConnect)
quickConnect_quickConnectARN :: Lens.Lens' QuickConnect (Prelude.Maybe Prelude.Text)
quickConnect_quickConnectARN :: Lens' QuickConnect (Maybe Text)
quickConnect_quickConnectARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnect' {Maybe Text
quickConnectARN :: Maybe Text
$sel:quickConnectARN:QuickConnect' :: QuickConnect -> Maybe Text
quickConnectARN} -> Maybe Text
quickConnectARN) (\s :: QuickConnect
s@QuickConnect' {} Maybe Text
a -> QuickConnect
s {$sel:quickConnectARN:QuickConnect' :: Maybe Text
quickConnectARN = Maybe Text
a} :: QuickConnect)
quickConnect_quickConnectConfig :: Lens.Lens' QuickConnect (Prelude.Maybe QuickConnectConfig)
quickConnect_quickConnectConfig :: Lens' QuickConnect (Maybe QuickConnectConfig)
quickConnect_quickConnectConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnect' {Maybe QuickConnectConfig
quickConnectConfig :: Maybe QuickConnectConfig
$sel:quickConnectConfig:QuickConnect' :: QuickConnect -> Maybe QuickConnectConfig
quickConnectConfig} -> Maybe QuickConnectConfig
quickConnectConfig) (\s :: QuickConnect
s@QuickConnect' {} Maybe QuickConnectConfig
a -> QuickConnect
s {$sel:quickConnectConfig:QuickConnect' :: Maybe QuickConnectConfig
quickConnectConfig = Maybe QuickConnectConfig
a} :: QuickConnect)
quickConnect_quickConnectId :: Lens.Lens' QuickConnect (Prelude.Maybe Prelude.Text)
quickConnect_quickConnectId :: Lens' QuickConnect (Maybe Text)
quickConnect_quickConnectId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnect' {Maybe Text
quickConnectId :: Maybe Text
$sel:quickConnectId:QuickConnect' :: QuickConnect -> Maybe Text
quickConnectId} -> Maybe Text
quickConnectId) (\s :: QuickConnect
s@QuickConnect' {} Maybe Text
a -> QuickConnect
s {$sel:quickConnectId:QuickConnect' :: Maybe Text
quickConnectId = Maybe Text
a} :: QuickConnect)
quickConnect_tags :: Lens.Lens' QuickConnect (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
quickConnect_tags :: Lens' QuickConnect (Maybe (HashMap Text Text))
quickConnect_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\QuickConnect' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:QuickConnect' :: QuickConnect -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: QuickConnect
s@QuickConnect' {} Maybe (HashMap Text Text)
a -> QuickConnect
s {$sel:tags:QuickConnect' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: QuickConnect) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON QuickConnect where
parseJSON :: Value -> Parser QuickConnect
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"QuickConnect"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe QuickConnectConfig
-> Maybe Text
-> Maybe (HashMap Text Text)
-> QuickConnect
QuickConnect'
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
"Description")
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
"Name")
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
"QuickConnectARN")
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
"QuickConnectConfig")
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
"QuickConnectId")
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
"Tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable QuickConnect where
hashWithSalt :: Int -> QuickConnect -> Int
hashWithSalt Int
_salt QuickConnect' {Maybe Text
Maybe (HashMap Text Text)
Maybe QuickConnectConfig
tags :: Maybe (HashMap Text Text)
quickConnectId :: Maybe Text
quickConnectConfig :: Maybe QuickConnectConfig
quickConnectARN :: Maybe Text
name :: Maybe Text
description :: Maybe Text
$sel:tags:QuickConnect' :: QuickConnect -> Maybe (HashMap Text Text)
$sel:quickConnectId:QuickConnect' :: QuickConnect -> Maybe Text
$sel:quickConnectConfig:QuickConnect' :: QuickConnect -> Maybe QuickConnectConfig
$sel:quickConnectARN:QuickConnect' :: QuickConnect -> Maybe Text
$sel:name:QuickConnect' :: QuickConnect -> Maybe Text
$sel:description:QuickConnect' :: QuickConnect -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
quickConnectARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe QuickConnectConfig
quickConnectConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
quickConnectId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData QuickConnect where
rnf :: QuickConnect -> ()
rnf QuickConnect' {Maybe Text
Maybe (HashMap Text Text)
Maybe QuickConnectConfig
tags :: Maybe (HashMap Text Text)
quickConnectId :: Maybe Text
quickConnectConfig :: Maybe QuickConnectConfig
quickConnectARN :: Maybe Text
name :: Maybe Text
description :: Maybe Text
$sel:tags:QuickConnect' :: QuickConnect -> Maybe (HashMap Text Text)
$sel:quickConnectId:QuickConnect' :: QuickConnect -> Maybe Text
$sel:quickConnectConfig:QuickConnect' :: QuickConnect -> Maybe QuickConnectConfig
$sel:quickConnectARN:QuickConnect' :: QuickConnect -> Maybe Text
$sel:name:QuickConnect' :: QuickConnect -> Maybe Text
$sel:description:QuickConnect' :: QuickConnect -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
quickConnectARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe QuickConnectConfig
quickConnectConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
quickConnectId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags