{-# 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 #-}
module Amazonka.EKS.CreateAddon
(
CreateAddon (..),
newCreateAddon,
createAddon_addonVersion,
createAddon_serviceAccountRoleArn,
createAddon_resolveConflicts,
createAddon_clientRequestToken,
createAddon_tags,
createAddon_clusterName,
createAddon_addonName,
CreateAddonResponse (..),
newCreateAddonResponse,
createAddonResponse_addon,
createAddonResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EKS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateAddon = CreateAddon'
{
CreateAddon -> Maybe Text
addonVersion :: Prelude.Maybe Prelude.Text,
CreateAddon -> Maybe Text
serviceAccountRoleArn :: Prelude.Maybe Prelude.Text,
CreateAddon -> Maybe ResolveConflicts
resolveConflicts :: Prelude.Maybe ResolveConflicts,
CreateAddon -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateAddon -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateAddon -> Text
clusterName :: Prelude.Text,
CreateAddon -> Text
addonName :: Prelude.Text
}
deriving (CreateAddon -> CreateAddon -> Bool
(CreateAddon -> CreateAddon -> Bool)
-> (CreateAddon -> CreateAddon -> Bool) -> Eq CreateAddon
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAddon -> CreateAddon -> Bool
$c/= :: CreateAddon -> CreateAddon -> Bool
== :: CreateAddon -> CreateAddon -> Bool
$c== :: CreateAddon -> CreateAddon -> Bool
Prelude.Eq, ReadPrec [CreateAddon]
ReadPrec CreateAddon
Int -> ReadS CreateAddon
ReadS [CreateAddon]
(Int -> ReadS CreateAddon)
-> ReadS [CreateAddon]
-> ReadPrec CreateAddon
-> ReadPrec [CreateAddon]
-> Read CreateAddon
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAddon]
$creadListPrec :: ReadPrec [CreateAddon]
readPrec :: ReadPrec CreateAddon
$creadPrec :: ReadPrec CreateAddon
readList :: ReadS [CreateAddon]
$creadList :: ReadS [CreateAddon]
readsPrec :: Int -> ReadS CreateAddon
$creadsPrec :: Int -> ReadS CreateAddon
Prelude.Read, Int -> CreateAddon -> ShowS
[CreateAddon] -> ShowS
CreateAddon -> String
(Int -> CreateAddon -> ShowS)
-> (CreateAddon -> String)
-> ([CreateAddon] -> ShowS)
-> Show CreateAddon
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAddon] -> ShowS
$cshowList :: [CreateAddon] -> ShowS
show :: CreateAddon -> String
$cshow :: CreateAddon -> String
showsPrec :: Int -> CreateAddon -> ShowS
$cshowsPrec :: Int -> CreateAddon -> ShowS
Prelude.Show, (forall x. CreateAddon -> Rep CreateAddon x)
-> (forall x. Rep CreateAddon x -> CreateAddon)
-> Generic CreateAddon
forall x. Rep CreateAddon x -> CreateAddon
forall x. CreateAddon -> Rep CreateAddon x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAddon x -> CreateAddon
$cfrom :: forall x. CreateAddon -> Rep CreateAddon x
Prelude.Generic)
newCreateAddon ::
Prelude.Text ->
Prelude.Text ->
CreateAddon
newCreateAddon :: Text -> Text -> CreateAddon
newCreateAddon Text
pClusterName_ Text
pAddonName_ =
CreateAddon' :: Maybe Text
-> Maybe Text
-> Maybe ResolveConflicts
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> CreateAddon
CreateAddon'
{ $sel:addonVersion:CreateAddon' :: Maybe Text
addonVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceAccountRoleArn:CreateAddon' :: Maybe Text
serviceAccountRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resolveConflicts:CreateAddon' :: Maybe ResolveConflicts
resolveConflicts = Maybe ResolveConflicts
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateAddon' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateAddon' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:clusterName:CreateAddon' :: Text
clusterName = Text
pClusterName_,
$sel:addonName:CreateAddon' :: Text
addonName = Text
pAddonName_
}
createAddon_addonVersion :: Lens.Lens' CreateAddon (Prelude.Maybe Prelude.Text)
createAddon_addonVersion :: (Maybe Text -> f (Maybe Text)) -> CreateAddon -> f CreateAddon
createAddon_addonVersion = (CreateAddon -> Maybe Text)
-> (CreateAddon -> Maybe Text -> CreateAddon)
-> Lens CreateAddon CreateAddon (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddon' {Maybe Text
addonVersion :: Maybe Text
$sel:addonVersion:CreateAddon' :: CreateAddon -> Maybe Text
addonVersion} -> Maybe Text
addonVersion) (\s :: CreateAddon
s@CreateAddon' {} Maybe Text
a -> CreateAddon
s {$sel:addonVersion:CreateAddon' :: Maybe Text
addonVersion = Maybe Text
a} :: CreateAddon)
createAddon_serviceAccountRoleArn :: Lens.Lens' CreateAddon (Prelude.Maybe Prelude.Text)
createAddon_serviceAccountRoleArn :: (Maybe Text -> f (Maybe Text)) -> CreateAddon -> f CreateAddon
createAddon_serviceAccountRoleArn = (CreateAddon -> Maybe Text)
-> (CreateAddon -> Maybe Text -> CreateAddon)
-> Lens CreateAddon CreateAddon (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddon' {Maybe Text
serviceAccountRoleArn :: Maybe Text
$sel:serviceAccountRoleArn:CreateAddon' :: CreateAddon -> Maybe Text
serviceAccountRoleArn} -> Maybe Text
serviceAccountRoleArn) (\s :: CreateAddon
s@CreateAddon' {} Maybe Text
a -> CreateAddon
s {$sel:serviceAccountRoleArn:CreateAddon' :: Maybe Text
serviceAccountRoleArn = Maybe Text
a} :: CreateAddon)
createAddon_resolveConflicts :: Lens.Lens' CreateAddon (Prelude.Maybe ResolveConflicts)
createAddon_resolveConflicts :: (Maybe ResolveConflicts -> f (Maybe ResolveConflicts))
-> CreateAddon -> f CreateAddon
createAddon_resolveConflicts = (CreateAddon -> Maybe ResolveConflicts)
-> (CreateAddon -> Maybe ResolveConflicts -> CreateAddon)
-> Lens
CreateAddon
CreateAddon
(Maybe ResolveConflicts)
(Maybe ResolveConflicts)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddon' {Maybe ResolveConflicts
resolveConflicts :: Maybe ResolveConflicts
$sel:resolveConflicts:CreateAddon' :: CreateAddon -> Maybe ResolveConflicts
resolveConflicts} -> Maybe ResolveConflicts
resolveConflicts) (\s :: CreateAddon
s@CreateAddon' {} Maybe ResolveConflicts
a -> CreateAddon
s {$sel:resolveConflicts:CreateAddon' :: Maybe ResolveConflicts
resolveConflicts = Maybe ResolveConflicts
a} :: CreateAddon)
createAddon_clientRequestToken :: Lens.Lens' CreateAddon (Prelude.Maybe Prelude.Text)
createAddon_clientRequestToken :: (Maybe Text -> f (Maybe Text)) -> CreateAddon -> f CreateAddon
createAddon_clientRequestToken = (CreateAddon -> Maybe Text)
-> (CreateAddon -> Maybe Text -> CreateAddon)
-> Lens CreateAddon CreateAddon (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddon' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateAddon' :: CreateAddon -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateAddon
s@CreateAddon' {} Maybe Text
a -> CreateAddon
s {$sel:clientRequestToken:CreateAddon' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateAddon)
createAddon_tags :: Lens.Lens' CreateAddon (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAddon_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAddon -> f CreateAddon
createAddon_tags = (CreateAddon -> Maybe (HashMap Text Text))
-> (CreateAddon -> Maybe (HashMap Text Text) -> CreateAddon)
-> Lens
CreateAddon
CreateAddon
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddon' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAddon' :: CreateAddon -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAddon
s@CreateAddon' {} Maybe (HashMap Text Text)
a -> CreateAddon
s {$sel:tags:CreateAddon' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAddon) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAddon -> f CreateAddon)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAddon
-> f CreateAddon
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAddon_clusterName :: Lens.Lens' CreateAddon Prelude.Text
createAddon_clusterName :: (Text -> f Text) -> CreateAddon -> f CreateAddon
createAddon_clusterName = (CreateAddon -> Text)
-> (CreateAddon -> Text -> CreateAddon)
-> Lens CreateAddon CreateAddon Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddon' {Text
clusterName :: Text
$sel:clusterName:CreateAddon' :: CreateAddon -> Text
clusterName} -> Text
clusterName) (\s :: CreateAddon
s@CreateAddon' {} Text
a -> CreateAddon
s {$sel:clusterName:CreateAddon' :: Text
clusterName = Text
a} :: CreateAddon)
createAddon_addonName :: Lens.Lens' CreateAddon Prelude.Text
createAddon_addonName :: (Text -> f Text) -> CreateAddon -> f CreateAddon
createAddon_addonName = (CreateAddon -> Text)
-> (CreateAddon -> Text -> CreateAddon)
-> Lens CreateAddon CreateAddon Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddon' {Text
addonName :: Text
$sel:addonName:CreateAddon' :: CreateAddon -> Text
addonName} -> Text
addonName) (\s :: CreateAddon
s@CreateAddon' {} Text
a -> CreateAddon
s {$sel:addonName:CreateAddon' :: Text
addonName = Text
a} :: CreateAddon)
instance Core.AWSRequest CreateAddon where
type AWSResponse CreateAddon = CreateAddonResponse
request :: CreateAddon -> Request CreateAddon
request = Service -> CreateAddon -> Request CreateAddon
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateAddon
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAddon)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateAddon))
-> Logger
-> Service
-> Proxy CreateAddon
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAddon)))
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 Addon -> Int -> CreateAddonResponse
CreateAddonResponse'
(Maybe Addon -> Int -> CreateAddonResponse)
-> Either String (Maybe Addon)
-> Either String (Int -> CreateAddonResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Addon)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"addon")
Either String (Int -> CreateAddonResponse)
-> Either String Int -> Either String CreateAddonResponse
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 CreateAddon
instance Prelude.NFData CreateAddon
instance Core.ToHeaders CreateAddon where
toHeaders :: CreateAddon -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateAddon -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 CreateAddon where
toJSON :: CreateAddon -> Value
toJSON CreateAddon' {Maybe Text
Maybe (HashMap Text Text)
Maybe ResolveConflicts
Text
addonName :: Text
clusterName :: Text
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
resolveConflicts :: Maybe ResolveConflicts
serviceAccountRoleArn :: Maybe Text
addonVersion :: Maybe Text
$sel:addonName:CreateAddon' :: CreateAddon -> Text
$sel:clusterName:CreateAddon' :: CreateAddon -> Text
$sel:tags:CreateAddon' :: CreateAddon -> Maybe (HashMap Text Text)
$sel:clientRequestToken:CreateAddon' :: CreateAddon -> Maybe Text
$sel:resolveConflicts:CreateAddon' :: CreateAddon -> Maybe ResolveConflicts
$sel:serviceAccountRoleArn:CreateAddon' :: CreateAddon -> Maybe Text
$sel:addonVersion:CreateAddon' :: CreateAddon -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"addonVersion" 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
addonVersion,
(Text
"serviceAccountRoleArn" 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
serviceAccountRoleArn,
(Text
"resolveConflicts" Text -> ResolveConflicts -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ResolveConflicts -> Pair) -> Maybe ResolveConflicts -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResolveConflicts
resolveConflicts,
(Text
"clientRequestToken" 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
clientRequestToken,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"addonName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
addonName)
]
)
instance Core.ToPath CreateAddon where
toPath :: CreateAddon -> ByteString
toPath CreateAddon' {Maybe Text
Maybe (HashMap Text Text)
Maybe ResolveConflicts
Text
addonName :: Text
clusterName :: Text
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
resolveConflicts :: Maybe ResolveConflicts
serviceAccountRoleArn :: Maybe Text
addonVersion :: Maybe Text
$sel:addonName:CreateAddon' :: CreateAddon -> Text
$sel:clusterName:CreateAddon' :: CreateAddon -> Text
$sel:tags:CreateAddon' :: CreateAddon -> Maybe (HashMap Text Text)
$sel:clientRequestToken:CreateAddon' :: CreateAddon -> Maybe Text
$sel:resolveConflicts:CreateAddon' :: CreateAddon -> Maybe ResolveConflicts
$sel:serviceAccountRoleArn:CreateAddon' :: CreateAddon -> Maybe Text
$sel:addonVersion:CreateAddon' :: CreateAddon -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/clusters/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
clusterName, ByteString
"/addons"]
instance Core.ToQuery CreateAddon where
toQuery :: CreateAddon -> QueryString
toQuery = QueryString -> CreateAddon -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateAddonResponse = CreateAddonResponse'
{ CreateAddonResponse -> Maybe Addon
addon :: Prelude.Maybe Addon,
CreateAddonResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateAddonResponse -> CreateAddonResponse -> Bool
(CreateAddonResponse -> CreateAddonResponse -> Bool)
-> (CreateAddonResponse -> CreateAddonResponse -> Bool)
-> Eq CreateAddonResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAddonResponse -> CreateAddonResponse -> Bool
$c/= :: CreateAddonResponse -> CreateAddonResponse -> Bool
== :: CreateAddonResponse -> CreateAddonResponse -> Bool
$c== :: CreateAddonResponse -> CreateAddonResponse -> Bool
Prelude.Eq, ReadPrec [CreateAddonResponse]
ReadPrec CreateAddonResponse
Int -> ReadS CreateAddonResponse
ReadS [CreateAddonResponse]
(Int -> ReadS CreateAddonResponse)
-> ReadS [CreateAddonResponse]
-> ReadPrec CreateAddonResponse
-> ReadPrec [CreateAddonResponse]
-> Read CreateAddonResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAddonResponse]
$creadListPrec :: ReadPrec [CreateAddonResponse]
readPrec :: ReadPrec CreateAddonResponse
$creadPrec :: ReadPrec CreateAddonResponse
readList :: ReadS [CreateAddonResponse]
$creadList :: ReadS [CreateAddonResponse]
readsPrec :: Int -> ReadS CreateAddonResponse
$creadsPrec :: Int -> ReadS CreateAddonResponse
Prelude.Read, Int -> CreateAddonResponse -> ShowS
[CreateAddonResponse] -> ShowS
CreateAddonResponse -> String
(Int -> CreateAddonResponse -> ShowS)
-> (CreateAddonResponse -> String)
-> ([CreateAddonResponse] -> ShowS)
-> Show CreateAddonResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAddonResponse] -> ShowS
$cshowList :: [CreateAddonResponse] -> ShowS
show :: CreateAddonResponse -> String
$cshow :: CreateAddonResponse -> String
showsPrec :: Int -> CreateAddonResponse -> ShowS
$cshowsPrec :: Int -> CreateAddonResponse -> ShowS
Prelude.Show, (forall x. CreateAddonResponse -> Rep CreateAddonResponse x)
-> (forall x. Rep CreateAddonResponse x -> CreateAddonResponse)
-> Generic CreateAddonResponse
forall x. Rep CreateAddonResponse x -> CreateAddonResponse
forall x. CreateAddonResponse -> Rep CreateAddonResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAddonResponse x -> CreateAddonResponse
$cfrom :: forall x. CreateAddonResponse -> Rep CreateAddonResponse x
Prelude.Generic)
newCreateAddonResponse ::
Prelude.Int ->
CreateAddonResponse
newCreateAddonResponse :: Int -> CreateAddonResponse
newCreateAddonResponse Int
pHttpStatus_ =
CreateAddonResponse' :: Maybe Addon -> Int -> CreateAddonResponse
CreateAddonResponse'
{ $sel:addon:CreateAddonResponse' :: Maybe Addon
addon = Maybe Addon
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateAddonResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createAddonResponse_addon :: Lens.Lens' CreateAddonResponse (Prelude.Maybe Addon)
createAddonResponse_addon :: (Maybe Addon -> f (Maybe Addon))
-> CreateAddonResponse -> f CreateAddonResponse
createAddonResponse_addon = (CreateAddonResponse -> Maybe Addon)
-> (CreateAddonResponse -> Maybe Addon -> CreateAddonResponse)
-> Lens
CreateAddonResponse CreateAddonResponse (Maybe Addon) (Maybe Addon)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddonResponse' {Maybe Addon
addon :: Maybe Addon
$sel:addon:CreateAddonResponse' :: CreateAddonResponse -> Maybe Addon
addon} -> Maybe Addon
addon) (\s :: CreateAddonResponse
s@CreateAddonResponse' {} Maybe Addon
a -> CreateAddonResponse
s {$sel:addon:CreateAddonResponse' :: Maybe Addon
addon = Maybe Addon
a} :: CreateAddonResponse)
createAddonResponse_httpStatus :: Lens.Lens' CreateAddonResponse Prelude.Int
createAddonResponse_httpStatus :: (Int -> f Int) -> CreateAddonResponse -> f CreateAddonResponse
createAddonResponse_httpStatus = (CreateAddonResponse -> Int)
-> (CreateAddonResponse -> Int -> CreateAddonResponse)
-> Lens CreateAddonResponse CreateAddonResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAddonResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAddonResponse' :: CreateAddonResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAddonResponse
s@CreateAddonResponse' {} Int
a -> CreateAddonResponse
s {$sel:httpStatus:CreateAddonResponse' :: Int
httpStatus = Int
a} :: CreateAddonResponse)
instance Prelude.NFData CreateAddonResponse