{-# 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.LicenseManager.CreateLicenseConfiguration
(
CreateLicenseConfiguration (..),
newCreateLicenseConfiguration,
createLicenseConfiguration_description,
createLicenseConfiguration_disassociateWhenNotFound,
createLicenseConfiguration_licenseCount,
createLicenseConfiguration_licenseCountHardLimit,
createLicenseConfiguration_licenseRules,
createLicenseConfiguration_productInformationList,
createLicenseConfiguration_tags,
createLicenseConfiguration_name,
createLicenseConfiguration_licenseCountingType,
CreateLicenseConfigurationResponse (..),
newCreateLicenseConfigurationResponse,
createLicenseConfigurationResponse_licenseConfigurationArn,
createLicenseConfigurationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LicenseManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateLicenseConfiguration = CreateLicenseConfiguration'
{
CreateLicenseConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateLicenseConfiguration -> Maybe Bool
disassociateWhenNotFound :: Prelude.Maybe Prelude.Bool,
CreateLicenseConfiguration -> Maybe Integer
licenseCount :: Prelude.Maybe Prelude.Integer,
CreateLicenseConfiguration -> Maybe Bool
licenseCountHardLimit :: Prelude.Maybe Prelude.Bool,
CreateLicenseConfiguration -> Maybe [Text]
licenseRules :: Prelude.Maybe [Prelude.Text],
CreateLicenseConfiguration -> Maybe [ProductInformation]
productInformationList :: Prelude.Maybe [ProductInformation],
CreateLicenseConfiguration -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateLicenseConfiguration -> Text
name :: Prelude.Text,
CreateLicenseConfiguration -> LicenseCountingType
licenseCountingType :: LicenseCountingType
}
deriving (CreateLicenseConfiguration -> CreateLicenseConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLicenseConfiguration -> CreateLicenseConfiguration -> Bool
$c/= :: CreateLicenseConfiguration -> CreateLicenseConfiguration -> Bool
== :: CreateLicenseConfiguration -> CreateLicenseConfiguration -> Bool
$c== :: CreateLicenseConfiguration -> CreateLicenseConfiguration -> Bool
Prelude.Eq, ReadPrec [CreateLicenseConfiguration]
ReadPrec CreateLicenseConfiguration
Int -> ReadS CreateLicenseConfiguration
ReadS [CreateLicenseConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLicenseConfiguration]
$creadListPrec :: ReadPrec [CreateLicenseConfiguration]
readPrec :: ReadPrec CreateLicenseConfiguration
$creadPrec :: ReadPrec CreateLicenseConfiguration
readList :: ReadS [CreateLicenseConfiguration]
$creadList :: ReadS [CreateLicenseConfiguration]
readsPrec :: Int -> ReadS CreateLicenseConfiguration
$creadsPrec :: Int -> ReadS CreateLicenseConfiguration
Prelude.Read, Int -> CreateLicenseConfiguration -> ShowS
[CreateLicenseConfiguration] -> ShowS
CreateLicenseConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLicenseConfiguration] -> ShowS
$cshowList :: [CreateLicenseConfiguration] -> ShowS
show :: CreateLicenseConfiguration -> String
$cshow :: CreateLicenseConfiguration -> String
showsPrec :: Int -> CreateLicenseConfiguration -> ShowS
$cshowsPrec :: Int -> CreateLicenseConfiguration -> ShowS
Prelude.Show, forall x.
Rep CreateLicenseConfiguration x -> CreateLicenseConfiguration
forall x.
CreateLicenseConfiguration -> Rep CreateLicenseConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLicenseConfiguration x -> CreateLicenseConfiguration
$cfrom :: forall x.
CreateLicenseConfiguration -> Rep CreateLicenseConfiguration x
Prelude.Generic)
newCreateLicenseConfiguration ::
Prelude.Text ->
LicenseCountingType ->
CreateLicenseConfiguration
newCreateLicenseConfiguration :: Text -> LicenseCountingType -> CreateLicenseConfiguration
newCreateLicenseConfiguration
Text
pName_
LicenseCountingType
pLicenseCountingType_ =
CreateLicenseConfiguration'
{ $sel:description:CreateLicenseConfiguration' :: Maybe Text
description =
forall a. Maybe a
Prelude.Nothing,
$sel:disassociateWhenNotFound:CreateLicenseConfiguration' :: Maybe Bool
disassociateWhenNotFound = forall a. Maybe a
Prelude.Nothing,
$sel:licenseCount:CreateLicenseConfiguration' :: Maybe Integer
licenseCount = forall a. Maybe a
Prelude.Nothing,
$sel:licenseCountHardLimit:CreateLicenseConfiguration' :: Maybe Bool
licenseCountHardLimit = forall a. Maybe a
Prelude.Nothing,
$sel:licenseRules:CreateLicenseConfiguration' :: Maybe [Text]
licenseRules = forall a. Maybe a
Prelude.Nothing,
$sel:productInformationList:CreateLicenseConfiguration' :: Maybe [ProductInformation]
productInformationList = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateLicenseConfiguration' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateLicenseConfiguration' :: Text
name = Text
pName_,
$sel:licenseCountingType:CreateLicenseConfiguration' :: LicenseCountingType
licenseCountingType = LicenseCountingType
pLicenseCountingType_
}
createLicenseConfiguration_description :: Lens.Lens' CreateLicenseConfiguration (Prelude.Maybe Prelude.Text)
createLicenseConfiguration_description :: Lens' CreateLicenseConfiguration (Maybe Text)
createLicenseConfiguration_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} Maybe Text
a -> CreateLicenseConfiguration
s {$sel:description:CreateLicenseConfiguration' :: Maybe Text
description = Maybe Text
a} :: CreateLicenseConfiguration)
createLicenseConfiguration_disassociateWhenNotFound :: Lens.Lens' CreateLicenseConfiguration (Prelude.Maybe Prelude.Bool)
createLicenseConfiguration_disassociateWhenNotFound :: Lens' CreateLicenseConfiguration (Maybe Bool)
createLicenseConfiguration_disassociateWhenNotFound = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {Maybe Bool
disassociateWhenNotFound :: Maybe Bool
$sel:disassociateWhenNotFound:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Bool
disassociateWhenNotFound} -> Maybe Bool
disassociateWhenNotFound) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} Maybe Bool
a -> CreateLicenseConfiguration
s {$sel:disassociateWhenNotFound:CreateLicenseConfiguration' :: Maybe Bool
disassociateWhenNotFound = Maybe Bool
a} :: CreateLicenseConfiguration)
createLicenseConfiguration_licenseCount :: Lens.Lens' CreateLicenseConfiguration (Prelude.Maybe Prelude.Integer)
createLicenseConfiguration_licenseCount :: Lens' CreateLicenseConfiguration (Maybe Integer)
createLicenseConfiguration_licenseCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {Maybe Integer
licenseCount :: Maybe Integer
$sel:licenseCount:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Integer
licenseCount} -> Maybe Integer
licenseCount) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} Maybe Integer
a -> CreateLicenseConfiguration
s {$sel:licenseCount:CreateLicenseConfiguration' :: Maybe Integer
licenseCount = Maybe Integer
a} :: CreateLicenseConfiguration)
createLicenseConfiguration_licenseCountHardLimit :: Lens.Lens' CreateLicenseConfiguration (Prelude.Maybe Prelude.Bool)
createLicenseConfiguration_licenseCountHardLimit :: Lens' CreateLicenseConfiguration (Maybe Bool)
createLicenseConfiguration_licenseCountHardLimit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {Maybe Bool
licenseCountHardLimit :: Maybe Bool
$sel:licenseCountHardLimit:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Bool
licenseCountHardLimit} -> Maybe Bool
licenseCountHardLimit) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} Maybe Bool
a -> CreateLicenseConfiguration
s {$sel:licenseCountHardLimit:CreateLicenseConfiguration' :: Maybe Bool
licenseCountHardLimit = Maybe Bool
a} :: CreateLicenseConfiguration)
createLicenseConfiguration_licenseRules :: Lens.Lens' CreateLicenseConfiguration (Prelude.Maybe [Prelude.Text])
createLicenseConfiguration_licenseRules :: Lens' CreateLicenseConfiguration (Maybe [Text])
createLicenseConfiguration_licenseRules = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {Maybe [Text]
licenseRules :: Maybe [Text]
$sel:licenseRules:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [Text]
licenseRules} -> Maybe [Text]
licenseRules) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} Maybe [Text]
a -> CreateLicenseConfiguration
s {$sel:licenseRules:CreateLicenseConfiguration' :: Maybe [Text]
licenseRules = Maybe [Text]
a} :: CreateLicenseConfiguration) 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
createLicenseConfiguration_productInformationList :: Lens.Lens' CreateLicenseConfiguration (Prelude.Maybe [ProductInformation])
createLicenseConfiguration_productInformationList :: Lens' CreateLicenseConfiguration (Maybe [ProductInformation])
createLicenseConfiguration_productInformationList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {Maybe [ProductInformation]
productInformationList :: Maybe [ProductInformation]
$sel:productInformationList:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [ProductInformation]
productInformationList} -> Maybe [ProductInformation]
productInformationList) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} Maybe [ProductInformation]
a -> CreateLicenseConfiguration
s {$sel:productInformationList:CreateLicenseConfiguration' :: Maybe [ProductInformation]
productInformationList = Maybe [ProductInformation]
a} :: CreateLicenseConfiguration) 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
createLicenseConfiguration_tags :: Lens.Lens' CreateLicenseConfiguration (Prelude.Maybe [Tag])
createLicenseConfiguration_tags :: Lens' CreateLicenseConfiguration (Maybe [Tag])
createLicenseConfiguration_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} Maybe [Tag]
a -> CreateLicenseConfiguration
s {$sel:tags:CreateLicenseConfiguration' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateLicenseConfiguration) 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
createLicenseConfiguration_name :: Lens.Lens' CreateLicenseConfiguration Prelude.Text
createLicenseConfiguration_name :: Lens' CreateLicenseConfiguration Text
createLicenseConfiguration_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {Text
name :: Text
$sel:name:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Text
name} -> Text
name) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} Text
a -> CreateLicenseConfiguration
s {$sel:name:CreateLicenseConfiguration' :: Text
name = Text
a} :: CreateLicenseConfiguration)
createLicenseConfiguration_licenseCountingType :: Lens.Lens' CreateLicenseConfiguration LicenseCountingType
createLicenseConfiguration_licenseCountingType :: Lens' CreateLicenseConfiguration LicenseCountingType
createLicenseConfiguration_licenseCountingType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfiguration' {LicenseCountingType
licenseCountingType :: LicenseCountingType
$sel:licenseCountingType:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> LicenseCountingType
licenseCountingType} -> LicenseCountingType
licenseCountingType) (\s :: CreateLicenseConfiguration
s@CreateLicenseConfiguration' {} LicenseCountingType
a -> CreateLicenseConfiguration
s {$sel:licenseCountingType:CreateLicenseConfiguration' :: LicenseCountingType
licenseCountingType = LicenseCountingType
a} :: CreateLicenseConfiguration)
instance Core.AWSRequest CreateLicenseConfiguration where
type
AWSResponse CreateLicenseConfiguration =
CreateLicenseConfigurationResponse
request :: (Service -> Service)
-> CreateLicenseConfiguration -> Request CreateLicenseConfiguration
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 CreateLicenseConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateLicenseConfiguration)))
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 Text -> Int -> CreateLicenseConfigurationResponse
CreateLicenseConfigurationResponse'
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
"LicenseConfigurationArn")
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 CreateLicenseConfiguration where
hashWithSalt :: Int -> CreateLicenseConfiguration -> Int
hashWithSalt Int
_salt CreateLicenseConfiguration' {Maybe Bool
Maybe Integer
Maybe [Text]
Maybe [ProductInformation]
Maybe [Tag]
Maybe Text
Text
LicenseCountingType
licenseCountingType :: LicenseCountingType
name :: Text
tags :: Maybe [Tag]
productInformationList :: Maybe [ProductInformation]
licenseRules :: Maybe [Text]
licenseCountHardLimit :: Maybe Bool
licenseCount :: Maybe Integer
disassociateWhenNotFound :: Maybe Bool
description :: Maybe Text
$sel:licenseCountingType:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> LicenseCountingType
$sel:name:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Text
$sel:tags:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [Tag]
$sel:productInformationList:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [ProductInformation]
$sel:licenseRules:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [Text]
$sel:licenseCountHardLimit:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Bool
$sel:licenseCount:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Integer
$sel:disassociateWhenNotFound:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Bool
$sel:description:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disassociateWhenNotFound
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
licenseCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
licenseCountHardLimit
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
licenseRules
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ProductInformation]
productInformationList
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LicenseCountingType
licenseCountingType
instance Prelude.NFData CreateLicenseConfiguration where
rnf :: CreateLicenseConfiguration -> ()
rnf CreateLicenseConfiguration' {Maybe Bool
Maybe Integer
Maybe [Text]
Maybe [ProductInformation]
Maybe [Tag]
Maybe Text
Text
LicenseCountingType
licenseCountingType :: LicenseCountingType
name :: Text
tags :: Maybe [Tag]
productInformationList :: Maybe [ProductInformation]
licenseRules :: Maybe [Text]
licenseCountHardLimit :: Maybe Bool
licenseCount :: Maybe Integer
disassociateWhenNotFound :: Maybe Bool
description :: Maybe Text
$sel:licenseCountingType:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> LicenseCountingType
$sel:name:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Text
$sel:tags:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [Tag]
$sel:productInformationList:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [ProductInformation]
$sel:licenseRules:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [Text]
$sel:licenseCountHardLimit:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Bool
$sel:licenseCount:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Integer
$sel:disassociateWhenNotFound:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Bool
$sel:description:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Text
..} =
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 Bool
disassociateWhenNotFound
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
licenseCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
licenseCountHardLimit
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
licenseRules
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ProductInformation]
productInformationList
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 Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LicenseCountingType
licenseCountingType
instance Data.ToHeaders CreateLicenseConfiguration where
toHeaders :: CreateLicenseConfiguration -> 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
"AWSLicenseManager.CreateLicenseConfiguration" ::
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 CreateLicenseConfiguration where
toJSON :: CreateLicenseConfiguration -> Value
toJSON CreateLicenseConfiguration' {Maybe Bool
Maybe Integer
Maybe [Text]
Maybe [ProductInformation]
Maybe [Tag]
Maybe Text
Text
LicenseCountingType
licenseCountingType :: LicenseCountingType
name :: Text
tags :: Maybe [Tag]
productInformationList :: Maybe [ProductInformation]
licenseRules :: Maybe [Text]
licenseCountHardLimit :: Maybe Bool
licenseCount :: Maybe Integer
disassociateWhenNotFound :: Maybe Bool
description :: Maybe Text
$sel:licenseCountingType:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> LicenseCountingType
$sel:name:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Text
$sel:tags:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [Tag]
$sel:productInformationList:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [ProductInformation]
$sel:licenseRules:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe [Text]
$sel:licenseCountHardLimit:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Bool
$sel:licenseCount:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Integer
$sel:disassociateWhenNotFound:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Bool
$sel:description:CreateLicenseConfiguration' :: CreateLicenseConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"DisassociateWhenNotFound" 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 Bool
disassociateWhenNotFound,
(Key
"LicenseCount" 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 Integer
licenseCount,
(Key
"LicenseCountHardLimit" 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 Bool
licenseCountHardLimit,
(Key
"LicenseRules" 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]
licenseRules,
(Key
"ProductInformationList" 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 [ProductInformation]
productInformationList,
(Key
"Tags" 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]
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just
(Key
"LicenseCountingType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LicenseCountingType
licenseCountingType)
]
)
instance Data.ToPath CreateLicenseConfiguration where
toPath :: CreateLicenseConfiguration -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateLicenseConfiguration where
toQuery :: CreateLicenseConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateLicenseConfigurationResponse = CreateLicenseConfigurationResponse'
{
CreateLicenseConfigurationResponse -> Maybe Text
licenseConfigurationArn :: Prelude.Maybe Prelude.Text,
CreateLicenseConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateLicenseConfigurationResponse
-> CreateLicenseConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLicenseConfigurationResponse
-> CreateLicenseConfigurationResponse -> Bool
$c/= :: CreateLicenseConfigurationResponse
-> CreateLicenseConfigurationResponse -> Bool
== :: CreateLicenseConfigurationResponse
-> CreateLicenseConfigurationResponse -> Bool
$c== :: CreateLicenseConfigurationResponse
-> CreateLicenseConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [CreateLicenseConfigurationResponse]
ReadPrec CreateLicenseConfigurationResponse
Int -> ReadS CreateLicenseConfigurationResponse
ReadS [CreateLicenseConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLicenseConfigurationResponse]
$creadListPrec :: ReadPrec [CreateLicenseConfigurationResponse]
readPrec :: ReadPrec CreateLicenseConfigurationResponse
$creadPrec :: ReadPrec CreateLicenseConfigurationResponse
readList :: ReadS [CreateLicenseConfigurationResponse]
$creadList :: ReadS [CreateLicenseConfigurationResponse]
readsPrec :: Int -> ReadS CreateLicenseConfigurationResponse
$creadsPrec :: Int -> ReadS CreateLicenseConfigurationResponse
Prelude.Read, Int -> CreateLicenseConfigurationResponse -> ShowS
[CreateLicenseConfigurationResponse] -> ShowS
CreateLicenseConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLicenseConfigurationResponse] -> ShowS
$cshowList :: [CreateLicenseConfigurationResponse] -> ShowS
show :: CreateLicenseConfigurationResponse -> String
$cshow :: CreateLicenseConfigurationResponse -> String
showsPrec :: Int -> CreateLicenseConfigurationResponse -> ShowS
$cshowsPrec :: Int -> CreateLicenseConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep CreateLicenseConfigurationResponse x
-> CreateLicenseConfigurationResponse
forall x.
CreateLicenseConfigurationResponse
-> Rep CreateLicenseConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLicenseConfigurationResponse x
-> CreateLicenseConfigurationResponse
$cfrom :: forall x.
CreateLicenseConfigurationResponse
-> Rep CreateLicenseConfigurationResponse x
Prelude.Generic)
newCreateLicenseConfigurationResponse ::
Prelude.Int ->
CreateLicenseConfigurationResponse
newCreateLicenseConfigurationResponse :: Int -> CreateLicenseConfigurationResponse
newCreateLicenseConfigurationResponse Int
pHttpStatus_ =
CreateLicenseConfigurationResponse'
{ $sel:licenseConfigurationArn:CreateLicenseConfigurationResponse' :: Maybe Text
licenseConfigurationArn =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateLicenseConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createLicenseConfigurationResponse_licenseConfigurationArn :: Lens.Lens' CreateLicenseConfigurationResponse (Prelude.Maybe Prelude.Text)
createLicenseConfigurationResponse_licenseConfigurationArn :: Lens' CreateLicenseConfigurationResponse (Maybe Text)
createLicenseConfigurationResponse_licenseConfigurationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfigurationResponse' {Maybe Text
licenseConfigurationArn :: Maybe Text
$sel:licenseConfigurationArn:CreateLicenseConfigurationResponse' :: CreateLicenseConfigurationResponse -> Maybe Text
licenseConfigurationArn} -> Maybe Text
licenseConfigurationArn) (\s :: CreateLicenseConfigurationResponse
s@CreateLicenseConfigurationResponse' {} Maybe Text
a -> CreateLicenseConfigurationResponse
s {$sel:licenseConfigurationArn:CreateLicenseConfigurationResponse' :: Maybe Text
licenseConfigurationArn = Maybe Text
a} :: CreateLicenseConfigurationResponse)
createLicenseConfigurationResponse_httpStatus :: Lens.Lens' CreateLicenseConfigurationResponse Prelude.Int
createLicenseConfigurationResponse_httpStatus :: Lens' CreateLicenseConfigurationResponse Int
createLicenseConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLicenseConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateLicenseConfigurationResponse' :: CreateLicenseConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateLicenseConfigurationResponse
s@CreateLicenseConfigurationResponse' {} Int
a -> CreateLicenseConfigurationResponse
s {$sel:httpStatus:CreateLicenseConfigurationResponse' :: Int
httpStatus = Int
a} :: CreateLicenseConfigurationResponse)
instance
Prelude.NFData
CreateLicenseConfigurationResponse
where
rnf :: CreateLicenseConfigurationResponse -> ()
rnf CreateLicenseConfigurationResponse' {Int
Maybe Text
httpStatus :: Int
licenseConfigurationArn :: Maybe Text
$sel:httpStatus:CreateLicenseConfigurationResponse' :: CreateLicenseConfigurationResponse -> Int
$sel:licenseConfigurationArn:CreateLicenseConfigurationResponse' :: CreateLicenseConfigurationResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
licenseConfigurationArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus