{-# 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.DataBrew.UpdateProfileJob
(
UpdateProfileJob (..),
newUpdateProfileJob,
updateProfileJob_encryptionMode,
updateProfileJob_logSubscription,
updateProfileJob_maxRetries,
updateProfileJob_encryptionKeyArn,
updateProfileJob_maxCapacity,
updateProfileJob_configuration,
updateProfileJob_timeout,
updateProfileJob_jobSample,
updateProfileJob_name,
updateProfileJob_outputLocation,
updateProfileJob_roleArn,
UpdateProfileJobResponse (..),
newUpdateProfileJobResponse,
updateProfileJobResponse_httpStatus,
updateProfileJobResponse_name,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DataBrew.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateProfileJob = UpdateProfileJob'
{
UpdateProfileJob -> Maybe EncryptionMode
encryptionMode :: Prelude.Maybe EncryptionMode,
UpdateProfileJob -> Maybe LogSubscription
logSubscription :: Prelude.Maybe LogSubscription,
UpdateProfileJob -> Maybe Natural
maxRetries :: Prelude.Maybe Prelude.Natural,
UpdateProfileJob -> Maybe Text
encryptionKeyArn :: Prelude.Maybe Prelude.Text,
UpdateProfileJob -> Maybe Int
maxCapacity :: Prelude.Maybe Prelude.Int,
UpdateProfileJob -> Maybe ProfileConfiguration
configuration :: Prelude.Maybe ProfileConfiguration,
UpdateProfileJob -> Maybe Natural
timeout :: Prelude.Maybe Prelude.Natural,
UpdateProfileJob -> Maybe JobSample
jobSample :: Prelude.Maybe JobSample,
UpdateProfileJob -> Text
name :: Prelude.Text,
UpdateProfileJob -> S3Location
outputLocation :: S3Location,
UpdateProfileJob -> Text
roleArn :: Prelude.Text
}
deriving (UpdateProfileJob -> UpdateProfileJob -> Bool
(UpdateProfileJob -> UpdateProfileJob -> Bool)
-> (UpdateProfileJob -> UpdateProfileJob -> Bool)
-> Eq UpdateProfileJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProfileJob -> UpdateProfileJob -> Bool
$c/= :: UpdateProfileJob -> UpdateProfileJob -> Bool
== :: UpdateProfileJob -> UpdateProfileJob -> Bool
$c== :: UpdateProfileJob -> UpdateProfileJob -> Bool
Prelude.Eq, ReadPrec [UpdateProfileJob]
ReadPrec UpdateProfileJob
Int -> ReadS UpdateProfileJob
ReadS [UpdateProfileJob]
(Int -> ReadS UpdateProfileJob)
-> ReadS [UpdateProfileJob]
-> ReadPrec UpdateProfileJob
-> ReadPrec [UpdateProfileJob]
-> Read UpdateProfileJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProfileJob]
$creadListPrec :: ReadPrec [UpdateProfileJob]
readPrec :: ReadPrec UpdateProfileJob
$creadPrec :: ReadPrec UpdateProfileJob
readList :: ReadS [UpdateProfileJob]
$creadList :: ReadS [UpdateProfileJob]
readsPrec :: Int -> ReadS UpdateProfileJob
$creadsPrec :: Int -> ReadS UpdateProfileJob
Prelude.Read, Int -> UpdateProfileJob -> ShowS
[UpdateProfileJob] -> ShowS
UpdateProfileJob -> String
(Int -> UpdateProfileJob -> ShowS)
-> (UpdateProfileJob -> String)
-> ([UpdateProfileJob] -> ShowS)
-> Show UpdateProfileJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProfileJob] -> ShowS
$cshowList :: [UpdateProfileJob] -> ShowS
show :: UpdateProfileJob -> String
$cshow :: UpdateProfileJob -> String
showsPrec :: Int -> UpdateProfileJob -> ShowS
$cshowsPrec :: Int -> UpdateProfileJob -> ShowS
Prelude.Show, (forall x. UpdateProfileJob -> Rep UpdateProfileJob x)
-> (forall x. Rep UpdateProfileJob x -> UpdateProfileJob)
-> Generic UpdateProfileJob
forall x. Rep UpdateProfileJob x -> UpdateProfileJob
forall x. UpdateProfileJob -> Rep UpdateProfileJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateProfileJob x -> UpdateProfileJob
$cfrom :: forall x. UpdateProfileJob -> Rep UpdateProfileJob x
Prelude.Generic)
newUpdateProfileJob ::
Prelude.Text ->
S3Location ->
Prelude.Text ->
UpdateProfileJob
newUpdateProfileJob :: Text -> S3Location -> Text -> UpdateProfileJob
newUpdateProfileJob Text
pName_ S3Location
pOutputLocation_ Text
pRoleArn_ =
UpdateProfileJob' :: Maybe EncryptionMode
-> Maybe LogSubscription
-> Maybe Natural
-> Maybe Text
-> Maybe Int
-> Maybe ProfileConfiguration
-> Maybe Natural
-> Maybe JobSample
-> Text
-> S3Location
-> Text
-> UpdateProfileJob
UpdateProfileJob'
{ $sel:encryptionMode:UpdateProfileJob' :: Maybe EncryptionMode
encryptionMode = Maybe EncryptionMode
forall a. Maybe a
Prelude.Nothing,
$sel:logSubscription:UpdateProfileJob' :: Maybe LogSubscription
logSubscription = Maybe LogSubscription
forall a. Maybe a
Prelude.Nothing,
$sel:maxRetries:UpdateProfileJob' :: Maybe Natural
maxRetries = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionKeyArn:UpdateProfileJob' :: Maybe Text
encryptionKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxCapacity:UpdateProfileJob' :: Maybe Int
maxCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:UpdateProfileJob' :: Maybe ProfileConfiguration
configuration = Maybe ProfileConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:timeout:UpdateProfileJob' :: Maybe Natural
timeout = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:jobSample:UpdateProfileJob' :: Maybe JobSample
jobSample = Maybe JobSample
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateProfileJob' :: Text
name = Text
pName_,
$sel:outputLocation:UpdateProfileJob' :: S3Location
outputLocation = S3Location
pOutputLocation_,
$sel:roleArn:UpdateProfileJob' :: Text
roleArn = Text
pRoleArn_
}
updateProfileJob_encryptionMode :: Lens.Lens' UpdateProfileJob (Prelude.Maybe EncryptionMode)
updateProfileJob_encryptionMode :: (Maybe EncryptionMode -> f (Maybe EncryptionMode))
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_encryptionMode = (UpdateProfileJob -> Maybe EncryptionMode)
-> (UpdateProfileJob -> Maybe EncryptionMode -> UpdateProfileJob)
-> Lens
UpdateProfileJob
UpdateProfileJob
(Maybe EncryptionMode)
(Maybe EncryptionMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Maybe EncryptionMode
encryptionMode :: Maybe EncryptionMode
$sel:encryptionMode:UpdateProfileJob' :: UpdateProfileJob -> Maybe EncryptionMode
encryptionMode} -> Maybe EncryptionMode
encryptionMode) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Maybe EncryptionMode
a -> UpdateProfileJob
s {$sel:encryptionMode:UpdateProfileJob' :: Maybe EncryptionMode
encryptionMode = Maybe EncryptionMode
a} :: UpdateProfileJob)
updateProfileJob_logSubscription :: Lens.Lens' UpdateProfileJob (Prelude.Maybe LogSubscription)
updateProfileJob_logSubscription :: (Maybe LogSubscription -> f (Maybe LogSubscription))
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_logSubscription = (UpdateProfileJob -> Maybe LogSubscription)
-> (UpdateProfileJob -> Maybe LogSubscription -> UpdateProfileJob)
-> Lens
UpdateProfileJob
UpdateProfileJob
(Maybe LogSubscription)
(Maybe LogSubscription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Maybe LogSubscription
logSubscription :: Maybe LogSubscription
$sel:logSubscription:UpdateProfileJob' :: UpdateProfileJob -> Maybe LogSubscription
logSubscription} -> Maybe LogSubscription
logSubscription) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Maybe LogSubscription
a -> UpdateProfileJob
s {$sel:logSubscription:UpdateProfileJob' :: Maybe LogSubscription
logSubscription = Maybe LogSubscription
a} :: UpdateProfileJob)
updateProfileJob_maxRetries :: Lens.Lens' UpdateProfileJob (Prelude.Maybe Prelude.Natural)
updateProfileJob_maxRetries :: (Maybe Natural -> f (Maybe Natural))
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_maxRetries = (UpdateProfileJob -> Maybe Natural)
-> (UpdateProfileJob -> Maybe Natural -> UpdateProfileJob)
-> Lens
UpdateProfileJob UpdateProfileJob (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Maybe Natural
maxRetries :: Maybe Natural
$sel:maxRetries:UpdateProfileJob' :: UpdateProfileJob -> Maybe Natural
maxRetries} -> Maybe Natural
maxRetries) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Maybe Natural
a -> UpdateProfileJob
s {$sel:maxRetries:UpdateProfileJob' :: Maybe Natural
maxRetries = Maybe Natural
a} :: UpdateProfileJob)
updateProfileJob_encryptionKeyArn :: Lens.Lens' UpdateProfileJob (Prelude.Maybe Prelude.Text)
updateProfileJob_encryptionKeyArn :: (Maybe Text -> f (Maybe Text))
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_encryptionKeyArn = (UpdateProfileJob -> Maybe Text)
-> (UpdateProfileJob -> Maybe Text -> UpdateProfileJob)
-> Lens UpdateProfileJob UpdateProfileJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Maybe Text
encryptionKeyArn :: Maybe Text
$sel:encryptionKeyArn:UpdateProfileJob' :: UpdateProfileJob -> Maybe Text
encryptionKeyArn} -> Maybe Text
encryptionKeyArn) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Maybe Text
a -> UpdateProfileJob
s {$sel:encryptionKeyArn:UpdateProfileJob' :: Maybe Text
encryptionKeyArn = Maybe Text
a} :: UpdateProfileJob)
updateProfileJob_maxCapacity :: Lens.Lens' UpdateProfileJob (Prelude.Maybe Prelude.Int)
updateProfileJob_maxCapacity :: (Maybe Int -> f (Maybe Int))
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_maxCapacity = (UpdateProfileJob -> Maybe Int)
-> (UpdateProfileJob -> Maybe Int -> UpdateProfileJob)
-> Lens UpdateProfileJob UpdateProfileJob (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Maybe Int
maxCapacity :: Maybe Int
$sel:maxCapacity:UpdateProfileJob' :: UpdateProfileJob -> Maybe Int
maxCapacity} -> Maybe Int
maxCapacity) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Maybe Int
a -> UpdateProfileJob
s {$sel:maxCapacity:UpdateProfileJob' :: Maybe Int
maxCapacity = Maybe Int
a} :: UpdateProfileJob)
updateProfileJob_configuration :: Lens.Lens' UpdateProfileJob (Prelude.Maybe ProfileConfiguration)
updateProfileJob_configuration :: (Maybe ProfileConfiguration -> f (Maybe ProfileConfiguration))
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_configuration = (UpdateProfileJob -> Maybe ProfileConfiguration)
-> (UpdateProfileJob
-> Maybe ProfileConfiguration -> UpdateProfileJob)
-> Lens
UpdateProfileJob
UpdateProfileJob
(Maybe ProfileConfiguration)
(Maybe ProfileConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Maybe ProfileConfiguration
configuration :: Maybe ProfileConfiguration
$sel:configuration:UpdateProfileJob' :: UpdateProfileJob -> Maybe ProfileConfiguration
configuration} -> Maybe ProfileConfiguration
configuration) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Maybe ProfileConfiguration
a -> UpdateProfileJob
s {$sel:configuration:UpdateProfileJob' :: Maybe ProfileConfiguration
configuration = Maybe ProfileConfiguration
a} :: UpdateProfileJob)
updateProfileJob_timeout :: Lens.Lens' UpdateProfileJob (Prelude.Maybe Prelude.Natural)
updateProfileJob_timeout :: (Maybe Natural -> f (Maybe Natural))
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_timeout = (UpdateProfileJob -> Maybe Natural)
-> (UpdateProfileJob -> Maybe Natural -> UpdateProfileJob)
-> Lens
UpdateProfileJob UpdateProfileJob (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Maybe Natural
timeout :: Maybe Natural
$sel:timeout:UpdateProfileJob' :: UpdateProfileJob -> Maybe Natural
timeout} -> Maybe Natural
timeout) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Maybe Natural
a -> UpdateProfileJob
s {$sel:timeout:UpdateProfileJob' :: Maybe Natural
timeout = Maybe Natural
a} :: UpdateProfileJob)
updateProfileJob_jobSample :: Lens.Lens' UpdateProfileJob (Prelude.Maybe JobSample)
updateProfileJob_jobSample :: (Maybe JobSample -> f (Maybe JobSample))
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_jobSample = (UpdateProfileJob -> Maybe JobSample)
-> (UpdateProfileJob -> Maybe JobSample -> UpdateProfileJob)
-> Lens
UpdateProfileJob
UpdateProfileJob
(Maybe JobSample)
(Maybe JobSample)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Maybe JobSample
jobSample :: Maybe JobSample
$sel:jobSample:UpdateProfileJob' :: UpdateProfileJob -> Maybe JobSample
jobSample} -> Maybe JobSample
jobSample) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Maybe JobSample
a -> UpdateProfileJob
s {$sel:jobSample:UpdateProfileJob' :: Maybe JobSample
jobSample = Maybe JobSample
a} :: UpdateProfileJob)
updateProfileJob_name :: Lens.Lens' UpdateProfileJob Prelude.Text
updateProfileJob_name :: (Text -> f Text) -> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_name = (UpdateProfileJob -> Text)
-> (UpdateProfileJob -> Text -> UpdateProfileJob)
-> Lens UpdateProfileJob UpdateProfileJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Text
name :: Text
$sel:name:UpdateProfileJob' :: UpdateProfileJob -> Text
name} -> Text
name) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Text
a -> UpdateProfileJob
s {$sel:name:UpdateProfileJob' :: Text
name = Text
a} :: UpdateProfileJob)
updateProfileJob_outputLocation :: Lens.Lens' UpdateProfileJob S3Location
updateProfileJob_outputLocation :: (S3Location -> f S3Location)
-> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_outputLocation = (UpdateProfileJob -> S3Location)
-> (UpdateProfileJob -> S3Location -> UpdateProfileJob)
-> Lens UpdateProfileJob UpdateProfileJob S3Location S3Location
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {S3Location
outputLocation :: S3Location
$sel:outputLocation:UpdateProfileJob' :: UpdateProfileJob -> S3Location
outputLocation} -> S3Location
outputLocation) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} S3Location
a -> UpdateProfileJob
s {$sel:outputLocation:UpdateProfileJob' :: S3Location
outputLocation = S3Location
a} :: UpdateProfileJob)
updateProfileJob_roleArn :: Lens.Lens' UpdateProfileJob Prelude.Text
updateProfileJob_roleArn :: (Text -> f Text) -> UpdateProfileJob -> f UpdateProfileJob
updateProfileJob_roleArn = (UpdateProfileJob -> Text)
-> (UpdateProfileJob -> Text -> UpdateProfileJob)
-> Lens UpdateProfileJob UpdateProfileJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJob' {Text
roleArn :: Text
$sel:roleArn:UpdateProfileJob' :: UpdateProfileJob -> Text
roleArn} -> Text
roleArn) (\s :: UpdateProfileJob
s@UpdateProfileJob' {} Text
a -> UpdateProfileJob
s {$sel:roleArn:UpdateProfileJob' :: Text
roleArn = Text
a} :: UpdateProfileJob)
instance Core.AWSRequest UpdateProfileJob where
type
AWSResponse UpdateProfileJob =
UpdateProfileJobResponse
request :: UpdateProfileJob -> Request UpdateProfileJob
request = Service -> UpdateProfileJob -> Request UpdateProfileJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateProfileJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateProfileJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateProfileJob))
-> Logger
-> Service
-> Proxy UpdateProfileJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateProfileJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Text -> UpdateProfileJobResponse
UpdateProfileJobResponse'
(Int -> Text -> UpdateProfileJobResponse)
-> Either String Int
-> Either String (Text -> UpdateProfileJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (Text -> UpdateProfileJobResponse)
-> Either String Text -> Either String UpdateProfileJobResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Name")
)
instance Prelude.Hashable UpdateProfileJob
instance Prelude.NFData UpdateProfileJob
instance Core.ToHeaders UpdateProfileJob where
toHeaders :: UpdateProfileJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateProfileJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateProfileJob where
toJSON :: UpdateProfileJob -> Value
toJSON UpdateProfileJob' {Maybe Int
Maybe Natural
Maybe Text
Maybe EncryptionMode
Maybe LogSubscription
Maybe JobSample
Maybe ProfileConfiguration
Text
S3Location
roleArn :: Text
outputLocation :: S3Location
name :: Text
jobSample :: Maybe JobSample
timeout :: Maybe Natural
configuration :: Maybe ProfileConfiguration
maxCapacity :: Maybe Int
encryptionKeyArn :: Maybe Text
maxRetries :: Maybe Natural
logSubscription :: Maybe LogSubscription
encryptionMode :: Maybe EncryptionMode
$sel:roleArn:UpdateProfileJob' :: UpdateProfileJob -> Text
$sel:outputLocation:UpdateProfileJob' :: UpdateProfileJob -> S3Location
$sel:name:UpdateProfileJob' :: UpdateProfileJob -> Text
$sel:jobSample:UpdateProfileJob' :: UpdateProfileJob -> Maybe JobSample
$sel:timeout:UpdateProfileJob' :: UpdateProfileJob -> Maybe Natural
$sel:configuration:UpdateProfileJob' :: UpdateProfileJob -> Maybe ProfileConfiguration
$sel:maxCapacity:UpdateProfileJob' :: UpdateProfileJob -> Maybe Int
$sel:encryptionKeyArn:UpdateProfileJob' :: UpdateProfileJob -> Maybe Text
$sel:maxRetries:UpdateProfileJob' :: UpdateProfileJob -> Maybe Natural
$sel:logSubscription:UpdateProfileJob' :: UpdateProfileJob -> Maybe LogSubscription
$sel:encryptionMode:UpdateProfileJob' :: UpdateProfileJob -> Maybe EncryptionMode
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"EncryptionMode" Text -> EncryptionMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EncryptionMode -> Pair) -> Maybe EncryptionMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionMode
encryptionMode,
(Text
"LogSubscription" Text -> LogSubscription -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LogSubscription -> Pair) -> Maybe LogSubscription -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LogSubscription
logSubscription,
(Text
"MaxRetries" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxRetries,
(Text
"EncryptionKeyArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
encryptionKeyArn,
(Text
"MaxCapacity" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxCapacity,
(Text
"Configuration" Text -> ProfileConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ProfileConfiguration -> Pair)
-> Maybe ProfileConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProfileConfiguration
configuration,
(Text
"Timeout" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeout,
(Text
"JobSample" Text -> JobSample -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JobSample -> Pair) -> Maybe JobSample -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobSample
jobSample,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"OutputLocation" Text -> S3Location -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3Location
outputLocation),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn)
]
)
instance Core.ToPath UpdateProfileJob where
toPath :: UpdateProfileJob -> ByteString
toPath UpdateProfileJob' {Maybe Int
Maybe Natural
Maybe Text
Maybe EncryptionMode
Maybe LogSubscription
Maybe JobSample
Maybe ProfileConfiguration
Text
S3Location
roleArn :: Text
outputLocation :: S3Location
name :: Text
jobSample :: Maybe JobSample
timeout :: Maybe Natural
configuration :: Maybe ProfileConfiguration
maxCapacity :: Maybe Int
encryptionKeyArn :: Maybe Text
maxRetries :: Maybe Natural
logSubscription :: Maybe LogSubscription
encryptionMode :: Maybe EncryptionMode
$sel:roleArn:UpdateProfileJob' :: UpdateProfileJob -> Text
$sel:outputLocation:UpdateProfileJob' :: UpdateProfileJob -> S3Location
$sel:name:UpdateProfileJob' :: UpdateProfileJob -> Text
$sel:jobSample:UpdateProfileJob' :: UpdateProfileJob -> Maybe JobSample
$sel:timeout:UpdateProfileJob' :: UpdateProfileJob -> Maybe Natural
$sel:configuration:UpdateProfileJob' :: UpdateProfileJob -> Maybe ProfileConfiguration
$sel:maxCapacity:UpdateProfileJob' :: UpdateProfileJob -> Maybe Int
$sel:encryptionKeyArn:UpdateProfileJob' :: UpdateProfileJob -> Maybe Text
$sel:maxRetries:UpdateProfileJob' :: UpdateProfileJob -> Maybe Natural
$sel:logSubscription:UpdateProfileJob' :: UpdateProfileJob -> Maybe LogSubscription
$sel:encryptionMode:UpdateProfileJob' :: UpdateProfileJob -> Maybe EncryptionMode
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/profileJobs/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]
instance Core.ToQuery UpdateProfileJob where
toQuery :: UpdateProfileJob -> QueryString
toQuery = QueryString -> UpdateProfileJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateProfileJobResponse = UpdateProfileJobResponse'
{
UpdateProfileJobResponse -> Int
httpStatus :: Prelude.Int,
UpdateProfileJobResponse -> Text
name :: Prelude.Text
}
deriving (UpdateProfileJobResponse -> UpdateProfileJobResponse -> Bool
(UpdateProfileJobResponse -> UpdateProfileJobResponse -> Bool)
-> (UpdateProfileJobResponse -> UpdateProfileJobResponse -> Bool)
-> Eq UpdateProfileJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProfileJobResponse -> UpdateProfileJobResponse -> Bool
$c/= :: UpdateProfileJobResponse -> UpdateProfileJobResponse -> Bool
== :: UpdateProfileJobResponse -> UpdateProfileJobResponse -> Bool
$c== :: UpdateProfileJobResponse -> UpdateProfileJobResponse -> Bool
Prelude.Eq, ReadPrec [UpdateProfileJobResponse]
ReadPrec UpdateProfileJobResponse
Int -> ReadS UpdateProfileJobResponse
ReadS [UpdateProfileJobResponse]
(Int -> ReadS UpdateProfileJobResponse)
-> ReadS [UpdateProfileJobResponse]
-> ReadPrec UpdateProfileJobResponse
-> ReadPrec [UpdateProfileJobResponse]
-> Read UpdateProfileJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProfileJobResponse]
$creadListPrec :: ReadPrec [UpdateProfileJobResponse]
readPrec :: ReadPrec UpdateProfileJobResponse
$creadPrec :: ReadPrec UpdateProfileJobResponse
readList :: ReadS [UpdateProfileJobResponse]
$creadList :: ReadS [UpdateProfileJobResponse]
readsPrec :: Int -> ReadS UpdateProfileJobResponse
$creadsPrec :: Int -> ReadS UpdateProfileJobResponse
Prelude.Read, Int -> UpdateProfileJobResponse -> ShowS
[UpdateProfileJobResponse] -> ShowS
UpdateProfileJobResponse -> String
(Int -> UpdateProfileJobResponse -> ShowS)
-> (UpdateProfileJobResponse -> String)
-> ([UpdateProfileJobResponse] -> ShowS)
-> Show UpdateProfileJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProfileJobResponse] -> ShowS
$cshowList :: [UpdateProfileJobResponse] -> ShowS
show :: UpdateProfileJobResponse -> String
$cshow :: UpdateProfileJobResponse -> String
showsPrec :: Int -> UpdateProfileJobResponse -> ShowS
$cshowsPrec :: Int -> UpdateProfileJobResponse -> ShowS
Prelude.Show, (forall x.
UpdateProfileJobResponse -> Rep UpdateProfileJobResponse x)
-> (forall x.
Rep UpdateProfileJobResponse x -> UpdateProfileJobResponse)
-> Generic UpdateProfileJobResponse
forall x.
Rep UpdateProfileJobResponse x -> UpdateProfileJobResponse
forall x.
UpdateProfileJobResponse -> Rep UpdateProfileJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateProfileJobResponse x -> UpdateProfileJobResponse
$cfrom :: forall x.
UpdateProfileJobResponse -> Rep UpdateProfileJobResponse x
Prelude.Generic)
newUpdateProfileJobResponse ::
Prelude.Int ->
Prelude.Text ->
UpdateProfileJobResponse
newUpdateProfileJobResponse :: Int -> Text -> UpdateProfileJobResponse
newUpdateProfileJobResponse Int
pHttpStatus_ Text
pName_ =
UpdateProfileJobResponse' :: Int -> Text -> UpdateProfileJobResponse
UpdateProfileJobResponse'
{ $sel:httpStatus:UpdateProfileJobResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:name:UpdateProfileJobResponse' :: Text
name = Text
pName_
}
updateProfileJobResponse_httpStatus :: Lens.Lens' UpdateProfileJobResponse Prelude.Int
updateProfileJobResponse_httpStatus :: (Int -> f Int)
-> UpdateProfileJobResponse -> f UpdateProfileJobResponse
updateProfileJobResponse_httpStatus = (UpdateProfileJobResponse -> Int)
-> (UpdateProfileJobResponse -> Int -> UpdateProfileJobResponse)
-> Lens UpdateProfileJobResponse UpdateProfileJobResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateProfileJobResponse' :: UpdateProfileJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateProfileJobResponse
s@UpdateProfileJobResponse' {} Int
a -> UpdateProfileJobResponse
s {$sel:httpStatus:UpdateProfileJobResponse' :: Int
httpStatus = Int
a} :: UpdateProfileJobResponse)
updateProfileJobResponse_name :: Lens.Lens' UpdateProfileJobResponse Prelude.Text
updateProfileJobResponse_name :: (Text -> f Text)
-> UpdateProfileJobResponse -> f UpdateProfileJobResponse
updateProfileJobResponse_name = (UpdateProfileJobResponse -> Text)
-> (UpdateProfileJobResponse -> Text -> UpdateProfileJobResponse)
-> Lens UpdateProfileJobResponse UpdateProfileJobResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProfileJobResponse' {Text
name :: Text
$sel:name:UpdateProfileJobResponse' :: UpdateProfileJobResponse -> Text
name} -> Text
name) (\s :: UpdateProfileJobResponse
s@UpdateProfileJobResponse' {} Text
a -> UpdateProfileJobResponse
s {$sel:name:UpdateProfileJobResponse' :: Text
name = Text
a} :: UpdateProfileJobResponse)
instance Prelude.NFData UpdateProfileJobResponse