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

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

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

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

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

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

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

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

instance Data.FromJSON ReferenceStoreDetail where
  parseJSON :: Value -> Parser ReferenceStoreDetail
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ReferenceStoreDetail"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe SseConfig
-> Text
-> ISO8601
-> Text
-> ReferenceStoreDetail
ReferenceStoreDetail'
            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 ReferenceStoreDetail where
  hashWithSalt :: Int -> ReferenceStoreDetail -> Int
hashWithSalt Int
_salt ReferenceStoreDetail' {Maybe Text
Maybe SseConfig
Text
ISO8601
id :: Text
creationTime :: ISO8601
arn :: Text
sseConfig :: Maybe SseConfig
name :: Maybe Text
description :: Maybe Text
$sel:id:ReferenceStoreDetail' :: ReferenceStoreDetail -> Text
$sel:creationTime:ReferenceStoreDetail' :: ReferenceStoreDetail -> ISO8601
$sel:arn:ReferenceStoreDetail' :: ReferenceStoreDetail -> Text
$sel:sseConfig:ReferenceStoreDetail' :: ReferenceStoreDetail -> Maybe SseConfig
$sel:name:ReferenceStoreDetail' :: ReferenceStoreDetail -> Maybe Text
$sel:description:ReferenceStoreDetail' :: ReferenceStoreDetail -> 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 ReferenceStoreDetail where
  rnf :: ReferenceStoreDetail -> ()
rnf ReferenceStoreDetail' {Maybe Text
Maybe SseConfig
Text
ISO8601
id :: Text
creationTime :: ISO8601
arn :: Text
sseConfig :: Maybe SseConfig
name :: Maybe Text
description :: Maybe Text
$sel:id:ReferenceStoreDetail' :: ReferenceStoreDetail -> Text
$sel:creationTime:ReferenceStoreDetail' :: ReferenceStoreDetail -> ISO8601
$sel:arn:ReferenceStoreDetail' :: ReferenceStoreDetail -> Text
$sel:sseConfig:ReferenceStoreDetail' :: ReferenceStoreDetail -> Maybe SseConfig
$sel:name:ReferenceStoreDetail' :: ReferenceStoreDetail -> Maybe Text
$sel:description:ReferenceStoreDetail' :: ReferenceStoreDetail -> 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