{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Chime.GetPhoneNumberSettings
(
GetPhoneNumberSettings (..),
newGetPhoneNumberSettings,
GetPhoneNumberSettingsResponse (..),
newGetPhoneNumberSettingsResponse,
getPhoneNumberSettingsResponse_callingName,
getPhoneNumberSettingsResponse_callingNameUpdatedTimestamp,
getPhoneNumberSettingsResponse_httpStatus,
)
where
import Amazonka.Chime.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetPhoneNumberSettings = GetPhoneNumberSettings'
{
}
deriving (GetPhoneNumberSettings -> GetPhoneNumberSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPhoneNumberSettings -> GetPhoneNumberSettings -> Bool
$c/= :: GetPhoneNumberSettings -> GetPhoneNumberSettings -> Bool
== :: GetPhoneNumberSettings -> GetPhoneNumberSettings -> Bool
$c== :: GetPhoneNumberSettings -> GetPhoneNumberSettings -> Bool
Prelude.Eq, ReadPrec [GetPhoneNumberSettings]
ReadPrec GetPhoneNumberSettings
Int -> ReadS GetPhoneNumberSettings
ReadS [GetPhoneNumberSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetPhoneNumberSettings]
$creadListPrec :: ReadPrec [GetPhoneNumberSettings]
readPrec :: ReadPrec GetPhoneNumberSettings
$creadPrec :: ReadPrec GetPhoneNumberSettings
readList :: ReadS [GetPhoneNumberSettings]
$creadList :: ReadS [GetPhoneNumberSettings]
readsPrec :: Int -> ReadS GetPhoneNumberSettings
$creadsPrec :: Int -> ReadS GetPhoneNumberSettings
Prelude.Read, Int -> GetPhoneNumberSettings -> ShowS
[GetPhoneNumberSettings] -> ShowS
GetPhoneNumberSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPhoneNumberSettings] -> ShowS
$cshowList :: [GetPhoneNumberSettings] -> ShowS
show :: GetPhoneNumberSettings -> String
$cshow :: GetPhoneNumberSettings -> String
showsPrec :: Int -> GetPhoneNumberSettings -> ShowS
$cshowsPrec :: Int -> GetPhoneNumberSettings -> ShowS
Prelude.Show, forall x. Rep GetPhoneNumberSettings x -> GetPhoneNumberSettings
forall x. GetPhoneNumberSettings -> Rep GetPhoneNumberSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetPhoneNumberSettings x -> GetPhoneNumberSettings
$cfrom :: forall x. GetPhoneNumberSettings -> Rep GetPhoneNumberSettings x
Prelude.Generic)
newGetPhoneNumberSettings ::
GetPhoneNumberSettings
newGetPhoneNumberSettings :: GetPhoneNumberSettings
newGetPhoneNumberSettings = GetPhoneNumberSettings
GetPhoneNumberSettings'
instance Core.AWSRequest GetPhoneNumberSettings where
type
AWSResponse GetPhoneNumberSettings =
GetPhoneNumberSettingsResponse
request :: (Service -> Service)
-> GetPhoneNumberSettings -> Request GetPhoneNumberSettings
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetPhoneNumberSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetPhoneNumberSettings)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe (Sensitive Text)
-> Maybe ISO8601 -> Int -> GetPhoneNumberSettingsResponse
GetPhoneNumberSettingsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CallingName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CallingNameUpdatedTimestamp")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable GetPhoneNumberSettings where
hashWithSalt :: Int -> GetPhoneNumberSettings -> Int
hashWithSalt Int
_salt GetPhoneNumberSettings
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData GetPhoneNumberSettings where
rnf :: GetPhoneNumberSettings -> ()
rnf GetPhoneNumberSettings
_ = ()
instance Data.ToHeaders GetPhoneNumberSettings where
toHeaders :: GetPhoneNumberSettings -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath GetPhoneNumberSettings where
toPath :: GetPhoneNumberSettings -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/settings/phone-number"
instance Data.ToQuery GetPhoneNumberSettings where
toQuery :: GetPhoneNumberSettings -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetPhoneNumberSettingsResponse = GetPhoneNumberSettingsResponse'
{
GetPhoneNumberSettingsResponse -> Maybe (Sensitive Text)
callingName :: Prelude.Maybe (Data.Sensitive Prelude.Text),
GetPhoneNumberSettingsResponse -> Maybe ISO8601
callingNameUpdatedTimestamp :: Prelude.Maybe Data.ISO8601,
GetPhoneNumberSettingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetPhoneNumberSettingsResponse
-> GetPhoneNumberSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetPhoneNumberSettingsResponse
-> GetPhoneNumberSettingsResponse -> Bool
$c/= :: GetPhoneNumberSettingsResponse
-> GetPhoneNumberSettingsResponse -> Bool
== :: GetPhoneNumberSettingsResponse
-> GetPhoneNumberSettingsResponse -> Bool
$c== :: GetPhoneNumberSettingsResponse
-> GetPhoneNumberSettingsResponse -> Bool
Prelude.Eq, Int -> GetPhoneNumberSettingsResponse -> ShowS
[GetPhoneNumberSettingsResponse] -> ShowS
GetPhoneNumberSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetPhoneNumberSettingsResponse] -> ShowS
$cshowList :: [GetPhoneNumberSettingsResponse] -> ShowS
show :: GetPhoneNumberSettingsResponse -> String
$cshow :: GetPhoneNumberSettingsResponse -> String
showsPrec :: Int -> GetPhoneNumberSettingsResponse -> ShowS
$cshowsPrec :: Int -> GetPhoneNumberSettingsResponse -> ShowS
Prelude.Show, forall x.
Rep GetPhoneNumberSettingsResponse x
-> GetPhoneNumberSettingsResponse
forall x.
GetPhoneNumberSettingsResponse
-> Rep GetPhoneNumberSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetPhoneNumberSettingsResponse x
-> GetPhoneNumberSettingsResponse
$cfrom :: forall x.
GetPhoneNumberSettingsResponse
-> Rep GetPhoneNumberSettingsResponse x
Prelude.Generic)
newGetPhoneNumberSettingsResponse ::
Prelude.Int ->
GetPhoneNumberSettingsResponse
newGetPhoneNumberSettingsResponse :: Int -> GetPhoneNumberSettingsResponse
newGetPhoneNumberSettingsResponse Int
pHttpStatus_ =
GetPhoneNumberSettingsResponse'
{ $sel:callingName:GetPhoneNumberSettingsResponse' :: Maybe (Sensitive Text)
callingName =
forall a. Maybe a
Prelude.Nothing,
$sel:callingNameUpdatedTimestamp:GetPhoneNumberSettingsResponse' :: Maybe ISO8601
callingNameUpdatedTimestamp =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetPhoneNumberSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getPhoneNumberSettingsResponse_callingName :: Lens.Lens' GetPhoneNumberSettingsResponse (Prelude.Maybe Prelude.Text)
getPhoneNumberSettingsResponse_callingName :: Lens' GetPhoneNumberSettingsResponse (Maybe Text)
getPhoneNumberSettingsResponse_callingName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPhoneNumberSettingsResponse' {Maybe (Sensitive Text)
callingName :: Maybe (Sensitive Text)
$sel:callingName:GetPhoneNumberSettingsResponse' :: GetPhoneNumberSettingsResponse -> Maybe (Sensitive Text)
callingName} -> Maybe (Sensitive Text)
callingName) (\s :: GetPhoneNumberSettingsResponse
s@GetPhoneNumberSettingsResponse' {} Maybe (Sensitive Text)
a -> GetPhoneNumberSettingsResponse
s {$sel:callingName:GetPhoneNumberSettingsResponse' :: Maybe (Sensitive Text)
callingName = Maybe (Sensitive Text)
a} :: GetPhoneNumberSettingsResponse) 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 a. Iso' (Sensitive a) a
Data._Sensitive
getPhoneNumberSettingsResponse_callingNameUpdatedTimestamp :: Lens.Lens' GetPhoneNumberSettingsResponse (Prelude.Maybe Prelude.UTCTime)
getPhoneNumberSettingsResponse_callingNameUpdatedTimestamp :: Lens' GetPhoneNumberSettingsResponse (Maybe UTCTime)
getPhoneNumberSettingsResponse_callingNameUpdatedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPhoneNumberSettingsResponse' {Maybe ISO8601
callingNameUpdatedTimestamp :: Maybe ISO8601
$sel:callingNameUpdatedTimestamp:GetPhoneNumberSettingsResponse' :: GetPhoneNumberSettingsResponse -> Maybe ISO8601
callingNameUpdatedTimestamp} -> Maybe ISO8601
callingNameUpdatedTimestamp) (\s :: GetPhoneNumberSettingsResponse
s@GetPhoneNumberSettingsResponse' {} Maybe ISO8601
a -> GetPhoneNumberSettingsResponse
s {$sel:callingNameUpdatedTimestamp:GetPhoneNumberSettingsResponse' :: Maybe ISO8601
callingNameUpdatedTimestamp = Maybe ISO8601
a} :: GetPhoneNumberSettingsResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
getPhoneNumberSettingsResponse_httpStatus :: Lens.Lens' GetPhoneNumberSettingsResponse Prelude.Int
getPhoneNumberSettingsResponse_httpStatus :: Lens' GetPhoneNumberSettingsResponse Int
getPhoneNumberSettingsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetPhoneNumberSettingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetPhoneNumberSettingsResponse' :: GetPhoneNumberSettingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetPhoneNumberSettingsResponse
s@GetPhoneNumberSettingsResponse' {} Int
a -> GetPhoneNumberSettingsResponse
s {$sel:httpStatus:GetPhoneNumberSettingsResponse' :: Int
httpStatus = Int
a} :: GetPhoneNumberSettingsResponse)
instance
Prelude.NFData
GetPhoneNumberSettingsResponse
where
rnf :: GetPhoneNumberSettingsResponse -> ()
rnf GetPhoneNumberSettingsResponse' {Int
Maybe (Sensitive Text)
Maybe ISO8601
httpStatus :: Int
callingNameUpdatedTimestamp :: Maybe ISO8601
callingName :: Maybe (Sensitive Text)
$sel:httpStatus:GetPhoneNumberSettingsResponse' :: GetPhoneNumberSettingsResponse -> Int
$sel:callingNameUpdatedTimestamp:GetPhoneNumberSettingsResponse' :: GetPhoneNumberSettingsResponse -> Maybe ISO8601
$sel:callingName:GetPhoneNumberSettingsResponse' :: GetPhoneNumberSettingsResponse -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
callingName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
callingNameUpdatedTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus