{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Transcribe.UpdateVocabularyFilter
-- 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)
--
-- Updates a vocabulary filter with a new list of filtered words.
module Amazonka.Transcribe.UpdateVocabularyFilter
  ( -- * Creating a Request
    UpdateVocabularyFilter (..),
    newUpdateVocabularyFilter,

    -- * Request Lenses
    updateVocabularyFilter_vocabularyFilterFileUri,
    updateVocabularyFilter_words,
    updateVocabularyFilter_vocabularyFilterName,

    -- * Destructuring the Response
    UpdateVocabularyFilterResponse (..),
    newUpdateVocabularyFilterResponse,

    -- * Response Lenses
    updateVocabularyFilterResponse_languageCode,
    updateVocabularyFilterResponse_lastModifiedTime,
    updateVocabularyFilterResponse_vocabularyFilterName,
    updateVocabularyFilterResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Transcribe.Types

-- | /See:/ 'newUpdateVocabularyFilter' smart constructor.
data UpdateVocabularyFilter = UpdateVocabularyFilter'
  { -- | The Amazon S3 location of a text file used as input to create the
    -- vocabulary filter. Only use characters from the character set defined
    -- for custom vocabularies. For a list of character sets, see
    -- <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets Character Sets for Custom Vocabularies>.
    --
    -- The specified file must be less than 50 KB of UTF-8 characters.
    --
    -- If you provide the location of a list of words in the
    -- @VocabularyFilterFileUri@ parameter, you can\'t use the @Words@
    -- parameter.
    UpdateVocabularyFilter -> Maybe Text
vocabularyFilterFileUri :: Prelude.Maybe Prelude.Text,
    -- | The words to use in the vocabulary filter. Only use characters from the
    -- character set defined for custom vocabularies. For a list of character
    -- sets, see
    -- <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets Character Sets for Custom Vocabularies>.
    --
    -- If you provide a list of words in the @Words@ parameter, you can\'t use
    -- the @VocabularyFilterFileUri@ parameter.
    UpdateVocabularyFilter -> Maybe (NonEmpty Text)
words :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The name of the vocabulary filter to update. If you try to update a
    -- vocabulary filter with the same name as another vocabulary filter, you
    -- get a @ConflictException@ error.
    UpdateVocabularyFilter -> Text
vocabularyFilterName :: Prelude.Text
  }
  deriving (UpdateVocabularyFilter -> UpdateVocabularyFilter -> Bool
(UpdateVocabularyFilter -> UpdateVocabularyFilter -> Bool)
-> (UpdateVocabularyFilter -> UpdateVocabularyFilter -> Bool)
-> Eq UpdateVocabularyFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVocabularyFilter -> UpdateVocabularyFilter -> Bool
$c/= :: UpdateVocabularyFilter -> UpdateVocabularyFilter -> Bool
== :: UpdateVocabularyFilter -> UpdateVocabularyFilter -> Bool
$c== :: UpdateVocabularyFilter -> UpdateVocabularyFilter -> Bool
Prelude.Eq, ReadPrec [UpdateVocabularyFilter]
ReadPrec UpdateVocabularyFilter
Int -> ReadS UpdateVocabularyFilter
ReadS [UpdateVocabularyFilter]
(Int -> ReadS UpdateVocabularyFilter)
-> ReadS [UpdateVocabularyFilter]
-> ReadPrec UpdateVocabularyFilter
-> ReadPrec [UpdateVocabularyFilter]
-> Read UpdateVocabularyFilter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVocabularyFilter]
$creadListPrec :: ReadPrec [UpdateVocabularyFilter]
readPrec :: ReadPrec UpdateVocabularyFilter
$creadPrec :: ReadPrec UpdateVocabularyFilter
readList :: ReadS [UpdateVocabularyFilter]
$creadList :: ReadS [UpdateVocabularyFilter]
readsPrec :: Int -> ReadS UpdateVocabularyFilter
$creadsPrec :: Int -> ReadS UpdateVocabularyFilter
Prelude.Read, Int -> UpdateVocabularyFilter -> ShowS
[UpdateVocabularyFilter] -> ShowS
UpdateVocabularyFilter -> String
(Int -> UpdateVocabularyFilter -> ShowS)
-> (UpdateVocabularyFilter -> String)
-> ([UpdateVocabularyFilter] -> ShowS)
-> Show UpdateVocabularyFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVocabularyFilter] -> ShowS
$cshowList :: [UpdateVocabularyFilter] -> ShowS
show :: UpdateVocabularyFilter -> String
$cshow :: UpdateVocabularyFilter -> String
showsPrec :: Int -> UpdateVocabularyFilter -> ShowS
$cshowsPrec :: Int -> UpdateVocabularyFilter -> ShowS
Prelude.Show, (forall x. UpdateVocabularyFilter -> Rep UpdateVocabularyFilter x)
-> (forall x.
    Rep UpdateVocabularyFilter x -> UpdateVocabularyFilter)
-> Generic UpdateVocabularyFilter
forall x. Rep UpdateVocabularyFilter x -> UpdateVocabularyFilter
forall x. UpdateVocabularyFilter -> Rep UpdateVocabularyFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateVocabularyFilter x -> UpdateVocabularyFilter
$cfrom :: forall x. UpdateVocabularyFilter -> Rep UpdateVocabularyFilter x
Prelude.Generic)

-- |
-- Create a value of 'UpdateVocabularyFilter' 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:
--
-- 'vocabularyFilterFileUri', 'updateVocabularyFilter_vocabularyFilterFileUri' - The Amazon S3 location of a text file used as input to create the
-- vocabulary filter. Only use characters from the character set defined
-- for custom vocabularies. For a list of character sets, see
-- <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets Character Sets for Custom Vocabularies>.
--
-- The specified file must be less than 50 KB of UTF-8 characters.
--
-- If you provide the location of a list of words in the
-- @VocabularyFilterFileUri@ parameter, you can\'t use the @Words@
-- parameter.
--
-- 'words', 'updateVocabularyFilter_words' - The words to use in the vocabulary filter. Only use characters from the
-- character set defined for custom vocabularies. For a list of character
-- sets, see
-- <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets Character Sets for Custom Vocabularies>.
--
-- If you provide a list of words in the @Words@ parameter, you can\'t use
-- the @VocabularyFilterFileUri@ parameter.
--
-- 'vocabularyFilterName', 'updateVocabularyFilter_vocabularyFilterName' - The name of the vocabulary filter to update. If you try to update a
-- vocabulary filter with the same name as another vocabulary filter, you
-- get a @ConflictException@ error.
newUpdateVocabularyFilter ::
  -- | 'vocabularyFilterName'
  Prelude.Text ->
  UpdateVocabularyFilter
newUpdateVocabularyFilter :: Text -> UpdateVocabularyFilter
newUpdateVocabularyFilter Text
pVocabularyFilterName_ =
  UpdateVocabularyFilter' :: Maybe Text
-> Maybe (NonEmpty Text) -> Text -> UpdateVocabularyFilter
UpdateVocabularyFilter'
    { $sel:vocabularyFilterFileUri:UpdateVocabularyFilter' :: Maybe Text
vocabularyFilterFileUri =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:words:UpdateVocabularyFilter' :: Maybe (NonEmpty Text)
words = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyFilterName:UpdateVocabularyFilter' :: Text
vocabularyFilterName = Text
pVocabularyFilterName_
    }

-- | The Amazon S3 location of a text file used as input to create the
-- vocabulary filter. Only use characters from the character set defined
-- for custom vocabularies. For a list of character sets, see
-- <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets Character Sets for Custom Vocabularies>.
--
-- The specified file must be less than 50 KB of UTF-8 characters.
--
-- If you provide the location of a list of words in the
-- @VocabularyFilterFileUri@ parameter, you can\'t use the @Words@
-- parameter.
updateVocabularyFilter_vocabularyFilterFileUri :: Lens.Lens' UpdateVocabularyFilter (Prelude.Maybe Prelude.Text)
updateVocabularyFilter_vocabularyFilterFileUri :: (Maybe Text -> f (Maybe Text))
-> UpdateVocabularyFilter -> f UpdateVocabularyFilter
updateVocabularyFilter_vocabularyFilterFileUri = (UpdateVocabularyFilter -> Maybe Text)
-> (UpdateVocabularyFilter -> Maybe Text -> UpdateVocabularyFilter)
-> Lens
     UpdateVocabularyFilter
     UpdateVocabularyFilter
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVocabularyFilter' {Maybe Text
vocabularyFilterFileUri :: Maybe Text
$sel:vocabularyFilterFileUri:UpdateVocabularyFilter' :: UpdateVocabularyFilter -> Maybe Text
vocabularyFilterFileUri} -> Maybe Text
vocabularyFilterFileUri) (\s :: UpdateVocabularyFilter
s@UpdateVocabularyFilter' {} Maybe Text
a -> UpdateVocabularyFilter
s {$sel:vocabularyFilterFileUri:UpdateVocabularyFilter' :: Maybe Text
vocabularyFilterFileUri = Maybe Text
a} :: UpdateVocabularyFilter)

-- | The words to use in the vocabulary filter. Only use characters from the
-- character set defined for custom vocabularies. For a list of character
-- sets, see
-- <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html#charsets Character Sets for Custom Vocabularies>.
--
-- If you provide a list of words in the @Words@ parameter, you can\'t use
-- the @VocabularyFilterFileUri@ parameter.
updateVocabularyFilter_words :: Lens.Lens' UpdateVocabularyFilter (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
updateVocabularyFilter_words :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateVocabularyFilter -> f UpdateVocabularyFilter
updateVocabularyFilter_words = (UpdateVocabularyFilter -> Maybe (NonEmpty Text))
-> (UpdateVocabularyFilter
    -> Maybe (NonEmpty Text) -> UpdateVocabularyFilter)
-> Lens
     UpdateVocabularyFilter
     UpdateVocabularyFilter
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVocabularyFilter' {Maybe (NonEmpty Text)
words :: Maybe (NonEmpty Text)
$sel:words:UpdateVocabularyFilter' :: UpdateVocabularyFilter -> Maybe (NonEmpty Text)
words} -> Maybe (NonEmpty Text)
words) (\s :: UpdateVocabularyFilter
s@UpdateVocabularyFilter' {} Maybe (NonEmpty Text)
a -> UpdateVocabularyFilter
s {$sel:words:UpdateVocabularyFilter' :: Maybe (NonEmpty Text)
words = Maybe (NonEmpty Text)
a} :: UpdateVocabularyFilter) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> UpdateVocabularyFilter -> f UpdateVocabularyFilter)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateVocabularyFilter
-> f UpdateVocabularyFilter
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the vocabulary filter to update. If you try to update a
-- vocabulary filter with the same name as another vocabulary filter, you
-- get a @ConflictException@ error.
updateVocabularyFilter_vocabularyFilterName :: Lens.Lens' UpdateVocabularyFilter Prelude.Text
updateVocabularyFilter_vocabularyFilterName :: (Text -> f Text)
-> UpdateVocabularyFilter -> f UpdateVocabularyFilter
updateVocabularyFilter_vocabularyFilterName = (UpdateVocabularyFilter -> Text)
-> (UpdateVocabularyFilter -> Text -> UpdateVocabularyFilter)
-> Lens UpdateVocabularyFilter UpdateVocabularyFilter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVocabularyFilter' {Text
vocabularyFilterName :: Text
$sel:vocabularyFilterName:UpdateVocabularyFilter' :: UpdateVocabularyFilter -> Text
vocabularyFilterName} -> Text
vocabularyFilterName) (\s :: UpdateVocabularyFilter
s@UpdateVocabularyFilter' {} Text
a -> UpdateVocabularyFilter
s {$sel:vocabularyFilterName:UpdateVocabularyFilter' :: Text
vocabularyFilterName = Text
a} :: UpdateVocabularyFilter)

instance Core.AWSRequest UpdateVocabularyFilter where
  type
    AWSResponse UpdateVocabularyFilter =
      UpdateVocabularyFilterResponse
  request :: UpdateVocabularyFilter -> Request UpdateVocabularyFilter
request = Service -> UpdateVocabularyFilter -> Request UpdateVocabularyFilter
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateVocabularyFilter
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateVocabularyFilter)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateVocabularyFilter))
-> Logger
-> Service
-> Proxy UpdateVocabularyFilter
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateVocabularyFilter)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe LanguageCode
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateVocabularyFilterResponse
UpdateVocabularyFilterResponse'
            (Maybe LanguageCode
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> UpdateVocabularyFilterResponse)
-> Either String (Maybe LanguageCode)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text -> Int -> UpdateVocabularyFilterResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe LanguageCode)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LanguageCode")
            Either
  String
  (Maybe POSIX
   -> Maybe Text -> Int -> UpdateVocabularyFilterResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe Text -> Int -> UpdateVocabularyFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedTime")
            Either String (Maybe Text -> Int -> UpdateVocabularyFilterResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateVocabularyFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VocabularyFilterName")
            Either String (Int -> UpdateVocabularyFilterResponse)
-> Either String Int
-> Either String UpdateVocabularyFilterResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateVocabularyFilter

instance Prelude.NFData UpdateVocabularyFilter

instance Core.ToHeaders UpdateVocabularyFilter where
  toHeaders :: UpdateVocabularyFilter -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateVocabularyFilter -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Transcribe.UpdateVocabularyFilter" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateVocabularyFilter where
  toJSON :: UpdateVocabularyFilter -> Value
toJSON UpdateVocabularyFilter' {Maybe (NonEmpty Text)
Maybe Text
Text
vocabularyFilterName :: Text
words :: Maybe (NonEmpty Text)
vocabularyFilterFileUri :: Maybe Text
$sel:vocabularyFilterName:UpdateVocabularyFilter' :: UpdateVocabularyFilter -> Text
$sel:words:UpdateVocabularyFilter' :: UpdateVocabularyFilter -> Maybe (NonEmpty Text)
$sel:vocabularyFilterFileUri:UpdateVocabularyFilter' :: UpdateVocabularyFilter -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"VocabularyFilterFileUri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vocabularyFilterFileUri,
            (Text
"Words" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
words,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"VocabularyFilterName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vocabularyFilterName
              )
          ]
      )

instance Core.ToPath UpdateVocabularyFilter where
  toPath :: UpdateVocabularyFilter -> ByteString
toPath = ByteString -> UpdateVocabularyFilter -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateVocabularyFilter where
  toQuery :: UpdateVocabularyFilter -> QueryString
toQuery = QueryString -> UpdateVocabularyFilter -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateVocabularyFilterResponse' smart constructor.
data UpdateVocabularyFilterResponse = UpdateVocabularyFilterResponse'
  { -- | The language code of the words in the vocabulary filter.
    UpdateVocabularyFilterResponse -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | The date and time that the vocabulary filter was updated.
    UpdateVocabularyFilterResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the updated vocabulary filter.
    UpdateVocabularyFilterResponse -> Maybe Text
vocabularyFilterName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateVocabularyFilterResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateVocabularyFilterResponse
-> UpdateVocabularyFilterResponse -> Bool
(UpdateVocabularyFilterResponse
 -> UpdateVocabularyFilterResponse -> Bool)
-> (UpdateVocabularyFilterResponse
    -> UpdateVocabularyFilterResponse -> Bool)
-> Eq UpdateVocabularyFilterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVocabularyFilterResponse
-> UpdateVocabularyFilterResponse -> Bool
$c/= :: UpdateVocabularyFilterResponse
-> UpdateVocabularyFilterResponse -> Bool
== :: UpdateVocabularyFilterResponse
-> UpdateVocabularyFilterResponse -> Bool
$c== :: UpdateVocabularyFilterResponse
-> UpdateVocabularyFilterResponse -> Bool
Prelude.Eq, ReadPrec [UpdateVocabularyFilterResponse]
ReadPrec UpdateVocabularyFilterResponse
Int -> ReadS UpdateVocabularyFilterResponse
ReadS [UpdateVocabularyFilterResponse]
(Int -> ReadS UpdateVocabularyFilterResponse)
-> ReadS [UpdateVocabularyFilterResponse]
-> ReadPrec UpdateVocabularyFilterResponse
-> ReadPrec [UpdateVocabularyFilterResponse]
-> Read UpdateVocabularyFilterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVocabularyFilterResponse]
$creadListPrec :: ReadPrec [UpdateVocabularyFilterResponse]
readPrec :: ReadPrec UpdateVocabularyFilterResponse
$creadPrec :: ReadPrec UpdateVocabularyFilterResponse
readList :: ReadS [UpdateVocabularyFilterResponse]
$creadList :: ReadS [UpdateVocabularyFilterResponse]
readsPrec :: Int -> ReadS UpdateVocabularyFilterResponse
$creadsPrec :: Int -> ReadS UpdateVocabularyFilterResponse
Prelude.Read, Int -> UpdateVocabularyFilterResponse -> ShowS
[UpdateVocabularyFilterResponse] -> ShowS
UpdateVocabularyFilterResponse -> String
(Int -> UpdateVocabularyFilterResponse -> ShowS)
-> (UpdateVocabularyFilterResponse -> String)
-> ([UpdateVocabularyFilterResponse] -> ShowS)
-> Show UpdateVocabularyFilterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVocabularyFilterResponse] -> ShowS
$cshowList :: [UpdateVocabularyFilterResponse] -> ShowS
show :: UpdateVocabularyFilterResponse -> String
$cshow :: UpdateVocabularyFilterResponse -> String
showsPrec :: Int -> UpdateVocabularyFilterResponse -> ShowS
$cshowsPrec :: Int -> UpdateVocabularyFilterResponse -> ShowS
Prelude.Show, (forall x.
 UpdateVocabularyFilterResponse
 -> Rep UpdateVocabularyFilterResponse x)
-> (forall x.
    Rep UpdateVocabularyFilterResponse x
    -> UpdateVocabularyFilterResponse)
-> Generic UpdateVocabularyFilterResponse
forall x.
Rep UpdateVocabularyFilterResponse x
-> UpdateVocabularyFilterResponse
forall x.
UpdateVocabularyFilterResponse
-> Rep UpdateVocabularyFilterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateVocabularyFilterResponse x
-> UpdateVocabularyFilterResponse
$cfrom :: forall x.
UpdateVocabularyFilterResponse
-> Rep UpdateVocabularyFilterResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateVocabularyFilterResponse' 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:
--
-- 'languageCode', 'updateVocabularyFilterResponse_languageCode' - The language code of the words in the vocabulary filter.
--
-- 'lastModifiedTime', 'updateVocabularyFilterResponse_lastModifiedTime' - The date and time that the vocabulary filter was updated.
--
-- 'vocabularyFilterName', 'updateVocabularyFilterResponse_vocabularyFilterName' - The name of the updated vocabulary filter.
--
-- 'httpStatus', 'updateVocabularyFilterResponse_httpStatus' - The response's http status code.
newUpdateVocabularyFilterResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateVocabularyFilterResponse
newUpdateVocabularyFilterResponse :: Int -> UpdateVocabularyFilterResponse
newUpdateVocabularyFilterResponse Int
pHttpStatus_ =
  UpdateVocabularyFilterResponse' :: Maybe LanguageCode
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateVocabularyFilterResponse
UpdateVocabularyFilterResponse'
    { $sel:languageCode:UpdateVocabularyFilterResponse' :: Maybe LanguageCode
languageCode =
        Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:UpdateVocabularyFilterResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyFilterName:UpdateVocabularyFilterResponse' :: Maybe Text
vocabularyFilterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateVocabularyFilterResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The language code of the words in the vocabulary filter.
updateVocabularyFilterResponse_languageCode :: Lens.Lens' UpdateVocabularyFilterResponse (Prelude.Maybe LanguageCode)
updateVocabularyFilterResponse_languageCode :: (Maybe LanguageCode -> f (Maybe LanguageCode))
-> UpdateVocabularyFilterResponse
-> f UpdateVocabularyFilterResponse
updateVocabularyFilterResponse_languageCode = (UpdateVocabularyFilterResponse -> Maybe LanguageCode)
-> (UpdateVocabularyFilterResponse
    -> Maybe LanguageCode -> UpdateVocabularyFilterResponse)
-> Lens
     UpdateVocabularyFilterResponse
     UpdateVocabularyFilterResponse
     (Maybe LanguageCode)
     (Maybe LanguageCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVocabularyFilterResponse' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:UpdateVocabularyFilterResponse' :: UpdateVocabularyFilterResponse -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: UpdateVocabularyFilterResponse
s@UpdateVocabularyFilterResponse' {} Maybe LanguageCode
a -> UpdateVocabularyFilterResponse
s {$sel:languageCode:UpdateVocabularyFilterResponse' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: UpdateVocabularyFilterResponse)

-- | The date and time that the vocabulary filter was updated.
updateVocabularyFilterResponse_lastModifiedTime :: Lens.Lens' UpdateVocabularyFilterResponse (Prelude.Maybe Prelude.UTCTime)
updateVocabularyFilterResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateVocabularyFilterResponse
-> f UpdateVocabularyFilterResponse
updateVocabularyFilterResponse_lastModifiedTime = (UpdateVocabularyFilterResponse -> Maybe POSIX)
-> (UpdateVocabularyFilterResponse
    -> Maybe POSIX -> UpdateVocabularyFilterResponse)
-> Lens
     UpdateVocabularyFilterResponse
     UpdateVocabularyFilterResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVocabularyFilterResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:UpdateVocabularyFilterResponse' :: UpdateVocabularyFilterResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: UpdateVocabularyFilterResponse
s@UpdateVocabularyFilterResponse' {} Maybe POSIX
a -> UpdateVocabularyFilterResponse
s {$sel:lastModifiedTime:UpdateVocabularyFilterResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: UpdateVocabularyFilterResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateVocabularyFilterResponse
 -> f UpdateVocabularyFilterResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateVocabularyFilterResponse
-> f UpdateVocabularyFilterResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the updated vocabulary filter.
updateVocabularyFilterResponse_vocabularyFilterName :: Lens.Lens' UpdateVocabularyFilterResponse (Prelude.Maybe Prelude.Text)
updateVocabularyFilterResponse_vocabularyFilterName :: (Maybe Text -> f (Maybe Text))
-> UpdateVocabularyFilterResponse
-> f UpdateVocabularyFilterResponse
updateVocabularyFilterResponse_vocabularyFilterName = (UpdateVocabularyFilterResponse -> Maybe Text)
-> (UpdateVocabularyFilterResponse
    -> Maybe Text -> UpdateVocabularyFilterResponse)
-> Lens
     UpdateVocabularyFilterResponse
     UpdateVocabularyFilterResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVocabularyFilterResponse' {Maybe Text
vocabularyFilterName :: Maybe Text
$sel:vocabularyFilterName:UpdateVocabularyFilterResponse' :: UpdateVocabularyFilterResponse -> Maybe Text
vocabularyFilterName} -> Maybe Text
vocabularyFilterName) (\s :: UpdateVocabularyFilterResponse
s@UpdateVocabularyFilterResponse' {} Maybe Text
a -> UpdateVocabularyFilterResponse
s {$sel:vocabularyFilterName:UpdateVocabularyFilterResponse' :: Maybe Text
vocabularyFilterName = Maybe Text
a} :: UpdateVocabularyFilterResponse)

-- | The response's http status code.
updateVocabularyFilterResponse_httpStatus :: Lens.Lens' UpdateVocabularyFilterResponse Prelude.Int
updateVocabularyFilterResponse_httpStatus :: (Int -> f Int)
-> UpdateVocabularyFilterResponse
-> f UpdateVocabularyFilterResponse
updateVocabularyFilterResponse_httpStatus = (UpdateVocabularyFilterResponse -> Int)
-> (UpdateVocabularyFilterResponse
    -> Int -> UpdateVocabularyFilterResponse)
-> Lens
     UpdateVocabularyFilterResponse
     UpdateVocabularyFilterResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVocabularyFilterResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateVocabularyFilterResponse' :: UpdateVocabularyFilterResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateVocabularyFilterResponse
s@UpdateVocabularyFilterResponse' {} Int
a -> UpdateVocabularyFilterResponse
s {$sel:httpStatus:UpdateVocabularyFilterResponse' :: Int
httpStatus = Int
a} :: UpdateVocabularyFilterResponse)

instance
  Prelude.NFData
    UpdateVocabularyFilterResponse