on develop help sign in
Regenerating gogol-container from updated service defintions
commit92d3fe934072bf9f72aee0cabc188ddedc4e6f77 authorBrendan Hay <brendan.g.hay@gmail.com> dateSat 11 Feb 2017, 11:36 (10 years ago) parent7393862
7 files changed+1410−61
gogol-container/gen/Network/Google/Container.hs+73−2 gogol-container/gen/Network/Google/Container/Types.hs+57−2 gogol-container/gen/Network/Google/Container/Types/Product.hs+574−57 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/NodePools/Rollback.hs+241 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/NodePools/SetManagement.hs+244 gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/Cancel.hs+218 gogol-container/gogol-container.cabal+3
gogol-container/gen/Network/Google/Container.hs+73−2
@@ -54,12 +54,21 @@ module Network.Google.Container
5454 -- ** container.projects.zones.clusters.nodePools.list
5555 , module Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.List
5656
57+ -- ** container.projects.zones.clusters.nodePools.rollback
58+ , module Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Rollback
59+
60+ -- ** container.projects.zones.clusters.nodePools.setManagement
61+ , module Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.SetManagement
62+
5763 -- ** container.projects.zones.clusters.update
5864 , module Network.Google.Resource.Container.Projects.Zones.Clusters.Update
5965
6066 -- ** container.projects.zones.getServerconfig
6167 , module Network.Google.Resource.Container.Projects.Zones.GetServerConfig
6268
69+ -- ** container.projects.zones.operations.cancel
70+ , module Network.Google.Resource.Container.Projects.Zones.Operations.Cancel
71+
6372 -- ** container.projects.zones.operations.get
6473 , module Network.Google.Resource.Container.Projects.Zones.Operations.Get
6574
@@ -89,6 +98,7 @@ module Network.Google.Container
8998 , cluster
9099 , cStatus
91100 , cNodePools
101+ , cEnableKubernetesAlpha
92102 , cNodeConfig
93103 , cNodeIPv4CIdRSize
94104 , cClusterIPv4CIdR
@@ -107,6 +117,7 @@ module Network.Google.Container
107117 , cSubnetwork
108118 , cCurrentNodeCount
109119 , cEndpoint
120+ , cExpireTime
110121 , cLocations
111122 , cLoggingService
112123 , cDescription
@@ -114,6 +125,10 @@ module Network.Google.Container
114125 , cMonitoringService
115126 , cCreateTime
116127
128+ -- ** CancelOperationRequest
129+ , CancelOperationRequest
130+ , cancelOperationRequest
131+
117132 -- ** UpdateClusterRequest
118133 , UpdateClusterRequest
119134 , updateClusterRequest
@@ -122,10 +137,16 @@ module Network.Google.Container
122137 -- ** NodeConfig
123138 , NodeConfig
124139 , nodeConfig
140+ , ncLocalSsdCount
125141 , ncDiskSizeGb
126142 , ncOAuthScopes
143+ , ncServiceAccount
144+ , ncImageType
127145 , ncMachineType
128146 , ncMetadata
147+ , ncLabels
148+ , ncTags
149+ , ncPreemptible
129150
130151 -- ** HTTPLoadBalancing
131152 , HTTPLoadBalancing
@@ -144,6 +165,23 @@ module Network.Google.Container
144165 , oTargetLink
145166 , oDetail
146167
168+ -- ** Empty
169+ , Empty
170+ , empty
171+
172+ -- ** NodeManagement
173+ , NodeManagement
174+ , nodeManagement
175+ , nmAutoUpgrade
176+ , nmUpgradeOptions
177+
178+ -- ** NodePoolAutoscaling
179+ , NodePoolAutoscaling
180+ , nodePoolAutoscaling
181+ , npaMaxNodeCount
182+ , npaEnabled
183+ , npaMinNodeCount
184+
147185 -- ** AddonsConfig
148186 , AddonsConfig
149187 , addonsConfig
@@ -154,14 +192,21 @@ module Network.Google.Container
154192 , NodePool
155193 , nodePool
156194 , npStatus
195+ , npAutoscaling
157196 , npConfig
158197 , npInitialNodeCount
198+ , npManagement
159199 , npSelfLink
160200 , npName
161201 , npStatusMessage
162202 , npVersion
163203 , npInstanceGroupURLs
164204
205+ -- ** SetNodePoolManagementRequest
206+ , SetNodePoolManagementRequest
207+ , setNodePoolManagementRequest
208+ , snpmrManagement
209+
165210 -- ** MasterAuth
166211 , MasterAuth
167212 , masterAuth
@@ -176,13 +221,25 @@ module Network.Google.Container
176221 , nodeConfigMetadata
177222 , ncmAddtional
178223
224+ -- ** NodeConfigLabels
225+ , NodeConfigLabels
226+ , nodeConfigLabels
227+ , nclAddtional
228+
179229 -- ** ServerConfig
180230 , ServerConfig
181231 , serverConfig
232+ , scDefaultImageType
182233 , scValidNodeVersions
183− , scDefaultImageFamily
184− , scValidImageFamilies
234+ , scValidImageTypes
185235 , scDefaultClusterVersion
236+ , scValidMasterVersions
237+
238+ -- ** AutoUpgradeOptions
239+ , AutoUpgradeOptions
240+ , autoUpgradeOptions
241+ , auoAutoUpgradeStartTime
242+ , auoDescription
186243
187244 -- ** ListClustersResponse
188245 , ListClustersResponse
@@ -193,12 +250,19 @@ module Network.Google.Container
193250 -- ** ClusterUpdate
194251 , ClusterUpdate
195252 , clusterUpdate
253+ , cuDesiredNodePoolAutoscaling
196254 , cuDesiredAddonsConfig
197255 , cuDesiredNodePoolId
256+ , cuDesiredImageType
198257 , cuDesiredNodeVersion
199258 , cuDesiredMasterVersion
259+ , cuDesiredLocations
200260 , cuDesiredMonitoringService
201261
262+ -- ** RollbackNodePoolUpgradeRequest
263+ , RollbackNodePoolUpgradeRequest
264+ , rollbackNodePoolUpgradeRequest
265+
202266 -- ** ListNodePoolsResponse
203267 , ListNodePoolsResponse
204268 , listNodePoolsResponse
@@ -220,8 +284,11 @@ import Network.Google.Resource.Container.Projects.Zones.Clusters.NodeP
220284import Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Delete
221285import Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Get
222286import Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.List
287+import Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Rollback
288+import Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.SetManagement
223289import Network.Google.Resource.Container.Projects.Zones.Clusters.Update
224290import Network.Google.Resource.Container.Projects.Zones.GetServerConfig
291+import Network.Google.Resource.Container.Projects.Zones.Operations.Cancel
225292import Network.Google.Resource.Container.Projects.Zones.Operations.Get
226293import Network.Google.Resource.Container.Projects.Zones.Operations.List
227294
@@ -233,8 +300,12 @@ TODO
233300type ContainerAPI =
234301 ProjectsZonesOperationsListResource :<|>
235302 ProjectsZonesOperationsGetResource
303+ :<|> ProjectsZonesOperationsCancelResource
236304 :<|> ProjectsZonesClustersNodePoolsListResource
237305 :<|> ProjectsZonesClustersNodePoolsGetResource
306+ :<|> ProjectsZonesClustersNodePoolsRollbackResource
307+ :<|>
308+ ProjectsZonesClustersNodePoolsSetManagementResource
238309 :<|> ProjectsZonesClustersNodePoolsCreateResource
239310 :<|> ProjectsZonesClustersNodePoolsDeleteResource
240311 :<|> ProjectsZonesClustersListResource
gogol-container/gen/Network/Google/Container/Types.hs+57−2
@@ -43,6 +43,7 @@ module Network.Google.Container.Types
4343 , cluster
4444 , cStatus
4545 , cNodePools
46+ , cEnableKubernetesAlpha
4647 , cNodeConfig
4748 , cNodeIPv4CIdRSize
4849 , cClusterIPv4CIdR
@@ -61,6 +62,7 @@ module Network.Google.Container.Types
6162 , cSubnetwork
6263 , cCurrentNodeCount
6364 , cEndpoint
65+ , cExpireTime
6466 , cLocations
6567 , cLoggingService
6668 , cDescription
@@ -68,6 +70,10 @@ module Network.Google.Container.Types
6870 , cMonitoringService
6971 , cCreateTime
7072
73+ -- * CancelOperationRequest
74+ , CancelOperationRequest
75+ , cancelOperationRequest
76+
7177 -- * UpdateClusterRequest
7278 , UpdateClusterRequest
7379 , updateClusterRequest
@@ -76,10 +82,16 @@ module Network.Google.Container.Types
7682 -- * NodeConfig
7783 , NodeConfig
7884 , nodeConfig
85+ , ncLocalSsdCount
7986 , ncDiskSizeGb
8087 , ncOAuthScopes
88+ , ncServiceAccount
89+ , ncImageType
8190 , ncMachineType
8291 , ncMetadata
92+ , ncLabels
93+ , ncTags
94+ , ncPreemptible
8395
8496 -- * HTTPLoadBalancing
8597 , HTTPLoadBalancing
@@ -98,6 +110,23 @@ module Network.Google.Container.Types
98110 , oTargetLink
99111 , oDetail
100112
113+ -- * Empty
114+ , Empty
115+ , empty
116+
117+ -- * NodeManagement
118+ , NodeManagement
119+ , nodeManagement
120+ , nmAutoUpgrade
121+ , nmUpgradeOptions
122+
123+ -- * NodePoolAutoscaling
124+ , NodePoolAutoscaling
125+ , nodePoolAutoscaling
126+ , npaMaxNodeCount
127+ , npaEnabled
128+ , npaMinNodeCount
129+
101130 -- * AddonsConfig
102131 , AddonsConfig
103132 , addonsConfig
@@ -108,14 +137,21 @@ module Network.Google.Container.Types
108137 , NodePool
109138 , nodePool
110139 , npStatus
140+ , npAutoscaling
111141 , npConfig
112142 , npInitialNodeCount
143+ , npManagement
113144 , npSelfLink
114145 , npName
115146 , npStatusMessage
116147 , npVersion
117148 , npInstanceGroupURLs
118149
150+ -- * SetNodePoolManagementRequest
151+ , SetNodePoolManagementRequest
152+ , setNodePoolManagementRequest
153+ , snpmrManagement
154+
119155 -- * MasterAuth
120156 , MasterAuth
121157 , masterAuth
@@ -130,13 +166,25 @@ module Network.Google.Container.Types
130166 , nodeConfigMetadata
131167 , ncmAddtional
132168
169+ -- * NodeConfigLabels
170+ , NodeConfigLabels
171+ , nodeConfigLabels
172+ , nclAddtional
173+
133174 -- * ServerConfig
134175 , ServerConfig
135176 , serverConfig
177+ , scDefaultImageType
136178 , scValidNodeVersions
137− , scDefaultImageFamily
138− , scValidImageFamilies
179+ , scValidImageTypes
139180 , scDefaultClusterVersion
181+ , scValidMasterVersions
182+
183+ -- * AutoUpgradeOptions
184+ , AutoUpgradeOptions
185+ , autoUpgradeOptions
186+ , auoAutoUpgradeStartTime
187+ , auoDescription
140188
141189 -- * ListClustersResponse
142190 , ListClustersResponse
@@ -147,12 +195,19 @@ module Network.Google.Container.Types
147195 -- * ClusterUpdate
148196 , ClusterUpdate
149197 , clusterUpdate
198+ , cuDesiredNodePoolAutoscaling
150199 , cuDesiredAddonsConfig
151200 , cuDesiredNodePoolId
201+ , cuDesiredImageType
152202 , cuDesiredNodeVersion
153203 , cuDesiredMasterVersion
204+ , cuDesiredLocations
154205 , cuDesiredMonitoringService
155206
207+ -- * RollbackNodePoolUpgradeRequest
208+ , RollbackNodePoolUpgradeRequest
209+ , rollbackNodePoolUpgradeRequest
210+
156211 -- * ListNodePoolsResponse
157212 , ListNodePoolsResponse
158213 , listNodePoolsResponse
gogol-container/gen/Network/Google/Container/Types/Product.hs+574−57
@@ -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.
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/NodePools/Rollback.hsnew file+241
@@ -0,0 +1,241 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Rollback
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Roll back the previously Aborted or Failed NodePool upgrade. This will
24+-- be an no-op if the last upgrade successfully completed.
25+--
26+-- /See:/ <https://cloud.google.com/container-engine/ Google Container Engine API Reference> for @container.projects.zones.clusters.nodePools.rollback@.
27+module Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Rollback
28+ (
29+ -- * REST Resource
30+ ProjectsZonesClustersNodePoolsRollbackResource
31+
32+ -- * Creating a Request
33+ , projectsZonesClustersNodePoolsRollback
34+ , ProjectsZonesClustersNodePoolsRollback
35+
36+ -- * Request Lenses
37+ , pzcnprXgafv
38+ , pzcnprUploadProtocol
39+ , pzcnprPp
40+ , pzcnprAccessToken
41+ , pzcnprUploadType
42+ , pzcnprZone
43+ , pzcnprPayload
44+ , pzcnprNodePoolId
45+ , pzcnprBearerToken
46+ , pzcnprClusterId
47+ , pzcnprProjectId
48+ , pzcnprCallback
49+ ) where
50+
51+import Network.Google.Container.Types
52+import Network.Google.Prelude
53+
54+-- | A resource alias for @container.projects.zones.clusters.nodePools.rollback@ method which the
55+-- 'ProjectsZonesClustersNodePoolsRollback' request conforms to.
56+type ProjectsZonesClustersNodePoolsRollbackResource =
57+ "v1" :>
58+ "projects" :>
59+ Capture "projectId" Text :>
60+ "zones" :>
61+ Capture "zone" Text :>
62+ "clusters" :>
63+ Capture "clusterId" Text :>
64+ "nodePools" :>
65+ CaptureMode "nodePoolId" "rollback" Text :>
66+ QueryParam "$.xgafv" Text :>
67+ QueryParam "upload_protocol" Text :>
68+ QueryParam "pp" Bool :>
69+ QueryParam "access_token" Text :>
70+ QueryParam "uploadType" Text :>
71+ QueryParam "bearer_token" Text :>
72+ QueryParam "callback" Text :>
73+ QueryParam "alt" AltJSON :>
74+ ReqBody '[JSON]
75+ RollbackNodePoolUpgradeRequest
76+ :> Post '[JSON] Operation
77+
78+-- | Roll back the previously Aborted or Failed NodePool upgrade. This will
79+-- be an no-op if the last upgrade successfully completed.
80+--
81+-- /See:/ 'projectsZonesClustersNodePoolsRollback' smart constructor.
82+data ProjectsZonesClustersNodePoolsRollback = ProjectsZonesClustersNodePoolsRollback'
83+ { _pzcnprXgafv :: !(Maybe Text)
84+ , _pzcnprUploadProtocol :: !(Maybe Text)
85+ , _pzcnprPp :: !Bool
86+ , _pzcnprAccessToken :: !(Maybe Text)
87+ , _pzcnprUploadType :: !(Maybe Text)
88+ , _pzcnprZone :: !Text
89+ , _pzcnprPayload :: !RollbackNodePoolUpgradeRequest
90+ , _pzcnprNodePoolId :: !Text
91+ , _pzcnprBearerToken :: !(Maybe Text)
92+ , _pzcnprClusterId :: !Text
93+ , _pzcnprProjectId :: !Text
94+ , _pzcnprCallback :: !(Maybe Text)
95+ } deriving (Eq,Show,Data,Typeable,Generic)
96+
97+-- | Creates a value of 'ProjectsZonesClustersNodePoolsRollback' with the minimum fields required to make a request.
98+--
99+-- Use one of the following lenses to modify other fields as desired:
100+--
101+-- * 'pzcnprXgafv'
102+--
103+-- * 'pzcnprUploadProtocol'
104+--
105+-- * 'pzcnprPp'
106+--
107+-- * 'pzcnprAccessToken'
108+--
109+-- * 'pzcnprUploadType'
110+--
111+-- * 'pzcnprZone'
112+--
113+-- * 'pzcnprPayload'
114+--
115+-- * 'pzcnprNodePoolId'
116+--
117+-- * 'pzcnprBearerToken'
118+--
119+-- * 'pzcnprClusterId'
120+--
121+-- * 'pzcnprProjectId'
122+--
123+-- * 'pzcnprCallback'
124+projectsZonesClustersNodePoolsRollback
125+ :: Text -- ^ 'pzcnprZone'
126+ -> RollbackNodePoolUpgradeRequest -- ^ 'pzcnprPayload'
127+ -> Text -- ^ 'pzcnprNodePoolId'
128+ -> Text -- ^ 'pzcnprClusterId'
129+ -> Text -- ^ 'pzcnprProjectId'
130+ -> ProjectsZonesClustersNodePoolsRollback
131+projectsZonesClustersNodePoolsRollback pPzcnprZone_ pPzcnprPayload_ pPzcnprNodePoolId_ pPzcnprClusterId_ pPzcnprProjectId_ =
132+ ProjectsZonesClustersNodePoolsRollback'
133+ { _pzcnprXgafv = Nothing
134+ , _pzcnprUploadProtocol = Nothing
135+ , _pzcnprPp = True
136+ , _pzcnprAccessToken = Nothing
137+ , _pzcnprUploadType = Nothing
138+ , _pzcnprZone = pPzcnprZone_
139+ , _pzcnprPayload = pPzcnprPayload_
140+ , _pzcnprNodePoolId = pPzcnprNodePoolId_
141+ , _pzcnprBearerToken = Nothing
142+ , _pzcnprClusterId = pPzcnprClusterId_
143+ , _pzcnprProjectId = pPzcnprProjectId_
144+ , _pzcnprCallback = Nothing
145+ }
146+
147+-- | V1 error format.
148+pzcnprXgafv :: Lens' ProjectsZonesClustersNodePoolsRollback (Maybe Text)
149+pzcnprXgafv
150+ = lens _pzcnprXgafv (\ s a -> s{_pzcnprXgafv = a})
151+
152+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
153+pzcnprUploadProtocol :: Lens' ProjectsZonesClustersNodePoolsRollback (Maybe Text)
154+pzcnprUploadProtocol
155+ = lens _pzcnprUploadProtocol
156+ (\ s a -> s{_pzcnprUploadProtocol = a})
157+
158+-- | Pretty-print response.
159+pzcnprPp :: Lens' ProjectsZonesClustersNodePoolsRollback Bool
160+pzcnprPp = lens _pzcnprPp (\ s a -> s{_pzcnprPp = a})
161+
162+-- | OAuth access token.
163+pzcnprAccessToken :: Lens' ProjectsZonesClustersNodePoolsRollback (Maybe Text)
164+pzcnprAccessToken
165+ = lens _pzcnprAccessToken
166+ (\ s a -> s{_pzcnprAccessToken = a})
167+
168+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
169+pzcnprUploadType :: Lens' ProjectsZonesClustersNodePoolsRollback (Maybe Text)
170+pzcnprUploadType
171+ = lens _pzcnprUploadType
172+ (\ s a -> s{_pzcnprUploadType = a})
173+
174+-- | The name of the Google Compute Engine
175+-- [zone](\/compute\/docs\/zones#available) in which the cluster resides.
176+pzcnprZone :: Lens' ProjectsZonesClustersNodePoolsRollback Text
177+pzcnprZone
178+ = lens _pzcnprZone (\ s a -> s{_pzcnprZone = a})
179+
180+-- | Multipart request metadata.
181+pzcnprPayload :: Lens' ProjectsZonesClustersNodePoolsRollback RollbackNodePoolUpgradeRequest
182+pzcnprPayload
183+ = lens _pzcnprPayload
184+ (\ s a -> s{_pzcnprPayload = a})
185+
186+-- | The name of the node pool to rollback.
187+pzcnprNodePoolId :: Lens' ProjectsZonesClustersNodePoolsRollback Text
188+pzcnprNodePoolId
189+ = lens _pzcnprNodePoolId
190+ (\ s a -> s{_pzcnprNodePoolId = a})
191+
192+-- | OAuth bearer token.
193+pzcnprBearerToken :: Lens' ProjectsZonesClustersNodePoolsRollback (Maybe Text)
194+pzcnprBearerToken
195+ = lens _pzcnprBearerToken
196+ (\ s a -> s{_pzcnprBearerToken = a})
197+
198+-- | The name of the cluster to rollback.
199+pzcnprClusterId :: Lens' ProjectsZonesClustersNodePoolsRollback Text
200+pzcnprClusterId
201+ = lens _pzcnprClusterId
202+ (\ s a -> s{_pzcnprClusterId = a})
203+
204+-- | The Google Developers Console [project ID or project
205+-- number](https:\/\/support.google.com\/cloud\/answer\/6158840).
206+pzcnprProjectId :: Lens' ProjectsZonesClustersNodePoolsRollback Text
207+pzcnprProjectId
208+ = lens _pzcnprProjectId
209+ (\ s a -> s{_pzcnprProjectId = a})
210+
211+-- | JSONP
212+pzcnprCallback :: Lens' ProjectsZonesClustersNodePoolsRollback (Maybe Text)
213+pzcnprCallback
214+ = lens _pzcnprCallback
215+ (\ s a -> s{_pzcnprCallback = a})
216+
217+instance GoogleRequest
218+ ProjectsZonesClustersNodePoolsRollback where
219+ type Rs ProjectsZonesClustersNodePoolsRollback =
220+ Operation
221+ type Scopes ProjectsZonesClustersNodePoolsRollback =
222+ '["https://www.googleapis.com/auth/cloud-platform"]
223+ requestClient
224+ ProjectsZonesClustersNodePoolsRollback'{..}
225+ = go _pzcnprProjectId _pzcnprZone _pzcnprClusterId
226+ _pzcnprNodePoolId
227+ _pzcnprXgafv
228+ _pzcnprUploadProtocol
229+ (Just _pzcnprPp)
230+ _pzcnprAccessToken
231+ _pzcnprUploadType
232+ _pzcnprBearerToken
233+ _pzcnprCallback
234+ (Just AltJSON)
235+ _pzcnprPayload
236+ containerService
237+ where go
238+ = buildClient
239+ (Proxy ::
240+ Proxy ProjectsZonesClustersNodePoolsRollbackResource)
241+ mempty
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Clusters/NodePools/SetManagement.hsnew file+244
@@ -0,0 +1,244 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.SetManagement
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Sets the NodeManagement options for a node pool.
24+--
25+-- /See:/ <https://cloud.google.com/container-engine/ Google Container Engine API Reference> for @container.projects.zones.clusters.nodePools.setManagement@.
26+module Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.SetManagement
27+ (
28+ -- * REST Resource
29+ ProjectsZonesClustersNodePoolsSetManagementResource
30+
31+ -- * Creating a Request
32+ , projectsZonesClustersNodePoolsSetManagement
33+ , ProjectsZonesClustersNodePoolsSetManagement
34+
35+ -- * Request Lenses
36+ , pzcnpsmXgafv
37+ , pzcnpsmUploadProtocol
38+ , pzcnpsmPp
39+ , pzcnpsmAccessToken
40+ , pzcnpsmUploadType
41+ , pzcnpsmZone
42+ , pzcnpsmPayload
43+ , pzcnpsmNodePoolId
44+ , pzcnpsmBearerToken
45+ , pzcnpsmClusterId
46+ , pzcnpsmProjectId
47+ , pzcnpsmCallback
48+ ) where
49+
50+import Network.Google.Container.Types
51+import Network.Google.Prelude
52+
53+-- | A resource alias for @container.projects.zones.clusters.nodePools.setManagement@ method which the
54+-- 'ProjectsZonesClustersNodePoolsSetManagement' request conforms to.
55+type ProjectsZonesClustersNodePoolsSetManagementResource
56+ =
57+ "v1" :>
58+ "projects" :>
59+ Capture "projectId" Text :>
60+ "zones" :>
61+ Capture "zone" Text :>
62+ "clusters" :>
63+ Capture "clusterId" Text :>
64+ "nodePools" :>
65+ Capture "nodePoolId" Text :>
66+ "setManagement" :>
67+ QueryParam "$.xgafv" Text :>
68+ QueryParam "upload_protocol" Text :>
69+ QueryParam "pp" Bool :>
70+ QueryParam "access_token" Text :>
71+ QueryParam "uploadType" Text :>
72+ QueryParam "bearer_token" Text :>
73+ QueryParam "callback" Text :>
74+ QueryParam "alt" AltJSON :>
75+ ReqBody '[JSON]
76+ SetNodePoolManagementRequest
77+ :> Post '[JSON] Operation
78+
79+-- | Sets the NodeManagement options for a node pool.
80+--
81+-- /See:/ 'projectsZonesClustersNodePoolsSetManagement' smart constructor.
82+data ProjectsZonesClustersNodePoolsSetManagement = ProjectsZonesClustersNodePoolsSetManagement'
83+ { _pzcnpsmXgafv :: !(Maybe Text)
84+ , _pzcnpsmUploadProtocol :: !(Maybe Text)
85+ , _pzcnpsmPp :: !Bool
86+ , _pzcnpsmAccessToken :: !(Maybe Text)
87+ , _pzcnpsmUploadType :: !(Maybe Text)
88+ , _pzcnpsmZone :: !Text
89+ , _pzcnpsmPayload :: !SetNodePoolManagementRequest
90+ , _pzcnpsmNodePoolId :: !Text
91+ , _pzcnpsmBearerToken :: !(Maybe Text)
92+ , _pzcnpsmClusterId :: !Text
93+ , _pzcnpsmProjectId :: !Text
94+ , _pzcnpsmCallback :: !(Maybe Text)
95+ } deriving (Eq,Show,Data,Typeable,Generic)
96+
97+-- | Creates a value of 'ProjectsZonesClustersNodePoolsSetManagement' with the minimum fields required to make a request.
98+--
99+-- Use one of the following lenses to modify other fields as desired:
100+--
101+-- * 'pzcnpsmXgafv'
102+--
103+-- * 'pzcnpsmUploadProtocol'
104+--
105+-- * 'pzcnpsmPp'
106+--
107+-- * 'pzcnpsmAccessToken'
108+--
109+-- * 'pzcnpsmUploadType'
110+--
111+-- * 'pzcnpsmZone'
112+--
113+-- * 'pzcnpsmPayload'
114+--
115+-- * 'pzcnpsmNodePoolId'
116+--
117+-- * 'pzcnpsmBearerToken'
118+--
119+-- * 'pzcnpsmClusterId'
120+--
121+-- * 'pzcnpsmProjectId'
122+--
123+-- * 'pzcnpsmCallback'
124+projectsZonesClustersNodePoolsSetManagement
125+ :: Text -- ^ 'pzcnpsmZone'
126+ -> SetNodePoolManagementRequest -- ^ 'pzcnpsmPayload'
127+ -> Text -- ^ 'pzcnpsmNodePoolId'
128+ -> Text -- ^ 'pzcnpsmClusterId'
129+ -> Text -- ^ 'pzcnpsmProjectId'
130+ -> ProjectsZonesClustersNodePoolsSetManagement
131+projectsZonesClustersNodePoolsSetManagement pPzcnpsmZone_ pPzcnpsmPayload_ pPzcnpsmNodePoolId_ pPzcnpsmClusterId_ pPzcnpsmProjectId_ =
132+ ProjectsZonesClustersNodePoolsSetManagement'
133+ { _pzcnpsmXgafv = Nothing
134+ , _pzcnpsmUploadProtocol = Nothing
135+ , _pzcnpsmPp = True
136+ , _pzcnpsmAccessToken = Nothing
137+ , _pzcnpsmUploadType = Nothing
138+ , _pzcnpsmZone = pPzcnpsmZone_
139+ , _pzcnpsmPayload = pPzcnpsmPayload_
140+ , _pzcnpsmNodePoolId = pPzcnpsmNodePoolId_
141+ , _pzcnpsmBearerToken = Nothing
142+ , _pzcnpsmClusterId = pPzcnpsmClusterId_
143+ , _pzcnpsmProjectId = pPzcnpsmProjectId_
144+ , _pzcnpsmCallback = Nothing
145+ }
146+
147+-- | V1 error format.
148+pzcnpsmXgafv :: Lens' ProjectsZonesClustersNodePoolsSetManagement (Maybe Text)
149+pzcnpsmXgafv
150+ = lens _pzcnpsmXgafv (\ s a -> s{_pzcnpsmXgafv = a})
151+
152+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
153+pzcnpsmUploadProtocol :: Lens' ProjectsZonesClustersNodePoolsSetManagement (Maybe Text)
154+pzcnpsmUploadProtocol
155+ = lens _pzcnpsmUploadProtocol
156+ (\ s a -> s{_pzcnpsmUploadProtocol = a})
157+
158+-- | Pretty-print response.
159+pzcnpsmPp :: Lens' ProjectsZonesClustersNodePoolsSetManagement Bool
160+pzcnpsmPp
161+ = lens _pzcnpsmPp (\ s a -> s{_pzcnpsmPp = a})
162+
163+-- | OAuth access token.
164+pzcnpsmAccessToken :: Lens' ProjectsZonesClustersNodePoolsSetManagement (Maybe Text)
165+pzcnpsmAccessToken
166+ = lens _pzcnpsmAccessToken
167+ (\ s a -> s{_pzcnpsmAccessToken = a})
168+
169+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
170+pzcnpsmUploadType :: Lens' ProjectsZonesClustersNodePoolsSetManagement (Maybe Text)
171+pzcnpsmUploadType
172+ = lens _pzcnpsmUploadType
173+ (\ s a -> s{_pzcnpsmUploadType = a})
174+
175+-- | The name of the Google Compute Engine
176+-- [zone](\/compute\/docs\/zones#available) in which the cluster resides.
177+pzcnpsmZone :: Lens' ProjectsZonesClustersNodePoolsSetManagement Text
178+pzcnpsmZone
179+ = lens _pzcnpsmZone (\ s a -> s{_pzcnpsmZone = a})
180+
181+-- | Multipart request metadata.
182+pzcnpsmPayload :: Lens' ProjectsZonesClustersNodePoolsSetManagement SetNodePoolManagementRequest
183+pzcnpsmPayload
184+ = lens _pzcnpsmPayload
185+ (\ s a -> s{_pzcnpsmPayload = a})
186+
187+-- | The name of the node pool to update.
188+pzcnpsmNodePoolId :: Lens' ProjectsZonesClustersNodePoolsSetManagement Text
189+pzcnpsmNodePoolId
190+ = lens _pzcnpsmNodePoolId
191+ (\ s a -> s{_pzcnpsmNodePoolId = a})
192+
193+-- | OAuth bearer token.
194+pzcnpsmBearerToken :: Lens' ProjectsZonesClustersNodePoolsSetManagement (Maybe Text)
195+pzcnpsmBearerToken
196+ = lens _pzcnpsmBearerToken
197+ (\ s a -> s{_pzcnpsmBearerToken = a})
198+
199+-- | The name of the cluster to update.
200+pzcnpsmClusterId :: Lens' ProjectsZonesClustersNodePoolsSetManagement Text
201+pzcnpsmClusterId
202+ = lens _pzcnpsmClusterId
203+ (\ s a -> s{_pzcnpsmClusterId = a})
204+
205+-- | The Google Developers Console [project ID or project
206+-- number](https:\/\/support.google.com\/cloud\/answer\/6158840).
207+pzcnpsmProjectId :: Lens' ProjectsZonesClustersNodePoolsSetManagement Text
208+pzcnpsmProjectId
209+ = lens _pzcnpsmProjectId
210+ (\ s a -> s{_pzcnpsmProjectId = a})
211+
212+-- | JSONP
213+pzcnpsmCallback :: Lens' ProjectsZonesClustersNodePoolsSetManagement (Maybe Text)
214+pzcnpsmCallback
215+ = lens _pzcnpsmCallback
216+ (\ s a -> s{_pzcnpsmCallback = a})
217+
218+instance GoogleRequest
219+ ProjectsZonesClustersNodePoolsSetManagement where
220+ type Rs ProjectsZonesClustersNodePoolsSetManagement =
221+ Operation
222+ type Scopes
223+ ProjectsZonesClustersNodePoolsSetManagement
224+ = '["https://www.googleapis.com/auth/cloud-platform"]
225+ requestClient
226+ ProjectsZonesClustersNodePoolsSetManagement'{..}
227+ = go _pzcnpsmProjectId _pzcnpsmZone _pzcnpsmClusterId
228+ _pzcnpsmNodePoolId
229+ _pzcnpsmXgafv
230+ _pzcnpsmUploadProtocol
231+ (Just _pzcnpsmPp)
232+ _pzcnpsmAccessToken
233+ _pzcnpsmUploadType
234+ _pzcnpsmBearerToken
235+ _pzcnpsmCallback
236+ (Just AltJSON)
237+ _pzcnpsmPayload
238+ containerService
239+ where go
240+ = buildClient
241+ (Proxy ::
242+ Proxy
243+ ProjectsZonesClustersNodePoolsSetManagementResource)
244+ mempty
gogol-container/gen/Network/Google/Resource/Container/Projects/Zones/Operations/Cancel.hsnew file+218
@@ -0,0 +1,218 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.Container.Projects.Zones.Operations.Cancel
17+-- Copyright : (c) 2015-2016 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- Cancels the specified operation.
24+--
25+-- /See:/ <https://cloud.google.com/container-engine/ Google Container Engine API Reference> for @container.projects.zones.operations.cancel@.
26+module Network.Google.Resource.Container.Projects.Zones.Operations.Cancel
27+ (
28+ -- * REST Resource
29+ ProjectsZonesOperationsCancelResource
30+
31+ -- * Creating a Request
32+ , projectsZonesOperationsCancel
33+ , ProjectsZonesOperationsCancel
34+
35+ -- * Request Lenses
36+ , pzocXgafv
37+ , pzocUploadProtocol
38+ , pzocPp
39+ , pzocAccessToken
40+ , pzocUploadType
41+ , pzocZone
42+ , pzocPayload
43+ , pzocBearerToken
44+ , pzocProjectId
45+ , pzocOperationId
46+ , pzocCallback
47+ ) where
48+
49+import Network.Google.Container.Types
50+import Network.Google.Prelude
51+
52+-- | A resource alias for @container.projects.zones.operations.cancel@ method which the
53+-- 'ProjectsZonesOperationsCancel' request conforms to.
54+type ProjectsZonesOperationsCancelResource =
55+ "v1" :>
56+ "projects" :>
57+ Capture "projectId" Text :>
58+ "zones" :>
59+ Capture "zone" Text :>
60+ "operations" :>
61+ CaptureMode "operationId" "cancel" Text :>
62+ QueryParam "$.xgafv" Text :>
63+ QueryParam "upload_protocol" Text :>
64+ QueryParam "pp" Bool :>
65+ QueryParam "access_token" Text :>
66+ QueryParam "uploadType" Text :>
67+ QueryParam "bearer_token" Text :>
68+ QueryParam "callback" Text :>
69+ QueryParam "alt" AltJSON :>
70+ ReqBody '[JSON] CancelOperationRequest :>
71+ Post '[JSON] Empty
72+
73+-- | Cancels the specified operation.
74+--
75+-- /See:/ 'projectsZonesOperationsCancel' smart constructor.
76+data ProjectsZonesOperationsCancel = ProjectsZonesOperationsCancel'
77+ { _pzocXgafv :: !(Maybe Text)
78+ , _pzocUploadProtocol :: !(Maybe Text)
79+ , _pzocPp :: !Bool
80+ , _pzocAccessToken :: !(Maybe Text)
81+ , _pzocUploadType :: !(Maybe Text)
82+ , _pzocZone :: !Text
83+ , _pzocPayload :: !CancelOperationRequest
84+ , _pzocBearerToken :: !(Maybe Text)
85+ , _pzocProjectId :: !Text
86+ , _pzocOperationId :: !Text
87+ , _pzocCallback :: !(Maybe Text)
88+ } deriving (Eq,Show,Data,Typeable,Generic)
89+
90+-- | Creates a value of 'ProjectsZonesOperationsCancel' with the minimum fields required to make a request.
91+--
92+-- Use one of the following lenses to modify other fields as desired:
93+--
94+-- * 'pzocXgafv'
95+--
96+-- * 'pzocUploadProtocol'
97+--
98+-- * 'pzocPp'
99+--
100+-- * 'pzocAccessToken'
101+--
102+-- * 'pzocUploadType'
103+--
104+-- * 'pzocZone'
105+--
106+-- * 'pzocPayload'
107+--
108+-- * 'pzocBearerToken'
109+--
110+-- * 'pzocProjectId'
111+--
112+-- * 'pzocOperationId'
113+--
114+-- * 'pzocCallback'
115+projectsZonesOperationsCancel
116+ :: Text -- ^ 'pzocZone'
117+ -> CancelOperationRequest -- ^ 'pzocPayload'
118+ -> Text -- ^ 'pzocProjectId'
119+ -> Text -- ^ 'pzocOperationId'
120+ -> ProjectsZonesOperationsCancel
121+projectsZonesOperationsCancel pPzocZone_ pPzocPayload_ pPzocProjectId_ pPzocOperationId_ =
122+ ProjectsZonesOperationsCancel'
123+ { _pzocXgafv = Nothing
124+ , _pzocUploadProtocol = Nothing
125+ , _pzocPp = True
126+ , _pzocAccessToken = Nothing
127+ , _pzocUploadType = Nothing
128+ , _pzocZone = pPzocZone_
129+ , _pzocPayload = pPzocPayload_
130+ , _pzocBearerToken = Nothing
131+ , _pzocProjectId = pPzocProjectId_
132+ , _pzocOperationId = pPzocOperationId_
133+ , _pzocCallback = Nothing
134+ }
135+
136+-- | V1 error format.
137+pzocXgafv :: Lens' ProjectsZonesOperationsCancel (Maybe Text)
138+pzocXgafv
139+ = lens _pzocXgafv (\ s a -> s{_pzocXgafv = a})
140+
141+-- | Upload protocol for media (e.g. \"raw\", \"multipart\").
142+pzocUploadProtocol :: Lens' ProjectsZonesOperationsCancel (Maybe Text)
143+pzocUploadProtocol
144+ = lens _pzocUploadProtocol
145+ (\ s a -> s{_pzocUploadProtocol = a})
146+
147+-- | Pretty-print response.
148+pzocPp :: Lens' ProjectsZonesOperationsCancel Bool
149+pzocPp = lens _pzocPp (\ s a -> s{_pzocPp = a})
150+
151+-- | OAuth access token.
152+pzocAccessToken :: Lens' ProjectsZonesOperationsCancel (Maybe Text)
153+pzocAccessToken
154+ = lens _pzocAccessToken
155+ (\ s a -> s{_pzocAccessToken = a})
156+
157+-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
158+pzocUploadType :: Lens' ProjectsZonesOperationsCancel (Maybe Text)
159+pzocUploadType
160+ = lens _pzocUploadType
161+ (\ s a -> s{_pzocUploadType = a})
162+
163+-- | The name of the Google Compute Engine
164+-- [zone](\/compute\/docs\/zones#available) in which the operation resides.
165+pzocZone :: Lens' ProjectsZonesOperationsCancel Text
166+pzocZone = lens _pzocZone (\ s a -> s{_pzocZone = a})
167+
168+-- | Multipart request metadata.
169+pzocPayload :: Lens' ProjectsZonesOperationsCancel CancelOperationRequest
170+pzocPayload
171+ = lens _pzocPayload (\ s a -> s{_pzocPayload = a})
172+
173+-- | OAuth bearer token.
174+pzocBearerToken :: Lens' ProjectsZonesOperationsCancel (Maybe Text)
175+pzocBearerToken
176+ = lens _pzocBearerToken
177+ (\ s a -> s{_pzocBearerToken = a})
178+
179+-- | The Google Developers Console [project ID or project
180+-- number](https:\/\/support.google.com\/cloud\/answer\/6158840).
181+pzocProjectId :: Lens' ProjectsZonesOperationsCancel Text
182+pzocProjectId
183+ = lens _pzocProjectId
184+ (\ s a -> s{_pzocProjectId = a})
185+
186+-- | The server-assigned \`name\` of the operation.
187+pzocOperationId :: Lens' ProjectsZonesOperationsCancel Text
188+pzocOperationId
189+ = lens _pzocOperationId
190+ (\ s a -> s{_pzocOperationId = a})
191+
192+-- | JSONP
193+pzocCallback :: Lens' ProjectsZonesOperationsCancel (Maybe Text)
194+pzocCallback
195+ = lens _pzocCallback (\ s a -> s{_pzocCallback = a})
196+
197+instance GoogleRequest ProjectsZonesOperationsCancel
198+ where
199+ type Rs ProjectsZonesOperationsCancel = Empty
200+ type Scopes ProjectsZonesOperationsCancel =
201+ '["https://www.googleapis.com/auth/cloud-platform"]
202+ requestClient ProjectsZonesOperationsCancel'{..}
203+ = go _pzocProjectId _pzocZone _pzocOperationId
204+ _pzocXgafv
205+ _pzocUploadProtocol
206+ (Just _pzocPp)
207+ _pzocAccessToken
208+ _pzocUploadType
209+ _pzocBearerToken
210+ _pzocCallback
211+ (Just AltJSON)
212+ _pzocPayload
213+ containerService
214+ where go
215+ = buildClient
216+ (Proxy ::
217+ Proxy ProjectsZonesOperationsCancelResource)
218+ mempty
gogol-container/gogol-container.cabal+3
@@ -44,8 +44,11 @@ library
4444 , Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Delete
4545 , Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Get
4646 , Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.List
47+ , Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.Rollback
48+ , Network.Google.Resource.Container.Projects.Zones.Clusters.NodePools.SetManagement
4749 , Network.Google.Resource.Container.Projects.Zones.Clusters.Update
4850 , Network.Google.Resource.Container.Projects.Zones.GetServerConfig
51+ , Network.Google.Resource.Container.Projects.Zones.Operations.Cancel
4952 , Network.Google.Resource.Container.Projects.Zones.Operations.Get
5053 , Network.Google.Resource.Container.Projects.Zones.Operations.List
5154