@@ -20,11 +20,51 @@ module Network.Google.Container.Types.Product where
2020import Network.Google.Container.Types.Sum
2121import Network.Google.Prelude
2222
23+-- | Configuration options for the horizontal pod autoscaling feature, which
24+-- increases or decreases the number of replica pods a replication
25+-- controller has based on the resource usage of the existing pods.
26+--
27+-- /See:/ 'horizontalPodAutoscaling' smart constructor.
28+newtype HorizontalPodAutoscaling = HorizontalPodAutoscaling'
29+ { _hpaDisabled :: Maybe Bool
30+ } deriving (Eq,Show,Data,Typeable,Generic)
31+
32+-- | Creates a value of 'HorizontalPodAutoscaling' with the minimum fields required to make a request.
33+--
34+-- Use one of the following lenses to modify other fields as desired:
35+--
36+-- * 'hpaDisabled'
37+horizontalPodAutoscaling
38+ :: HorizontalPodAutoscaling
39+horizontalPodAutoscaling =
40+ HorizontalPodAutoscaling'
41+ { _hpaDisabled = Nothing
42+ }
43+
44+-- | Whether the Horizontal Pod Autoscaling feature is enabled in the
45+-- cluster. When enabled, it ensures that a Heapster pod is running in the
46+-- cluster, which is also used by the Cloud Monitoring service.
47+hpaDisabled :: Lens' HorizontalPodAutoscaling (Maybe Bool)
48+hpaDisabled
49+ = lens _hpaDisabled (\ s a -> s{_hpaDisabled = a})
50+
51+instance FromJSON HorizontalPodAutoscaling where
52+ parseJSON
53+ = withObject "HorizontalPodAutoscaling"
54+ (\ o ->
55+ HorizontalPodAutoscaling' <$> (o .:? "disabled"))
56+
57+instance ToJSON HorizontalPodAutoscaling where
58+ toJSON HorizontalPodAutoscaling'{..}
59+ = object
60+ (catMaybes [("disabled" .=) <$> _hpaDisabled])
61+
2362-- | ListOperationsResponse is the result of ListOperationsRequest.
2463--
2564-- /See:/ 'listOperationsResponse' smart constructor.
26−newtype ListOperationsResponse = ListOperationsResponse'
27− { _lorOperations :: Maybe [Operation]
65+data ListOperationsResponse = ListOperationsResponse'
66+ { _lorOperations :: !(Maybe [Operation])
67+ , _lorMissingZones :: !(Maybe [Text])
2868 } deriving (Eq,Show,Data,Typeable,Generic)
2969
3070-- | Creates a value of 'ListOperationsResponse' with the minimum fields required to make a request.
@@ -32,11 +72,14 @@ newtype ListOperationsResponse = ListOperationsResponse'
3272-- Use one of the following lenses to modify other fields as desired:
3373--
3474-- * 'lorOperations'
75+--
76+-- * 'lorMissingZones'
3577listOperationsResponse
3678 :: ListOperationsResponse
3779listOperationsResponse =
3880 ListOperationsResponse'
3981 { _lorOperations = Nothing
82+ , _lorMissingZones = Nothing
4083 }
4184
4285-- | A list of operations in the project in the specified zone.
@@ -47,17 +90,29 @@ lorOperations
4790 . _Default
4891 . _Coerce
4992
93+-- | If any zones are listed here, the list of operations returned may be
94+-- missing the operations from those zones.
95+lorMissingZones :: Lens' ListOperationsResponse [Text]
96+lorMissingZones
97+ = lens _lorMissingZones
98+ (\ s a -> s{_lorMissingZones = a})
99+ . _Default
100+ . _Coerce
101+
50102instance FromJSON ListOperationsResponse where
51103 parseJSON
52104 = withObject "ListOperationsResponse"
53105 (\ o ->
54106 ListOperationsResponse' <$>
55− (o .:? "operations" .!= mempty))
107+ (o .:? "operations" .!= mempty) <*>
108+ (o .:? "missingZones" .!= mempty))
56109
57110instance ToJSON ListOperationsResponse where
58111 toJSON ListOperationsResponse'{..}
59112 = object
60− (catMaybes [("operations" .=) <$> _lorOperations])
113+ (catMaybes
114+ [("operations" .=) <$> _lorOperations,
115+ ("missingZones" .=) <$> _lorMissingZones])
61116
62117-- | CreateClusterRequest creates a cluster.
63118--
@@ -98,6 +153,7 @@ instance ToJSON CreateClusterRequest where
98153-- /See:/ 'cluster' smart constructor.
99154data Cluster = Cluster'
100155 { _cStatus :: !(Maybe Text)
156+ , _cNodePools :: !(Maybe [NodePool])
101157 , _cNodeConfig :: !(Maybe NodeConfig)
102158 , _cNodeIPv4CIdRSize :: !(Maybe (Textual Int32))
103159 , _cClusterIPv4CIdR :: !(Maybe Text)
@@ -106,13 +162,17 @@ data Cluster = Cluster'
106162 , _cNetwork :: !(Maybe Text)
107163 , _cInitialClusterVersion :: !(Maybe Text)
108164 , _cZone :: !(Maybe Text)
165+ , _cAddonsConfig :: !(Maybe AddonsConfig)
109166 , _cServicesIPv4CIdR :: !(Maybe Text)
110167 , _cMasterAuth :: !(Maybe MasterAuth)
111168 , _cSelfLink :: !(Maybe Text)
112169 , _cName :: !(Maybe Text)
113170 , _cCurrentMasterVersion :: !(Maybe Text)
114171 , _cStatusMessage :: !(Maybe Text)
172+ , _cSubnetwork :: !(Maybe Text)
173+ , _cCurrentNodeCount :: !(Maybe (Textual Int32))
115174 , _cEndpoint :: !(Maybe Text)
175+ , _cLocations :: !(Maybe [Text])
116176 , _cLoggingService :: !(Maybe Text)
117177 , _cDescription :: !(Maybe Text)
118178 , _cInstanceGroupURLs :: !(Maybe [Text])
@@ -126,6 +186,8 @@ data Cluster = Cluster'
126186--
127187-- * 'cStatus'
128188--
189+-- * 'cNodePools'
190+--
129191-- * 'cNodeConfig'
130192--
131193-- * 'cNodeIPv4CIdRSize'
@@ -142,6 +204,8 @@ data Cluster = Cluster'
142204--
143205-- * 'cZone'
144206--
207+-- * 'cAddonsConfig'
208+--
145209-- * 'cServicesIPv4CIdR'
146210--
147211-- * 'cMasterAuth'
@@ -154,8 +218,14 @@ data Cluster = Cluster'
154218--
155219-- * 'cStatusMessage'
156220--
221+-- * 'cSubnetwork'
222+--
223+-- * 'cCurrentNodeCount'
224+--
157225-- * 'cEndpoint'
158226--
227+-- * 'cLocations'
228+--
159229-- * 'cLoggingService'
160230--
161231-- * 'cDescription'
@@ -170,6 +240,7 @@ cluster
170240cluster =
171241 Cluster'
172242 { _cStatus = Nothing
243+ , _cNodePools = Nothing
173244 , _cNodeConfig = Nothing
174245 , _cNodeIPv4CIdRSize = Nothing
175246 , _cClusterIPv4CIdR = Nothing
@@ -178,13 +249,17 @@ cluster =
178249 , _cNetwork = Nothing
179250 , _cInitialClusterVersion = Nothing
180251 , _cZone = Nothing
252+ , _cAddonsConfig = Nothing
181253 , _cServicesIPv4CIdR = Nothing
182254 , _cMasterAuth = Nothing
183255 , _cSelfLink = Nothing
184256 , _cName = Nothing
185257 , _cCurrentMasterVersion = Nothing
186258 , _cStatusMessage = Nothing
259+ , _cSubnetwork = Nothing
260+ , _cCurrentNodeCount = Nothing
187261 , _cEndpoint = Nothing
262+ , _cLocations = Nothing
188263 , _cLoggingService = Nothing
189264 , _cDescription = Nothing
190265 , _cInstanceGroupURLs = Nothing
@@ -196,15 +271,29 @@ cluster =
196271cStatus :: Lens' Cluster (Maybe Text)
197272cStatus = lens _cStatus (\ s a -> s{_cStatus = a})
198273
199−-- | Parameters used in creating the cluster\'s nodes. See the descriptions
200−-- of the child properties of \`nodeConfig\`. If unspecified, the defaults
201−-- for all child properties are used.
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.
277+cNodePools :: Lens' Cluster [NodePool]
278+cNodePools
279+ = lens _cNodePools (\ s a -> s{_cNodePools = a}) .
280+ _Default
281+ . _Coerce
282+
283+-- | Parameters used in creating the cluster\'s nodes. See \`nodeConfig\` for
284+-- the description of its properties. For requests, this field should only
285+-- be used in lieu of a \"node_pool\" object, since this configuration
286+-- (along with the \"initial_node_count\") will be used to create a
287+-- \"NodePool\" object with an auto-generated name. Do not use this and a
288+-- node_pool at the same time. For responses, this field will be populated
289+-- with the node configuration of the first node pool. If unspecified, the
290+-- defaults are used.
202291cNodeConfig :: Lens' Cluster (Maybe NodeConfig)
203292cNodeConfig
204293 = lens _cNodeConfig (\ s a -> s{_cNodeConfig = a})
205294
206295-- | [Output only] The size of the address space on each node for hosting
207−-- containers. This is provisioned from within the container_ipv4_cidr
296+-- containers. This is provisioned from within the \`container_ipv4_cidr\`
208297-- range.
209298cNodeIPv4CIdRSize :: Lens' Cluster (Maybe Int32)
210299cNodeIPv4CIdRSize
@@ -222,9 +311,12 @@ cClusterIPv4CIdR
222311 (\ s a -> s{_cClusterIPv4CIdR = a})
223312
224313-- | The number of nodes to create in this cluster. You must ensure that your
225−-- Compute Engine [resource quota](\/compute\/docs\/resource-quotas) is
226−-- sufficient for this number of instances. You must also have available
227−-- firewall and routes quota.
314+-- Compute Engine resource quota is sufficient for this number of
315+-- instances. You must also have available firewall and routes quota. For
316+-- requests, this field should only be used in lieu of a \"node_pool\"
317+-- object, since this configuration (along with the \"node_config\") will
318+-- be used to create a \"NodePool\" object with an auto-generated name. Do
319+-- not use this and a node_pool at the same time.
228320cInitialNodeCount :: Lens' Cluster (Maybe Int32)
229321cInitialNodeCount
230322 = lens _cInitialNodeCount
@@ -232,20 +324,21 @@ cInitialNodeCount
232324 . mapping _Coerce
233325
234326-- | [Output only] The current version of the node software components. If
235−-- they are currently at different versions because they\'re in the process
236−-- of being upgraded, this reflects the minimum version of any of them.
327+-- they are currently at multiple versions because they\'re in the process
328+-- of being upgraded, this reflects the minimum version of all nodes.
237329cCurrentNodeVersion :: Lens' Cluster (Maybe Text)
238330cCurrentNodeVersion
239331 = lens _cCurrentNodeVersion
240332 (\ s a -> s{_cCurrentNodeVersion = a})
241333
242334-- | The name of the Google Compute Engine
243−-- [network](\/compute\/docs\/networking#networks_1) to which the cluster
244−-- is connected. If left unspecified, the \"default\" network will be used.
335+-- [network](\/compute\/docs\/networks-and-firewalls#networks) to which the
336+-- cluster is connected. If left unspecified, the \`default\` network will
337+-- be used.
245338cNetwork :: Lens' Cluster (Maybe Text)
246339cNetwork = lens _cNetwork (\ s a -> s{_cNetwork = a})
247340
248−-- | [Output only] The software version of Kubernetes master and kubelets
341+-- | [Output only] The software version of the master endpoint and kubelets
249342-- used in the cluster when it was first created. The version can be
250343-- upgraded over time.
251344cInitialClusterVersion :: Lens' Cluster (Maybe Text)
@@ -258,17 +351,23 @@ cInitialClusterVersion
258351cZone :: Lens' Cluster (Maybe Text)
259352cZone = lens _cZone (\ s a -> s{_cZone = a})
260353
354+-- | Configurations for the various addons available to run in the cluster.
355+cAddonsConfig :: Lens' Cluster (Maybe AddonsConfig)
356+cAddonsConfig
357+ = lens _cAddonsConfig
358+ (\ s a -> s{_cAddonsConfig = a})
359+
261360-- | [Output only] The IP address range of the Kubernetes services in this
262361-- cluster, in
263362-- [CIDR](http:\/\/en.wikipedia.org\/wiki\/Classless_Inter-Domain_Routing)
264363-- notation (e.g. \`1.2.3.4\/29\`). Service addresses are typically put in
265−-- the last \/16 from the container CIDR.
364+-- the last \`\/16\` from the container CIDR.
266365cServicesIPv4CIdR :: Lens' Cluster (Maybe Text)
267366cServicesIPv4CIdR
268367 = lens _cServicesIPv4CIdR
269368 (\ s a -> s{_cServicesIPv4CIdR = a})
270369
271−-- | The authentication information for accessing the master.
370+-- | The authentication information for accessing the master endpoint.
272371cMasterAuth :: Lens' Cluster (Maybe MasterAuth)
273372cMasterAuth
274373 = lens _cMasterAuth (\ s a -> s{_cMasterAuth = a})
@@ -298,18 +397,41 @@ cStatusMessage
298397 = lens _cStatusMessage
299398 (\ s a -> s{_cStatusMessage = a})
300399
301−-- | [Output only] The IP address of this cluster\'s Kubernetes master
302−-- endpoint. The endpoint can be accessed from the internet at
400+-- | The name of the Google Compute Engine
401+-- [subnetwork](\/compute\/docs\/subnetworks) to which the cluster is
402+-- connected.
403+cSubnetwork :: Lens' Cluster (Maybe Text)
404+cSubnetwork
405+ = lens _cSubnetwork (\ s a -> s{_cSubnetwork = a})
406+
407+-- | [Output only] The number of nodes currently in the cluster.
408+cCurrentNodeCount :: Lens' Cluster (Maybe Int32)
409+cCurrentNodeCount
410+ = lens _cCurrentNodeCount
411+ (\ s a -> s{_cCurrentNodeCount = a})
412+ . mapping _Coerce
413+
414+-- | [Output only] The IP address of this cluster\'s master endpoint. The
415+-- endpoint can be accessed from the internet at
303416-- \`https:\/\/username:password\'endpoint\/\`. See the \`masterAuth\`
304417-- property of this resource for username and password information.
305418cEndpoint :: Lens' Cluster (Maybe Text)
306419cEndpoint
307420 = lens _cEndpoint (\ s a -> s{_cEndpoint = a})
308421
309−-- | The logging service that the cluster should write logs to. Currently
310−-- available options: * \"logging.googleapis.com\" - the Google Cloud
311−-- Logging service * \"none\" - no logs will be exported from the cluster *
312−-- \"\" - default value; the default is \"logging.googleapis.com\"
422+-- | The list of Google Compute Engine
423+-- [locations](\/compute\/docs\/zones#available) in which the cluster\'s
424+-- nodes should be located.
425+cLocations :: Lens' Cluster [Text]
426+cLocations
427+ = lens _cLocations (\ s a -> s{_cLocations = a}) .
428+ _Default
429+ . _Coerce
430+
431+-- | The logging service the cluster should use to write logs. Currently
432+-- available options: * \`logging.googleapis.com\` - the Google Cloud
433+-- Logging service. * \`none\` - no logs will be exported from the cluster.
434+-- * if left as an empty string,\`logging.googleapis.com\` will be used.
313435cLoggingService :: Lens' Cluster (Maybe Text)
314436cLoggingService
315437 = lens _cLoggingService
@@ -330,11 +452,11 @@ cInstanceGroupURLs
330452 . _Default
331453 . _Coerce
332454
333−-- | The monitoring service that the cluster should write metrics to.
334−-- Currently available options: * \"monitoring.googleapis.com\" - the
335−-- Google Cloud Monitoring service * \"none\" - no metrics will be exported
336−-- from the cluster * \"\" - default value; the default is
337−-- \"monitoring.googleapis.com\"
455+-- | The monitoring service the cluster should use to write metrics.
456+-- Currently available options: * \`monitoring.googleapis.com\` - the
457+-- Google Cloud Monitoring service. * \`none\` - no metrics will be
458+-- exported from the cluster. * if left as an empty string,
459+-- \`monitoring.googleapis.com\` will be used.
338460cMonitoringService :: Lens' Cluster (Maybe Text)
339461cMonitoringService
340462 = lens _cMonitoringService
@@ -351,21 +473,26 @@ instance FromJSON Cluster where
351473 = withObject "Cluster"
352474 (\ o ->
353475 Cluster' <$>
354− (o .:? "status") <*> (o .:? "nodeConfig") <*>
355− (o .:? "nodeIpv4CidrSize")
476+ (o .:? "status") <*> (o .:? "nodePools" .!= mempty)
477+ <*> (o .:? "nodeConfig")
478+ <*> (o .:? "nodeIpv4CidrSize")
356479 <*> (o .:? "clusterIpv4Cidr")
357480 <*> (o .:? "initialNodeCount")
358481 <*> (o .:? "currentNodeVersion")
359482 <*> (o .:? "network")
360483 <*> (o .:? "initialClusterVersion")
361484 <*> (o .:? "zone")
485+ <*> (o .:? "addonsConfig")
362486 <*> (o .:? "servicesIpv4Cidr")
363487 <*> (o .:? "masterAuth")
364488 <*> (o .:? "selfLink")
365489 <*> (o .:? "name")
366490 <*> (o .:? "currentMasterVersion")
367491 <*> (o .:? "statusMessage")
492+ <*> (o .:? "subnetwork")
493+ <*> (o .:? "currentNodeCount")
368494 <*> (o .:? "endpoint")
495+ <*> (o .:? "locations" .!= mempty)
369496 <*> (o .:? "loggingService")
370497 <*> (o .:? "description")
371498 <*> (o .:? "instanceGroupUrls" .!= mempty)
@@ -377,6 +504,7 @@ instance ToJSON Cluster where
377504 = object
378505 (catMaybes
379506 [("status" .=) <$> _cStatus,
507+ ("nodePools" .=) <$> _cNodePools,
380508 ("nodeConfig" .=) <$> _cNodeConfig,
381509 ("nodeIpv4CidrSize" .=) <$> _cNodeIPv4CIdRSize,
382510 ("clusterIpv4Cidr" .=) <$> _cClusterIPv4CIdR,
@@ -386,6 +514,7 @@ instance ToJSON Cluster where
386514 ("initialClusterVersion" .=) <$>
387515 _cInitialClusterVersion,
388516 ("zone" .=) <$> _cZone,
517+ ("addonsConfig" .=) <$> _cAddonsConfig,
389518 ("servicesIpv4Cidr" .=) <$> _cServicesIPv4CIdR,
390519 ("masterAuth" .=) <$> _cMasterAuth,
391520 ("selfLink" .=) <$> _cSelfLink,
@@ -393,14 +522,17 @@ instance ToJSON Cluster where
393522 ("currentMasterVersion" .=) <$>
394523 _cCurrentMasterVersion,
395524 ("statusMessage" .=) <$> _cStatusMessage,
525+ ("subnetwork" .=) <$> _cSubnetwork,
526+ ("currentNodeCount" .=) <$> _cCurrentNodeCount,
396527 ("endpoint" .=) <$> _cEndpoint,
528+ ("locations" .=) <$> _cLocations,
397529 ("loggingService" .=) <$> _cLoggingService,
398530 ("description" .=) <$> _cDescription,
399531 ("instanceGroupUrls" .=) <$> _cInstanceGroupURLs,
400532 ("monitoringService" .=) <$> _cMonitoringService,
401533 ("createTime" .=) <$> _cCreateTime])
402534
403−-- | UpdateClusterRequest updates a cluster.
535+-- | UpdateClusterRequest updates the settings of a cluster.
404536--
405537-- /See:/ 'updateClusterRequest' smart constructor.
406538newtype UpdateClusterRequest = UpdateClusterRequest'
@@ -433,13 +565,14 @@ instance ToJSON UpdateClusterRequest where
433565 toJSON UpdateClusterRequest'{..}
434566 = object (catMaybes [("update" .=) <$> _ucrUpdate])
435567
436−-- | Per-node parameters.
568+-- | Parameters that describe the nodes in a cluster.
437569--
438570-- /See:/ 'nodeConfig' smart constructor.
439571data NodeConfig = NodeConfig'
440572 { _ncDiskSizeGb :: !(Maybe (Textual Int32))
441573 , _ncOAuthScopes :: !(Maybe [Text])
442574 , _ncMachineType :: !(Maybe Text)
575+ , _ncMetadata :: !(Maybe NodeConfigMetadata)
443576 } deriving (Eq,Show,Data,Typeable,Generic)
444577
445578-- | Creates a value of 'NodeConfig' with the minimum fields required to make a request.
@@ -451,6 +584,8 @@ data NodeConfig = NodeConfig'
451584-- * 'ncOAuthScopes'
452585--
453586-- * 'ncMachineType'
587+--
588+-- * 'ncMetadata'
454589nodeConfig
455590 :: NodeConfig
456591nodeConfig =
@@ -458,6 +593,7 @@ nodeConfig =
458593 { _ncDiskSizeGb = Nothing
459594 , _ncOAuthScopes = Nothing
460595 , _ncMachineType = Nothing
596+ , _ncMetadata = Nothing
461597 }
462598
463599-- | Size of the disk attached to each node, specified in GB. The smallest
@@ -474,7 +610,10 @@ ncDiskSizeGb
474610-- \`https:\/\/www.googleapis.com\/auth\/compute\` is required for mounting
475611-- persistent storage on your nodes. *
476612-- \`https:\/\/www.googleapis.com\/auth\/devstorage.read_only\` is required
477−-- for communicating with *gcr.io*. If unspecified, no scopes are added.
613+-- for communicating with **gcr.io** (the [Google Container
614+-- Registry](\/container-registry\/)). If unspecified, no scopes are added,
615+-- unless Cloud Logging or Cloud Monitoring are enabled, in which case
616+-- their required scopes will be added.
478617ncOAuthScopes :: Lens' NodeConfig [Text]
479618ncOAuthScopes
480619 = lens _ncOAuthScopes
@@ -490,6 +629,20 @@ ncMachineType
490629 = lens _ncMachineType
491630 (\ s a -> s{_ncMachineType = a})
492631
632+-- | The metadata key\/value pairs assigned to instances in the cluster. Keys
633+-- must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in
634+-- length. These are reflected as part of a URL in the metadata server.
635+-- Additionally, to avoid ambiguity, keys must not conflict with any other
636+-- metadata keys for the project or be one of the four reserved keys:
637+-- \"instance-template\", \"kube-env\", \"startup-script\", and
638+-- \"user-data\" Values are free-form strings, and only have meaning as
639+-- interpreted by the image running in the instance. The only restriction
640+-- placed on them is that each value\'s size must be less than or equal to
641+-- 32 KB. The total size of all keys and values must be less than 512 KB.
642+ncMetadata :: Lens' NodeConfig (Maybe NodeConfigMetadata)
643+ncMetadata
644+ = lens _ncMetadata (\ s a -> s{_ncMetadata = a})
645+
493646instance FromJSON NodeConfig where
494647 parseJSON
495648 = withObject "NodeConfig"
@@ -497,7 +650,8 @@ instance FromJSON NodeConfig where
497650 NodeConfig' <$>
498651 (o .:? "diskSizeGb") <*>
499652 (o .:? "oauthScopes" .!= mempty)
500− <*> (o .:? "machineType"))
653+ <*> (o .:? "machineType")
654+ <*> (o .:? "metadata"))
501655
502656instance ToJSON NodeConfig where
503657 toJSON NodeConfig'{..}
@@ -505,9 +659,50 @@ instance ToJSON NodeConfig where
505659 (catMaybes
506660 [("diskSizeGb" .=) <$> _ncDiskSizeGb,
507661 ("oauthScopes" .=) <$> _ncOAuthScopes,
508− ("machineType" .=) <$> _ncMachineType])
662+ ("machineType" .=) <$> _ncMachineType,
663+ ("metadata" .=) <$> _ncMetadata])
664+
665+-- | Configuration options for the HTTP (L7) load balancing controller addon,
666+-- which makes it easy to set up HTTP load balancers for services in a
667+-- cluster.
668+--
669+-- /See:/ 'hTTPLoadBalancing' smart constructor.
670+newtype HTTPLoadBalancing = HTTPLoadBalancing'
671+ { _httplbDisabled :: Maybe Bool
672+ } deriving (Eq,Show,Data,Typeable,Generic)
509673
510−-- | Defines the operation resource. All fields are output only.
674+-- | Creates a value of 'HTTPLoadBalancing' with the minimum fields required to make a request.
675+--
676+-- Use one of the following lenses to modify other fields as desired:
677+--
678+-- * 'httplbDisabled'
679+hTTPLoadBalancing
680+ :: HTTPLoadBalancing
681+hTTPLoadBalancing =
682+ HTTPLoadBalancing'
683+ { _httplbDisabled = Nothing
684+ }
685+
686+-- | Whether the HTTP Load Balancing controller is enabled in the cluster.
687+-- When enabled, it runs a small pod in the cluster that manages the load
688+-- balancers.
689+httplbDisabled :: Lens' HTTPLoadBalancing (Maybe Bool)
690+httplbDisabled
691+ = lens _httplbDisabled
692+ (\ s a -> s{_httplbDisabled = a})
693+
694+instance FromJSON HTTPLoadBalancing where
695+ parseJSON
696+ = withObject "HTTPLoadBalancing"
697+ (\ o -> HTTPLoadBalancing' <$> (o .:? "disabled"))
698+
699+instance ToJSON HTTPLoadBalancing where
700+ toJSON HTTPLoadBalancing'{..}
701+ = object
702+ (catMaybes [("disabled" .=) <$> _httplbDisabled])
703+
704+-- | This operation resource represents operations that may have happened or
705+-- are happening on the cluster. All fields are output only.
511706--
512707-- /See:/ 'operation' smart constructor.
513708data Operation = Operation'
@@ -518,6 +713,7 @@ data Operation = Operation'
518713 , _oStatusMessage :: !(Maybe Text)
519714 , _oOperationType :: !(Maybe Text)
520715 , _oTargetLink :: !(Maybe Text)
716+ , _oDetail :: !(Maybe Text)
521717 } deriving (Eq,Show,Data,Typeable,Generic)
522718
523719-- | Creates a value of 'Operation' with the minimum fields required to make a request.
@@ -537,6 +733,8 @@ data Operation = Operation'
537733-- * 'oOperationType'
538734--
539735-- * 'oTargetLink'
736+--
737+-- * 'oDetail'
540738operation
541739 :: Operation
542740operation =
@@ -548,6 +746,7 @@ operation =
548746 , _oStatusMessage = Nothing
549747 , _oOperationType = Nothing
550748 , _oTargetLink = Nothing
749+ , _oDetail = Nothing
551750 }
552751
553752-- | The current status of the operation.
@@ -586,6 +785,10 @@ oTargetLink :: Lens' Operation (Maybe Text)
586785oTargetLink
587786 = lens _oTargetLink (\ s a -> s{_oTargetLink = a})
588787
788+-- | Detailed operation progress, if available.
789+oDetail :: Lens' Operation (Maybe Text)
790+oDetail = lens _oDetail (\ s a -> s{_oDetail = a})
791+
589792instance FromJSON Operation where
590793 parseJSON
591794 = withObject "Operation"
@@ -596,7 +799,8 @@ instance FromJSON Operation where
596799 <*> (o .:? "name")
597800 <*> (o .:? "statusMessage")
598801 <*> (o .:? "operationType")
599− <*> (o .:? "targetLink"))
802+ <*> (o .:? "targetLink")
803+ <*> (o .:? "detail"))
600804
601805instance ToJSON Operation where
602806 toJSON Operation'{..}
@@ -607,7 +811,189 @@ instance ToJSON Operation where
607811 ("name" .=) <$> _oName,
608812 ("statusMessage" .=) <$> _oStatusMessage,
609813 ("operationType" .=) <$> _oOperationType,
610− ("targetLink" .=) <$> _oTargetLink])
814+ ("targetLink" .=) <$> _oTargetLink,
815+ ("detail" .=) <$> _oDetail])
816+
817+-- | Configuration for the addons that can be automatically spun up in the
818+-- cluster, enabling additional functionality.
819+--
820+-- /See:/ 'addonsConfig' smart constructor.
821+data AddonsConfig = AddonsConfig'
822+ { _acHorizontalPodAutoscaling :: !(Maybe HorizontalPodAutoscaling)
823+ , _acHTTPLoadBalancing :: !(Maybe HTTPLoadBalancing)
824+ } deriving (Eq,Show,Data,Typeable,Generic)
825+
826+-- | Creates a value of 'AddonsConfig' with the minimum fields required to make a request.
827+--
828+-- Use one of the following lenses to modify other fields as desired:
829+--
830+-- * 'acHorizontalPodAutoscaling'
831+--
832+-- * 'acHTTPLoadBalancing'
833+addonsConfig
834+ :: AddonsConfig
835+addonsConfig =
836+ AddonsConfig'
837+ { _acHorizontalPodAutoscaling = Nothing
838+ , _acHTTPLoadBalancing = Nothing
839+ }
840+
841+-- | Configuration for the horizontal pod autoscaling feature, which
842+-- increases or decreases the number of replica pods a replication
843+-- controller has based on the resource usage of the existing pods.
844+acHorizontalPodAutoscaling :: Lens' AddonsConfig (Maybe HorizontalPodAutoscaling)
845+acHorizontalPodAutoscaling
846+ = lens _acHorizontalPodAutoscaling
847+ (\ s a -> s{_acHorizontalPodAutoscaling = a})
848+
849+-- | Configuration for the HTTP (L7) load balancing controller addon, which
850+-- makes it easy to set up HTTP load balancers for services in a cluster.
851+acHTTPLoadBalancing :: Lens' AddonsConfig (Maybe HTTPLoadBalancing)
852+acHTTPLoadBalancing
853+ = lens _acHTTPLoadBalancing
854+ (\ s a -> s{_acHTTPLoadBalancing = a})
855+
856+instance FromJSON AddonsConfig where
857+ parseJSON
858+ = withObject "AddonsConfig"
859+ (\ o ->
860+ AddonsConfig' <$>
861+ (o .:? "horizontalPodAutoscaling") <*>
862+ (o .:? "httpLoadBalancing"))
863+
864+instance ToJSON AddonsConfig where
865+ toJSON AddonsConfig'{..}
866+ = object
867+ (catMaybes
868+ [("horizontalPodAutoscaling" .=) <$>
869+ _acHorizontalPodAutoscaling,
870+ ("httpLoadBalancing" .=) <$> _acHTTPLoadBalancing])
871+
872+-- | NodePool contains the name and configuration for a cluster\'s node pool.
873+-- Node pools are a set of nodes (i.e. VM\'s), with a common configuration
874+-- and specification, under the control of the cluster master. They may
875+-- have a set of Kubernetes labels applied to them, which may be used to
876+-- reference them during pod scheduling. They may also be resized up or
877+-- down, to accommodate the workload.
878+--
879+-- /See:/ 'nodePool' smart constructor.
880+data NodePool = NodePool'
881+ { _npStatus :: !(Maybe Text)
882+ , _npConfig :: !(Maybe NodeConfig)
883+ , _npInitialNodeCount :: !(Maybe (Textual Int32))
884+ , _npSelfLink :: !(Maybe Text)
885+ , _npName :: !(Maybe Text)
886+ , _npStatusMessage :: !(Maybe Text)
887+ , _npVersion :: !(Maybe Text)
888+ , _npInstanceGroupURLs :: !(Maybe [Text])
889+ } deriving (Eq,Show,Data,Typeable,Generic)
890+
891+-- | Creates a value of 'NodePool' with the minimum fields required to make a request.
892+--
893+-- Use one of the following lenses to modify other fields as desired:
894+--
895+-- * 'npStatus'
896+--
897+-- * 'npConfig'
898+--
899+-- * 'npInitialNodeCount'
900+--
901+-- * 'npSelfLink'
902+--
903+-- * 'npName'
904+--
905+-- * 'npStatusMessage'
906+--
907+-- * 'npVersion'
908+--
909+-- * 'npInstanceGroupURLs'
910+nodePool
911+ :: NodePool
912+nodePool =
913+ NodePool'
914+ { _npStatus = Nothing
915+ , _npConfig = Nothing
916+ , _npInitialNodeCount = Nothing
917+ , _npSelfLink = Nothing
918+ , _npName = Nothing
919+ , _npStatusMessage = Nothing
920+ , _npVersion = Nothing
921+ , _npInstanceGroupURLs = Nothing
922+ }
923+
924+-- | The status of the nodes in this pool instance.
925+npStatus :: Lens' NodePool (Maybe Text)
926+npStatus = lens _npStatus (\ s a -> s{_npStatus = a})
927+
928+-- | The node configuration of the pool.
929+npConfig :: Lens' NodePool (Maybe NodeConfig)
930+npConfig = lens _npConfig (\ s a -> s{_npConfig = a})
931+
932+-- | The initial node count for the pool. You must ensure that your Compute
933+-- Engine resource quota is sufficient for this number of instances. You
934+-- must also have available firewall and routes quota.
935+npInitialNodeCount :: Lens' NodePool (Maybe Int32)
936+npInitialNodeCount
937+ = lens _npInitialNodeCount
938+ (\ s a -> s{_npInitialNodeCount = a})
939+ . mapping _Coerce
940+
941+-- | Server-defined URL for the resource.
942+npSelfLink :: Lens' NodePool (Maybe Text)
943+npSelfLink
944+ = lens _npSelfLink (\ s a -> s{_npSelfLink = a})
945+
946+-- | The name of the node pool.
947+npName :: Lens' NodePool (Maybe Text)
948+npName = lens _npName (\ s a -> s{_npName = a})
949+
950+-- | [Output only] Additional information about the current status of this
951+-- node pool instance, if available.
952+npStatusMessage :: Lens' NodePool (Maybe Text)
953+npStatusMessage
954+ = lens _npStatusMessage
955+ (\ s a -> s{_npStatusMessage = a})
956+
957+-- | The version of the Kubernetes of this node.
958+npVersion :: Lens' NodePool (Maybe Text)
959+npVersion
960+ = lens _npVersion (\ s a -> s{_npVersion = a})
961+
962+-- | [Output only] The resource URLs of [instance
963+-- groups](\/compute\/docs\/instance-groups\/) associated with this node
964+-- pool.
965+npInstanceGroupURLs :: Lens' NodePool [Text]
966+npInstanceGroupURLs
967+ = lens _npInstanceGroupURLs
968+ (\ s a -> s{_npInstanceGroupURLs = a})
969+ . _Default
970+ . _Coerce
971+
972+instance FromJSON NodePool where
973+ parseJSON
974+ = withObject "NodePool"
975+ (\ o ->
976+ NodePool' <$>
977+ (o .:? "status") <*> (o .:? "config") <*>
978+ (o .:? "initialNodeCount")
979+ <*> (o .:? "selfLink")
980+ <*> (o .:? "name")
981+ <*> (o .:? "statusMessage")
982+ <*> (o .:? "version")
983+ <*> (o .:? "instanceGroupUrls" .!= mempty))
984+
985+instance ToJSON NodePool where
986+ toJSON NodePool'{..}
987+ = object
988+ (catMaybes
989+ [("status" .=) <$> _npStatus,
990+ ("config" .=) <$> _npConfig,
991+ ("initialNodeCount" .=) <$> _npInitialNodeCount,
992+ ("selfLink" .=) <$> _npSelfLink,
993+ ("name" .=) <$> _npName,
994+ ("statusMessage" .=) <$> _npStatusMessage,
995+ ("version" .=) <$> _npVersion,
996+ ("instanceGroupUrls" .=) <$> _npInstanceGroupURLs])
611997
612998-- | The authentication information for accessing the master endpoint.
613999-- Authentication can be done using HTTP basic auth or using client
@@ -646,33 +1032,33 @@ masterAuth =
6461032 , _maClusterCaCertificate = Nothing
6471033 }
6481034
649−-- | [Output only] Base64 encoded private key used by clients to authenticate
1035+-- | [Output only] Base64-encoded private key used by clients to authenticate
6501036-- to the cluster endpoint.
6511037maClientKey :: Lens' MasterAuth (Maybe Text)
6521038maClientKey
6531039 = lens _maClientKey (\ s a -> s{_maClientKey = a})
6541040
655−-- | The username to use for HTTP basic authentication when accessing the
656−-- Kubernetes master endpoint.
1041+-- | The username to use for HTTP basic authentication to the master
1042+-- endpoint.
6571043maUsername :: Lens' MasterAuth (Maybe Text)
6581044maUsername
6591045 = lens _maUsername (\ s a -> s{_maUsername = a})
6601046
661−-- | [Output only] Base64 encoded public certificate used by clients to
1047+-- | [Output only] Base64-encoded public certificate used by clients to
6621048-- authenticate to the cluster endpoint.
6631049maClientCertificate :: Lens' MasterAuth (Maybe Text)
6641050maClientCertificate
6651051 = lens _maClientCertificate
6661052 (\ s a -> s{_maClientCertificate = a})
6671053
668−-- | The password to use for HTTP basic authentication when accessing the
669−-- Kubernetes master endpoint. Because the master endpoint is open to the
670−-- internet, you should create a strong password.
1054+-- | The password to use for HTTP basic authentication to the master
1055+-- endpoint. Because the master endpoint is open to the Internet, you
1056+-- should create a strong password.
6711057maPassword :: Lens' MasterAuth (Maybe Text)
6721058maPassword
6731059 = lens _maPassword (\ s a -> s{_maPassword = a})
6741060
675−-- | [Output only] Base64 encoded public certificate that is the root of
1061+-- | [Output only] Base64-encoded public certificate that is the root of
6761062-- trust for the cluster.
6771063maClusterCaCertificate :: Lens' MasterAuth (Maybe Text)
6781064maClusterCaCertificate
@@ -700,11 +1086,55 @@ instance ToJSON MasterAuth where
7001086 ("clusterCaCertificate" .=) <$>
7011087 _maClusterCaCertificate])
7021088
703−-- | Container Engine Server configuration.
1089+-- | The metadata key\/value pairs assigned to instances in the cluster. Keys
1090+-- must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in
1091+-- length. These are reflected as part of a URL in the metadata server.
1092+-- Additionally, to avoid ambiguity, keys must not conflict with any other
1093+-- metadata keys for the project or be one of the four reserved keys:
1094+-- \"instance-template\", \"kube-env\", \"startup-script\", and
1095+-- \"user-data\" Values are free-form strings, and only have meaning as
1096+-- interpreted by the image running in the instance. The only restriction
1097+-- placed on them is that each value\'s size must be less than or equal to
1098+-- 32 KB. The total size of all keys and values must be less than 512 KB.
1099+--
1100+-- /See:/ 'nodeConfigMetadata' smart constructor.
1101+newtype NodeConfigMetadata = NodeConfigMetadata'
1102+ { _ncmAddtional :: HashMap Text Text
1103+ } deriving (Eq,Show,Data,Typeable,Generic)
1104+
1105+-- | Creates a value of 'NodeConfigMetadata' with the minimum fields required to make a request.
1106+--
1107+-- Use one of the following lenses to modify other fields as desired:
1108+--
1109+-- * 'ncmAddtional'
1110+nodeConfigMetadata
1111+ :: HashMap Text Text -- ^ 'ncmAddtional'
1112+ -> NodeConfigMetadata
1113+nodeConfigMetadata pNcmAddtional_ =
1114+ NodeConfigMetadata'
1115+ { _ncmAddtional = _Coerce # pNcmAddtional_
1116+ }
1117+
1118+ncmAddtional :: Lens' NodeConfigMetadata (HashMap Text Text)
1119+ncmAddtional
1120+ = lens _ncmAddtional (\ s a -> s{_ncmAddtional = a})
1121+ . _Coerce
1122+
1123+instance FromJSON NodeConfigMetadata where
1124+ parseJSON
1125+ = withObject "NodeConfigMetadata"
1126+ (\ o -> NodeConfigMetadata' <$> (parseJSONObject o))
1127+
1128+instance ToJSON NodeConfigMetadata where
1129+ toJSON = toJSON . _ncmAddtional
1130+
1131+-- | Container Engine service configuration.
7041132--
7051133-- /See:/ 'serverConfig' smart constructor.
7061134data ServerConfig = ServerConfig'
7071135 { _scValidNodeVersions :: !(Maybe [Text])
1136+ , _scDefaultImageFamily :: !(Maybe Text)
1137+ , _scValidImageFamilies :: !(Maybe [Text])
7081138 , _scDefaultClusterVersion :: !(Maybe Text)
7091139 } deriving (Eq,Show,Data,Typeable,Generic)
7101140
@@ -714,12 +1144,18 @@ data ServerConfig = ServerConfig'
7141144--
7151145-- * 'scValidNodeVersions'
7161146--
1147+-- * 'scDefaultImageFamily'
1148+--
1149+-- * 'scValidImageFamilies'
1150+--
7171151-- * 'scDefaultClusterVersion'
7181152serverConfig
7191153 :: ServerConfig
7201154serverConfig =
7211155 ServerConfig'
7221156 { _scValidNodeVersions = Nothing
1157+ , _scDefaultImageFamily = Nothing
1158+ , _scValidImageFamilies = Nothing
7231159 , _scDefaultClusterVersion = Nothing
7241160 }
7251161
@@ -731,7 +1167,21 @@ scValidNodeVersions
7311167 . _Default
7321168 . _Coerce
7331169
734−-- | What version this server deploys by default.
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})
1181+ . _Default
1182+ . _Coerce
1183+
1184+-- | Version of Kubernetes the service deploys by default.
7351185scDefaultClusterVersion :: Lens' ServerConfig (Maybe Text)
7361186scDefaultClusterVersion
7371187 = lens _scDefaultClusterVersion
@@ -743,21 +1193,26 @@ instance FromJSON ServerConfig where
7431193 (\ o ->
7441194 ServerConfig' <$>
7451195 (o .:? "validNodeVersions" .!= mempty) <*>
746− (o .:? "defaultClusterVersion"))
1196+ (o .:? "defaultImageFamily")
1197+ <*> (o .:? "validImageFamilies" .!= mempty)
1198+ <*> (o .:? "defaultClusterVersion"))
7471199
7481200instance ToJSON ServerConfig where
7491201 toJSON ServerConfig'{..}
7501202 = object
7511203 (catMaybes
7521204 [("validNodeVersions" .=) <$> _scValidNodeVersions,
1205+ ("defaultImageFamily" .=) <$> _scDefaultImageFamily,
1206+ ("validImageFamilies" .=) <$> _scValidImageFamilies,
7531207 ("defaultClusterVersion" .=) <$>
7541208 _scDefaultClusterVersion])
7551209
7561210-- | ListClustersResponse is the result of ListClustersRequest.
7571211--
7581212-- /See:/ 'listClustersResponse' smart constructor.
759−newtype ListClustersResponse = ListClustersResponse'
760− { _lcrClusters :: Maybe [Cluster]
1213+data ListClustersResponse = ListClustersResponse'
1214+ { _lcrClusters :: !(Maybe [Cluster])
1215+ , _lcrMissingZones :: !(Maybe [Text])
7611216 } deriving (Eq,Show,Data,Typeable,Generic)
7621217
7631218-- | Creates a value of 'ListClustersResponse' with the minimum fields required to make a request.
@@ -765,11 +1220,14 @@ newtype ListClustersResponse = ListClustersResponse'
7651220-- Use one of the following lenses to modify other fields as desired:
7661221--
7671222-- * 'lcrClusters'
1223+--
1224+-- * 'lcrMissingZones'
7681225listClustersResponse
7691226 :: ListClustersResponse
7701227listClustersResponse =
7711228 ListClustersResponse'
7721229 { _lcrClusters = Nothing
1230+ , _lcrMissingZones = Nothing
7731231 }
7741232
7751233-- | A list of clusters in the project in the specified zone, or across all
@@ -780,53 +1238,199 @@ lcrClusters
7801238 _Default
7811239 . _Coerce
7821240
1241+-- | If any zones are listed here, the list of clusters returned may be
1242+-- missing those zones.
1243+lcrMissingZones :: Lens' ListClustersResponse [Text]
1244+lcrMissingZones
1245+ = lens _lcrMissingZones
1246+ (\ s a -> s{_lcrMissingZones = a})
1247+ . _Default
1248+ . _Coerce
1249+
7831250instance FromJSON ListClustersResponse where
7841251 parseJSON
7851252 = withObject "ListClustersResponse"
7861253 (\ o ->
7871254 ListClustersResponse' <$>
788− (o .:? "clusters" .!= mempty))
1255+ (o .:? "clusters" .!= mempty) <*>
1256+ (o .:? "missingZones" .!= mempty))
7891257
7901258instance ToJSON ListClustersResponse where
7911259 toJSON ListClustersResponse'{..}
7921260 = object
793− (catMaybes [("clusters" .=) <$> _lcrClusters])
1261+ (catMaybes
1262+ [("clusters" .=) <$> _lcrClusters,
1263+ ("missingZones" .=) <$> _lcrMissingZones])
7941264
795−-- | ClusterUpdate describes an update to the cluster.
1265+-- | ClusterUpdate describes an update to the cluster. Exactly one update can
1266+-- be applied to a cluster with each request, so at most one field can be
1267+-- provided.
7961268--
7971269-- /See:/ 'clusterUpdate' smart constructor.
798−newtype ClusterUpdate = ClusterUpdate'
799− { _cuDesiredNodeVersion :: Maybe Text
1270+data ClusterUpdate = ClusterUpdate'
1271+ { _cuDesiredAddonsConfig :: !(Maybe AddonsConfig)
1272+ , _cuDesiredNodePoolId :: !(Maybe Text)
1273+ , _cuDesiredNodeVersion :: !(Maybe Text)
1274+ , _cuDesiredMasterVersion :: !(Maybe Text)
1275+ , _cuDesiredMonitoringService :: !(Maybe Text)
8001276 } deriving (Eq,Show,Data,Typeable,Generic)
8011277
8021278-- | Creates a value of 'ClusterUpdate' with the minimum fields required to make a request.
8031279--
8041280-- Use one of the following lenses to modify other fields as desired:
8051281--
1282+-- * 'cuDesiredAddonsConfig'
1283+--
1284+-- * 'cuDesiredNodePoolId'
1285+--
8061286-- * 'cuDesiredNodeVersion'
1287+--
1288+-- * 'cuDesiredMasterVersion'
1289+--
1290+-- * 'cuDesiredMonitoringService'
8071291clusterUpdate
8081292 :: ClusterUpdate
8091293clusterUpdate =
8101294 ClusterUpdate'
811− { _cuDesiredNodeVersion = Nothing
1295+ { _cuDesiredAddonsConfig = Nothing
1296+ , _cuDesiredNodePoolId = Nothing
1297+ , _cuDesiredNodeVersion = Nothing
1298+ , _cuDesiredMasterVersion = Nothing
1299+ , _cuDesiredMonitoringService = Nothing
8121300 }
8131301
1302+-- | Configurations for the various addons available to run in the cluster.
1303+cuDesiredAddonsConfig :: Lens' ClusterUpdate (Maybe AddonsConfig)
1304+cuDesiredAddonsConfig
1305+ = lens _cuDesiredAddonsConfig
1306+ (\ s a -> s{_cuDesiredAddonsConfig = a})
1307+
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.
1311+cuDesiredNodePoolId :: Lens' ClusterUpdate (Maybe Text)
1312+cuDesiredNodePoolId
1313+ = lens _cuDesiredNodePoolId
1314+ (\ s a -> s{_cuDesiredNodePoolId = a})
1315+
8141316-- | The Kubernetes version to change the nodes to (typically an upgrade).
815−-- Use \"-\" to upgrade to the latest version supported by the server.
1317+-- Use \`-\` to upgrade to the latest version supported by the server.
8161318cuDesiredNodeVersion :: Lens' ClusterUpdate (Maybe Text)
8171319cuDesiredNodeVersion
8181320 = lens _cuDesiredNodeVersion
8191321 (\ s a -> s{_cuDesiredNodeVersion = a})
8201322
1323+-- | The Kubernetes version to change the master to. The only valid value is
1324+-- the latest supported version. Use \"-\" to have the server automatically
1325+-- select the latest version.
1326+cuDesiredMasterVersion :: Lens' ClusterUpdate (Maybe Text)
1327+cuDesiredMasterVersion
1328+ = lens _cuDesiredMasterVersion
1329+ (\ s a -> s{_cuDesiredMasterVersion = a})
1330+
1331+-- | The monitoring service the cluster should use to write metrics.
1332+-- Currently available options: * \"monitoring.googleapis.com\" - the
1333+-- Google Cloud Monitoring service * \"none\" - no metrics will be exported
1334+-- from the cluster
1335+cuDesiredMonitoringService :: Lens' ClusterUpdate (Maybe Text)
1336+cuDesiredMonitoringService
1337+ = lens _cuDesiredMonitoringService
1338+ (\ s a -> s{_cuDesiredMonitoringService = a})
1339+
8211340instance FromJSON ClusterUpdate where
8221341 parseJSON
8231342 = withObject "ClusterUpdate"
8241343 (\ o ->
825− ClusterUpdate' <$> (o .:? "desiredNodeVersion"))
1344+ ClusterUpdate' <$>
1345+ (o .:? "desiredAddonsConfig") <*>
1346+ (o .:? "desiredNodePoolId")
1347+ <*> (o .:? "desiredNodeVersion")
1348+ <*> (o .:? "desiredMasterVersion")
1349+ <*> (o .:? "desiredMonitoringService"))
8261350
8271351instance ToJSON ClusterUpdate where
8281352 toJSON ClusterUpdate'{..}
8291353 = object
8301354 (catMaybes
831− [("desiredNodeVersion" .=) <$>
832− _cuDesiredNodeVersion])
1355+ [("desiredAddonsConfig" .=) <$>
1356+ _cuDesiredAddonsConfig,
1357+ ("desiredNodePoolId" .=) <$> _cuDesiredNodePoolId,
1358+ ("desiredNodeVersion" .=) <$> _cuDesiredNodeVersion,
1359+ ("desiredMasterVersion" .=) <$>
1360+ _cuDesiredMasterVersion,
1361+ ("desiredMonitoringService" .=) <$>
1362+ _cuDesiredMonitoringService])
1363+
1364+-- | ListNodePoolsResponse is the result of ListNodePoolsRequest.
1365+--
1366+-- /See:/ 'listNodePoolsResponse' smart constructor.
1367+newtype ListNodePoolsResponse = ListNodePoolsResponse'
1368+ { _lnprNodePools :: Maybe [NodePool]
1369+ } deriving (Eq,Show,Data,Typeable,Generic)
1370+
1371+-- | Creates a value of 'ListNodePoolsResponse' with the minimum fields required to make a request.
1372+--
1373+-- Use one of the following lenses to modify other fields as desired:
1374+--
1375+-- * 'lnprNodePools'
1376+listNodePoolsResponse
1377+ :: ListNodePoolsResponse
1378+listNodePoolsResponse =
1379+ ListNodePoolsResponse'
1380+ { _lnprNodePools = Nothing
1381+ }
1382+
1383+-- | A list of node pools for a cluster.
1384+lnprNodePools :: Lens' ListNodePoolsResponse [NodePool]
1385+lnprNodePools
1386+ = lens _lnprNodePools
1387+ (\ s a -> s{_lnprNodePools = a})
1388+ . _Default
1389+ . _Coerce
1390+
1391+instance FromJSON ListNodePoolsResponse where
1392+ parseJSON
1393+ = withObject "ListNodePoolsResponse"
1394+ (\ o ->
1395+ ListNodePoolsResponse' <$>
1396+ (o .:? "nodePools" .!= mempty))
1397+
1398+instance ToJSON ListNodePoolsResponse where
1399+ toJSON ListNodePoolsResponse'{..}
1400+ = object
1401+ (catMaybes [("nodePools" .=) <$> _lnprNodePools])
1402+
1403+-- | CreateNodePoolRequest creates a node pool for a cluster.
1404+--
1405+-- /See:/ 'createNodePoolRequest' smart constructor.
1406+newtype CreateNodePoolRequest = CreateNodePoolRequest'
1407+ { _cnprNodePool :: Maybe NodePool
1408+ } deriving (Eq,Show,Data,Typeable,Generic)
1409+
1410+-- | Creates a value of 'CreateNodePoolRequest' with the minimum fields required to make a request.
1411+--
1412+-- Use one of the following lenses to modify other fields as desired:
1413+--
1414+-- * 'cnprNodePool'
1415+createNodePoolRequest
1416+ :: CreateNodePoolRequest
1417+createNodePoolRequest =
1418+ CreateNodePoolRequest'
1419+ { _cnprNodePool = Nothing
1420+ }
1421+
1422+-- | The node pool to create.
1423+cnprNodePool :: Lens' CreateNodePoolRequest (Maybe NodePool)
1424+cnprNodePool
1425+ = lens _cnprNodePool (\ s a -> s{_cnprNodePool = a})
1426+
1427+instance FromJSON CreateNodePoolRequest where
1428+ parseJSON
1429+ = withObject "CreateNodePoolRequest"
1430+ (\ o ->
1431+ CreateNodePoolRequest' <$> (o .:? "nodePool"))
1432+
1433+instance ToJSON CreateNodePoolRequest where
1434+ toJSON CreateNodePoolRequest'{..}
1435+ = object
1436+ (catMaybes [("nodePool" .=) <$> _cnprNodePool])