module Network.Google.Container.Types.Product where
import Network.Google.Container.Types.Sum
import Network.Google.Prelude
newtype HorizontalPodAutoscaling = HorizontalPodAutoscaling'
{ _hpaDisabled :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
horizontalPodAutoscaling
:: HorizontalPodAutoscaling
horizontalPodAutoscaling =
HorizontalPodAutoscaling'
{ _hpaDisabled = Nothing
}
hpaDisabled :: Lens' HorizontalPodAutoscaling (Maybe Bool)
hpaDisabled
= lens _hpaDisabled (\ s a -> s{_hpaDisabled = a})
instance FromJSON HorizontalPodAutoscaling where
parseJSON
= withObject "HorizontalPodAutoscaling"
(\ o ->
HorizontalPodAutoscaling' <$> (o .:? "disabled"))
instance ToJSON HorizontalPodAutoscaling where
toJSON HorizontalPodAutoscaling'{..}
= object
(catMaybes [("disabled" .=) <$> _hpaDisabled])
data ListOperationsResponse = ListOperationsResponse'
{ _lorOperations :: !(Maybe [Operation])
, _lorMissingZones :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
listOperationsResponse
:: ListOperationsResponse
listOperationsResponse =
ListOperationsResponse'
{ _lorOperations = Nothing
, _lorMissingZones = Nothing
}
lorOperations :: Lens' ListOperationsResponse [Operation]
lorOperations
= lens _lorOperations
(\ s a -> s{_lorOperations = a})
. _Default
. _Coerce
lorMissingZones :: Lens' ListOperationsResponse [Text]
lorMissingZones
= lens _lorMissingZones
(\ s a -> s{_lorMissingZones = a})
. _Default
. _Coerce
instance FromJSON ListOperationsResponse where
parseJSON
= withObject "ListOperationsResponse"
(\ o ->
ListOperationsResponse' <$>
(o .:? "operations" .!= mempty) <*>
(o .:? "missingZones" .!= mempty))
instance ToJSON ListOperationsResponse where
toJSON ListOperationsResponse'{..}
= object
(catMaybes
[("operations" .=) <$> _lorOperations,
("missingZones" .=) <$> _lorMissingZones])
newtype CreateClusterRequest = CreateClusterRequest'
{ _ccrCluster :: Maybe Cluster
} deriving (Eq,Show,Data,Typeable,Generic)
createClusterRequest
:: CreateClusterRequest
createClusterRequest =
CreateClusterRequest'
{ _ccrCluster = Nothing
}
ccrCluster :: Lens' CreateClusterRequest (Maybe Cluster)
ccrCluster
= lens _ccrCluster (\ s a -> s{_ccrCluster = a})
instance FromJSON CreateClusterRequest where
parseJSON
= withObject "CreateClusterRequest"
(\ o -> CreateClusterRequest' <$> (o .:? "cluster"))
instance ToJSON CreateClusterRequest where
toJSON CreateClusterRequest'{..}
= object (catMaybes [("cluster" .=) <$> _ccrCluster])
data Cluster = Cluster'
{ _cStatus :: !(Maybe Text)
, _cNodePools :: !(Maybe [NodePool])
, _cEnableKubernetesAlpha :: !(Maybe Bool)
, _cNodeConfig :: !(Maybe NodeConfig)
, _cNodeIPv4CIdRSize :: !(Maybe (Textual Int32))
, _cClusterIPv4CIdR :: !(Maybe Text)
, _cInitialNodeCount :: !(Maybe (Textual Int32))
, _cCurrentNodeVersion :: !(Maybe Text)
, _cNetwork :: !(Maybe Text)
, _cInitialClusterVersion :: !(Maybe Text)
, _cZone :: !(Maybe Text)
, _cAddonsConfig :: !(Maybe AddonsConfig)
, _cServicesIPv4CIdR :: !(Maybe Text)
, _cMasterAuth :: !(Maybe MasterAuth)
, _cSelfLink :: !(Maybe Text)
, _cName :: !(Maybe Text)
, _cCurrentMasterVersion :: !(Maybe Text)
, _cStatusMessage :: !(Maybe Text)
, _cSubnetwork :: !(Maybe Text)
, _cCurrentNodeCount :: !(Maybe (Textual Int32))
, _cEndpoint :: !(Maybe Text)
, _cExpireTime :: !(Maybe Text)
, _cLocations :: !(Maybe [Text])
, _cLoggingService :: !(Maybe Text)
, _cDescription :: !(Maybe Text)
, _cInstanceGroupURLs :: !(Maybe [Text])
, _cMonitoringService :: !(Maybe Text)
, _cCreateTime :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
cluster
:: Cluster
cluster =
Cluster'
{ _cStatus = Nothing
, _cNodePools = Nothing
, _cEnableKubernetesAlpha = Nothing
, _cNodeConfig = Nothing
, _cNodeIPv4CIdRSize = Nothing
, _cClusterIPv4CIdR = Nothing
, _cInitialNodeCount = Nothing
, _cCurrentNodeVersion = Nothing
, _cNetwork = Nothing
, _cInitialClusterVersion = Nothing
, _cZone = Nothing
, _cAddonsConfig = Nothing
, _cServicesIPv4CIdR = Nothing
, _cMasterAuth = Nothing
, _cSelfLink = Nothing
, _cName = Nothing
, _cCurrentMasterVersion = Nothing
, _cStatusMessage = Nothing
, _cSubnetwork = Nothing
, _cCurrentNodeCount = Nothing
, _cEndpoint = Nothing
, _cExpireTime = Nothing
, _cLocations = Nothing
, _cLoggingService = Nothing
, _cDescription = Nothing
, _cInstanceGroupURLs = Nothing
, _cMonitoringService = Nothing
, _cCreateTime = Nothing
}
cStatus :: Lens' Cluster (Maybe Text)
cStatus = lens _cStatus (\ s a -> s{_cStatus = a})
cNodePools :: Lens' Cluster [NodePool]
cNodePools
= lens _cNodePools (\ s a -> s{_cNodePools = a}) .
_Default
. _Coerce
cEnableKubernetesAlpha :: Lens' Cluster (Maybe Bool)
cEnableKubernetesAlpha
= lens _cEnableKubernetesAlpha
(\ s a -> s{_cEnableKubernetesAlpha = a})
cNodeConfig :: Lens' Cluster (Maybe NodeConfig)
cNodeConfig
= lens _cNodeConfig (\ s a -> s{_cNodeConfig = a})
cNodeIPv4CIdRSize :: Lens' Cluster (Maybe Int32)
cNodeIPv4CIdRSize
= lens _cNodeIPv4CIdRSize
(\ s a -> s{_cNodeIPv4CIdRSize = a})
. mapping _Coerce
cClusterIPv4CIdR :: Lens' Cluster (Maybe Text)
cClusterIPv4CIdR
= lens _cClusterIPv4CIdR
(\ s a -> s{_cClusterIPv4CIdR = a})
cInitialNodeCount :: Lens' Cluster (Maybe Int32)
cInitialNodeCount
= lens _cInitialNodeCount
(\ s a -> s{_cInitialNodeCount = a})
. mapping _Coerce
cCurrentNodeVersion :: Lens' Cluster (Maybe Text)
cCurrentNodeVersion
= lens _cCurrentNodeVersion
(\ s a -> s{_cCurrentNodeVersion = a})
cNetwork :: Lens' Cluster (Maybe Text)
cNetwork = lens _cNetwork (\ s a -> s{_cNetwork = a})
cInitialClusterVersion :: Lens' Cluster (Maybe Text)
cInitialClusterVersion
= lens _cInitialClusterVersion
(\ s a -> s{_cInitialClusterVersion = a})
cZone :: Lens' Cluster (Maybe Text)
cZone = lens _cZone (\ s a -> s{_cZone = a})
cAddonsConfig :: Lens' Cluster (Maybe AddonsConfig)
cAddonsConfig
= lens _cAddonsConfig
(\ s a -> s{_cAddonsConfig = a})
cServicesIPv4CIdR :: Lens' Cluster (Maybe Text)
cServicesIPv4CIdR
= lens _cServicesIPv4CIdR
(\ s a -> s{_cServicesIPv4CIdR = a})
cMasterAuth :: Lens' Cluster (Maybe MasterAuth)
cMasterAuth
= lens _cMasterAuth (\ s a -> s{_cMasterAuth = a})
cSelfLink :: Lens' Cluster (Maybe Text)
cSelfLink
= lens _cSelfLink (\ s a -> s{_cSelfLink = a})
cName :: Lens' Cluster (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cCurrentMasterVersion :: Lens' Cluster (Maybe Text)
cCurrentMasterVersion
= lens _cCurrentMasterVersion
(\ s a -> s{_cCurrentMasterVersion = a})
cStatusMessage :: Lens' Cluster (Maybe Text)
cStatusMessage
= lens _cStatusMessage
(\ s a -> s{_cStatusMessage = a})
cSubnetwork :: Lens' Cluster (Maybe Text)
cSubnetwork
= lens _cSubnetwork (\ s a -> s{_cSubnetwork = a})
cCurrentNodeCount :: Lens' Cluster (Maybe Int32)
cCurrentNodeCount
= lens _cCurrentNodeCount
(\ s a -> s{_cCurrentNodeCount = a})
. mapping _Coerce
cEndpoint :: Lens' Cluster (Maybe Text)
cEndpoint
= lens _cEndpoint (\ s a -> s{_cEndpoint = a})
cExpireTime :: Lens' Cluster (Maybe Text)
cExpireTime
= lens _cExpireTime (\ s a -> s{_cExpireTime = a})
cLocations :: Lens' Cluster [Text]
cLocations
= lens _cLocations (\ s a -> s{_cLocations = a}) .
_Default
. _Coerce
cLoggingService :: Lens' Cluster (Maybe Text)
cLoggingService
= lens _cLoggingService
(\ s a -> s{_cLoggingService = a})
cDescription :: Lens' Cluster (Maybe Text)
cDescription
= lens _cDescription (\ s a -> s{_cDescription = a})
cInstanceGroupURLs :: Lens' Cluster [Text]
cInstanceGroupURLs
= lens _cInstanceGroupURLs
(\ s a -> s{_cInstanceGroupURLs = a})
. _Default
. _Coerce
cMonitoringService :: Lens' Cluster (Maybe Text)
cMonitoringService
= lens _cMonitoringService
(\ s a -> s{_cMonitoringService = a})
cCreateTime :: Lens' Cluster (Maybe Text)
cCreateTime
= lens _cCreateTime (\ s a -> s{_cCreateTime = a})
instance FromJSON Cluster where
parseJSON
= withObject "Cluster"
(\ o ->
Cluster' <$>
(o .:? "status") <*> (o .:? "nodePools" .!= mempty)
<*> (o .:? "enableKubernetesAlpha")
<*> (o .:? "nodeConfig")
<*> (o .:? "nodeIpv4CidrSize")
<*> (o .:? "clusterIpv4Cidr")
<*> (o .:? "initialNodeCount")
<*> (o .:? "currentNodeVersion")
<*> (o .:? "network")
<*> (o .:? "initialClusterVersion")
<*> (o .:? "zone")
<*> (o .:? "addonsConfig")
<*> (o .:? "servicesIpv4Cidr")
<*> (o .:? "masterAuth")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "currentMasterVersion")
<*> (o .:? "statusMessage")
<*> (o .:? "subnetwork")
<*> (o .:? "currentNodeCount")
<*> (o .:? "endpoint")
<*> (o .:? "expireTime")
<*> (o .:? "locations" .!= mempty)
<*> (o .:? "loggingService")
<*> (o .:? "description")
<*> (o .:? "instanceGroupUrls" .!= mempty)
<*> (o .:? "monitoringService")
<*> (o .:? "createTime"))
instance ToJSON Cluster where
toJSON Cluster'{..}
= object
(catMaybes
[("status" .=) <$> _cStatus,
("nodePools" .=) <$> _cNodePools,
("enableKubernetesAlpha" .=) <$>
_cEnableKubernetesAlpha,
("nodeConfig" .=) <$> _cNodeConfig,
("nodeIpv4CidrSize" .=) <$> _cNodeIPv4CIdRSize,
("clusterIpv4Cidr" .=) <$> _cClusterIPv4CIdR,
("initialNodeCount" .=) <$> _cInitialNodeCount,
("currentNodeVersion" .=) <$> _cCurrentNodeVersion,
("network" .=) <$> _cNetwork,
("initialClusterVersion" .=) <$>
_cInitialClusterVersion,
("zone" .=) <$> _cZone,
("addonsConfig" .=) <$> _cAddonsConfig,
("servicesIpv4Cidr" .=) <$> _cServicesIPv4CIdR,
("masterAuth" .=) <$> _cMasterAuth,
("selfLink" .=) <$> _cSelfLink,
("name" .=) <$> _cName,
("currentMasterVersion" .=) <$>
_cCurrentMasterVersion,
("statusMessage" .=) <$> _cStatusMessage,
("subnetwork" .=) <$> _cSubnetwork,
("currentNodeCount" .=) <$> _cCurrentNodeCount,
("endpoint" .=) <$> _cEndpoint,
("expireTime" .=) <$> _cExpireTime,
("locations" .=) <$> _cLocations,
("loggingService" .=) <$> _cLoggingService,
("description" .=) <$> _cDescription,
("instanceGroupUrls" .=) <$> _cInstanceGroupURLs,
("monitoringService" .=) <$> _cMonitoringService,
("createTime" .=) <$> _cCreateTime])
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
newtype UpdateClusterRequest = UpdateClusterRequest'
{ _ucrUpdate :: Maybe ClusterUpdate
} deriving (Eq,Show,Data,Typeable,Generic)
updateClusterRequest
:: UpdateClusterRequest
updateClusterRequest =
UpdateClusterRequest'
{ _ucrUpdate = Nothing
}
ucrUpdate :: Lens' UpdateClusterRequest (Maybe ClusterUpdate)
ucrUpdate
= lens _ucrUpdate (\ s a -> s{_ucrUpdate = a})
instance FromJSON UpdateClusterRequest where
parseJSON
= withObject "UpdateClusterRequest"
(\ o -> UpdateClusterRequest' <$> (o .:? "update"))
instance ToJSON UpdateClusterRequest where
toJSON UpdateClusterRequest'{..}
= object (catMaybes [("update" .=) <$> _ucrUpdate])
data NodeConfig = NodeConfig'
{ _ncLocalSsdCount :: !(Maybe (Textual Int32))
, _ncDiskSizeGb :: !(Maybe (Textual Int32))
, _ncOAuthScopes :: !(Maybe [Text])
, _ncServiceAccount :: !(Maybe Text)
, _ncImageType :: !(Maybe Text)
, _ncMachineType :: !(Maybe Text)
, _ncMetadata :: !(Maybe NodeConfigMetadata)
, _ncLabels :: !(Maybe NodeConfigLabels)
, _ncTags :: !(Maybe [Text])
, _ncPreemptible :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
nodeConfig
:: NodeConfig
nodeConfig =
NodeConfig'
{ _ncLocalSsdCount = Nothing
, _ncDiskSizeGb = Nothing
, _ncOAuthScopes = Nothing
, _ncServiceAccount = Nothing
, _ncImageType = Nothing
, _ncMachineType = Nothing
, _ncMetadata = Nothing
, _ncLabels = Nothing
, _ncTags = Nothing
, _ncPreemptible = Nothing
}
ncLocalSsdCount :: Lens' NodeConfig (Maybe Int32)
ncLocalSsdCount
= lens _ncLocalSsdCount
(\ s a -> s{_ncLocalSsdCount = a})
. mapping _Coerce
ncDiskSizeGb :: Lens' NodeConfig (Maybe Int32)
ncDiskSizeGb
= lens _ncDiskSizeGb (\ s a -> s{_ncDiskSizeGb = a})
. mapping _Coerce
ncOAuthScopes :: Lens' NodeConfig [Text]
ncOAuthScopes
= lens _ncOAuthScopes
(\ s a -> s{_ncOAuthScopes = a})
. _Default
. _Coerce
ncServiceAccount :: Lens' NodeConfig (Maybe Text)
ncServiceAccount
= lens _ncServiceAccount
(\ s a -> s{_ncServiceAccount = a})
ncImageType :: Lens' NodeConfig (Maybe Text)
ncImageType
= lens _ncImageType (\ s a -> s{_ncImageType = a})
ncMachineType :: Lens' NodeConfig (Maybe Text)
ncMachineType
= lens _ncMachineType
(\ s a -> s{_ncMachineType = a})
ncMetadata :: Lens' NodeConfig (Maybe NodeConfigMetadata)
ncMetadata
= lens _ncMetadata (\ s a -> s{_ncMetadata = a})
ncLabels :: Lens' NodeConfig (Maybe NodeConfigLabels)
ncLabels = lens _ncLabels (\ s a -> s{_ncLabels = a})
ncTags :: Lens' NodeConfig [Text]
ncTags
= lens _ncTags (\ s a -> s{_ncTags = a}) . _Default .
_Coerce
ncPreemptible :: Lens' NodeConfig (Maybe Bool)
ncPreemptible
= lens _ncPreemptible
(\ s a -> s{_ncPreemptible = a})
instance FromJSON NodeConfig where
parseJSON
= withObject "NodeConfig"
(\ o ->
NodeConfig' <$>
(o .:? "localSsdCount") <*> (o .:? "diskSizeGb") <*>
(o .:? "oauthScopes" .!= mempty)
<*> (o .:? "serviceAccount")
<*> (o .:? "imageType")
<*> (o .:? "machineType")
<*> (o .:? "metadata")
<*> (o .:? "labels")
<*> (o .:? "tags" .!= mempty)
<*> (o .:? "preemptible"))
instance ToJSON NodeConfig where
toJSON NodeConfig'{..}
= object
(catMaybes
[("localSsdCount" .=) <$> _ncLocalSsdCount,
("diskSizeGb" .=) <$> _ncDiskSizeGb,
("oauthScopes" .=) <$> _ncOAuthScopes,
("serviceAccount" .=) <$> _ncServiceAccount,
("imageType" .=) <$> _ncImageType,
("machineType" .=) <$> _ncMachineType,
("metadata" .=) <$> _ncMetadata,
("labels" .=) <$> _ncLabels, ("tags" .=) <$> _ncTags,
("preemptible" .=) <$> _ncPreemptible])
newtype HTTPLoadBalancing = HTTPLoadBalancing'
{ _httplbDisabled :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
hTTPLoadBalancing
:: HTTPLoadBalancing
hTTPLoadBalancing =
HTTPLoadBalancing'
{ _httplbDisabled = Nothing
}
httplbDisabled :: Lens' HTTPLoadBalancing (Maybe Bool)
httplbDisabled
= lens _httplbDisabled
(\ s a -> s{_httplbDisabled = a})
instance FromJSON HTTPLoadBalancing where
parseJSON
= withObject "HTTPLoadBalancing"
(\ o -> HTTPLoadBalancing' <$> (o .:? "disabled"))
instance ToJSON HTTPLoadBalancing where
toJSON HTTPLoadBalancing'{..}
= object
(catMaybes [("disabled" .=) <$> _httplbDisabled])
data Operation = Operation'
{ _oStatus :: !(Maybe Text)
, _oZone :: !(Maybe Text)
, _oSelfLink :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oStatusMessage :: !(Maybe Text)
, _oOperationType :: !(Maybe Text)
, _oTargetLink :: !(Maybe Text)
, _oDetail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oStatus = Nothing
, _oZone = Nothing
, _oSelfLink = Nothing
, _oName = Nothing
, _oStatusMessage = Nothing
, _oOperationType = Nothing
, _oTargetLink = Nothing
, _oDetail = Nothing
}
oStatus :: Lens' Operation (Maybe Text)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
oZone :: Lens' Operation (Maybe Text)
oZone = lens _oZone (\ s a -> s{_oZone = 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})
oOperationType :: Lens' Operation (Maybe Text)
oOperationType
= lens _oOperationType
(\ s a -> s{_oOperationType = a})
oTargetLink :: Lens' Operation (Maybe Text)
oTargetLink
= lens _oTargetLink (\ s a -> s{_oTargetLink = a})
oDetail :: Lens' Operation (Maybe Text)
oDetail = lens _oDetail (\ s a -> s{_oDetail = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "status") <*> (o .:? "zone") <*>
(o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "statusMessage")
<*> (o .:? "operationType")
<*> (o .:? "targetLink")
<*> (o .:? "detail"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("status" .=) <$> _oStatus, ("zone" .=) <$> _oZone,
("selfLink" .=) <$> _oSelfLink,
("name" .=) <$> _oName,
("statusMessage" .=) <$> _oStatusMessage,
("operationType" .=) <$> _oOperationType,
("targetLink" .=) <$> _oTargetLink,
("detail" .=) <$> _oDetail])
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 NodeManagement = NodeManagement'
{ _nmAutoUpgrade :: !(Maybe Bool)
, _nmUpgradeOptions :: !(Maybe AutoUpgradeOptions)
} deriving (Eq,Show,Data,Typeable,Generic)
nodeManagement
:: NodeManagement
nodeManagement =
NodeManagement'
{ _nmAutoUpgrade = Nothing
, _nmUpgradeOptions = Nothing
}
nmAutoUpgrade :: Lens' NodeManagement (Maybe Bool)
nmAutoUpgrade
= lens _nmAutoUpgrade
(\ s a -> s{_nmAutoUpgrade = a})
nmUpgradeOptions :: Lens' NodeManagement (Maybe AutoUpgradeOptions)
nmUpgradeOptions
= lens _nmUpgradeOptions
(\ s a -> s{_nmUpgradeOptions = a})
instance FromJSON NodeManagement where
parseJSON
= withObject "NodeManagement"
(\ o ->
NodeManagement' <$>
(o .:? "autoUpgrade") <*> (o .:? "upgradeOptions"))
instance ToJSON NodeManagement where
toJSON NodeManagement'{..}
= object
(catMaybes
[("autoUpgrade" .=) <$> _nmAutoUpgrade,
("upgradeOptions" .=) <$> _nmUpgradeOptions])
data NodePoolAutoscaling = NodePoolAutoscaling'
{ _npaMaxNodeCount :: !(Maybe (Textual Int32))
, _npaEnabled :: !(Maybe Bool)
, _npaMinNodeCount :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
nodePoolAutoscaling
:: NodePoolAutoscaling
nodePoolAutoscaling =
NodePoolAutoscaling'
{ _npaMaxNodeCount = Nothing
, _npaEnabled = Nothing
, _npaMinNodeCount = Nothing
}
npaMaxNodeCount :: Lens' NodePoolAutoscaling (Maybe Int32)
npaMaxNodeCount
= lens _npaMaxNodeCount
(\ s a -> s{_npaMaxNodeCount = a})
. mapping _Coerce
npaEnabled :: Lens' NodePoolAutoscaling (Maybe Bool)
npaEnabled
= lens _npaEnabled (\ s a -> s{_npaEnabled = a})
npaMinNodeCount :: Lens' NodePoolAutoscaling (Maybe Int32)
npaMinNodeCount
= lens _npaMinNodeCount
(\ s a -> s{_npaMinNodeCount = a})
. mapping _Coerce
instance FromJSON NodePoolAutoscaling where
parseJSON
= withObject "NodePoolAutoscaling"
(\ o ->
NodePoolAutoscaling' <$>
(o .:? "maxNodeCount") <*> (o .:? "enabled") <*>
(o .:? "minNodeCount"))
instance ToJSON NodePoolAutoscaling where
toJSON NodePoolAutoscaling'{..}
= object
(catMaybes
[("maxNodeCount" .=) <$> _npaMaxNodeCount,
("enabled" .=) <$> _npaEnabled,
("minNodeCount" .=) <$> _npaMinNodeCount])
data AddonsConfig = AddonsConfig'
{ _acHorizontalPodAutoscaling :: !(Maybe HorizontalPodAutoscaling)
, _acHTTPLoadBalancing :: !(Maybe HTTPLoadBalancing)
} deriving (Eq,Show,Data,Typeable,Generic)
addonsConfig
:: AddonsConfig
addonsConfig =
AddonsConfig'
{ _acHorizontalPodAutoscaling = Nothing
, _acHTTPLoadBalancing = Nothing
}
acHorizontalPodAutoscaling :: Lens' AddonsConfig (Maybe HorizontalPodAutoscaling)
acHorizontalPodAutoscaling
= lens _acHorizontalPodAutoscaling
(\ s a -> s{_acHorizontalPodAutoscaling = a})
acHTTPLoadBalancing :: Lens' AddonsConfig (Maybe HTTPLoadBalancing)
acHTTPLoadBalancing
= lens _acHTTPLoadBalancing
(\ s a -> s{_acHTTPLoadBalancing = a})
instance FromJSON AddonsConfig where
parseJSON
= withObject "AddonsConfig"
(\ o ->
AddonsConfig' <$>
(o .:? "horizontalPodAutoscaling") <*>
(o .:? "httpLoadBalancing"))
instance ToJSON AddonsConfig where
toJSON AddonsConfig'{..}
= object
(catMaybes
[("horizontalPodAutoscaling" .=) <$>
_acHorizontalPodAutoscaling,
("httpLoadBalancing" .=) <$> _acHTTPLoadBalancing])
data NodePool = NodePool'
{ _npStatus :: !(Maybe Text)
, _npAutoscaling :: !(Maybe NodePoolAutoscaling)
, _npConfig :: !(Maybe NodeConfig)
, _npInitialNodeCount :: !(Maybe (Textual Int32))
, _npManagement :: !(Maybe NodeManagement)
, _npSelfLink :: !(Maybe Text)
, _npName :: !(Maybe Text)
, _npStatusMessage :: !(Maybe Text)
, _npVersion :: !(Maybe Text)
, _npInstanceGroupURLs :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
nodePool
:: NodePool
nodePool =
NodePool'
{ _npStatus = Nothing
, _npAutoscaling = Nothing
, _npConfig = Nothing
, _npInitialNodeCount = Nothing
, _npManagement = Nothing
, _npSelfLink = Nothing
, _npName = Nothing
, _npStatusMessage = Nothing
, _npVersion = Nothing
, _npInstanceGroupURLs = Nothing
}
npStatus :: Lens' NodePool (Maybe Text)
npStatus = lens _npStatus (\ s a -> s{_npStatus = a})
npAutoscaling :: Lens' NodePool (Maybe NodePoolAutoscaling)
npAutoscaling
= lens _npAutoscaling
(\ s a -> s{_npAutoscaling = a})
npConfig :: Lens' NodePool (Maybe NodeConfig)
npConfig = lens _npConfig (\ s a -> s{_npConfig = a})
npInitialNodeCount :: Lens' NodePool (Maybe Int32)
npInitialNodeCount
= lens _npInitialNodeCount
(\ s a -> s{_npInitialNodeCount = a})
. mapping _Coerce
npManagement :: Lens' NodePool (Maybe NodeManagement)
npManagement
= lens _npManagement (\ s a -> s{_npManagement = a})
npSelfLink :: Lens' NodePool (Maybe Text)
npSelfLink
= lens _npSelfLink (\ s a -> s{_npSelfLink = a})
npName :: Lens' NodePool (Maybe Text)
npName = lens _npName (\ s a -> s{_npName = a})
npStatusMessage :: Lens' NodePool (Maybe Text)
npStatusMessage
= lens _npStatusMessage
(\ s a -> s{_npStatusMessage = a})
npVersion :: Lens' NodePool (Maybe Text)
npVersion
= lens _npVersion (\ s a -> s{_npVersion = a})
npInstanceGroupURLs :: Lens' NodePool [Text]
npInstanceGroupURLs
= lens _npInstanceGroupURLs
(\ s a -> s{_npInstanceGroupURLs = a})
. _Default
. _Coerce
instance FromJSON NodePool where
parseJSON
= withObject "NodePool"
(\ o ->
NodePool' <$>
(o .:? "status") <*> (o .:? "autoscaling") <*>
(o .:? "config")
<*> (o .:? "initialNodeCount")
<*> (o .:? "management")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "statusMessage")
<*> (o .:? "version")
<*> (o .:? "instanceGroupUrls" .!= mempty))
instance ToJSON NodePool where
toJSON NodePool'{..}
= object
(catMaybes
[("status" .=) <$> _npStatus,
("autoscaling" .=) <$> _npAutoscaling,
("config" .=) <$> _npConfig,
("initialNodeCount" .=) <$> _npInitialNodeCount,
("management" .=) <$> _npManagement,
("selfLink" .=) <$> _npSelfLink,
("name" .=) <$> _npName,
("statusMessage" .=) <$> _npStatusMessage,
("version" .=) <$> _npVersion,
("instanceGroupUrls" .=) <$> _npInstanceGroupURLs])
newtype SetNodePoolManagementRequest = SetNodePoolManagementRequest'
{ _snpmrManagement :: Maybe NodeManagement
} deriving (Eq,Show,Data,Typeable,Generic)
setNodePoolManagementRequest
:: SetNodePoolManagementRequest
setNodePoolManagementRequest =
SetNodePoolManagementRequest'
{ _snpmrManagement = Nothing
}
snpmrManagement :: Lens' SetNodePoolManagementRequest (Maybe NodeManagement)
snpmrManagement
= lens _snpmrManagement
(\ s a -> s{_snpmrManagement = a})
instance FromJSON SetNodePoolManagementRequest where
parseJSON
= withObject "SetNodePoolManagementRequest"
(\ o ->
SetNodePoolManagementRequest' <$>
(o .:? "management"))
instance ToJSON SetNodePoolManagementRequest where
toJSON SetNodePoolManagementRequest'{..}
= object
(catMaybes [("management" .=) <$> _snpmrManagement])
data MasterAuth = MasterAuth'
{ _maClientKey :: !(Maybe Text)
, _maUsername :: !(Maybe Text)
, _maClientCertificate :: !(Maybe Text)
, _maPassword :: !(Maybe Text)
, _maClusterCaCertificate :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
masterAuth
:: MasterAuth
masterAuth =
MasterAuth'
{ _maClientKey = Nothing
, _maUsername = Nothing
, _maClientCertificate = Nothing
, _maPassword = Nothing
, _maClusterCaCertificate = Nothing
}
maClientKey :: Lens' MasterAuth (Maybe Text)
maClientKey
= lens _maClientKey (\ s a -> s{_maClientKey = a})
maUsername :: Lens' MasterAuth (Maybe Text)
maUsername
= lens _maUsername (\ s a -> s{_maUsername = a})
maClientCertificate :: Lens' MasterAuth (Maybe Text)
maClientCertificate
= lens _maClientCertificate
(\ s a -> s{_maClientCertificate = a})
maPassword :: Lens' MasterAuth (Maybe Text)
maPassword
= lens _maPassword (\ s a -> s{_maPassword = a})
maClusterCaCertificate :: Lens' MasterAuth (Maybe Text)
maClusterCaCertificate
= lens _maClusterCaCertificate
(\ s a -> s{_maClusterCaCertificate = a})
instance FromJSON MasterAuth where
parseJSON
= withObject "MasterAuth"
(\ o ->
MasterAuth' <$>
(o .:? "clientKey") <*> (o .:? "username") <*>
(o .:? "clientCertificate")
<*> (o .:? "password")
<*> (o .:? "clusterCaCertificate"))
instance ToJSON MasterAuth where
toJSON MasterAuth'{..}
= object
(catMaybes
[("clientKey" .=) <$> _maClientKey,
("username" .=) <$> _maUsername,
("clientCertificate" .=) <$> _maClientCertificate,
("password" .=) <$> _maPassword,
("clusterCaCertificate" .=) <$>
_maClusterCaCertificate])
newtype NodeConfigMetadata = NodeConfigMetadata'
{ _ncmAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeConfigMetadata
:: HashMap Text Text
-> NodeConfigMetadata
nodeConfigMetadata pNcmAddtional_ =
NodeConfigMetadata'
{ _ncmAddtional = _Coerce # pNcmAddtional_
}
ncmAddtional :: Lens' NodeConfigMetadata (HashMap Text Text)
ncmAddtional
= lens _ncmAddtional (\ s a -> s{_ncmAddtional = a})
. _Coerce
instance FromJSON NodeConfigMetadata where
parseJSON
= withObject "NodeConfigMetadata"
(\ o -> NodeConfigMetadata' <$> (parseJSONObject o))
instance ToJSON NodeConfigMetadata where
toJSON = toJSON . _ncmAddtional
newtype NodeConfigLabels = NodeConfigLabels'
{ _nclAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
nodeConfigLabels
:: HashMap Text Text
-> NodeConfigLabels
nodeConfigLabels pNclAddtional_ =
NodeConfigLabels'
{ _nclAddtional = _Coerce # pNclAddtional_
}
nclAddtional :: Lens' NodeConfigLabels (HashMap Text Text)
nclAddtional
= lens _nclAddtional (\ s a -> s{_nclAddtional = a})
. _Coerce
instance FromJSON NodeConfigLabels where
parseJSON
= withObject "NodeConfigLabels"
(\ o -> NodeConfigLabels' <$> (parseJSONObject o))
instance ToJSON NodeConfigLabels where
toJSON = toJSON . _nclAddtional
data ServerConfig = ServerConfig'
{ _scDefaultImageType :: !(Maybe Text)
, _scValidNodeVersions :: !(Maybe [Text])
, _scValidImageTypes :: !(Maybe [Text])
, _scDefaultClusterVersion :: !(Maybe Text)
, _scValidMasterVersions :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
serverConfig
:: ServerConfig
serverConfig =
ServerConfig'
{ _scDefaultImageType = Nothing
, _scValidNodeVersions = Nothing
, _scValidImageTypes = Nothing
, _scDefaultClusterVersion = Nothing
, _scValidMasterVersions = Nothing
}
scDefaultImageType :: Lens' ServerConfig (Maybe Text)
scDefaultImageType
= lens _scDefaultImageType
(\ s a -> s{_scDefaultImageType = a})
scValidNodeVersions :: Lens' ServerConfig [Text]
scValidNodeVersions
= lens _scValidNodeVersions
(\ s a -> s{_scValidNodeVersions = a})
. _Default
. _Coerce
scValidImageTypes :: Lens' ServerConfig [Text]
scValidImageTypes
= lens _scValidImageTypes
(\ s a -> s{_scValidImageTypes = a})
. _Default
. _Coerce
scDefaultClusterVersion :: Lens' ServerConfig (Maybe Text)
scDefaultClusterVersion
= lens _scDefaultClusterVersion
(\ s a -> s{_scDefaultClusterVersion = a})
scValidMasterVersions :: Lens' ServerConfig [Text]
scValidMasterVersions
= lens _scValidMasterVersions
(\ s a -> s{_scValidMasterVersions = a})
. _Default
. _Coerce
instance FromJSON ServerConfig where
parseJSON
= withObject "ServerConfig"
(\ o ->
ServerConfig' <$>
(o .:? "defaultImageType") <*>
(o .:? "validNodeVersions" .!= mempty)
<*> (o .:? "validImageTypes" .!= mempty)
<*> (o .:? "defaultClusterVersion")
<*> (o .:? "validMasterVersions" .!= mempty))
instance ToJSON ServerConfig where
toJSON ServerConfig'{..}
= object
(catMaybes
[("defaultImageType" .=) <$> _scDefaultImageType,
("validNodeVersions" .=) <$> _scValidNodeVersions,
("validImageTypes" .=) <$> _scValidImageTypes,
("defaultClusterVersion" .=) <$>
_scDefaultClusterVersion,
("validMasterVersions" .=) <$>
_scValidMasterVersions])
data AutoUpgradeOptions = AutoUpgradeOptions'
{ _auoAutoUpgradeStartTime :: !(Maybe Text)
, _auoDescription :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
autoUpgradeOptions
:: AutoUpgradeOptions
autoUpgradeOptions =
AutoUpgradeOptions'
{ _auoAutoUpgradeStartTime = Nothing
, _auoDescription = Nothing
}
auoAutoUpgradeStartTime :: Lens' AutoUpgradeOptions (Maybe Text)
auoAutoUpgradeStartTime
= lens _auoAutoUpgradeStartTime
(\ s a -> s{_auoAutoUpgradeStartTime = a})
auoDescription :: Lens' AutoUpgradeOptions (Maybe Text)
auoDescription
= lens _auoDescription
(\ s a -> s{_auoDescription = a})
instance FromJSON AutoUpgradeOptions where
parseJSON
= withObject "AutoUpgradeOptions"
(\ o ->
AutoUpgradeOptions' <$>
(o .:? "autoUpgradeStartTime") <*>
(o .:? "description"))
instance ToJSON AutoUpgradeOptions where
toJSON AutoUpgradeOptions'{..}
= object
(catMaybes
[("autoUpgradeStartTime" .=) <$>
_auoAutoUpgradeStartTime,
("description" .=) <$> _auoDescription])
data ListClustersResponse = ListClustersResponse'
{ _lcrClusters :: !(Maybe [Cluster])
, _lcrMissingZones :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
listClustersResponse
:: ListClustersResponse
listClustersResponse =
ListClustersResponse'
{ _lcrClusters = Nothing
, _lcrMissingZones = Nothing
}
lcrClusters :: Lens' ListClustersResponse [Cluster]
lcrClusters
= lens _lcrClusters (\ s a -> s{_lcrClusters = a}) .
_Default
. _Coerce
lcrMissingZones :: Lens' ListClustersResponse [Text]
lcrMissingZones
= lens _lcrMissingZones
(\ s a -> s{_lcrMissingZones = a})
. _Default
. _Coerce
instance FromJSON ListClustersResponse where
parseJSON
= withObject "ListClustersResponse"
(\ o ->
ListClustersResponse' <$>
(o .:? "clusters" .!= mempty) <*>
(o .:? "missingZones" .!= mempty))
instance ToJSON ListClustersResponse where
toJSON ListClustersResponse'{..}
= object
(catMaybes
[("clusters" .=) <$> _lcrClusters,
("missingZones" .=) <$> _lcrMissingZones])
data ClusterUpdate = ClusterUpdate'
{ _cuDesiredNodePoolAutoscaling :: !(Maybe NodePoolAutoscaling)
, _cuDesiredAddonsConfig :: !(Maybe AddonsConfig)
, _cuDesiredNodePoolId :: !(Maybe Text)
, _cuDesiredImageType :: !(Maybe Text)
, _cuDesiredNodeVersion :: !(Maybe Text)
, _cuDesiredMasterVersion :: !(Maybe Text)
, _cuDesiredLocations :: !(Maybe [Text])
, _cuDesiredMonitoringService :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
clusterUpdate
:: ClusterUpdate
clusterUpdate =
ClusterUpdate'
{ _cuDesiredNodePoolAutoscaling = Nothing
, _cuDesiredAddonsConfig = Nothing
, _cuDesiredNodePoolId = Nothing
, _cuDesiredImageType = Nothing
, _cuDesiredNodeVersion = Nothing
, _cuDesiredMasterVersion = Nothing
, _cuDesiredLocations = Nothing
, _cuDesiredMonitoringService = Nothing
}
cuDesiredNodePoolAutoscaling :: Lens' ClusterUpdate (Maybe NodePoolAutoscaling)
cuDesiredNodePoolAutoscaling
= lens _cuDesiredNodePoolAutoscaling
(\ s a -> s{_cuDesiredNodePoolAutoscaling = a})
cuDesiredAddonsConfig :: Lens' ClusterUpdate (Maybe AddonsConfig)
cuDesiredAddonsConfig
= lens _cuDesiredAddonsConfig
(\ s a -> s{_cuDesiredAddonsConfig = a})
cuDesiredNodePoolId :: Lens' ClusterUpdate (Maybe Text)
cuDesiredNodePoolId
= lens _cuDesiredNodePoolId
(\ s a -> s{_cuDesiredNodePoolId = a})
cuDesiredImageType :: Lens' ClusterUpdate (Maybe Text)
cuDesiredImageType
= lens _cuDesiredImageType
(\ s a -> s{_cuDesiredImageType = a})
cuDesiredNodeVersion :: Lens' ClusterUpdate (Maybe Text)
cuDesiredNodeVersion
= lens _cuDesiredNodeVersion
(\ s a -> s{_cuDesiredNodeVersion = a})
cuDesiredMasterVersion :: Lens' ClusterUpdate (Maybe Text)
cuDesiredMasterVersion
= lens _cuDesiredMasterVersion
(\ s a -> s{_cuDesiredMasterVersion = a})
cuDesiredLocations :: Lens' ClusterUpdate [Text]
cuDesiredLocations
= lens _cuDesiredLocations
(\ s a -> s{_cuDesiredLocations = a})
. _Default
. _Coerce
cuDesiredMonitoringService :: Lens' ClusterUpdate (Maybe Text)
cuDesiredMonitoringService
= lens _cuDesiredMonitoringService
(\ s a -> s{_cuDesiredMonitoringService = a})
instance FromJSON ClusterUpdate where
parseJSON
= withObject "ClusterUpdate"
(\ o ->
ClusterUpdate' <$>
(o .:? "desiredNodePoolAutoscaling") <*>
(o .:? "desiredAddonsConfig")
<*> (o .:? "desiredNodePoolId")
<*> (o .:? "desiredImageType")
<*> (o .:? "desiredNodeVersion")
<*> (o .:? "desiredMasterVersion")
<*> (o .:? "desiredLocations" .!= mempty)
<*> (o .:? "desiredMonitoringService"))
instance ToJSON ClusterUpdate where
toJSON ClusterUpdate'{..}
= object
(catMaybes
[("desiredNodePoolAutoscaling" .=) <$>
_cuDesiredNodePoolAutoscaling,
("desiredAddonsConfig" .=) <$>
_cuDesiredAddonsConfig,
("desiredNodePoolId" .=) <$> _cuDesiredNodePoolId,
("desiredImageType" .=) <$> _cuDesiredImageType,
("desiredNodeVersion" .=) <$> _cuDesiredNodeVersion,
("desiredMasterVersion" .=) <$>
_cuDesiredMasterVersion,
("desiredLocations" .=) <$> _cuDesiredLocations,
("desiredMonitoringService" .=) <$>
_cuDesiredMonitoringService])
data RollbackNodePoolUpgradeRequest =
RollbackNodePoolUpgradeRequest'
deriving (Eq,Show,Data,Typeable,Generic)
rollbackNodePoolUpgradeRequest
:: RollbackNodePoolUpgradeRequest
rollbackNodePoolUpgradeRequest = RollbackNodePoolUpgradeRequest'
instance FromJSON RollbackNodePoolUpgradeRequest
where
parseJSON
= withObject "RollbackNodePoolUpgradeRequest"
(\ o -> pure RollbackNodePoolUpgradeRequest')
instance ToJSON RollbackNodePoolUpgradeRequest where
toJSON = const emptyObject
newtype ListNodePoolsResponse = ListNodePoolsResponse'
{ _lnprNodePools :: Maybe [NodePool]
} deriving (Eq,Show,Data,Typeable,Generic)
listNodePoolsResponse
:: ListNodePoolsResponse
listNodePoolsResponse =
ListNodePoolsResponse'
{ _lnprNodePools = Nothing
}
lnprNodePools :: Lens' ListNodePoolsResponse [NodePool]
lnprNodePools
= lens _lnprNodePools
(\ s a -> s{_lnprNodePools = a})
. _Default
. _Coerce
instance FromJSON ListNodePoolsResponse where
parseJSON
= withObject "ListNodePoolsResponse"
(\ o ->
ListNodePoolsResponse' <$>
(o .:? "nodePools" .!= mempty))
instance ToJSON ListNodePoolsResponse where
toJSON ListNodePoolsResponse'{..}
= object
(catMaybes [("nodePools" .=) <$> _lnprNodePools])
newtype CreateNodePoolRequest = CreateNodePoolRequest'
{ _cnprNodePool :: Maybe NodePool
} deriving (Eq,Show,Data,Typeable,Generic)
createNodePoolRequest
:: CreateNodePoolRequest
createNodePoolRequest =
CreateNodePoolRequest'
{ _cnprNodePool = Nothing
}
cnprNodePool :: Lens' CreateNodePoolRequest (Maybe NodePool)
cnprNodePool
= lens _cnprNodePool (\ s a -> s{_cnprNodePool = a})
instance FromJSON CreateNodePoolRequest where
parseJSON
= withObject "CreateNodePoolRequest"
(\ o ->
CreateNodePoolRequest' <$> (o .:? "nodePool"))
instance ToJSON CreateNodePoolRequest where
toJSON CreateNodePoolRequest'{..}
= object
(catMaybes [("nodePool" .=) <$> _cnprNodePool])