module Network.AWS.DataPipeline.Types.Product where
import Network.AWS.DataPipeline.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data Field = Field'
{ _fRefValue :: !(Maybe Text)
, _fStringValue :: !(Maybe Text)
, _fKey :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
field
:: Text
-> Field
field pKey_ =
Field'
{ _fRefValue = Nothing
, _fStringValue = Nothing
, _fKey = pKey_
}
fRefValue :: Lens' Field (Maybe Text)
fRefValue = lens _fRefValue (\ s a -> s{_fRefValue = a});
fStringValue :: Lens' Field (Maybe Text)
fStringValue = lens _fStringValue (\ s a -> s{_fStringValue = a});
fKey :: Lens' Field Text
fKey = lens _fKey (\ s a -> s{_fKey = a});
instance FromJSON Field where
parseJSON
= withObject "Field"
(\ x ->
Field' <$>
(x .:? "refValue") <*> (x .:? "stringValue") <*>
(x .: "key"))
instance Hashable Field
instance NFData Field
instance ToJSON Field where
toJSON Field'{..}
= object
(catMaybes
[("refValue" .=) <$> _fRefValue,
("stringValue" .=) <$> _fStringValue,
Just ("key" .= _fKey)])
data InstanceIdentity = InstanceIdentity'
{ _iiSignature :: !(Maybe Text)
, _iiDocument :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
instanceIdentity
:: InstanceIdentity
instanceIdentity =
InstanceIdentity'
{ _iiSignature = Nothing
, _iiDocument = Nothing
}
iiSignature :: Lens' InstanceIdentity (Maybe Text)
iiSignature = lens _iiSignature (\ s a -> s{_iiSignature = a});
iiDocument :: Lens' InstanceIdentity (Maybe Text)
iiDocument = lens _iiDocument (\ s a -> s{_iiDocument = a});
instance Hashable InstanceIdentity
instance NFData InstanceIdentity
instance ToJSON InstanceIdentity where
toJSON InstanceIdentity'{..}
= object
(catMaybes
[("signature" .=) <$> _iiSignature,
("document" .=) <$> _iiDocument])
data Operator = Operator'
{ _oValues :: !(Maybe [Text])
, _oType :: !(Maybe OperatorType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
operator
:: Operator
operator =
Operator'
{ _oValues = Nothing
, _oType = Nothing
}
oValues :: Lens' Operator [Text]
oValues = lens _oValues (\ s a -> s{_oValues = a}) . _Default . _Coerce;
oType :: Lens' Operator (Maybe OperatorType)
oType = lens _oType (\ s a -> s{_oType = a});
instance Hashable Operator
instance NFData Operator
instance ToJSON Operator where
toJSON Operator'{..}
= object
(catMaybes
[("values" .=) <$> _oValues, ("type" .=) <$> _oType])
data ParameterAttribute = ParameterAttribute'
{ _paKey :: !Text
, _paStringValue :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
parameterAttribute
:: Text
-> Text
-> ParameterAttribute
parameterAttribute pKey_ pStringValue_ =
ParameterAttribute'
{ _paKey = pKey_
, _paStringValue = pStringValue_
}
paKey :: Lens' ParameterAttribute Text
paKey = lens _paKey (\ s a -> s{_paKey = a});
paStringValue :: Lens' ParameterAttribute Text
paStringValue = lens _paStringValue (\ s a -> s{_paStringValue = a});
instance FromJSON ParameterAttribute where
parseJSON
= withObject "ParameterAttribute"
(\ x ->
ParameterAttribute' <$>
(x .: "key") <*> (x .: "stringValue"))
instance Hashable ParameterAttribute
instance NFData ParameterAttribute
instance ToJSON ParameterAttribute where
toJSON ParameterAttribute'{..}
= object
(catMaybes
[Just ("key" .= _paKey),
Just ("stringValue" .= _paStringValue)])
data ParameterObject = ParameterObject'
{ _poId :: !Text
, _poAttributes :: ![ParameterAttribute]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
parameterObject
:: Text
-> ParameterObject
parameterObject pId_ =
ParameterObject'
{ _poId = pId_
, _poAttributes = mempty
}
poId :: Lens' ParameterObject Text
poId = lens _poId (\ s a -> s{_poId = a});
poAttributes :: Lens' ParameterObject [ParameterAttribute]
poAttributes = lens _poAttributes (\ s a -> s{_poAttributes = a}) . _Coerce;
instance FromJSON ParameterObject where
parseJSON
= withObject "ParameterObject"
(\ x ->
ParameterObject' <$>
(x .: "id") <*> (x .:? "attributes" .!= mempty))
instance Hashable ParameterObject
instance NFData ParameterObject
instance ToJSON ParameterObject where
toJSON ParameterObject'{..}
= object
(catMaybes
[Just ("id" .= _poId),
Just ("attributes" .= _poAttributes)])
data ParameterValue = ParameterValue'
{ _pvId :: !Text
, _pvStringValue :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
parameterValue
:: Text
-> Text
-> ParameterValue
parameterValue pId_ pStringValue_ =
ParameterValue'
{ _pvId = pId_
, _pvStringValue = pStringValue_
}
pvId :: Lens' ParameterValue Text
pvId = lens _pvId (\ s a -> s{_pvId = a});
pvStringValue :: Lens' ParameterValue Text
pvStringValue = lens _pvStringValue (\ s a -> s{_pvStringValue = a});
instance FromJSON ParameterValue where
parseJSON
= withObject "ParameterValue"
(\ x ->
ParameterValue' <$>
(x .: "id") <*> (x .: "stringValue"))
instance Hashable ParameterValue
instance NFData ParameterValue
instance ToJSON ParameterValue where
toJSON ParameterValue'{..}
= object
(catMaybes
[Just ("id" .= _pvId),
Just ("stringValue" .= _pvStringValue)])
data PipelineDescription = PipelineDescription'
{ _pdDescription :: !(Maybe Text)
, _pdTags :: !(Maybe [Tag])
, _pdPipelineId :: !Text
, _pdName :: !Text
, _pdFields :: ![Field]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
pipelineDescription
:: Text
-> Text
-> PipelineDescription
pipelineDescription pPipelineId_ pName_ =
PipelineDescription'
{ _pdDescription = Nothing
, _pdTags = Nothing
, _pdPipelineId = pPipelineId_
, _pdName = pName_
, _pdFields = mempty
}
pdDescription :: Lens' PipelineDescription (Maybe Text)
pdDescription = lens _pdDescription (\ s a -> s{_pdDescription = a});
pdTags :: Lens' PipelineDescription [Tag]
pdTags = lens _pdTags (\ s a -> s{_pdTags = a}) . _Default . _Coerce;
pdPipelineId :: Lens' PipelineDescription Text
pdPipelineId = lens _pdPipelineId (\ s a -> s{_pdPipelineId = a});
pdName :: Lens' PipelineDescription Text
pdName = lens _pdName (\ s a -> s{_pdName = a});
pdFields :: Lens' PipelineDescription [Field]
pdFields = lens _pdFields (\ s a -> s{_pdFields = a}) . _Coerce;
instance FromJSON PipelineDescription where
parseJSON
= withObject "PipelineDescription"
(\ x ->
PipelineDescription' <$>
(x .:? "description") <*> (x .:? "tags" .!= mempty)
<*> (x .: "pipelineId")
<*> (x .: "name")
<*> (x .:? "fields" .!= mempty))
instance Hashable PipelineDescription
instance NFData PipelineDescription
data PipelineIdName = PipelineIdName'
{ _pinName :: !(Maybe Text)
, _pinId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
pipelineIdName
:: PipelineIdName
pipelineIdName =
PipelineIdName'
{ _pinName = Nothing
, _pinId = Nothing
}
pinName :: Lens' PipelineIdName (Maybe Text)
pinName = lens _pinName (\ s a -> s{_pinName = a});
pinId :: Lens' PipelineIdName (Maybe Text)
pinId = lens _pinId (\ s a -> s{_pinId = a});
instance FromJSON PipelineIdName where
parseJSON
= withObject "PipelineIdName"
(\ x ->
PipelineIdName' <$> (x .:? "name") <*> (x .:? "id"))
instance Hashable PipelineIdName
instance NFData PipelineIdName
data PipelineObject = PipelineObject'
{ _pId :: !Text
, _pName :: !Text
, _pFields :: ![Field]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
pipelineObject
:: Text
-> Text
-> PipelineObject
pipelineObject pId_ pName_ =
PipelineObject'
{ _pId = pId_
, _pName = pName_
, _pFields = mempty
}
pId :: Lens' PipelineObject Text
pId = lens _pId (\ s a -> s{_pId = a});
pName :: Lens' PipelineObject Text
pName = lens _pName (\ s a -> s{_pName = a});
pFields :: Lens' PipelineObject [Field]
pFields = lens _pFields (\ s a -> s{_pFields = a}) . _Coerce;
instance FromJSON PipelineObject where
parseJSON
= withObject "PipelineObject"
(\ x ->
PipelineObject' <$>
(x .: "id") <*> (x .: "name") <*>
(x .:? "fields" .!= mempty))
instance Hashable PipelineObject
instance NFData PipelineObject
instance ToJSON PipelineObject where
toJSON PipelineObject'{..}
= object
(catMaybes
[Just ("id" .= _pId), Just ("name" .= _pName),
Just ("fields" .= _pFields)])
newtype Query = Query'
{ _qSelectors :: Maybe [Selector]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
query
:: Query
query =
Query'
{ _qSelectors = Nothing
}
qSelectors :: Lens' Query [Selector]
qSelectors = lens _qSelectors (\ s a -> s{_qSelectors = a}) . _Default . _Coerce;
instance Hashable Query
instance NFData Query
instance ToJSON Query where
toJSON Query'{..}
= object
(catMaybes [("selectors" .=) <$> _qSelectors])
data Selector = Selector'
{ _sOperator :: !(Maybe Operator)
, _sFieldName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
selector
:: Selector
selector =
Selector'
{ _sOperator = Nothing
, _sFieldName = Nothing
}
sOperator :: Lens' Selector (Maybe Operator)
sOperator = lens _sOperator (\ s a -> s{_sOperator = a});
sFieldName :: Lens' Selector (Maybe Text)
sFieldName = lens _sFieldName (\ s a -> s{_sFieldName = a});
instance Hashable Selector
instance NFData Selector
instance ToJSON Selector where
toJSON Selector'{..}
= object
(catMaybes
[("operator" .=) <$> _sOperator,
("fieldName" .=) <$> _sFieldName])
data Tag = Tag'
{ _tagKey :: !Text
, _tagValue :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
tag
:: Text
-> Text
-> Tag
tag pKey_ pValue_ =
Tag'
{ _tagKey = pKey_
, _tagValue = pValue_
}
tagKey :: Lens' Tag Text
tagKey = lens _tagKey (\ s a -> s{_tagKey = a});
tagValue :: Lens' Tag Text
tagValue = lens _tagValue (\ s a -> s{_tagValue = a});
instance FromJSON Tag where
parseJSON
= withObject "Tag"
(\ x -> Tag' <$> (x .: "key") <*> (x .: "value"))
instance Hashable Tag
instance NFData Tag
instance ToJSON Tag where
toJSON Tag'{..}
= object
(catMaybes
[Just ("key" .= _tagKey),
Just ("value" .= _tagValue)])
data TaskObject = TaskObject'
{ _toPipelineId :: !(Maybe Text)
, _toAttemptId :: !(Maybe Text)
, _toTaskId :: !(Maybe Text)
, _toObjects :: !(Maybe (Map Text PipelineObject))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
taskObject
:: TaskObject
taskObject =
TaskObject'
{ _toPipelineId = Nothing
, _toAttemptId = Nothing
, _toTaskId = Nothing
, _toObjects = Nothing
}
toPipelineId :: Lens' TaskObject (Maybe Text)
toPipelineId = lens _toPipelineId (\ s a -> s{_toPipelineId = a});
toAttemptId :: Lens' TaskObject (Maybe Text)
toAttemptId = lens _toAttemptId (\ s a -> s{_toAttemptId = a});
toTaskId :: Lens' TaskObject (Maybe Text)
toTaskId = lens _toTaskId (\ s a -> s{_toTaskId = a});
toObjects :: Lens' TaskObject (HashMap Text PipelineObject)
toObjects = lens _toObjects (\ s a -> s{_toObjects = a}) . _Default . _Map;
instance FromJSON TaskObject where
parseJSON
= withObject "TaskObject"
(\ x ->
TaskObject' <$>
(x .:? "pipelineId") <*> (x .:? "attemptId") <*>
(x .:? "taskId")
<*> (x .:? "objects" .!= mempty))
instance Hashable TaskObject
instance NFData TaskObject
data ValidationError = ValidationError'
{ _veId :: !(Maybe Text)
, _veErrors :: !(Maybe [Text])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
validationError
:: ValidationError
validationError =
ValidationError'
{ _veId = Nothing
, _veErrors = Nothing
}
veId :: Lens' ValidationError (Maybe Text)
veId = lens _veId (\ s a -> s{_veId = a});
veErrors :: Lens' ValidationError [Text]
veErrors = lens _veErrors (\ s a -> s{_veErrors = a}) . _Default . _Coerce;
instance FromJSON ValidationError where
parseJSON
= withObject "ValidationError"
(\ x ->
ValidationError' <$>
(x .:? "id") <*> (x .:? "errors" .!= mempty))
instance Hashable ValidationError
instance NFData ValidationError
data ValidationWarning = ValidationWarning'
{ _vwWarnings :: !(Maybe [Text])
, _vwId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
validationWarning
:: ValidationWarning
validationWarning =
ValidationWarning'
{ _vwWarnings = Nothing
, _vwId = Nothing
}
vwWarnings :: Lens' ValidationWarning [Text]
vwWarnings = lens _vwWarnings (\ s a -> s{_vwWarnings = a}) . _Default . _Coerce;
vwId :: Lens' ValidationWarning (Maybe Text)
vwId = lens _vwId (\ s a -> s{_vwId = a});
instance FromJSON ValidationWarning where
parseJSON
= withObject "ValidationWarning"
(\ x ->
ValidationWarning' <$>
(x .:? "warnings" .!= mempty) <*> (x .:? "id"))
instance Hashable ValidationWarning
instance NFData ValidationWarning