{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.ClusterMetadata
-- 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)
module Amazonka.Snowball.Types.ClusterMetadata where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Snowball.Types.ClusterState
import Amazonka.Snowball.Types.JobResource
import Amazonka.Snowball.Types.JobType
import Amazonka.Snowball.Types.Notification
import Amazonka.Snowball.Types.OnDeviceServiceConfiguration
import Amazonka.Snowball.Types.ShippingOption
import Amazonka.Snowball.Types.SnowballType
import Amazonka.Snowball.Types.TaxDocuments

-- | Contains metadata about a specific cluster.
--
-- /See:/ 'newClusterMetadata' smart constructor.
data ClusterMetadata = ClusterMetadata'
  { -- | The type of job for this cluster. Currently, the only job type supported
    -- for clusters is @LOCAL_USE@.
    ClusterMetadata -> Maybe JobType
jobType :: Prelude.Maybe JobType,
    -- | The @KmsKeyARN@ Amazon Resource Name (ARN) associated with this cluster.
    -- This ARN was created using the
    -- <https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html CreateKey>
    -- API action in AWS Key Management Service (AWS KMS).
    ClusterMetadata -> Maybe Text
kmsKeyARN :: Prelude.Maybe Prelude.Text,
    -- | The current status of the cluster.
    ClusterMetadata -> Maybe ClusterState
clusterState :: Prelude.Maybe ClusterState,
    -- | The Amazon Simple Notification Service (Amazon SNS) notification
    -- settings for this cluster.
    ClusterMetadata -> Maybe Notification
notification :: Prelude.Maybe Notification,
    -- | The ID of the address that you want a cluster shipped to, after it will
    -- be shipped to its primary address. This field is not supported in most
    -- regions.
    ClusterMetadata -> Maybe Text
forwardingAddressId :: Prelude.Maybe Prelude.Text,
    -- | The automatically generated ID for a specific address.
    ClusterMetadata -> Maybe Text
addressId :: Prelude.Maybe Prelude.Text,
    -- | The type of AWS Snow device to use for this cluster.
    --
    -- For cluster jobs, AWS Snow Family currently supports only the @EDGE@
    -- device type.
    ClusterMetadata -> Maybe SnowballType
snowballType :: Prelude.Maybe SnowballType,
    -- | The shipping speed for each node in this cluster. This speed doesn\'t
    -- dictate how soon you\'ll get each device, rather it represents how
    -- quickly each device moves to its destination while in transit. Regional
    -- shipping speeds are as follows:
    --
    -- -   In Australia, you have access to express shipping. Typically,
    --     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.
    ClusterMetadata -> Maybe ShippingOption
shippingOption :: Prelude.Maybe ShippingOption,
    -- | The arrays of JobResource objects that can include updated S3Resource
    -- objects or LambdaResource objects.
    ClusterMetadata -> Maybe JobResource
resources :: Prelude.Maybe JobResource,
    -- | Represents metadata and configuration settings for services on an AWS
    -- Snow Family device.
    ClusterMetadata -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration :: Prelude.Maybe OnDeviceServiceConfiguration,
    -- | The automatically generated ID for a cluster.
    ClusterMetadata -> Maybe Text
clusterId :: Prelude.Maybe Prelude.Text,
    -- | The creation date for this cluster.
    ClusterMetadata -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The optional description of the cluster.
    ClusterMetadata -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tax documents required in your AWS Region.
    ClusterMetadata -> Maybe TaxDocuments
taxDocuments :: Prelude.Maybe TaxDocuments,
    -- | The role ARN associated with this cluster. This ARN was created using
    -- the
    -- <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html CreateRole>
    -- API action in AWS Identity and Access Management (IAM).
    ClusterMetadata -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text
  }
  deriving (ClusterMetadata -> ClusterMetadata -> Bool
(ClusterMetadata -> ClusterMetadata -> Bool)
-> (ClusterMetadata -> ClusterMetadata -> Bool)
-> Eq ClusterMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterMetadata -> ClusterMetadata -> Bool
$c/= :: ClusterMetadata -> ClusterMetadata -> Bool
== :: ClusterMetadata -> ClusterMetadata -> Bool
$c== :: ClusterMetadata -> ClusterMetadata -> Bool
Prelude.Eq, ReadPrec [ClusterMetadata]
ReadPrec ClusterMetadata
Int -> ReadS ClusterMetadata
ReadS [ClusterMetadata]
(Int -> ReadS ClusterMetadata)
-> ReadS [ClusterMetadata]
-> ReadPrec ClusterMetadata
-> ReadPrec [ClusterMetadata]
-> Read ClusterMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterMetadata]
$creadListPrec :: ReadPrec [ClusterMetadata]
readPrec :: ReadPrec ClusterMetadata
$creadPrec :: ReadPrec ClusterMetadata
readList :: ReadS [ClusterMetadata]
$creadList :: ReadS [ClusterMetadata]
readsPrec :: Int -> ReadS ClusterMetadata
$creadsPrec :: Int -> ReadS ClusterMetadata
Prelude.Read, Int -> ClusterMetadata -> ShowS
[ClusterMetadata] -> ShowS
ClusterMetadata -> String
(Int -> ClusterMetadata -> ShowS)
-> (ClusterMetadata -> String)
-> ([ClusterMetadata] -> ShowS)
-> Show ClusterMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterMetadata] -> ShowS
$cshowList :: [ClusterMetadata] -> ShowS
show :: ClusterMetadata -> String
$cshow :: ClusterMetadata -> String
showsPrec :: Int -> ClusterMetadata -> ShowS
$cshowsPrec :: Int -> ClusterMetadata -> ShowS
Prelude.Show, (forall x. ClusterMetadata -> Rep ClusterMetadata x)
-> (forall x. Rep ClusterMetadata x -> ClusterMetadata)
-> Generic ClusterMetadata
forall x. Rep ClusterMetadata x -> ClusterMetadata
forall x. ClusterMetadata -> Rep ClusterMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterMetadata x -> ClusterMetadata
$cfrom :: forall x. ClusterMetadata -> Rep ClusterMetadata x
Prelude.Generic)

-- |
-- Create a value of 'ClusterMetadata' 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', 'clusterMetadata_jobType' - The type of job for this cluster. Currently, the only job type supported
-- for clusters is @LOCAL_USE@.
--
-- 'kmsKeyARN', 'clusterMetadata_kmsKeyARN' - The @KmsKeyARN@ Amazon Resource Name (ARN) associated with this cluster.
-- This ARN was created using the
-- <https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html CreateKey>
-- API action in AWS Key Management Service (AWS KMS).
--
-- 'clusterState', 'clusterMetadata_clusterState' - The current status of the cluster.
--
-- 'notification', 'clusterMetadata_notification' - The Amazon Simple Notification Service (Amazon SNS) notification
-- settings for this cluster.
--
-- 'forwardingAddressId', 'clusterMetadata_forwardingAddressId' - The ID of the address that you want a cluster shipped to, after it will
-- be shipped to its primary address. This field is not supported in most
-- regions.
--
-- 'addressId', 'clusterMetadata_addressId' - The automatically generated ID for a specific address.
--
-- 'snowballType', 'clusterMetadata_snowballType' - The type of AWS Snow device to use for this cluster.
--
-- For cluster jobs, AWS Snow Family currently supports only the @EDGE@
-- device type.
--
-- 'shippingOption', 'clusterMetadata_shippingOption' - The shipping speed for each node in this cluster. This speed doesn\'t
-- dictate how soon you\'ll get each device, rather it represents how
-- quickly each device moves to its destination while in transit. Regional
-- shipping speeds are as follows:
--
-- -   In Australia, you have access to express shipping. Typically,
--     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', 'clusterMetadata_resources' - The arrays of JobResource objects that can include updated S3Resource
-- objects or LambdaResource objects.
--
-- 'onDeviceServiceConfiguration', 'clusterMetadata_onDeviceServiceConfiguration' - Represents metadata and configuration settings for services on an AWS
-- Snow Family device.
--
-- 'clusterId', 'clusterMetadata_clusterId' - The automatically generated ID for a cluster.
--
-- 'creationDate', 'clusterMetadata_creationDate' - The creation date for this cluster.
--
-- 'description', 'clusterMetadata_description' - The optional description of the cluster.
--
-- 'taxDocuments', 'clusterMetadata_taxDocuments' - The tax documents required in your AWS Region.
--
-- 'roleARN', 'clusterMetadata_roleARN' - The role ARN associated with this cluster. This ARN was created using
-- the
-- <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html CreateRole>
-- API action in AWS Identity and Access Management (IAM).
newClusterMetadata ::
  ClusterMetadata
newClusterMetadata :: ClusterMetadata
newClusterMetadata =
  ClusterMetadata' :: Maybe JobType
-> Maybe Text
-> Maybe ClusterState
-> Maybe Notification
-> Maybe Text
-> Maybe Text
-> Maybe SnowballType
-> Maybe ShippingOption
-> Maybe JobResource
-> Maybe OnDeviceServiceConfiguration
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe TaxDocuments
-> Maybe Text
-> ClusterMetadata
ClusterMetadata'
    { $sel:jobType:ClusterMetadata' :: Maybe JobType
jobType = Maybe JobType
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyARN:ClusterMetadata' :: Maybe Text
kmsKeyARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterState:ClusterMetadata' :: Maybe ClusterState
clusterState = Maybe ClusterState
forall a. Maybe a
Prelude.Nothing,
      $sel:notification:ClusterMetadata' :: Maybe Notification
notification = Maybe Notification
forall a. Maybe a
Prelude.Nothing,
      $sel:forwardingAddressId:ClusterMetadata' :: Maybe Text
forwardingAddressId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:addressId:ClusterMetadata' :: Maybe Text
addressId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snowballType:ClusterMetadata' :: Maybe SnowballType
snowballType = Maybe SnowballType
forall a. Maybe a
Prelude.Nothing,
      $sel:shippingOption:ClusterMetadata' :: Maybe ShippingOption
shippingOption = Maybe ShippingOption
forall a. Maybe a
Prelude.Nothing,
      $sel:resources:ClusterMetadata' :: Maybe JobResource
resources = Maybe JobResource
forall a. Maybe a
Prelude.Nothing,
      $sel:onDeviceServiceConfiguration:ClusterMetadata' :: Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration = Maybe OnDeviceServiceConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterId:ClusterMetadata' :: Maybe Text
clusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:ClusterMetadata' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ClusterMetadata' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taxDocuments:ClusterMetadata' :: Maybe TaxDocuments
taxDocuments = Maybe TaxDocuments
forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:ClusterMetadata' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The type of job for this cluster. Currently, the only job type supported
-- for clusters is @LOCAL_USE@.
clusterMetadata_jobType :: Lens.Lens' ClusterMetadata (Prelude.Maybe JobType)
clusterMetadata_jobType :: (Maybe JobType -> f (Maybe JobType))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_jobType = (ClusterMetadata -> Maybe JobType)
-> (ClusterMetadata -> Maybe JobType -> ClusterMetadata)
-> Lens
     ClusterMetadata ClusterMetadata (Maybe JobType) (Maybe JobType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe JobType
jobType :: Maybe JobType
$sel:jobType:ClusterMetadata' :: ClusterMetadata -> Maybe JobType
jobType} -> Maybe JobType
jobType) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe JobType
a -> ClusterMetadata
s {$sel:jobType:ClusterMetadata' :: Maybe JobType
jobType = Maybe JobType
a} :: ClusterMetadata)

-- | The @KmsKeyARN@ Amazon Resource Name (ARN) associated with this cluster.
-- This ARN was created using the
-- <https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html CreateKey>
-- API action in AWS Key Management Service (AWS KMS).
clusterMetadata_kmsKeyARN :: Lens.Lens' ClusterMetadata (Prelude.Maybe Prelude.Text)
clusterMetadata_kmsKeyARN :: (Maybe Text -> f (Maybe Text))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_kmsKeyARN = (ClusterMetadata -> Maybe Text)
-> (ClusterMetadata -> Maybe Text -> ClusterMetadata)
-> Lens ClusterMetadata ClusterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe Text
kmsKeyARN :: Maybe Text
$sel:kmsKeyARN:ClusterMetadata' :: ClusterMetadata -> Maybe Text
kmsKeyARN} -> Maybe Text
kmsKeyARN) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe Text
a -> ClusterMetadata
s {$sel:kmsKeyARN:ClusterMetadata' :: Maybe Text
kmsKeyARN = Maybe Text
a} :: ClusterMetadata)

-- | The current status of the cluster.
clusterMetadata_clusterState :: Lens.Lens' ClusterMetadata (Prelude.Maybe ClusterState)
clusterMetadata_clusterState :: (Maybe ClusterState -> f (Maybe ClusterState))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_clusterState = (ClusterMetadata -> Maybe ClusterState)
-> (ClusterMetadata -> Maybe ClusterState -> ClusterMetadata)
-> Lens
     ClusterMetadata
     ClusterMetadata
     (Maybe ClusterState)
     (Maybe ClusterState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe ClusterState
clusterState :: Maybe ClusterState
$sel:clusterState:ClusterMetadata' :: ClusterMetadata -> Maybe ClusterState
clusterState} -> Maybe ClusterState
clusterState) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe ClusterState
a -> ClusterMetadata
s {$sel:clusterState:ClusterMetadata' :: Maybe ClusterState
clusterState = Maybe ClusterState
a} :: ClusterMetadata)

-- | The Amazon Simple Notification Service (Amazon SNS) notification
-- settings for this cluster.
clusterMetadata_notification :: Lens.Lens' ClusterMetadata (Prelude.Maybe Notification)
clusterMetadata_notification :: (Maybe Notification -> f (Maybe Notification))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_notification = (ClusterMetadata -> Maybe Notification)
-> (ClusterMetadata -> Maybe Notification -> ClusterMetadata)
-> Lens
     ClusterMetadata
     ClusterMetadata
     (Maybe Notification)
     (Maybe Notification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe Notification
notification :: Maybe Notification
$sel:notification:ClusterMetadata' :: ClusterMetadata -> Maybe Notification
notification} -> Maybe Notification
notification) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe Notification
a -> ClusterMetadata
s {$sel:notification:ClusterMetadata' :: Maybe Notification
notification = Maybe Notification
a} :: ClusterMetadata)

-- | The ID of the address that you want a cluster shipped to, after it will
-- be shipped to its primary address. This field is not supported in most
-- regions.
clusterMetadata_forwardingAddressId :: Lens.Lens' ClusterMetadata (Prelude.Maybe Prelude.Text)
clusterMetadata_forwardingAddressId :: (Maybe Text -> f (Maybe Text))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_forwardingAddressId = (ClusterMetadata -> Maybe Text)
-> (ClusterMetadata -> Maybe Text -> ClusterMetadata)
-> Lens ClusterMetadata ClusterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe Text
forwardingAddressId :: Maybe Text
$sel:forwardingAddressId:ClusterMetadata' :: ClusterMetadata -> Maybe Text
forwardingAddressId} -> Maybe Text
forwardingAddressId) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe Text
a -> ClusterMetadata
s {$sel:forwardingAddressId:ClusterMetadata' :: Maybe Text
forwardingAddressId = Maybe Text
a} :: ClusterMetadata)

-- | The automatically generated ID for a specific address.
clusterMetadata_addressId :: Lens.Lens' ClusterMetadata (Prelude.Maybe Prelude.Text)
clusterMetadata_addressId :: (Maybe Text -> f (Maybe Text))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_addressId = (ClusterMetadata -> Maybe Text)
-> (ClusterMetadata -> Maybe Text -> ClusterMetadata)
-> Lens ClusterMetadata ClusterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe Text
addressId :: Maybe Text
$sel:addressId:ClusterMetadata' :: ClusterMetadata -> Maybe Text
addressId} -> Maybe Text
addressId) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe Text
a -> ClusterMetadata
s {$sel:addressId:ClusterMetadata' :: Maybe Text
addressId = Maybe Text
a} :: ClusterMetadata)

-- | The type of AWS Snow device to use for this cluster.
--
-- For cluster jobs, AWS Snow Family currently supports only the @EDGE@
-- device type.
clusterMetadata_snowballType :: Lens.Lens' ClusterMetadata (Prelude.Maybe SnowballType)
clusterMetadata_snowballType :: (Maybe SnowballType -> f (Maybe SnowballType))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_snowballType = (ClusterMetadata -> Maybe SnowballType)
-> (ClusterMetadata -> Maybe SnowballType -> ClusterMetadata)
-> Lens
     ClusterMetadata
     ClusterMetadata
     (Maybe SnowballType)
     (Maybe SnowballType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe SnowballType
snowballType :: Maybe SnowballType
$sel:snowballType:ClusterMetadata' :: ClusterMetadata -> Maybe SnowballType
snowballType} -> Maybe SnowballType
snowballType) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe SnowballType
a -> ClusterMetadata
s {$sel:snowballType:ClusterMetadata' :: Maybe SnowballType
snowballType = Maybe SnowballType
a} :: ClusterMetadata)

-- | The shipping speed for each node in this cluster. This speed doesn\'t
-- dictate how soon you\'ll get each device, rather it represents how
-- quickly each device moves to its destination while in transit. Regional
-- shipping speeds are as follows:
--
-- -   In Australia, you have access to express shipping. Typically,
--     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.
clusterMetadata_shippingOption :: Lens.Lens' ClusterMetadata (Prelude.Maybe ShippingOption)
clusterMetadata_shippingOption :: (Maybe ShippingOption -> f (Maybe ShippingOption))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_shippingOption = (ClusterMetadata -> Maybe ShippingOption)
-> (ClusterMetadata -> Maybe ShippingOption -> ClusterMetadata)
-> Lens
     ClusterMetadata
     ClusterMetadata
     (Maybe ShippingOption)
     (Maybe ShippingOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe ShippingOption
shippingOption :: Maybe ShippingOption
$sel:shippingOption:ClusterMetadata' :: ClusterMetadata -> Maybe ShippingOption
shippingOption} -> Maybe ShippingOption
shippingOption) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe ShippingOption
a -> ClusterMetadata
s {$sel:shippingOption:ClusterMetadata' :: Maybe ShippingOption
shippingOption = Maybe ShippingOption
a} :: ClusterMetadata)

-- | The arrays of JobResource objects that can include updated S3Resource
-- objects or LambdaResource objects.
clusterMetadata_resources :: Lens.Lens' ClusterMetadata (Prelude.Maybe JobResource)
clusterMetadata_resources :: (Maybe JobResource -> f (Maybe JobResource))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_resources = (ClusterMetadata -> Maybe JobResource)
-> (ClusterMetadata -> Maybe JobResource -> ClusterMetadata)
-> Lens
     ClusterMetadata
     ClusterMetadata
     (Maybe JobResource)
     (Maybe JobResource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe JobResource
resources :: Maybe JobResource
$sel:resources:ClusterMetadata' :: ClusterMetadata -> Maybe JobResource
resources} -> Maybe JobResource
resources) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe JobResource
a -> ClusterMetadata
s {$sel:resources:ClusterMetadata' :: Maybe JobResource
resources = Maybe JobResource
a} :: ClusterMetadata)

-- | Represents metadata and configuration settings for services on an AWS
-- Snow Family device.
clusterMetadata_onDeviceServiceConfiguration :: Lens.Lens' ClusterMetadata (Prelude.Maybe OnDeviceServiceConfiguration)
clusterMetadata_onDeviceServiceConfiguration :: (Maybe OnDeviceServiceConfiguration
 -> f (Maybe OnDeviceServiceConfiguration))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_onDeviceServiceConfiguration = (ClusterMetadata -> Maybe OnDeviceServiceConfiguration)
-> (ClusterMetadata
    -> Maybe OnDeviceServiceConfiguration -> ClusterMetadata)
-> Lens
     ClusterMetadata
     ClusterMetadata
     (Maybe OnDeviceServiceConfiguration)
     (Maybe OnDeviceServiceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration :: Maybe OnDeviceServiceConfiguration
$sel:onDeviceServiceConfiguration:ClusterMetadata' :: ClusterMetadata -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration} -> Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe OnDeviceServiceConfiguration
a -> ClusterMetadata
s {$sel:onDeviceServiceConfiguration:ClusterMetadata' :: Maybe OnDeviceServiceConfiguration
onDeviceServiceConfiguration = Maybe OnDeviceServiceConfiguration
a} :: ClusterMetadata)

-- | The automatically generated ID for a cluster.
clusterMetadata_clusterId :: Lens.Lens' ClusterMetadata (Prelude.Maybe Prelude.Text)
clusterMetadata_clusterId :: (Maybe Text -> f (Maybe Text))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_clusterId = (ClusterMetadata -> Maybe Text)
-> (ClusterMetadata -> Maybe Text -> ClusterMetadata)
-> Lens ClusterMetadata ClusterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe Text
clusterId :: Maybe Text
$sel:clusterId:ClusterMetadata' :: ClusterMetadata -> Maybe Text
clusterId} -> Maybe Text
clusterId) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe Text
a -> ClusterMetadata
s {$sel:clusterId:ClusterMetadata' :: Maybe Text
clusterId = Maybe Text
a} :: ClusterMetadata)

-- | The creation date for this cluster.
clusterMetadata_creationDate :: Lens.Lens' ClusterMetadata (Prelude.Maybe Prelude.UTCTime)
clusterMetadata_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_creationDate = (ClusterMetadata -> Maybe POSIX)
-> (ClusterMetadata -> Maybe POSIX -> ClusterMetadata)
-> Lens ClusterMetadata ClusterMetadata (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:ClusterMetadata' :: ClusterMetadata -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe POSIX
a -> ClusterMetadata
s {$sel:creationDate:ClusterMetadata' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: ClusterMetadata) ((Maybe POSIX -> f (Maybe POSIX))
 -> ClusterMetadata -> f ClusterMetadata)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ClusterMetadata
-> f ClusterMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The optional description of the cluster.
clusterMetadata_description :: Lens.Lens' ClusterMetadata (Prelude.Maybe Prelude.Text)
clusterMetadata_description :: (Maybe Text -> f (Maybe Text))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_description = (ClusterMetadata -> Maybe Text)
-> (ClusterMetadata -> Maybe Text -> ClusterMetadata)
-> Lens ClusterMetadata ClusterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe Text
description :: Maybe Text
$sel:description:ClusterMetadata' :: ClusterMetadata -> Maybe Text
description} -> Maybe Text
description) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe Text
a -> ClusterMetadata
s {$sel:description:ClusterMetadata' :: Maybe Text
description = Maybe Text
a} :: ClusterMetadata)

-- | The tax documents required in your AWS Region.
clusterMetadata_taxDocuments :: Lens.Lens' ClusterMetadata (Prelude.Maybe TaxDocuments)
clusterMetadata_taxDocuments :: (Maybe TaxDocuments -> f (Maybe TaxDocuments))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_taxDocuments = (ClusterMetadata -> Maybe TaxDocuments)
-> (ClusterMetadata -> Maybe TaxDocuments -> ClusterMetadata)
-> Lens
     ClusterMetadata
     ClusterMetadata
     (Maybe TaxDocuments)
     (Maybe TaxDocuments)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe TaxDocuments
taxDocuments :: Maybe TaxDocuments
$sel:taxDocuments:ClusterMetadata' :: ClusterMetadata -> Maybe TaxDocuments
taxDocuments} -> Maybe TaxDocuments
taxDocuments) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe TaxDocuments
a -> ClusterMetadata
s {$sel:taxDocuments:ClusterMetadata' :: Maybe TaxDocuments
taxDocuments = Maybe TaxDocuments
a} :: ClusterMetadata)

-- | The role ARN associated with this cluster. This ARN was created using
-- the
-- <https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html CreateRole>
-- API action in AWS Identity and Access Management (IAM).
clusterMetadata_roleARN :: Lens.Lens' ClusterMetadata (Prelude.Maybe Prelude.Text)
clusterMetadata_roleARN :: (Maybe Text -> f (Maybe Text))
-> ClusterMetadata -> f ClusterMetadata
clusterMetadata_roleARN = (ClusterMetadata -> Maybe Text)
-> (ClusterMetadata -> Maybe Text -> ClusterMetadata)
-> Lens ClusterMetadata ClusterMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterMetadata' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:ClusterMetadata' :: ClusterMetadata -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: ClusterMetadata
s@ClusterMetadata' {} Maybe Text
a -> ClusterMetadata
s {$sel:roleARN:ClusterMetadata' :: Maybe Text
roleARN = Maybe Text
a} :: ClusterMetadata)

instance Core.FromJSON ClusterMetadata where
  parseJSON :: Value -> Parser ClusterMetadata
parseJSON =
    String
-> (Object -> Parser ClusterMetadata)
-> Value
-> Parser ClusterMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ClusterMetadata"
      ( \Object
x ->
          Maybe JobType
-> Maybe Text
-> Maybe ClusterState
-> Maybe Notification
-> Maybe Text
-> Maybe Text
-> Maybe SnowballType
-> Maybe ShippingOption
-> Maybe JobResource
-> Maybe OnDeviceServiceConfiguration
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe TaxDocuments
-> Maybe Text
-> ClusterMetadata
ClusterMetadata'
            (Maybe JobType
 -> Maybe Text
 -> Maybe ClusterState
 -> Maybe Notification
 -> Maybe Text
 -> Maybe Text
 -> Maybe SnowballType
 -> Maybe ShippingOption
 -> Maybe JobResource
 -> Maybe OnDeviceServiceConfiguration
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe TaxDocuments
 -> Maybe Text
 -> ClusterMetadata)
-> Parser (Maybe JobType)
-> Parser
     (Maybe Text
      -> Maybe ClusterState
      -> Maybe Notification
      -> Maybe Text
      -> Maybe Text
      -> Maybe SnowballType
      -> Maybe ShippingOption
      -> Maybe JobResource
      -> Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe JobType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobType")
            Parser
  (Maybe Text
   -> Maybe ClusterState
   -> Maybe Notification
   -> Maybe Text
   -> Maybe Text
   -> Maybe SnowballType
   -> Maybe ShippingOption
   -> Maybe JobResource
   -> Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe ClusterState
      -> Maybe Notification
      -> Maybe Text
      -> Maybe Text
      -> Maybe SnowballType
      -> Maybe ShippingOption
      -> Maybe JobResource
      -> Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KmsKeyARN")
            Parser
  (Maybe ClusterState
   -> Maybe Notification
   -> Maybe Text
   -> Maybe Text
   -> Maybe SnowballType
   -> Maybe ShippingOption
   -> Maybe JobResource
   -> Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe ClusterState)
-> Parser
     (Maybe Notification
      -> Maybe Text
      -> Maybe Text
      -> Maybe SnowballType
      -> Maybe ShippingOption
      -> Maybe JobResource
      -> Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ClusterState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClusterState")
            Parser
  (Maybe Notification
   -> Maybe Text
   -> Maybe Text
   -> Maybe SnowballType
   -> Maybe ShippingOption
   -> Maybe JobResource
   -> Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe Notification)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe SnowballType
      -> Maybe ShippingOption
      -> Maybe JobResource
      -> Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Notification)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Notification")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe SnowballType
   -> Maybe ShippingOption
   -> Maybe JobResource
   -> Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe SnowballType
      -> Maybe ShippingOption
      -> Maybe JobResource
      -> Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ForwardingAddressId")
            Parser
  (Maybe Text
   -> Maybe SnowballType
   -> Maybe ShippingOption
   -> Maybe JobResource
   -> Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe SnowballType
      -> Maybe ShippingOption
      -> Maybe JobResource
      -> Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AddressId")
            Parser
  (Maybe SnowballType
   -> Maybe ShippingOption
   -> Maybe JobResource
   -> Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe SnowballType)
-> Parser
     (Maybe ShippingOption
      -> Maybe JobResource
      -> Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SnowballType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SnowballType")
            Parser
  (Maybe ShippingOption
   -> Maybe JobResource
   -> Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe ShippingOption)
-> Parser
     (Maybe JobResource
      -> Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ShippingOption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ShippingOption")
            Parser
  (Maybe JobResource
   -> Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe JobResource)
-> Parser
     (Maybe OnDeviceServiceConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobResource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Resources")
            Parser
  (Maybe OnDeviceServiceConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe OnDeviceServiceConfiguration)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OnDeviceServiceConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OnDeviceServiceConfiguration")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe TaxDocuments
      -> Maybe Text
      -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClusterId")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe TaxDocuments
   -> Maybe Text
   -> ClusterMetadata)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text -> Maybe TaxDocuments -> Maybe Text -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationDate")
            Parser
  (Maybe Text -> Maybe TaxDocuments -> Maybe Text -> ClusterMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe TaxDocuments -> Maybe Text -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser (Maybe TaxDocuments -> Maybe Text -> ClusterMetadata)
-> Parser (Maybe TaxDocuments)
-> Parser (Maybe Text -> ClusterMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TaxDocuments)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TaxDocuments")
            Parser (Maybe Text -> ClusterMetadata)
-> Parser (Maybe Text) -> Parser ClusterMetadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoleARN")
      )

instance Prelude.Hashable ClusterMetadata

instance Prelude.NFData ClusterMetadata