module Network.AWS.CodePipeline.CreateCustomActionType
(
createCustomActionType
, CreateCustomActionType
, ccatSettings
, ccatConfigurationProperties
, ccatCategory
, ccatProvider
, ccatVersion
, ccatInputArtifactDetails
, ccatOutputArtifactDetails
, createCustomActionTypeResponse
, CreateCustomActionTypeResponse
, ccatrsStatus
, ccatrsActionType
) where
import Network.AWS.CodePipeline.Types
import Network.AWS.CodePipeline.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data CreateCustomActionType = CreateCustomActionType'
{ _ccatSettings :: !(Maybe ActionTypeSettings)
, _ccatConfigurationProperties :: !(Maybe [ActionConfigurationProperty])
, _ccatCategory :: !ActionCategory
, _ccatProvider :: !Text
, _ccatVersion :: !Text
, _ccatInputArtifactDetails :: !ArtifactDetails
, _ccatOutputArtifactDetails :: !ArtifactDetails
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createCustomActionType
:: ActionCategory
-> Text
-> Text
-> ArtifactDetails
-> ArtifactDetails
-> CreateCustomActionType
createCustomActionType pCategory_ pProvider_ pVersion_ pInputArtifactDetails_ pOutputArtifactDetails_ =
CreateCustomActionType'
{ _ccatSettings = Nothing
, _ccatConfigurationProperties = Nothing
, _ccatCategory = pCategory_
, _ccatProvider = pProvider_
, _ccatVersion = pVersion_
, _ccatInputArtifactDetails = pInputArtifactDetails_
, _ccatOutputArtifactDetails = pOutputArtifactDetails_
}
ccatSettings :: Lens' CreateCustomActionType (Maybe ActionTypeSettings)
ccatSettings = lens _ccatSettings (\ s a -> s{_ccatSettings = a});
ccatConfigurationProperties :: Lens' CreateCustomActionType [ActionConfigurationProperty]
ccatConfigurationProperties = lens _ccatConfigurationProperties (\ s a -> s{_ccatConfigurationProperties = a}) . _Default . _Coerce;
ccatCategory :: Lens' CreateCustomActionType ActionCategory
ccatCategory = lens _ccatCategory (\ s a -> s{_ccatCategory = a});
ccatProvider :: Lens' CreateCustomActionType Text
ccatProvider = lens _ccatProvider (\ s a -> s{_ccatProvider = a});
ccatVersion :: Lens' CreateCustomActionType Text
ccatVersion = lens _ccatVersion (\ s a -> s{_ccatVersion = a});
ccatInputArtifactDetails :: Lens' CreateCustomActionType ArtifactDetails
ccatInputArtifactDetails = lens _ccatInputArtifactDetails (\ s a -> s{_ccatInputArtifactDetails = a});
ccatOutputArtifactDetails :: Lens' CreateCustomActionType ArtifactDetails
ccatOutputArtifactDetails = lens _ccatOutputArtifactDetails (\ s a -> s{_ccatOutputArtifactDetails = a});
instance AWSRequest CreateCustomActionType where
type Sv CreateCustomActionType = CodePipeline
type Rs CreateCustomActionType =
CreateCustomActionTypeResponse
request = postJSON
response
= receiveJSON
(\ s h x ->
CreateCustomActionTypeResponse' <$>
(pure (fromEnum s)) <*> (x .:> "actionType"))
instance ToHeaders CreateCustomActionType where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodePipeline_20150709.CreateCustomActionType" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON CreateCustomActionType where
toJSON CreateCustomActionType'{..}
= object
["settings" .= _ccatSettings,
"configurationProperties" .=
_ccatConfigurationProperties,
"category" .= _ccatCategory,
"provider" .= _ccatProvider,
"version" .= _ccatVersion,
"inputArtifactDetails" .= _ccatInputArtifactDetails,
"outputArtifactDetails" .=
_ccatOutputArtifactDetails]
instance ToPath CreateCustomActionType where
toPath = const "/"
instance ToQuery CreateCustomActionType where
toQuery = const mempty
data CreateCustomActionTypeResponse = CreateCustomActionTypeResponse'
{ _ccatrsStatus :: !Int
, _ccatrsActionType :: !ActionType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
createCustomActionTypeResponse
:: Int
-> ActionType
-> CreateCustomActionTypeResponse
createCustomActionTypeResponse pStatus_ pActionType_ =
CreateCustomActionTypeResponse'
{ _ccatrsStatus = pStatus_
, _ccatrsActionType = pActionType_
}
ccatrsStatus :: Lens' CreateCustomActionTypeResponse Int
ccatrsStatus = lens _ccatrsStatus (\ s a -> s{_ccatrsStatus = a});
ccatrsActionType :: Lens' CreateCustomActionTypeResponse ActionType
ccatrsActionType = lens _ccatrsActionType (\ s a -> s{_ccatrsActionType = a});