{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.PropertyNameSuggestion where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(PropertyNameSuggestion -> PropertyNameSuggestion -> Bool)
-> (PropertyNameSuggestion -> PropertyNameSuggestion -> Bool)
-> Eq PropertyNameSuggestion
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]
(Int -> ReadS PropertyNameSuggestion)
-> ReadS [PropertyNameSuggestion]
-> ReadPrec PropertyNameSuggestion
-> ReadPrec [PropertyNameSuggestion]
-> Read 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
(Int -> PropertyNameSuggestion -> ShowS)
-> (PropertyNameSuggestion -> String)
-> ([PropertyNameSuggestion] -> ShowS)
-> Show PropertyNameSuggestion
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. PropertyNameSuggestion -> Rep PropertyNameSuggestion x)
-> (forall x.
    Rep PropertyNameSuggestion x -> PropertyNameSuggestion)
-> Generic PropertyNameSuggestion
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' :: Maybe Text -> PropertyNameSuggestion
PropertyNameSuggestion'
    { $sel:propertyName:PropertyNameSuggestion' :: Maybe Text
propertyName =
        Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> PropertyNameSuggestion -> f PropertyNameSuggestion
propertyNameSuggestion_propertyName = (PropertyNameSuggestion -> Maybe Text)
-> (PropertyNameSuggestion -> Maybe Text -> PropertyNameSuggestion)
-> Lens
     PropertyNameSuggestion
     PropertyNameSuggestion
     (Maybe Text)
     (Maybe Text)
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 Core.FromJSON PropertyNameSuggestion where
  parseJSON :: Value -> Parser PropertyNameSuggestion
parseJSON =
    String
-> (Object -> Parser PropertyNameSuggestion)
-> Value
-> Parser PropertyNameSuggestion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"PropertyNameSuggestion"
      ( \Object
x ->
          Maybe Text -> PropertyNameSuggestion
PropertyNameSuggestion'
            (Maybe Text -> PropertyNameSuggestion)
-> Parser (Maybe Text) -> Parser PropertyNameSuggestion
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PropertyName")
      )

instance Prelude.Hashable PropertyNameSuggestion

instance Prelude.NFData PropertyNameSuggestion