{-# 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.OpenSearchServerless.Types.CreateVpcEndpointDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.OpenSearchServerless.Types.VpcEndpointStatus
import qualified Amazonka.Prelude as Prelude
data CreateVpcEndpointDetail = CreateVpcEndpointDetail'
{
CreateVpcEndpointDetail -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
CreateVpcEndpointDetail -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateVpcEndpointDetail -> Maybe VpcEndpointStatus
status :: Prelude.Maybe VpcEndpointStatus
}
deriving (CreateVpcEndpointDetail -> CreateVpcEndpointDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVpcEndpointDetail -> CreateVpcEndpointDetail -> Bool
$c/= :: CreateVpcEndpointDetail -> CreateVpcEndpointDetail -> Bool
== :: CreateVpcEndpointDetail -> CreateVpcEndpointDetail -> Bool
$c== :: CreateVpcEndpointDetail -> CreateVpcEndpointDetail -> Bool
Prelude.Eq, ReadPrec [CreateVpcEndpointDetail]
ReadPrec CreateVpcEndpointDetail
Int -> ReadS CreateVpcEndpointDetail
ReadS [CreateVpcEndpointDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVpcEndpointDetail]
$creadListPrec :: ReadPrec [CreateVpcEndpointDetail]
readPrec :: ReadPrec CreateVpcEndpointDetail
$creadPrec :: ReadPrec CreateVpcEndpointDetail
readList :: ReadS [CreateVpcEndpointDetail]
$creadList :: ReadS [CreateVpcEndpointDetail]
readsPrec :: Int -> ReadS CreateVpcEndpointDetail
$creadsPrec :: Int -> ReadS CreateVpcEndpointDetail
Prelude.Read, Int -> CreateVpcEndpointDetail -> ShowS
[CreateVpcEndpointDetail] -> ShowS
CreateVpcEndpointDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVpcEndpointDetail] -> ShowS
$cshowList :: [CreateVpcEndpointDetail] -> ShowS
show :: CreateVpcEndpointDetail -> String
$cshow :: CreateVpcEndpointDetail -> String
showsPrec :: Int -> CreateVpcEndpointDetail -> ShowS
$cshowsPrec :: Int -> CreateVpcEndpointDetail -> ShowS
Prelude.Show, forall x. Rep CreateVpcEndpointDetail x -> CreateVpcEndpointDetail
forall x. CreateVpcEndpointDetail -> Rep CreateVpcEndpointDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateVpcEndpointDetail x -> CreateVpcEndpointDetail
$cfrom :: forall x. CreateVpcEndpointDetail -> Rep CreateVpcEndpointDetail x
Prelude.Generic)
newCreateVpcEndpointDetail ::
CreateVpcEndpointDetail
newCreateVpcEndpointDetail :: CreateVpcEndpointDetail
newCreateVpcEndpointDetail =
CreateVpcEndpointDetail'
{ $sel:id:CreateVpcEndpointDetail' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateVpcEndpointDetail' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:status:CreateVpcEndpointDetail' :: Maybe VpcEndpointStatus
status = forall a. Maybe a
Prelude.Nothing
}
createVpcEndpointDetail_id :: Lens.Lens' CreateVpcEndpointDetail (Prelude.Maybe Prelude.Text)
createVpcEndpointDetail_id :: Lens' CreateVpcEndpointDetail (Maybe Text)
createVpcEndpointDetail_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcEndpointDetail' {Maybe Text
id :: Maybe Text
$sel:id:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateVpcEndpointDetail
s@CreateVpcEndpointDetail' {} Maybe Text
a -> CreateVpcEndpointDetail
s {$sel:id:CreateVpcEndpointDetail' :: Maybe Text
id = Maybe Text
a} :: CreateVpcEndpointDetail)
createVpcEndpointDetail_name :: Lens.Lens' CreateVpcEndpointDetail (Prelude.Maybe Prelude.Text)
createVpcEndpointDetail_name :: Lens' CreateVpcEndpointDetail (Maybe Text)
createVpcEndpointDetail_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcEndpointDetail' {Maybe Text
name :: Maybe Text
$sel:name:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateVpcEndpointDetail
s@CreateVpcEndpointDetail' {} Maybe Text
a -> CreateVpcEndpointDetail
s {$sel:name:CreateVpcEndpointDetail' :: Maybe Text
name = Maybe Text
a} :: CreateVpcEndpointDetail)
createVpcEndpointDetail_status :: Lens.Lens' CreateVpcEndpointDetail (Prelude.Maybe VpcEndpointStatus)
createVpcEndpointDetail_status :: Lens' CreateVpcEndpointDetail (Maybe VpcEndpointStatus)
createVpcEndpointDetail_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVpcEndpointDetail' {Maybe VpcEndpointStatus
status :: Maybe VpcEndpointStatus
$sel:status:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe VpcEndpointStatus
status} -> Maybe VpcEndpointStatus
status) (\s :: CreateVpcEndpointDetail
s@CreateVpcEndpointDetail' {} Maybe VpcEndpointStatus
a -> CreateVpcEndpointDetail
s {$sel:status:CreateVpcEndpointDetail' :: Maybe VpcEndpointStatus
status = Maybe VpcEndpointStatus
a} :: CreateVpcEndpointDetail)
instance Data.FromJSON CreateVpcEndpointDetail where
parseJSON :: Value -> Parser CreateVpcEndpointDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CreateVpcEndpointDetail"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe VpcEndpointStatus -> CreateVpcEndpointDetail
CreateVpcEndpointDetail'
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
"id")
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
"name")
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
"status")
)
instance Prelude.Hashable CreateVpcEndpointDetail where
hashWithSalt :: Int -> CreateVpcEndpointDetail -> Int
hashWithSalt Int
_salt CreateVpcEndpointDetail' {Maybe Text
Maybe VpcEndpointStatus
status :: Maybe VpcEndpointStatus
name :: Maybe Text
id :: Maybe Text
$sel:status:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe VpcEndpointStatus
$sel:name:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe Text
$sel:id:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcEndpointStatus
status
instance Prelude.NFData CreateVpcEndpointDetail where
rnf :: CreateVpcEndpointDetail -> ()
rnf CreateVpcEndpointDetail' {Maybe Text
Maybe VpcEndpointStatus
status :: Maybe VpcEndpointStatus
name :: Maybe Text
id :: Maybe Text
$sel:status:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe VpcEndpointStatus
$sel:name:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe Text
$sel:id:CreateVpcEndpointDetail' :: CreateVpcEndpointDetail -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcEndpointStatus
status