{-# 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.CreateJob
(
CreateJob (..),
newCreateJob,
createJob_addressId,
createJob_clusterId,
createJob_description,
createJob_deviceConfiguration,
createJob_forwardingAddressId,
createJob_jobType,
createJob_kmsKeyARN,
createJob_longTermPricingId,
createJob_notification,
createJob_onDeviceServiceConfiguration,
createJob_remoteManagement,
createJob_resources,
createJob_roleARN,
createJob_shippingOption,
createJob_snowballCapacityPreference,
createJob_snowballType,
createJob_taxDocuments,
CreateJobResponse (..),
newCreateJobResponse,
createJobResponse_jobId,
createJobResponse_httpStatus,
)
where
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
import Amazonka.Snowball.Types
data CreateJob = CreateJob'
{
CreateJob -> Maybe Text
addressId :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe Text
clusterId :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe DeviceConfiguration
deviceConfiguration :: Prelude.Maybe DeviceConfiguration,
CreateJob -> Maybe Text
forwardingAddressId :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe JobType
jobType :: Prelude.Maybe JobType,
CreateJob -> Maybe Text
kmsKeyARN :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe Text
longTermPricingId :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe Notification
notification :: Prelude.Maybe Notification,
CreateJob -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration :: Prelude.Maybe OnDeviceServiceConfiguration,
CreateJob -> Maybe RemoteManagement
remoteManagement :: Prelude.Maybe RemoteManagement,
CreateJob -> Maybe JobResource
resources :: Prelude.Maybe JobResource,
CreateJob -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe ShippingOption
shippingOption :: Prelude.Maybe ShippingOption,
CreateJob -> Maybe SnowballCapacity
snowballCapacityPreference :: Prelude.Maybe SnowballCapacity,
CreateJob -> Maybe SnowballType
snowballType :: Prelude.Maybe SnowballType,
CreateJob -> Maybe TaxDocuments
taxDocuments :: Prelude.Maybe TaxDocuments
}
deriving (CreateJob -> CreateJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJob -> CreateJob -> Bool
$c/= :: CreateJob -> CreateJob -> Bool
== :: CreateJob -> CreateJob -> Bool
$c== :: CreateJob -> CreateJob -> Bool
Prelude.Eq, ReadPrec [CreateJob]
ReadPrec CreateJob
Int -> ReadS CreateJob
ReadS [CreateJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJob]
$creadListPrec :: ReadPrec [CreateJob]
readPrec :: ReadPrec CreateJob
$creadPrec :: ReadPrec CreateJob
readList :: ReadS [CreateJob]
$creadList :: ReadS [CreateJob]
readsPrec :: Int -> ReadS CreateJob
$creadsPrec :: Int -> ReadS CreateJob
Prelude.Read, Int -> CreateJob -> ShowS
[CreateJob] -> ShowS
CreateJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJob] -> ShowS
$cshowList :: [CreateJob] -> ShowS
show :: CreateJob -> String
$cshow :: CreateJob -> String
showsPrec :: Int -> CreateJob -> ShowS
$cshowsPrec :: Int -> CreateJob -> ShowS
Prelude.Show, forall x. Rep CreateJob x -> CreateJob
forall x. CreateJob -> Rep CreateJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJob x -> CreateJob
$cfrom :: forall x. CreateJob -> Rep CreateJob x
Prelude.Generic)
newCreateJob ::
CreateJob
newCreateJob :: CreateJob
newCreateJob =
CreateJob'
{ $sel:addressId:CreateJob' :: Maybe Text
addressId = forall a. Maybe a
Prelude.Nothing,
$sel:clusterId:CreateJob' :: Maybe Text
clusterId = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateJob' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:deviceConfiguration:CreateJob' :: Maybe DeviceConfiguration
deviceConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:forwardingAddressId:CreateJob' :: Maybe Text
forwardingAddressId = forall a. Maybe a
Prelude.Nothing,
$sel:jobType:CreateJob' :: Maybe JobType
jobType = forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyARN:CreateJob' :: Maybe Text
kmsKeyARN = forall a. Maybe a
Prelude.Nothing,
$sel:longTermPricingId:CreateJob' :: Maybe Text
longTermPricingId = forall a. Maybe a
Prelude.Nothing,
$sel:notification:CreateJob' :: Maybe Notification
notification = forall a. Maybe a
Prelude.Nothing,
$sel:onDeviceServiceConfiguration:CreateJob' :: Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration = forall a. Maybe a
Prelude.Nothing,
$sel:remoteManagement:CreateJob' :: Maybe RemoteManagement
remoteManagement = forall a. Maybe a
Prelude.Nothing,
$sel:resources:CreateJob' :: Maybe JobResource
resources = forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:CreateJob' :: Maybe Text
roleARN = forall a. Maybe a
Prelude.Nothing,
$sel:shippingOption:CreateJob' :: Maybe ShippingOption
shippingOption = forall a. Maybe a
Prelude.Nothing,
$sel:snowballCapacityPreference:CreateJob' :: Maybe SnowballCapacity
snowballCapacityPreference = forall a. Maybe a
Prelude.Nothing,
$sel:snowballType:CreateJob' :: Maybe SnowballType
snowballType = forall a. Maybe a
Prelude.Nothing,
$sel:taxDocuments:CreateJob' :: Maybe TaxDocuments
taxDocuments = forall a. Maybe a
Prelude.Nothing
}
createJob_addressId :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_addressId :: Lens' CreateJob (Maybe Text)
createJob_addressId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
addressId :: Maybe Text
$sel:addressId:CreateJob' :: CreateJob -> Maybe Text
addressId} -> Maybe Text
addressId) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:addressId:CreateJob' :: Maybe Text
addressId = Maybe Text
a} :: CreateJob)
createJob_clusterId :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_clusterId :: Lens' CreateJob (Maybe Text)
createJob_clusterId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
clusterId :: Maybe Text
$sel:clusterId:CreateJob' :: CreateJob -> Maybe Text
clusterId} -> Maybe Text
clusterId) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:clusterId:CreateJob' :: Maybe Text
clusterId = Maybe Text
a} :: CreateJob)
createJob_description :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_description :: Lens' CreateJob (Maybe Text)
createJob_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
description :: Maybe Text
$sel:description:CreateJob' :: CreateJob -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:description:CreateJob' :: Maybe Text
description = Maybe Text
a} :: CreateJob)
createJob_deviceConfiguration :: Lens.Lens' CreateJob (Prelude.Maybe DeviceConfiguration)
createJob_deviceConfiguration :: Lens' CreateJob (Maybe DeviceConfiguration)
createJob_deviceConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe DeviceConfiguration
deviceConfiguration :: Maybe DeviceConfiguration
$sel:deviceConfiguration:CreateJob' :: CreateJob -> Maybe DeviceConfiguration
deviceConfiguration} -> Maybe DeviceConfiguration
deviceConfiguration) (\s :: CreateJob
s@CreateJob' {} Maybe DeviceConfiguration
a -> CreateJob
s {$sel:deviceConfiguration:CreateJob' :: Maybe DeviceConfiguration
deviceConfiguration = Maybe DeviceConfiguration
a} :: CreateJob)
createJob_forwardingAddressId :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_forwardingAddressId :: Lens' CreateJob (Maybe Text)
createJob_forwardingAddressId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
forwardingAddressId :: Maybe Text
$sel:forwardingAddressId:CreateJob' :: CreateJob -> Maybe Text
forwardingAddressId} -> Maybe Text
forwardingAddressId) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:forwardingAddressId:CreateJob' :: Maybe Text
forwardingAddressId = Maybe Text
a} :: CreateJob)
createJob_jobType :: Lens.Lens' CreateJob (Prelude.Maybe JobType)
createJob_jobType :: Lens' CreateJob (Maybe JobType)
createJob_jobType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe JobType
jobType :: Maybe JobType
$sel:jobType:CreateJob' :: CreateJob -> Maybe JobType
jobType} -> Maybe JobType
jobType) (\s :: CreateJob
s@CreateJob' {} Maybe JobType
a -> CreateJob
s {$sel:jobType:CreateJob' :: Maybe JobType
jobType = Maybe JobType
a} :: CreateJob)
createJob_kmsKeyARN :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_kmsKeyARN :: Lens' CreateJob (Maybe Text)
createJob_kmsKeyARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
kmsKeyARN :: Maybe Text
$sel:kmsKeyARN:CreateJob' :: CreateJob -> Maybe Text
kmsKeyARN} -> Maybe Text
kmsKeyARN) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:kmsKeyARN:CreateJob' :: Maybe Text
kmsKeyARN = Maybe Text
a} :: CreateJob)
createJob_longTermPricingId :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_longTermPricingId :: Lens' CreateJob (Maybe Text)
createJob_longTermPricingId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
longTermPricingId :: Maybe Text
$sel:longTermPricingId:CreateJob' :: CreateJob -> Maybe Text
longTermPricingId} -> Maybe Text
longTermPricingId) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:longTermPricingId:CreateJob' :: Maybe Text
longTermPricingId = Maybe Text
a} :: CreateJob)
createJob_notification :: Lens.Lens' CreateJob (Prelude.Maybe Notification)
createJob_notification :: Lens' CreateJob (Maybe Notification)
createJob_notification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Notification
notification :: Maybe Notification
$sel:notification:CreateJob' :: CreateJob -> Maybe Notification
notification} -> Maybe Notification
notification) (\s :: CreateJob
s@CreateJob' {} Maybe Notification
a -> CreateJob
s {$sel:notification:CreateJob' :: Maybe Notification
notification = Maybe Notification
a} :: CreateJob)
createJob_onDeviceServiceConfiguration :: Lens.Lens' CreateJob (Prelude.Maybe OnDeviceServiceConfiguration)
createJob_onDeviceServiceConfiguration :: Lens' CreateJob (Maybe OnDeviceServiceConfiguration)
createJob_onDeviceServiceConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration :: Maybe OnDeviceServiceConfiguration
$sel:onDeviceServiceConfiguration:CreateJob' :: CreateJob -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration} -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration) (\s :: CreateJob
s@CreateJob' {} Maybe OnDeviceServiceConfiguration
a -> CreateJob
s {$sel:onDeviceServiceConfiguration:CreateJob' :: Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration = Maybe OnDeviceServiceConfiguration
a} :: CreateJob)
createJob_remoteManagement :: Lens.Lens' CreateJob (Prelude.Maybe RemoteManagement)
createJob_remoteManagement :: Lens' CreateJob (Maybe RemoteManagement)
createJob_remoteManagement = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe RemoteManagement
remoteManagement :: Maybe RemoteManagement
$sel:remoteManagement:CreateJob' :: CreateJob -> Maybe RemoteManagement
remoteManagement} -> Maybe RemoteManagement
remoteManagement) (\s :: CreateJob
s@CreateJob' {} Maybe RemoteManagement
a -> CreateJob
s {$sel:remoteManagement:CreateJob' :: Maybe RemoteManagement
remoteManagement = Maybe RemoteManagement
a} :: CreateJob)
createJob_resources :: Lens.Lens' CreateJob (Prelude.Maybe JobResource)
createJob_resources :: Lens' CreateJob (Maybe JobResource)
createJob_resources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe JobResource
resources :: Maybe JobResource
$sel:resources:CreateJob' :: CreateJob -> Maybe JobResource
resources} -> Maybe JobResource
resources) (\s :: CreateJob
s@CreateJob' {} Maybe JobResource
a -> CreateJob
s {$sel:resources:CreateJob' :: Maybe JobResource
resources = Maybe JobResource
a} :: CreateJob)
createJob_roleARN :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_roleARN :: Lens' CreateJob (Maybe Text)
createJob_roleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:CreateJob' :: CreateJob -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: CreateJob
s@CreateJob' {} Maybe Text
a -> CreateJob
s {$sel:roleARN:CreateJob' :: Maybe Text
roleARN = Maybe Text
a} :: CreateJob)
createJob_shippingOption :: Lens.Lens' CreateJob (Prelude.Maybe ShippingOption)
createJob_shippingOption :: Lens' CreateJob (Maybe ShippingOption)
createJob_shippingOption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe ShippingOption
shippingOption :: Maybe ShippingOption
$sel:shippingOption:CreateJob' :: CreateJob -> Maybe ShippingOption
shippingOption} -> Maybe ShippingOption
shippingOption) (\s :: CreateJob
s@CreateJob' {} Maybe ShippingOption
a -> CreateJob
s {$sel:shippingOption:CreateJob' :: Maybe ShippingOption
shippingOption = Maybe ShippingOption
a} :: CreateJob)
createJob_snowballCapacityPreference :: Lens.Lens' CreateJob (Prelude.Maybe SnowballCapacity)
createJob_snowballCapacityPreference :: Lens' CreateJob (Maybe SnowballCapacity)
createJob_snowballCapacityPreference = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe SnowballCapacity
snowballCapacityPreference :: Maybe SnowballCapacity
$sel:snowballCapacityPreference:CreateJob' :: CreateJob -> Maybe SnowballCapacity
snowballCapacityPreference} -> Maybe SnowballCapacity
snowballCapacityPreference) (\s :: CreateJob
s@CreateJob' {} Maybe SnowballCapacity
a -> CreateJob
s {$sel:snowballCapacityPreference:CreateJob' :: Maybe SnowballCapacity
snowballCapacityPreference = Maybe SnowballCapacity
a} :: CreateJob)
createJob_snowballType :: Lens.Lens' CreateJob (Prelude.Maybe SnowballType)
createJob_snowballType :: Lens' CreateJob (Maybe SnowballType)
createJob_snowballType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe SnowballType
snowballType :: Maybe SnowballType
$sel:snowballType:CreateJob' :: CreateJob -> Maybe SnowballType
snowballType} -> Maybe SnowballType
snowballType) (\s :: CreateJob
s@CreateJob' {} Maybe SnowballType
a -> CreateJob
s {$sel:snowballType:CreateJob' :: Maybe SnowballType
snowballType = Maybe SnowballType
a} :: CreateJob)
createJob_taxDocuments :: Lens.Lens' CreateJob (Prelude.Maybe TaxDocuments)
createJob_taxDocuments :: Lens' CreateJob (Maybe TaxDocuments)
createJob_taxDocuments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJob' {Maybe TaxDocuments
taxDocuments :: Maybe TaxDocuments
$sel:taxDocuments:CreateJob' :: CreateJob -> Maybe TaxDocuments
taxDocuments} -> Maybe TaxDocuments
taxDocuments) (\s :: CreateJob
s@CreateJob' {} Maybe TaxDocuments
a -> CreateJob
s {$sel:taxDocuments:CreateJob' :: Maybe TaxDocuments
taxDocuments = Maybe TaxDocuments
a} :: CreateJob)
instance Core.AWSRequest CreateJob where
type AWSResponse CreateJob = CreateJobResponse
request :: (Service -> Service) -> CreateJob -> Request CreateJob
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
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 Text -> Int -> CreateJobResponse
CreateJobResponse'
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
"JobId")
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 CreateJob where
hashWithSalt :: Int -> CreateJob -> Int
hashWithSalt Int
_salt CreateJob' {Maybe Text
Maybe JobType
Maybe Notification
Maybe RemoteManagement
Maybe ShippingOption
Maybe SnowballCapacity
Maybe SnowballType
Maybe OnDeviceServiceConfiguration
Maybe TaxDocuments
Maybe JobResource
Maybe DeviceConfiguration
taxDocuments :: Maybe TaxDocuments
snowballType :: Maybe SnowballType
snowballCapacityPreference :: Maybe SnowballCapacity
shippingOption :: Maybe ShippingOption
roleARN :: Maybe Text
resources :: Maybe JobResource
remoteManagement :: Maybe RemoteManagement
onDeviceServiceConfiguration :: Maybe OnDeviceServiceConfiguration
notification :: Maybe Notification
longTermPricingId :: Maybe Text
kmsKeyARN :: Maybe Text
jobType :: Maybe JobType
forwardingAddressId :: Maybe Text
deviceConfiguration :: Maybe DeviceConfiguration
description :: Maybe Text
clusterId :: Maybe Text
addressId :: Maybe Text
$sel:taxDocuments:CreateJob' :: CreateJob -> Maybe TaxDocuments
$sel:snowballType:CreateJob' :: CreateJob -> Maybe SnowballType
$sel:snowballCapacityPreference:CreateJob' :: CreateJob -> Maybe SnowballCapacity
$sel:shippingOption:CreateJob' :: CreateJob -> Maybe ShippingOption
$sel:roleARN:CreateJob' :: CreateJob -> Maybe Text
$sel:resources:CreateJob' :: CreateJob -> Maybe JobResource
$sel:remoteManagement:CreateJob' :: CreateJob -> Maybe RemoteManagement
$sel:onDeviceServiceConfiguration:CreateJob' :: CreateJob -> Maybe OnDeviceServiceConfiguration
$sel:notification:CreateJob' :: CreateJob -> Maybe Notification
$sel:longTermPricingId:CreateJob' :: CreateJob -> Maybe Text
$sel:kmsKeyARN:CreateJob' :: CreateJob -> Maybe Text
$sel:jobType:CreateJob' :: CreateJob -> Maybe JobType
$sel:forwardingAddressId:CreateJob' :: CreateJob -> Maybe Text
$sel:deviceConfiguration:CreateJob' :: CreateJob -> Maybe DeviceConfiguration
$sel:description:CreateJob' :: CreateJob -> Maybe Text
$sel:clusterId:CreateJob' :: CreateJob -> Maybe Text
$sel:addressId:CreateJob' :: CreateJob -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
addressId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeviceConfiguration
deviceConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
forwardingAddressId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobType
jobType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
longTermPricingId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Notification
notification
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RemoteManagement
remoteManagement
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobResource
resources
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ShippingOption
shippingOption
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SnowballCapacity
snowballCapacityPreference
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SnowballType
snowballType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TaxDocuments
taxDocuments
instance Prelude.NFData CreateJob where
rnf :: CreateJob -> ()
rnf CreateJob' {Maybe Text
Maybe JobType
Maybe Notification
Maybe RemoteManagement
Maybe ShippingOption
Maybe SnowballCapacity
Maybe SnowballType
Maybe OnDeviceServiceConfiguration
Maybe TaxDocuments
Maybe JobResource
Maybe DeviceConfiguration
taxDocuments :: Maybe TaxDocuments
snowballType :: Maybe SnowballType
snowballCapacityPreference :: Maybe SnowballCapacity
shippingOption :: Maybe ShippingOption
roleARN :: Maybe Text
resources :: Maybe JobResource
remoteManagement :: Maybe RemoteManagement
onDeviceServiceConfiguration :: Maybe OnDeviceServiceConfiguration
notification :: Maybe Notification
longTermPricingId :: Maybe Text
kmsKeyARN :: Maybe Text
jobType :: Maybe JobType
forwardingAddressId :: Maybe Text
deviceConfiguration :: Maybe DeviceConfiguration
description :: Maybe Text
clusterId :: Maybe Text
addressId :: Maybe Text
$sel:taxDocuments:CreateJob' :: CreateJob -> Maybe TaxDocuments
$sel:snowballType:CreateJob' :: CreateJob -> Maybe SnowballType
$sel:snowballCapacityPreference:CreateJob' :: CreateJob -> Maybe SnowballCapacity
$sel:shippingOption:CreateJob' :: CreateJob -> Maybe ShippingOption
$sel:roleARN:CreateJob' :: CreateJob -> Maybe Text
$sel:resources:CreateJob' :: CreateJob -> Maybe JobResource
$sel:remoteManagement:CreateJob' :: CreateJob -> Maybe RemoteManagement
$sel:onDeviceServiceConfiguration:CreateJob' :: CreateJob -> Maybe OnDeviceServiceConfiguration
$sel:notification:CreateJob' :: CreateJob -> Maybe Notification
$sel:longTermPricingId:CreateJob' :: CreateJob -> Maybe Text
$sel:kmsKeyARN:CreateJob' :: CreateJob -> Maybe Text
$sel:jobType:CreateJob' :: CreateJob -> Maybe JobType
$sel:forwardingAddressId:CreateJob' :: CreateJob -> Maybe Text
$sel:deviceConfiguration:CreateJob' :: CreateJob -> Maybe DeviceConfiguration
$sel:description:CreateJob' :: CreateJob -> Maybe Text
$sel:clusterId:CreateJob' :: CreateJob -> Maybe Text
$sel:addressId:CreateJob' :: CreateJob -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
addressId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterId
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 DeviceConfiguration
deviceConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
forwardingAddressId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobType
jobType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
longTermPricingId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Notification
notification
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RemoteManagement
remoteManagement
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobResource
resources
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ShippingOption
shippingOption
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SnowballCapacity
snowballCapacityPreference
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SnowballType
snowballType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TaxDocuments
taxDocuments
instance Data.ToHeaders CreateJob where
toHeaders :: CreateJob -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSIESnowballJobManagementService.CreateJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateJob where
toJSON :: CreateJob -> Value
toJSON CreateJob' {Maybe Text
Maybe JobType
Maybe Notification
Maybe RemoteManagement
Maybe ShippingOption
Maybe SnowballCapacity
Maybe SnowballType
Maybe OnDeviceServiceConfiguration
Maybe TaxDocuments
Maybe JobResource
Maybe DeviceConfiguration
taxDocuments :: Maybe TaxDocuments
snowballType :: Maybe SnowballType
snowballCapacityPreference :: Maybe SnowballCapacity
shippingOption :: Maybe ShippingOption
roleARN :: Maybe Text
resources :: Maybe JobResource
remoteManagement :: Maybe RemoteManagement
onDeviceServiceConfiguration :: Maybe OnDeviceServiceConfiguration
notification :: Maybe Notification
longTermPricingId :: Maybe Text
kmsKeyARN :: Maybe Text
jobType :: Maybe JobType
forwardingAddressId :: Maybe Text
deviceConfiguration :: Maybe DeviceConfiguration
description :: Maybe Text
clusterId :: Maybe Text
addressId :: Maybe Text
$sel:taxDocuments:CreateJob' :: CreateJob -> Maybe TaxDocuments
$sel:snowballType:CreateJob' :: CreateJob -> Maybe SnowballType
$sel:snowballCapacityPreference:CreateJob' :: CreateJob -> Maybe SnowballCapacity
$sel:shippingOption:CreateJob' :: CreateJob -> Maybe ShippingOption
$sel:roleARN:CreateJob' :: CreateJob -> Maybe Text
$sel:resources:CreateJob' :: CreateJob -> Maybe JobResource
$sel:remoteManagement:CreateJob' :: CreateJob -> Maybe RemoteManagement
$sel:onDeviceServiceConfiguration:CreateJob' :: CreateJob -> Maybe OnDeviceServiceConfiguration
$sel:notification:CreateJob' :: CreateJob -> Maybe Notification
$sel:longTermPricingId:CreateJob' :: CreateJob -> Maybe Text
$sel:kmsKeyARN:CreateJob' :: CreateJob -> Maybe Text
$sel:jobType:CreateJob' :: CreateJob -> Maybe JobType
$sel:forwardingAddressId:CreateJob' :: CreateJob -> Maybe Text
$sel:deviceConfiguration:CreateJob' :: CreateJob -> Maybe DeviceConfiguration
$sel:description:CreateJob' :: CreateJob -> Maybe Text
$sel:clusterId:CreateJob' :: CreateJob -> Maybe Text
$sel:addressId:CreateJob' :: CreateJob -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AddressId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
addressId,
(Key
"ClusterId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clusterId,
(Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"DeviceConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeviceConfiguration
deviceConfiguration,
(Key
"ForwardingAddressId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
forwardingAddressId,
(Key
"JobType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobType
jobType,
(Key
"KmsKeyARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKeyARN,
(Key
"LongTermPricingId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
longTermPricingId,
(Key
"Notification" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Notification
notification,
(Key
"OnDeviceServiceConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration,
(Key
"RemoteManagement" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RemoteManagement
remoteManagement,
(Key
"Resources" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobResource
resources,
(Key
"RoleARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roleARN,
(Key
"ShippingOption" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ShippingOption
shippingOption,
(Key
"SnowballCapacityPreference" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SnowballCapacity
snowballCapacityPreference,
(Key
"SnowballType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SnowballType
snowballType,
(Key
"TaxDocuments" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TaxDocuments
taxDocuments
]
)
instance Data.ToPath CreateJob where
toPath :: CreateJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateJob where
toQuery :: CreateJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateJobResponse = CreateJobResponse'
{
CreateJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
CreateJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateJobResponse -> CreateJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateJobResponse -> CreateJobResponse -> Bool
$c/= :: CreateJobResponse -> CreateJobResponse -> Bool
== :: CreateJobResponse -> CreateJobResponse -> Bool
$c== :: CreateJobResponse -> CreateJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateJobResponse]
ReadPrec CreateJobResponse
Int -> ReadS CreateJobResponse
ReadS [CreateJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateJobResponse]
$creadListPrec :: ReadPrec [CreateJobResponse]
readPrec :: ReadPrec CreateJobResponse
$creadPrec :: ReadPrec CreateJobResponse
readList :: ReadS [CreateJobResponse]
$creadList :: ReadS [CreateJobResponse]
readsPrec :: Int -> ReadS CreateJobResponse
$creadsPrec :: Int -> ReadS CreateJobResponse
Prelude.Read, Int -> CreateJobResponse -> ShowS
[CreateJobResponse] -> ShowS
CreateJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateJobResponse] -> ShowS
$cshowList :: [CreateJobResponse] -> ShowS
show :: CreateJobResponse -> String
$cshow :: CreateJobResponse -> String
showsPrec :: Int -> CreateJobResponse -> ShowS
$cshowsPrec :: Int -> CreateJobResponse -> ShowS
Prelude.Show, forall x. Rep CreateJobResponse x -> CreateJobResponse
forall x. CreateJobResponse -> Rep CreateJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateJobResponse x -> CreateJobResponse
$cfrom :: forall x. CreateJobResponse -> Rep CreateJobResponse x
Prelude.Generic)
newCreateJobResponse ::
Prelude.Int ->
CreateJobResponse
newCreateJobResponse :: Int -> CreateJobResponse
newCreateJobResponse Int
pHttpStatus_ =
CreateJobResponse'
{ $sel:jobId:CreateJobResponse' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createJobResponse_jobId :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_jobId :: Lens' CreateJobResponse (Maybe Text)
createJobResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:CreateJobResponse' :: CreateJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: CreateJobResponse
s@CreateJobResponse' {} Maybe Text
a -> CreateJobResponse
s {$sel:jobId:CreateJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: CreateJobResponse)
createJobResponse_httpStatus :: Lens.Lens' CreateJobResponse Prelude.Int
createJobResponse_httpStatus :: Lens' CreateJobResponse Int
createJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateJobResponse' :: CreateJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateJobResponse
s@CreateJobResponse' {} Int
a -> CreateJobResponse
s {$sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
a} :: CreateJobResponse)
instance Prelude.NFData CreateJobResponse where
rnf :: CreateJobResponse -> ()
rnf CreateJobResponse' {Int
Maybe Text
httpStatus :: Int
jobId :: Maybe Text
$sel:httpStatus:CreateJobResponse' :: CreateJobResponse -> Int
$sel:jobId:CreateJobResponse' :: CreateJobResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus