{-# 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.Omics.Types.SequenceStoreDetail
-- 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.Omics.Types.SequenceStoreDetail where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Omics.Types.SseConfig
import qualified Amazonka.Prelude as Prelude

-- | Details about a sequence store.
--
-- /See:/ 'newSequenceStoreDetail' smart constructor.
data SequenceStoreDetail = SequenceStoreDetail'
  { -- | The store\'s description.
    SequenceStoreDetail -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The store\'s name.
    SequenceStoreDetail -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The store\'s server-side encryption (SSE) settings.
    SequenceStoreDetail -> Maybe SseConfig
sseConfig :: Prelude.Maybe SseConfig,
    -- | The store\'s ARN.
    SequenceStoreDetail -> Text
arn :: Prelude.Text,
    -- | When the store was created.
    SequenceStoreDetail -> ISO8601
creationTime :: Data.ISO8601,
    -- | The store\'s ID.
    SequenceStoreDetail -> Text
id :: Prelude.Text
  }
  deriving (SequenceStoreDetail -> SequenceStoreDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SequenceStoreDetail -> SequenceStoreDetail -> Bool
$c/= :: SequenceStoreDetail -> SequenceStoreDetail -> Bool
== :: SequenceStoreDetail -> SequenceStoreDetail -> Bool
$c== :: SequenceStoreDetail -> SequenceStoreDetail -> Bool
Prelude.Eq, ReadPrec [SequenceStoreDetail]
ReadPrec SequenceStoreDetail
Int -> ReadS SequenceStoreDetail
ReadS [SequenceStoreDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SequenceStoreDetail]
$creadListPrec :: ReadPrec [SequenceStoreDetail]
readPrec :: ReadPrec SequenceStoreDetail
$creadPrec :: ReadPrec SequenceStoreDetail
readList :: ReadS [SequenceStoreDetail]
$creadList :: ReadS [SequenceStoreDetail]
readsPrec :: Int -> ReadS SequenceStoreDetail
$creadsPrec :: Int -> ReadS SequenceStoreDetail
Prelude.Read, Int -> SequenceStoreDetail -> ShowS
[SequenceStoreDetail] -> ShowS
SequenceStoreDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SequenceStoreDetail] -> ShowS
$cshowList :: [SequenceStoreDetail] -> ShowS
show :: SequenceStoreDetail -> String
$cshow :: SequenceStoreDetail -> String
showsPrec :: Int -> SequenceStoreDetail -> ShowS
$cshowsPrec :: Int -> SequenceStoreDetail -> ShowS
Prelude.Show, forall x. Rep SequenceStoreDetail x -> SequenceStoreDetail
forall x. SequenceStoreDetail -> Rep SequenceStoreDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SequenceStoreDetail x -> SequenceStoreDetail
$cfrom :: forall x. SequenceStoreDetail -> Rep SequenceStoreDetail x
Prelude.Generic)

-- |
-- Create a value of 'SequenceStoreDetail' 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:
--
-- 'description', 'sequenceStoreDetail_description' - The store\'s description.
--
-- 'name', 'sequenceStoreDetail_name' - The store\'s name.
--
-- 'sseConfig', 'sequenceStoreDetail_sseConfig' - The store\'s server-side encryption (SSE) settings.
--
-- 'arn', 'sequenceStoreDetail_arn' - The store\'s ARN.
--
-- 'creationTime', 'sequenceStoreDetail_creationTime' - When the store was created.
--
-- 'id', 'sequenceStoreDetail_id' - The store\'s ID.
newSequenceStoreDetail ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'id'
  Prelude.Text ->
  SequenceStoreDetail
newSequenceStoreDetail :: Text -> UTCTime -> Text -> SequenceStoreDetail
newSequenceStoreDetail Text
pArn_ UTCTime
pCreationTime_ Text
pId_ =
  SequenceStoreDetail'
    { $sel:description:SequenceStoreDetail' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:name:SequenceStoreDetail' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:sseConfig:SequenceStoreDetail' :: Maybe SseConfig
sseConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:SequenceStoreDetail' :: Text
arn = Text
pArn_,
      $sel:creationTime:SequenceStoreDetail' :: ISO8601
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
      $sel:id:SequenceStoreDetail' :: Text
id = Text
pId_
    }

-- | The store\'s description.
sequenceStoreDetail_description :: Lens.Lens' SequenceStoreDetail (Prelude.Maybe Prelude.Text)
sequenceStoreDetail_description :: Lens' SequenceStoreDetail (Maybe Text)
sequenceStoreDetail_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SequenceStoreDetail' {Maybe Text
description :: Maybe Text
$sel:description:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe Text
description} -> Maybe Text
description) (\s :: SequenceStoreDetail
s@SequenceStoreDetail' {} Maybe Text
a -> SequenceStoreDetail
s {$sel:description:SequenceStoreDetail' :: Maybe Text
description = Maybe Text
a} :: SequenceStoreDetail)

-- | The store\'s name.
sequenceStoreDetail_name :: Lens.Lens' SequenceStoreDetail (Prelude.Maybe Prelude.Text)
sequenceStoreDetail_name :: Lens' SequenceStoreDetail (Maybe Text)
sequenceStoreDetail_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SequenceStoreDetail' {Maybe Text
name :: Maybe Text
$sel:name:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe Text
name} -> Maybe Text
name) (\s :: SequenceStoreDetail
s@SequenceStoreDetail' {} Maybe Text
a -> SequenceStoreDetail
s {$sel:name:SequenceStoreDetail' :: Maybe Text
name = Maybe Text
a} :: SequenceStoreDetail)

-- | The store\'s server-side encryption (SSE) settings.
sequenceStoreDetail_sseConfig :: Lens.Lens' SequenceStoreDetail (Prelude.Maybe SseConfig)
sequenceStoreDetail_sseConfig :: Lens' SequenceStoreDetail (Maybe SseConfig)
sequenceStoreDetail_sseConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SequenceStoreDetail' {Maybe SseConfig
sseConfig :: Maybe SseConfig
$sel:sseConfig:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe SseConfig
sseConfig} -> Maybe SseConfig
sseConfig) (\s :: SequenceStoreDetail
s@SequenceStoreDetail' {} Maybe SseConfig
a -> SequenceStoreDetail
s {$sel:sseConfig:SequenceStoreDetail' :: Maybe SseConfig
sseConfig = Maybe SseConfig
a} :: SequenceStoreDetail)

-- | The store\'s ARN.
sequenceStoreDetail_arn :: Lens.Lens' SequenceStoreDetail Prelude.Text
sequenceStoreDetail_arn :: Lens' SequenceStoreDetail Text
sequenceStoreDetail_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SequenceStoreDetail' {Text
arn :: Text
$sel:arn:SequenceStoreDetail' :: SequenceStoreDetail -> Text
arn} -> Text
arn) (\s :: SequenceStoreDetail
s@SequenceStoreDetail' {} Text
a -> SequenceStoreDetail
s {$sel:arn:SequenceStoreDetail' :: Text
arn = Text
a} :: SequenceStoreDetail)

-- | When the store was created.
sequenceStoreDetail_creationTime :: Lens.Lens' SequenceStoreDetail Prelude.UTCTime
sequenceStoreDetail_creationTime :: Lens' SequenceStoreDetail UTCTime
sequenceStoreDetail_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SequenceStoreDetail' {ISO8601
creationTime :: ISO8601
$sel:creationTime:SequenceStoreDetail' :: SequenceStoreDetail -> ISO8601
creationTime} -> ISO8601
creationTime) (\s :: SequenceStoreDetail
s@SequenceStoreDetail' {} ISO8601
a -> SequenceStoreDetail
s {$sel:creationTime:SequenceStoreDetail' :: ISO8601
creationTime = ISO8601
a} :: SequenceStoreDetail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The store\'s ID.
sequenceStoreDetail_id :: Lens.Lens' SequenceStoreDetail Prelude.Text
sequenceStoreDetail_id :: Lens' SequenceStoreDetail Text
sequenceStoreDetail_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SequenceStoreDetail' {Text
id :: Text
$sel:id:SequenceStoreDetail' :: SequenceStoreDetail -> Text
id} -> Text
id) (\s :: SequenceStoreDetail
s@SequenceStoreDetail' {} Text
a -> SequenceStoreDetail
s {$sel:id:SequenceStoreDetail' :: Text
id = Text
a} :: SequenceStoreDetail)

instance Data.FromJSON SequenceStoreDetail where
  parseJSON :: Value -> Parser SequenceStoreDetail
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SequenceStoreDetail"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe SseConfig
-> Text
-> ISO8601
-> Text
-> SequenceStoreDetail
SequenceStoreDetail'
            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
"description")
            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
"name")
            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
"sseConfig")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser 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 a
Data..: Key
"id")
      )

instance Prelude.Hashable SequenceStoreDetail where
  hashWithSalt :: Int -> SequenceStoreDetail -> Int
hashWithSalt Int
_salt SequenceStoreDetail' {Maybe Text
Maybe SseConfig
Text
ISO8601
id :: Text
creationTime :: ISO8601
arn :: Text
sseConfig :: Maybe SseConfig
name :: Maybe Text
description :: Maybe Text
$sel:id:SequenceStoreDetail' :: SequenceStoreDetail -> Text
$sel:creationTime:SequenceStoreDetail' :: SequenceStoreDetail -> ISO8601
$sel:arn:SequenceStoreDetail' :: SequenceStoreDetail -> Text
$sel:sseConfig:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe SseConfig
$sel:name:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe Text
$sel:description:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SseConfig
sseConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id

instance Prelude.NFData SequenceStoreDetail where
  rnf :: SequenceStoreDetail -> ()
rnf SequenceStoreDetail' {Maybe Text
Maybe SseConfig
Text
ISO8601
id :: Text
creationTime :: ISO8601
arn :: Text
sseConfig :: Maybe SseConfig
name :: Maybe Text
description :: Maybe Text
$sel:id:SequenceStoreDetail' :: SequenceStoreDetail -> Text
$sel:creationTime:SequenceStoreDetail' :: SequenceStoreDetail -> ISO8601
$sel:arn:SequenceStoreDetail' :: SequenceStoreDetail -> Text
$sel:sseConfig:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe SseConfig
$sel:name:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe Text
$sel:description:SequenceStoreDetail' :: SequenceStoreDetail -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SseConfig
sseConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id