{-# 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.SageMakerGeoSpatial.Types.AssetValue
-- 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.SageMakerGeoSpatial.Types.AssetValue where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- |
--
-- /See:/ 'newAssetValue' smart constructor.
data AssetValue = AssetValue'
  { AssetValue -> Maybe Text
href :: Prelude.Maybe Prelude.Text
  }
  deriving (AssetValue -> AssetValue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssetValue -> AssetValue -> Bool
$c/= :: AssetValue -> AssetValue -> Bool
== :: AssetValue -> AssetValue -> Bool
$c== :: AssetValue -> AssetValue -> Bool
Prelude.Eq, ReadPrec [AssetValue]
ReadPrec AssetValue
Int -> ReadS AssetValue
ReadS [AssetValue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssetValue]
$creadListPrec :: ReadPrec [AssetValue]
readPrec :: ReadPrec AssetValue
$creadPrec :: ReadPrec AssetValue
readList :: ReadS [AssetValue]
$creadList :: ReadS [AssetValue]
readsPrec :: Int -> ReadS AssetValue
$creadsPrec :: Int -> ReadS AssetValue
Prelude.Read, Int -> AssetValue -> ShowS
[AssetValue] -> ShowS
AssetValue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssetValue] -> ShowS
$cshowList :: [AssetValue] -> ShowS
show :: AssetValue -> String
$cshow :: AssetValue -> String
showsPrec :: Int -> AssetValue -> ShowS
$cshowsPrec :: Int -> AssetValue -> ShowS
Prelude.Show, forall x. Rep AssetValue x -> AssetValue
forall x. AssetValue -> Rep AssetValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssetValue x -> AssetValue
$cfrom :: forall x. AssetValue -> Rep AssetValue x
Prelude.Generic)

-- |
-- Create a value of 'AssetValue' 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:
--
-- 'href', 'assetValue_href' -
newAssetValue ::
  AssetValue
newAssetValue :: AssetValue
newAssetValue = AssetValue' {$sel:href:AssetValue' :: Maybe Text
href = forall a. Maybe a
Prelude.Nothing}

assetValue_href :: Lens.Lens' AssetValue (Prelude.Maybe Prelude.Text)
assetValue_href :: Lens' AssetValue (Maybe Text)
assetValue_href = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssetValue' {Maybe Text
href :: Maybe Text
$sel:href:AssetValue' :: AssetValue -> Maybe Text
href} -> Maybe Text
href) (\s :: AssetValue
s@AssetValue' {} Maybe Text
a -> AssetValue
s {$sel:href:AssetValue' :: Maybe Text
href = Maybe Text
a} :: AssetValue)

instance Data.FromJSON AssetValue where
  parseJSON :: Value -> Parser AssetValue
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AssetValue"
      (\Object
x -> Maybe Text -> AssetValue
AssetValue' 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
"Href"))

instance Prelude.Hashable AssetValue where
  hashWithSalt :: Int -> AssetValue -> Int
hashWithSalt Int
_salt AssetValue' {Maybe Text
href :: Maybe Text
$sel:href:AssetValue' :: AssetValue -> Maybe Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
href

instance Prelude.NFData AssetValue where
  rnf :: AssetValue -> ()
rnf AssetValue' {Maybe Text
href :: Maybe Text
$sel:href:AssetValue' :: AssetValue -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
href