{-# 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.Container.Types.Product where
import Network.Google.Container.Types.Sum
import Network.Google.Prelude
newtype NetworkPolicyConfig = NetworkPolicyConfig'
{ _npcDisabled :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
networkPolicyConfig
:: NetworkPolicyConfig
networkPolicyConfig =
NetworkPolicyConfig'
{ _npcDisabled = Nothing
}
npcDisabled :: Lens' NetworkPolicyConfig (Maybe Bool)
npcDisabled
= lens _npcDisabled (\ s a -> s{_npcDisabled = a})
instance FromJSON NetworkPolicyConfig where
parseJSON
= withObject "NetworkPolicyConfig"
(\ o -> NetworkPolicyConfig' <$> (o .:? "disabled"))
instance ToJSON NetworkPolicyConfig where
toJSON NetworkPolicyConfig'{..}
= object
(catMaybes [("disabled" .=) <$> _npcDisabled])
data UpdateNodePoolRequest = UpdateNodePoolRequest'
{ _unprZone :: !(Maybe Text)
, _unprNodePoolId :: !(Maybe Text)
, _unprImageType :: !(Maybe Text)
, _unprName :: !(Maybe Text)
, _unprClusterId :: !(Maybe Text)
, _unprNodeVersion :: !(Maybe Text)
, _unprProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
updateNodePoolRequest
:: UpdateNodePoolRequest
updateNodePoolRequest =
UpdateNodePoolRequest'
{ _unprZone = Nothing
, _unprNodePoolId = Nothing
, _unprImageType = Nothing
, _unprName = Nothing
, _unprClusterId = Nothing
, _unprNodeVersion = Nothing
, _unprProjectId = Nothing
}
unprZone :: Lens' UpdateNodePoolRequest (Maybe Text)
unprZone = lens _unprZone (\ s a -> s{_unprZone = a})
unprNodePoolId :: Lens' UpdateNodePoolRequest (Maybe Text)
unprNodePoolId
= lens _unprNodePoolId
(\ s a -> s{_unprNodePoolId = a})
unprImageType :: Lens' UpdateNodePoolRequest (Maybe Text)
unprImageType
= lens _unprImageType
(\ s a -> s{_unprImageType = a})
unprName :: Lens' UpdateNodePoolRequest (Maybe Text)
unprName = lens _unprName (\ s a -> s{_unprName = a})
unprClusterId :: Lens' UpdateNodePoolRequest (Maybe Text)
unprClusterId
= lens _unprClusterId
(\ s a -> s{_unprClusterId = a})
unprNodeVersion :: Lens' UpdateNodePoolRequest (Maybe Text)
unprNodeVersion
= lens _unprNodeVersion
(\ s a -> s{_unprNodeVersion = a})
unprProjectId :: Lens' UpdateNodePoolRequest (Maybe Text)
unprProjectId
= lens _unprProjectId
(\ s a -> s{_unprProjectId = a})
instance FromJSON UpdateNodePoolRequest where
parseJSON
= withObject "UpdateNodePoolRequest"
(\ o ->
UpdateNodePoolRequest' <$>
(o .:? "zone") <*> (o .:? "nodePoolId") <*>
(o .:? "imageType")
<*> (o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "nodeVersion")
<*> (o .:? "projectId"))
instance ToJSON UpdateNodePoolRequest where
toJSON UpdateNodePoolRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _unprZone,
("nodePoolId" .=) <$> _unprNodePoolId,
("imageType" .=) <$> _unprImageType,
("name" .=) <$> _unprName,
("clusterId" .=) <$> _unprClusterId,
("nodeVersion" .=) <$> _unprNodeVersion,
("projectId" .=) <$> _unprProjectId])
data UpdateMasterRequest = UpdateMasterRequest'
{ _umrZone :: !(Maybe Text)
, _umrName :: !(Maybe Text)
, _umrClusterId :: !(Maybe Text)
, _umrProjectId :: !(Maybe Text)
, _umrMasterVersion :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
updateMasterRequest
:: UpdateMasterRequest
updateMasterRequest =
UpdateMasterRequest'
{ _umrZone = Nothing
, _umrName = Nothing
, _umrClusterId = Nothing
, _umrProjectId = Nothing
, _umrMasterVersion = Nothing
}
umrZone :: Lens' UpdateMasterRequest (Maybe Text)
umrZone = lens _umrZone (\ s a -> s{_umrZone = a})
umrName :: Lens' UpdateMasterRequest (Maybe Text)
umrName = lens _umrName (\ s a -> s{_umrName = a})
umrClusterId :: Lens' UpdateMasterRequest (Maybe Text)
umrClusterId
= lens _umrClusterId (\ s a -> s{_umrClusterId = a})
umrProjectId :: Lens' UpdateMasterRequest (Maybe Text)
umrProjectId
= lens _umrProjectId (\ s a -> s{_umrProjectId = a})
umrMasterVersion :: Lens' UpdateMasterRequest (Maybe Text)
umrMasterVersion
= lens _umrMasterVersion
(\ s a -> s{_umrMasterVersion = a})
instance FromJSON UpdateMasterRequest where
parseJSON
= withObject "UpdateMasterRequest"
(\ o ->
UpdateMasterRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "clusterId")
<*> (o .:? "projectId")
<*> (o .:? "masterVersion"))
instance ToJSON UpdateMasterRequest where
toJSON UpdateMasterRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _umrZone, ("name" .=) <$> _umrName,
("clusterId" .=) <$> _umrClusterId,
("projectId" .=) <$> _umrProjectId,
("masterVersion" .=) <$> _umrMasterVersion])
data StartIPRotationRequest = StartIPRotationRequest'
{ _sirrZone :: !(Maybe Text)
, _sirrRotateCredentials :: !(Maybe Bool)
, _sirrName :: !(Maybe Text)
, _sirrClusterId :: !(Maybe Text)
, _sirrProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
startIPRotationRequest
:: StartIPRotationRequest
startIPRotationRequest =
StartIPRotationRequest'
{ _sirrZone = Nothing
, _sirrRotateCredentials = Nothing
, _sirrName = Nothing
, _sirrClusterId = Nothing
, _sirrProjectId = Nothing
}
sirrZone :: Lens' StartIPRotationRequest (Maybe Text)
sirrZone = lens _sirrZone (\ s a -> s{_sirrZone = a})
sirrRotateCredentials :: Lens' StartIPRotationRequest (Maybe Bool)
sirrRotateCredentials
= lens _sirrRotateCredentials
(\ s a -> s{_sirrRotateCredentials = a})
sirrName :: Lens' StartIPRotationRequest (Maybe Text)
sirrName = lens _sirrName (\ s a -> s{_sirrName = a})
sirrClusterId :: Lens' StartIPRotationRequest (Maybe Text)
sirrClusterId
= lens _sirrClusterId
(\ s a -> s{_sirrClusterId = a})
sirrProjectId :: Lens' StartIPRotationRequest (Maybe Text)
sirrProjectId
= lens _sirrProjectId
(\ s a -> s{_sirrProjectId = a})
instance FromJSON StartIPRotationRequest where
parseJSON
= withObject "StartIPRotationRequest"
(\ o ->
StartIPRotationRequest' <$>
(o .:? "zone") <*> (o .:? "rotateCredentials") <*>
(o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON StartIPRotationRequest where
toJSON StartIPRotationRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _sirrZone,
("rotateCredentials" .=) <$> _sirrRotateCredentials,
("name" .=) <$> _sirrName,
("clusterId" .=) <$> _sirrClusterId,
("projectId" .=) <$> _sirrProjectId])
data SetLegacyAbacRequest = SetLegacyAbacRequest'
{ _slarEnabled :: !(Maybe Bool)
, _slarZone :: !(Maybe Text)
, _slarName :: !(Maybe Text)
, _slarClusterId :: !(Maybe Text)
, _slarProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setLegacyAbacRequest
:: SetLegacyAbacRequest
setLegacyAbacRequest =
SetLegacyAbacRequest'
{ _slarEnabled = Nothing
, _slarZone = Nothing
, _slarName = Nothing
, _slarClusterId = Nothing
, _slarProjectId = Nothing
}
slarEnabled :: Lens' SetLegacyAbacRequest (Maybe Bool)
slarEnabled
= lens _slarEnabled (\ s a -> s{_slarEnabled = a})
slarZone :: Lens' SetLegacyAbacRequest (Maybe Text)
slarZone = lens _slarZone (\ s a -> s{_slarZone = a})
slarName :: Lens' SetLegacyAbacRequest (Maybe Text)
slarName = lens _slarName (\ s a -> s{_slarName = a})
slarClusterId :: Lens' SetLegacyAbacRequest (Maybe Text)
slarClusterId
= lens _slarClusterId
(\ s a -> s{_slarClusterId = a})
slarProjectId :: Lens' SetLegacyAbacRequest (Maybe Text)
slarProjectId
= lens _slarProjectId
(\ s a -> s{_slarProjectId = a})
instance FromJSON SetLegacyAbacRequest where
parseJSON
= withObject "SetLegacyAbacRequest"
(\ o ->
SetLegacyAbacRequest' <$>
(o .:? "enabled") <*> (o .:? "zone") <*>
(o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON SetLegacyAbacRequest where
toJSON SetLegacyAbacRequest'{..}
= object
(catMaybes
[("enabled" .=) <$> _slarEnabled,
("zone" .=) <$> _slarZone, ("name" .=) <$> _slarName,
("clusterId" .=) <$> _slarClusterId,
("projectId" .=) <$> _slarProjectId])
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 SetMasterAuthRequest = SetMasterAuthRequest'
{ _smarAction :: !(Maybe SetMasterAuthRequestAction)
, _smarZone :: !(Maybe Text)
, _smarName :: !(Maybe Text)
, _smarClusterId :: !(Maybe Text)
, _smarProjectId :: !(Maybe Text)
, _smarUpdate :: !(Maybe MasterAuth)
} deriving (Eq,Show,Data,Typeable,Generic)
setMasterAuthRequest
:: SetMasterAuthRequest
setMasterAuthRequest =
SetMasterAuthRequest'
{ _smarAction = Nothing
, _smarZone = Nothing
, _smarName = Nothing
, _smarClusterId = Nothing
, _smarProjectId = Nothing
, _smarUpdate = Nothing
}
smarAction :: Lens' SetMasterAuthRequest (Maybe SetMasterAuthRequestAction)
smarAction
= lens _smarAction (\ s a -> s{_smarAction = a})
smarZone :: Lens' SetMasterAuthRequest (Maybe Text)
smarZone = lens _smarZone (\ s a -> s{_smarZone = a})
smarName :: Lens' SetMasterAuthRequest (Maybe Text)
smarName = lens _smarName (\ s a -> s{_smarName = a})
smarClusterId :: Lens' SetMasterAuthRequest (Maybe Text)
smarClusterId
= lens _smarClusterId
(\ s a -> s{_smarClusterId = a})
smarProjectId :: Lens' SetMasterAuthRequest (Maybe Text)
smarProjectId
= lens _smarProjectId
(\ s a -> s{_smarProjectId = a})
smarUpdate :: Lens' SetMasterAuthRequest (Maybe MasterAuth)
smarUpdate
= lens _smarUpdate (\ s a -> s{_smarUpdate = a})
instance FromJSON SetMasterAuthRequest where
parseJSON
= withObject "SetMasterAuthRequest"
(\ o ->
SetMasterAuthRequest' <$>
(o .:? "action") <*> (o .:? "zone") <*>
(o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId")
<*> (o .:? "update"))
instance ToJSON SetMasterAuthRequest where
toJSON SetMasterAuthRequest'{..}
= object
(catMaybes
[("action" .=) <$> _smarAction,
("zone" .=) <$> _smarZone, ("name" .=) <$> _smarName,
("clusterId" .=) <$> _smarClusterId,
("projectId" .=) <$> _smarProjectId,
("update" .=) <$> _smarUpdate])
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])
data CreateClusterRequest = CreateClusterRequest'
{ _ccrParent :: !(Maybe Text)
, _ccrCluster :: !(Maybe Cluster)
, _ccrZone :: !(Maybe Text)
, _ccrProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
createClusterRequest
:: CreateClusterRequest
createClusterRequest =
CreateClusterRequest'
{ _ccrParent = Nothing
, _ccrCluster = Nothing
, _ccrZone = Nothing
, _ccrProjectId = Nothing
}
ccrParent :: Lens' CreateClusterRequest (Maybe Text)
ccrParent
= lens _ccrParent (\ s a -> s{_ccrParent = a})
ccrCluster :: Lens' CreateClusterRequest (Maybe Cluster)
ccrCluster
= lens _ccrCluster (\ s a -> s{_ccrCluster = a})
ccrZone :: Lens' CreateClusterRequest (Maybe Text)
ccrZone = lens _ccrZone (\ s a -> s{_ccrZone = a})
ccrProjectId :: Lens' CreateClusterRequest (Maybe Text)
ccrProjectId
= lens _ccrProjectId (\ s a -> s{_ccrProjectId = a})
instance FromJSON CreateClusterRequest where
parseJSON
= withObject "CreateClusterRequest"
(\ o ->
CreateClusterRequest' <$>
(o .:? "parent") <*> (o .:? "cluster") <*>
(o .:? "zone")
<*> (o .:? "projectId"))
instance ToJSON CreateClusterRequest where
toJSON CreateClusterRequest'{..}
= object
(catMaybes
[("parent" .=) <$> _ccrParent,
("cluster" .=) <$> _ccrCluster,
("zone" .=) <$> _ccrZone,
("projectId" .=) <$> _ccrProjectId])
data Cluster = Cluster'
{ _cStatus :: !(Maybe ClusterStatus)
, _cNodePools :: !(Maybe [NodePool])
, _cEnableKubernetesAlpha :: !(Maybe Bool)
, _cResourceLabels :: !(Maybe ClusterResourceLabels)
, _cNodeConfig :: !(Maybe NodeConfig)
, _cNodeIPv4CIdRSize :: !(Maybe (Textual Int32))
, _cClusterIPv4CIdR :: !(Maybe Text)
, _cLocation :: !(Maybe Text)
, _cInitialNodeCount :: !(Maybe (Textual Int32))
, _cCurrentNodeVersion :: !(Maybe Text)
, _cNetwork :: !(Maybe Text)
, _cInitialClusterVersion :: !(Maybe Text)
, _cZone :: !(Maybe Text)
, _cAddonsConfig :: !(Maybe AddonsConfig)
, _cServicesIPv4CIdR :: !(Maybe Text)
, _cIPAllocationPolicy :: !(Maybe IPAllocationPolicy)
, _cMasterAuthorizedNetworksConfig :: !(Maybe MasterAuthorizedNetworksConfig)
, _cLegacyAbac :: !(Maybe LegacyAbac)
, _cNetworkConfig :: !(Maybe NetworkConfig)
, _cMasterAuth :: !(Maybe MasterAuth)
, _cSelfLink :: !(Maybe Text)
, _cName :: !(Maybe Text)
, _cCurrentMasterVersion :: !(Maybe Text)
, _cStatusMessage :: !(Maybe Text)
, _cSubnetwork :: !(Maybe Text)
, _cCurrentNodeCount :: !(Maybe (Textual Int32))
, _cPrivateClusterConfig :: !(Maybe PrivateClusterConfig)
, _cMaintenancePolicy :: !(Maybe MaintenancePolicy)
, _cConditions :: !(Maybe [StatusCondition])
, _cEndpoint :: !(Maybe Text)
, _cExpireTime :: !(Maybe Text)
, _cNetworkPolicy :: !(Maybe NetworkPolicy)
, _cLocations :: !(Maybe [Text])
, _cLoggingService :: !(Maybe Text)
, _cLabelFingerprint :: !(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
, _cResourceLabels = Nothing
, _cNodeConfig = Nothing
, _cNodeIPv4CIdRSize = Nothing
, _cClusterIPv4CIdR = Nothing
, _cLocation = Nothing
, _cInitialNodeCount = Nothing
, _cCurrentNodeVersion = Nothing
, _cNetwork = Nothing
, _cInitialClusterVersion = Nothing
, _cZone = Nothing
, _cAddonsConfig = Nothing
, _cServicesIPv4CIdR = Nothing
, _cIPAllocationPolicy = Nothing
, _cMasterAuthorizedNetworksConfig = Nothing
, _cLegacyAbac = Nothing
, _cNetworkConfig = Nothing
, _cMasterAuth = Nothing
, _cSelfLink = Nothing
, _cName = Nothing
, _cCurrentMasterVersion = Nothing
, _cStatusMessage = Nothing
, _cSubnetwork = Nothing
, _cCurrentNodeCount = Nothing
, _cPrivateClusterConfig = Nothing
, _cMaintenancePolicy = Nothing
, _cConditions = Nothing
, _cEndpoint = Nothing
, _cExpireTime = Nothing
, _cNetworkPolicy = Nothing
, _cLocations = Nothing
, _cLoggingService = Nothing
, _cLabelFingerprint = Nothing
, _cDescription = Nothing
, _cInstanceGroupURLs = Nothing
, _cMonitoringService = Nothing
, _cCreateTime = Nothing
}
cStatus :: Lens' Cluster (Maybe ClusterStatus)
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})
cResourceLabels :: Lens' Cluster (Maybe ClusterResourceLabels)
cResourceLabels
= lens _cResourceLabels
(\ s a -> s{_cResourceLabels = 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})
cLocation :: Lens' Cluster (Maybe Text)
cLocation
= lens _cLocation (\ s a -> s{_cLocation = 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})
cIPAllocationPolicy :: Lens' Cluster (Maybe IPAllocationPolicy)
cIPAllocationPolicy
= lens _cIPAllocationPolicy
(\ s a -> s{_cIPAllocationPolicy = a})
cMasterAuthorizedNetworksConfig :: Lens' Cluster (Maybe MasterAuthorizedNetworksConfig)
cMasterAuthorizedNetworksConfig
= lens _cMasterAuthorizedNetworksConfig
(\ s a -> s{_cMasterAuthorizedNetworksConfig = a})
cLegacyAbac :: Lens' Cluster (Maybe LegacyAbac)
cLegacyAbac
= lens _cLegacyAbac (\ s a -> s{_cLegacyAbac = a})
cNetworkConfig :: Lens' Cluster (Maybe NetworkConfig)
cNetworkConfig
= lens _cNetworkConfig
(\ s a -> s{_cNetworkConfig = 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
cPrivateClusterConfig :: Lens' Cluster (Maybe PrivateClusterConfig)
cPrivateClusterConfig
= lens _cPrivateClusterConfig
(\ s a -> s{_cPrivateClusterConfig = a})
cMaintenancePolicy :: Lens' Cluster (Maybe MaintenancePolicy)
cMaintenancePolicy
= lens _cMaintenancePolicy
(\ s a -> s{_cMaintenancePolicy = a})
cConditions :: Lens' Cluster [StatusCondition]
cConditions
= lens _cConditions (\ s a -> s{_cConditions = a}) .
_Default
. _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})
cNetworkPolicy :: Lens' Cluster (Maybe NetworkPolicy)
cNetworkPolicy
= lens _cNetworkPolicy
(\ s a -> s{_cNetworkPolicy = 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})
cLabelFingerprint :: Lens' Cluster (Maybe Text)
cLabelFingerprint
= lens _cLabelFingerprint
(\ s a -> s{_cLabelFingerprint = 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 .:? "resourceLabels")
<*> (o .:? "nodeConfig")
<*> (o .:? "nodeIpv4CidrSize")
<*> (o .:? "clusterIpv4Cidr")
<*> (o .:? "location")
<*> (o .:? "initialNodeCount")
<*> (o .:? "currentNodeVersion")
<*> (o .:? "network")
<*> (o .:? "initialClusterVersion")
<*> (o .:? "zone")
<*> (o .:? "addonsConfig")
<*> (o .:? "servicesIpv4Cidr")
<*> (o .:? "ipAllocationPolicy")
<*> (o .:? "masterAuthorizedNetworksConfig")
<*> (o .:? "legacyAbac")
<*> (o .:? "networkConfig")
<*> (o .:? "masterAuth")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "currentMasterVersion")
<*> (o .:? "statusMessage")
<*> (o .:? "subnetwork")
<*> (o .:? "currentNodeCount")
<*> (o .:? "privateClusterConfig")
<*> (o .:? "maintenancePolicy")
<*> (o .:? "conditions" .!= mempty)
<*> (o .:? "endpoint")
<*> (o .:? "expireTime")
<*> (o .:? "networkPolicy")
<*> (o .:? "locations" .!= mempty)
<*> (o .:? "loggingService")
<*> (o .:? "labelFingerprint")
<*> (o .:? "description")
<*> (o .:? "instanceGroupUrls" .!= mempty)
<*> (o .:? "monitoringService")
<*> (o .:? "createTime"))
instance ToJSON Cluster where
toJSON Cluster'{..}
= object
(catMaybes
[("status" .=) <$> _cStatus,
("nodePools" .=) <$> _cNodePools,
("enableKubernetesAlpha" .=) <$>
_cEnableKubernetesAlpha,
("resourceLabels" .=) <$> _cResourceLabels,
("nodeConfig" .=) <$> _cNodeConfig,
("nodeIpv4CidrSize" .=) <$> _cNodeIPv4CIdRSize,
("clusterIpv4Cidr" .=) <$> _cClusterIPv4CIdR,
("location" .=) <$> _cLocation,
("initialNodeCount" .=) <$> _cInitialNodeCount,
("currentNodeVersion" .=) <$> _cCurrentNodeVersion,
("network" .=) <$> _cNetwork,
("initialClusterVersion" .=) <$>
_cInitialClusterVersion,
("zone" .=) <$> _cZone,
("addonsConfig" .=) <$> _cAddonsConfig,
("servicesIpv4Cidr" .=) <$> _cServicesIPv4CIdR,
("ipAllocationPolicy" .=) <$> _cIPAllocationPolicy,
("masterAuthorizedNetworksConfig" .=) <$>
_cMasterAuthorizedNetworksConfig,
("legacyAbac" .=) <$> _cLegacyAbac,
("networkConfig" .=) <$> _cNetworkConfig,
("masterAuth" .=) <$> _cMasterAuth,
("selfLink" .=) <$> _cSelfLink,
("name" .=) <$> _cName,
("currentMasterVersion" .=) <$>
_cCurrentMasterVersion,
("statusMessage" .=) <$> _cStatusMessage,
("subnetwork" .=) <$> _cSubnetwork,
("currentNodeCount" .=) <$> _cCurrentNodeCount,
("privateClusterConfig" .=) <$>
_cPrivateClusterConfig,
("maintenancePolicy" .=) <$> _cMaintenancePolicy,
("conditions" .=) <$> _cConditions,
("endpoint" .=) <$> _cEndpoint,
("expireTime" .=) <$> _cExpireTime,
("networkPolicy" .=) <$> _cNetworkPolicy,
("locations" .=) <$> _cLocations,
("loggingService" .=) <$> _cLoggingService,
("labelFingerprint" .=) <$> _cLabelFingerprint,
("description" .=) <$> _cDescription,
("instanceGroupUrls" .=) <$> _cInstanceGroupURLs,
("monitoringService" .=) <$> _cMonitoringService,
("createTime" .=) <$> _cCreateTime])
data CancelOperationRequest = CancelOperationRequest'
{ _corZone :: !(Maybe Text)
, _corName :: !(Maybe Text)
, _corProjectId :: !(Maybe Text)
, _corOperationId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
cancelOperationRequest
:: CancelOperationRequest
cancelOperationRequest =
CancelOperationRequest'
{ _corZone = Nothing
, _corName = Nothing
, _corProjectId = Nothing
, _corOperationId = Nothing
}
corZone :: Lens' CancelOperationRequest (Maybe Text)
corZone = lens _corZone (\ s a -> s{_corZone = a})
corName :: Lens' CancelOperationRequest (Maybe Text)
corName = lens _corName (\ s a -> s{_corName = a})
corProjectId :: Lens' CancelOperationRequest (Maybe Text)
corProjectId
= lens _corProjectId (\ s a -> s{_corProjectId = a})
corOperationId :: Lens' CancelOperationRequest (Maybe Text)
corOperationId
= lens _corOperationId
(\ s a -> s{_corOperationId = a})
instance FromJSON CancelOperationRequest where
parseJSON
= withObject "CancelOperationRequest"
(\ o ->
CancelOperationRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "projectId")
<*> (o .:? "operationId"))
instance ToJSON CancelOperationRequest where
toJSON CancelOperationRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _corZone, ("name" .=) <$> _corName,
("projectId" .=) <$> _corProjectId,
("operationId" .=) <$> _corOperationId])
data UpdateClusterRequest = UpdateClusterRequest'
{ _ucrZone :: !(Maybe Text)
, _ucrName :: !(Maybe Text)
, _ucrClusterId :: !(Maybe Text)
, _ucrProjectId :: !(Maybe Text)
, _ucrUpdate :: !(Maybe ClusterUpdate)
} deriving (Eq,Show,Data,Typeable,Generic)
updateClusterRequest
:: UpdateClusterRequest
updateClusterRequest =
UpdateClusterRequest'
{ _ucrZone = Nothing
, _ucrName = Nothing
, _ucrClusterId = Nothing
, _ucrProjectId = Nothing
, _ucrUpdate = Nothing
}
ucrZone :: Lens' UpdateClusterRequest (Maybe Text)
ucrZone = lens _ucrZone (\ s a -> s{_ucrZone = a})
ucrName :: Lens' UpdateClusterRequest (Maybe Text)
ucrName = lens _ucrName (\ s a -> s{_ucrName = a})
ucrClusterId :: Lens' UpdateClusterRequest (Maybe Text)
ucrClusterId
= lens _ucrClusterId (\ s a -> s{_ucrClusterId = a})
ucrProjectId :: Lens' UpdateClusterRequest (Maybe Text)
ucrProjectId
= lens _ucrProjectId (\ s a -> s{_ucrProjectId = a})
ucrUpdate :: Lens' UpdateClusterRequest (Maybe ClusterUpdate)
ucrUpdate
= lens _ucrUpdate (\ s a -> s{_ucrUpdate = a})
instance FromJSON UpdateClusterRequest where
parseJSON
= withObject "UpdateClusterRequest"
(\ o ->
UpdateClusterRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "clusterId")
<*> (o .:? "projectId")
<*> (o .:? "update"))
instance ToJSON UpdateClusterRequest where
toJSON UpdateClusterRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _ucrZone, ("name" .=) <$> _ucrName,
("clusterId" .=) <$> _ucrClusterId,
("projectId" .=) <$> _ucrProjectId,
("update" .=) <$> _ucrUpdate])
data SetAddonsConfigRequest = SetAddonsConfigRequest'
{ _sacrZone :: !(Maybe Text)
, _sacrAddonsConfig :: !(Maybe AddonsConfig)
, _sacrName :: !(Maybe Text)
, _sacrClusterId :: !(Maybe Text)
, _sacrProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setAddonsConfigRequest
:: SetAddonsConfigRequest
setAddonsConfigRequest =
SetAddonsConfigRequest'
{ _sacrZone = Nothing
, _sacrAddonsConfig = Nothing
, _sacrName = Nothing
, _sacrClusterId = Nothing
, _sacrProjectId = Nothing
}
sacrZone :: Lens' SetAddonsConfigRequest (Maybe Text)
sacrZone = lens _sacrZone (\ s a -> s{_sacrZone = a})
sacrAddonsConfig :: Lens' SetAddonsConfigRequest (Maybe AddonsConfig)
sacrAddonsConfig
= lens _sacrAddonsConfig
(\ s a -> s{_sacrAddonsConfig = a})
sacrName :: Lens' SetAddonsConfigRequest (Maybe Text)
sacrName = lens _sacrName (\ s a -> s{_sacrName = a})
sacrClusterId :: Lens' SetAddonsConfigRequest (Maybe Text)
sacrClusterId
= lens _sacrClusterId
(\ s a -> s{_sacrClusterId = a})
sacrProjectId :: Lens' SetAddonsConfigRequest (Maybe Text)
sacrProjectId
= lens _sacrProjectId
(\ s a -> s{_sacrProjectId = a})
instance FromJSON SetAddonsConfigRequest where
parseJSON
= withObject "SetAddonsConfigRequest"
(\ o ->
SetAddonsConfigRequest' <$>
(o .:? "zone") <*> (o .:? "addonsConfig") <*>
(o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON SetAddonsConfigRequest where
toJSON SetAddonsConfigRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _sacrZone,
("addonsConfig" .=) <$> _sacrAddonsConfig,
("name" .=) <$> _sacrName,
("clusterId" .=) <$> _sacrClusterId,
("projectId" .=) <$> _sacrProjectId])
data NodeConfig = NodeConfig'
{ _ncLocalSsdCount :: !(Maybe (Textual Int32))
, _ncDiskSizeGb :: !(Maybe (Textual Int32))
, _ncTaints :: !(Maybe [NodeTaint])
, _ncOAuthScopes :: !(Maybe [Text])
, _ncServiceAccount :: !(Maybe Text)
, _ncAccelerators :: !(Maybe [AcceleratorConfig])
, _ncImageType :: !(Maybe Text)
, _ncMachineType :: !(Maybe Text)
, _ncMetadata :: !(Maybe NodeConfigMetadata)
, _ncDiskType :: !(Maybe Text)
, _ncLabels :: !(Maybe NodeConfigLabels)
, _ncMinCPUPlatform :: !(Maybe Text)
, _ncTags :: !(Maybe [Text])
, _ncPreemptible :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
nodeConfig
:: NodeConfig
nodeConfig =
NodeConfig'
{ _ncLocalSsdCount = Nothing
, _ncDiskSizeGb = Nothing
, _ncTaints = Nothing
, _ncOAuthScopes = Nothing
, _ncServiceAccount = Nothing
, _ncAccelerators = Nothing
, _ncImageType = Nothing
, _ncMachineType = Nothing
, _ncMetadata = Nothing
, _ncDiskType = Nothing
, _ncLabels = Nothing
, _ncMinCPUPlatform = 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
ncTaints :: Lens' NodeConfig [NodeTaint]
ncTaints
= lens _ncTaints (\ s a -> s{_ncTaints = a}) .
_Default
. _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})
ncAccelerators :: Lens' NodeConfig [AcceleratorConfig]
ncAccelerators
= lens _ncAccelerators
(\ s a -> s{_ncAccelerators = a})
. _Default
. _Coerce
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})
ncDiskType :: Lens' NodeConfig (Maybe Text)
ncDiskType
= lens _ncDiskType (\ s a -> s{_ncDiskType = a})
ncLabels :: Lens' NodeConfig (Maybe NodeConfigLabels)
ncLabels = lens _ncLabels (\ s a -> s{_ncLabels = a})
ncMinCPUPlatform :: Lens' NodeConfig (Maybe Text)
ncMinCPUPlatform
= lens _ncMinCPUPlatform
(\ s a -> s{_ncMinCPUPlatform = 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 .:? "taints" .!= mempty)
<*> (o .:? "oauthScopes" .!= mempty)
<*> (o .:? "serviceAccount")
<*> (o .:? "accelerators" .!= mempty)
<*> (o .:? "imageType")
<*> (o .:? "machineType")
<*> (o .:? "metadata")
<*> (o .:? "diskType")
<*> (o .:? "labels")
<*> (o .:? "minCpuPlatform")
<*> (o .:? "tags" .!= mempty)
<*> (o .:? "preemptible"))
instance ToJSON NodeConfig where
toJSON NodeConfig'{..}
= object
(catMaybes
[("localSsdCount" .=) <$> _ncLocalSsdCount,
("diskSizeGb" .=) <$> _ncDiskSizeGb,
("taints" .=) <$> _ncTaints,
("oauthScopes" .=) <$> _ncOAuthScopes,
("serviceAccount" .=) <$> _ncServiceAccount,
("accelerators" .=) <$> _ncAccelerators,
("imageType" .=) <$> _ncImageType,
("machineType" .=) <$> _ncMachineType,
("metadata" .=) <$> _ncMetadata,
("diskType" .=) <$> _ncDiskType,
("labels" .=) <$> _ncLabels,
("minCpuPlatform" .=) <$> _ncMinCPUPlatform,
("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'
{ _oNodepoolConditions :: !(Maybe [StatusCondition])
, _oStatus :: !(Maybe OperationStatus)
, _oLocation :: !(Maybe Text)
, _oStartTime :: !(Maybe Text)
, _oZone :: !(Maybe Text)
, _oSelfLink :: !(Maybe Text)
, _oName :: !(Maybe Text)
, _oStatusMessage :: !(Maybe Text)
, _oEndTime :: !(Maybe Text)
, _oClusterConditions :: !(Maybe [StatusCondition])
, _oOperationType :: !(Maybe OperationOperationType)
, _oTargetLink :: !(Maybe Text)
, _oDetail :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operation
:: Operation
operation =
Operation'
{ _oNodepoolConditions = Nothing
, _oStatus = Nothing
, _oLocation = Nothing
, _oStartTime = Nothing
, _oZone = Nothing
, _oSelfLink = Nothing
, _oName = Nothing
, _oStatusMessage = Nothing
, _oEndTime = Nothing
, _oClusterConditions = Nothing
, _oOperationType = Nothing
, _oTargetLink = Nothing
, _oDetail = Nothing
}
oNodepoolConditions :: Lens' Operation [StatusCondition]
oNodepoolConditions
= lens _oNodepoolConditions
(\ s a -> s{_oNodepoolConditions = a})
. _Default
. _Coerce
oStatus :: Lens' Operation (Maybe OperationStatus)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})
oLocation :: Lens' Operation (Maybe Text)
oLocation
= lens _oLocation (\ s a -> s{_oLocation = a})
oStartTime :: Lens' Operation (Maybe Text)
oStartTime
= lens _oStartTime (\ s a -> s{_oStartTime = 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})
oEndTime :: Lens' Operation (Maybe Text)
oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a})
oClusterConditions :: Lens' Operation [StatusCondition]
oClusterConditions
= lens _oClusterConditions
(\ s a -> s{_oClusterConditions = a})
. _Default
. _Coerce
oOperationType :: Lens' Operation (Maybe OperationOperationType)
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 .:? "nodepoolConditions" .!= mempty) <*>
(o .:? "status")
<*> (o .:? "location")
<*> (o .:? "startTime")
<*> (o .:? "zone")
<*> (o .:? "selfLink")
<*> (o .:? "name")
<*> (o .:? "statusMessage")
<*> (o .:? "endTime")
<*> (o .:? "clusterConditions" .!= mempty)
<*> (o .:? "operationType")
<*> (o .:? "targetLink")
<*> (o .:? "detail"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("nodepoolConditions" .=) <$> _oNodepoolConditions,
("status" .=) <$> _oStatus,
("location" .=) <$> _oLocation,
("startTime" .=) <$> _oStartTime,
("zone" .=) <$> _oZone,
("selfLink" .=) <$> _oSelfLink,
("name" .=) <$> _oName,
("statusMessage" .=) <$> _oStatusMessage,
("endTime" .=) <$> _oEndTime,
("clusterConditions" .=) <$> _oClusterConditions,
("operationType" .=) <$> _oOperationType,
("targetLink" .=) <$> _oTargetLink,
("detail" .=) <$> _oDetail])
newtype ClusterResourceLabels = ClusterResourceLabels'
{ _crlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
clusterResourceLabels
:: HashMap Text Text
-> ClusterResourceLabels
clusterResourceLabels pCrlAddtional_ =
ClusterResourceLabels'
{ _crlAddtional = _Coerce # pCrlAddtional_
}
crlAddtional :: Lens' ClusterResourceLabels (HashMap Text Text)
crlAddtional
= lens _crlAddtional (\ s a -> s{_crlAddtional = a})
. _Coerce
instance FromJSON ClusterResourceLabels where
parseJSON
= withObject "ClusterResourceLabels"
(\ o ->
ClusterResourceLabels' <$> (parseJSONObject o))
instance ToJSON ClusterResourceLabels where
toJSON = toJSON . _crlAddtional
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 SetNodePoolAutoscalingRequest = SetNodePoolAutoscalingRequest'
{ _snparAutoscaling :: !(Maybe NodePoolAutoscaling)
, _snparZone :: !(Maybe Text)
, _snparNodePoolId :: !(Maybe Text)
, _snparName :: !(Maybe Text)
, _snparClusterId :: !(Maybe Text)
, _snparProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setNodePoolAutoscalingRequest
:: SetNodePoolAutoscalingRequest
setNodePoolAutoscalingRequest =
SetNodePoolAutoscalingRequest'
{ _snparAutoscaling = Nothing
, _snparZone = Nothing
, _snparNodePoolId = Nothing
, _snparName = Nothing
, _snparClusterId = Nothing
, _snparProjectId = Nothing
}
snparAutoscaling :: Lens' SetNodePoolAutoscalingRequest (Maybe NodePoolAutoscaling)
snparAutoscaling
= lens _snparAutoscaling
(\ s a -> s{_snparAutoscaling = a})
snparZone :: Lens' SetNodePoolAutoscalingRequest (Maybe Text)
snparZone
= lens _snparZone (\ s a -> s{_snparZone = a})
snparNodePoolId :: Lens' SetNodePoolAutoscalingRequest (Maybe Text)
snparNodePoolId
= lens _snparNodePoolId
(\ s a -> s{_snparNodePoolId = a})
snparName :: Lens' SetNodePoolAutoscalingRequest (Maybe Text)
snparName
= lens _snparName (\ s a -> s{_snparName = a})
snparClusterId :: Lens' SetNodePoolAutoscalingRequest (Maybe Text)
snparClusterId
= lens _snparClusterId
(\ s a -> s{_snparClusterId = a})
snparProjectId :: Lens' SetNodePoolAutoscalingRequest (Maybe Text)
snparProjectId
= lens _snparProjectId
(\ s a -> s{_snparProjectId = a})
instance FromJSON SetNodePoolAutoscalingRequest where
parseJSON
= withObject "SetNodePoolAutoscalingRequest"
(\ o ->
SetNodePoolAutoscalingRequest' <$>
(o .:? "autoscaling") <*> (o .:? "zone") <*>
(o .:? "nodePoolId")
<*> (o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON SetNodePoolAutoscalingRequest where
toJSON SetNodePoolAutoscalingRequest'{..}
= object
(catMaybes
[("autoscaling" .=) <$> _snparAutoscaling,
("zone" .=) <$> _snparZone,
("nodePoolId" .=) <$> _snparNodePoolId,
("name" .=) <$> _snparName,
("clusterId" .=) <$> _snparClusterId,
("projectId" .=) <$> _snparProjectId])
data CompleteIPRotationRequest = CompleteIPRotationRequest'
{ _cirrZone :: !(Maybe Text)
, _cirrName :: !(Maybe Text)
, _cirrClusterId :: !(Maybe Text)
, _cirrProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
completeIPRotationRequest
:: CompleteIPRotationRequest
completeIPRotationRequest =
CompleteIPRotationRequest'
{ _cirrZone = Nothing
, _cirrName = Nothing
, _cirrClusterId = Nothing
, _cirrProjectId = Nothing
}
cirrZone :: Lens' CompleteIPRotationRequest (Maybe Text)
cirrZone = lens _cirrZone (\ s a -> s{_cirrZone = a})
cirrName :: Lens' CompleteIPRotationRequest (Maybe Text)
cirrName = lens _cirrName (\ s a -> s{_cirrName = a})
cirrClusterId :: Lens' CompleteIPRotationRequest (Maybe Text)
cirrClusterId
= lens _cirrClusterId
(\ s a -> s{_cirrClusterId = a})
cirrProjectId :: Lens' CompleteIPRotationRequest (Maybe Text)
cirrProjectId
= lens _cirrProjectId
(\ s a -> s{_cirrProjectId = a})
instance FromJSON CompleteIPRotationRequest where
parseJSON
= withObject "CompleteIPRotationRequest"
(\ o ->
CompleteIPRotationRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON CompleteIPRotationRequest where
toJSON CompleteIPRotationRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _cirrZone,
("name" .=) <$> _cirrName,
("clusterId" .=) <$> _cirrClusterId,
("projectId" .=) <$> _cirrProjectId])
data NodeManagement = NodeManagement'
{ _nmAutoUpgrade :: !(Maybe Bool)
, _nmAutoRepair :: !(Maybe Bool)
, _nmUpgradeOptions :: !(Maybe AutoUpgradeOptions)
} deriving (Eq,Show,Data,Typeable,Generic)
nodeManagement
:: NodeManagement
nodeManagement =
NodeManagement'
{ _nmAutoUpgrade = Nothing
, _nmAutoRepair = Nothing
, _nmUpgradeOptions = Nothing
}
nmAutoUpgrade :: Lens' NodeManagement (Maybe Bool)
nmAutoUpgrade
= lens _nmAutoUpgrade
(\ s a -> s{_nmAutoUpgrade = a})
nmAutoRepair :: Lens' NodeManagement (Maybe Bool)
nmAutoRepair
= lens _nmAutoRepair (\ s a -> s{_nmAutoRepair = 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 .:? "autoRepair") <*>
(o .:? "upgradeOptions"))
instance ToJSON NodeManagement where
toJSON NodeManagement'{..}
= object
(catMaybes
[("autoUpgrade" .=) <$> _nmAutoUpgrade,
("autoRepair" .=) <$> _nmAutoRepair,
("upgradeOptions" .=) <$> _nmUpgradeOptions])
data NodeTaint = NodeTaint'
{ _ntEffect :: !(Maybe NodeTaintEffect)
, _ntValue :: !(Maybe Text)
, _ntKey :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
nodeTaint
:: NodeTaint
nodeTaint =
NodeTaint'
{ _ntEffect = Nothing
, _ntValue = Nothing
, _ntKey = Nothing
}
ntEffect :: Lens' NodeTaint (Maybe NodeTaintEffect)
ntEffect = lens _ntEffect (\ s a -> s{_ntEffect = a})
ntValue :: Lens' NodeTaint (Maybe Text)
ntValue = lens _ntValue (\ s a -> s{_ntValue = a})
ntKey :: Lens' NodeTaint (Maybe Text)
ntKey = lens _ntKey (\ s a -> s{_ntKey = a})
instance FromJSON NodeTaint where
parseJSON
= withObject "NodeTaint"
(\ o ->
NodeTaint' <$>
(o .:? "effect") <*> (o .:? "value") <*>
(o .:? "key"))
instance ToJSON NodeTaint where
toJSON NodeTaint'{..}
= object
(catMaybes
[("effect" .=) <$> _ntEffect,
("value" .=) <$> _ntValue, ("key" .=) <$> _ntKey])
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 SetMaintenancePolicyRequest = SetMaintenancePolicyRequest'
{ _smprZone :: !(Maybe Text)
, _smprName :: !(Maybe Text)
, _smprClusterId :: !(Maybe Text)
, _smprMaintenancePolicy :: !(Maybe MaintenancePolicy)
, _smprProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setMaintenancePolicyRequest
:: SetMaintenancePolicyRequest
setMaintenancePolicyRequest =
SetMaintenancePolicyRequest'
{ _smprZone = Nothing
, _smprName = Nothing
, _smprClusterId = Nothing
, _smprMaintenancePolicy = Nothing
, _smprProjectId = Nothing
}
smprZone :: Lens' SetMaintenancePolicyRequest (Maybe Text)
smprZone = lens _smprZone (\ s a -> s{_smprZone = a})
smprName :: Lens' SetMaintenancePolicyRequest (Maybe Text)
smprName = lens _smprName (\ s a -> s{_smprName = a})
smprClusterId :: Lens' SetMaintenancePolicyRequest (Maybe Text)
smprClusterId
= lens _smprClusterId
(\ s a -> s{_smprClusterId = a})
smprMaintenancePolicy :: Lens' SetMaintenancePolicyRequest (Maybe MaintenancePolicy)
smprMaintenancePolicy
= lens _smprMaintenancePolicy
(\ s a -> s{_smprMaintenancePolicy = a})
smprProjectId :: Lens' SetMaintenancePolicyRequest (Maybe Text)
smprProjectId
= lens _smprProjectId
(\ s a -> s{_smprProjectId = a})
instance FromJSON SetMaintenancePolicyRequest where
parseJSON
= withObject "SetMaintenancePolicyRequest"
(\ o ->
SetMaintenancePolicyRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "clusterId")
<*> (o .:? "maintenancePolicy")
<*> (o .:? "projectId"))
instance ToJSON SetMaintenancePolicyRequest where
toJSON SetMaintenancePolicyRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _smprZone,
("name" .=) <$> _smprName,
("clusterId" .=) <$> _smprClusterId,
("maintenancePolicy" .=) <$> _smprMaintenancePolicy,
("projectId" .=) <$> _smprProjectId])
newtype KubernetesDashboard = KubernetesDashboard'
{ _kdDisabled :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
kubernetesDashboard
:: KubernetesDashboard
kubernetesDashboard =
KubernetesDashboard'
{ _kdDisabled = Nothing
}
kdDisabled :: Lens' KubernetesDashboard (Maybe Bool)
kdDisabled
= lens _kdDisabled (\ s a -> s{_kdDisabled = a})
instance FromJSON KubernetesDashboard where
parseJSON
= withObject "KubernetesDashboard"
(\ o -> KubernetesDashboard' <$> (o .:? "disabled"))
instance ToJSON KubernetesDashboard where
toJSON KubernetesDashboard'{..}
= object
(catMaybes [("disabled" .=) <$> _kdDisabled])
newtype ClientCertificateConfig = ClientCertificateConfig'
{ _cccIssueClientCertificate :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
clientCertificateConfig
:: ClientCertificateConfig
clientCertificateConfig =
ClientCertificateConfig'
{ _cccIssueClientCertificate = Nothing
}
cccIssueClientCertificate :: Lens' ClientCertificateConfig (Maybe Bool)
cccIssueClientCertificate
= lens _cccIssueClientCertificate
(\ s a -> s{_cccIssueClientCertificate = a})
instance FromJSON ClientCertificateConfig where
parseJSON
= withObject "ClientCertificateConfig"
(\ o ->
ClientCertificateConfig' <$>
(o .:? "issueClientCertificate"))
instance ToJSON ClientCertificateConfig where
toJSON ClientCertificateConfig'{..}
= object
(catMaybes
[("issueClientCertificate" .=) <$>
_cccIssueClientCertificate])
data SetLabelsRequest = SetLabelsRequest'
{ _slrResourceLabels :: !(Maybe SetLabelsRequestResourceLabels)
, _slrZone :: !(Maybe Text)
, _slrName :: !(Maybe Text)
, _slrClusterId :: !(Maybe Text)
, _slrProjectId :: !(Maybe Text)
, _slrLabelFingerprint :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setLabelsRequest
:: SetLabelsRequest
setLabelsRequest =
SetLabelsRequest'
{ _slrResourceLabels = Nothing
, _slrZone = Nothing
, _slrName = Nothing
, _slrClusterId = Nothing
, _slrProjectId = Nothing
, _slrLabelFingerprint = Nothing
}
slrResourceLabels :: Lens' SetLabelsRequest (Maybe SetLabelsRequestResourceLabels)
slrResourceLabels
= lens _slrResourceLabels
(\ s a -> s{_slrResourceLabels = a})
slrZone :: Lens' SetLabelsRequest (Maybe Text)
slrZone = lens _slrZone (\ s a -> s{_slrZone = a})
slrName :: Lens' SetLabelsRequest (Maybe Text)
slrName = lens _slrName (\ s a -> s{_slrName = a})
slrClusterId :: Lens' SetLabelsRequest (Maybe Text)
slrClusterId
= lens _slrClusterId (\ s a -> s{_slrClusterId = a})
slrProjectId :: Lens' SetLabelsRequest (Maybe Text)
slrProjectId
= lens _slrProjectId (\ s a -> s{_slrProjectId = a})
slrLabelFingerprint :: Lens' SetLabelsRequest (Maybe Text)
slrLabelFingerprint
= lens _slrLabelFingerprint
(\ s a -> s{_slrLabelFingerprint = a})
instance FromJSON SetLabelsRequest where
parseJSON
= withObject "SetLabelsRequest"
(\ o ->
SetLabelsRequest' <$>
(o .:? "resourceLabels") <*> (o .:? "zone") <*>
(o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId")
<*> (o .:? "labelFingerprint"))
instance ToJSON SetLabelsRequest where
toJSON SetLabelsRequest'{..}
= object
(catMaybes
[("resourceLabels" .=) <$> _slrResourceLabels,
("zone" .=) <$> _slrZone, ("name" .=) <$> _slrName,
("clusterId" .=) <$> _slrClusterId,
("projectId" .=) <$> _slrProjectId,
("labelFingerprint" .=) <$> _slrLabelFingerprint])
newtype MaintenanceWindow = MaintenanceWindow'
{ _mwDailyMaintenanceWindow :: Maybe DailyMaintenanceWindow
} deriving (Eq,Show,Data,Typeable,Generic)
maintenanceWindow
:: MaintenanceWindow
maintenanceWindow =
MaintenanceWindow'
{ _mwDailyMaintenanceWindow = Nothing
}
mwDailyMaintenanceWindow :: Lens' MaintenanceWindow (Maybe DailyMaintenanceWindow)
mwDailyMaintenanceWindow
= lens _mwDailyMaintenanceWindow
(\ s a -> s{_mwDailyMaintenanceWindow = a})
instance FromJSON MaintenanceWindow where
parseJSON
= withObject "MaintenanceWindow"
(\ o ->
MaintenanceWindow' <$>
(o .:? "dailyMaintenanceWindow"))
instance ToJSON MaintenanceWindow where
toJSON MaintenanceWindow'{..}
= object
(catMaybes
[("dailyMaintenanceWindow" .=) <$>
_mwDailyMaintenanceWindow])
data IPAllocationPolicy = IPAllocationPolicy'
{ _iapServicesSecondaryRangeName :: !(Maybe Text)
, _iapNodeIPv4CIdR :: !(Maybe Text)
, _iapUseIPAliases :: !(Maybe Bool)
, _iapClusterIPv4CIdR :: !(Maybe Text)
, _iapSubnetworkName :: !(Maybe Text)
, _iapClusterSecondaryRangeName :: !(Maybe Text)
, _iapNodeIPv4CIdRBlock :: !(Maybe Text)
, _iapServicesIPv4CIdR :: !(Maybe Text)
, _iapClusterIPv4CIdRBlock :: !(Maybe Text)
, _iapServicesIPv4CIdRBlock :: !(Maybe Text)
, _iapCreateSubnetwork :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
ipAllocationPolicy
:: IPAllocationPolicy
ipAllocationPolicy =
IPAllocationPolicy'
{ _iapServicesSecondaryRangeName = Nothing
, _iapNodeIPv4CIdR = Nothing
, _iapUseIPAliases = Nothing
, _iapClusterIPv4CIdR = Nothing
, _iapSubnetworkName = Nothing
, _iapClusterSecondaryRangeName = Nothing
, _iapNodeIPv4CIdRBlock = Nothing
, _iapServicesIPv4CIdR = Nothing
, _iapClusterIPv4CIdRBlock = Nothing
, _iapServicesIPv4CIdRBlock = Nothing
, _iapCreateSubnetwork = Nothing
}
iapServicesSecondaryRangeName :: Lens' IPAllocationPolicy (Maybe Text)
iapServicesSecondaryRangeName
= lens _iapServicesSecondaryRangeName
(\ s a -> s{_iapServicesSecondaryRangeName = a})
iapNodeIPv4CIdR :: Lens' IPAllocationPolicy (Maybe Text)
iapNodeIPv4CIdR
= lens _iapNodeIPv4CIdR
(\ s a -> s{_iapNodeIPv4CIdR = a})
iapUseIPAliases :: Lens' IPAllocationPolicy (Maybe Bool)
iapUseIPAliases
= lens _iapUseIPAliases
(\ s a -> s{_iapUseIPAliases = a})
iapClusterIPv4CIdR :: Lens' IPAllocationPolicy (Maybe Text)
iapClusterIPv4CIdR
= lens _iapClusterIPv4CIdR
(\ s a -> s{_iapClusterIPv4CIdR = a})
iapSubnetworkName :: Lens' IPAllocationPolicy (Maybe Text)
iapSubnetworkName
= lens _iapSubnetworkName
(\ s a -> s{_iapSubnetworkName = a})
iapClusterSecondaryRangeName :: Lens' IPAllocationPolicy (Maybe Text)
iapClusterSecondaryRangeName
= lens _iapClusterSecondaryRangeName
(\ s a -> s{_iapClusterSecondaryRangeName = a})
iapNodeIPv4CIdRBlock :: Lens' IPAllocationPolicy (Maybe Text)
iapNodeIPv4CIdRBlock
= lens _iapNodeIPv4CIdRBlock
(\ s a -> s{_iapNodeIPv4CIdRBlock = a})
iapServicesIPv4CIdR :: Lens' IPAllocationPolicy (Maybe Text)
iapServicesIPv4CIdR
= lens _iapServicesIPv4CIdR
(\ s a -> s{_iapServicesIPv4CIdR = a})
iapClusterIPv4CIdRBlock :: Lens' IPAllocationPolicy (Maybe Text)
iapClusterIPv4CIdRBlock
= lens _iapClusterIPv4CIdRBlock
(\ s a -> s{_iapClusterIPv4CIdRBlock = a})
iapServicesIPv4CIdRBlock :: Lens' IPAllocationPolicy (Maybe Text)
iapServicesIPv4CIdRBlock
= lens _iapServicesIPv4CIdRBlock
(\ s a -> s{_iapServicesIPv4CIdRBlock = a})
iapCreateSubnetwork :: Lens' IPAllocationPolicy (Maybe Bool)
iapCreateSubnetwork
= lens _iapCreateSubnetwork
(\ s a -> s{_iapCreateSubnetwork = a})
instance FromJSON IPAllocationPolicy where
parseJSON
= withObject "IPAllocationPolicy"
(\ o ->
IPAllocationPolicy' <$>
(o .:? "servicesSecondaryRangeName") <*>
(o .:? "nodeIpv4Cidr")
<*> (o .:? "useIpAliases")
<*> (o .:? "clusterIpv4Cidr")
<*> (o .:? "subnetworkName")
<*> (o .:? "clusterSecondaryRangeName")
<*> (o .:? "nodeIpv4CidrBlock")
<*> (o .:? "servicesIpv4Cidr")
<*> (o .:? "clusterIpv4CidrBlock")
<*> (o .:? "servicesIpv4CidrBlock")
<*> (o .:? "createSubnetwork"))
instance ToJSON IPAllocationPolicy where
toJSON IPAllocationPolicy'{..}
= object
(catMaybes
[("servicesSecondaryRangeName" .=) <$>
_iapServicesSecondaryRangeName,
("nodeIpv4Cidr" .=) <$> _iapNodeIPv4CIdR,
("useIpAliases" .=) <$> _iapUseIPAliases,
("clusterIpv4Cidr" .=) <$> _iapClusterIPv4CIdR,
("subnetworkName" .=) <$> _iapSubnetworkName,
("clusterSecondaryRangeName" .=) <$>
_iapClusterSecondaryRangeName,
("nodeIpv4CidrBlock" .=) <$> _iapNodeIPv4CIdRBlock,
("servicesIpv4Cidr" .=) <$> _iapServicesIPv4CIdR,
("clusterIpv4CidrBlock" .=) <$>
_iapClusterIPv4CIdRBlock,
("servicesIpv4CidrBlock" .=) <$>
_iapServicesIPv4CIdRBlock,
("createSubnetwork" .=) <$> _iapCreateSubnetwork])
data AddonsConfig = AddonsConfig'
{ _acNetworkPolicyConfig :: !(Maybe NetworkPolicyConfig)
, _acHorizontalPodAutoscaling :: !(Maybe HorizontalPodAutoscaling)
, _acHTTPLoadBalancing :: !(Maybe HTTPLoadBalancing)
, _acKubernetesDashboard :: !(Maybe KubernetesDashboard)
} deriving (Eq,Show,Data,Typeable,Generic)
addonsConfig
:: AddonsConfig
addonsConfig =
AddonsConfig'
{ _acNetworkPolicyConfig = Nothing
, _acHorizontalPodAutoscaling = Nothing
, _acHTTPLoadBalancing = Nothing
, _acKubernetesDashboard = Nothing
}
acNetworkPolicyConfig :: Lens' AddonsConfig (Maybe NetworkPolicyConfig)
acNetworkPolicyConfig
= lens _acNetworkPolicyConfig
(\ s a -> s{_acNetworkPolicyConfig = a})
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})
acKubernetesDashboard :: Lens' AddonsConfig (Maybe KubernetesDashboard)
acKubernetesDashboard
= lens _acKubernetesDashboard
(\ s a -> s{_acKubernetesDashboard = a})
instance FromJSON AddonsConfig where
parseJSON
= withObject "AddonsConfig"
(\ o ->
AddonsConfig' <$>
(o .:? "networkPolicyConfig") <*>
(o .:? "horizontalPodAutoscaling")
<*> (o .:? "httpLoadBalancing")
<*> (o .:? "kubernetesDashboard"))
instance ToJSON AddonsConfig where
toJSON AddonsConfig'{..}
= object
(catMaybes
[("networkPolicyConfig" .=) <$>
_acNetworkPolicyConfig,
("horizontalPodAutoscaling" .=) <$>
_acHorizontalPodAutoscaling,
("httpLoadBalancing" .=) <$> _acHTTPLoadBalancing,
("kubernetesDashboard" .=) <$>
_acKubernetesDashboard])
data NetworkConfig = NetworkConfig'
{ _ncNetwork :: !(Maybe Text)
, _ncSubnetwork :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
networkConfig
:: NetworkConfig
networkConfig =
NetworkConfig'
{ _ncNetwork = Nothing
, _ncSubnetwork = Nothing
}
ncNetwork :: Lens' NetworkConfig (Maybe Text)
ncNetwork
= lens _ncNetwork (\ s a -> s{_ncNetwork = a})
ncSubnetwork :: Lens' NetworkConfig (Maybe Text)
ncSubnetwork
= lens _ncSubnetwork (\ s a -> s{_ncSubnetwork = a})
instance FromJSON NetworkConfig where
parseJSON
= withObject "NetworkConfig"
(\ o ->
NetworkConfig' <$>
(o .:? "network") <*> (o .:? "subnetwork"))
instance ToJSON NetworkConfig where
toJSON NetworkConfig'{..}
= object
(catMaybes
[("network" .=) <$> _ncNetwork,
("subnetwork" .=) <$> _ncSubnetwork])
data NodePool = NodePool'
{ _npStatus :: !(Maybe NodePoolStatus)
, _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)
, _npConditions :: !(Maybe [StatusCondition])
, _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
, _npConditions = Nothing
, _npInstanceGroupURLs = Nothing
}
npStatus :: Lens' NodePool (Maybe NodePoolStatus)
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})
npConditions :: Lens' NodePool [StatusCondition]
npConditions
= lens _npConditions (\ s a -> s{_npConditions = a})
. _Default
. _Coerce
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 .:? "conditions" .!= mempty)
<*> (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,
("conditions" .=) <$> _npConditions,
("instanceGroupUrls" .=) <$> _npInstanceGroupURLs])
data SetNodePoolManagementRequest = SetNodePoolManagementRequest'
{ _snpmrManagement :: !(Maybe NodeManagement)
, _snpmrZone :: !(Maybe Text)
, _snpmrNodePoolId :: !(Maybe Text)
, _snpmrName :: !(Maybe Text)
, _snpmrClusterId :: !(Maybe Text)
, _snpmrProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setNodePoolManagementRequest
:: SetNodePoolManagementRequest
setNodePoolManagementRequest =
SetNodePoolManagementRequest'
{ _snpmrManagement = Nothing
, _snpmrZone = Nothing
, _snpmrNodePoolId = Nothing
, _snpmrName = Nothing
, _snpmrClusterId = Nothing
, _snpmrProjectId = Nothing
}
snpmrManagement :: Lens' SetNodePoolManagementRequest (Maybe NodeManagement)
snpmrManagement
= lens _snpmrManagement
(\ s a -> s{_snpmrManagement = a})
snpmrZone :: Lens' SetNodePoolManagementRequest (Maybe Text)
snpmrZone
= lens _snpmrZone (\ s a -> s{_snpmrZone = a})
snpmrNodePoolId :: Lens' SetNodePoolManagementRequest (Maybe Text)
snpmrNodePoolId
= lens _snpmrNodePoolId
(\ s a -> s{_snpmrNodePoolId = a})
snpmrName :: Lens' SetNodePoolManagementRequest (Maybe Text)
snpmrName
= lens _snpmrName (\ s a -> s{_snpmrName = a})
snpmrClusterId :: Lens' SetNodePoolManagementRequest (Maybe Text)
snpmrClusterId
= lens _snpmrClusterId
(\ s a -> s{_snpmrClusterId = a})
snpmrProjectId :: Lens' SetNodePoolManagementRequest (Maybe Text)
snpmrProjectId
= lens _snpmrProjectId
(\ s a -> s{_snpmrProjectId = a})
instance FromJSON SetNodePoolManagementRequest where
parseJSON
= withObject "SetNodePoolManagementRequest"
(\ o ->
SetNodePoolManagementRequest' <$>
(o .:? "management") <*> (o .:? "zone") <*>
(o .:? "nodePoolId")
<*> (o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON SetNodePoolManagementRequest where
toJSON SetNodePoolManagementRequest'{..}
= object
(catMaybes
[("management" .=) <$> _snpmrManagement,
("zone" .=) <$> _snpmrZone,
("nodePoolId" .=) <$> _snpmrNodePoolId,
("name" .=) <$> _snpmrName,
("clusterId" .=) <$> _snpmrClusterId,
("projectId" .=) <$> _snpmrProjectId])
data MasterAuthorizedNetworksConfig = MasterAuthorizedNetworksConfig'
{ _mancEnabled :: !(Maybe Bool)
, _mancCIdRBlocks :: !(Maybe [CIdRBlock])
} deriving (Eq,Show,Data,Typeable,Generic)
masterAuthorizedNetworksConfig
:: MasterAuthorizedNetworksConfig
masterAuthorizedNetworksConfig =
MasterAuthorizedNetworksConfig'
{ _mancEnabled = Nothing
, _mancCIdRBlocks = Nothing
}
mancEnabled :: Lens' MasterAuthorizedNetworksConfig (Maybe Bool)
mancEnabled
= lens _mancEnabled (\ s a -> s{_mancEnabled = a})
mancCIdRBlocks :: Lens' MasterAuthorizedNetworksConfig [CIdRBlock]
mancCIdRBlocks
= lens _mancCIdRBlocks
(\ s a -> s{_mancCIdRBlocks = a})
. _Default
. _Coerce
instance FromJSON MasterAuthorizedNetworksConfig
where
parseJSON
= withObject "MasterAuthorizedNetworksConfig"
(\ o ->
MasterAuthorizedNetworksConfig' <$>
(o .:? "enabled") <*>
(o .:? "cidrBlocks" .!= mempty))
instance ToJSON MasterAuthorizedNetworksConfig where
toJSON MasterAuthorizedNetworksConfig'{..}
= object
(catMaybes
[("enabled" .=) <$> _mancEnabled,
("cidrBlocks" .=) <$> _mancCIdRBlocks])
newtype LegacyAbac = LegacyAbac'
{ _laEnabled :: Maybe Bool
} deriving (Eq,Show,Data,Typeable,Generic)
legacyAbac
:: LegacyAbac
legacyAbac =
LegacyAbac'
{ _laEnabled = Nothing
}
laEnabled :: Lens' LegacyAbac (Maybe Bool)
laEnabled
= lens _laEnabled (\ s a -> s{_laEnabled = a})
instance FromJSON LegacyAbac where
parseJSON
= withObject "LegacyAbac"
(\ o -> LegacyAbac' <$> (o .:? "enabled"))
instance ToJSON LegacyAbac where
toJSON LegacyAbac'{..}
= object (catMaybes [("enabled" .=) <$> _laEnabled])
data MasterAuth = MasterAuth'
{ _maClientKey :: !(Maybe Text)
, _maUsername :: !(Maybe Text)
, _maClientCertificateConfig :: !(Maybe ClientCertificateConfig)
, _maClientCertificate :: !(Maybe Text)
, _maPassword :: !(Maybe Text)
, _maClusterCaCertificate :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
masterAuth
:: MasterAuth
masterAuth =
MasterAuth'
{ _maClientKey = Nothing
, _maUsername = Nothing
, _maClientCertificateConfig = 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})
maClientCertificateConfig :: Lens' MasterAuth (Maybe ClientCertificateConfig)
maClientCertificateConfig
= lens _maClientCertificateConfig
(\ s a -> s{_maClientCertificateConfig = 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 .:? "clientCertificateConfig")
<*> (o .:? "clientCertificate")
<*> (o .:? "password")
<*> (o .:? "clusterCaCertificate"))
instance ToJSON MasterAuth where
toJSON MasterAuth'{..}
= object
(catMaybes
[("clientKey" .=) <$> _maClientKey,
("username" .=) <$> _maUsername,
("clientCertificateConfig" .=) <$>
_maClientCertificateConfig,
("clientCertificate" .=) <$> _maClientCertificate,
("password" .=) <$> _maPassword,
("clusterCaCertificate" .=) <$>
_maClusterCaCertificate])
data StatusCondition = StatusCondition'
{ _scCode :: !(Maybe StatusConditionCode)
, _scMessage :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
statusCondition
:: StatusCondition
statusCondition =
StatusCondition'
{ _scCode = Nothing
, _scMessage = Nothing
}
scCode :: Lens' StatusCondition (Maybe StatusConditionCode)
scCode = lens _scCode (\ s a -> s{_scCode = a})
scMessage :: Lens' StatusCondition (Maybe Text)
scMessage
= lens _scMessage (\ s a -> s{_scMessage = a})
instance FromJSON StatusCondition where
parseJSON
= withObject "StatusCondition"
(\ o ->
StatusCondition' <$>
(o .:? "code") <*> (o .:? "message"))
instance ToJSON StatusCondition where
toJSON StatusCondition'{..}
= object
(catMaybes
[("code" .=) <$> _scCode,
("message" .=) <$> _scMessage])
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 SetNodePoolSizeRequest = SetNodePoolSizeRequest'
{ _snpsrNodeCount :: !(Maybe (Textual Int32))
, _snpsrZone :: !(Maybe Text)
, _snpsrNodePoolId :: !(Maybe Text)
, _snpsrName :: !(Maybe Text)
, _snpsrClusterId :: !(Maybe Text)
, _snpsrProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setNodePoolSizeRequest
:: SetNodePoolSizeRequest
setNodePoolSizeRequest =
SetNodePoolSizeRequest'
{ _snpsrNodeCount = Nothing
, _snpsrZone = Nothing
, _snpsrNodePoolId = Nothing
, _snpsrName = Nothing
, _snpsrClusterId = Nothing
, _snpsrProjectId = Nothing
}
snpsrNodeCount :: Lens' SetNodePoolSizeRequest (Maybe Int32)
snpsrNodeCount
= lens _snpsrNodeCount
(\ s a -> s{_snpsrNodeCount = a})
. mapping _Coerce
snpsrZone :: Lens' SetNodePoolSizeRequest (Maybe Text)
snpsrZone
= lens _snpsrZone (\ s a -> s{_snpsrZone = a})
snpsrNodePoolId :: Lens' SetNodePoolSizeRequest (Maybe Text)
snpsrNodePoolId
= lens _snpsrNodePoolId
(\ s a -> s{_snpsrNodePoolId = a})
snpsrName :: Lens' SetNodePoolSizeRequest (Maybe Text)
snpsrName
= lens _snpsrName (\ s a -> s{_snpsrName = a})
snpsrClusterId :: Lens' SetNodePoolSizeRequest (Maybe Text)
snpsrClusterId
= lens _snpsrClusterId
(\ s a -> s{_snpsrClusterId = a})
snpsrProjectId :: Lens' SetNodePoolSizeRequest (Maybe Text)
snpsrProjectId
= lens _snpsrProjectId
(\ s a -> s{_snpsrProjectId = a})
instance FromJSON SetNodePoolSizeRequest where
parseJSON
= withObject "SetNodePoolSizeRequest"
(\ o ->
SetNodePoolSizeRequest' <$>
(o .:? "nodeCount") <*> (o .:? "zone") <*>
(o .:? "nodePoolId")
<*> (o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON SetNodePoolSizeRequest where
toJSON SetNodePoolSizeRequest'{..}
= object
(catMaybes
[("nodeCount" .=) <$> _snpsrNodeCount,
("zone" .=) <$> _snpsrZone,
("nodePoolId" .=) <$> _snpsrNodePoolId,
("name" .=) <$> _snpsrName,
("clusterId" .=) <$> _snpsrClusterId,
("projectId" .=) <$> _snpsrProjectId])
data SetMonitoringServiceRequest = SetMonitoringServiceRequest'
{ _smsrZone :: !(Maybe Text)
, _smsrName :: !(Maybe Text)
, _smsrClusterId :: !(Maybe Text)
, _smsrProjectId :: !(Maybe Text)
, _smsrMonitoringService :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setMonitoringServiceRequest
:: SetMonitoringServiceRequest
setMonitoringServiceRequest =
SetMonitoringServiceRequest'
{ _smsrZone = Nothing
, _smsrName = Nothing
, _smsrClusterId = Nothing
, _smsrProjectId = Nothing
, _smsrMonitoringService = Nothing
}
smsrZone :: Lens' SetMonitoringServiceRequest (Maybe Text)
smsrZone = lens _smsrZone (\ s a -> s{_smsrZone = a})
smsrName :: Lens' SetMonitoringServiceRequest (Maybe Text)
smsrName = lens _smsrName (\ s a -> s{_smsrName = a})
smsrClusterId :: Lens' SetMonitoringServiceRequest (Maybe Text)
smsrClusterId
= lens _smsrClusterId
(\ s a -> s{_smsrClusterId = a})
smsrProjectId :: Lens' SetMonitoringServiceRequest (Maybe Text)
smsrProjectId
= lens _smsrProjectId
(\ s a -> s{_smsrProjectId = a})
smsrMonitoringService :: Lens' SetMonitoringServiceRequest (Maybe Text)
smsrMonitoringService
= lens _smsrMonitoringService
(\ s a -> s{_smsrMonitoringService = a})
instance FromJSON SetMonitoringServiceRequest where
parseJSON
= withObject "SetMonitoringServiceRequest"
(\ o ->
SetMonitoringServiceRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "clusterId")
<*> (o .:? "projectId")
<*> (o .:? "monitoringService"))
instance ToJSON SetMonitoringServiceRequest where
toJSON SetMonitoringServiceRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _smsrZone,
("name" .=) <$> _smsrName,
("clusterId" .=) <$> _smsrClusterId,
("projectId" .=) <$> _smsrProjectId,
("monitoringService" .=) <$> _smsrMonitoringService])
data SetLoggingServiceRequest = SetLoggingServiceRequest'
{ _slsrZone :: !(Maybe Text)
, _slsrName :: !(Maybe Text)
, _slsrClusterId :: !(Maybe Text)
, _slsrProjectId :: !(Maybe Text)
, _slsrLoggingService :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
setLoggingServiceRequest
:: SetLoggingServiceRequest
setLoggingServiceRequest =
SetLoggingServiceRequest'
{ _slsrZone = Nothing
, _slsrName = Nothing
, _slsrClusterId = Nothing
, _slsrProjectId = Nothing
, _slsrLoggingService = Nothing
}
slsrZone :: Lens' SetLoggingServiceRequest (Maybe Text)
slsrZone = lens _slsrZone (\ s a -> s{_slsrZone = a})
slsrName :: Lens' SetLoggingServiceRequest (Maybe Text)
slsrName = lens _slsrName (\ s a -> s{_slsrName = a})
slsrClusterId :: Lens' SetLoggingServiceRequest (Maybe Text)
slsrClusterId
= lens _slsrClusterId
(\ s a -> s{_slsrClusterId = a})
slsrProjectId :: Lens' SetLoggingServiceRequest (Maybe Text)
slsrProjectId
= lens _slsrProjectId
(\ s a -> s{_slsrProjectId = a})
slsrLoggingService :: Lens' SetLoggingServiceRequest (Maybe Text)
slsrLoggingService
= lens _slsrLoggingService
(\ s a -> s{_slsrLoggingService = a})
instance FromJSON SetLoggingServiceRequest where
parseJSON
= withObject "SetLoggingServiceRequest"
(\ o ->
SetLoggingServiceRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "clusterId")
<*> (o .:? "projectId")
<*> (o .:? "loggingService"))
instance ToJSON SetLoggingServiceRequest where
toJSON SetLoggingServiceRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _slsrZone,
("name" .=) <$> _slsrName,
("clusterId" .=) <$> _slsrClusterId,
("projectId" .=) <$> _slsrProjectId,
("loggingService" .=) <$> _slsrLoggingService])
newtype MaintenancePolicy = MaintenancePolicy'
{ _mpWindow :: Maybe MaintenanceWindow
} deriving (Eq,Show,Data,Typeable,Generic)
maintenancePolicy
:: MaintenancePolicy
maintenancePolicy =
MaintenancePolicy'
{ _mpWindow = Nothing
}
mpWindow :: Lens' MaintenancePolicy (Maybe MaintenanceWindow)
mpWindow = lens _mpWindow (\ s a -> s{_mpWindow = a})
instance FromJSON MaintenancePolicy where
parseJSON
= withObject "MaintenancePolicy"
(\ o -> MaintenancePolicy' <$> (o .:? "window"))
instance ToJSON MaintenancePolicy where
toJSON MaintenancePolicy'{..}
= object (catMaybes [("window" .=) <$> _mpWindow])
data CIdRBlock = CIdRBlock'
{ _cirbCIdRBlock :: !(Maybe Text)
, _cirbDisplayName :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
cIdRBlock
:: CIdRBlock
cIdRBlock =
CIdRBlock'
{ _cirbCIdRBlock = Nothing
, _cirbDisplayName = Nothing
}
cirbCIdRBlock :: Lens' CIdRBlock (Maybe Text)
cirbCIdRBlock
= lens _cirbCIdRBlock
(\ s a -> s{_cirbCIdRBlock = a})
cirbDisplayName :: Lens' CIdRBlock (Maybe Text)
cirbDisplayName
= lens _cirbDisplayName
(\ s a -> s{_cirbDisplayName = a})
instance FromJSON CIdRBlock where
parseJSON
= withObject "CIdRBlock"
(\ o ->
CIdRBlock' <$>
(o .:? "cidrBlock") <*> (o .:? "displayName"))
instance ToJSON CIdRBlock where
toJSON CIdRBlock'{..}
= object
(catMaybes
[("cidrBlock" .=) <$> _cirbCIdRBlock,
("displayName" .=) <$> _cirbDisplayName])
data AcceleratorConfig = AcceleratorConfig'
{ _acAcceleratorCount :: !(Maybe (Textual Int64))
, _acAcceleratorType :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
acceleratorConfig
:: AcceleratorConfig
acceleratorConfig =
AcceleratorConfig'
{ _acAcceleratorCount = Nothing
, _acAcceleratorType = Nothing
}
acAcceleratorCount :: Lens' AcceleratorConfig (Maybe Int64)
acAcceleratorCount
= lens _acAcceleratorCount
(\ s a -> s{_acAcceleratorCount = a})
. mapping _Coerce
acAcceleratorType :: Lens' AcceleratorConfig (Maybe Text)
acAcceleratorType
= lens _acAcceleratorType
(\ s a -> s{_acAcceleratorType = a})
instance FromJSON AcceleratorConfig where
parseJSON
= withObject "AcceleratorConfig"
(\ o ->
AcceleratorConfig' <$>
(o .:? "acceleratorCount") <*>
(o .:? "acceleratorType"))
instance ToJSON AcceleratorConfig where
toJSON AcceleratorConfig'{..}
= object
(catMaybes
[("acceleratorCount" .=) <$> _acAcceleratorCount,
("acceleratorType" .=) <$> _acAcceleratorType])
data SetLocationsRequest = SetLocationsRequest'
{ _sZone :: !(Maybe Text)
, _sName :: !(Maybe Text)
, _sClusterId :: !(Maybe Text)
, _sProjectId :: !(Maybe Text)
, _sLocations :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
setLocationsRequest
:: SetLocationsRequest
setLocationsRequest =
SetLocationsRequest'
{ _sZone = Nothing
, _sName = Nothing
, _sClusterId = Nothing
, _sProjectId = Nothing
, _sLocations = Nothing
}
sZone :: Lens' SetLocationsRequest (Maybe Text)
sZone = lens _sZone (\ s a -> s{_sZone = a})
sName :: Lens' SetLocationsRequest (Maybe Text)
sName = lens _sName (\ s a -> s{_sName = a})
sClusterId :: Lens' SetLocationsRequest (Maybe Text)
sClusterId
= lens _sClusterId (\ s a -> s{_sClusterId = a})
sProjectId :: Lens' SetLocationsRequest (Maybe Text)
sProjectId
= lens _sProjectId (\ s a -> s{_sProjectId = a})
sLocations :: Lens' SetLocationsRequest [Text]
sLocations
= lens _sLocations (\ s a -> s{_sLocations = a}) .
_Default
. _Coerce
instance FromJSON SetLocationsRequest where
parseJSON
= withObject "SetLocationsRequest"
(\ o ->
SetLocationsRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "clusterId")
<*> (o .:? "projectId")
<*> (o .:? "locations" .!= mempty))
instance ToJSON SetLocationsRequest where
toJSON SetLocationsRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _sZone, ("name" .=) <$> _sName,
("clusterId" .=) <$> _sClusterId,
("projectId" .=) <$> _sProjectId,
("locations" .=) <$> _sLocations])
data SetNetworkPolicyRequest = SetNetworkPolicyRequest'
{ _snprZone :: !(Maybe Text)
, _snprName :: !(Maybe Text)
, _snprClusterId :: !(Maybe Text)
, _snprProjectId :: !(Maybe Text)
, _snprNetworkPolicy :: !(Maybe NetworkPolicy)
} deriving (Eq,Show,Data,Typeable,Generic)
setNetworkPolicyRequest
:: SetNetworkPolicyRequest
setNetworkPolicyRequest =
SetNetworkPolicyRequest'
{ _snprZone = Nothing
, _snprName = Nothing
, _snprClusterId = Nothing
, _snprProjectId = Nothing
, _snprNetworkPolicy = Nothing
}
snprZone :: Lens' SetNetworkPolicyRequest (Maybe Text)
snprZone = lens _snprZone (\ s a -> s{_snprZone = a})
snprName :: Lens' SetNetworkPolicyRequest (Maybe Text)
snprName = lens _snprName (\ s a -> s{_snprName = a})
snprClusterId :: Lens' SetNetworkPolicyRequest (Maybe Text)
snprClusterId
= lens _snprClusterId
(\ s a -> s{_snprClusterId = a})
snprProjectId :: Lens' SetNetworkPolicyRequest (Maybe Text)
snprProjectId
= lens _snprProjectId
(\ s a -> s{_snprProjectId = a})
snprNetworkPolicy :: Lens' SetNetworkPolicyRequest (Maybe NetworkPolicy)
snprNetworkPolicy
= lens _snprNetworkPolicy
(\ s a -> s{_snprNetworkPolicy = a})
instance FromJSON SetNetworkPolicyRequest where
parseJSON
= withObject "SetNetworkPolicyRequest"
(\ o ->
SetNetworkPolicyRequest' <$>
(o .:? "zone") <*> (o .:? "name") <*>
(o .:? "clusterId")
<*> (o .:? "projectId")
<*> (o .:? "networkPolicy"))
instance ToJSON SetNetworkPolicyRequest where
toJSON SetNetworkPolicyRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _snprZone,
("name" .=) <$> _snprName,
("clusterId" .=) <$> _snprClusterId,
("projectId" .=) <$> _snprProjectId,
("networkPolicy" .=) <$> _snprNetworkPolicy])
data PrivateClusterConfig = PrivateClusterConfig'
{ _pccEnablePrivateNodes :: !(Maybe Bool)
, _pccEnablePrivateEndpoint :: !(Maybe Bool)
, _pccPublicEndpoint :: !(Maybe Text)
, _pccMasterIPv4CIdRBlock :: !(Maybe Text)
, _pccPrivateEndpoint :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
privateClusterConfig
:: PrivateClusterConfig
privateClusterConfig =
PrivateClusterConfig'
{ _pccEnablePrivateNodes = Nothing
, _pccEnablePrivateEndpoint = Nothing
, _pccPublicEndpoint = Nothing
, _pccMasterIPv4CIdRBlock = Nothing
, _pccPrivateEndpoint = Nothing
}
pccEnablePrivateNodes :: Lens' PrivateClusterConfig (Maybe Bool)
pccEnablePrivateNodes
= lens _pccEnablePrivateNodes
(\ s a -> s{_pccEnablePrivateNodes = a})
pccEnablePrivateEndpoint :: Lens' PrivateClusterConfig (Maybe Bool)
pccEnablePrivateEndpoint
= lens _pccEnablePrivateEndpoint
(\ s a -> s{_pccEnablePrivateEndpoint = a})
pccPublicEndpoint :: Lens' PrivateClusterConfig (Maybe Text)
pccPublicEndpoint
= lens _pccPublicEndpoint
(\ s a -> s{_pccPublicEndpoint = a})
pccMasterIPv4CIdRBlock :: Lens' PrivateClusterConfig (Maybe Text)
pccMasterIPv4CIdRBlock
= lens _pccMasterIPv4CIdRBlock
(\ s a -> s{_pccMasterIPv4CIdRBlock = a})
pccPrivateEndpoint :: Lens' PrivateClusterConfig (Maybe Text)
pccPrivateEndpoint
= lens _pccPrivateEndpoint
(\ s a -> s{_pccPrivateEndpoint = a})
instance FromJSON PrivateClusterConfig where
parseJSON
= withObject "PrivateClusterConfig"
(\ o ->
PrivateClusterConfig' <$>
(o .:? "enablePrivateNodes") <*>
(o .:? "enablePrivateEndpoint")
<*> (o .:? "publicEndpoint")
<*> (o .:? "masterIpv4CidrBlock")
<*> (o .:? "privateEndpoint"))
instance ToJSON PrivateClusterConfig where
toJSON PrivateClusterConfig'{..}
= object
(catMaybes
[("enablePrivateNodes" .=) <$>
_pccEnablePrivateNodes,
("enablePrivateEndpoint" .=) <$>
_pccEnablePrivateEndpoint,
("publicEndpoint" .=) <$> _pccPublicEndpoint,
("masterIpv4CidrBlock" .=) <$>
_pccMasterIPv4CIdRBlock,
("privateEndpoint" .=) <$> _pccPrivateEndpoint])
data DailyMaintenanceWindow = DailyMaintenanceWindow'
{ _dmwStartTime :: !(Maybe Text)
, _dmwDuration :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
dailyMaintenanceWindow
:: DailyMaintenanceWindow
dailyMaintenanceWindow =
DailyMaintenanceWindow'
{ _dmwStartTime = Nothing
, _dmwDuration = Nothing
}
dmwStartTime :: Lens' DailyMaintenanceWindow (Maybe Text)
dmwStartTime
= lens _dmwStartTime (\ s a -> s{_dmwStartTime = a})
dmwDuration :: Lens' DailyMaintenanceWindow (Maybe Text)
dmwDuration
= lens _dmwDuration (\ s a -> s{_dmwDuration = a})
instance FromJSON DailyMaintenanceWindow where
parseJSON
= withObject "DailyMaintenanceWindow"
(\ o ->
DailyMaintenanceWindow' <$>
(o .:? "startTime") <*> (o .:? "duration"))
instance ToJSON DailyMaintenanceWindow where
toJSON DailyMaintenanceWindow'{..}
= object
(catMaybes
[("startTime" .=) <$> _dmwStartTime,
("duration" .=) <$> _dmwDuration])
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)
, _cuDesiredMasterAuthorizedNetworksConfig :: !(Maybe MasterAuthorizedNetworksConfig)
, _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
, _cuDesiredMasterAuthorizedNetworksConfig = 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})
cuDesiredMasterAuthorizedNetworksConfig :: Lens' ClusterUpdate (Maybe MasterAuthorizedNetworksConfig)
cuDesiredMasterAuthorizedNetworksConfig
= lens _cuDesiredMasterAuthorizedNetworksConfig
(\ s a ->
s{_cuDesiredMasterAuthorizedNetworksConfig = 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 .:? "desiredMasterAuthorizedNetworksConfig")
<*> (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,
("desiredMasterAuthorizedNetworksConfig" .=) <$>
_cuDesiredMasterAuthorizedNetworksConfig,
("desiredImageType" .=) <$> _cuDesiredImageType,
("desiredNodeVersion" .=) <$> _cuDesiredNodeVersion,
("desiredMasterVersion" .=) <$>
_cuDesiredMasterVersion,
("desiredLocations" .=) <$> _cuDesiredLocations,
("desiredMonitoringService" .=) <$>
_cuDesiredMonitoringService])
data RollbackNodePoolUpgradeRequest = RollbackNodePoolUpgradeRequest'
{ _rnpurZone :: !(Maybe Text)
, _rnpurNodePoolId :: !(Maybe Text)
, _rnpurName :: !(Maybe Text)
, _rnpurClusterId :: !(Maybe Text)
, _rnpurProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
rollbackNodePoolUpgradeRequest
:: RollbackNodePoolUpgradeRequest
rollbackNodePoolUpgradeRequest =
RollbackNodePoolUpgradeRequest'
{ _rnpurZone = Nothing
, _rnpurNodePoolId = Nothing
, _rnpurName = Nothing
, _rnpurClusterId = Nothing
, _rnpurProjectId = Nothing
}
rnpurZone :: Lens' RollbackNodePoolUpgradeRequest (Maybe Text)
rnpurZone
= lens _rnpurZone (\ s a -> s{_rnpurZone = a})
rnpurNodePoolId :: Lens' RollbackNodePoolUpgradeRequest (Maybe Text)
rnpurNodePoolId
= lens _rnpurNodePoolId
(\ s a -> s{_rnpurNodePoolId = a})
rnpurName :: Lens' RollbackNodePoolUpgradeRequest (Maybe Text)
rnpurName
= lens _rnpurName (\ s a -> s{_rnpurName = a})
rnpurClusterId :: Lens' RollbackNodePoolUpgradeRequest (Maybe Text)
rnpurClusterId
= lens _rnpurClusterId
(\ s a -> s{_rnpurClusterId = a})
rnpurProjectId :: Lens' RollbackNodePoolUpgradeRequest (Maybe Text)
rnpurProjectId
= lens _rnpurProjectId
(\ s a -> s{_rnpurProjectId = a})
instance FromJSON RollbackNodePoolUpgradeRequest
where
parseJSON
= withObject "RollbackNodePoolUpgradeRequest"
(\ o ->
RollbackNodePoolUpgradeRequest' <$>
(o .:? "zone") <*> (o .:? "nodePoolId") <*>
(o .:? "name")
<*> (o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON RollbackNodePoolUpgradeRequest where
toJSON RollbackNodePoolUpgradeRequest'{..}
= object
(catMaybes
[("zone" .=) <$> _rnpurZone,
("nodePoolId" .=) <$> _rnpurNodePoolId,
("name" .=) <$> _rnpurName,
("clusterId" .=) <$> _rnpurClusterId,
("projectId" .=) <$> _rnpurProjectId])
data NetworkPolicy = NetworkPolicy'
{ _npEnabled :: !(Maybe Bool)
, _npProvider :: !(Maybe NetworkPolicyProvider)
} deriving (Eq,Show,Data,Typeable,Generic)
networkPolicy
:: NetworkPolicy
networkPolicy =
NetworkPolicy'
{ _npEnabled = Nothing
, _npProvider = Nothing
}
npEnabled :: Lens' NetworkPolicy (Maybe Bool)
npEnabled
= lens _npEnabled (\ s a -> s{_npEnabled = a})
npProvider :: Lens' NetworkPolicy (Maybe NetworkPolicyProvider)
npProvider
= lens _npProvider (\ s a -> s{_npProvider = a})
instance FromJSON NetworkPolicy where
parseJSON
= withObject "NetworkPolicy"
(\ o ->
NetworkPolicy' <$>
(o .:? "enabled") <*> (o .:? "provider"))
instance ToJSON NetworkPolicy where
toJSON NetworkPolicy'{..}
= object
(catMaybes
[("enabled" .=) <$> _npEnabled,
("provider" .=) <$> _npProvider])
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])
data CreateNodePoolRequest = CreateNodePoolRequest'
{ _cnprParent :: !(Maybe Text)
, _cnprZone :: !(Maybe Text)
, _cnprNodePool :: !(Maybe NodePool)
, _cnprClusterId :: !(Maybe Text)
, _cnprProjectId :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
createNodePoolRequest
:: CreateNodePoolRequest
createNodePoolRequest =
CreateNodePoolRequest'
{ _cnprParent = Nothing
, _cnprZone = Nothing
, _cnprNodePool = Nothing
, _cnprClusterId = Nothing
, _cnprProjectId = Nothing
}
cnprParent :: Lens' CreateNodePoolRequest (Maybe Text)
cnprParent
= lens _cnprParent (\ s a -> s{_cnprParent = a})
cnprZone :: Lens' CreateNodePoolRequest (Maybe Text)
cnprZone = lens _cnprZone (\ s a -> s{_cnprZone = a})
cnprNodePool :: Lens' CreateNodePoolRequest (Maybe NodePool)
cnprNodePool
= lens _cnprNodePool (\ s a -> s{_cnprNodePool = a})
cnprClusterId :: Lens' CreateNodePoolRequest (Maybe Text)
cnprClusterId
= lens _cnprClusterId
(\ s a -> s{_cnprClusterId = a})
cnprProjectId :: Lens' CreateNodePoolRequest (Maybe Text)
cnprProjectId
= lens _cnprProjectId
(\ s a -> s{_cnprProjectId = a})
instance FromJSON CreateNodePoolRequest where
parseJSON
= withObject "CreateNodePoolRequest"
(\ o ->
CreateNodePoolRequest' <$>
(o .:? "parent") <*> (o .:? "zone") <*>
(o .:? "nodePool")
<*> (o .:? "clusterId")
<*> (o .:? "projectId"))
instance ToJSON CreateNodePoolRequest where
toJSON CreateNodePoolRequest'{..}
= object
(catMaybes
[("parent" .=) <$> _cnprParent,
("zone" .=) <$> _cnprZone,
("nodePool" .=) <$> _cnprNodePool,
("clusterId" .=) <$> _cnprClusterId,
("projectId" .=) <$> _cnprProjectId])
newtype SetLabelsRequestResourceLabels = SetLabelsRequestResourceLabels'
{ _slrrlAddtional :: HashMap Text Text
} deriving (Eq,Show,Data,Typeable,Generic)
setLabelsRequestResourceLabels
:: HashMap Text Text
-> SetLabelsRequestResourceLabels
setLabelsRequestResourceLabels pSlrrlAddtional_ =
SetLabelsRequestResourceLabels'
{ _slrrlAddtional = _Coerce # pSlrrlAddtional_
}
slrrlAddtional :: Lens' SetLabelsRequestResourceLabels (HashMap Text Text)
slrrlAddtional
= lens _slrrlAddtional
(\ s a -> s{_slrrlAddtional = a})
. _Coerce
instance FromJSON SetLabelsRequestResourceLabels
where
parseJSON
= withObject "SetLabelsRequestResourceLabels"
(\ o ->
SetLabelsRequestResourceLabels' <$>
(parseJSONObject o))
instance ToJSON SetLabelsRequestResourceLabels where
toJSON = toJSON . _slrrlAddtional