{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Snowball.CreateJob
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a job to import or export data between Amazon S3 and your
-- on-premises data center. Your AWS account must have the right trust
-- policies and permissions in place to create a job for a Snow device. If
-- you\'re creating a job for a node in a cluster, you only need to provide
-- the @clusterId@ value; the other job attributes are inherited from the
-- cluster.
--
-- Only the Snowball; Edge device type is supported when ordering clustered
-- jobs.
--
-- The device capacity is optional.
--
-- Availability of device types differ by AWS Region. For more information
-- about Region availability, see
-- <https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/?p=ngi&loc=4 AWS Regional Services>.
--
-- __AWS Snow Family device types and their capacities.__
--
-- -   Snow Family device type: __SNC1_SSD__
--
--     -   Capacity: T14
--
--     -   Description: Snowcone
--
-- -   Snow Family device type: __SNC1_HDD__
--
--     -   Capacity: T8
--
--     -   Description: Snowcone
--
-- -   Device type: __EDGE_S__
--
--     -   Capacity: T98
--
--     -   Description: Snowball Edge Storage Optimized for data transfer
--         only
--
-- -   Device type: __EDGE_CG__
--
--     -   Capacity: T42
--
--     -   Description: Snowball Edge Compute Optimized with GPU
--
-- -   Device type: __EDGE_C__
--
--     -   Capacity: T42
--
--     -   Description: Snowball Edge Compute Optimized without GPU
--
-- -   Device type: __EDGE__
--
--     -   Capacity: T100
--
--     -   Description: Snowball Edge Storage Optimized with EC2 Compute
--
-- -   Device type: __STANDARD__
--
--     -   Capacity: T50
--
--     -   Description: Original Snowball device
--
--         This device is only available in the Ningxia, Beijing, and
--         Singapore AWS Regions.
--
-- -   Device type: __STANDARD__
--
--     -   Capacity: T80
--
--     -   Description: Original Snowball device
--
--         This device is only available in the Ningxia, Beijing, and
--         Singapore AWS Regions.
module Amazonka.Snowball.CreateJob
  ( -- * Creating a Request
    CreateJob (..),
    newCreateJob,

    -- * Request Lenses
    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,

    -- * Destructuring the Response
    CreateJobResponse (..),
    newCreateJobResponse,

    -- * Response Lenses
    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

-- | /See:/ 'newCreateJob' smart constructor.
data CreateJob = CreateJob'
  { -- | Defines the type of job that you\'re creating.
    CreateJob -> Maybe JobType
jobType :: Prelude.Maybe JobType,
    -- | The @KmsKeyARN@ that you want to associate with this job. @KmsKeyARN@s
    -- are created using the
    -- <https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html CreateKey>
    -- AWS Key Management Service (KMS) API action.
    CreateJob -> Maybe Text
kmsKeyARN :: Prelude.Maybe Prelude.Text,
    -- | Allows you to securely operate and manage Snowcone devices remotely from
    -- outside of your internal network. When set to @INSTALLED_AUTOSTART@,
    -- remote management will automatically be available when the device
    -- arrives at your location. Otherwise, you need to use the Snowball Client
    -- to manage the device.
    CreateJob -> Maybe RemoteManagement
remoteManagement :: Prelude.Maybe RemoteManagement,
    -- | Defines the Amazon Simple Notification Service (Amazon SNS) notification
    -- settings for this job.
    CreateJob -> Maybe Notification
notification :: Prelude.Maybe Notification,
    -- | The forwarding address ID for a job. This field is not supported in most
    -- Regions.
    CreateJob -> Maybe Text
forwardingAddressId :: Prelude.Maybe Prelude.Text,
    -- | The ID for the address that you want the Snow device shipped to.
    CreateJob -> Maybe Text
addressId :: Prelude.Maybe Prelude.Text,
    -- | The type of AWS Snow Family device to use for this job.
    --
    -- For cluster jobs, AWS Snow Family currently supports only the @EDGE@
    -- device type.
    --
    -- The type of AWS Snow device to use for this job. Currently, the only
    -- supported device type for cluster jobs is @EDGE@.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/snowball/latest/developer-guide/device-differences.html Snowball Edge Device Options>
    -- in the Snowball Edge Developer Guide.
    --
    -- For more information, see
    -- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
    -- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
    -- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
    -- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
    CreateJob -> Maybe SnowballType
snowballType :: Prelude.Maybe SnowballType,
    -- | The ID of the long-term pricing type for the device.
    CreateJob -> Maybe Text
longTermPricingId :: Prelude.Maybe Prelude.Text,
    -- | The shipping speed for this job. This speed doesn\'t dictate how soon
    -- you\'ll get the Snow device, rather it represents how quickly the Snow
    -- device moves to its destination while in transit. Regional shipping
    -- speeds are as follows:
    --
    -- -   In Australia, you have access to express shipping. Typically, Snow
    --     devices shipped express are delivered in about a day.
    --
    -- -   In the European Union (EU), you have access to express shipping.
    --     Typically, Snow devices shipped express are delivered in about a
    --     day. In addition, most countries in the EU have access to standard
    --     shipping, which typically takes less than a week, one way.
    --
    -- -   In India, Snow devices are delivered in one to seven days.
    --
    -- -   In the US, you have access to one-day shipping and two-day shipping.
    CreateJob -> Maybe ShippingOption
shippingOption :: Prelude.Maybe ShippingOption,
    -- | Defines the Amazon S3 buckets associated with this job.
    --
    -- With @IMPORT@ jobs, you specify the bucket or buckets that your
    -- transferred data will be imported into.
    --
    -- With @EXPORT@ jobs, you specify the bucket or buckets that your
    -- transferred data will be exported from. Optionally, you can also specify
    -- a @KeyRange@ value. If you choose to export a range, you define the
    -- length of the range by providing either an inclusive @BeginMarker@
    -- value, an inclusive @EndMarker@ value, or both. Ranges are UTF-8 binary
    -- sorted.
    CreateJob -> Maybe JobResource
resources :: Prelude.Maybe JobResource,
    -- | Specifies the service or services on the Snow Family device that your
    -- transferred data will be exported from or imported into. AWS Snow Family
    -- supports Amazon S3 and NFS (Network File System).
    CreateJob -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration :: Prelude.Maybe OnDeviceServiceConfiguration,
    -- | The ID of a cluster. If you\'re creating a job for a node in a cluster,
    -- you need to provide only this @clusterId@ value. The other job
    -- attributes are inherited from the cluster.
    CreateJob -> Maybe Text
clusterId :: Prelude.Maybe Prelude.Text,
    -- | Defines the device configuration for an AWS Snowcone job.
    --
    -- For more information, see
    -- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
    -- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
    -- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
    -- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
    CreateJob -> Maybe DeviceConfiguration
deviceConfiguration :: Prelude.Maybe DeviceConfiguration,
    -- | Defines an optional description of this specific job, for example
    -- @Important Photos 2016-08-11@.
    CreateJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tax documents required in your AWS Region.
    CreateJob -> Maybe TaxDocuments
taxDocuments :: Prelude.Maybe TaxDocuments,
    -- | The @RoleARN@ that you want to associate with this job. @RoleArn@s are
    -- created using the
    -- <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html CreateRole>
    -- AWS Identity and Access Management (IAM) API action.
    CreateJob -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | If your job is being created in one of the US regions, you have the
    -- option of specifying what size Snow device you\'d like for this job. In
    -- all other regions, Snowballs come with 80 TB in storage capacity.
    --
    -- For more information, see
    -- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
    -- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
    -- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
    -- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
    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)

-- |
-- Create a value of 'CreateJob' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'jobType', 'createJob_jobType' - Defines the type of job that you\'re creating.
--
-- 'kmsKeyARN', 'createJob_kmsKeyARN' - The @KmsKeyARN@ that you want to associate with this job. @KmsKeyARN@s
-- are created using the
-- <https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html CreateKey>
-- AWS Key Management Service (KMS) API action.
--
-- 'remoteManagement', 'createJob_remoteManagement' - Allows you to securely operate and manage Snowcone devices remotely from
-- outside of your internal network. When set to @INSTALLED_AUTOSTART@,
-- remote management will automatically be available when the device
-- arrives at your location. Otherwise, you need to use the Snowball Client
-- to manage the device.
--
-- 'notification', 'createJob_notification' - Defines the Amazon Simple Notification Service (Amazon SNS) notification
-- settings for this job.
--
-- 'forwardingAddressId', 'createJob_forwardingAddressId' - The forwarding address ID for a job. This field is not supported in most
-- Regions.
--
-- 'addressId', 'createJob_addressId' - The ID for the address that you want the Snow device shipped to.
--
-- 'snowballType', 'createJob_snowballType' - The type of AWS Snow Family device to use for this job.
--
-- For cluster jobs, AWS Snow Family currently supports only the @EDGE@
-- device type.
--
-- The type of AWS Snow device to use for this job. Currently, the only
-- supported device type for cluster jobs is @EDGE@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/snowball/latest/developer-guide/device-differences.html Snowball Edge Device Options>
-- in the Snowball Edge Developer Guide.
--
-- For more information, see
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
--
-- 'longTermPricingId', 'createJob_longTermPricingId' - The ID of the long-term pricing type for the device.
--
-- 'shippingOption', 'createJob_shippingOption' - The shipping speed for this job. This speed doesn\'t dictate how soon
-- you\'ll get the Snow device, rather it represents how quickly the Snow
-- device moves to its destination while in transit. Regional shipping
-- speeds are as follows:
--
-- -   In Australia, you have access to express shipping. Typically, Snow
--     devices shipped express are delivered in about a day.
--
-- -   In the European Union (EU), you have access to express shipping.
--     Typically, Snow devices shipped express are delivered in about a
--     day. In addition, most countries in the EU have access to standard
--     shipping, which typically takes less than a week, one way.
--
-- -   In India, Snow devices are delivered in one to seven days.
--
-- -   In the US, you have access to one-day shipping and two-day shipping.
--
-- 'resources', 'createJob_resources' - Defines the Amazon S3 buckets associated with this job.
--
-- With @IMPORT@ jobs, you specify the bucket or buckets that your
-- transferred data will be imported into.
--
-- With @EXPORT@ jobs, you specify the bucket or buckets that your
-- transferred data will be exported from. Optionally, you can also specify
-- a @KeyRange@ value. If you choose to export a range, you define the
-- length of the range by providing either an inclusive @BeginMarker@
-- value, an inclusive @EndMarker@ value, or both. Ranges are UTF-8 binary
-- sorted.
--
-- 'onDeviceServiceConfiguration', 'createJob_onDeviceServiceConfiguration' - Specifies the service or services on the Snow Family device that your
-- transferred data will be exported from or imported into. AWS Snow Family
-- supports Amazon S3 and NFS (Network File System).
--
-- 'clusterId', 'createJob_clusterId' - The ID of a cluster. If you\'re creating a job for a node in a cluster,
-- you need to provide only this @clusterId@ value. The other job
-- attributes are inherited from the cluster.
--
-- 'deviceConfiguration', 'createJob_deviceConfiguration' - Defines the device configuration for an AWS Snowcone job.
--
-- For more information, see
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
--
-- 'description', 'createJob_description' - Defines an optional description of this specific job, for example
-- @Important Photos 2016-08-11@.
--
-- 'taxDocuments', 'createJob_taxDocuments' - The tax documents required in your AWS Region.
--
-- 'roleARN', 'createJob_roleARN' - The @RoleARN@ that you want to associate with this job. @RoleArn@s are
-- created using the
-- <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html CreateRole>
-- AWS Identity and Access Management (IAM) API action.
--
-- 'snowballCapacityPreference', 'createJob_snowballCapacityPreference' - If your job is being created in one of the US regions, you have the
-- option of specifying what size Snow device you\'d like for this job. In
-- all other regions, Snowballs come with 80 TB in storage capacity.
--
-- For more information, see
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
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
    }

-- | Defines the type of job that you\'re creating.
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)

-- | The @KmsKeyARN@ that you want to associate with this job. @KmsKeyARN@s
-- are created using the
-- <https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html CreateKey>
-- AWS Key Management Service (KMS) API action.
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)

-- | Allows you to securely operate and manage Snowcone devices remotely from
-- outside of your internal network. When set to @INSTALLED_AUTOSTART@,
-- remote management will automatically be available when the device
-- arrives at your location. Otherwise, you need to use the Snowball Client
-- to manage the device.
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)

-- | Defines the Amazon Simple Notification Service (Amazon SNS) notification
-- settings for this job.
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)

-- | The forwarding address ID for a job. This field is not supported in most
-- Regions.
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)

-- | The ID for the address that you want the Snow device shipped to.
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)

-- | The type of AWS Snow Family device to use for this job.
--
-- For cluster jobs, AWS Snow Family currently supports only the @EDGE@
-- device type.
--
-- The type of AWS Snow device to use for this job. Currently, the only
-- supported device type for cluster jobs is @EDGE@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/snowball/latest/developer-guide/device-differences.html Snowball Edge Device Options>
-- in the Snowball Edge Developer Guide.
--
-- For more information, see
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
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)

-- | The ID of the long-term pricing type for the device.
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)

-- | The shipping speed for this job. This speed doesn\'t dictate how soon
-- you\'ll get the Snow device, rather it represents how quickly the Snow
-- device moves to its destination while in transit. Regional shipping
-- speeds are as follows:
--
-- -   In Australia, you have access to express shipping. Typically, Snow
--     devices shipped express are delivered in about a day.
--
-- -   In the European Union (EU), you have access to express shipping.
--     Typically, Snow devices shipped express are delivered in about a
--     day. In addition, most countries in the EU have access to standard
--     shipping, which typically takes less than a week, one way.
--
-- -   In India, Snow devices are delivered in one to seven days.
--
-- -   In the US, you have access to one-day shipping and two-day shipping.
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)

-- | Defines the Amazon S3 buckets associated with this job.
--
-- With @IMPORT@ jobs, you specify the bucket or buckets that your
-- transferred data will be imported into.
--
-- With @EXPORT@ jobs, you specify the bucket or buckets that your
-- transferred data will be exported from. Optionally, you can also specify
-- a @KeyRange@ value. If you choose to export a range, you define the
-- length of the range by providing either an inclusive @BeginMarker@
-- value, an inclusive @EndMarker@ value, or both. Ranges are UTF-8 binary
-- sorted.
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)

-- | Specifies the service or services on the Snow Family device that your
-- transferred data will be exported from or imported into. AWS Snow Family
-- supports Amazon S3 and NFS (Network File System).
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)

-- | The ID of a cluster. If you\'re creating a job for a node in a cluster,
-- you need to provide only this @clusterId@ value. The other job
-- attributes are inherited from the cluster.
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)

-- | Defines the device configuration for an AWS Snowcone job.
--
-- For more information, see
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
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)

-- | Defines an optional description of this specific job, for example
-- @Important Photos 2016-08-11@.
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)

-- | The tax documents required in your AWS Region.
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)

-- | The @RoleARN@ that you want to associate with this job. @RoleArn@s are
-- created using the
-- <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html CreateRole>
-- AWS Identity and Access Management (IAM) API action.
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)

-- | If your job is being created in one of the US regions, you have the
-- option of specifying what size Snow device you\'d like for this job. In
-- all other regions, Snowballs come with 80 TB in storage capacity.
--
-- For more information, see
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/snowcone-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/ or
-- \"https:\/\/docs.aws.amazon.com\/snowball\/latest\/developer-guide\/snow-device-types.html\"
-- (Snow Family Devices and Capacity) in the /Snowcone User Guide/.
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

-- | /See:/ 'newCreateJobResponse' smart constructor.
data CreateJobResponse = CreateJobResponse'
  { -- | The automatically generated ID for a job, for example
    -- @JID123e4567-e89b-12d3-a456-426655440000@.
    CreateJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    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)

-- |
-- Create a value of 'CreateJobResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'jobId', 'createJobResponse_jobId' - The automatically generated ID for a job, for example
-- @JID123e4567-e89b-12d3-a456-426655440000@.
--
-- 'httpStatus', 'createJobResponse_httpStatus' - The response's http status code.
newCreateJobResponse ::
  -- | 'httpStatus'
  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_
    }

-- | The automatically generated ID for a job, for example
-- @JID123e4567-e89b-12d3-a456-426655440000@.
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)

-- | The response's http status code.
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