{-# 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.FSx.Types.FileCache
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.FSx.Types.FileCache where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FSx.Types.FileCacheFailureDetails
import Amazonka.FSx.Types.FileCacheLifecycle
import Amazonka.FSx.Types.FileCacheLustreConfiguration
import Amazonka.FSx.Types.FileCacheType
import qualified Amazonka.Prelude as Prelude

-- | A description of a specific Amazon File Cache resource, which is a
-- response object from the @DescribeFileCaches@ operation.
--
-- /See:/ 'newFileCache' smart constructor.
data FileCache = FileCache'
  { FileCache -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
    -- | The Domain Name System (DNS) name for the cache.
    FileCache -> Maybe Text
dNSName :: Prelude.Maybe Prelude.Text,
    -- | A list of IDs of data repository associations that are associated with
    -- this cache.
    FileCache -> Maybe [Text]
dataRepositoryAssociationIds :: Prelude.Maybe [Prelude.Text],
    -- | A structure providing details of any failures that occurred.
    FileCache -> Maybe FileCacheFailureDetails
failureDetails :: Prelude.Maybe FileCacheFailureDetails,
    -- | The system-generated, unique ID of the cache.
    FileCache -> Maybe Text
fileCacheId :: Prelude.Maybe Prelude.Text,
    -- | The type of cache, which must be @LUSTRE@.
    FileCache -> Maybe FileCacheType
fileCacheType :: Prelude.Maybe FileCacheType,
    -- | The Lustre version of the cache, which must be @2.12@.
    FileCache -> Maybe Text
fileCacheTypeVersion :: Prelude.Maybe Prelude.Text,
    -- | Specifies the ID of the Key Management Service (KMS) key to use for
    -- encrypting data on an Amazon File Cache. If a @KmsKeyId@ isn\'t
    -- specified, the Amazon FSx-managed KMS key for your account is used. For
    -- more information, see
    -- <https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html Encrypt>
    -- in the /Key Management Service API Reference/.
    FileCache -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The lifecycle status of the cache. The following are the possible values
    -- and what they mean:
    --
    -- -   @AVAILABLE@ - The cache is in a healthy state, and is reachable and
    --     available for use.
    --
    -- -   @CREATING@ - The new cache is being created.
    --
    -- -   @DELETING@ - An existing cache is being deleted.
    --
    -- -   @UPDATING@ - The cache is undergoing a customer-initiated update.
    --
    -- -   @FAILED@ - An existing cache has experienced an unrecoverable
    --     failure. When creating a new cache, the cache was unable to be
    --     created.
    FileCache -> Maybe FileCacheLifecycle
lifecycle :: Prelude.Maybe FileCacheLifecycle,
    -- | The configuration for the Amazon File Cache resource.
    FileCache -> Maybe FileCacheLustreConfiguration
lustreConfiguration :: Prelude.Maybe FileCacheLustreConfiguration,
    FileCache -> Maybe [Text]
networkInterfaceIds :: Prelude.Maybe [Prelude.Text],
    FileCache -> Maybe Text
ownerId :: Prelude.Maybe Prelude.Text,
    FileCache -> Maybe Text
resourceARN :: Prelude.Maybe Prelude.Text,
    -- | The storage capacity of the cache in gibibytes (GiB).
    FileCache -> Maybe Natural
storageCapacity :: Prelude.Maybe Prelude.Natural,
    FileCache -> Maybe [Text]
subnetIds :: Prelude.Maybe [Prelude.Text],
    FileCache -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
  }
  deriving (FileCache -> FileCache -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileCache -> FileCache -> Bool
$c/= :: FileCache -> FileCache -> Bool
== :: FileCache -> FileCache -> Bool
$c== :: FileCache -> FileCache -> Bool
Prelude.Eq, ReadPrec [FileCache]
ReadPrec FileCache
Int -> ReadS FileCache
ReadS [FileCache]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileCache]
$creadListPrec :: ReadPrec [FileCache]
readPrec :: ReadPrec FileCache
$creadPrec :: ReadPrec FileCache
readList :: ReadS [FileCache]
$creadList :: ReadS [FileCache]
readsPrec :: Int -> ReadS FileCache
$creadsPrec :: Int -> ReadS FileCache
Prelude.Read, Int -> FileCache -> ShowS
[FileCache] -> ShowS
FileCache -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileCache] -> ShowS
$cshowList :: [FileCache] -> ShowS
show :: FileCache -> String
$cshow :: FileCache -> String
showsPrec :: Int -> FileCache -> ShowS
$cshowsPrec :: Int -> FileCache -> ShowS
Prelude.Show, forall x. Rep FileCache x -> FileCache
forall x. FileCache -> Rep FileCache x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileCache x -> FileCache
$cfrom :: forall x. FileCache -> Rep FileCache x
Prelude.Generic)

-- |
-- Create a value of 'FileCache' 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:
--
-- 'creationTime', 'fileCache_creationTime' - Undocumented member.
--
-- 'dNSName', 'fileCache_dNSName' - The Domain Name System (DNS) name for the cache.
--
-- 'dataRepositoryAssociationIds', 'fileCache_dataRepositoryAssociationIds' - A list of IDs of data repository associations that are associated with
-- this cache.
--
-- 'failureDetails', 'fileCache_failureDetails' - A structure providing details of any failures that occurred.
--
-- 'fileCacheId', 'fileCache_fileCacheId' - The system-generated, unique ID of the cache.
--
-- 'fileCacheType', 'fileCache_fileCacheType' - The type of cache, which must be @LUSTRE@.
--
-- 'fileCacheTypeVersion', 'fileCache_fileCacheTypeVersion' - The Lustre version of the cache, which must be @2.12@.
--
-- 'kmsKeyId', 'fileCache_kmsKeyId' - Specifies the ID of the Key Management Service (KMS) key to use for
-- encrypting data on an Amazon File Cache. If a @KmsKeyId@ isn\'t
-- specified, the Amazon FSx-managed KMS key for your account is used. For
-- more information, see
-- <https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html Encrypt>
-- in the /Key Management Service API Reference/.
--
-- 'lifecycle', 'fileCache_lifecycle' - The lifecycle status of the cache. The following are the possible values
-- and what they mean:
--
-- -   @AVAILABLE@ - The cache is in a healthy state, and is reachable and
--     available for use.
--
-- -   @CREATING@ - The new cache is being created.
--
-- -   @DELETING@ - An existing cache is being deleted.
--
-- -   @UPDATING@ - The cache is undergoing a customer-initiated update.
--
-- -   @FAILED@ - An existing cache has experienced an unrecoverable
--     failure. When creating a new cache, the cache was unable to be
--     created.
--
-- 'lustreConfiguration', 'fileCache_lustreConfiguration' - The configuration for the Amazon File Cache resource.
--
-- 'networkInterfaceIds', 'fileCache_networkInterfaceIds' - Undocumented member.
--
-- 'ownerId', 'fileCache_ownerId' - Undocumented member.
--
-- 'resourceARN', 'fileCache_resourceARN' - Undocumented member.
--
-- 'storageCapacity', 'fileCache_storageCapacity' - The storage capacity of the cache in gibibytes (GiB).
--
-- 'subnetIds', 'fileCache_subnetIds' - Undocumented member.
--
-- 'vpcId', 'fileCache_vpcId' - Undocumented member.
newFileCache ::
  FileCache
newFileCache :: FileCache
newFileCache =
  FileCache'
    { $sel:creationTime:FileCache' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:dNSName:FileCache' :: Maybe Text
dNSName = forall a. Maybe a
Prelude.Nothing,
      $sel:dataRepositoryAssociationIds:FileCache' :: Maybe [Text]
dataRepositoryAssociationIds = forall a. Maybe a
Prelude.Nothing,
      $sel:failureDetails:FileCache' :: Maybe FileCacheFailureDetails
failureDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:fileCacheId:FileCache' :: Maybe Text
fileCacheId = forall a. Maybe a
Prelude.Nothing,
      $sel:fileCacheType:FileCache' :: Maybe FileCacheType
fileCacheType = forall a. Maybe a
Prelude.Nothing,
      $sel:fileCacheTypeVersion:FileCache' :: Maybe Text
fileCacheTypeVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:FileCache' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycle:FileCache' :: Maybe FileCacheLifecycle
lifecycle = forall a. Maybe a
Prelude.Nothing,
      $sel:lustreConfiguration:FileCache' :: Maybe FileCacheLustreConfiguration
lustreConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:networkInterfaceIds:FileCache' :: Maybe [Text]
networkInterfaceIds = forall a. Maybe a
Prelude.Nothing,
      $sel:ownerId:FileCache' :: Maybe Text
ownerId = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceARN:FileCache' :: Maybe Text
resourceARN = forall a. Maybe a
Prelude.Nothing,
      $sel:storageCapacity:FileCache' :: Maybe Natural
storageCapacity = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:FileCache' :: Maybe [Text]
subnetIds = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:FileCache' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
fileCache_creationTime :: Lens.Lens' FileCache (Prelude.Maybe Prelude.UTCTime)
fileCache_creationTime :: Lens' FileCache (Maybe UTCTime)
fileCache_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:FileCache' :: FileCache -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: FileCache
s@FileCache' {} Maybe POSIX
a -> FileCache
s {$sel:creationTime:FileCache' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: FileCache) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The Domain Name System (DNS) name for the cache.
fileCache_dNSName :: Lens.Lens' FileCache (Prelude.Maybe Prelude.Text)
fileCache_dNSName :: Lens' FileCache (Maybe Text)
fileCache_dNSName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe Text
dNSName :: Maybe Text
$sel:dNSName:FileCache' :: FileCache -> Maybe Text
dNSName} -> Maybe Text
dNSName) (\s :: FileCache
s@FileCache' {} Maybe Text
a -> FileCache
s {$sel:dNSName:FileCache' :: Maybe Text
dNSName = Maybe Text
a} :: FileCache)

-- | A list of IDs of data repository associations that are associated with
-- this cache.
fileCache_dataRepositoryAssociationIds :: Lens.Lens' FileCache (Prelude.Maybe [Prelude.Text])
fileCache_dataRepositoryAssociationIds :: Lens' FileCache (Maybe [Text])
fileCache_dataRepositoryAssociationIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe [Text]
dataRepositoryAssociationIds :: Maybe [Text]
$sel:dataRepositoryAssociationIds:FileCache' :: FileCache -> Maybe [Text]
dataRepositoryAssociationIds} -> Maybe [Text]
dataRepositoryAssociationIds) (\s :: FileCache
s@FileCache' {} Maybe [Text]
a -> FileCache
s {$sel:dataRepositoryAssociationIds:FileCache' :: Maybe [Text]
dataRepositoryAssociationIds = Maybe [Text]
a} :: FileCache) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A structure providing details of any failures that occurred.
fileCache_failureDetails :: Lens.Lens' FileCache (Prelude.Maybe FileCacheFailureDetails)
fileCache_failureDetails :: Lens' FileCache (Maybe FileCacheFailureDetails)
fileCache_failureDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe FileCacheFailureDetails
failureDetails :: Maybe FileCacheFailureDetails
$sel:failureDetails:FileCache' :: FileCache -> Maybe FileCacheFailureDetails
failureDetails} -> Maybe FileCacheFailureDetails
failureDetails) (\s :: FileCache
s@FileCache' {} Maybe FileCacheFailureDetails
a -> FileCache
s {$sel:failureDetails:FileCache' :: Maybe FileCacheFailureDetails
failureDetails = Maybe FileCacheFailureDetails
a} :: FileCache)

-- | The system-generated, unique ID of the cache.
fileCache_fileCacheId :: Lens.Lens' FileCache (Prelude.Maybe Prelude.Text)
fileCache_fileCacheId :: Lens' FileCache (Maybe Text)
fileCache_fileCacheId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe Text
fileCacheId :: Maybe Text
$sel:fileCacheId:FileCache' :: FileCache -> Maybe Text
fileCacheId} -> Maybe Text
fileCacheId) (\s :: FileCache
s@FileCache' {} Maybe Text
a -> FileCache
s {$sel:fileCacheId:FileCache' :: Maybe Text
fileCacheId = Maybe Text
a} :: FileCache)

-- | The type of cache, which must be @LUSTRE@.
fileCache_fileCacheType :: Lens.Lens' FileCache (Prelude.Maybe FileCacheType)
fileCache_fileCacheType :: Lens' FileCache (Maybe FileCacheType)
fileCache_fileCacheType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe FileCacheType
fileCacheType :: Maybe FileCacheType
$sel:fileCacheType:FileCache' :: FileCache -> Maybe FileCacheType
fileCacheType} -> Maybe FileCacheType
fileCacheType) (\s :: FileCache
s@FileCache' {} Maybe FileCacheType
a -> FileCache
s {$sel:fileCacheType:FileCache' :: Maybe FileCacheType
fileCacheType = Maybe FileCacheType
a} :: FileCache)

-- | The Lustre version of the cache, which must be @2.12@.
fileCache_fileCacheTypeVersion :: Lens.Lens' FileCache (Prelude.Maybe Prelude.Text)
fileCache_fileCacheTypeVersion :: Lens' FileCache (Maybe Text)
fileCache_fileCacheTypeVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe Text
fileCacheTypeVersion :: Maybe Text
$sel:fileCacheTypeVersion:FileCache' :: FileCache -> Maybe Text
fileCacheTypeVersion} -> Maybe Text
fileCacheTypeVersion) (\s :: FileCache
s@FileCache' {} Maybe Text
a -> FileCache
s {$sel:fileCacheTypeVersion:FileCache' :: Maybe Text
fileCacheTypeVersion = Maybe Text
a} :: FileCache)

-- | Specifies the ID of the Key Management Service (KMS) key to use for
-- encrypting data on an Amazon File Cache. If a @KmsKeyId@ isn\'t
-- specified, the Amazon FSx-managed KMS key for your account is used. For
-- more information, see
-- <https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html Encrypt>
-- in the /Key Management Service API Reference/.
fileCache_kmsKeyId :: Lens.Lens' FileCache (Prelude.Maybe Prelude.Text)
fileCache_kmsKeyId :: Lens' FileCache (Maybe Text)
fileCache_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:FileCache' :: FileCache -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: FileCache
s@FileCache' {} Maybe Text
a -> FileCache
s {$sel:kmsKeyId:FileCache' :: Maybe Text
kmsKeyId = Maybe Text
a} :: FileCache)

-- | The lifecycle status of the cache. The following are the possible values
-- and what they mean:
--
-- -   @AVAILABLE@ - The cache is in a healthy state, and is reachable and
--     available for use.
--
-- -   @CREATING@ - The new cache is being created.
--
-- -   @DELETING@ - An existing cache is being deleted.
--
-- -   @UPDATING@ - The cache is undergoing a customer-initiated update.
--
-- -   @FAILED@ - An existing cache has experienced an unrecoverable
--     failure. When creating a new cache, the cache was unable to be
--     created.
fileCache_lifecycle :: Lens.Lens' FileCache (Prelude.Maybe FileCacheLifecycle)
fileCache_lifecycle :: Lens' FileCache (Maybe FileCacheLifecycle)
fileCache_lifecycle = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe FileCacheLifecycle
lifecycle :: Maybe FileCacheLifecycle
$sel:lifecycle:FileCache' :: FileCache -> Maybe FileCacheLifecycle
lifecycle} -> Maybe FileCacheLifecycle
lifecycle) (\s :: FileCache
s@FileCache' {} Maybe FileCacheLifecycle
a -> FileCache
s {$sel:lifecycle:FileCache' :: Maybe FileCacheLifecycle
lifecycle = Maybe FileCacheLifecycle
a} :: FileCache)

-- | The configuration for the Amazon File Cache resource.
fileCache_lustreConfiguration :: Lens.Lens' FileCache (Prelude.Maybe FileCacheLustreConfiguration)
fileCache_lustreConfiguration :: Lens' FileCache (Maybe FileCacheLustreConfiguration)
fileCache_lustreConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe FileCacheLustreConfiguration
lustreConfiguration :: Maybe FileCacheLustreConfiguration
$sel:lustreConfiguration:FileCache' :: FileCache -> Maybe FileCacheLustreConfiguration
lustreConfiguration} -> Maybe FileCacheLustreConfiguration
lustreConfiguration) (\s :: FileCache
s@FileCache' {} Maybe FileCacheLustreConfiguration
a -> FileCache
s {$sel:lustreConfiguration:FileCache' :: Maybe FileCacheLustreConfiguration
lustreConfiguration = Maybe FileCacheLustreConfiguration
a} :: FileCache)

-- | Undocumented member.
fileCache_networkInterfaceIds :: Lens.Lens' FileCache (Prelude.Maybe [Prelude.Text])
fileCache_networkInterfaceIds :: Lens' FileCache (Maybe [Text])
fileCache_networkInterfaceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe [Text]
networkInterfaceIds :: Maybe [Text]
$sel:networkInterfaceIds:FileCache' :: FileCache -> Maybe [Text]
networkInterfaceIds} -> Maybe [Text]
networkInterfaceIds) (\s :: FileCache
s@FileCache' {} Maybe [Text]
a -> FileCache
s {$sel:networkInterfaceIds:FileCache' :: Maybe [Text]
networkInterfaceIds = Maybe [Text]
a} :: FileCache) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
fileCache_ownerId :: Lens.Lens' FileCache (Prelude.Maybe Prelude.Text)
fileCache_ownerId :: Lens' FileCache (Maybe Text)
fileCache_ownerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe Text
ownerId :: Maybe Text
$sel:ownerId:FileCache' :: FileCache -> Maybe Text
ownerId} -> Maybe Text
ownerId) (\s :: FileCache
s@FileCache' {} Maybe Text
a -> FileCache
s {$sel:ownerId:FileCache' :: Maybe Text
ownerId = Maybe Text
a} :: FileCache)

-- | Undocumented member.
fileCache_resourceARN :: Lens.Lens' FileCache (Prelude.Maybe Prelude.Text)
fileCache_resourceARN :: Lens' FileCache (Maybe Text)
fileCache_resourceARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe Text
resourceARN :: Maybe Text
$sel:resourceARN:FileCache' :: FileCache -> Maybe Text
resourceARN} -> Maybe Text
resourceARN) (\s :: FileCache
s@FileCache' {} Maybe Text
a -> FileCache
s {$sel:resourceARN:FileCache' :: Maybe Text
resourceARN = Maybe Text
a} :: FileCache)

-- | The storage capacity of the cache in gibibytes (GiB).
fileCache_storageCapacity :: Lens.Lens' FileCache (Prelude.Maybe Prelude.Natural)
fileCache_storageCapacity :: Lens' FileCache (Maybe Natural)
fileCache_storageCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe Natural
storageCapacity :: Maybe Natural
$sel:storageCapacity:FileCache' :: FileCache -> Maybe Natural
storageCapacity} -> Maybe Natural
storageCapacity) (\s :: FileCache
s@FileCache' {} Maybe Natural
a -> FileCache
s {$sel:storageCapacity:FileCache' :: Maybe Natural
storageCapacity = Maybe Natural
a} :: FileCache)

-- | Undocumented member.
fileCache_subnetIds :: Lens.Lens' FileCache (Prelude.Maybe [Prelude.Text])
fileCache_subnetIds :: Lens' FileCache (Maybe [Text])
fileCache_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe [Text]
subnetIds :: Maybe [Text]
$sel:subnetIds:FileCache' :: FileCache -> Maybe [Text]
subnetIds} -> Maybe [Text]
subnetIds) (\s :: FileCache
s@FileCache' {} Maybe [Text]
a -> FileCache
s {$sel:subnetIds:FileCache' :: Maybe [Text]
subnetIds = Maybe [Text]
a} :: FileCache) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
fileCache_vpcId :: Lens.Lens' FileCache (Prelude.Maybe Prelude.Text)
fileCache_vpcId :: Lens' FileCache (Maybe Text)
fileCache_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileCache' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:FileCache' :: FileCache -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: FileCache
s@FileCache' {} Maybe Text
a -> FileCache
s {$sel:vpcId:FileCache' :: Maybe Text
vpcId = Maybe Text
a} :: FileCache)

instance Data.FromJSON FileCache where
  parseJSON :: Value -> Parser FileCache
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"FileCache"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe [Text]
-> Maybe FileCacheFailureDetails
-> Maybe Text
-> Maybe FileCacheType
-> Maybe Text
-> Maybe Text
-> Maybe FileCacheLifecycle
-> Maybe FileCacheLustreConfiguration
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe [Text]
-> Maybe Text
-> FileCache
FileCache'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DNSName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DataRepositoryAssociationIds"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FailureDetails")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FileCacheId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FileCacheType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FileCacheTypeVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"KmsKeyId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Lifecycle")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LustreConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NetworkInterfaceIds"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OwnerId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResourceARN")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"StorageCapacity")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubnetIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"VpcId")
      )

instance Prelude.Hashable FileCache where
  hashWithSalt :: Int -> FileCache -> Int
hashWithSalt Int
_salt FileCache' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe POSIX
Maybe FileCacheFailureDetails
Maybe FileCacheLifecycle
Maybe FileCacheType
Maybe FileCacheLustreConfiguration
vpcId :: Maybe Text
subnetIds :: Maybe [Text]
storageCapacity :: Maybe Natural
resourceARN :: Maybe Text
ownerId :: Maybe Text
networkInterfaceIds :: Maybe [Text]
lustreConfiguration :: Maybe FileCacheLustreConfiguration
lifecycle :: Maybe FileCacheLifecycle
kmsKeyId :: Maybe Text
fileCacheTypeVersion :: Maybe Text
fileCacheType :: Maybe FileCacheType
fileCacheId :: Maybe Text
failureDetails :: Maybe FileCacheFailureDetails
dataRepositoryAssociationIds :: Maybe [Text]
dNSName :: Maybe Text
creationTime :: Maybe POSIX
$sel:vpcId:FileCache' :: FileCache -> Maybe Text
$sel:subnetIds:FileCache' :: FileCache -> Maybe [Text]
$sel:storageCapacity:FileCache' :: FileCache -> Maybe Natural
$sel:resourceARN:FileCache' :: FileCache -> Maybe Text
$sel:ownerId:FileCache' :: FileCache -> Maybe Text
$sel:networkInterfaceIds:FileCache' :: FileCache -> Maybe [Text]
$sel:lustreConfiguration:FileCache' :: FileCache -> Maybe FileCacheLustreConfiguration
$sel:lifecycle:FileCache' :: FileCache -> Maybe FileCacheLifecycle
$sel:kmsKeyId:FileCache' :: FileCache -> Maybe Text
$sel:fileCacheTypeVersion:FileCache' :: FileCache -> Maybe Text
$sel:fileCacheType:FileCache' :: FileCache -> Maybe FileCacheType
$sel:fileCacheId:FileCache' :: FileCache -> Maybe Text
$sel:failureDetails:FileCache' :: FileCache -> Maybe FileCacheFailureDetails
$sel:dataRepositoryAssociationIds:FileCache' :: FileCache -> Maybe [Text]
$sel:dNSName:FileCache' :: FileCache -> Maybe Text
$sel:creationTime:FileCache' :: FileCache -> Maybe POSIX
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dNSName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
dataRepositoryAssociationIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileCacheFailureDetails
failureDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fileCacheId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileCacheType
fileCacheType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fileCacheTypeVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileCacheLifecycle
lifecycle
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileCacheLustreConfiguration
lustreConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
networkInterfaceIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ownerId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
storageCapacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
subnetIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId

instance Prelude.NFData FileCache where
  rnf :: FileCache -> ()
rnf FileCache' {Maybe Natural
Maybe [Text]
Maybe Text
Maybe POSIX
Maybe FileCacheFailureDetails
Maybe FileCacheLifecycle
Maybe FileCacheType
Maybe FileCacheLustreConfiguration
vpcId :: Maybe Text
subnetIds :: Maybe [Text]
storageCapacity :: Maybe Natural
resourceARN :: Maybe Text
ownerId :: Maybe Text
networkInterfaceIds :: Maybe [Text]
lustreConfiguration :: Maybe FileCacheLustreConfiguration
lifecycle :: Maybe FileCacheLifecycle
kmsKeyId :: Maybe Text
fileCacheTypeVersion :: Maybe Text
fileCacheType :: Maybe FileCacheType
fileCacheId :: Maybe Text
failureDetails :: Maybe FileCacheFailureDetails
dataRepositoryAssociationIds :: Maybe [Text]
dNSName :: Maybe Text
creationTime :: Maybe POSIX
$sel:vpcId:FileCache' :: FileCache -> Maybe Text
$sel:subnetIds:FileCache' :: FileCache -> Maybe [Text]
$sel:storageCapacity:FileCache' :: FileCache -> Maybe Natural
$sel:resourceARN:FileCache' :: FileCache -> Maybe Text
$sel:ownerId:FileCache' :: FileCache -> Maybe Text
$sel:networkInterfaceIds:FileCache' :: FileCache -> Maybe [Text]
$sel:lustreConfiguration:FileCache' :: FileCache -> Maybe FileCacheLustreConfiguration
$sel:lifecycle:FileCache' :: FileCache -> Maybe FileCacheLifecycle
$sel:kmsKeyId:FileCache' :: FileCache -> Maybe Text
$sel:fileCacheTypeVersion:FileCache' :: FileCache -> Maybe Text
$sel:fileCacheType:FileCache' :: FileCache -> Maybe FileCacheType
$sel:fileCacheId:FileCache' :: FileCache -> Maybe Text
$sel:failureDetails:FileCache' :: FileCache -> Maybe FileCacheFailureDetails
$sel:dataRepositoryAssociationIds:FileCache' :: FileCache -> Maybe [Text]
$sel:dNSName:FileCache' :: FileCache -> Maybe Text
$sel:creationTime:FileCache' :: FileCache -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dNSName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
dataRepositoryAssociationIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileCacheFailureDetails
failureDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fileCacheId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileCacheType
fileCacheType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fileCacheTypeVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileCacheLifecycle
lifecycle
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileCacheLustreConfiguration
lustreConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
networkInterfaceIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
storageCapacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
subnetIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId