{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Genomics.Types.Product where
import Network.Google.Genomics.Types.Sum
import Network.Google.Prelude
newtype ContainerStartedEventPortMAppings = ContainerStartedEventPortMAppings'
{ _csepmaAddtional :: HashMap Text (Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
containerStartedEventPortMAppings
:: HashMap Text Int32
-> ContainerStartedEventPortMAppings
containerStartedEventPortMAppings pCsepmaAddtional_ =
ContainerStartedEventPortMAppings'
{ _csepmaAddtional = _Coerce # pCsepmaAddtional_
}
csepmaAddtional :: Lens' ContainerStartedEventPortMAppings (HashMap Text Int32)
csepmaAddtional
= lens _csepmaAddtional
(\ s a -> s{_csepmaAddtional = a})
. _Coerce
instance FromJSON ContainerStartedEventPortMAppings
where
parseJSON
= withObject "ContainerStartedEventPortMAppings"
(\ o ->
ContainerStartedEventPortMAppings' <$>
(parseJSONObject o))
instance ToJSON ContainerStartedEventPortMAppings
where
toJSON = toJSON . _csepmaAddtional
data Event = Event'
{ _eDetails :: !(Maybe EventDetails)
, _eTimestamp :: !(Maybe DateTime')
, _eDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
event
:: Event
event =
Event'
{ _eDetails = Nothing
, _eTimestamp = Nothing
, _eDescription = Nothing
}
eDetails :: Lens' Event (Maybe EventDetails)
eDetails = lens _eDetails (\ s a -> s{_eDetails = a})
eTimestamp :: Lens' Event (Maybe UTCTime)
eTimestamp
= lens _eTimestamp (\ s a -> s{_eTimestamp = a}) .
mapping _DateTime
eDescription :: Lens' Event (Maybe Text)
eDescription
= lens _eDescription (\ s a -> s{_eDescription = a})
instance FromJSON Event where
parseJSON
= withObject "Event"
(\ o ->
Event' <$>
(o .:? "details") <*> (o .:? "timestamp") <*>
(o .:? "description"))
instance ToJSON Event where
toJSON Event'{..}
= object
(catMaybes
[("details" .=) <$> _eDetails,
("timestamp" .=) <$> _eTimestamp,
("description" .=) <$> _eDescription])
newtype CheckInRequestEvent = CheckInRequestEvent'
{ _cireAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
checkInRequestEvent
:: HashMap Text JSONValue
-> CheckInRequestEvent
checkInRequestEvent pCireAddtional_ =
CheckInRequestEvent'
{ _cireAddtional = _Coerce # pCireAddtional_
}
cireAddtional :: Lens' CheckInRequestEvent (HashMap Text JSONValue)
cireAddtional
= lens _cireAddtional
(\ s a -> s{_cireAddtional = a})
. _Coerce
instance FromJSON CheckInRequestEvent where
parseJSON
= withObject "CheckInRequestEvent"
(\ o -> CheckInRequestEvent' <$> (parseJSONObject o))
instance ToJSON CheckInRequestEvent where
toJSON = toJSON . _cireAddtional
data Status = Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
status
:: Status
status =
Status'
{ _sDetails = Nothing
, _sCode = Nothing
, _sMessage = Nothing
}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
newtype OperationSchema = OperationSchema'
{ _osAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationSchema
:: HashMap Text JSONValue
-> OperationSchema
operationSchema pOsAddtional_ =
OperationSchema'
{ _osAddtional = _Coerce # pOsAddtional_
}
osAddtional :: Lens' OperationSchema (HashMap Text JSONValue)
osAddtional
= lens _osAddtional (\ s a -> s{_osAddtional = a}) .
_Coerce
instance FromJSON OperationSchema where
parseJSON
= withObject "OperationSchema"
(\ o -> OperationSchema' <$> (parseJSONObject o))
instance ToJSON OperationSchema where
toJSON = toJSON . _osAddtional
newtype RunPipelineRequestLabels = RunPipelineRequestLabels'
{ _rprlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
runPipelineRequestLabels
:: HashMap Text Text
-> RunPipelineRequestLabels
runPipelineRequestLabels pRprlAddtional_ =
RunPipelineRequestLabels'
{ _rprlAddtional = _Coerce # pRprlAddtional_
}
rprlAddtional :: Lens' RunPipelineRequestLabels (HashMap Text Text)
rprlAddtional
= lens _rprlAddtional
(\ s a -> s{_rprlAddtional = a})
. _Coerce
instance FromJSON RunPipelineRequestLabels where
parseJSON
= withObject "RunPipelineRequestLabels"
(\ o ->
RunPipelineRequestLabels' <$> (parseJSONObject o))
instance ToJSON RunPipelineRequestLabels where
toJSON = toJSON . _rprlAddtional
data ListOperationsResponse = ListOperationsResponse'
{ _lorNextPageToken :: !(Maybe Text)
, _lorOperations :: !(Maybe [Operation])
} deriving (Eq,Show,Data,Typeable,Generic)
listOperationsResponse
:: ListOperationsResponse
listOperationsResponse =
ListOperationsResponse'
{ _lorNextPageToken = Nothing
, _lorOperations = Nothing
}
lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a})
lorOperations :: Lens' ListOperationsResponse [Operation]
lorOperations
= lens _lorOperations
(\ s a -> s{_lorOperations = a})
. _Default
. _Coerce
instance FromJSON ListOperationsResponse where
parseJSON
= withObject "ListOperationsResponse"
(\ o ->
ListOperationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "operations" .!= mempty))
instance ToJSON ListOperationsResponse where
toJSON ListOperationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lorNextPageToken,
("operations" .=) <$> _lorOperations])
data FailedEvent = FailedEvent'
{ _feCause :: !(Maybe Text)
, _feCode :: !(Maybe FailedEventCode)
} deriving (Eq,Show,Data,Typeable,Generic)
failedEvent
:: FailedEvent
failedEvent =
FailedEvent'
{ _feCause = Nothing
, _feCode = Nothing
}
feCause :: Lens' FailedEvent (Maybe Text)
feCause = lens _feCause (\ s a -> s{_feCause = a})
feCode :: Lens' FailedEvent (Maybe FailedEventCode)
feCode = lens _feCode (\ s a -> s{_feCode = a})
instance FromJSON FailedEvent where
parseJSON
= withObject "FailedEvent"
(\ o ->
FailedEvent' <$> (o .:? "cause") <*> (o .:? "code"))
instance ToJSON FailedEvent where
toJSON FailedEvent'{..}
= object
(catMaybes
[("cause" .=) <$> _feCause, ("code" .=) <$> _feCode])
data CancelOperationRequest =
CancelOperationRequest'
deriving (Eq,Show,Data,Typeable,Generic)
cancelOperationRequest
:: CancelOperationRequest
cancelOperationRequest = CancelOperationRequest'
instance FromJSON CancelOperationRequest where
parseJSON
= withObject "CancelOperationRequest"
(\ o -> pure CancelOperationRequest')
instance ToJSON CancelOperationRequest where
toJSON = const emptyObject
data WorkerStatus = WorkerStatus'
{ _wsTotalRamBytes :: !(Maybe (Textual Word64))
, _wsAttachedDisks :: !(Maybe WorkerStatusAttachedDisks)
, _wsUptimeSeconds :: !(Maybe (Textual Int64))
, _wsBootDisk :: !(Maybe DiskStatus)
, _wsFreeRamBytes :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
workerStatus
:: WorkerStatus
workerStatus =
WorkerStatus'
{ _wsTotalRamBytes = Nothing
, _wsAttachedDisks = Nothing
, _wsUptimeSeconds = Nothing
, _wsBootDisk = Nothing
, _wsFreeRamBytes = Nothing
}
wsTotalRamBytes :: Lens' WorkerStatus (Maybe Word64)
wsTotalRamBytes
= lens _wsTotalRamBytes
(\ s a -> s{_wsTotalRamBytes = a})
. mapping _Coerce
wsAttachedDisks :: Lens' WorkerStatus (Maybe WorkerStatusAttachedDisks)
wsAttachedDisks
= lens _wsAttachedDisks
(\ s a -> s{_wsAttachedDisks = a})
wsUptimeSeconds :: Lens' WorkerStatus (Maybe Int64)
wsUptimeSeconds
= lens _wsUptimeSeconds
(\ s a -> s{_wsUptimeSeconds = a})
. mapping _Coerce
wsBootDisk :: Lens' WorkerStatus (Maybe DiskStatus)
wsBootDisk
= lens _wsBootDisk (\ s a -> s{_wsBootDisk = a})
wsFreeRamBytes :: Lens' WorkerStatus (Maybe Word64)
wsFreeRamBytes
= lens _wsFreeRamBytes
(\ s a -> s{_wsFreeRamBytes = a})
. mapping _Coerce
instance FromJSON WorkerStatus where
parseJSON
= withObject "WorkerStatus"
(\ o ->
WorkerStatus' <$>
(o .:? "totalRamBytes") <*> (o .:? "attachedDisks")
<*> (o .:? "uptimeSeconds")
<*> (o .:? "bootDisk")
<*> (o .:? "freeRamBytes"))
instance ToJSON WorkerStatus where
toJSON WorkerStatus'{..}
= object
(catMaybes
[("totalRamBytes" .=) <$> _wsTotalRamBytes,
("attachedDisks" .=) <$> _wsAttachedDisks,
("uptimeSeconds" .=) <$> _wsUptimeSeconds,
("bootDisk" .=) <$> _wsBootDisk,
("freeRamBytes" .=) <$> _wsFreeRamBytes])
data ContainerStoppedEvent = ContainerStoppedEvent'
{ _cseExitStatus :: !(Maybe (Textual Int32))
, _cseActionId :: !(Maybe (Textual Int32))
, _cseStderr :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
containerStoppedEvent
:: ContainerStoppedEvent
containerStoppedEvent =
ContainerStoppedEvent'
{ _cseExitStatus = Nothing
, _cseActionId = Nothing
, _cseStderr = Nothing
}
cseExitStatus :: Lens' ContainerStoppedEvent (Maybe Int32)
cseExitStatus
= lens _cseExitStatus
(\ s a -> s{_cseExitStatus = a})
. mapping _Coerce
cseActionId :: Lens' ContainerStoppedEvent (Maybe Int32)
cseActionId
= lens _cseActionId (\ s a -> s{_cseActionId = a}) .
mapping _Coerce
cseStderr :: Lens' ContainerStoppedEvent (Maybe Text)
cseStderr
= lens _cseStderr (\ s a -> s{_cseStderr = a})
instance FromJSON ContainerStoppedEvent where
parseJSON
= withObject "ContainerStoppedEvent"
(\ o ->
ContainerStoppedEvent' <$>
(o .:? "exitStatus") <*> (o .:? "actionId") <*>
(o .:? "stderr"))
instance ToJSON ContainerStoppedEvent where
toJSON ContainerStoppedEvent'{..}
= object
(catMaybes
[("exitStatus" .=) <$> _cseExitStatus,
("actionId" .=) <$> _cseActionId,
("stderr" .=) <$> _cseStderr])
data CheckInResponse = CheckInResponse'
{ _cirDeadline :: !(Maybe DateTime')
, _cirMetadata :: !(Maybe CheckInResponseMetadata)
} deriving (Eq,Show,Data,Typeable,Generic)
checkInResponse
:: CheckInResponse
checkInResponse =
CheckInResponse'
{ _cirDeadline = Nothing
, _cirMetadata = Nothing
}
cirDeadline :: Lens' CheckInResponse (Maybe UTCTime)
cirDeadline
= lens _cirDeadline (\ s a -> s{_cirDeadline = a}) .
mapping _DateTime
cirMetadata :: Lens' CheckInResponse (Maybe CheckInResponseMetadata)
cirMetadata
= lens _cirMetadata (\ s a -> s{_cirMetadata = a})
instance FromJSON CheckInResponse where
parseJSON
= withObject "CheckInResponse"
(\ o ->
CheckInResponse' <$>
(o .:? "deadline") <*> (o .:? "metadata"))
instance ToJSON CheckInResponse where
toJSON CheckInResponse'{..}
= object
(catMaybes
[("deadline" .=) <$> _cirDeadline,
("metadata" .=) <$> _cirMetadata])
data WorkerAssignedEvent = WorkerAssignedEvent'
{ _waeZone :: !(Maybe Text)
, _waeInstance :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
workerAssignedEvent
:: WorkerAssignedEvent
workerAssignedEvent =
WorkerAssignedEvent'
{ _waeZone = Nothing
, _waeInstance = Nothing
}
waeZone :: Lens' WorkerAssignedEvent (Maybe Text)
waeZone = lens _waeZone (\ s a -> s{_waeZone = a})
waeInstance :: Lens' WorkerAssignedEvent (Maybe Text)
waeInstance
= lens _waeInstance (\ s a -> s{_waeInstance = a})
instance FromJSON WorkerAssignedEvent where
parseJSON
= withObject "WorkerAssignedEvent"
(\ o ->
WorkerAssignedEvent' <$>
(o .:? "zone") <*> (o .:? "instance"))
instance ToJSON WorkerAssignedEvent where
toJSON WorkerAssignedEvent'{..}
= object
(catMaybes
[("zone" .=) <$> _waeZone,
("instance" .=) <$> _waeInstance])
newtype OperationMetadataLabels = OperationMetadataLabels'
{ _omlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadataLabels
:: HashMap Text Text
-> OperationMetadataLabels
operationMetadataLabels pOmlAddtional_ =
OperationMetadataLabels'
{ _omlAddtional = _Coerce # pOmlAddtional_
}
omlAddtional :: Lens' OperationMetadataLabels (HashMap Text Text)
omlAddtional
= lens _omlAddtional (\ s a -> s{_omlAddtional = a})
. _Coerce
instance FromJSON OperationMetadataLabels where
parseJSON
= withObject "OperationMetadataLabels"
(\ o ->
OperationMetadataLabels' <$> (parseJSONObject o))
instance ToJSON OperationMetadataLabels where
toJSON = toJSON . _omlAddtional
data Operation = Operation'
{ _oDone :: !(Maybe Bool)
, _oError :: !(Maybe Status)
, _oResponse :: !(Maybe OperationResponse)
, _oName :: !(Maybe Text)
, _oMetadata :: !(Maybe OperationSchema)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oDone = Nothing
, _oError = Nothing
, _oResponse = Nothing
, _oName = Nothing
, _oMetadata = Nothing
}
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a})
oError :: Lens' Operation (Maybe Status)
oError = lens _oError (\ s a -> s{_oError = a})
oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oMetadata :: Lens' Operation (Maybe OperationSchema)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("done" .=) <$> _oDone, ("error" .=) <$> _oError,
("response" .=) <$> _oResponse,
("name" .=) <$> _oName,
("metadata" .=) <$> _oMetadata])
data Empty =
Empty'
deriving (Eq,Show,Data,Typeable,Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
data Disk = Disk'
{ _dSourceImage :: !(Maybe Text)
, _dSizeGb :: !(Maybe (Textual Int32))
, _dName :: !(Maybe Text)
, _dType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
disk
:: Disk
disk =
Disk'
{ _dSourceImage = Nothing
, _dSizeGb = Nothing
, _dName = Nothing
, _dType = Nothing
}
dSourceImage :: Lens' Disk (Maybe Text)
dSourceImage
= lens _dSourceImage (\ s a -> s{_dSourceImage = a})
dSizeGb :: Lens' Disk (Maybe Int32)
dSizeGb
= lens _dSizeGb (\ s a -> s{_dSizeGb = a}) .
mapping _Coerce
dName :: Lens' Disk (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})
dType :: Lens' Disk (Maybe Text)
dType = lens _dType (\ s a -> s{_dType = a})
instance FromJSON Disk where
parseJSON
= withObject "Disk"
(\ o ->
Disk' <$>
(o .:? "sourceImage") <*> (o .:? "sizeGb") <*>
(o .:? "name")
<*> (o .:? "type"))
instance ToJSON Disk where
toJSON Disk'{..}
= object
(catMaybes
[("sourceImage" .=) <$> _dSourceImage,
("sizeGb" .=) <$> _dSizeGb, ("name" .=) <$> _dName,
("type" .=) <$> _dType])
data UnexpectedExitStatusEvent = UnexpectedExitStatusEvent'
{ _ueseExitStatus :: !(Maybe (Textual Int32))
, _ueseActionId :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
unexpectedExitStatusEvent
:: UnexpectedExitStatusEvent
unexpectedExitStatusEvent =
UnexpectedExitStatusEvent'
{ _ueseExitStatus = Nothing
, _ueseActionId = Nothing
}
ueseExitStatus :: Lens' UnexpectedExitStatusEvent (Maybe Int32)
ueseExitStatus
= lens _ueseExitStatus
(\ s a -> s{_ueseExitStatus = a})
. mapping _Coerce
ueseActionId :: Lens' UnexpectedExitStatusEvent (Maybe Int32)
ueseActionId
= lens _ueseActionId (\ s a -> s{_ueseActionId = a})
. mapping _Coerce
instance FromJSON UnexpectedExitStatusEvent where
parseJSON
= withObject "UnexpectedExitStatusEvent"
(\ o ->
UnexpectedExitStatusEvent' <$>
(o .:? "exitStatus") <*> (o .:? "actionId"))
instance ToJSON UnexpectedExitStatusEvent where
toJSON UnexpectedExitStatusEvent'{..}
= object
(catMaybes
[("exitStatus" .=) <$> _ueseExitStatus,
("actionId" .=) <$> _ueseActionId])
data DelayedEvent = DelayedEvent'
{ _deMetrics :: !(Maybe [Text])
, _deCause :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
delayedEvent
:: DelayedEvent
delayedEvent =
DelayedEvent'
{ _deMetrics = Nothing
, _deCause = Nothing
}
deMetrics :: Lens' DelayedEvent [Text]
deMetrics
= lens _deMetrics (\ s a -> s{_deMetrics = a}) .
_Default
. _Coerce
deCause :: Lens' DelayedEvent (Maybe Text)
deCause = lens _deCause (\ s a -> s{_deCause = a})
instance FromJSON DelayedEvent where
parseJSON
= withObject "DelayedEvent"
(\ o ->
DelayedEvent' <$>
(o .:? "metrics" .!= mempty) <*> (o .:? "cause"))
instance ToJSON DelayedEvent where
toJSON DelayedEvent'{..}
= object
(catMaybes
[("metrics" .=) <$> _deMetrics,
("cause" .=) <$> _deCause])
newtype ActionPortMAppings = ActionPortMAppings'
{ _apmaAddtional :: HashMap Text (Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
actionPortMAppings
:: HashMap Text Int32
-> ActionPortMAppings
actionPortMAppings pApmaAddtional_ =
ActionPortMAppings'
{ _apmaAddtional = _Coerce # pApmaAddtional_
}
apmaAddtional :: Lens' ActionPortMAppings (HashMap Text Int32)
apmaAddtional
= lens _apmaAddtional
(\ s a -> s{_apmaAddtional = a})
. _Coerce
instance FromJSON ActionPortMAppings where
parseJSON
= withObject "ActionPortMAppings"
(\ o -> ActionPortMAppings' <$> (parseJSONObject o))
instance ToJSON ActionPortMAppings where
toJSON = toJSON . _apmaAddtional
newtype MetadataLabels = MetadataLabels'
{ _mlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
metadataLabels
:: HashMap Text Text
-> MetadataLabels
metadataLabels pMlAddtional_ =
MetadataLabels'
{ _mlAddtional = _Coerce # pMlAddtional_
}
mlAddtional :: Lens' MetadataLabels (HashMap Text Text)
mlAddtional
= lens _mlAddtional (\ s a -> s{_mlAddtional = a}) .
_Coerce
instance FromJSON MetadataLabels where
parseJSON
= withObject "MetadataLabels"
(\ o -> MetadataLabels' <$> (parseJSONObject o))
instance ToJSON MetadataLabels where
toJSON = toJSON . _mlAddtional
data CheckInRequest = CheckInRequest'
{ _cirEvent :: !(Maybe CheckInRequestEvent)
, _cirWorkerStatus :: !(Maybe WorkerStatus)
, _cirResult :: !(Maybe Status)
, _cirDeadlineExpired :: !(Maybe Empty)
} deriving (Eq,Show,Data,Typeable,Generic)
checkInRequest
:: CheckInRequest
checkInRequest =
CheckInRequest'
{ _cirEvent = Nothing
, _cirWorkerStatus = Nothing
, _cirResult = Nothing
, _cirDeadlineExpired = Nothing
}
cirEvent :: Lens' CheckInRequest (Maybe CheckInRequestEvent)
cirEvent = lens _cirEvent (\ s a -> s{_cirEvent = a})
cirWorkerStatus :: Lens' CheckInRequest (Maybe WorkerStatus)
cirWorkerStatus
= lens _cirWorkerStatus
(\ s a -> s{_cirWorkerStatus = a})
cirResult :: Lens' CheckInRequest (Maybe Status)
cirResult
= lens _cirResult (\ s a -> s{_cirResult = a})
cirDeadlineExpired :: Lens' CheckInRequest (Maybe Empty)
cirDeadlineExpired
= lens _cirDeadlineExpired
(\ s a -> s{_cirDeadlineExpired = a})
instance FromJSON CheckInRequest where
parseJSON
= withObject "CheckInRequest"
(\ o ->
CheckInRequest' <$>
(o .:? "event") <*> (o .:? "workerStatus") <*>
(o .:? "result")
<*> (o .:? "deadlineExpired"))
instance ToJSON CheckInRequest where
toJSON CheckInRequest'{..}
= object
(catMaybes
[("event" .=) <$> _cirEvent,
("workerStatus" .=) <$> _cirWorkerStatus,
("result" .=) <$> _cirResult,
("deadlineExpired" .=) <$> _cirDeadlineExpired])
newtype ContainerKilledEvent = ContainerKilledEvent'
{ _ckeActionId :: Maybe (Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
containerKilledEvent
:: ContainerKilledEvent
containerKilledEvent =
ContainerKilledEvent'
{ _ckeActionId = Nothing
}
ckeActionId :: Lens' ContainerKilledEvent (Maybe Int32)
ckeActionId
= lens _ckeActionId (\ s a -> s{_ckeActionId = a}) .
mapping _Coerce
instance FromJSON ContainerKilledEvent where
parseJSON
= withObject "ContainerKilledEvent"
(\ o -> ContainerKilledEvent' <$> (o .:? "actionId"))
instance ToJSON ContainerKilledEvent where
toJSON ContainerKilledEvent'{..}
= object
(catMaybes [("actionId" .=) <$> _ckeActionId])
newtype PullStoppedEvent = PullStoppedEvent'
{ _pseImageURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
pullStoppedEvent
:: PullStoppedEvent
pullStoppedEvent =
PullStoppedEvent'
{ _pseImageURI = Nothing
}
pseImageURI :: Lens' PullStoppedEvent (Maybe Text)
pseImageURI
= lens _pseImageURI (\ s a -> s{_pseImageURI = a})
instance FromJSON PullStoppedEvent where
parseJSON
= withObject "PullStoppedEvent"
(\ o -> PullStoppedEvent' <$> (o .:? "imageUri"))
instance ToJSON PullStoppedEvent where
toJSON PullStoppedEvent'{..}
= object
(catMaybes [("imageUri" .=) <$> _pseImageURI])
newtype ActionLabels = ActionLabels'
{ _alAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
actionLabels
:: HashMap Text Text
-> ActionLabels
actionLabels pAlAddtional_ =
ActionLabels'
{ _alAddtional = _Coerce # pAlAddtional_
}
alAddtional :: Lens' ActionLabels (HashMap Text Text)
alAddtional
= lens _alAddtional (\ s a -> s{_alAddtional = a}) .
_Coerce
instance FromJSON ActionLabels where
parseJSON
= withObject "ActionLabels"
(\ o -> ActionLabels' <$> (parseJSONObject o))
instance ToJSON ActionLabels where
toJSON = toJSON . _alAddtional
newtype StatusDetailsItem = StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem'
{ _sdiAddtional = _Coerce # pSdiAddtional_
}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data Network = Network'
{ _nUsePrivateAddress :: !(Maybe Bool)
, _nName :: !(Maybe Text)
, _nSubnetwork :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
network
:: Network
network =
Network'
{ _nUsePrivateAddress = Nothing
, _nName = Nothing
, _nSubnetwork = Nothing
}
nUsePrivateAddress :: Lens' Network (Maybe Bool)
nUsePrivateAddress
= lens _nUsePrivateAddress
(\ s a -> s{_nUsePrivateAddress = a})
nName :: Lens' Network (Maybe Text)
nName = lens _nName (\ s a -> s{_nName = a})
nSubnetwork :: Lens' Network (Maybe Text)
nSubnetwork
= lens _nSubnetwork (\ s a -> s{_nSubnetwork = a})
instance FromJSON Network where
parseJSON
= withObject "Network"
(\ o ->
Network' <$>
(o .:? "usePrivateAddress") <*> (o .:? "name") <*>
(o .:? "subnetwork"))
instance ToJSON Network where
toJSON Network'{..}
= object
(catMaybes
[("usePrivateAddress" .=) <$> _nUsePrivateAddress,
("name" .=) <$> _nName,
("subnetwork" .=) <$> _nSubnetwork])
newtype EventDetails = EventDetails'
{ _edAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
eventDetails
:: HashMap Text JSONValue
-> EventDetails
eventDetails pEdAddtional_ =
EventDetails'
{ _edAddtional = _Coerce # pEdAddtional_
}
edAddtional :: Lens' EventDetails (HashMap Text JSONValue)
edAddtional
= lens _edAddtional (\ s a -> s{_edAddtional = a}) .
_Coerce
instance FromJSON EventDetails where
parseJSON
= withObject "EventDetails"
(\ o -> EventDetails' <$> (parseJSONObject o))
instance ToJSON EventDetails where
toJSON = toJSON . _edAddtional
data Action = Action'
{ _aCommands :: !(Maybe [Text])
, _aFlags :: !(Maybe [Text])
, _aEnvironment :: !(Maybe ActionEnvironment)
, _aCredentials :: !(Maybe Secret)
, _aEntrypoint :: !(Maybe Text)
, _aPortMAppings :: !(Maybe ActionPortMAppings)
, _aMounts :: !(Maybe [Mount])
, _aImageURI :: !(Maybe Text)
, _aName :: !(Maybe Text)
, _aLabels :: !(Maybe ActionLabels)
, _aTimeout :: !(Maybe GDuration)
, _aPidNamespace :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
action
:: Action
action =
Action'
{ _aCommands = Nothing
, _aFlags = Nothing
, _aEnvironment = Nothing
, _aCredentials = Nothing
, _aEntrypoint = Nothing
, _aPortMAppings = Nothing
, _aMounts = Nothing
, _aImageURI = Nothing
, _aName = Nothing
, _aLabels = Nothing
, _aTimeout = Nothing
, _aPidNamespace = Nothing
}
aCommands :: Lens' Action [Text]
aCommands
= lens _aCommands (\ s a -> s{_aCommands = a}) .
_Default
. _Coerce
aFlags :: Lens' Action [Text]
aFlags
= lens _aFlags (\ s a -> s{_aFlags = a}) . _Default .
_Coerce
aEnvironment :: Lens' Action (Maybe ActionEnvironment)
aEnvironment
= lens _aEnvironment (\ s a -> s{_aEnvironment = a})
aCredentials :: Lens' Action (Maybe Secret)
aCredentials
= lens _aCredentials (\ s a -> s{_aCredentials = a})
aEntrypoint :: Lens' Action (Maybe Text)
aEntrypoint
= lens _aEntrypoint (\ s a -> s{_aEntrypoint = a})
aPortMAppings :: Lens' Action (Maybe ActionPortMAppings)
aPortMAppings
= lens _aPortMAppings
(\ s a -> s{_aPortMAppings = a})
aMounts :: Lens' Action [Mount]
aMounts
= lens _aMounts (\ s a -> s{_aMounts = a}) . _Default
. _Coerce
aImageURI :: Lens' Action (Maybe Text)
aImageURI
= lens _aImageURI (\ s a -> s{_aImageURI = a})
aName :: Lens' Action (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a})
aLabels :: Lens' Action (Maybe ActionLabels)
aLabels = lens _aLabels (\ s a -> s{_aLabels = a})
aTimeout :: Lens' Action (Maybe Scientific)
aTimeout
= lens _aTimeout (\ s a -> s{_aTimeout = a}) .
mapping _GDuration
aPidNamespace :: Lens' Action (Maybe Text)
aPidNamespace
= lens _aPidNamespace
(\ s a -> s{_aPidNamespace = a})
instance FromJSON Action where
parseJSON
= withObject "Action"
(\ o ->
Action' <$>
(o .:? "commands" .!= mempty) <*>
(o .:? "flags" .!= mempty)
<*> (o .:? "environment")
<*> (o .:? "credentials")
<*> (o .:? "entrypoint")
<*> (o .:? "portMappings")
<*> (o .:? "mounts" .!= mempty)
<*> (o .:? "imageUri")
<*> (o .:? "name")
<*> (o .:? "labels")
<*> (o .:? "timeout")
<*> (o .:? "pidNamespace"))
instance ToJSON Action where
toJSON Action'{..}
= object
(catMaybes
[("commands" .=) <$> _aCommands,
("flags" .=) <$> _aFlags,
("environment" .=) <$> _aEnvironment,
("credentials" .=) <$> _aCredentials,
("entrypoint" .=) <$> _aEntrypoint,
("portMappings" .=) <$> _aPortMAppings,
("mounts" .=) <$> _aMounts,
("imageUri" .=) <$> _aImageURI,
("name" .=) <$> _aName, ("labels" .=) <$> _aLabels,
("timeout" .=) <$> _aTimeout,
("pidNamespace" .=) <$> _aPidNamespace])
data Secret = Secret'
{ _sKeyName :: !(Maybe Text)
, _sCipherText :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
secret
:: Secret
secret =
Secret'
{ _sKeyName = Nothing
, _sCipherText = Nothing
}
sKeyName :: Lens' Secret (Maybe Text)
sKeyName = lens _sKeyName (\ s a -> s{_sKeyName = a})
sCipherText :: Lens' Secret (Maybe Text)
sCipherText
= lens _sCipherText (\ s a -> s{_sCipherText = a})
instance FromJSON Secret where
parseJSON
= withObject "Secret"
(\ o ->
Secret' <$>
(o .:? "keyName") <*> (o .:? "cipherText"))
instance ToJSON Secret where
toJSON Secret'{..}
= object
(catMaybes
[("keyName" .=) <$> _sKeyName,
("cipherText" .=) <$> _sCipherText])
newtype WorkerStatusAttachedDisks = WorkerStatusAttachedDisks'
{ _wsadAddtional :: HashMap Text DiskStatus
} deriving (Eq,Show,Data,Typeable,Generic)
workerStatusAttachedDisks
:: HashMap Text DiskStatus
-> WorkerStatusAttachedDisks
workerStatusAttachedDisks pWsadAddtional_ =
WorkerStatusAttachedDisks'
{ _wsadAddtional = _Coerce # pWsadAddtional_
}
wsadAddtional :: Lens' WorkerStatusAttachedDisks (HashMap Text DiskStatus)
wsadAddtional
= lens _wsadAddtional
(\ s a -> s{_wsadAddtional = a})
. _Coerce
instance FromJSON WorkerStatusAttachedDisks where
parseJSON
= withObject "WorkerStatusAttachedDisks"
(\ o ->
WorkerStatusAttachedDisks' <$> (parseJSONObject o))
instance ToJSON WorkerStatusAttachedDisks where
toJSON = toJSON . _wsadAddtional
newtype OperationMetadataRequest = OperationMetadataRequest'
{ _omrAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadataRequest
:: HashMap Text JSONValue
-> OperationMetadataRequest
operationMetadataRequest pOmrAddtional_ =
OperationMetadataRequest'
{ _omrAddtional = _Coerce # pOmrAddtional_
}
omrAddtional :: Lens' OperationMetadataRequest (HashMap Text JSONValue)
omrAddtional
= lens _omrAddtional (\ s a -> s{_omrAddtional = a})
. _Coerce
instance FromJSON OperationMetadataRequest where
parseJSON
= withObject "OperationMetadataRequest"
(\ o ->
OperationMetadataRequest' <$> (parseJSONObject o))
instance ToJSON OperationMetadataRequest where
toJSON = toJSON . _omrAddtional
data Resources = Resources'
{ _rZones :: !(Maybe [Text])
, _rRegions :: !(Maybe [Text])
, _rVirtualMachine :: !(Maybe VirtualMachine)
, _rProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
resources
:: Resources
resources =
Resources'
{ _rZones = Nothing
, _rRegions = Nothing
, _rVirtualMachine = Nothing
, _rProjectId = Nothing
}
rZones :: Lens' Resources [Text]
rZones
= lens _rZones (\ s a -> s{_rZones = a}) . _Default .
_Coerce
rRegions :: Lens' Resources [Text]
rRegions
= lens _rRegions (\ s a -> s{_rRegions = a}) .
_Default
. _Coerce
rVirtualMachine :: Lens' Resources (Maybe VirtualMachine)
rVirtualMachine
= lens _rVirtualMachine
(\ s a -> s{_rVirtualMachine = a})
rProjectId :: Lens' Resources (Maybe Text)
rProjectId
= lens _rProjectId (\ s a -> s{_rProjectId = a})
instance FromJSON Resources where
parseJSON
= withObject "Resources"
(\ o ->
Resources' <$>
(o .:? "zones" .!= mempty) <*>
(o .:? "regions" .!= mempty)
<*> (o .:? "virtualMachine")
<*> (o .:? "projectId"))
instance ToJSON Resources where
toJSON Resources'{..}
= object
(catMaybes
[("zones" .=) <$> _rZones,
("regions" .=) <$> _rRegions,
("virtualMachine" .=) <$> _rVirtualMachine,
("projectId" .=) <$> _rProjectId])
data DiskStatus = DiskStatus'
{ _dsTotalSpaceBytes :: !(Maybe (Textual Word64))
, _dsFreeSpaceBytes :: !(Maybe (Textual Word64))
} deriving (Eq,Show,Data,Typeable,Generic)
diskStatus
:: DiskStatus
diskStatus =
DiskStatus'
{ _dsTotalSpaceBytes = Nothing
, _dsFreeSpaceBytes = Nothing
}
dsTotalSpaceBytes :: Lens' DiskStatus (Maybe Word64)
dsTotalSpaceBytes
= lens _dsTotalSpaceBytes
(\ s a -> s{_dsTotalSpaceBytes = a})
. mapping _Coerce
dsFreeSpaceBytes :: Lens' DiskStatus (Maybe Word64)
dsFreeSpaceBytes
= lens _dsFreeSpaceBytes
(\ s a -> s{_dsFreeSpaceBytes = a})
. mapping _Coerce
instance FromJSON DiskStatus where
parseJSON
= withObject "DiskStatus"
(\ o ->
DiskStatus' <$>
(o .:? "totalSpaceBytes") <*>
(o .:? "freeSpaceBytes"))
instance ToJSON DiskStatus where
toJSON DiskStatus'{..}
= object
(catMaybes
[("totalSpaceBytes" .=) <$> _dsTotalSpaceBytes,
("freeSpaceBytes" .=) <$> _dsFreeSpaceBytes])
newtype VirtualMachineLabels = VirtualMachineLabels'
{ _vmlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
virtualMachineLabels
:: HashMap Text Text
-> VirtualMachineLabels
virtualMachineLabels pVmlAddtional_ =
VirtualMachineLabels'
{ _vmlAddtional = _Coerce # pVmlAddtional_
}
vmlAddtional :: Lens' VirtualMachineLabels (HashMap Text Text)
vmlAddtional
= lens _vmlAddtional (\ s a -> s{_vmlAddtional = a})
. _Coerce
instance FromJSON VirtualMachineLabels where
parseJSON
= withObject "VirtualMachineLabels"
(\ o ->
VirtualMachineLabels' <$> (parseJSONObject o))
instance ToJSON VirtualMachineLabels where
toJSON = toJSON . _vmlAddtional
newtype OperationMetadataRuntimeMetadata = OperationMetadataRuntimeMetadata'
{ _omrmAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadataRuntimeMetadata
:: HashMap Text JSONValue
-> OperationMetadataRuntimeMetadata
operationMetadataRuntimeMetadata pOmrmAddtional_ =
OperationMetadataRuntimeMetadata'
{ _omrmAddtional = _Coerce # pOmrmAddtional_
}
omrmAddtional :: Lens' OperationMetadataRuntimeMetadata (HashMap Text JSONValue)
omrmAddtional
= lens _omrmAddtional
(\ s a -> s{_omrmAddtional = a})
. _Coerce
instance FromJSON OperationMetadataRuntimeMetadata
where
parseJSON
= withObject "OperationMetadataRuntimeMetadata"
(\ o ->
OperationMetadataRuntimeMetadata' <$>
(parseJSONObject o))
instance ToJSON OperationMetadataRuntimeMetadata
where
toJSON = toJSON . _omrmAddtional
data VirtualMachine = VirtualMachine'
{ _vmNetwork :: !(Maybe Network)
, _vmCPUPlatform :: !(Maybe Text)
, _vmServiceAccount :: !(Maybe ServiceAccount)
, _vmAccelerators :: !(Maybe [Accelerator])
, _vmMachineType :: !(Maybe Text)
, _vmLabels :: !(Maybe VirtualMachineLabels)
, _vmBootDiskSizeGb :: !(Maybe (Textual Int32))
, _vmDisks :: !(Maybe [Disk])
, _vmBootImage :: !(Maybe Text)
, _vmNvidiaDriverVersion :: !(Maybe Text)
, _vmPreemptible :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
virtualMachine
:: VirtualMachine
virtualMachine =
VirtualMachine'
{ _vmNetwork = Nothing
, _vmCPUPlatform = Nothing
, _vmServiceAccount = Nothing
, _vmAccelerators = Nothing
, _vmMachineType = Nothing
, _vmLabels = Nothing
, _vmBootDiskSizeGb = Nothing
, _vmDisks = Nothing
, _vmBootImage = Nothing
, _vmNvidiaDriverVersion = Nothing
, _vmPreemptible = Nothing
}
vmNetwork :: Lens' VirtualMachine (Maybe Network)
vmNetwork
= lens _vmNetwork (\ s a -> s{_vmNetwork = a})
vmCPUPlatform :: Lens' VirtualMachine (Maybe Text)
vmCPUPlatform
= lens _vmCPUPlatform
(\ s a -> s{_vmCPUPlatform = a})
vmServiceAccount :: Lens' VirtualMachine (Maybe ServiceAccount)
vmServiceAccount
= lens _vmServiceAccount
(\ s a -> s{_vmServiceAccount = a})
vmAccelerators :: Lens' VirtualMachine [Accelerator]
vmAccelerators
= lens _vmAccelerators
(\ s a -> s{_vmAccelerators = a})
. _Default
. _Coerce
vmMachineType :: Lens' VirtualMachine (Maybe Text)
vmMachineType
= lens _vmMachineType
(\ s a -> s{_vmMachineType = a})
vmLabels :: Lens' VirtualMachine (Maybe VirtualMachineLabels)
vmLabels = lens _vmLabels (\ s a -> s{_vmLabels = a})
vmBootDiskSizeGb :: Lens' VirtualMachine (Maybe Int32)
vmBootDiskSizeGb
= lens _vmBootDiskSizeGb
(\ s a -> s{_vmBootDiskSizeGb = a})
. mapping _Coerce
vmDisks :: Lens' VirtualMachine [Disk]
vmDisks
= lens _vmDisks (\ s a -> s{_vmDisks = a}) . _Default
. _Coerce
vmBootImage :: Lens' VirtualMachine (Maybe Text)
vmBootImage
= lens _vmBootImage (\ s a -> s{_vmBootImage = a})
vmNvidiaDriverVersion :: Lens' VirtualMachine (Maybe Text)
vmNvidiaDriverVersion
= lens _vmNvidiaDriverVersion
(\ s a -> s{_vmNvidiaDriverVersion = a})
vmPreemptible :: Lens' VirtualMachine (Maybe Bool)
vmPreemptible
= lens _vmPreemptible
(\ s a -> s{_vmPreemptible = a})
instance FromJSON VirtualMachine where
parseJSON
= withObject "VirtualMachine"
(\ o ->
VirtualMachine' <$>
(o .:? "network") <*> (o .:? "cpuPlatform") <*>
(o .:? "serviceAccount")
<*> (o .:? "accelerators" .!= mempty)
<*> (o .:? "machineType")
<*> (o .:? "labels")
<*> (o .:? "bootDiskSizeGb")
<*> (o .:? "disks" .!= mempty)
<*> (o .:? "bootImage")
<*> (o .:? "nvidiaDriverVersion")
<*> (o .:? "preemptible"))
instance ToJSON VirtualMachine where
toJSON VirtualMachine'{..}
= object
(catMaybes
[("network" .=) <$> _vmNetwork,
("cpuPlatform" .=) <$> _vmCPUPlatform,
("serviceAccount" .=) <$> _vmServiceAccount,
("accelerators" .=) <$> _vmAccelerators,
("machineType" .=) <$> _vmMachineType,
("labels" .=) <$> _vmLabels,
("bootDiskSizeGb" .=) <$> _vmBootDiskSizeGb,
("disks" .=) <$> _vmDisks,
("bootImage" .=) <$> _vmBootImage,
("nvidiaDriverVersion" .=) <$>
_vmNvidiaDriverVersion,
("preemptible" .=) <$> _vmPreemptible])
data ServiceAccount = ServiceAccount'
{ _saEmail :: !(Maybe Text)
, _saScopes :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
serviceAccount
:: ServiceAccount
serviceAccount =
ServiceAccount'
{ _saEmail = Nothing
, _saScopes = Nothing
}
saEmail :: Lens' ServiceAccount (Maybe Text)
saEmail = lens _saEmail (\ s a -> s{_saEmail = a})
saScopes :: Lens' ServiceAccount [Text]
saScopes
= lens _saScopes (\ s a -> s{_saScopes = a}) .
_Default
. _Coerce
instance FromJSON ServiceAccount where
parseJSON
= withObject "ServiceAccount"
(\ o ->
ServiceAccount' <$>
(o .:? "email") <*> (o .:? "scopes" .!= mempty))
instance ToJSON ServiceAccount where
toJSON ServiceAccount'{..}
= object
(catMaybes
[("email" .=) <$> _saEmail,
("scopes" .=) <$> _saScopes])
newtype CheckInResponseMetadata = CheckInResponseMetadata'
{ _cirmAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
checkInResponseMetadata
:: HashMap Text JSONValue
-> CheckInResponseMetadata
checkInResponseMetadata pCirmAddtional_ =
CheckInResponseMetadata'
{ _cirmAddtional = _Coerce # pCirmAddtional_
}
cirmAddtional :: Lens' CheckInResponseMetadata (HashMap Text JSONValue)
cirmAddtional
= lens _cirmAddtional
(\ s a -> s{_cirmAddtional = a})
. _Coerce
instance FromJSON CheckInResponseMetadata where
parseJSON
= withObject "CheckInResponseMetadata"
(\ o ->
CheckInResponseMetadata' <$> (parseJSONObject o))
instance ToJSON CheckInResponseMetadata where
toJSON = toJSON . _cirmAddtional
data Accelerator = Accelerator'
{ _aCount :: !(Maybe (Textual Int64))
, _aType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
accelerator
:: Accelerator
accelerator =
Accelerator'
{ _aCount = Nothing
, _aType = Nothing
}
aCount :: Lens' Accelerator (Maybe Int64)
aCount
= lens _aCount (\ s a -> s{_aCount = a}) .
mapping _Coerce
aType :: Lens' Accelerator (Maybe Text)
aType = lens _aType (\ s a -> s{_aType = a})
instance FromJSON Accelerator where
parseJSON
= withObject "Accelerator"
(\ o ->
Accelerator' <$> (o .:? "count") <*> (o .:? "type"))
instance ToJSON Accelerator where
toJSON Accelerator'{..}
= object
(catMaybes
[("count" .=) <$> _aCount, ("type" .=) <$> _aType])
newtype PipelineEnvironment = PipelineEnvironment'
{ _peAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
pipelineEnvironment
:: HashMap Text Text
-> PipelineEnvironment
pipelineEnvironment pPeAddtional_ =
PipelineEnvironment'
{ _peAddtional = _Coerce # pPeAddtional_
}
peAddtional :: Lens' PipelineEnvironment (HashMap Text Text)
peAddtional
= lens _peAddtional (\ s a -> s{_peAddtional = a}) .
_Coerce
instance FromJSON PipelineEnvironment where
parseJSON
= withObject "PipelineEnvironment"
(\ o -> PipelineEnvironment' <$> (parseJSONObject o))
instance ToJSON PipelineEnvironment where
toJSON = toJSON . _peAddtional
data WorkerReleasedEvent = WorkerReleasedEvent'
{ _wreZone :: !(Maybe Text)
, _wreInstance :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
workerReleasedEvent
:: WorkerReleasedEvent
workerReleasedEvent =
WorkerReleasedEvent'
{ _wreZone = Nothing
, _wreInstance = Nothing
}
wreZone :: Lens' WorkerReleasedEvent (Maybe Text)
wreZone = lens _wreZone (\ s a -> s{_wreZone = a})
wreInstance :: Lens' WorkerReleasedEvent (Maybe Text)
wreInstance
= lens _wreInstance (\ s a -> s{_wreInstance = a})
instance FromJSON WorkerReleasedEvent where
parseJSON
= withObject "WorkerReleasedEvent"
(\ o ->
WorkerReleasedEvent' <$>
(o .:? "zone") <*> (o .:? "instance"))
instance ToJSON WorkerReleasedEvent where
toJSON WorkerReleasedEvent'{..}
= object
(catMaybes
[("zone" .=) <$> _wreZone,
("instance" .=) <$> _wreInstance])
data ContainerStartedEvent = ContainerStartedEvent'
{ _cIPAddress :: !(Maybe Text)
, _cActionId :: !(Maybe (Textual Int32))
, _cPortMAppings :: !(Maybe ContainerStartedEventPortMAppings)
} deriving (Eq,Show,Data,Typeable,Generic)
containerStartedEvent
:: ContainerStartedEvent
containerStartedEvent =
ContainerStartedEvent'
{ _cIPAddress = Nothing
, _cActionId = Nothing
, _cPortMAppings = Nothing
}
cIPAddress :: Lens' ContainerStartedEvent (Maybe Text)
cIPAddress
= lens _cIPAddress (\ s a -> s{_cIPAddress = a})
cActionId :: Lens' ContainerStartedEvent (Maybe Int32)
cActionId
= lens _cActionId (\ s a -> s{_cActionId = a}) .
mapping _Coerce
cPortMAppings :: Lens' ContainerStartedEvent (Maybe ContainerStartedEventPortMAppings)
cPortMAppings
= lens _cPortMAppings
(\ s a -> s{_cPortMAppings = a})
instance FromJSON ContainerStartedEvent where
parseJSON
= withObject "ContainerStartedEvent"
(\ o ->
ContainerStartedEvent' <$>
(o .:? "ipAddress") <*> (o .:? "actionId") <*>
(o .:? "portMappings"))
instance ToJSON ContainerStartedEvent where
toJSON ContainerStartedEvent'{..}
= object
(catMaybes
[("ipAddress" .=) <$> _cIPAddress,
("actionId" .=) <$> _cActionId,
("portMappings" .=) <$> _cPortMAppings])
data RunPipelineRequest = RunPipelineRequest'
{ _rprPipeline :: !(Maybe Pipeline)
, _rprLabels :: !(Maybe RunPipelineRequestLabels)
} deriving (Eq,Show,Data,Typeable,Generic)
runPipelineRequest
:: RunPipelineRequest
runPipelineRequest =
RunPipelineRequest'
{ _rprPipeline = Nothing
, _rprLabels = Nothing
}
rprPipeline :: Lens' RunPipelineRequest (Maybe Pipeline)
rprPipeline
= lens _rprPipeline (\ s a -> s{_rprPipeline = a})
rprLabels :: Lens' RunPipelineRequest (Maybe RunPipelineRequestLabels)
rprLabels
= lens _rprLabels (\ s a -> s{_rprLabels = a})
instance FromJSON RunPipelineRequest where
parseJSON
= withObject "RunPipelineRequest"
(\ o ->
RunPipelineRequest' <$>
(o .:? "pipeline") <*> (o .:? "labels"))
instance ToJSON RunPipelineRequest where
toJSON RunPipelineRequest'{..}
= object
(catMaybes
[("pipeline" .=) <$> _rprPipeline,
("labels" .=) <$> _rprLabels])
data Pipeline = Pipeline'
{ _pActions :: !(Maybe [Action])
, _pEnvironment :: !(Maybe PipelineEnvironment)
, _pResources :: !(Maybe Resources)
, _pTimeout :: !(Maybe GDuration)
} deriving (Eq,Show,Data,Typeable,Generic)
pipeline
:: Pipeline
pipeline =
Pipeline'
{ _pActions = Nothing
, _pEnvironment = Nothing
, _pResources = Nothing
, _pTimeout = Nothing
}
pActions :: Lens' Pipeline [Action]
pActions
= lens _pActions (\ s a -> s{_pActions = a}) .
_Default
. _Coerce
pEnvironment :: Lens' Pipeline (Maybe PipelineEnvironment)
pEnvironment
= lens _pEnvironment (\ s a -> s{_pEnvironment = a})
pResources :: Lens' Pipeline (Maybe Resources)
pResources
= lens _pResources (\ s a -> s{_pResources = a})
pTimeout :: Lens' Pipeline (Maybe Scientific)
pTimeout
= lens _pTimeout (\ s a -> s{_pTimeout = a}) .
mapping _GDuration
instance FromJSON Pipeline where
parseJSON
= withObject "Pipeline"
(\ o ->
Pipeline' <$>
(o .:? "actions" .!= mempty) <*>
(o .:? "environment")
<*> (o .:? "resources")
<*> (o .:? "timeout"))
instance ToJSON Pipeline where
toJSON Pipeline'{..}
= object
(catMaybes
[("actions" .=) <$> _pActions,
("environment" .=) <$> _pEnvironment,
("resources" .=) <$> _pResources,
("timeout" .=) <$> _pTimeout])
newtype ImportVariantsResponse = ImportVariantsResponse'
{ _ivrCallSetIds :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
importVariantsResponse
:: ImportVariantsResponse
importVariantsResponse =
ImportVariantsResponse'
{ _ivrCallSetIds = Nothing
}
ivrCallSetIds :: Lens' ImportVariantsResponse [Text]
ivrCallSetIds
= lens _ivrCallSetIds
(\ s a -> s{_ivrCallSetIds = a})
. _Default
. _Coerce
instance FromJSON ImportVariantsResponse where
parseJSON
= withObject "ImportVariantsResponse"
(\ o ->
ImportVariantsResponse' <$>
(o .:? "callSetIds" .!= mempty))
instance ToJSON ImportVariantsResponse where
toJSON ImportVariantsResponse'{..}
= object
(catMaybes [("callSetIds" .=) <$> _ivrCallSetIds])
newtype ImportReadGroupSetsResponse = ImportReadGroupSetsResponse'
{ _irgsrReadGroupSetIds :: Maybe [Text]
} deriving (Eq,Show,Data,Typeable,Generic)
importReadGroupSetsResponse
:: ImportReadGroupSetsResponse
importReadGroupSetsResponse =
ImportReadGroupSetsResponse'
{ _irgsrReadGroupSetIds = Nothing
}
irgsrReadGroupSetIds :: Lens' ImportReadGroupSetsResponse [Text]
irgsrReadGroupSetIds
= lens _irgsrReadGroupSetIds
(\ s a -> s{_irgsrReadGroupSetIds = a})
. _Default
. _Coerce
instance FromJSON ImportReadGroupSetsResponse where
parseJSON
= withObject "ImportReadGroupSetsResponse"
(\ o ->
ImportReadGroupSetsResponse' <$>
(o .:? "readGroupSetIds" .!= mempty))
instance ToJSON ImportReadGroupSetsResponse where
toJSON ImportReadGroupSetsResponse'{..}
= object
(catMaybes
[("readGroupSetIds" .=) <$> _irgsrReadGroupSetIds])
data Metadata = Metadata'
{ _mStartTime :: !(Maybe DateTime')
, _mEvents :: !(Maybe [Event])
, _mEndTime :: !(Maybe DateTime')
, _mPipeline :: !(Maybe Pipeline)
, _mLabels :: !(Maybe MetadataLabels)
, _mCreateTime :: !(Maybe DateTime')
} deriving (Eq,Show,Data,Typeable,Generic)
metadata
:: Metadata
metadata =
Metadata'
{ _mStartTime = Nothing
, _mEvents = Nothing
, _mEndTime = Nothing
, _mPipeline = Nothing
, _mLabels = Nothing
, _mCreateTime = Nothing
}
mStartTime :: Lens' Metadata (Maybe UTCTime)
mStartTime
= lens _mStartTime (\ s a -> s{_mStartTime = a}) .
mapping _DateTime
mEvents :: Lens' Metadata [Event]
mEvents
= lens _mEvents (\ s a -> s{_mEvents = a}) . _Default
. _Coerce
mEndTime :: Lens' Metadata (Maybe UTCTime)
mEndTime
= lens _mEndTime (\ s a -> s{_mEndTime = a}) .
mapping _DateTime
mPipeline :: Lens' Metadata (Maybe Pipeline)
mPipeline
= lens _mPipeline (\ s a -> s{_mPipeline = a})
mLabels :: Lens' Metadata (Maybe MetadataLabels)
mLabels = lens _mLabels (\ s a -> s{_mLabels = a})
mCreateTime :: Lens' Metadata (Maybe UTCTime)
mCreateTime
= lens _mCreateTime (\ s a -> s{_mCreateTime = a}) .
mapping _DateTime
instance FromJSON Metadata where
parseJSON
= withObject "Metadata"
(\ o ->
Metadata' <$>
(o .:? "startTime") <*> (o .:? "events" .!= mempty)
<*> (o .:? "endTime")
<*> (o .:? "pipeline")
<*> (o .:? "labels")
<*> (o .:? "createTime"))
instance ToJSON Metadata where
toJSON Metadata'{..}
= object
(catMaybes
[("startTime" .=) <$> _mStartTime,
("events" .=) <$> _mEvents,
("endTime" .=) <$> _mEndTime,
("pipeline" .=) <$> _mPipeline,
("labels" .=) <$> _mLabels,
("createTime" .=) <$> _mCreateTime])
data Mount = Mount'
{ _mPath :: !(Maybe Text)
, _mDisk :: !(Maybe Text)
, _mReadOnly :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
mount
:: Mount
mount =
Mount'
{ _mPath = Nothing
, _mDisk = Nothing
, _mReadOnly = Nothing
}
mPath :: Lens' Mount (Maybe Text)
mPath = lens _mPath (\ s a -> s{_mPath = a})
mDisk :: Lens' Mount (Maybe Text)
mDisk = lens _mDisk (\ s a -> s{_mDisk = a})
mReadOnly :: Lens' Mount (Maybe Bool)
mReadOnly
= lens _mReadOnly (\ s a -> s{_mReadOnly = a})
instance FromJSON Mount where
parseJSON
= withObject "Mount"
(\ o ->
Mount' <$>
(o .:? "path") <*> (o .:? "disk") <*>
(o .:? "readOnly"))
instance ToJSON Mount where
toJSON Mount'{..}
= object
(catMaybes
[("path" .=) <$> _mPath, ("disk" .=) <$> _mDisk,
("readOnly" .=) <$> _mReadOnly])
newtype PullStartedEvent = PullStartedEvent'
{ _pImageURI :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
pullStartedEvent
:: PullStartedEvent
pullStartedEvent =
PullStartedEvent'
{ _pImageURI = Nothing
}
pImageURI :: Lens' PullStartedEvent (Maybe Text)
pImageURI
= lens _pImageURI (\ s a -> s{_pImageURI = a})
instance FromJSON PullStartedEvent where
parseJSON
= withObject "PullStartedEvent"
(\ o -> PullStartedEvent' <$> (o .:? "imageUri"))
instance ToJSON PullStartedEvent where
toJSON PullStartedEvent'{..}
= object (catMaybes [("imageUri" .=) <$> _pImageURI])
data RunPipelineResponse =
RunPipelineResponse'
deriving (Eq,Show,Data,Typeable,Generic)
runPipelineResponse
:: RunPipelineResponse
runPipelineResponse = RunPipelineResponse'
instance FromJSON RunPipelineResponse where
parseJSON
= withObject "RunPipelineResponse"
(\ o -> pure RunPipelineResponse')
instance ToJSON RunPipelineResponse where
toJSON = const emptyObject
data OperationMetadata = OperationMetadata'
{ _omClientId :: !(Maybe Text)
, _omStartTime :: !(Maybe DateTime')
, _omEvents :: !(Maybe [OperationEvent])
, _omEndTime :: !(Maybe DateTime')
, _omLabels :: !(Maybe OperationMetadataLabels)
, _omProjectId :: !(Maybe Text)
, _omCreateTime :: !(Maybe DateTime')
, _omRuntimeMetadata :: !(Maybe OperationMetadataRuntimeMetadata)
, _omRequest :: !(Maybe OperationMetadataRequest)
} deriving (Eq,Show,Data,Typeable,Generic)
operationMetadata
:: OperationMetadata
operationMetadata =
OperationMetadata'
{ _omClientId = Nothing
, _omStartTime = Nothing
, _omEvents = Nothing
, _omEndTime = Nothing
, _omLabels = Nothing
, _omProjectId = Nothing
, _omCreateTime = Nothing
, _omRuntimeMetadata = Nothing
, _omRequest = Nothing
}
omClientId :: Lens' OperationMetadata (Maybe Text)
omClientId
= lens _omClientId (\ s a -> s{_omClientId = a})
omStartTime :: Lens' OperationMetadata (Maybe UTCTime)
omStartTime
= lens _omStartTime (\ s a -> s{_omStartTime = a}) .
mapping _DateTime
omEvents :: Lens' OperationMetadata [OperationEvent]
omEvents
= lens _omEvents (\ s a -> s{_omEvents = a}) .
_Default
. _Coerce
omEndTime :: Lens' OperationMetadata (Maybe UTCTime)
omEndTime
= lens _omEndTime (\ s a -> s{_omEndTime = a}) .
mapping _DateTime
omLabels :: Lens' OperationMetadata (Maybe OperationMetadataLabels)
omLabels = lens _omLabels (\ s a -> s{_omLabels = a})
omProjectId :: Lens' OperationMetadata (Maybe Text)
omProjectId
= lens _omProjectId (\ s a -> s{_omProjectId = a})
omCreateTime :: Lens' OperationMetadata (Maybe UTCTime)
omCreateTime
= lens _omCreateTime (\ s a -> s{_omCreateTime = a})
. mapping _DateTime
omRuntimeMetadata :: Lens' OperationMetadata (Maybe OperationMetadataRuntimeMetadata)
omRuntimeMetadata
= lens _omRuntimeMetadata
(\ s a -> s{_omRuntimeMetadata = a})
omRequest :: Lens' OperationMetadata (Maybe OperationMetadataRequest)
omRequest
= lens _omRequest (\ s a -> s{_omRequest = a})
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o ->
OperationMetadata' <$>
(o .:? "clientId") <*> (o .:? "startTime") <*>
(o .:? "events" .!= mempty)
<*> (o .:? "endTime")
<*> (o .:? "labels")
<*> (o .:? "projectId")
<*> (o .:? "createTime")
<*> (o .:? "runtimeMetadata")
<*> (o .:? "request"))
instance ToJSON OperationMetadata where
toJSON OperationMetadata'{..}
= object
(catMaybes
[("clientId" .=) <$> _omClientId,
("startTime" .=) <$> _omStartTime,
("events" .=) <$> _omEvents,
("endTime" .=) <$> _omEndTime,
("labels" .=) <$> _omLabels,
("projectId" .=) <$> _omProjectId,
("createTime" .=) <$> _omCreateTime,
("runtimeMetadata" .=) <$> _omRuntimeMetadata,
("request" .=) <$> _omRequest])
newtype ActionEnvironment = ActionEnvironment'
{ _aeAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
actionEnvironment
:: HashMap Text Text
-> ActionEnvironment
actionEnvironment pAeAddtional_ =
ActionEnvironment'
{ _aeAddtional = _Coerce # pAeAddtional_
}
aeAddtional :: Lens' ActionEnvironment (HashMap Text Text)
aeAddtional
= lens _aeAddtional (\ s a -> s{_aeAddtional = a}) .
_Coerce
instance FromJSON ActionEnvironment where
parseJSON
= withObject "ActionEnvironment"
(\ o -> ActionEnvironment' <$> (parseJSONObject o))
instance ToJSON ActionEnvironment where
toJSON = toJSON . _aeAddtional
data ComputeEngine = ComputeEngine'
{ _ceZone :: !(Maybe Text)
, _ceDiskNames :: !(Maybe [Text])
, _ceMachineType :: !(Maybe Text)
, _ceInstanceName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
computeEngine
:: ComputeEngine
computeEngine =
ComputeEngine'
{ _ceZone = Nothing
, _ceDiskNames = Nothing
, _ceMachineType = Nothing
, _ceInstanceName = Nothing
}
ceZone :: Lens' ComputeEngine (Maybe Text)
ceZone = lens _ceZone (\ s a -> s{_ceZone = a})
ceDiskNames :: Lens' ComputeEngine [Text]
ceDiskNames
= lens _ceDiskNames (\ s a -> s{_ceDiskNames = a}) .
_Default
. _Coerce
ceMachineType :: Lens' ComputeEngine (Maybe Text)
ceMachineType
= lens _ceMachineType
(\ s a -> s{_ceMachineType = a})
ceInstanceName :: Lens' ComputeEngine (Maybe Text)
ceInstanceName
= lens _ceInstanceName
(\ s a -> s{_ceInstanceName = a})
instance FromJSON ComputeEngine where
parseJSON
= withObject "ComputeEngine"
(\ o ->
ComputeEngine' <$>
(o .:? "zone") <*> (o .:? "diskNames" .!= mempty) <*>
(o .:? "machineType")
<*> (o .:? "instanceName"))
instance ToJSON ComputeEngine where
toJSON ComputeEngine'{..}
= object
(catMaybes
[("zone" .=) <$> _ceZone,
("diskNames" .=) <$> _ceDiskNames,
("machineType" .=) <$> _ceMachineType,
("instanceName" .=) <$> _ceInstanceName])
newtype OperationResponse = OperationResponse'
{ _orAddtional :: HashMap Text JSONValue
} deriving (Eq,Show,Data,Typeable,Generic)
operationResponse
:: HashMap Text JSONValue
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse'
{ _orAddtional = _Coerce # pOrAddtional_
}
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
orAddtional
= lens _orAddtional (\ s a -> s{_orAddtional = a}) .
_Coerce
instance FromJSON OperationResponse where
parseJSON
= withObject "OperationResponse"
(\ o -> OperationResponse' <$> (parseJSONObject o))
instance ToJSON OperationResponse where
toJSON = toJSON . _orAddtional
data OperationEvent = OperationEvent'
{ _oeStartTime :: !(Maybe DateTime')
, _oeEndTime :: !(Maybe DateTime')
, _oeDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationEvent
:: OperationEvent
operationEvent =
OperationEvent'
{ _oeStartTime = Nothing
, _oeEndTime = Nothing
, _oeDescription = Nothing
}
oeStartTime :: Lens' OperationEvent (Maybe UTCTime)
oeStartTime
= lens _oeStartTime (\ s a -> s{_oeStartTime = a}) .
mapping _DateTime
oeEndTime :: Lens' OperationEvent (Maybe UTCTime)
oeEndTime
= lens _oeEndTime (\ s a -> s{_oeEndTime = a}) .
mapping _DateTime
oeDescription :: Lens' OperationEvent (Maybe Text)
oeDescription
= lens _oeDescription
(\ s a -> s{_oeDescription = a})
instance FromJSON OperationEvent where
parseJSON
= withObject "OperationEvent"
(\ o ->
OperationEvent' <$>
(o .:? "startTime") <*> (o .:? "endTime") <*>
(o .:? "description"))
instance ToJSON OperationEvent where
toJSON OperationEvent'{..}
= object
(catMaybes
[("startTime" .=) <$> _oeStartTime,
("endTime" .=) <$> _oeEndTime,
("description" .=) <$> _oeDescription])
newtype RuntimeMetadata = RuntimeMetadata'
{ _rmComputeEngine :: Maybe ComputeEngine
} deriving (Eq,Show,Data,Typeable,Generic)
runtimeMetadata
:: RuntimeMetadata
runtimeMetadata =
RuntimeMetadata'
{ _rmComputeEngine = Nothing
}
rmComputeEngine :: Lens' RuntimeMetadata (Maybe ComputeEngine)
rmComputeEngine
= lens _rmComputeEngine
(\ s a -> s{_rmComputeEngine = a})
instance FromJSON RuntimeMetadata where
parseJSON
= withObject "RuntimeMetadata"
(\ o -> RuntimeMetadata' <$> (o .:? "computeEngine"))
instance ToJSON RuntimeMetadata where
toJSON RuntimeMetadata'{..}
= object
(catMaybes
[("computeEngine" .=) <$> _rmComputeEngine])