{-# 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 #-}
module Amazonka.ElasticSearch.Types.VpcEndpointError where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticSearch.Types.VpcEndpointErrorCode
import qualified Amazonka.Prelude as Prelude
data VpcEndpointError = VpcEndpointError'
{
VpcEndpointError -> Maybe VpcEndpointErrorCode
errorCode :: Prelude.Maybe VpcEndpointErrorCode,
VpcEndpointError -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
VpcEndpointError -> Maybe Text
vpcEndpointId :: Prelude.Maybe Prelude.Text
}
deriving (VpcEndpointError -> VpcEndpointError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcEndpointError -> VpcEndpointError -> Bool
$c/= :: VpcEndpointError -> VpcEndpointError -> Bool
== :: VpcEndpointError -> VpcEndpointError -> Bool
$c== :: VpcEndpointError -> VpcEndpointError -> Bool
Prelude.Eq, ReadPrec [VpcEndpointError]
ReadPrec VpcEndpointError
Int -> ReadS VpcEndpointError
ReadS [VpcEndpointError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcEndpointError]
$creadListPrec :: ReadPrec [VpcEndpointError]
readPrec :: ReadPrec VpcEndpointError
$creadPrec :: ReadPrec VpcEndpointError
readList :: ReadS [VpcEndpointError]
$creadList :: ReadS [VpcEndpointError]
readsPrec :: Int -> ReadS VpcEndpointError
$creadsPrec :: Int -> ReadS VpcEndpointError
Prelude.Read, Int -> VpcEndpointError -> ShowS
[VpcEndpointError] -> ShowS
VpcEndpointError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcEndpointError] -> ShowS
$cshowList :: [VpcEndpointError] -> ShowS
show :: VpcEndpointError -> String
$cshow :: VpcEndpointError -> String
showsPrec :: Int -> VpcEndpointError -> ShowS
$cshowsPrec :: Int -> VpcEndpointError -> ShowS
Prelude.Show, forall x. Rep VpcEndpointError x -> VpcEndpointError
forall x. VpcEndpointError -> Rep VpcEndpointError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcEndpointError x -> VpcEndpointError
$cfrom :: forall x. VpcEndpointError -> Rep VpcEndpointError x
Prelude.Generic)
newVpcEndpointError ::
VpcEndpointError
newVpcEndpointError :: VpcEndpointError
newVpcEndpointError =
VpcEndpointError'
{ $sel:errorCode:VpcEndpointError' :: Maybe VpcEndpointErrorCode
errorCode = forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:VpcEndpointError' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:vpcEndpointId:VpcEndpointError' :: Maybe Text
vpcEndpointId = forall a. Maybe a
Prelude.Nothing
}
vpcEndpointError_errorCode :: Lens.Lens' VpcEndpointError (Prelude.Maybe VpcEndpointErrorCode)
vpcEndpointError_errorCode :: Lens' VpcEndpointError (Maybe VpcEndpointErrorCode)
vpcEndpointError_errorCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcEndpointError' {Maybe VpcEndpointErrorCode
errorCode :: Maybe VpcEndpointErrorCode
$sel:errorCode:VpcEndpointError' :: VpcEndpointError -> Maybe VpcEndpointErrorCode
errorCode} -> Maybe VpcEndpointErrorCode
errorCode) (\s :: VpcEndpointError
s@VpcEndpointError' {} Maybe VpcEndpointErrorCode
a -> VpcEndpointError
s {$sel:errorCode:VpcEndpointError' :: Maybe VpcEndpointErrorCode
errorCode = Maybe VpcEndpointErrorCode
a} :: VpcEndpointError)
vpcEndpointError_errorMessage :: Lens.Lens' VpcEndpointError (Prelude.Maybe Prelude.Text)
vpcEndpointError_errorMessage :: Lens' VpcEndpointError (Maybe Text)
vpcEndpointError_errorMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcEndpointError' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:VpcEndpointError' :: VpcEndpointError -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: VpcEndpointError
s@VpcEndpointError' {} Maybe Text
a -> VpcEndpointError
s {$sel:errorMessage:VpcEndpointError' :: Maybe Text
errorMessage = Maybe Text
a} :: VpcEndpointError)
vpcEndpointError_vpcEndpointId :: Lens.Lens' VpcEndpointError (Prelude.Maybe Prelude.Text)
vpcEndpointError_vpcEndpointId :: Lens' VpcEndpointError (Maybe Text)
vpcEndpointError_vpcEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcEndpointError' {Maybe Text
vpcEndpointId :: Maybe Text
$sel:vpcEndpointId:VpcEndpointError' :: VpcEndpointError -> Maybe Text
vpcEndpointId} -> Maybe Text
vpcEndpointId) (\s :: VpcEndpointError
s@VpcEndpointError' {} Maybe Text
a -> VpcEndpointError
s {$sel:vpcEndpointId:VpcEndpointError' :: Maybe Text
vpcEndpointId = Maybe Text
a} :: VpcEndpointError)
instance Data.FromJSON VpcEndpointError where
parseJSON :: Value -> Parser VpcEndpointError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VpcEndpointError"
( \Object
x ->
Maybe VpcEndpointErrorCode
-> Maybe Text -> Maybe Text -> VpcEndpointError
VpcEndpointError'
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
"ErrorCode")
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
"ErrorMessage")
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
"VpcEndpointId")
)
instance Prelude.Hashable VpcEndpointError where
hashWithSalt :: Int -> VpcEndpointError -> Int
hashWithSalt Int
_salt VpcEndpointError' {Maybe Text
Maybe VpcEndpointErrorCode
vpcEndpointId :: Maybe Text
errorMessage :: Maybe Text
errorCode :: Maybe VpcEndpointErrorCode
$sel:vpcEndpointId:VpcEndpointError' :: VpcEndpointError -> Maybe Text
$sel:errorMessage:VpcEndpointError' :: VpcEndpointError -> Maybe Text
$sel:errorCode:VpcEndpointError' :: VpcEndpointError -> Maybe VpcEndpointErrorCode
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcEndpointErrorCode
errorCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcEndpointId
instance Prelude.NFData VpcEndpointError where
rnf :: VpcEndpointError -> ()
rnf VpcEndpointError' {Maybe Text
Maybe VpcEndpointErrorCode
vpcEndpointId :: Maybe Text
errorMessage :: Maybe Text
errorCode :: Maybe VpcEndpointErrorCode
$sel:vpcEndpointId:VpcEndpointError' :: VpcEndpointError -> Maybe Text
$sel:errorMessage:VpcEndpointError' :: VpcEndpointError -> Maybe Text
$sel:errorCode:VpcEndpointError' :: VpcEndpointError -> Maybe VpcEndpointErrorCode
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcEndpointErrorCode
errorCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcEndpointId