{-# 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.ServiceCatalog.UpdateProduct
(
UpdateProduct (..),
newUpdateProduct,
updateProduct_acceptLanguage,
updateProduct_addTags,
updateProduct_description,
updateProduct_distributor,
updateProduct_name,
updateProduct_owner,
updateProduct_removeTags,
updateProduct_sourceConnection,
updateProduct_supportDescription,
updateProduct_supportEmail,
updateProduct_supportUrl,
updateProduct_id,
UpdateProductResponse (..),
newUpdateProductResponse,
updateProductResponse_productViewDetail,
updateProductResponse_tags,
updateProductResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.ServiceCatalog.Types
data UpdateProduct = UpdateProduct'
{
UpdateProduct -> Maybe Text
acceptLanguage :: Prelude.Maybe Prelude.Text,
UpdateProduct -> Maybe [Tag]
addTags :: Prelude.Maybe [Tag],
UpdateProduct -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateProduct -> Maybe Text
distributor :: Prelude.Maybe Prelude.Text,
UpdateProduct -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
UpdateProduct -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
UpdateProduct -> Maybe [Text]
removeTags :: Prelude.Maybe [Prelude.Text],
UpdateProduct -> Maybe SourceConnection
sourceConnection :: Prelude.Maybe SourceConnection,
UpdateProduct -> Maybe Text
supportDescription :: Prelude.Maybe Prelude.Text,
UpdateProduct -> Maybe Text
supportEmail :: Prelude.Maybe Prelude.Text,
UpdateProduct -> Maybe Text
supportUrl :: Prelude.Maybe Prelude.Text,
UpdateProduct -> Text
id :: Prelude.Text
}
deriving (UpdateProduct -> UpdateProduct -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProduct -> UpdateProduct -> Bool
$c/= :: UpdateProduct -> UpdateProduct -> Bool
== :: UpdateProduct -> UpdateProduct -> Bool
$c== :: UpdateProduct -> UpdateProduct -> Bool
Prelude.Eq, ReadPrec [UpdateProduct]
ReadPrec UpdateProduct
Int -> ReadS UpdateProduct
ReadS [UpdateProduct]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProduct]
$creadListPrec :: ReadPrec [UpdateProduct]
readPrec :: ReadPrec UpdateProduct
$creadPrec :: ReadPrec UpdateProduct
readList :: ReadS [UpdateProduct]
$creadList :: ReadS [UpdateProduct]
readsPrec :: Int -> ReadS UpdateProduct
$creadsPrec :: Int -> ReadS UpdateProduct
Prelude.Read, Int -> UpdateProduct -> ShowS
[UpdateProduct] -> ShowS
UpdateProduct -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProduct] -> ShowS
$cshowList :: [UpdateProduct] -> ShowS
show :: UpdateProduct -> String
$cshow :: UpdateProduct -> String
showsPrec :: Int -> UpdateProduct -> ShowS
$cshowsPrec :: Int -> UpdateProduct -> ShowS
Prelude.Show, forall x. Rep UpdateProduct x -> UpdateProduct
forall x. UpdateProduct -> Rep UpdateProduct x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateProduct x -> UpdateProduct
$cfrom :: forall x. UpdateProduct -> Rep UpdateProduct x
Prelude.Generic)
newUpdateProduct ::
Prelude.Text ->
UpdateProduct
newUpdateProduct :: Text -> UpdateProduct
newUpdateProduct Text
pId_ =
UpdateProduct'
{ $sel:acceptLanguage:UpdateProduct' :: Maybe Text
acceptLanguage = forall a. Maybe a
Prelude.Nothing,
$sel:addTags:UpdateProduct' :: Maybe [Tag]
addTags = forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateProduct' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:distributor:UpdateProduct' :: Maybe Text
distributor = forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateProduct' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:owner:UpdateProduct' :: Maybe Text
owner = forall a. Maybe a
Prelude.Nothing,
$sel:removeTags:UpdateProduct' :: Maybe [Text]
removeTags = forall a. Maybe a
Prelude.Nothing,
$sel:sourceConnection:UpdateProduct' :: Maybe SourceConnection
sourceConnection = forall a. Maybe a
Prelude.Nothing,
$sel:supportDescription:UpdateProduct' :: Maybe Text
supportDescription = forall a. Maybe a
Prelude.Nothing,
$sel:supportEmail:UpdateProduct' :: Maybe Text
supportEmail = forall a. Maybe a
Prelude.Nothing,
$sel:supportUrl:UpdateProduct' :: Maybe Text
supportUrl = forall a. Maybe a
Prelude.Nothing,
$sel:id:UpdateProduct' :: Text
id = Text
pId_
}
updateProduct_acceptLanguage :: Lens.Lens' UpdateProduct (Prelude.Maybe Prelude.Text)
updateProduct_acceptLanguage :: Lens' UpdateProduct (Maybe Text)
updateProduct_acceptLanguage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe Text
acceptLanguage :: Maybe Text
$sel:acceptLanguage:UpdateProduct' :: UpdateProduct -> Maybe Text
acceptLanguage} -> Maybe Text
acceptLanguage) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe Text
a -> UpdateProduct
s {$sel:acceptLanguage:UpdateProduct' :: Maybe Text
acceptLanguage = Maybe Text
a} :: UpdateProduct)
updateProduct_addTags :: Lens.Lens' UpdateProduct (Prelude.Maybe [Tag])
updateProduct_addTags :: Lens' UpdateProduct (Maybe [Tag])
updateProduct_addTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe [Tag]
addTags :: Maybe [Tag]
$sel:addTags:UpdateProduct' :: UpdateProduct -> Maybe [Tag]
addTags} -> Maybe [Tag]
addTags) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe [Tag]
a -> UpdateProduct
s {$sel:addTags:UpdateProduct' :: Maybe [Tag]
addTags = Maybe [Tag]
a} :: UpdateProduct) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateProduct_description :: Lens.Lens' UpdateProduct (Prelude.Maybe Prelude.Text)
updateProduct_description :: Lens' UpdateProduct (Maybe Text)
updateProduct_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe Text
description :: Maybe Text
$sel:description:UpdateProduct' :: UpdateProduct -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe Text
a -> UpdateProduct
s {$sel:description:UpdateProduct' :: Maybe Text
description = Maybe Text
a} :: UpdateProduct)
updateProduct_distributor :: Lens.Lens' UpdateProduct (Prelude.Maybe Prelude.Text)
updateProduct_distributor :: Lens' UpdateProduct (Maybe Text)
updateProduct_distributor = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe Text
distributor :: Maybe Text
$sel:distributor:UpdateProduct' :: UpdateProduct -> Maybe Text
distributor} -> Maybe Text
distributor) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe Text
a -> UpdateProduct
s {$sel:distributor:UpdateProduct' :: Maybe Text
distributor = Maybe Text
a} :: UpdateProduct)
updateProduct_name :: Lens.Lens' UpdateProduct (Prelude.Maybe Prelude.Text)
updateProduct_name :: Lens' UpdateProduct (Maybe Text)
updateProduct_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe Text
name :: Maybe Text
$sel:name:UpdateProduct' :: UpdateProduct -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe Text
a -> UpdateProduct
s {$sel:name:UpdateProduct' :: Maybe Text
name = Maybe Text
a} :: UpdateProduct)
updateProduct_owner :: Lens.Lens' UpdateProduct (Prelude.Maybe Prelude.Text)
updateProduct_owner :: Lens' UpdateProduct (Maybe Text)
updateProduct_owner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe Text
owner :: Maybe Text
$sel:owner:UpdateProduct' :: UpdateProduct -> Maybe Text
owner} -> Maybe Text
owner) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe Text
a -> UpdateProduct
s {$sel:owner:UpdateProduct' :: Maybe Text
owner = Maybe Text
a} :: UpdateProduct)
updateProduct_removeTags :: Lens.Lens' UpdateProduct (Prelude.Maybe [Prelude.Text])
updateProduct_removeTags :: Lens' UpdateProduct (Maybe [Text])
updateProduct_removeTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe [Text]
removeTags :: Maybe [Text]
$sel:removeTags:UpdateProduct' :: UpdateProduct -> Maybe [Text]
removeTags} -> Maybe [Text]
removeTags) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe [Text]
a -> UpdateProduct
s {$sel:removeTags:UpdateProduct' :: Maybe [Text]
removeTags = Maybe [Text]
a} :: UpdateProduct) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateProduct_sourceConnection :: Lens.Lens' UpdateProduct (Prelude.Maybe SourceConnection)
updateProduct_sourceConnection :: Lens' UpdateProduct (Maybe SourceConnection)
updateProduct_sourceConnection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe SourceConnection
sourceConnection :: Maybe SourceConnection
$sel:sourceConnection:UpdateProduct' :: UpdateProduct -> Maybe SourceConnection
sourceConnection} -> Maybe SourceConnection
sourceConnection) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe SourceConnection
a -> UpdateProduct
s {$sel:sourceConnection:UpdateProduct' :: Maybe SourceConnection
sourceConnection = Maybe SourceConnection
a} :: UpdateProduct)
updateProduct_supportDescription :: Lens.Lens' UpdateProduct (Prelude.Maybe Prelude.Text)
updateProduct_supportDescription :: Lens' UpdateProduct (Maybe Text)
updateProduct_supportDescription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe Text
supportDescription :: Maybe Text
$sel:supportDescription:UpdateProduct' :: UpdateProduct -> Maybe Text
supportDescription} -> Maybe Text
supportDescription) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe Text
a -> UpdateProduct
s {$sel:supportDescription:UpdateProduct' :: Maybe Text
supportDescription = Maybe Text
a} :: UpdateProduct)
updateProduct_supportEmail :: Lens.Lens' UpdateProduct (Prelude.Maybe Prelude.Text)
updateProduct_supportEmail :: Lens' UpdateProduct (Maybe Text)
updateProduct_supportEmail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe Text
supportEmail :: Maybe Text
$sel:supportEmail:UpdateProduct' :: UpdateProduct -> Maybe Text
supportEmail} -> Maybe Text
supportEmail) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe Text
a -> UpdateProduct
s {$sel:supportEmail:UpdateProduct' :: Maybe Text
supportEmail = Maybe Text
a} :: UpdateProduct)
updateProduct_supportUrl :: Lens.Lens' UpdateProduct (Prelude.Maybe Prelude.Text)
updateProduct_supportUrl :: Lens' UpdateProduct (Maybe Text)
updateProduct_supportUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Maybe Text
supportUrl :: Maybe Text
$sel:supportUrl:UpdateProduct' :: UpdateProduct -> Maybe Text
supportUrl} -> Maybe Text
supportUrl) (\s :: UpdateProduct
s@UpdateProduct' {} Maybe Text
a -> UpdateProduct
s {$sel:supportUrl:UpdateProduct' :: Maybe Text
supportUrl = Maybe Text
a} :: UpdateProduct)
updateProduct_id :: Lens.Lens' UpdateProduct Prelude.Text
updateProduct_id :: Lens' UpdateProduct Text
updateProduct_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProduct' {Text
id :: Text
$sel:id:UpdateProduct' :: UpdateProduct -> Text
id} -> Text
id) (\s :: UpdateProduct
s@UpdateProduct' {} Text
a -> UpdateProduct
s {$sel:id:UpdateProduct' :: Text
id = Text
a} :: UpdateProduct)
instance Core.AWSRequest UpdateProduct where
type
AWSResponse UpdateProduct =
UpdateProductResponse
request :: (Service -> Service) -> UpdateProduct -> Request UpdateProduct
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateProduct
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateProduct)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ProductViewDetail
-> Maybe [Tag] -> Int -> UpdateProductResponse
UpdateProductResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ProductViewDetail")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateProduct where
hashWithSalt :: Int -> UpdateProduct -> Int
hashWithSalt Int
_salt UpdateProduct' {Maybe [Text]
Maybe [Tag]
Maybe Text
Maybe SourceConnection
Text
id :: Text
supportUrl :: Maybe Text
supportEmail :: Maybe Text
supportDescription :: Maybe Text
sourceConnection :: Maybe SourceConnection
removeTags :: Maybe [Text]
owner :: Maybe Text
name :: Maybe Text
distributor :: Maybe Text
description :: Maybe Text
addTags :: Maybe [Tag]
acceptLanguage :: Maybe Text
$sel:id:UpdateProduct' :: UpdateProduct -> Text
$sel:supportUrl:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:supportEmail:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:supportDescription:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:sourceConnection:UpdateProduct' :: UpdateProduct -> Maybe SourceConnection
$sel:removeTags:UpdateProduct' :: UpdateProduct -> Maybe [Text]
$sel:owner:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:name:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:distributor:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:description:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:addTags:UpdateProduct' :: UpdateProduct -> Maybe [Tag]
$sel:acceptLanguage:UpdateProduct' :: UpdateProduct -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
acceptLanguage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
addTags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
distributor
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
removeTags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SourceConnection
sourceConnection
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
supportDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
supportEmail
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
supportUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
instance Prelude.NFData UpdateProduct where
rnf :: UpdateProduct -> ()
rnf UpdateProduct' {Maybe [Text]
Maybe [Tag]
Maybe Text
Maybe SourceConnection
Text
id :: Text
supportUrl :: Maybe Text
supportEmail :: Maybe Text
supportDescription :: Maybe Text
sourceConnection :: Maybe SourceConnection
removeTags :: Maybe [Text]
owner :: Maybe Text
name :: Maybe Text
distributor :: Maybe Text
description :: Maybe Text
addTags :: Maybe [Tag]
acceptLanguage :: Maybe Text
$sel:id:UpdateProduct' :: UpdateProduct -> Text
$sel:supportUrl:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:supportEmail:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:supportDescription:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:sourceConnection:UpdateProduct' :: UpdateProduct -> Maybe SourceConnection
$sel:removeTags:UpdateProduct' :: UpdateProduct -> Maybe [Text]
$sel:owner:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:name:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:distributor:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:description:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:addTags:UpdateProduct' :: UpdateProduct -> Maybe [Tag]
$sel:acceptLanguage:UpdateProduct' :: UpdateProduct -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
acceptLanguage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
addTags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
distributor
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 Text
owner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
removeTags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SourceConnection
sourceConnection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
supportDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
supportEmail
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
supportUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
instance Data.ToHeaders UpdateProduct where
toHeaders :: UpdateProduct -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWS242ServiceCatalogService.UpdateProduct" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UpdateProduct where
toJSON :: UpdateProduct -> Value
toJSON UpdateProduct' {Maybe [Text]
Maybe [Tag]
Maybe Text
Maybe SourceConnection
Text
id :: Text
supportUrl :: Maybe Text
supportEmail :: Maybe Text
supportDescription :: Maybe Text
sourceConnection :: Maybe SourceConnection
removeTags :: Maybe [Text]
owner :: Maybe Text
name :: Maybe Text
distributor :: Maybe Text
description :: Maybe Text
addTags :: Maybe [Tag]
acceptLanguage :: Maybe Text
$sel:id:UpdateProduct' :: UpdateProduct -> Text
$sel:supportUrl:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:supportEmail:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:supportDescription:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:sourceConnection:UpdateProduct' :: UpdateProduct -> Maybe SourceConnection
$sel:removeTags:UpdateProduct' :: UpdateProduct -> Maybe [Text]
$sel:owner:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:name:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:distributor:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:description:UpdateProduct' :: UpdateProduct -> Maybe Text
$sel:addTags:UpdateProduct' :: UpdateProduct -> Maybe [Tag]
$sel:acceptLanguage:UpdateProduct' :: UpdateProduct -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AcceptLanguage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
acceptLanguage,
(Key
"AddTags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
addTags,
(Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"Distributor" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
distributor,
(Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
(Key
"Owner" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
owner,
(Key
"RemoveTags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
removeTags,
(Key
"SourceConnection" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceConnection
sourceConnection,
(Key
"SupportDescription" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
supportDescription,
(Key
"SupportEmail" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
supportEmail,
(Key
"SupportUrl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
supportUrl,
forall a. a -> Maybe a
Prelude.Just (Key
"Id" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
id)
]
)
instance Data.ToPath UpdateProduct where
toPath :: UpdateProduct -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateProduct where
toQuery :: UpdateProduct -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateProductResponse = UpdateProductResponse'
{
UpdateProductResponse -> Maybe ProductViewDetail
productViewDetail :: Prelude.Maybe ProductViewDetail,
UpdateProductResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
UpdateProductResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateProductResponse -> UpdateProductResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateProductResponse -> UpdateProductResponse -> Bool
$c/= :: UpdateProductResponse -> UpdateProductResponse -> Bool
== :: UpdateProductResponse -> UpdateProductResponse -> Bool
$c== :: UpdateProductResponse -> UpdateProductResponse -> Bool
Prelude.Eq, ReadPrec [UpdateProductResponse]
ReadPrec UpdateProductResponse
Int -> ReadS UpdateProductResponse
ReadS [UpdateProductResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateProductResponse]
$creadListPrec :: ReadPrec [UpdateProductResponse]
readPrec :: ReadPrec UpdateProductResponse
$creadPrec :: ReadPrec UpdateProductResponse
readList :: ReadS [UpdateProductResponse]
$creadList :: ReadS [UpdateProductResponse]
readsPrec :: Int -> ReadS UpdateProductResponse
$creadsPrec :: Int -> ReadS UpdateProductResponse
Prelude.Read, Int -> UpdateProductResponse -> ShowS
[UpdateProductResponse] -> ShowS
UpdateProductResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateProductResponse] -> ShowS
$cshowList :: [UpdateProductResponse] -> ShowS
show :: UpdateProductResponse -> String
$cshow :: UpdateProductResponse -> String
showsPrec :: Int -> UpdateProductResponse -> ShowS
$cshowsPrec :: Int -> UpdateProductResponse -> ShowS
Prelude.Show, forall x. Rep UpdateProductResponse x -> UpdateProductResponse
forall x. UpdateProductResponse -> Rep UpdateProductResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateProductResponse x -> UpdateProductResponse
$cfrom :: forall x. UpdateProductResponse -> Rep UpdateProductResponse x
Prelude.Generic)
newUpdateProductResponse ::
Prelude.Int ->
UpdateProductResponse
newUpdateProductResponse :: Int -> UpdateProductResponse
newUpdateProductResponse Int
pHttpStatus_ =
UpdateProductResponse'
{ $sel:productViewDetail:UpdateProductResponse' :: Maybe ProductViewDetail
productViewDetail =
forall a. Maybe a
Prelude.Nothing,
$sel:tags:UpdateProductResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateProductResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateProductResponse_productViewDetail :: Lens.Lens' UpdateProductResponse (Prelude.Maybe ProductViewDetail)
updateProductResponse_productViewDetail :: Lens' UpdateProductResponse (Maybe ProductViewDetail)
updateProductResponse_productViewDetail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProductResponse' {Maybe ProductViewDetail
productViewDetail :: Maybe ProductViewDetail
$sel:productViewDetail:UpdateProductResponse' :: UpdateProductResponse -> Maybe ProductViewDetail
productViewDetail} -> Maybe ProductViewDetail
productViewDetail) (\s :: UpdateProductResponse
s@UpdateProductResponse' {} Maybe ProductViewDetail
a -> UpdateProductResponse
s {$sel:productViewDetail:UpdateProductResponse' :: Maybe ProductViewDetail
productViewDetail = Maybe ProductViewDetail
a} :: UpdateProductResponse)
updateProductResponse_tags :: Lens.Lens' UpdateProductResponse (Prelude.Maybe [Tag])
updateProductResponse_tags :: Lens' UpdateProductResponse (Maybe [Tag])
updateProductResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProductResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:UpdateProductResponse' :: UpdateProductResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: UpdateProductResponse
s@UpdateProductResponse' {} Maybe [Tag]
a -> UpdateProductResponse
s {$sel:tags:UpdateProductResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: UpdateProductResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateProductResponse_httpStatus :: Lens.Lens' UpdateProductResponse Prelude.Int
updateProductResponse_httpStatus :: Lens' UpdateProductResponse Int
updateProductResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateProductResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateProductResponse' :: UpdateProductResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateProductResponse
s@UpdateProductResponse' {} Int
a -> UpdateProductResponse
s {$sel:httpStatus:UpdateProductResponse' :: Int
httpStatus = Int
a} :: UpdateProductResponse)
instance Prelude.NFData UpdateProductResponse where
rnf :: UpdateProductResponse -> ()
rnf UpdateProductResponse' {Int
Maybe [Tag]
Maybe ProductViewDetail
httpStatus :: Int
tags :: Maybe [Tag]
productViewDetail :: Maybe ProductViewDetail
$sel:httpStatus:UpdateProductResponse' :: UpdateProductResponse -> Int
$sel:tags:UpdateProductResponse' :: UpdateProductResponse -> Maybe [Tag]
$sel:productViewDetail:UpdateProductResponse' :: UpdateProductResponse -> Maybe ProductViewDetail
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ProductViewDetail
productViewDetail
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus