module Network.Google.ReplicaPoolUpdater.Types.Product where
import Network.Google.Prelude
import Network.Google.ReplicaPoolUpdater.Types.Sum
data OperationWarningsItemDataItem = OperationWarningsItemDataItem'
{ _owidiValue :: !(Maybe Text)
, _owidiKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationWarningsItemDataItem
:: OperationWarningsItemDataItem
operationWarningsItemDataItem =
OperationWarningsItemDataItem'
{ _owidiValue = Nothing
, _owidiKey = Nothing
}
owidiValue :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiValue
= lens _owidiValue (\ s a -> s{_owidiValue = a})
owidiKey :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiKey = lens _owidiKey (\ s a -> s{_owidiKey = a})
instance FromJSON OperationWarningsItemDataItem where
parseJSON
= withObject "OperationWarningsItemDataItem"
(\ o ->
OperationWarningsItemDataItem' <$>
(o .:? "value") <*> (o .:? "key"))
instance ToJSON OperationWarningsItemDataItem where
toJSON OperationWarningsItemDataItem'{..}
= object
(catMaybes
[("value" .=) <$> _owidiValue,
("key" .=) <$> _owidiKey])
data RollingUpdate = RollingUpdate'
{ _ruStatus :: !(Maybe Text)
, _ruProgress :: !(Maybe (Textual Int32))
, _ruInstanceGroupManager :: !(Maybe Text)
, _ruKind :: !Text
, _ruError :: !(Maybe RollingUpdateError)
, _ruInstanceTemplate :: !(Maybe Text)
, _ruUser :: !(Maybe Text)
, _ruSelfLink :: !(Maybe Text)
, _ruStatusMessage :: !(Maybe Text)
, _ruCreationTimestamp :: !(Maybe Text)
, _ruId :: !(Maybe Text)
, _ruPolicy :: !(Maybe RollingUpdatePolicy)
, _ruActionType :: !(Maybe Text)
, _ruOldInstanceTemplate :: !(Maybe Text)
, _ruDescription :: !(Maybe Text)
, _ruInstanceGroup :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
rollingUpdate
:: RollingUpdate
rollingUpdate =
RollingUpdate'
{ _ruStatus = Nothing
, _ruProgress = Nothing
, _ruInstanceGroupManager = Nothing
, _ruKind = "replicapoolupdater#rollingUpdate"
, _ruError = Nothing
, _ruInstanceTemplate = Nothing
, _ruUser = Nothing
, _ruSelfLink = Nothing
, _ruStatusMessage = Nothing
, _ruCreationTimestamp = Nothing
, _ruId = Nothing
, _ruPolicy = Nothing
, _ruActionType = Nothing
, _ruOldInstanceTemplate = Nothing
, _ruDescription = Nothing
, _ruInstanceGroup = Nothing
}
ruStatus :: Lens' RollingUpdate (Maybe Text)
ruStatus = lens _ruStatus (\ s a -> s{_ruStatus = a})
ruProgress :: Lens' RollingUpdate (Maybe Int32)
ruProgress
= lens _ruProgress (\ s a -> s{_ruProgress = a}) .
mapping _Coerce
ruInstanceGroupManager :: Lens' RollingUpdate (Maybe Text)
ruInstanceGroupManager
= lens _ruInstanceGroupManager
(\ s a -> s{_ruInstanceGroupManager = a})
ruKind :: Lens' RollingUpdate Text
ruKind = lens _ruKind (\ s a -> s{_ruKind = a})
ruError :: Lens' RollingUpdate (Maybe RollingUpdateError)
ruError = lens _ruError (\ s a -> s{_ruError = a})
ruInstanceTemplate :: Lens' RollingUpdate (Maybe Text)
ruInstanceTemplate
= lens _ruInstanceTemplate
(\ s a -> s{_ruInstanceTemplate = a})
ruUser :: Lens' RollingUpdate (Maybe Text)
ruUser = lens _ruUser (\ s a -> s{_ruUser = a})
ruSelfLink :: Lens' RollingUpdate (Maybe Text)
ruSelfLink
= lens _ruSelfLink (\ s a -> s{_ruSelfLink = a})
ruStatusMessage :: Lens' RollingUpdate (Maybe Text)
ruStatusMessage
= lens _ruStatusMessage
(\ s a -> s{_ruStatusMessage = a})
ruCreationTimestamp :: Lens' RollingUpdate (Maybe Text)
ruCreationTimestamp
= lens _ruCreationTimestamp
(\ s a -> s{_ruCreationTimestamp = a})
ruId :: Lens' RollingUpdate (Maybe Text)
ruId = lens _ruId (\ s a -> s{_ruId = a})
ruPolicy :: Lens' RollingUpdate (Maybe RollingUpdatePolicy)
ruPolicy = lens _ruPolicy (\ s a -> s{_ruPolicy = a})
ruActionType :: Lens' RollingUpdate (Maybe Text)
ruActionType
= lens _ruActionType (\ s a -> s{_ruActionType = a})
ruOldInstanceTemplate :: Lens' RollingUpdate (Maybe Text)
ruOldInstanceTemplate
= lens _ruOldInstanceTemplate
(\ s a -> s{_ruOldInstanceTemplate = a})
ruDescription :: Lens' RollingUpdate (Maybe Text)
ruDescription
= lens _ruDescription
(\ s a -> s{_ruDescription = a})
ruInstanceGroup :: Lens' RollingUpdate (Maybe Text)
ruInstanceGroup
= lens _ruInstanceGroup
(\ s a -> s{_ruInstanceGroup = a})
instance FromJSON RollingUpdate where
parseJSON
= withObject "RollingUpdate"
(\ o ->
RollingUpdate' <$>
(o .:? "status") <*> (o .:? "progress") <*>
(o .:? "instanceGroupManager")
<*>
(o .:? "kind" .!= "replicapoolupdater#rollingUpdate")
<*> (o .:? "error")
<*> (o .:? "instanceTemplate")
<*> (o .:? "user")
<*> (o .:? "selfLink")
<*> (o .:? "statusMessage")
<*> (o .:? "creationTimestamp")
<*> (o .:? "id")
<*> (o .:? "policy")
<*> (o .:? "actionType")
<*> (o .:? "oldInstanceTemplate")
<*> (o .:? "description")
<*> (o .:? "instanceGroup"))
instance ToJSON RollingUpdate where
toJSON RollingUpdate'{..}
= object
(catMaybes
[("status" .=) <$> _ruStatus,
("progress" .=) <$> _ruProgress,
("instanceGroupManager" .=) <$>
_ruInstanceGroupManager,
Just ("kind" .= _ruKind), ("error" .=) <$> _ruError,
("instanceTemplate" .=) <$> _ruInstanceTemplate,
("user" .=) <$> _ruUser,
("selfLink" .=) <$> _ruSelfLink,
("statusMessage" .=) <$> _ruStatusMessage,
("creationTimestamp" .=) <$> _ruCreationTimestamp,
("id" .=) <$> _ruId, ("policy" .=) <$> _ruPolicy,
("actionType" .=) <$> _ruActionType,
("oldInstanceTemplate" .=) <$>
_ruOldInstanceTemplate,
("description" .=) <$> _ruDescription,
("instanceGroup" .=) <$> _ruInstanceGroup])
newtype RollingUpdateError = RollingUpdateError'
{ _rueErrors :: Maybe [RollingUpdateErrorErrorsItem]
} deriving (Eq,Show,Data,Typeable,Generic)
rollingUpdateError
:: RollingUpdateError
rollingUpdateError =
RollingUpdateError'
{ _rueErrors = Nothing
}
rueErrors :: Lens' RollingUpdateError [RollingUpdateErrorErrorsItem]
rueErrors
= lens _rueErrors (\ s a -> s{_rueErrors = a}) .
_Default
. _Coerce
instance FromJSON RollingUpdateError where
parseJSON
= withObject "RollingUpdateError"
(\ o ->
RollingUpdateError' <$> (o .:? "errors" .!= mempty))
instance ToJSON RollingUpdateError where
toJSON RollingUpdateError'{..}
= object (catMaybes [("errors" .=) <$> _rueErrors])
data OperationList = OperationList'
{ _olNextPageToken :: !(Maybe Text)
, _olKind :: !Text
, _olItems :: !(Maybe [Operation])
, _olSelfLink :: !(Maybe Text)
, _olId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationList
:: OperationList
operationList =
OperationList'
{ _olNextPageToken = Nothing
, _olKind = "replicapoolupdater#operationList"
, _olItems = Nothing
, _olSelfLink = Nothing
, _olId = Nothing
}
olNextPageToken :: Lens' OperationList (Maybe Text)
olNextPageToken
= lens _olNextPageToken
(\ s a -> s{_olNextPageToken = a})
olKind :: Lens' OperationList Text
olKind = lens _olKind (\ s a -> s{_olKind = a})
olItems :: Lens' OperationList [Operation]
olItems
= lens _olItems (\ s a -> s{_olItems = a}) . _Default
. _Coerce
olSelfLink :: Lens' OperationList (Maybe Text)
olSelfLink
= lens _olSelfLink (\ s a -> s{_olSelfLink = a})
olId :: Lens' OperationList (Maybe Text)
olId = lens _olId (\ s a -> s{_olId = a})
instance FromJSON OperationList where
parseJSON
= withObject "OperationList"
(\ o ->
OperationList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!= "replicapoolupdater#operationList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "selfLink")
<*> (o .:? "id"))
instance ToJSON OperationList where
toJSON OperationList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _olNextPageToken,
Just ("kind" .= _olKind), ("items" .=) <$> _olItems,
("selfLink" .=) <$> _olSelfLink,
("id" .=) <$> _olId])
data InstanceUpdateList = InstanceUpdateList'
{ _iulNextPageToken :: !(Maybe Text)
, _iulKind :: !Text
, _iulItems :: !(Maybe [InstanceUpdate])
, _iulSelfLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
instanceUpdateList
:: InstanceUpdateList
instanceUpdateList =
InstanceUpdateList'
{ _iulNextPageToken = Nothing
, _iulKind = "replicapoolupdater#instanceUpdateList"
, _iulItems = Nothing
, _iulSelfLink = Nothing
}
iulNextPageToken :: Lens' InstanceUpdateList (Maybe Text)
iulNextPageToken
= lens _iulNextPageToken
(\ s a -> s{_iulNextPageToken = a})
iulKind :: Lens' InstanceUpdateList Text
iulKind = lens _iulKind (\ s a -> s{_iulKind = a})
iulItems :: Lens' InstanceUpdateList [InstanceUpdate]
iulItems
= lens _iulItems (\ s a -> s{_iulItems = a}) .
_Default
. _Coerce
iulSelfLink :: Lens' InstanceUpdateList (Maybe Text)
iulSelfLink
= lens _iulSelfLink (\ s a -> s{_iulSelfLink = a})
instance FromJSON InstanceUpdateList where
parseJSON
= withObject "InstanceUpdateList"
(\ o ->
InstanceUpdateList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"replicapoolupdater#instanceUpdateList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "selfLink"))
instance ToJSON InstanceUpdateList where
toJSON InstanceUpdateList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _iulNextPageToken,
Just ("kind" .= _iulKind),
("items" .=) <$> _iulItems,
("selfLink" .=) <$> _iulSelfLink])
data RollingUpdateErrorErrorsItem = RollingUpdateErrorErrorsItem'
{ _rueeiLocation :: !(Maybe Text)
, _rueeiCode :: !(Maybe Text)
, _rueeiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
rollingUpdateErrorErrorsItem
:: RollingUpdateErrorErrorsItem
rollingUpdateErrorErrorsItem =
RollingUpdateErrorErrorsItem'
{ _rueeiLocation = Nothing
, _rueeiCode = Nothing
, _rueeiMessage = Nothing
}
rueeiLocation :: Lens' RollingUpdateErrorErrorsItem (Maybe Text)
rueeiLocation
= lens _rueeiLocation
(\ s a -> s{_rueeiLocation = a})
rueeiCode :: Lens' RollingUpdateErrorErrorsItem (Maybe Text)
rueeiCode
= lens _rueeiCode (\ s a -> s{_rueeiCode = a})
rueeiMessage :: Lens' RollingUpdateErrorErrorsItem (Maybe Text)
rueeiMessage
= lens _rueeiMessage (\ s a -> s{_rueeiMessage = a})
instance FromJSON RollingUpdateErrorErrorsItem where
parseJSON
= withObject "RollingUpdateErrorErrorsItem"
(\ o ->
RollingUpdateErrorErrorsItem' <$>
(o .:? "location") <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON RollingUpdateErrorErrorsItem where
toJSON RollingUpdateErrorErrorsItem'{..}
= object
(catMaybes
[("location" .=) <$> _rueeiLocation,
("code" .=) <$> _rueeiCode,
("message" .=) <$> _rueeiMessage])
data Operation = Operation'
{ _oTargetId :: !(Maybe (Textual Word64))
, _oStatus :: !(Maybe Text)
, _oInsertTime :: !(Maybe Text)
, _oProgress :: !(Maybe (Textual Int32))
, _oStartTime :: !(Maybe Text)
, _oKind :: !Text
, _oError :: !(Maybe OperationError)
, _oHTTPErrorMessage :: !(Maybe Text)
, _oZone :: !(Maybe Text)
, _oWarnings :: !(Maybe [OperationWarningsItem])
, _oHTTPErrorStatusCode :: !(Maybe (Textual Int32))
, _oUser :: !(Maybe Text)
, _oSelfLink :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oStatusMessage :: !(Maybe Text)
, _oCreationTimestamp :: !(Maybe Text)
, _oEndTime :: !(Maybe Text)
, _oId :: !(Maybe (Textual Word64))
, _oOperationType :: !(Maybe Text)
, _oRegion :: !(Maybe Text)
, _oTargetLink :: !(Maybe Text)
, _oClientOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oTargetId = Nothing
, _oStatus = Nothing
, _oInsertTime = Nothing
, _oProgress = Nothing
, _oStartTime = Nothing
, _oKind = "replicapoolupdater#operation"
, _oError = Nothing
, _oHTTPErrorMessage = Nothing
, _oZone = Nothing
, _oWarnings = Nothing
, _oHTTPErrorStatusCode = Nothing
, _oUser = Nothing
, _oSelfLink = Nothing
, _oName = Nothing
, _oStatusMessage = Nothing
, _oCreationTimestamp = Nothing
, _oEndTime = Nothing
, _oId = Nothing
, _oOperationType = Nothing
, _oRegion = Nothing
, _oTargetLink = Nothing
, _oClientOperationId = Nothing
}
oTargetId :: Lens' Operation (Maybe Word64)
oTargetId
= lens _oTargetId (\ s a -> s{_oTargetId = a}) .
mapping _Coerce
oStatus :: Lens' Operation (Maybe Text)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
oInsertTime :: Lens' Operation (Maybe Text)
oInsertTime
= lens _oInsertTime (\ s a -> s{_oInsertTime = a})
oProgress :: Lens' Operation (Maybe Int32)
oProgress
= lens _oProgress (\ s a -> s{_oProgress = a}) .
mapping _Coerce
oStartTime :: Lens' Operation (Maybe Text)
oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = a})
oKind :: Lens' Operation Text
oKind = lens _oKind (\ s a -> s{_oKind = a})
oError :: Lens' Operation (Maybe OperationError)
oError = lens _oError (\ s a -> s{_oError = a})
oHTTPErrorMessage :: Lens' Operation (Maybe Text)
oHTTPErrorMessage
= lens _oHTTPErrorMessage
(\ s a -> s{_oHTTPErrorMessage = a})
oZone :: Lens' Operation (Maybe Text)
oZone = lens _oZone (\ s a -> s{_oZone = a})
oWarnings :: Lens' Operation [OperationWarningsItem]
oWarnings
= lens _oWarnings (\ s a -> s{_oWarnings = a}) .
_Default
. _Coerce
oHTTPErrorStatusCode :: Lens' Operation (Maybe Int32)
oHTTPErrorStatusCode
= lens _oHTTPErrorStatusCode
(\ s a -> s{_oHTTPErrorStatusCode = a})
. mapping _Coerce
oUser :: Lens' Operation (Maybe Text)
oUser = lens _oUser (\ s a -> s{_oUser = a})
oSelfLink :: Lens' Operation (Maybe Text)
oSelfLink
= lens _oSelfLink (\ s a -> s{_oSelfLink = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oStatusMessage :: Lens' Operation (Maybe Text)
oStatusMessage
= lens _oStatusMessage
(\ s a -> s{_oStatusMessage = a})
oCreationTimestamp :: Lens' Operation (Maybe Text)
oCreationTimestamp
= lens _oCreationTimestamp
(\ s a -> s{_oCreationTimestamp = a})
oEndTime :: Lens' Operation (Maybe Text)
oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a})
oId :: Lens' Operation (Maybe Word64)
oId
= lens _oId (\ s a -> s{_oId = a}) . mapping _Coerce
oOperationType :: Lens' Operation (Maybe Text)
oOperationType
= lens _oOperationType
(\ s a -> s{_oOperationType = a})
oRegion :: Lens' Operation (Maybe Text)
oRegion = lens _oRegion (\ s a -> s{_oRegion = a})
oTargetLink :: Lens' Operation (Maybe Text)
oTargetLink
= lens _oTargetLink (\ s a -> s{_oTargetLink = a})
oClientOperationId :: Lens' Operation (Maybe Text)
oClientOperationId
= lens _oClientOperationId
(\ s a -> s{_oClientOperationId = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "targetId") <*> (o .:? "status") <*>
(o .:? "insertTime")
<*> (o .:? "progress")
<*> (o .:? "startTime")
<*> (o .:? "kind" .!= "replicapoolupdater#operation")
<*> (o .:? "error")
<*> (o .:? "httpErrorMessage")
<*> (o .:? "zone")
<*> (o .:? "warnings" .!= mempty)
<*> (o .:? "httpErrorStatusCode")
<*> (o .:? "user")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "statusMessage")
<*> (o .:? "creationTimestamp")
<*> (o .:? "endTime")
<*> (o .:? "id")
<*> (o .:? "operationType")
<*> (o .:? "region")
<*> (o .:? "targetLink")
<*> (o .:? "clientOperationId"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("targetId" .=) <$> _oTargetId,
("status" .=) <$> _oStatus,
("insertTime" .=) <$> _oInsertTime,
("progress" .=) <$> _oProgress,
("startTime" .=) <$> _oStartTime,
Just ("kind" .= _oKind), ("error" .=) <$> _oError,
("httpErrorMessage" .=) <$> _oHTTPErrorMessage,
("zone" .=) <$> _oZone,
("warnings" .=) <$> _oWarnings,
("httpErrorStatusCode" .=) <$> _oHTTPErrorStatusCode,
("user" .=) <$> _oUser,
("selfLink" .=) <$> _oSelfLink,
("name" .=) <$> _oName,
("statusMessage" .=) <$> _oStatusMessage,
("creationTimestamp" .=) <$> _oCreationTimestamp,
("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId,
("operationType" .=) <$> _oOperationType,
("region" .=) <$> _oRegion,
("targetLink" .=) <$> _oTargetLink,
("clientOperationId" .=) <$> _oClientOperationId])
data InstanceUpdate = InstanceUpdate'
{ _iuStatus :: !(Maybe Text)
, _iuError :: !(Maybe InstanceUpdateError)
, _iuInstance :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
instanceUpdate
:: InstanceUpdate
instanceUpdate =
InstanceUpdate'
{ _iuStatus = Nothing
, _iuError = Nothing
, _iuInstance = Nothing
}
iuStatus :: Lens' InstanceUpdate (Maybe Text)
iuStatus = lens _iuStatus (\ s a -> s{_iuStatus = a})
iuError :: Lens' InstanceUpdate (Maybe InstanceUpdateError)
iuError = lens _iuError (\ s a -> s{_iuError = a})
iuInstance :: Lens' InstanceUpdate (Maybe Text)
iuInstance
= lens _iuInstance (\ s a -> s{_iuInstance = a})
instance FromJSON InstanceUpdate where
parseJSON
= withObject "InstanceUpdate"
(\ o ->
InstanceUpdate' <$>
(o .:? "status") <*> (o .:? "error") <*>
(o .:? "instance"))
instance ToJSON InstanceUpdate where
toJSON InstanceUpdate'{..}
= object
(catMaybes
[("status" .=) <$> _iuStatus,
("error" .=) <$> _iuError,
("instance" .=) <$> _iuInstance])
newtype InstanceUpdateError = InstanceUpdateError'
{ _iueErrors :: Maybe [InstanceUpdateErrorErrorsItem]
} deriving (Eq,Show,Data,Typeable,Generic)
instanceUpdateError
:: InstanceUpdateError
instanceUpdateError =
InstanceUpdateError'
{ _iueErrors = Nothing
}
iueErrors :: Lens' InstanceUpdateError [InstanceUpdateErrorErrorsItem]
iueErrors
= lens _iueErrors (\ s a -> s{_iueErrors = a}) .
_Default
. _Coerce
instance FromJSON InstanceUpdateError where
parseJSON
= withObject "InstanceUpdateError"
(\ o ->
InstanceUpdateError' <$> (o .:? "errors" .!= mempty))
instance ToJSON InstanceUpdateError where
toJSON InstanceUpdateError'{..}
= object (catMaybes [("errors" .=) <$> _iueErrors])
data RollingUpdatePolicy = RollingUpdatePolicy'
{ _rupMinInstanceUpdateTimeSec :: !(Maybe (Textual Int32))
, _rupInstanceStartupTimeoutSec :: !(Maybe (Textual Int32))
, _rupMaxNumFailedInstances :: !(Maybe (Textual Int32))
, _rupAutoPauseAfterInstances :: !(Maybe (Textual Int32))
, _rupMaxNumConcurrentInstances :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
rollingUpdatePolicy
:: RollingUpdatePolicy
rollingUpdatePolicy =
RollingUpdatePolicy'
{ _rupMinInstanceUpdateTimeSec = Nothing
, _rupInstanceStartupTimeoutSec = Nothing
, _rupMaxNumFailedInstances = Nothing
, _rupAutoPauseAfterInstances = Nothing
, _rupMaxNumConcurrentInstances = Nothing
}
rupMinInstanceUpdateTimeSec :: Lens' RollingUpdatePolicy (Maybe Int32)
rupMinInstanceUpdateTimeSec
= lens _rupMinInstanceUpdateTimeSec
(\ s a -> s{_rupMinInstanceUpdateTimeSec = a})
. mapping _Coerce
rupInstanceStartupTimeoutSec :: Lens' RollingUpdatePolicy (Maybe Int32)
rupInstanceStartupTimeoutSec
= lens _rupInstanceStartupTimeoutSec
(\ s a -> s{_rupInstanceStartupTimeoutSec = a})
. mapping _Coerce
rupMaxNumFailedInstances :: Lens' RollingUpdatePolicy (Maybe Int32)
rupMaxNumFailedInstances
= lens _rupMaxNumFailedInstances
(\ s a -> s{_rupMaxNumFailedInstances = a})
. mapping _Coerce
rupAutoPauseAfterInstances :: Lens' RollingUpdatePolicy (Maybe Int32)
rupAutoPauseAfterInstances
= lens _rupAutoPauseAfterInstances
(\ s a -> s{_rupAutoPauseAfterInstances = a})
. mapping _Coerce
rupMaxNumConcurrentInstances :: Lens' RollingUpdatePolicy (Maybe Int32)
rupMaxNumConcurrentInstances
= lens _rupMaxNumConcurrentInstances
(\ s a -> s{_rupMaxNumConcurrentInstances = a})
. mapping _Coerce
instance FromJSON RollingUpdatePolicy where
parseJSON
= withObject "RollingUpdatePolicy"
(\ o ->
RollingUpdatePolicy' <$>
(o .:? "minInstanceUpdateTimeSec") <*>
(o .:? "instanceStartupTimeoutSec")
<*> (o .:? "maxNumFailedInstances")
<*> (o .:? "autoPauseAfterInstances")
<*> (o .:? "maxNumConcurrentInstances"))
instance ToJSON RollingUpdatePolicy where
toJSON RollingUpdatePolicy'{..}
= object
(catMaybes
[("minInstanceUpdateTimeSec" .=) <$>
_rupMinInstanceUpdateTimeSec,
("instanceStartupTimeoutSec" .=) <$>
_rupInstanceStartupTimeoutSec,
("maxNumFailedInstances" .=) <$>
_rupMaxNumFailedInstances,
("autoPauseAfterInstances" .=) <$>
_rupAutoPauseAfterInstances,
("maxNumConcurrentInstances" .=) <$>
_rupMaxNumConcurrentInstances])
newtype OperationError = OperationError'
{ _oeErrors :: Maybe [OperationErrorErrorsItem]
} deriving (Eq,Show,Data,Typeable,Generic)
operationError
:: OperationError
operationError =
OperationError'
{ _oeErrors = Nothing
}
oeErrors :: Lens' OperationError [OperationErrorErrorsItem]
oeErrors
= lens _oeErrors (\ s a -> s{_oeErrors = a}) .
_Default
. _Coerce
instance FromJSON OperationError where
parseJSON
= withObject "OperationError"
(\ o ->
OperationError' <$> (o .:? "errors" .!= mempty))
instance ToJSON OperationError where
toJSON OperationError'{..}
= object (catMaybes [("errors" .=) <$> _oeErrors])
data OperationErrorErrorsItem = OperationErrorErrorsItem'
{ _oeeiLocation :: !(Maybe Text)
, _oeeiCode :: !(Maybe Text)
, _oeeiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationErrorErrorsItem
:: OperationErrorErrorsItem
operationErrorErrorsItem =
OperationErrorErrorsItem'
{ _oeeiLocation = Nothing
, _oeeiCode = Nothing
, _oeeiMessage = Nothing
}
oeeiLocation :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiLocation
= lens _oeeiLocation (\ s a -> s{_oeeiLocation = a})
oeeiCode :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiCode = lens _oeeiCode (\ s a -> s{_oeeiCode = a})
oeeiMessage :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiMessage
= lens _oeeiMessage (\ s a -> s{_oeeiMessage = a})
instance FromJSON OperationErrorErrorsItem where
parseJSON
= withObject "OperationErrorErrorsItem"
(\ o ->
OperationErrorErrorsItem' <$>
(o .:? "location") <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON OperationErrorErrorsItem where
toJSON OperationErrorErrorsItem'{..}
= object
(catMaybes
[("location" .=) <$> _oeeiLocation,
("code" .=) <$> _oeeiCode,
("message" .=) <$> _oeeiMessage])
data InstanceUpdateErrorErrorsItem = InstanceUpdateErrorErrorsItem'
{ _iueeiLocation :: !(Maybe Text)
, _iueeiCode :: !(Maybe Text)
, _iueeiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
instanceUpdateErrorErrorsItem
:: InstanceUpdateErrorErrorsItem
instanceUpdateErrorErrorsItem =
InstanceUpdateErrorErrorsItem'
{ _iueeiLocation = Nothing
, _iueeiCode = Nothing
, _iueeiMessage = Nothing
}
iueeiLocation :: Lens' InstanceUpdateErrorErrorsItem (Maybe Text)
iueeiLocation
= lens _iueeiLocation
(\ s a -> s{_iueeiLocation = a})
iueeiCode :: Lens' InstanceUpdateErrorErrorsItem (Maybe Text)
iueeiCode
= lens _iueeiCode (\ s a -> s{_iueeiCode = a})
iueeiMessage :: Lens' InstanceUpdateErrorErrorsItem (Maybe Text)
iueeiMessage
= lens _iueeiMessage (\ s a -> s{_iueeiMessage = a})
instance FromJSON InstanceUpdateErrorErrorsItem where
parseJSON
= withObject "InstanceUpdateErrorErrorsItem"
(\ o ->
InstanceUpdateErrorErrorsItem' <$>
(o .:? "location") <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON InstanceUpdateErrorErrorsItem where
toJSON InstanceUpdateErrorErrorsItem'{..}
= object
(catMaybes
[("location" .=) <$> _iueeiLocation,
("code" .=) <$> _iueeiCode,
("message" .=) <$> _iueeiMessage])
data RollingUpdateList = RollingUpdateList'
{ _rulNextPageToken :: !(Maybe Text)
, _rulKind :: !Text
, _rulItems :: !(Maybe [RollingUpdate])
, _rulSelfLink :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
rollingUpdateList
:: RollingUpdateList
rollingUpdateList =
RollingUpdateList'
{ _rulNextPageToken = Nothing
, _rulKind = "replicapoolupdater#rollingUpdateList"
, _rulItems = Nothing
, _rulSelfLink = Nothing
}
rulNextPageToken :: Lens' RollingUpdateList (Maybe Text)
rulNextPageToken
= lens _rulNextPageToken
(\ s a -> s{_rulNextPageToken = a})
rulKind :: Lens' RollingUpdateList Text
rulKind = lens _rulKind (\ s a -> s{_rulKind = a})
rulItems :: Lens' RollingUpdateList [RollingUpdate]
rulItems
= lens _rulItems (\ s a -> s{_rulItems = a}) .
_Default
. _Coerce
rulSelfLink :: Lens' RollingUpdateList (Maybe Text)
rulSelfLink
= lens _rulSelfLink (\ s a -> s{_rulSelfLink = a})
instance FromJSON RollingUpdateList where
parseJSON
= withObject "RollingUpdateList"
(\ o ->
RollingUpdateList' <$>
(o .:? "nextPageToken") <*>
(o .:? "kind" .!=
"replicapoolupdater#rollingUpdateList")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "selfLink"))
instance ToJSON RollingUpdateList where
toJSON RollingUpdateList'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _rulNextPageToken,
Just ("kind" .= _rulKind),
("items" .=) <$> _rulItems,
("selfLink" .=) <$> _rulSelfLink])
data OperationWarningsItem = OperationWarningsItem'
{ _owiData :: !(Maybe [OperationWarningsItemDataItem])
, _owiCode :: !(Maybe Text)
, _owiMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationWarningsItem
:: OperationWarningsItem
operationWarningsItem =
OperationWarningsItem'
{ _owiData = Nothing
, _owiCode = Nothing
, _owiMessage = Nothing
}
owiData :: Lens' OperationWarningsItem [OperationWarningsItemDataItem]
owiData
= lens _owiData (\ s a -> s{_owiData = a}) . _Default
. _Coerce
owiCode :: Lens' OperationWarningsItem (Maybe Text)
owiCode = lens _owiCode (\ s a -> s{_owiCode = a})
owiMessage :: Lens' OperationWarningsItem (Maybe Text)
owiMessage
= lens _owiMessage (\ s a -> s{_owiMessage = a})
instance FromJSON OperationWarningsItem where
parseJSON
= withObject "OperationWarningsItem"
(\ o ->
OperationWarningsItem' <$>
(o .:? "data" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON OperationWarningsItem where
toJSON OperationWarningsItem'{..}
= object
(catMaybes
[("data" .=) <$> _owiData, ("code" .=) <$> _owiCode,
("message" .=) <$> _owiMessage])