{-# 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.Snowball.UpdateJob
(
UpdateJob (..),
newUpdateJob,
updateJob_notification,
updateJob_forwardingAddressId,
updateJob_addressId,
updateJob_shippingOption,
updateJob_resources,
updateJob_onDeviceServiceConfiguration,
updateJob_description,
updateJob_roleARN,
updateJob_snowballCapacityPreference,
updateJob_jobId,
UpdateJobResponse (..),
newUpdateJobResponse,
updateJobResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Snowball.Types
data UpdateJob = UpdateJob'
{
UpdateJob -> Maybe Notification
notification :: Prelude.Maybe Notification,
UpdateJob -> Maybe Text
forwardingAddressId :: Prelude.Maybe Prelude.Text,
UpdateJob -> Maybe Text
addressId :: Prelude.Maybe Prelude.Text,
UpdateJob -> Maybe ShippingOption
shippingOption :: Prelude.Maybe ShippingOption,
UpdateJob -> Maybe JobResource
resources :: Prelude.Maybe JobResource,
UpdateJob -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration :: Prelude.Maybe OnDeviceServiceConfiguration,
UpdateJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateJob -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
UpdateJob -> Maybe SnowballCapacity
snowballCapacityPreference :: Prelude.Maybe SnowballCapacity,
UpdateJob -> Text
jobId :: Prelude.Text
}
deriving (UpdateJob -> UpdateJob -> Bool
(UpdateJob -> UpdateJob -> Bool)
-> (UpdateJob -> UpdateJob -> Bool) -> Eq UpdateJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJob -> UpdateJob -> Bool
$c/= :: UpdateJob -> UpdateJob -> Bool
== :: UpdateJob -> UpdateJob -> Bool
$c== :: UpdateJob -> UpdateJob -> Bool
Prelude.Eq, ReadPrec [UpdateJob]
ReadPrec UpdateJob
Int -> ReadS UpdateJob
ReadS [UpdateJob]
(Int -> ReadS UpdateJob)
-> ReadS [UpdateJob]
-> ReadPrec UpdateJob
-> ReadPrec [UpdateJob]
-> Read UpdateJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJob]
$creadListPrec :: ReadPrec [UpdateJob]
readPrec :: ReadPrec UpdateJob
$creadPrec :: ReadPrec UpdateJob
readList :: ReadS [UpdateJob]
$creadList :: ReadS [UpdateJob]
readsPrec :: Int -> ReadS UpdateJob
$creadsPrec :: Int -> ReadS UpdateJob
Prelude.Read, Int -> UpdateJob -> ShowS
[UpdateJob] -> ShowS
UpdateJob -> String
(Int -> UpdateJob -> ShowS)
-> (UpdateJob -> String)
-> ([UpdateJob] -> ShowS)
-> Show UpdateJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJob] -> ShowS
$cshowList :: [UpdateJob] -> ShowS
show :: UpdateJob -> String
$cshow :: UpdateJob -> String
showsPrec :: Int -> UpdateJob -> ShowS
$cshowsPrec :: Int -> UpdateJob -> ShowS
Prelude.Show, (forall x. UpdateJob -> Rep UpdateJob x)
-> (forall x. Rep UpdateJob x -> UpdateJob) -> Generic UpdateJob
forall x. Rep UpdateJob x -> UpdateJob
forall x. UpdateJob -> Rep UpdateJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateJob x -> UpdateJob
$cfrom :: forall x. UpdateJob -> Rep UpdateJob x
Prelude.Generic)
newUpdateJob ::
Prelude.Text ->
UpdateJob
newUpdateJob :: Text -> UpdateJob
newUpdateJob Text
pJobId_ =
UpdateJob' :: Maybe Notification
-> Maybe Text
-> Maybe Text
-> Maybe ShippingOption
-> Maybe JobResource
-> Maybe OnDeviceServiceConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe SnowballCapacity
-> Text
-> UpdateJob
UpdateJob'
{ $sel:notification:UpdateJob' :: Maybe Notification
notification = Maybe Notification
forall a. Maybe a
Prelude.Nothing,
$sel:forwardingAddressId:UpdateJob' :: Maybe Text
forwardingAddressId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:addressId:UpdateJob' :: Maybe Text
addressId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:shippingOption:UpdateJob' :: Maybe ShippingOption
shippingOption = Maybe ShippingOption
forall a. Maybe a
Prelude.Nothing,
$sel:resources:UpdateJob' :: Maybe JobResource
resources = Maybe JobResource
forall a. Maybe a
Prelude.Nothing,
$sel:onDeviceServiceConfiguration:UpdateJob' :: Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration = Maybe OnDeviceServiceConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateJob' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:UpdateJob' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snowballCapacityPreference:UpdateJob' :: Maybe SnowballCapacity
snowballCapacityPreference = Maybe SnowballCapacity
forall a. Maybe a
Prelude.Nothing,
$sel:jobId:UpdateJob' :: Text
jobId = Text
pJobId_
}
updateJob_notification :: Lens.Lens' UpdateJob (Prelude.Maybe Notification)
updateJob_notification :: (Maybe Notification -> f (Maybe Notification))
-> UpdateJob -> f UpdateJob
updateJob_notification = (UpdateJob -> Maybe Notification)
-> (UpdateJob -> Maybe Notification -> UpdateJob)
-> Lens
UpdateJob UpdateJob (Maybe Notification) (Maybe Notification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe Notification
notification :: Maybe Notification
$sel:notification:UpdateJob' :: UpdateJob -> Maybe Notification
notification} -> Maybe Notification
notification) (\s :: UpdateJob
s@UpdateJob' {} Maybe Notification
a -> UpdateJob
s {$sel:notification:UpdateJob' :: Maybe Notification
notification = Maybe Notification
a} :: UpdateJob)
updateJob_forwardingAddressId :: Lens.Lens' UpdateJob (Prelude.Maybe Prelude.Text)
updateJob_forwardingAddressId :: (Maybe Text -> f (Maybe Text)) -> UpdateJob -> f UpdateJob
updateJob_forwardingAddressId = (UpdateJob -> Maybe Text)
-> (UpdateJob -> Maybe Text -> UpdateJob)
-> Lens UpdateJob UpdateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe Text
forwardingAddressId :: Maybe Text
$sel:forwardingAddressId:UpdateJob' :: UpdateJob -> Maybe Text
forwardingAddressId} -> Maybe Text
forwardingAddressId) (\s :: UpdateJob
s@UpdateJob' {} Maybe Text
a -> UpdateJob
s {$sel:forwardingAddressId:UpdateJob' :: Maybe Text
forwardingAddressId = Maybe Text
a} :: UpdateJob)
updateJob_addressId :: Lens.Lens' UpdateJob (Prelude.Maybe Prelude.Text)
updateJob_addressId :: (Maybe Text -> f (Maybe Text)) -> UpdateJob -> f UpdateJob
updateJob_addressId = (UpdateJob -> Maybe Text)
-> (UpdateJob -> Maybe Text -> UpdateJob)
-> Lens UpdateJob UpdateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe Text
addressId :: Maybe Text
$sel:addressId:UpdateJob' :: UpdateJob -> Maybe Text
addressId} -> Maybe Text
addressId) (\s :: UpdateJob
s@UpdateJob' {} Maybe Text
a -> UpdateJob
s {$sel:addressId:UpdateJob' :: Maybe Text
addressId = Maybe Text
a} :: UpdateJob)
updateJob_shippingOption :: Lens.Lens' UpdateJob (Prelude.Maybe ShippingOption)
updateJob_shippingOption :: (Maybe ShippingOption -> f (Maybe ShippingOption))
-> UpdateJob -> f UpdateJob
updateJob_shippingOption = (UpdateJob -> Maybe ShippingOption)
-> (UpdateJob -> Maybe ShippingOption -> UpdateJob)
-> Lens
UpdateJob UpdateJob (Maybe ShippingOption) (Maybe ShippingOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe ShippingOption
shippingOption :: Maybe ShippingOption
$sel:shippingOption:UpdateJob' :: UpdateJob -> Maybe ShippingOption
shippingOption} -> Maybe ShippingOption
shippingOption) (\s :: UpdateJob
s@UpdateJob' {} Maybe ShippingOption
a -> UpdateJob
s {$sel:shippingOption:UpdateJob' :: Maybe ShippingOption
shippingOption = Maybe ShippingOption
a} :: UpdateJob)
updateJob_resources :: Lens.Lens' UpdateJob (Prelude.Maybe JobResource)
updateJob_resources :: (Maybe JobResource -> f (Maybe JobResource))
-> UpdateJob -> f UpdateJob
updateJob_resources = (UpdateJob -> Maybe JobResource)
-> (UpdateJob -> Maybe JobResource -> UpdateJob)
-> Lens UpdateJob UpdateJob (Maybe JobResource) (Maybe JobResource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe JobResource
resources :: Maybe JobResource
$sel:resources:UpdateJob' :: UpdateJob -> Maybe JobResource
resources} -> Maybe JobResource
resources) (\s :: UpdateJob
s@UpdateJob' {} Maybe JobResource
a -> UpdateJob
s {$sel:resources:UpdateJob' :: Maybe JobResource
resources = Maybe JobResource
a} :: UpdateJob)
updateJob_onDeviceServiceConfiguration :: Lens.Lens' UpdateJob (Prelude.Maybe OnDeviceServiceConfiguration)
updateJob_onDeviceServiceConfiguration :: (Maybe OnDeviceServiceConfiguration
-> f (Maybe OnDeviceServiceConfiguration))
-> UpdateJob -> f UpdateJob
updateJob_onDeviceServiceConfiguration = (UpdateJob -> Maybe OnDeviceServiceConfiguration)
-> (UpdateJob -> Maybe OnDeviceServiceConfiguration -> UpdateJob)
-> Lens
UpdateJob
UpdateJob
(Maybe OnDeviceServiceConfiguration)
(Maybe OnDeviceServiceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration :: Maybe OnDeviceServiceConfiguration
$sel:onDeviceServiceConfiguration:UpdateJob' :: UpdateJob -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration} -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration) (\s :: UpdateJob
s@UpdateJob' {} Maybe OnDeviceServiceConfiguration
a -> UpdateJob
s {$sel:onDeviceServiceConfiguration:UpdateJob' :: Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration = Maybe OnDeviceServiceConfiguration
a} :: UpdateJob)
updateJob_description :: Lens.Lens' UpdateJob (Prelude.Maybe Prelude.Text)
updateJob_description :: (Maybe Text -> f (Maybe Text)) -> UpdateJob -> f UpdateJob
updateJob_description = (UpdateJob -> Maybe Text)
-> (UpdateJob -> Maybe Text -> UpdateJob)
-> Lens UpdateJob UpdateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe Text
description :: Maybe Text
$sel:description:UpdateJob' :: UpdateJob -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateJob
s@UpdateJob' {} Maybe Text
a -> UpdateJob
s {$sel:description:UpdateJob' :: Maybe Text
description = Maybe Text
a} :: UpdateJob)
updateJob_roleARN :: Lens.Lens' UpdateJob (Prelude.Maybe Prelude.Text)
updateJob_roleARN :: (Maybe Text -> f (Maybe Text)) -> UpdateJob -> f UpdateJob
updateJob_roleARN = (UpdateJob -> Maybe Text)
-> (UpdateJob -> Maybe Text -> UpdateJob)
-> Lens UpdateJob UpdateJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:UpdateJob' :: UpdateJob -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: UpdateJob
s@UpdateJob' {} Maybe Text
a -> UpdateJob
s {$sel:roleARN:UpdateJob' :: Maybe Text
roleARN = Maybe Text
a} :: UpdateJob)
updateJob_snowballCapacityPreference :: Lens.Lens' UpdateJob (Prelude.Maybe SnowballCapacity)
updateJob_snowballCapacityPreference :: (Maybe SnowballCapacity -> f (Maybe SnowballCapacity))
-> UpdateJob -> f UpdateJob
updateJob_snowballCapacityPreference = (UpdateJob -> Maybe SnowballCapacity)
-> (UpdateJob -> Maybe SnowballCapacity -> UpdateJob)
-> Lens
UpdateJob
UpdateJob
(Maybe SnowballCapacity)
(Maybe SnowballCapacity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Maybe SnowballCapacity
snowballCapacityPreference :: Maybe SnowballCapacity
$sel:snowballCapacityPreference:UpdateJob' :: UpdateJob -> Maybe SnowballCapacity
snowballCapacityPreference} -> Maybe SnowballCapacity
snowballCapacityPreference) (\s :: UpdateJob
s@UpdateJob' {} Maybe SnowballCapacity
a -> UpdateJob
s {$sel:snowballCapacityPreference:UpdateJob' :: Maybe SnowballCapacity
snowballCapacityPreference = Maybe SnowballCapacity
a} :: UpdateJob)
updateJob_jobId :: Lens.Lens' UpdateJob Prelude.Text
updateJob_jobId :: (Text -> f Text) -> UpdateJob -> f UpdateJob
updateJob_jobId = (UpdateJob -> Text)
-> (UpdateJob -> Text -> UpdateJob)
-> Lens UpdateJob UpdateJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJob' {Text
jobId :: Text
$sel:jobId:UpdateJob' :: UpdateJob -> Text
jobId} -> Text
jobId) (\s :: UpdateJob
s@UpdateJob' {} Text
a -> UpdateJob
s {$sel:jobId:UpdateJob' :: Text
jobId = Text
a} :: UpdateJob)
instance Core.AWSRequest UpdateJob where
type AWSResponse UpdateJob = UpdateJobResponse
request :: UpdateJob -> Request UpdateJob
request = Service -> UpdateJob -> Request UpdateJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateJob)))
response =
(Int
-> ResponseHeaders -> () -> Either String (AWSResponse UpdateJob))
-> Logger
-> Service
-> Proxy UpdateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> UpdateJobResponse
UpdateJobResponse'
(Int -> UpdateJobResponse)
-> Either String Int -> Either String UpdateJobResponse
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))
)
instance Prelude.Hashable UpdateJob
instance Prelude.NFData UpdateJob
instance Core.ToHeaders UpdateJob where
toHeaders :: UpdateJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSIESnowballJobManagementService.UpdateJob" ::
Prelude.ByteString
),
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 UpdateJob where
toJSON :: UpdateJob -> Value
toJSON UpdateJob' {Maybe Text
Maybe Notification
Maybe ShippingOption
Maybe SnowballCapacity
Maybe OnDeviceServiceConfiguration
Maybe JobResource
Text
jobId :: Text
snowballCapacityPreference :: Maybe SnowballCapacity
roleARN :: Maybe Text
description :: Maybe Text
onDeviceServiceConfiguration :: Maybe OnDeviceServiceConfiguration
resources :: Maybe JobResource
shippingOption :: Maybe ShippingOption
addressId :: Maybe Text
forwardingAddressId :: Maybe Text
notification :: Maybe Notification
$sel:jobId:UpdateJob' :: UpdateJob -> Text
$sel:snowballCapacityPreference:UpdateJob' :: UpdateJob -> Maybe SnowballCapacity
$sel:roleARN:UpdateJob' :: UpdateJob -> Maybe Text
$sel:description:UpdateJob' :: UpdateJob -> Maybe Text
$sel:onDeviceServiceConfiguration:UpdateJob' :: UpdateJob -> Maybe OnDeviceServiceConfiguration
$sel:resources:UpdateJob' :: UpdateJob -> Maybe JobResource
$sel:shippingOption:UpdateJob' :: UpdateJob -> Maybe ShippingOption
$sel:addressId:UpdateJob' :: UpdateJob -> Maybe Text
$sel:forwardingAddressId:UpdateJob' :: UpdateJob -> Maybe Text
$sel:notification:UpdateJob' :: UpdateJob -> Maybe Notification
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Notification" Text -> Notification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Notification -> Pair) -> Maybe Notification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Notification
notification,
(Text
"ForwardingAddressId" 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
forwardingAddressId,
(Text
"AddressId" 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
addressId,
(Text
"ShippingOption" Text -> ShippingOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ShippingOption -> Pair) -> Maybe ShippingOption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ShippingOption
shippingOption,
(Text
"Resources" Text -> JobResource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JobResource -> Pair) -> Maybe JobResource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobResource
resources,
(Text
"OnDeviceServiceConfiguration" Text -> OnDeviceServiceConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OnDeviceServiceConfiguration -> Pair)
-> Maybe OnDeviceServiceConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration,
(Text
"Description" 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
description,
(Text
"RoleARN" 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
roleARN,
(Text
"SnowballCapacityPreference" Text -> SnowballCapacity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SnowballCapacity -> Pair) -> Maybe SnowballCapacity -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SnowballCapacity
snowballCapacityPreference,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"JobId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobId)
]
)
instance Core.ToPath UpdateJob where
toPath :: UpdateJob -> ByteString
toPath = ByteString -> UpdateJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateJob where
toQuery :: UpdateJob -> QueryString
toQuery = QueryString -> UpdateJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateJobResponse = UpdateJobResponse'
{
UpdateJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateJobResponse -> UpdateJobResponse -> Bool
(UpdateJobResponse -> UpdateJobResponse -> Bool)
-> (UpdateJobResponse -> UpdateJobResponse -> Bool)
-> Eq UpdateJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJobResponse -> UpdateJobResponse -> Bool
$c/= :: UpdateJobResponse -> UpdateJobResponse -> Bool
== :: UpdateJobResponse -> UpdateJobResponse -> Bool
$c== :: UpdateJobResponse -> UpdateJobResponse -> Bool
Prelude.Eq, ReadPrec [UpdateJobResponse]
ReadPrec UpdateJobResponse
Int -> ReadS UpdateJobResponse
ReadS [UpdateJobResponse]
(Int -> ReadS UpdateJobResponse)
-> ReadS [UpdateJobResponse]
-> ReadPrec UpdateJobResponse
-> ReadPrec [UpdateJobResponse]
-> Read UpdateJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJobResponse]
$creadListPrec :: ReadPrec [UpdateJobResponse]
readPrec :: ReadPrec UpdateJobResponse
$creadPrec :: ReadPrec UpdateJobResponse
readList :: ReadS [UpdateJobResponse]
$creadList :: ReadS [UpdateJobResponse]
readsPrec :: Int -> ReadS UpdateJobResponse
$creadsPrec :: Int -> ReadS UpdateJobResponse
Prelude.Read, Int -> UpdateJobResponse -> ShowS
[UpdateJobResponse] -> ShowS
UpdateJobResponse -> String
(Int -> UpdateJobResponse -> ShowS)
-> (UpdateJobResponse -> String)
-> ([UpdateJobResponse] -> ShowS)
-> Show UpdateJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJobResponse] -> ShowS
$cshowList :: [UpdateJobResponse] -> ShowS
show :: UpdateJobResponse -> String
$cshow :: UpdateJobResponse -> String
showsPrec :: Int -> UpdateJobResponse -> ShowS
$cshowsPrec :: Int -> UpdateJobResponse -> ShowS
Prelude.Show, (forall x. UpdateJobResponse -> Rep UpdateJobResponse x)
-> (forall x. Rep UpdateJobResponse x -> UpdateJobResponse)
-> Generic UpdateJobResponse
forall x. Rep UpdateJobResponse x -> UpdateJobResponse
forall x. UpdateJobResponse -> Rep UpdateJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateJobResponse x -> UpdateJobResponse
$cfrom :: forall x. UpdateJobResponse -> Rep UpdateJobResponse x
Prelude.Generic)
newUpdateJobResponse ::
Prelude.Int ->
UpdateJobResponse
newUpdateJobResponse :: Int -> UpdateJobResponse
newUpdateJobResponse Int
pHttpStatus_ =
UpdateJobResponse' :: Int -> UpdateJobResponse
UpdateJobResponse' {$sel:httpStatus:UpdateJobResponse' :: Int
httpStatus = Int
pHttpStatus_}
updateJobResponse_httpStatus :: Lens.Lens' UpdateJobResponse Prelude.Int
updateJobResponse_httpStatus :: (Int -> f Int) -> UpdateJobResponse -> f UpdateJobResponse
updateJobResponse_httpStatus = (UpdateJobResponse -> Int)
-> (UpdateJobResponse -> Int -> UpdateJobResponse)
-> Lens UpdateJobResponse UpdateJobResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateJobResponse' :: UpdateJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateJobResponse
s@UpdateJobResponse' {} Int
a -> UpdateJobResponse
s {$sel:httpStatus:UpdateJobResponse' :: Int
httpStatus = Int
a} :: UpdateJobResponse)
instance Prelude.NFData UpdateJobResponse