{-# 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_jobType,
createJob_kmsKeyARN,
createJob_remoteManagement,
createJob_notification,
createJob_forwardingAddressId,
createJob_addressId,
createJob_snowballType,
createJob_longTermPricingId,
createJob_shippingOption,
createJob_resources,
createJob_onDeviceServiceConfiguration,
createJob_clusterId,
createJob_deviceConfiguration,
createJob_description,
createJob_taxDocuments,
createJob_roleARN,
createJob_snowballCapacityPreference,
CreateJobResponse (..),
newCreateJobResponse,
createJobResponse_jobId,
createJobResponse_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 CreateJob = CreateJob'
{
CreateJob -> Maybe JobType
jobType :: Prelude.Maybe JobType,
CreateJob -> Maybe Text
kmsKeyARN :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe RemoteManagement
remoteManagement :: Prelude.Maybe RemoteManagement,
CreateJob -> Maybe Notification
notification :: Prelude.Maybe Notification,
CreateJob -> Maybe Text
forwardingAddressId :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe Text
addressId :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe SnowballType
snowballType :: Prelude.Maybe SnowballType,
CreateJob -> Maybe Text
longTermPricingId :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe ShippingOption
shippingOption :: Prelude.Maybe ShippingOption,
CreateJob -> Maybe JobResource
resources :: Prelude.Maybe JobResource,
CreateJob -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration :: Prelude.Maybe OnDeviceServiceConfiguration,
CreateJob -> Maybe Text
clusterId :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe DeviceConfiguration
deviceConfiguration :: Prelude.Maybe DeviceConfiguration,
CreateJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe TaxDocuments
taxDocuments :: Prelude.Maybe TaxDocuments,
CreateJob -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
CreateJob -> Maybe SnowballCapacity
snowballCapacityPreference :: Prelude.Maybe SnowballCapacity
}
deriving (CreateJob -> CreateJob -> Bool
(CreateJob -> CreateJob -> Bool)
-> (CreateJob -> CreateJob -> Bool) -> Eq CreateJob
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]
(Int -> ReadS CreateJob)
-> ReadS [CreateJob]
-> ReadPrec CreateJob
-> ReadPrec [CreateJob]
-> Read 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
(Int -> CreateJob -> ShowS)
-> (CreateJob -> String)
-> ([CreateJob] -> ShowS)
-> Show CreateJob
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. CreateJob -> Rep CreateJob x)
-> (forall x. Rep CreateJob x -> CreateJob) -> Generic CreateJob
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' :: Maybe JobType
-> Maybe Text
-> Maybe RemoteManagement
-> Maybe Notification
-> Maybe Text
-> Maybe Text
-> Maybe SnowballType
-> Maybe Text
-> Maybe ShippingOption
-> Maybe JobResource
-> Maybe OnDeviceServiceConfiguration
-> Maybe Text
-> Maybe DeviceConfiguration
-> Maybe Text
-> Maybe TaxDocuments
-> Maybe Text
-> Maybe SnowballCapacity
-> CreateJob
CreateJob'
{ $sel:jobType:CreateJob' :: Maybe JobType
jobType = Maybe JobType
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyARN:CreateJob' :: Maybe Text
kmsKeyARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:remoteManagement:CreateJob' :: Maybe RemoteManagement
remoteManagement = Maybe RemoteManagement
forall a. Maybe a
Prelude.Nothing,
$sel:notification:CreateJob' :: Maybe Notification
notification = Maybe Notification
forall a. Maybe a
Prelude.Nothing,
$sel:forwardingAddressId:CreateJob' :: Maybe Text
forwardingAddressId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:addressId:CreateJob' :: Maybe Text
addressId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snowballType:CreateJob' :: Maybe SnowballType
snowballType = Maybe SnowballType
forall a. Maybe a
Prelude.Nothing,
$sel:longTermPricingId:CreateJob' :: Maybe Text
longTermPricingId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:shippingOption:CreateJob' :: Maybe ShippingOption
shippingOption = Maybe ShippingOption
forall a. Maybe a
Prelude.Nothing,
$sel:resources:CreateJob' :: Maybe JobResource
resources = Maybe JobResource
forall a. Maybe a
Prelude.Nothing,
$sel:onDeviceServiceConfiguration:CreateJob' :: Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration = Maybe OnDeviceServiceConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:clusterId:CreateJob' :: Maybe Text
clusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deviceConfiguration:CreateJob' :: Maybe DeviceConfiguration
deviceConfiguration = Maybe DeviceConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateJob' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:taxDocuments:CreateJob' :: Maybe TaxDocuments
taxDocuments = Maybe TaxDocuments
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:CreateJob' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snowballCapacityPreference:CreateJob' :: Maybe SnowballCapacity
snowballCapacityPreference = Maybe SnowballCapacity
forall a. Maybe a
Prelude.Nothing
}
createJob_jobType :: Lens.Lens' CreateJob (Prelude.Maybe JobType)
createJob_jobType :: (Maybe JobType -> f (Maybe JobType)) -> CreateJob -> f CreateJob
createJob_jobType = (CreateJob -> Maybe JobType)
-> (CreateJob -> Maybe JobType -> CreateJob)
-> Lens CreateJob CreateJob (Maybe JobType) (Maybe 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 :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_kmsKeyARN = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
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_remoteManagement :: Lens.Lens' CreateJob (Prelude.Maybe RemoteManagement)
createJob_remoteManagement :: (Maybe RemoteManagement -> f (Maybe RemoteManagement))
-> CreateJob -> f CreateJob
createJob_remoteManagement = (CreateJob -> Maybe RemoteManagement)
-> (CreateJob -> Maybe RemoteManagement -> CreateJob)
-> Lens
CreateJob
CreateJob
(Maybe RemoteManagement)
(Maybe 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_notification :: Lens.Lens' CreateJob (Prelude.Maybe Notification)
createJob_notification :: (Maybe Notification -> f (Maybe Notification))
-> CreateJob -> f CreateJob
createJob_notification = (CreateJob -> Maybe Notification)
-> (CreateJob -> Maybe Notification -> CreateJob)
-> Lens
CreateJob CreateJob (Maybe Notification) (Maybe 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_forwardingAddressId :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_forwardingAddressId :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_forwardingAddressId = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
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_addressId :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_addressId :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_addressId = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
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_snowballType :: Lens.Lens' CreateJob (Prelude.Maybe SnowballType)
createJob_snowballType :: (Maybe SnowballType -> f (Maybe SnowballType))
-> CreateJob -> f CreateJob
createJob_snowballType = (CreateJob -> Maybe SnowballType)
-> (CreateJob -> Maybe SnowballType -> CreateJob)
-> Lens
CreateJob CreateJob (Maybe SnowballType) (Maybe 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_longTermPricingId :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_longTermPricingId :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_longTermPricingId = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
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_shippingOption :: Lens.Lens' CreateJob (Prelude.Maybe ShippingOption)
createJob_shippingOption :: (Maybe ShippingOption -> f (Maybe ShippingOption))
-> CreateJob -> f CreateJob
createJob_shippingOption = (CreateJob -> Maybe ShippingOption)
-> (CreateJob -> Maybe ShippingOption -> CreateJob)
-> Lens
CreateJob CreateJob (Maybe ShippingOption) (Maybe 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_resources :: Lens.Lens' CreateJob (Prelude.Maybe JobResource)
createJob_resources :: (Maybe JobResource -> f (Maybe JobResource))
-> CreateJob -> f CreateJob
createJob_resources = (CreateJob -> Maybe JobResource)
-> (CreateJob -> Maybe JobResource -> CreateJob)
-> Lens CreateJob CreateJob (Maybe JobResource) (Maybe JobResource)
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_onDeviceServiceConfiguration :: Lens.Lens' CreateJob (Prelude.Maybe OnDeviceServiceConfiguration)
createJob_onDeviceServiceConfiguration :: (Maybe OnDeviceServiceConfiguration
-> f (Maybe OnDeviceServiceConfiguration))
-> CreateJob -> f CreateJob
createJob_onDeviceServiceConfiguration = (CreateJob -> Maybe OnDeviceServiceConfiguration)
-> (CreateJob -> Maybe OnDeviceServiceConfiguration -> CreateJob)
-> Lens
CreateJob
CreateJob
(Maybe OnDeviceServiceConfiguration)
(Maybe 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_clusterId :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_clusterId :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_clusterId = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
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_deviceConfiguration :: Lens.Lens' CreateJob (Prelude.Maybe DeviceConfiguration)
createJob_deviceConfiguration :: (Maybe DeviceConfiguration -> f (Maybe DeviceConfiguration))
-> CreateJob -> f CreateJob
createJob_deviceConfiguration = (CreateJob -> Maybe DeviceConfiguration)
-> (CreateJob -> Maybe DeviceConfiguration -> CreateJob)
-> Lens
CreateJob
CreateJob
(Maybe DeviceConfiguration)
(Maybe 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_description :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_description :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_description = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
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_taxDocuments :: Lens.Lens' CreateJob (Prelude.Maybe TaxDocuments)
createJob_taxDocuments :: (Maybe TaxDocuments -> f (Maybe TaxDocuments))
-> CreateJob -> f CreateJob
createJob_taxDocuments = (CreateJob -> Maybe TaxDocuments)
-> (CreateJob -> Maybe TaxDocuments -> CreateJob)
-> Lens
CreateJob CreateJob (Maybe TaxDocuments) (Maybe 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)
createJob_roleARN :: Lens.Lens' CreateJob (Prelude.Maybe Prelude.Text)
createJob_roleARN :: (Maybe Text -> f (Maybe Text)) -> CreateJob -> f CreateJob
createJob_roleARN = (CreateJob -> Maybe Text)
-> (CreateJob -> Maybe Text -> CreateJob)
-> Lens CreateJob CreateJob (Maybe Text) (Maybe Text)
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_snowballCapacityPreference :: Lens.Lens' CreateJob (Prelude.Maybe SnowballCapacity)
createJob_snowballCapacityPreference :: (Maybe SnowballCapacity -> f (Maybe SnowballCapacity))
-> CreateJob -> f CreateJob
createJob_snowballCapacityPreference = (CreateJob -> Maybe SnowballCapacity)
-> (CreateJob -> Maybe SnowballCapacity -> CreateJob)
-> Lens
CreateJob
CreateJob
(Maybe SnowballCapacity)
(Maybe SnowballCapacity)
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)
instance Core.AWSRequest CreateJob where
type AWSResponse CreateJob = CreateJobResponse
request :: CreateJob -> Request CreateJob
request = Service -> CreateJob -> Request CreateJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateJob))
-> Logger
-> Service
-> Proxy CreateJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateJob)))
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 ->
Maybe Text -> Int -> CreateJobResponse
CreateJobResponse'
(Maybe Text -> Int -> CreateJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"JobId")
Either String (Int -> CreateJobResponse)
-> Either String Int -> Either String CreateJobResponse
forall (f :: * -> *) a b. Applicative f => 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 CreateJob
instance Prelude.NFData CreateJob
instance Core.ToHeaders CreateJob where
toHeaders :: CreateJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateJob -> 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.CreateJob" ::
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 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
snowballCapacityPreference :: Maybe SnowballCapacity
roleARN :: Maybe Text
taxDocuments :: Maybe TaxDocuments
description :: Maybe Text
deviceConfiguration :: Maybe DeviceConfiguration
clusterId :: Maybe Text
onDeviceServiceConfiguration :: Maybe OnDeviceServiceConfiguration
resources :: Maybe JobResource
shippingOption :: Maybe ShippingOption
longTermPricingId :: Maybe Text
snowballType :: Maybe SnowballType
addressId :: Maybe Text
forwardingAddressId :: Maybe Text
notification :: Maybe Notification
remoteManagement :: Maybe RemoteManagement
kmsKeyARN :: Maybe Text
jobType :: Maybe JobType
$sel:snowballCapacityPreference:CreateJob' :: CreateJob -> Maybe SnowballCapacity
$sel:roleARN:CreateJob' :: CreateJob -> Maybe Text
$sel:taxDocuments:CreateJob' :: CreateJob -> Maybe TaxDocuments
$sel:description:CreateJob' :: CreateJob -> Maybe Text
$sel:deviceConfiguration:CreateJob' :: CreateJob -> Maybe DeviceConfiguration
$sel:clusterId:CreateJob' :: CreateJob -> Maybe Text
$sel:onDeviceServiceConfiguration:CreateJob' :: CreateJob -> Maybe OnDeviceServiceConfiguration
$sel:resources:CreateJob' :: CreateJob -> Maybe JobResource
$sel:shippingOption:CreateJob' :: CreateJob -> Maybe ShippingOption
$sel:longTermPricingId:CreateJob' :: CreateJob -> Maybe Text
$sel:snowballType:CreateJob' :: CreateJob -> Maybe SnowballType
$sel:addressId:CreateJob' :: CreateJob -> Maybe Text
$sel:forwardingAddressId:CreateJob' :: CreateJob -> Maybe Text
$sel:notification:CreateJob' :: CreateJob -> Maybe Notification
$sel:remoteManagement:CreateJob' :: CreateJob -> Maybe RemoteManagement
$sel:kmsKeyARN:CreateJob' :: CreateJob -> Maybe Text
$sel:jobType:CreateJob' :: CreateJob -> Maybe JobType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"JobType" Text -> JobType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (JobType -> Pair) -> Maybe JobType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe JobType
jobType,
(Text
"KmsKeyARN" 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
kmsKeyARN,
(Text
"RemoteManagement" Text -> RemoteManagement -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(RemoteManagement -> Pair) -> Maybe RemoteManagement -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RemoteManagement
remoteManagement,
(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
"SnowballType" Text -> SnowballType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SnowballType -> Pair) -> Maybe SnowballType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SnowballType
snowballType,
(Text
"LongTermPricingId" 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
longTermPricingId,
(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
"ClusterId" 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
clusterId,
(Text
"DeviceConfiguration" Text -> DeviceConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DeviceConfiguration -> Pair)
-> Maybe DeviceConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeviceConfiguration
deviceConfiguration,
(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
"TaxDocuments" Text -> TaxDocuments -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TaxDocuments -> Pair) -> Maybe TaxDocuments -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TaxDocuments
taxDocuments,
(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
]
)
instance Core.ToPath CreateJob where
toPath :: CreateJob -> ByteString
toPath = ByteString -> CreateJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateJob where
toQuery :: CreateJob -> QueryString
toQuery = QueryString -> CreateJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(CreateJobResponse -> CreateJobResponse -> Bool)
-> (CreateJobResponse -> CreateJobResponse -> Bool)
-> Eq CreateJobResponse
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]
(Int -> ReadS CreateJobResponse)
-> ReadS [CreateJobResponse]
-> ReadPrec CreateJobResponse
-> ReadPrec [CreateJobResponse]
-> Read 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
(Int -> CreateJobResponse -> ShowS)
-> (CreateJobResponse -> String)
-> ([CreateJobResponse] -> ShowS)
-> Show CreateJobResponse
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. CreateJobResponse -> Rep CreateJobResponse x)
-> (forall x. Rep CreateJobResponse x -> CreateJobResponse)
-> Generic CreateJobResponse
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' :: Maybe Text -> Int -> CreateJobResponse
CreateJobResponse'
{ $sel:jobId:CreateJobResponse' :: Maybe Text
jobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createJobResponse_jobId :: Lens.Lens' CreateJobResponse (Prelude.Maybe Prelude.Text)
createJobResponse_jobId :: (Maybe Text -> f (Maybe Text))
-> CreateJobResponse -> f CreateJobResponse
createJobResponse_jobId = (CreateJobResponse -> Maybe Text)
-> (CreateJobResponse -> Maybe Text -> CreateJobResponse)
-> Lens
CreateJobResponse CreateJobResponse (Maybe Text) (Maybe Text)
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 :: (Int -> f Int) -> CreateJobResponse -> f CreateJobResponse
createJobResponse_httpStatus = (CreateJobResponse -> Int)
-> (CreateJobResponse -> Int -> CreateJobResponse)
-> Lens CreateJobResponse CreateJobResponse Int Int
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