{-# 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.SageMaker.Types.PropertyNameSuggestion
-- 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.SageMaker.Types.PropertyNameSuggestion 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

-- | A property name returned from a @GetSearchSuggestions@ call that
-- specifies a value in the @PropertyNameQuery@ field.
--
-- /See:/ 'newPropertyNameSuggestion' smart constructor.
data PropertyNameSuggestion = PropertyNameSuggestion'
  { -- | A suggested property name based on what you entered in the search
    -- textbox in the Amazon SageMaker console.
    PropertyNameSuggestion -> Maybe Text
propertyName :: Prelude.Maybe Prelude.Text
  }
  deriving (PropertyNameSuggestion -> PropertyNameSuggestion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PropertyNameSuggestion -> PropertyNameSuggestion -> Bool
$c/= :: PropertyNameSuggestion -> PropertyNameSuggestion -> Bool
== :: PropertyNameSuggestion -> PropertyNameSuggestion -> Bool
$c== :: PropertyNameSuggestion -> PropertyNameSuggestion -> Bool
Prelude.Eq, ReadPrec [PropertyNameSuggestion]
ReadPrec PropertyNameSuggestion
Int -> ReadS PropertyNameSuggestion
ReadS [PropertyNameSuggestion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PropertyNameSuggestion]
$creadListPrec :: ReadPrec [PropertyNameSuggestion]
readPrec :: ReadPrec PropertyNameSuggestion
$creadPrec :: ReadPrec PropertyNameSuggestion
readList :: ReadS [PropertyNameSuggestion]
$creadList :: ReadS [PropertyNameSuggestion]
readsPrec :: Int -> ReadS PropertyNameSuggestion
$creadsPrec :: Int -> ReadS PropertyNameSuggestion
Prelude.Read, Int -> PropertyNameSuggestion -> ShowS
[PropertyNameSuggestion] -> ShowS
PropertyNameSuggestion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PropertyNameSuggestion] -> ShowS
$cshowList :: [PropertyNameSuggestion] -> ShowS
show :: PropertyNameSuggestion -> String
$cshow :: PropertyNameSuggestion -> String
showsPrec :: Int -> PropertyNameSuggestion -> ShowS
$cshowsPrec :: Int -> PropertyNameSuggestion -> ShowS
Prelude.Show, forall x. Rep PropertyNameSuggestion x -> PropertyNameSuggestion
forall x. PropertyNameSuggestion -> Rep PropertyNameSuggestion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PropertyNameSuggestion x -> PropertyNameSuggestion
$cfrom :: forall x. PropertyNameSuggestion -> Rep PropertyNameSuggestion x
Prelude.Generic)

-- |
-- Create a value of 'PropertyNameSuggestion' 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:
--
-- 'propertyName', 'propertyNameSuggestion_propertyName' - A suggested property name based on what you entered in the search
-- textbox in the Amazon SageMaker console.
newPropertyNameSuggestion ::
  PropertyNameSuggestion
newPropertyNameSuggestion :: PropertyNameSuggestion
newPropertyNameSuggestion =
  PropertyNameSuggestion'
    { $sel:propertyName:PropertyNameSuggestion' :: Maybe Text
propertyName =
        forall a. Maybe a
Prelude.Nothing
    }

-- | A suggested property name based on what you entered in the search
-- textbox in the Amazon SageMaker console.
propertyNameSuggestion_propertyName :: Lens.Lens' PropertyNameSuggestion (Prelude.Maybe Prelude.Text)
propertyNameSuggestion_propertyName :: Lens' PropertyNameSuggestion (Maybe Text)
propertyNameSuggestion_propertyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PropertyNameSuggestion' {Maybe Text
propertyName :: Maybe Text
$sel:propertyName:PropertyNameSuggestion' :: PropertyNameSuggestion -> Maybe Text
propertyName} -> Maybe Text
propertyName) (\s :: PropertyNameSuggestion
s@PropertyNameSuggestion' {} Maybe Text
a -> PropertyNameSuggestion
s {$sel:propertyName:PropertyNameSuggestion' :: Maybe Text
propertyName = Maybe Text
a} :: PropertyNameSuggestion)

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

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

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