@@ -154,6 +154,7 @@ instance ToJSON CreateClusterRequest where
154154data Cluster = Cluster'
155155 { _cStatus :: !(Maybe Text)
156156 , _cNodePools :: !(Maybe [NodePool])
157+ , _cEnableKubernetesAlpha :: !(Maybe Bool)
157158 , _cNodeConfig :: !(Maybe NodeConfig)
158159 , _cNodeIPv4CIdRSize :: !(Maybe (Textual Int32))
159160 , _cClusterIPv4CIdR :: !(Maybe Text)
@@ -172,6 +173,7 @@ data Cluster = Cluster'
172173 , _cSubnetwork :: !(Maybe Text)
173174 , _cCurrentNodeCount :: !(Maybe (Textual Int32))
174175 , _cEndpoint :: !(Maybe Text)
176+ , _cExpireTime :: !(Maybe Text)
175177 , _cLocations :: !(Maybe [Text])
176178 , _cLoggingService :: !(Maybe Text)
177179 , _cDescription :: !(Maybe Text)
@@ -188,6 +190,8 @@ data Cluster = Cluster'
188190--
189191-- * 'cNodePools'
190192--
193+-- * 'cEnableKubernetesAlpha'
194+--
191195-- * 'cNodeConfig'
192196--
193197-- * 'cNodeIPv4CIdRSize'
@@ -224,6 +228,8 @@ data Cluster = Cluster'
224228--
225229-- * 'cEndpoint'
226230--
231+-- * 'cExpireTime'
232+--
227233-- * 'cLocations'
228234--
229235-- * 'cLoggingService'
@@ -241,6 +247,7 @@ cluster =
241247 Cluster'
242248 { _cStatus = Nothing
243249 , _cNodePools = Nothing
250+ , _cEnableKubernetesAlpha = Nothing
244251 , _cNodeConfig = Nothing
245252 , _cNodeIPv4CIdRSize = Nothing
246253 , _cClusterIPv4CIdR = Nothing
@@ -259,6 +266,7 @@ cluster =
259266 , _cSubnetwork = Nothing
260267 , _cCurrentNodeCount = Nothing
261268 , _cEndpoint = Nothing
269+ , _cExpireTime = Nothing
262270 , _cLocations = Nothing
263271 , _cLoggingService = Nothing
264272 , _cDescription = Nothing
@@ -271,15 +279,24 @@ cluster =
271279cStatus :: Lens' Cluster (Maybe Text)
272280cStatus = lens _cStatus (\ s a -> s{_cStatus = a})
273281
274−-- | The node pools associated with this cluster. When creating a new
275−-- cluster, only a single node pool should be specified. This field should
276−-- not be set if \"node_config\" or \"initial_node_count\" are specified.
282+-- | The node pools associated with this cluster. This field should not be
283+-- set if \"node_config\" or \"initial_node_count\" are specified.
277284cNodePools :: Lens' Cluster [NodePool]
278285cNodePools
279286 = lens _cNodePools (\ s a -> s{_cNodePools = a}) .
280287 _Default
281288 . _Coerce
282289
290+-- | Kubernetes alpha features are enabled on this cluster. This includes
291+-- alpha API groups (e.g. v1alpha1) and features that may not be production
292+-- ready in the kubernetes version of the master and nodes. The cluster has
293+-- no SLA for uptime and master\/node upgrades are disabled. Alpha enabled
294+-- clusters are automatically deleted thirty days after creation.
295+cEnableKubernetesAlpha :: Lens' Cluster (Maybe Bool)
296+cEnableKubernetesAlpha
297+ = lens _cEnableKubernetesAlpha
298+ (\ s a -> s{_cEnableKubernetesAlpha = a})
299+
283300-- | Parameters used in creating the cluster\'s nodes. See \`nodeConfig\` for
284301-- the description of its properties. For requests, this field should only
285302-- be used in lieu of a \"node_pool\" object, since this configuration
@@ -419,6 +436,12 @@ cEndpoint :: Lens' Cluster (Maybe Text)
419436cEndpoint
420437 = lens _cEndpoint (\ s a -> s{_cEndpoint = a})
421438
439+-- | [Output only] The time the cluster will be automatically deleted in
440+-- [RFC3339](https:\/\/www.ietf.org\/rfc\/rfc3339.txt) text format.
441+cExpireTime :: Lens' Cluster (Maybe Text)
442+cExpireTime
443+ = lens _cExpireTime (\ s a -> s{_cExpireTime = a})
444+
422445-- | The list of Google Compute Engine
423446-- [locations](\/compute\/docs\/zones#available) in which the cluster\'s
424447-- nodes should be located.
@@ -474,6 +497,7 @@ instance FromJSON Cluster where
474497 (\ o ->
475498 Cluster' <$>
476499 (o .:? "status") <*> (o .:? "nodePools" .!= mempty)
500+ <*> (o .:? "enableKubernetesAlpha")
477501 <*> (o .:? "nodeConfig")
478502 <*> (o .:? "nodeIpv4CidrSize")
479503 <*> (o .:? "clusterIpv4Cidr")
@@ -492,6 +516,7 @@ instance FromJSON Cluster where
492516 <*> (o .:? "subnetwork")
493517 <*> (o .:? "currentNodeCount")
494518 <*> (o .:? "endpoint")
519+ <*> (o .:? "expireTime")
495520 <*> (o .:? "locations" .!= mempty)
496521 <*> (o .:? "loggingService")
497522 <*> (o .:? "description")
@@ -505,6 +530,8 @@ instance ToJSON Cluster where
505530 (catMaybes
506531 [("status" .=) <$> _cStatus,
507532 ("nodePools" .=) <$> _cNodePools,
533+ ("enableKubernetesAlpha" .=) <$>
534+ _cEnableKubernetesAlpha,
508535 ("nodeConfig" .=) <$> _cNodeConfig,
509536 ("nodeIpv4CidrSize" .=) <$> _cNodeIPv4CIdRSize,
510537 ("clusterIpv4Cidr" .=) <$> _cClusterIPv4CIdR,
@@ -525,6 +552,7 @@ instance ToJSON Cluster where
525552 ("subnetwork" .=) <$> _cSubnetwork,
526553 ("currentNodeCount" .=) <$> _cCurrentNodeCount,
527554 ("endpoint" .=) <$> _cEndpoint,
555+ ("expireTime" .=) <$> _cExpireTime,
528556 ("locations" .=) <$> _cLocations,
529557 ("loggingService" .=) <$> _cLoggingService,
530558 ("description" .=) <$> _cDescription,
@@ -532,6 +560,27 @@ instance ToJSON Cluster where
532560 ("monitoringService" .=) <$> _cMonitoringService,
533561 ("createTime" .=) <$> _cCreateTime])
534562
563+-- | CancelOperationRequest cancels a single operation.
564+--
565+-- /See:/ 'cancelOperationRequest' smart constructor.
566+data CancelOperationRequest =
567+ CancelOperationRequest'
568+ deriving (Eq,Show,Data,Typeable,Generic)
569+
570+-- | Creates a value of 'CancelOperationRequest' with the minimum fields required to make a request.
571+--
572+cancelOperationRequest
573+ :: CancelOperationRequest
574+cancelOperationRequest = CancelOperationRequest'
575+
576+instance FromJSON CancelOperationRequest where
577+ parseJSON
578+ = withObject "CancelOperationRequest"
579+ (\ o -> pure CancelOperationRequest')
580+
581+instance ToJSON CancelOperationRequest where
582+ toJSON = const emptyObject
583+
535584-- | UpdateClusterRequest updates the settings of a cluster.
536585--
537586-- /See:/ 'updateClusterRequest' smart constructor.
@@ -569,33 +618,68 @@ instance ToJSON UpdateClusterRequest where
569618--
570619-- /See:/ 'nodeConfig' smart constructor.
571620data NodeConfig = NodeConfig'
572− { _ncDiskSizeGb :: !(Maybe (Textual Int32))
573− , _ncOAuthScopes :: !(Maybe [Text])
574− , _ncMachineType :: !(Maybe Text)
575− , _ncMetadata :: !(Maybe NodeConfigMetadata)
621+ { _ncLocalSsdCount :: !(Maybe (Textual Int32))
622+ , _ncDiskSizeGb :: !(Maybe (Textual Int32))
623+ , _ncOAuthScopes :: !(Maybe [Text])
624+ , _ncServiceAccount :: !(Maybe Text)
625+ , _ncImageType :: !(Maybe Text)
626+ , _ncMachineType :: !(Maybe Text)
627+ , _ncMetadata :: !(Maybe NodeConfigMetadata)
628+ , _ncLabels :: !(Maybe NodeConfigLabels)
629+ , _ncTags :: !(Maybe [Text])
630+ , _ncPreemptible :: !(Maybe Bool)
576631 } deriving (Eq,Show,Data,Typeable,Generic)
577632
578633-- | Creates a value of 'NodeConfig' with the minimum fields required to make a request.
579634--
580635-- Use one of the following lenses to modify other fields as desired:
581636--
637+-- * 'ncLocalSsdCount'
638+--
582639-- * 'ncDiskSizeGb'
583640--
584641-- * 'ncOAuthScopes'
585642--
643+-- * 'ncServiceAccount'
644+--
645+-- * 'ncImageType'
646+--
586647-- * 'ncMachineType'
587648--
588649-- * 'ncMetadata'
650+--
651+-- * 'ncLabels'
652+--
653+-- * 'ncTags'
654+--
655+-- * 'ncPreemptible'
589656nodeConfig
590657 :: NodeConfig
591658nodeConfig =
592659 NodeConfig'
593− { _ncDiskSizeGb = Nothing
660+ { _ncLocalSsdCount = Nothing
661+ , _ncDiskSizeGb = Nothing
594662 , _ncOAuthScopes = Nothing
663+ , _ncServiceAccount = Nothing
664+ , _ncImageType = Nothing
595665 , _ncMachineType = Nothing
596666 , _ncMetadata = Nothing
667+ , _ncLabels = Nothing
668+ , _ncTags = Nothing
669+ , _ncPreemptible = Nothing
597670 }
598671
672+-- | The number of local SSD disks to be attached to the node. The limit for
673+-- this value is dependant upon the maximum number of disks available on a
674+-- machine per zone. See:
675+-- https:\/\/cloud.google.com\/compute\/docs\/disks\/local-ssd#local_ssd_limits
676+-- for more information.
677+ncLocalSsdCount :: Lens' NodeConfig (Maybe Int32)
678+ncLocalSsdCount
679+ = lens _ncLocalSsdCount
680+ (\ s a -> s{_ncLocalSsdCount = a})
681+ . mapping _Coerce
682+
599683-- | Size of the disk attached to each node, specified in GB. The smallest
600684-- allowed disk size is 10GB. If unspecified, the default disk size is
601685-- 100GB.
@@ -621,6 +705,20 @@ ncOAuthScopes
621705 . _Default
622706 . _Coerce
623707
708+-- | The Google Cloud Platform Service Account to be used by the node VMs. If
709+-- no Service Account is specified, the \"default\" service account is
710+-- used.
711+ncServiceAccount :: Lens' NodeConfig (Maybe Text)
712+ncServiceAccount
713+ = lens _ncServiceAccount
714+ (\ s a -> s{_ncServiceAccount = a})
715+
716+-- | The image type to use for this node. Note that for a given image type,
717+-- the latest version of it will be used.
718+ncImageType :: Lens' NodeConfig (Maybe Text)
719+ncImageType
720+ = lens _ncImageType (\ s a -> s{_ncImageType = a})
721+
624722-- | The name of a Google Compute Engine [machine
625723-- type](\/compute\/docs\/machine-types) (e.g. \`n1-standard-1\`). If
626724-- unspecified, the default machine type is \`n1-standard-1\`.
@@ -643,24 +741,61 @@ ncMetadata :: Lens' NodeConfig (Maybe NodeConfigMetadata)
643741ncMetadata
644742 = lens _ncMetadata (\ s a -> s{_ncMetadata = a})
645743
744+-- | The map of Kubernetes labels (key\/value pairs) to be applied to each
745+-- node. These will added in addition to any default label(s) that
746+-- Kubernetes may apply to the node. In case of conflict in label keys, the
747+-- applied set may differ depending on the Kubernetes version -- it\'s best
748+-- to assume the behavior is undefined and conflicts should be avoided. For
749+-- more information, including usage and the valid values, see:
750+-- http:\/\/kubernetes.io\/v1.1\/docs\/user-guide\/labels.html
751+ncLabels :: Lens' NodeConfig (Maybe NodeConfigLabels)
752+ncLabels = lens _ncLabels (\ s a -> s{_ncLabels = a})
753+
754+-- | The list of instance tags applied to all nodes. Tags are used to
755+-- identify valid sources or targets for network firewalls and are
756+-- specified by the client during cluster or node pool creation. Each tag
757+-- within the list must comply with RFC1035.
758+ncTags :: Lens' NodeConfig [Text]
759+ncTags
760+ = lens _ncTags (\ s a -> s{_ncTags = a}) . _Default .
761+ _Coerce
762+
763+-- | Whether the nodes are created as preemptible VM instances. See:
764+-- https:\/\/cloud.google.com\/compute\/docs\/instances\/preemptible for
765+-- more inforamtion about preemptible VM instances.
766+ncPreemptible :: Lens' NodeConfig (Maybe Bool)
767+ncPreemptible
768+ = lens _ncPreemptible
769+ (\ s a -> s{_ncPreemptible = a})
770+
646771instance FromJSON NodeConfig where
647772 parseJSON
648773 = withObject "NodeConfig"
649774 (\ o ->
650775 NodeConfig' <$>
651− (o .:? "diskSizeGb") <*>
776+ (o .:? "localSsdCount") <*> (o .:? "diskSizeGb") <*>
652777 (o .:? "oauthScopes" .!= mempty)
778+ <*> (o .:? "serviceAccount")
779+ <*> (o .:? "imageType")
653780 <*> (o .:? "machineType")
654− <*> (o .:? "metadata"))
781+ <*> (o .:? "metadata")
782+ <*> (o .:? "labels")
783+ <*> (o .:? "tags" .!= mempty)
784+ <*> (o .:? "preemptible"))
655785
656786instance ToJSON NodeConfig where
657787 toJSON NodeConfig'{..}
658788 = object
659789 (catMaybes
660− [("diskSizeGb" .=) <$> _ncDiskSizeGb,
790+ [("localSsdCount" .=) <$> _ncLocalSsdCount,
791+ ("diskSizeGb" .=) <$> _ncDiskSizeGb,
661792 ("oauthScopes" .=) <$> _ncOAuthScopes,
793+ ("serviceAccount" .=) <$> _ncServiceAccount,
794+ ("imageType" .=) <$> _ncImageType,
662795 ("machineType" .=) <$> _ncMachineType,
663− ("metadata" .=) <$> _ncMetadata])
796+ ("metadata" .=) <$> _ncMetadata,
797+ ("labels" .=) <$> _ncLabels, ("tags" .=) <$> _ncTags,
798+ ("preemptible" .=) <$> _ncPreemptible])
664799
665800-- | Configuration options for the HTTP (L7) load balancing controller addon,
666801-- which makes it easy to set up HTTP load balancers for services in a
@@ -814,6 +949,144 @@ instance ToJSON Operation where
814949 ("targetLink" .=) <$> _oTargetLink,
815950 ("detail" .=) <$> _oDetail])
816951
952+-- | A generic empty message that you can re-use to avoid defining duplicated
953+-- empty messages in your APIs. A typical example is to use it as the
954+-- request or the response type of an API method. For instance: service Foo
955+-- { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The
956+-- JSON representation for \`Empty\` is empty JSON object \`{}\`.
957+--
958+-- /See:/ 'empty' smart constructor.
959+data Empty =
960+ Empty'
961+ deriving (Eq,Show,Data,Typeable,Generic)
962+
963+-- | Creates a value of 'Empty' with the minimum fields required to make a request.
964+--
965+empty
966+ :: Empty
967+empty = Empty'
968+
969+instance FromJSON Empty where
970+ parseJSON = withObject "Empty" (\ o -> pure Empty')
971+
972+instance ToJSON Empty where
973+ toJSON = const emptyObject
974+
975+-- | NodeManagement defines the set of node management services turned on for
976+-- the node pool.
977+--
978+-- /See:/ 'nodeManagement' smart constructor.
979+data NodeManagement = NodeManagement'
980+ { _nmAutoUpgrade :: !(Maybe Bool)
981+ , _nmUpgradeOptions :: !(Maybe AutoUpgradeOptions)
982+ } deriving (Eq,Show,Data,Typeable,Generic)
983+
984+-- | Creates a value of 'NodeManagement' with the minimum fields required to make a request.
985+--
986+-- Use one of the following lenses to modify other fields as desired:
987+--
988+-- * 'nmAutoUpgrade'
989+--
990+-- * 'nmUpgradeOptions'
991+nodeManagement
992+ :: NodeManagement
993+nodeManagement =
994+ NodeManagement'
995+ { _nmAutoUpgrade = Nothing
996+ , _nmUpgradeOptions = Nothing
997+ }
998+
999+-- | Whether the nodes will be automatically upgraded.
1000+nmAutoUpgrade :: Lens' NodeManagement (Maybe Bool)
1001+nmAutoUpgrade
1002+ = lens _nmAutoUpgrade
1003+ (\ s a -> s{_nmAutoUpgrade = a})
1004+
1005+-- | Specifies the Auto Upgrade knobs for the node pool.
1006+nmUpgradeOptions :: Lens' NodeManagement (Maybe AutoUpgradeOptions)
1007+nmUpgradeOptions
1008+ = lens _nmUpgradeOptions
1009+ (\ s a -> s{_nmUpgradeOptions = a})
1010+
1011+instance FromJSON NodeManagement where
1012+ parseJSON
1013+ = withObject "NodeManagement"
1014+ (\ o ->
1015+ NodeManagement' <$>
1016+ (o .:? "autoUpgrade") <*> (o .:? "upgradeOptions"))
1017+
1018+instance ToJSON NodeManagement where
1019+ toJSON NodeManagement'{..}
1020+ = object
1021+ (catMaybes
1022+ [("autoUpgrade" .=) <$> _nmAutoUpgrade,
1023+ ("upgradeOptions" .=) <$> _nmUpgradeOptions])
1024+
1025+-- | NodePoolAutoscaling contains information required by cluster autoscaler
1026+-- to adjust the size of the node pool to the current cluster usage.
1027+--
1028+-- /See:/ 'nodePoolAutoscaling' smart constructor.
1029+data NodePoolAutoscaling = NodePoolAutoscaling'
1030+ { _npaMaxNodeCount :: !(Maybe (Textual Int32))
1031+ , _npaEnabled :: !(Maybe Bool)
1032+ , _npaMinNodeCount :: !(Maybe (Textual Int32))
1033+ } deriving (Eq,Show,Data,Typeable,Generic)
1034+
1035+-- | Creates a value of 'NodePoolAutoscaling' with the minimum fields required to make a request.
1036+--
1037+-- Use one of the following lenses to modify other fields as desired:
1038+--
1039+-- * 'npaMaxNodeCount'
1040+--
1041+-- * 'npaEnabled'
1042+--
1043+-- * 'npaMinNodeCount'
1044+nodePoolAutoscaling
1045+ :: NodePoolAutoscaling
1046+nodePoolAutoscaling =
1047+ NodePoolAutoscaling'
1048+ { _npaMaxNodeCount = Nothing
1049+ , _npaEnabled = Nothing
1050+ , _npaMinNodeCount = Nothing
1051+ }
1052+
1053+-- | Maximum number of nodes in the NodePool. Must be >= min_node_count.
1054+-- There has to enough quota to scale up the cluster.
1055+npaMaxNodeCount :: Lens' NodePoolAutoscaling (Maybe Int32)
1056+npaMaxNodeCount
1057+ = lens _npaMaxNodeCount
1058+ (\ s a -> s{_npaMaxNodeCount = a})
1059+ . mapping _Coerce
1060+
1061+-- | Is autoscaling enabled for this node pool.
1062+npaEnabled :: Lens' NodePoolAutoscaling (Maybe Bool)
1063+npaEnabled
1064+ = lens _npaEnabled (\ s a -> s{_npaEnabled = a})
1065+
1066+-- | Minimum number of nodes in the NodePool. Must be >= 1 and \<=
1067+-- max_node_count.
1068+npaMinNodeCount :: Lens' NodePoolAutoscaling (Maybe Int32)
1069+npaMinNodeCount
1070+ = lens _npaMinNodeCount
1071+ (\ s a -> s{_npaMinNodeCount = a})
1072+ . mapping _Coerce
1073+
1074+instance FromJSON NodePoolAutoscaling where
1075+ parseJSON
1076+ = withObject "NodePoolAutoscaling"
1077+ (\ o ->
1078+ NodePoolAutoscaling' <$>
1079+ (o .:? "maxNodeCount") <*> (o .:? "enabled") <*>
1080+ (o .:? "minNodeCount"))
1081+
1082+instance ToJSON NodePoolAutoscaling where
1083+ toJSON NodePoolAutoscaling'{..}
1084+ = object
1085+ (catMaybes
1086+ [("maxNodeCount" .=) <$> _npaMaxNodeCount,
1087+ ("enabled" .=) <$> _npaEnabled,
1088+ ("minNodeCount" .=) <$> _npaMinNodeCount])
1089+
8171090-- | Configuration for the addons that can be automatically spun up in the
8181091-- cluster, enabling additional functionality.
8191092--
@@ -879,8 +1152,10 @@ instance ToJSON AddonsConfig where
8791152-- /See:/ 'nodePool' smart constructor.
8801153data NodePool = NodePool'
8811154 { _npStatus :: !(Maybe Text)
1155+ , _npAutoscaling :: !(Maybe NodePoolAutoscaling)
8821156 , _npConfig :: !(Maybe NodeConfig)
8831157 , _npInitialNodeCount :: !(Maybe (Textual Int32))
1158+ , _npManagement :: !(Maybe NodeManagement)
8841159 , _npSelfLink :: !(Maybe Text)
8851160 , _npName :: !(Maybe Text)
8861161 , _npStatusMessage :: !(Maybe Text)
@@ -894,10 +1169,14 @@ data NodePool = NodePool'
8941169--
8951170-- * 'npStatus'
8961171--
1172+-- * 'npAutoscaling'
1173+--
8971174-- * 'npConfig'
8981175--
8991176-- * 'npInitialNodeCount'
9001177--
1178+-- * 'npManagement'
1179+--
9011180-- * 'npSelfLink'
9021181--
9031182-- * 'npName'
@@ -912,8 +1191,10 @@ nodePool
9121191nodePool =
9131192 NodePool'
9141193 { _npStatus = Nothing
1194+ , _npAutoscaling = Nothing
9151195 , _npConfig = Nothing
9161196 , _npInitialNodeCount = Nothing
1197+ , _npManagement = Nothing
9171198 , _npSelfLink = Nothing
9181199 , _npName = Nothing
9191200 , _npStatusMessage = Nothing
@@ -921,10 +1202,17 @@ nodePool =
9211202 , _npInstanceGroupURLs = Nothing
9221203 }
9231204
924−-- | The status of the nodes in this pool instance.
1205+-- | [Output only] The status of the nodes in this pool instance.
9251206npStatus :: Lens' NodePool (Maybe Text)
9261207npStatus = lens _npStatus (\ s a -> s{_npStatus = a})
9271208
1209+-- | Autoscaler configuration for this NodePool. Autoscaler is enabled only
1210+-- if a valid configuration is present.
1211+npAutoscaling :: Lens' NodePool (Maybe NodePoolAutoscaling)
1212+npAutoscaling
1213+ = lens _npAutoscaling
1214+ (\ s a -> s{_npAutoscaling = a})
1215+
9281216-- | The node configuration of the pool.
9291217npConfig :: Lens' NodePool (Maybe NodeConfig)
9301218npConfig = lens _npConfig (\ s a -> s{_npConfig = a})
@@ -938,7 +1226,12 @@ npInitialNodeCount
9381226 (\ s a -> s{_npInitialNodeCount = a})
9391227 . mapping _Coerce
9401228
941−-- | Server-defined URL for the resource.
1229+-- | NodeManagement configuration for this NodePool.
1230+npManagement :: Lens' NodePool (Maybe NodeManagement)
1231+npManagement
1232+ = lens _npManagement (\ s a -> s{_npManagement = a})
1233+
1234+-- | [Output only] Server-defined URL for the resource.
9421235npSelfLink :: Lens' NodePool (Maybe Text)
9431236npSelfLink
9441237 = lens _npSelfLink (\ s a -> s{_npSelfLink = a})
@@ -954,7 +1247,7 @@ npStatusMessage
9541247 = lens _npStatusMessage
9551248 (\ s a -> s{_npStatusMessage = a})
9561249
957−-- | The version of the Kubernetes of this node.
1250+-- | [Output only] The version of the Kubernetes of this node.
9581251npVersion :: Lens' NodePool (Maybe Text)
9591252npVersion
9601253 = lens _npVersion (\ s a -> s{_npVersion = a})
@@ -974,8 +1267,10 @@ instance FromJSON NodePool where
9741267 = withObject "NodePool"
9751268 (\ o ->
9761269 NodePool' <$>
977− (o .:? "status") <*> (o .:? "config") <*>
978− (o .:? "initialNodeCount")
1270+ (o .:? "status") <*> (o .:? "autoscaling") <*>
1271+ (o .:? "config")
1272+ <*> (o .:? "initialNodeCount")
1273+ <*> (o .:? "management")
9791274 <*> (o .:? "selfLink")
9801275 <*> (o .:? "name")
9811276 <*> (o .:? "statusMessage")
@@ -987,14 +1282,54 @@ instance ToJSON NodePool where
9871282 = object
9881283 (catMaybes
9891284 [("status" .=) <$> _npStatus,
1285+ ("autoscaling" .=) <$> _npAutoscaling,
9901286 ("config" .=) <$> _npConfig,
9911287 ("initialNodeCount" .=) <$> _npInitialNodeCount,
1288+ ("management" .=) <$> _npManagement,
9921289 ("selfLink" .=) <$> _npSelfLink,
9931290 ("name" .=) <$> _npName,
9941291 ("statusMessage" .=) <$> _npStatusMessage,
9951292 ("version" .=) <$> _npVersion,
9961293 ("instanceGroupUrls" .=) <$> _npInstanceGroupURLs])
9971294
1295+-- | SetNodePoolManagementRequest sets the node management properties of a
1296+-- node pool.
1297+--
1298+-- /See:/ 'setNodePoolManagementRequest' smart constructor.
1299+newtype SetNodePoolManagementRequest = SetNodePoolManagementRequest'
1300+ { _snpmrManagement :: Maybe NodeManagement
1301+ } deriving (Eq,Show,Data,Typeable,Generic)
1302+
1303+-- | Creates a value of 'SetNodePoolManagementRequest' with the minimum fields required to make a request.
1304+--
1305+-- Use one of the following lenses to modify other fields as desired:
1306+--
1307+-- * 'snpmrManagement'
1308+setNodePoolManagementRequest
1309+ :: SetNodePoolManagementRequest
1310+setNodePoolManagementRequest =
1311+ SetNodePoolManagementRequest'
1312+ { _snpmrManagement = Nothing
1313+ }
1314+
1315+-- | NodeManagement configuration for the node pool.
1316+snpmrManagement :: Lens' SetNodePoolManagementRequest (Maybe NodeManagement)
1317+snpmrManagement
1318+ = lens _snpmrManagement
1319+ (\ s a -> s{_snpmrManagement = a})
1320+
1321+instance FromJSON SetNodePoolManagementRequest where
1322+ parseJSON
1323+ = withObject "SetNodePoolManagementRequest"
1324+ (\ o ->
1325+ SetNodePoolManagementRequest' <$>
1326+ (o .:? "management"))
1327+
1328+instance ToJSON SetNodePoolManagementRequest where
1329+ toJSON SetNodePoolManagementRequest'{..}
1330+ = object
1331+ (catMaybes [("management" .=) <$> _snpmrManagement])
1332+
9981333-- | The authentication information for accessing the master endpoint.
9991334-- Authentication can be done using HTTP basic auth or using client
10001335-- certificates.
@@ -1128,37 +1463,86 @@ instance FromJSON NodeConfigMetadata where
11281463instance ToJSON NodeConfigMetadata where
11291464 toJSON = toJSON . _ncmAddtional
11301465
1466+-- | The map of Kubernetes labels (key\/value pairs) to be applied to each
1467+-- node. These will added in addition to any default label(s) that
1468+-- Kubernetes may apply to the node. In case of conflict in label keys, the
1469+-- applied set may differ depending on the Kubernetes version -- it\'s best
1470+-- to assume the behavior is undefined and conflicts should be avoided. For
1471+-- more information, including usage and the valid values, see:
1472+-- http:\/\/kubernetes.io\/v1.1\/docs\/user-guide\/labels.html
1473+--
1474+-- /See:/ 'nodeConfigLabels' smart constructor.
1475+newtype NodeConfigLabels = NodeConfigLabels'
1476+ { _nclAddtional :: HashMap Text Text
1477+ } deriving (Eq,Show,Data,Typeable,Generic)
1478+
1479+-- | Creates a value of 'NodeConfigLabels' with the minimum fields required to make a request.
1480+--
1481+-- Use one of the following lenses to modify other fields as desired:
1482+--
1483+-- * 'nclAddtional'
1484+nodeConfigLabels
1485+ :: HashMap Text Text -- ^ 'nclAddtional'
1486+ -> NodeConfigLabels
1487+nodeConfigLabels pNclAddtional_ =
1488+ NodeConfigLabels'
1489+ { _nclAddtional = _Coerce # pNclAddtional_
1490+ }
1491+
1492+nclAddtional :: Lens' NodeConfigLabels (HashMap Text Text)
1493+nclAddtional
1494+ = lens _nclAddtional (\ s a -> s{_nclAddtional = a})
1495+ . _Coerce
1496+
1497+instance FromJSON NodeConfigLabels where
1498+ parseJSON
1499+ = withObject "NodeConfigLabels"
1500+ (\ o -> NodeConfigLabels' <$> (parseJSONObject o))
1501+
1502+instance ToJSON NodeConfigLabels where
1503+ toJSON = toJSON . _nclAddtional
1504+
11311505-- | Container Engine service configuration.
11321506--
11331507-- /See:/ 'serverConfig' smart constructor.
11341508data ServerConfig = ServerConfig'
1135− { _scValidNodeVersions :: !(Maybe [Text])
1136− , _scDefaultImageFamily :: !(Maybe Text)
1137− , _scValidImageFamilies :: !(Maybe [Text])
1509+ { _scDefaultImageType :: !(Maybe Text)
1510+ , _scValidNodeVersions :: !(Maybe [Text])
1511+ , _scValidImageTypes :: !(Maybe [Text])
11381512 , _scDefaultClusterVersion :: !(Maybe Text)
1513+ , _scValidMasterVersions :: !(Maybe [Text])
11391514 } deriving (Eq,Show,Data,Typeable,Generic)
11401515
11411516-- | Creates a value of 'ServerConfig' with the minimum fields required to make a request.
11421517--
11431518-- Use one of the following lenses to modify other fields as desired:
11441519--
1145−-- * 'scValidNodeVersions'
1520+-- * 'scDefaultImageType'
11461521--
1147−-- * 'scDefaultImageFamily'
1522+-- * 'scValidNodeVersions'
11481523--
1149−-- * 'scValidImageFamilies'
1524+-- * 'scValidImageTypes'
11501525--
11511526-- * 'scDefaultClusterVersion'
1527+--
1528+-- * 'scValidMasterVersions'
11521529serverConfig
11531530 :: ServerConfig
11541531serverConfig =
11551532 ServerConfig'
1156− { _scValidNodeVersions = Nothing
1157− , _scDefaultImageFamily = Nothing
1158− , _scValidImageFamilies = Nothing
1533+ { _scDefaultImageType = Nothing
1534+ , _scValidNodeVersions = Nothing
1535+ , _scValidImageTypes = Nothing
11591536 , _scDefaultClusterVersion = Nothing
1537+ , _scValidMasterVersions = Nothing
11601538 }
11611539
1540+-- | Default image type.
1541+scDefaultImageType :: Lens' ServerConfig (Maybe Text)
1542+scDefaultImageType
1543+ = lens _scDefaultImageType
1544+ (\ s a -> s{_scDefaultImageType = a})
1545+
11621546-- | List of valid node upgrade target versions.
11631547scValidNodeVersions :: Lens' ServerConfig [Text]
11641548scValidNodeVersions
@@ -1167,17 +1551,11 @@ scValidNodeVersions
11671551 . _Default
11681552 . _Coerce
11691553
1170−-- | Default image family.
1171−scDefaultImageFamily :: Lens' ServerConfig (Maybe Text)
1172−scDefaultImageFamily
1173− = lens _scDefaultImageFamily
1174− (\ s a -> s{_scDefaultImageFamily = a})
1175−
1176−-- | List of valid image families.
1177−scValidImageFamilies :: Lens' ServerConfig [Text]
1178−scValidImageFamilies
1179− = lens _scValidImageFamilies
1180− (\ s a -> s{_scValidImageFamilies = a})
1554+-- | List of valid image types.
1555+scValidImageTypes :: Lens' ServerConfig [Text]
1556+scValidImageTypes
1557+ = lens _scValidImageTypes
1558+ (\ s a -> s{_scValidImageTypes = a})
11811559 . _Default
11821560 . _Coerce
11831561
@@ -1187,25 +1565,91 @@ scDefaultClusterVersion
11871565 = lens _scDefaultClusterVersion
11881566 (\ s a -> s{_scDefaultClusterVersion = a})
11891567
1568+-- | List of valid master versions.
1569+scValidMasterVersions :: Lens' ServerConfig [Text]
1570+scValidMasterVersions
1571+ = lens _scValidMasterVersions
1572+ (\ s a -> s{_scValidMasterVersions = a})
1573+ . _Default
1574+ . _Coerce
1575+
11901576instance FromJSON ServerConfig where
11911577 parseJSON
11921578 = withObject "ServerConfig"
11931579 (\ o ->
11941580 ServerConfig' <$>
1195− (o .:? "validNodeVersions" .!= mempty) <*>
1196− (o .:? "defaultImageFamily")
1197− <*> (o .:? "validImageFamilies" .!= mempty)
1198− <*> (o .:? "defaultClusterVersion"))
1581+ (o .:? "defaultImageType") <*>
1582+ (o .:? "validNodeVersions" .!= mempty)
1583+ <*> (o .:? "validImageTypes" .!= mempty)
1584+ <*> (o .:? "defaultClusterVersion")
1585+ <*> (o .:? "validMasterVersions" .!= mempty))
11991586
12001587instance ToJSON ServerConfig where
12011588 toJSON ServerConfig'{..}
12021589 = object
12031590 (catMaybes
1204− [("validNodeVersions" .=) <$> _scValidNodeVersions,
1205− ("defaultImageFamily" .=) <$> _scDefaultImageFamily,
1206− ("validImageFamilies" .=) <$> _scValidImageFamilies,
1591+ [("defaultImageType" .=) <$> _scDefaultImageType,
1592+ ("validNodeVersions" .=) <$> _scValidNodeVersions,
1593+ ("validImageTypes" .=) <$> _scValidImageTypes,
12071594 ("defaultClusterVersion" .=) <$>
1208− _scDefaultClusterVersion])
1595+ _scDefaultClusterVersion,
1596+ ("validMasterVersions" .=) <$>
1597+ _scValidMasterVersions])
1598+
1599+-- | AutoUpgradeOptions defines the set of options for the user to control
1600+-- how the Auto Upgrades will proceed.
1601+--
1602+-- /See:/ 'autoUpgradeOptions' smart constructor.
1603+data AutoUpgradeOptions = AutoUpgradeOptions'
1604+ { _auoAutoUpgradeStartTime :: !(Maybe Text)
1605+ , _auoDescription :: !(Maybe Text)
1606+ } deriving (Eq,Show,Data,Typeable,Generic)
1607+
1608+-- | Creates a value of 'AutoUpgradeOptions' with the minimum fields required to make a request.
1609+--
1610+-- Use one of the following lenses to modify other fields as desired:
1611+--
1612+-- * 'auoAutoUpgradeStartTime'
1613+--
1614+-- * 'auoDescription'
1615+autoUpgradeOptions
1616+ :: AutoUpgradeOptions
1617+autoUpgradeOptions =
1618+ AutoUpgradeOptions'
1619+ { _auoAutoUpgradeStartTime = Nothing
1620+ , _auoDescription = Nothing
1621+ }
1622+
1623+-- | [Output only] This field is set when upgrades are about to commence with
1624+-- the approximate start time for the upgrades, in
1625+-- [RFC3339](https:\/\/www.ietf.org\/rfc\/rfc3339.txt) text format.
1626+auoAutoUpgradeStartTime :: Lens' AutoUpgradeOptions (Maybe Text)
1627+auoAutoUpgradeStartTime
1628+ = lens _auoAutoUpgradeStartTime
1629+ (\ s a -> s{_auoAutoUpgradeStartTime = a})
1630+
1631+-- | [Output only] This field is set when upgrades are about to commence with
1632+-- the description of the upgrade.
1633+auoDescription :: Lens' AutoUpgradeOptions (Maybe Text)
1634+auoDescription
1635+ = lens _auoDescription
1636+ (\ s a -> s{_auoDescription = a})
1637+
1638+instance FromJSON AutoUpgradeOptions where
1639+ parseJSON
1640+ = withObject "AutoUpgradeOptions"
1641+ (\ o ->
1642+ AutoUpgradeOptions' <$>
1643+ (o .:? "autoUpgradeStartTime") <*>
1644+ (o .:? "description"))
1645+
1646+instance ToJSON AutoUpgradeOptions where
1647+ toJSON AutoUpgradeOptions'{..}
1648+ = object
1649+ (catMaybes
1650+ [("autoUpgradeStartTime" .=) <$>
1651+ _auoAutoUpgradeStartTime,
1652+ ("description" .=) <$> _auoDescription])
12091653
12101654-- | ListClustersResponse is the result of ListClustersRequest.
12111655--
@@ -1268,51 +1712,80 @@ instance ToJSON ListClustersResponse where
12681712--
12691713-- /See:/ 'clusterUpdate' smart constructor.
12701714data ClusterUpdate = ClusterUpdate'
1271− { _cuDesiredAddonsConfig :: !(Maybe AddonsConfig)
1272− , _cuDesiredNodePoolId :: !(Maybe Text)
1273− , _cuDesiredNodeVersion :: !(Maybe Text)
1274− , _cuDesiredMasterVersion :: !(Maybe Text)
1275− , _cuDesiredMonitoringService :: !(Maybe Text)
1715+ { _cuDesiredNodePoolAutoscaling :: !(Maybe NodePoolAutoscaling)
1716+ , _cuDesiredAddonsConfig :: !(Maybe AddonsConfig)
1717+ , _cuDesiredNodePoolId :: !(Maybe Text)
1718+ , _cuDesiredImageType :: !(Maybe Text)
1719+ , _cuDesiredNodeVersion :: !(Maybe Text)
1720+ , _cuDesiredMasterVersion :: !(Maybe Text)
1721+ , _cuDesiredLocations :: !(Maybe [Text])
1722+ , _cuDesiredMonitoringService :: !(Maybe Text)
12761723 } deriving (Eq,Show,Data,Typeable,Generic)
12771724
12781725-- | Creates a value of 'ClusterUpdate' with the minimum fields required to make a request.
12791726--
12801727-- Use one of the following lenses to modify other fields as desired:
12811728--
1729+-- * 'cuDesiredNodePoolAutoscaling'
1730+--
12821731-- * 'cuDesiredAddonsConfig'
12831732--
12841733-- * 'cuDesiredNodePoolId'
12851734--
1735+-- * 'cuDesiredImageType'
1736+--
12861737-- * 'cuDesiredNodeVersion'
12871738--
12881739-- * 'cuDesiredMasterVersion'
12891740--
1741+-- * 'cuDesiredLocations'
1742+--
12901743-- * 'cuDesiredMonitoringService'
12911744clusterUpdate
12921745 :: ClusterUpdate
12931746clusterUpdate =
12941747 ClusterUpdate'
1295− { _cuDesiredAddonsConfig = Nothing
1748+ { _cuDesiredNodePoolAutoscaling = Nothing
1749+ , _cuDesiredAddonsConfig = Nothing
12961750 , _cuDesiredNodePoolId = Nothing
1751+ , _cuDesiredImageType = Nothing
12971752 , _cuDesiredNodeVersion = Nothing
12981753 , _cuDesiredMasterVersion = Nothing
1754+ , _cuDesiredLocations = Nothing
12991755 , _cuDesiredMonitoringService = Nothing
13001756 }
13011757
1758+-- | Autoscaler configuration for the node pool specified in
1759+-- desired_node_pool_id. If there is only one pool in the cluster and
1760+-- desired_node_pool_id is not provided then the change applies to that
1761+-- single node pool.
1762+cuDesiredNodePoolAutoscaling :: Lens' ClusterUpdate (Maybe NodePoolAutoscaling)
1763+cuDesiredNodePoolAutoscaling
1764+ = lens _cuDesiredNodePoolAutoscaling
1765+ (\ s a -> s{_cuDesiredNodePoolAutoscaling = a})
1766+
13021767-- | Configurations for the various addons available to run in the cluster.
13031768cuDesiredAddonsConfig :: Lens' ClusterUpdate (Maybe AddonsConfig)
13041769cuDesiredAddonsConfig
13051770 = lens _cuDesiredAddonsConfig
13061771 (\ s a -> s{_cuDesiredAddonsConfig = a})
13071772
1308−-- | The node pool to be upgraded. This field is mandatory if the
1309−-- \"desired_node_version\" or \"desired_image_family\" is specified and
1310−-- there is more than one node pool on the cluster.
1773+-- | The node pool to be upgraded. This field is mandatory if
1774+-- \"desired_node_version\", \"desired_image_family\" or
1775+-- \"desired_node_pool_autoscaling\" is specified and there is more than
1776+-- one node pool on the cluster.
13111777cuDesiredNodePoolId :: Lens' ClusterUpdate (Maybe Text)
13121778cuDesiredNodePoolId
13131779 = lens _cuDesiredNodePoolId
13141780 (\ s a -> s{_cuDesiredNodePoolId = a})
13151781
1782+-- | The desired image type for the node pool. NOTE: Set the
1783+-- \"desired_node_pool\" field as well.
1784+cuDesiredImageType :: Lens' ClusterUpdate (Maybe Text)
1785+cuDesiredImageType
1786+ = lens _cuDesiredImageType
1787+ (\ s a -> s{_cuDesiredImageType = a})
1788+
13161789-- | The Kubernetes version to change the nodes to (typically an upgrade).
13171790-- Use \`-\` to upgrade to the latest version supported by the server.
13181791cuDesiredNodeVersion :: Lens' ClusterUpdate (Maybe Text)
@@ -1328,6 +1801,19 @@ cuDesiredMasterVersion
13281801 = lens _cuDesiredMasterVersion
13291802 (\ s a -> s{_cuDesiredMasterVersion = a})
13301803
1804+-- | The desired list of Google Compute Engine
1805+-- [locations](\/compute\/docs\/zones#available) in which the cluster\'s
1806+-- nodes should be located. Changing the locations a cluster is in will
1807+-- result in nodes being either created or removed from the cluster,
1808+-- depending on whether locations are being added or removed. This list
1809+-- must always include the cluster\'s primary zone.
1810+cuDesiredLocations :: Lens' ClusterUpdate [Text]
1811+cuDesiredLocations
1812+ = lens _cuDesiredLocations
1813+ (\ s a -> s{_cuDesiredLocations = a})
1814+ . _Default
1815+ . _Coerce
1816+
13311817-- | The monitoring service the cluster should use to write metrics.
13321818-- Currently available options: * \"monitoring.googleapis.com\" - the
13331819-- Google Cloud Monitoring service * \"none\" - no metrics will be exported
@@ -1342,25 +1828,56 @@ instance FromJSON ClusterUpdate where
13421828 = withObject "ClusterUpdate"
13431829 (\ o ->
13441830 ClusterUpdate' <$>
1345− (o .:? "desiredAddonsConfig") <*>
1346− (o .:? "desiredNodePoolId")
1831+ (o .:? "desiredNodePoolAutoscaling") <*>
1832+ (o .:? "desiredAddonsConfig")
1833+ <*> (o .:? "desiredNodePoolId")
1834+ <*> (o .:? "desiredImageType")
13471835 <*> (o .:? "desiredNodeVersion")
13481836 <*> (o .:? "desiredMasterVersion")
1837+ <*> (o .:? "desiredLocations" .!= mempty)
13491838 <*> (o .:? "desiredMonitoringService"))
13501839
13511840instance ToJSON ClusterUpdate where
13521841 toJSON ClusterUpdate'{..}
13531842 = object
13541843 (catMaybes
1355− [("desiredAddonsConfig" .=) <$>
1844+ [("desiredNodePoolAutoscaling" .=) <$>
1845+ _cuDesiredNodePoolAutoscaling,
1846+ ("desiredAddonsConfig" .=) <$>
13561847 _cuDesiredAddonsConfig,
13571848 ("desiredNodePoolId" .=) <$> _cuDesiredNodePoolId,
1849+ ("desiredImageType" .=) <$> _cuDesiredImageType,
13581850 ("desiredNodeVersion" .=) <$> _cuDesiredNodeVersion,
13591851 ("desiredMasterVersion" .=) <$>
13601852 _cuDesiredMasterVersion,
1853+ ("desiredLocations" .=) <$> _cuDesiredLocations,
13611854 ("desiredMonitoringService" .=) <$>
13621855 _cuDesiredMonitoringService])
13631856
1857+-- | RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or
1858+-- Failed NodePool upgrade. This will be an no-op if the last upgrade
1859+-- successfully completed.
1860+--
1861+-- /See:/ 'rollbackNodePoolUpgradeRequest' smart constructor.
1862+data RollbackNodePoolUpgradeRequest =
1863+ RollbackNodePoolUpgradeRequest'
1864+ deriving (Eq,Show,Data,Typeable,Generic)
1865+
1866+-- | Creates a value of 'RollbackNodePoolUpgradeRequest' with the minimum fields required to make a request.
1867+--
1868+rollbackNodePoolUpgradeRequest
1869+ :: RollbackNodePoolUpgradeRequest
1870+rollbackNodePoolUpgradeRequest = RollbackNodePoolUpgradeRequest'
1871+
1872+instance FromJSON RollbackNodePoolUpgradeRequest
1873+ where
1874+ parseJSON
1875+ = withObject "RollbackNodePoolUpgradeRequest"
1876+ (\ o -> pure RollbackNodePoolUpgradeRequest')
1877+
1878+instance ToJSON RollbackNodePoolUpgradeRequest where
1879+ toJSON = const emptyObject
1880+
13641881-- | ListNodePoolsResponse is the result of ListNodePoolsRequest.
13651882--
13661883-- /See:/ 'listNodePoolsResponse' smart constructor.