{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE NoImplicitPrelude  #-}
{-# LANGUAGE OverloadedStrings  #-}
{-# LANGUAGE RecordWildCards    #-}

{-# OPTIONS_GHC -fno-warn-unused-binds   #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- |
-- Module      : Network.Google.Compute.Types.Product
-- Copyright   : (c) 2015-2016 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Network.Google.Compute.Types.Product where

import           Network.Google.Compute.Types.Sum
import           Network.Google.Prelude

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceAggregatedListWarning' smart constructor.
data InstanceAggregatedListWarning = InstanceAggregatedListWarning'
    { _ialwData    :: !(Maybe [InstanceAggregatedListWarningDataItem])
    , _ialwCode    :: !(Maybe InstanceAggregatedListWarningCode)
    , _ialwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ialwData'
--
-- * 'ialwCode'
--
-- * 'ialwMessage'
instanceAggregatedListWarning
    :: InstanceAggregatedListWarning
instanceAggregatedListWarning =
    InstanceAggregatedListWarning'
    { _ialwData = Nothing
    , _ialwCode = Nothing
    , _ialwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ialwData :: Lens' InstanceAggregatedListWarning [InstanceAggregatedListWarningDataItem]
ialwData
  = lens _ialwData (\ s a -> s{_ialwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ialwCode :: Lens' InstanceAggregatedListWarning (Maybe InstanceAggregatedListWarningCode)
ialwCode = lens _ialwCode (\ s a -> s{_ialwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ialwMessage :: Lens' InstanceAggregatedListWarning (Maybe Text)
ialwMessage
  = lens _ialwMessage (\ s a -> s{_ialwMessage = a})

instance FromJSON InstanceAggregatedListWarning where
        parseJSON
          = withObject "InstanceAggregatedListWarning"
              (\ o ->
                 InstanceAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceAggregatedListWarning where
        toJSON InstanceAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ialwData,
                  ("code" .=) <$> _ialwCode,
                  ("message" .=) <$> _ialwMessage])

-- | Contains a list of TargetHttpsProxy resources.
--
-- /See:/ 'targetHTTPSProxyList' smart constructor.
data TargetHTTPSProxyList = TargetHTTPSProxyList'
    { _thplNextPageToken :: !(Maybe Text)
    , _thplKind          :: !Text
    , _thplItems         :: !(Maybe [TargetHTTPSProxy])
    , _thplSelfLink      :: !(Maybe Text)
    , _thplWarning       :: !(Maybe TargetHTTPSProxyListWarning)
    , _thplId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPSProxyList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thplNextPageToken'
--
-- * 'thplKind'
--
-- * 'thplItems'
--
-- * 'thplSelfLink'
--
-- * 'thplWarning'
--
-- * 'thplId'
targetHTTPSProxyList
    :: TargetHTTPSProxyList
targetHTTPSProxyList =
    TargetHTTPSProxyList'
    { _thplNextPageToken = Nothing
    , _thplKind = "compute#targetHttpsProxyList"
    , _thplItems = Nothing
    , _thplSelfLink = Nothing
    , _thplWarning = Nothing
    , _thplId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
thplNextPageToken :: Lens' TargetHTTPSProxyList (Maybe Text)
thplNextPageToken
  = lens _thplNextPageToken
      (\ s a -> s{_thplNextPageToken = a})

-- | Type of resource. Always compute#targetHttpsProxyList for lists of
-- target HTTPS proxies.
thplKind :: Lens' TargetHTTPSProxyList Text
thplKind = lens _thplKind (\ s a -> s{_thplKind = a})

-- | A list of TargetHttpsProxy resources.
thplItems :: Lens' TargetHTTPSProxyList [TargetHTTPSProxy]
thplItems
  = lens _thplItems (\ s a -> s{_thplItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
thplSelfLink :: Lens' TargetHTTPSProxyList (Maybe Text)
thplSelfLink
  = lens _thplSelfLink (\ s a -> s{_thplSelfLink = a})

-- | [Output Only] Informational warning message.
thplWarning :: Lens' TargetHTTPSProxyList (Maybe TargetHTTPSProxyListWarning)
thplWarning
  = lens _thplWarning (\ s a -> s{_thplWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
thplId :: Lens' TargetHTTPSProxyList (Maybe Text)
thplId = lens _thplId (\ s a -> s{_thplId = a})

instance FromJSON TargetHTTPSProxyList where
        parseJSON
          = withObject "TargetHTTPSProxyList"
              (\ o ->
                 TargetHTTPSProxyList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#targetHttpsProxyList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetHTTPSProxyList where
        toJSON TargetHTTPSProxyList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _thplNextPageToken,
                  Just ("kind" .= _thplKind),
                  ("items" .=) <$> _thplItems,
                  ("selfLink" .=) <$> _thplSelfLink,
                  ("warning" .=) <$> _thplWarning,
                  ("id" .=) <$> _thplId])

--
-- /See:/ 'routersScopedList' smart constructor.
data RoutersScopedList = RoutersScopedList'
    { _rslRouters :: !(Maybe [Router])
    , _rslWarning :: !(Maybe RoutersScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RoutersScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rslRouters'
--
-- * 'rslWarning'
routersScopedList
    :: RoutersScopedList
routersScopedList =
    RoutersScopedList'
    { _rslRouters = Nothing
    , _rslWarning = Nothing
    }

-- | A list of routers contained in this scope.
rslRouters :: Lens' RoutersScopedList [Router]
rslRouters
  = lens _rslRouters (\ s a -> s{_rslRouters = a}) .
      _Default
      . _Coerce

-- | Informational warning which replaces the list of routers when the list
-- is empty.
rslWarning :: Lens' RoutersScopedList (Maybe RoutersScopedListWarning)
rslWarning
  = lens _rslWarning (\ s a -> s{_rslWarning = a})

instance FromJSON RoutersScopedList where
        parseJSON
          = withObject "RoutersScopedList"
              (\ o ->
                 RoutersScopedList' <$>
                   (o .:? "routers" .!= mempty) <*> (o .:? "warning"))

instance ToJSON RoutersScopedList where
        toJSON RoutersScopedList'{..}
          = object
              (catMaybes
                 [("routers" .=) <$> _rslRouters,
                  ("warning" .=) <$> _rslWarning])

--
-- /See:/ 'routerStatusResponse' smart constructor.
data RouterStatusResponse = RouterStatusResponse'
    { _rsrKind   :: !Text
    , _rsrResult :: !(Maybe RouterStatus)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterStatusResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rsrKind'
--
-- * 'rsrResult'
routerStatusResponse
    :: RouterStatusResponse
routerStatusResponse =
    RouterStatusResponse'
    { _rsrKind = "compute#routerStatusResponse"
    , _rsrResult = Nothing
    }

-- | Type of resource.
rsrKind :: Lens' RouterStatusResponse Text
rsrKind = lens _rsrKind (\ s a -> s{_rsrKind = a})

rsrResult :: Lens' RouterStatusResponse (Maybe RouterStatus)
rsrResult
  = lens _rsrResult (\ s a -> s{_rsrResult = a})

instance FromJSON RouterStatusResponse where
        parseJSON
          = withObject "RouterStatusResponse"
              (\ o ->
                 RouterStatusResponse' <$>
                   (o .:? "kind" .!= "compute#routerStatusResponse") <*>
                     (o .:? "result"))

instance ToJSON RouterStatusResponse where
        toJSON RouterStatusResponse'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _rsrKind),
                  ("result" .=) <$> _rsrResult])

--
-- /See:/ 'regionInstanceGroupManagersDeleteInstancesRequest' smart constructor.
newtype RegionInstanceGroupManagersDeleteInstancesRequest = RegionInstanceGroupManagersDeleteInstancesRequest'
    { _rigmdirInstances :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagersDeleteInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmdirInstances'
regionInstanceGroupManagersDeleteInstancesRequest
    :: RegionInstanceGroupManagersDeleteInstancesRequest
regionInstanceGroupManagersDeleteInstancesRequest =
    RegionInstanceGroupManagersDeleteInstancesRequest'
    { _rigmdirInstances = Nothing
    }

-- | The URLs of one or more instances to delete. This can be a full URL or a
-- partial URL, such as zones\/[ZONE]\/instances\/[INSTANCE_NAME].
rigmdirInstances :: Lens' RegionInstanceGroupManagersDeleteInstancesRequest [Text]
rigmdirInstances
  = lens _rigmdirInstances
      (\ s a -> s{_rigmdirInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         RegionInstanceGroupManagersDeleteInstancesRequest
         where
        parseJSON
          = withObject
              "RegionInstanceGroupManagersDeleteInstancesRequest"
              (\ o ->
                 RegionInstanceGroupManagersDeleteInstancesRequest'
                   <$> (o .:? "instances" .!= mempty))

instance ToJSON
         RegionInstanceGroupManagersDeleteInstancesRequest
         where
        toJSON
          RegionInstanceGroupManagersDeleteInstancesRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _rigmdirInstances])

--
-- /See:/ 'interconnectDiagnosticsLinkLACPStatus' smart constructor.
data InterconnectDiagnosticsLinkLACPStatus = InterconnectDiagnosticsLinkLACPStatus'
    { _idllacpsState            :: !(Maybe InterconnectDiagnosticsLinkLACPStatusState)
    , _idllacpsNeighborSystemId :: !(Maybe Text)
    , _idllacpsGoogleSystemId   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectDiagnosticsLinkLACPStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'idllacpsState'
--
-- * 'idllacpsNeighborSystemId'
--
-- * 'idllacpsGoogleSystemId'
interconnectDiagnosticsLinkLACPStatus
    :: InterconnectDiagnosticsLinkLACPStatus
interconnectDiagnosticsLinkLACPStatus =
    InterconnectDiagnosticsLinkLACPStatus'
    { _idllacpsState = Nothing
    , _idllacpsNeighborSystemId = Nothing
    , _idllacpsGoogleSystemId = Nothing
    }

idllacpsState :: Lens' InterconnectDiagnosticsLinkLACPStatus (Maybe InterconnectDiagnosticsLinkLACPStatusState)
idllacpsState
  = lens _idllacpsState
      (\ s a -> s{_idllacpsState = a})

-- | System ID of the port on the neighbor?s side of the LACP exchange.
idllacpsNeighborSystemId :: Lens' InterconnectDiagnosticsLinkLACPStatus (Maybe Text)
idllacpsNeighborSystemId
  = lens _idllacpsNeighborSystemId
      (\ s a -> s{_idllacpsNeighborSystemId = a})

-- | System ID of the port on Google?s side of the LACP exchange.
idllacpsGoogleSystemId :: Lens' InterconnectDiagnosticsLinkLACPStatus (Maybe Text)
idllacpsGoogleSystemId
  = lens _idllacpsGoogleSystemId
      (\ s a -> s{_idllacpsGoogleSystemId = a})

instance FromJSON
         InterconnectDiagnosticsLinkLACPStatus where
        parseJSON
          = withObject "InterconnectDiagnosticsLinkLACPStatus"
              (\ o ->
                 InterconnectDiagnosticsLinkLACPStatus' <$>
                   (o .:? "state") <*> (o .:? "neighborSystemId") <*>
                     (o .:? "googleSystemId"))

instance ToJSON InterconnectDiagnosticsLinkLACPStatus
         where
        toJSON InterconnectDiagnosticsLinkLACPStatus'{..}
          = object
              (catMaybes
                 [("state" .=) <$> _idllacpsState,
                  ("neighborSystemId" .=) <$>
                    _idllacpsNeighborSystemId,
                  ("googleSystemId" .=) <$> _idllacpsGoogleSystemId])

--
-- /See:/ 'addressesScopedList' smart constructor.
data AddressesScopedList = AddressesScopedList'
    { _aslAddresses :: !(Maybe [Address])
    , _aslWarning   :: !(Maybe AddressesScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aslAddresses'
--
-- * 'aslWarning'
addressesScopedList
    :: AddressesScopedList
addressesScopedList =
    AddressesScopedList'
    { _aslAddresses = Nothing
    , _aslWarning = Nothing
    }

-- | [Output Only] A list of addresses contained in this scope.
aslAddresses :: Lens' AddressesScopedList [Address]
aslAddresses
  = lens _aslAddresses (\ s a -> s{_aslAddresses = a})
      . _Default
      . _Coerce

-- | [Output Only] Informational warning which replaces the list of addresses
-- when the list is empty.
aslWarning :: Lens' AddressesScopedList (Maybe AddressesScopedListWarning)
aslWarning
  = lens _aslWarning (\ s a -> s{_aslWarning = a})

instance FromJSON AddressesScopedList where
        parseJSON
          = withObject "AddressesScopedList"
              (\ o ->
                 AddressesScopedList' <$>
                   (o .:? "addresses" .!= mempty) <*> (o .:? "warning"))

instance ToJSON AddressesScopedList where
        toJSON AddressesScopedList'{..}
          = object
              (catMaybes
                 [("addresses" .=) <$> _aslAddresses,
                  ("warning" .=) <$> _aslWarning])

--
-- /See:/ 'operationWarningsItemDataItem' smart constructor.
data OperationWarningsItemDataItem = OperationWarningsItemDataItem'
    { _owidiValue :: !(Maybe Text)
    , _owidiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationWarningsItemDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'owidiValue'
--
-- * 'owidiKey'
operationWarningsItemDataItem
    :: OperationWarningsItemDataItem
operationWarningsItemDataItem =
    OperationWarningsItemDataItem'
    { _owidiValue = Nothing
    , _owidiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
owidiValue :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiValue
  = lens _owidiValue (\ s a -> s{_owidiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
owidiKey :: Lens' OperationWarningsItemDataItem (Maybe Text)
owidiKey = lens _owidiKey (\ s a -> s{_owidiKey = a})

instance FromJSON OperationWarningsItemDataItem where
        parseJSON
          = withObject "OperationWarningsItemDataItem"
              (\ o ->
                 OperationWarningsItemDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON OperationWarningsItemDataItem where
        toJSON OperationWarningsItemDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _owidiValue,
                  ("key" .=) <$> _owidiKey])

--
-- /See:/ 'regionInstanceGroupsListInstancesRequest' smart constructor.
data RegionInstanceGroupsListInstancesRequest = RegionInstanceGroupsListInstancesRequest'
    { _riglirInstanceState :: !(Maybe RegionInstanceGroupsListInstancesRequestInstanceState)
    , _riglirPortName      :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupsListInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'riglirInstanceState'
--
-- * 'riglirPortName'
regionInstanceGroupsListInstancesRequest
    :: RegionInstanceGroupsListInstancesRequest
regionInstanceGroupsListInstancesRequest =
    RegionInstanceGroupsListInstancesRequest'
    { _riglirInstanceState = Nothing
    , _riglirPortName = Nothing
    }

-- | Instances in which state should be returned. Valid options are: \'ALL\',
-- \'RUNNING\'. By default, it lists all instances.
riglirInstanceState :: Lens' RegionInstanceGroupsListInstancesRequest (Maybe RegionInstanceGroupsListInstancesRequestInstanceState)
riglirInstanceState
  = lens _riglirInstanceState
      (\ s a -> s{_riglirInstanceState = a})

-- | Name of port user is interested in. It is optional. If it is set, only
-- information about this ports will be returned. If it is not set, all the
-- named ports will be returned. Always lists all instances.
riglirPortName :: Lens' RegionInstanceGroupsListInstancesRequest (Maybe Text)
riglirPortName
  = lens _riglirPortName
      (\ s a -> s{_riglirPortName = a})

instance FromJSON
         RegionInstanceGroupsListInstancesRequest where
        parseJSON
          = withObject
              "RegionInstanceGroupsListInstancesRequest"
              (\ o ->
                 RegionInstanceGroupsListInstancesRequest' <$>
                   (o .:? "instanceState") <*> (o .:? "portName"))

instance ToJSON
         RegionInstanceGroupsListInstancesRequest where
        toJSON RegionInstanceGroupsListInstancesRequest'{..}
          = object
              (catMaybes
                 [("instanceState" .=) <$> _riglirInstanceState,
                  ("portName" .=) <$> _riglirPortName])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'backendServiceAggregatedListWarning' smart constructor.
data BackendServiceAggregatedListWarning = BackendServiceAggregatedListWarning'
    { _bsalwData    :: !(Maybe [BackendServiceAggregatedListWarningDataItem])
    , _bsalwCode    :: !(Maybe BackendServiceAggregatedListWarningCode)
    , _bsalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsalwData'
--
-- * 'bsalwCode'
--
-- * 'bsalwMessage'
backendServiceAggregatedListWarning
    :: BackendServiceAggregatedListWarning
backendServiceAggregatedListWarning =
    BackendServiceAggregatedListWarning'
    { _bsalwData = Nothing
    , _bsalwCode = Nothing
    , _bsalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
bsalwData :: Lens' BackendServiceAggregatedListWarning [BackendServiceAggregatedListWarningDataItem]
bsalwData
  = lens _bsalwData (\ s a -> s{_bsalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
bsalwCode :: Lens' BackendServiceAggregatedListWarning (Maybe BackendServiceAggregatedListWarningCode)
bsalwCode
  = lens _bsalwCode (\ s a -> s{_bsalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
bsalwMessage :: Lens' BackendServiceAggregatedListWarning (Maybe Text)
bsalwMessage
  = lens _bsalwMessage (\ s a -> s{_bsalwMessage = a})

instance FromJSON BackendServiceAggregatedListWarning
         where
        parseJSON
          = withObject "BackendServiceAggregatedListWarning"
              (\ o ->
                 BackendServiceAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON BackendServiceAggregatedListWarning
         where
        toJSON BackendServiceAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _bsalwData,
                  ("code" .=) <$> _bsalwCode,
                  ("message" .=) <$> _bsalwMessage])

-- | A SSL policy specifies the server-side support for SSL features. This
-- can be attached to a TargetHttpsProxy or a TargetSslProxy. This affects
-- connections between clients and the HTTPS or SSL proxy load balancer.
-- They do not affect the connection between the load balancers and the
-- backends.
--
-- /See:/ 'sslPolicy' smart constructor.
data SSLPolicy = SSLPolicy'
    { _spKind              :: !Text
    , _spFingerprint       :: !(Maybe Bytes)
    , _spProFile           :: !(Maybe SSLPolicyProFile)
    , _spWarnings          :: !(Maybe [SSLPolicyWarningsItem])
    , _spCustomFeatures    :: !(Maybe [Text])
    , _spSelfLink          :: !(Maybe Text)
    , _spName              :: !(Maybe Text)
    , _spCreationTimestamp :: !(Maybe Text)
    , _spEnabledFeatures   :: !(Maybe [Text])
    , _spId                :: !(Maybe (Textual Word64))
    , _spMinTLSVersion     :: !(Maybe SSLPolicyMinTLSVersion)
    , _spDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spKind'
--
-- * 'spFingerprint'
--
-- * 'spProFile'
--
-- * 'spWarnings'
--
-- * 'spCustomFeatures'
--
-- * 'spSelfLink'
--
-- * 'spName'
--
-- * 'spCreationTimestamp'
--
-- * 'spEnabledFeatures'
--
-- * 'spId'
--
-- * 'spMinTLSVersion'
--
-- * 'spDescription'
sslPolicy
    :: SSLPolicy
sslPolicy =
    SSLPolicy'
    { _spKind = "compute#sslPolicy"
    , _spFingerprint = Nothing
    , _spProFile = Nothing
    , _spWarnings = Nothing
    , _spCustomFeatures = Nothing
    , _spSelfLink = Nothing
    , _spName = Nothing
    , _spCreationTimestamp = Nothing
    , _spEnabledFeatures = Nothing
    , _spId = Nothing
    , _spMinTLSVersion = Nothing
    , _spDescription = Nothing
    }

-- | [Output only] Type of the resource. Always compute#sslPolicyfor SSL
-- policies.
spKind :: Lens' SSLPolicy Text
spKind = lens _spKind (\ s a -> s{_spKind = a})

-- | Fingerprint of this resource. A hash of the contents stored in this
-- object. This field is used in optimistic locking. This field will be
-- ignored when inserting a SslPolicy. An up-to-date fingerprint must be
-- provided in order to update the SslPolicy, otherwise the request will
-- fail with error 412 conditionNotMet. To see the latest fingerprint, make
-- a get() request to retrieve an SslPolicy.
spFingerprint :: Lens' SSLPolicy (Maybe ByteString)
spFingerprint
  = lens _spFingerprint
      (\ s a -> s{_spFingerprint = a})
      . mapping _Bytes

-- | Profile specifies the set of SSL features that can be used by the load
-- balancer when negotiating SSL with clients. This can be one of
-- COMPATIBLE, MODERN, RESTRICTED, or CUSTOM. If using CUSTOM, the set of
-- SSL features to enable must be specified in the customFeatures field.
spProFile :: Lens' SSLPolicy (Maybe SSLPolicyProFile)
spProFile
  = lens _spProFile (\ s a -> s{_spProFile = a})

-- | [Output Only] If potential misconfigurations are detected for this SSL
-- policy, this field will be populated with warning messages.
spWarnings :: Lens' SSLPolicy [SSLPolicyWarningsItem]
spWarnings
  = lens _spWarnings (\ s a -> s{_spWarnings = a}) .
      _Default
      . _Coerce

-- | A list of features enabled when the selected profile is CUSTOM. The -
-- method returns the set of features that can be specified in this list.
-- This field must be empty if the profile is not CUSTOM.
spCustomFeatures :: Lens' SSLPolicy [Text]
spCustomFeatures
  = lens _spCustomFeatures
      (\ s a -> s{_spCustomFeatures = a})
      . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for the resource.
spSelfLink :: Lens' SSLPolicy (Maybe Text)
spSelfLink
  = lens _spSelfLink (\ s a -> s{_spSelfLink = a})

-- | Name of the resource. The name must be 1-63 characters long, and comply
-- with RFC1035. Specifically, the name must be 1-63 characters long and
-- match the regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means
-- the first character must be a lowercase letter, and all following
-- characters must be a dash, lowercase letter, or digit, except the last
-- character, which cannot be a dash.
spName :: Lens' SSLPolicy (Maybe Text)
spName = lens _spName (\ s a -> s{_spName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
spCreationTimestamp :: Lens' SSLPolicy (Maybe Text)
spCreationTimestamp
  = lens _spCreationTimestamp
      (\ s a -> s{_spCreationTimestamp = a})

-- | [Output Only] The list of features enabled in the SSL policy.
spEnabledFeatures :: Lens' SSLPolicy [Text]
spEnabledFeatures
  = lens _spEnabledFeatures
      (\ s a -> s{_spEnabledFeatures = a})
      . _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
spId :: Lens' SSLPolicy (Maybe Word64)
spId
  = lens _spId (\ s a -> s{_spId = a}) .
      mapping _Coerce

-- | The minimum version of SSL protocol that can be used by the clients to
-- establish a connection with the load balancer. This can be one of
-- TLS_1_0, TLS_1_1, TLS_1_2.
spMinTLSVersion :: Lens' SSLPolicy (Maybe SSLPolicyMinTLSVersion)
spMinTLSVersion
  = lens _spMinTLSVersion
      (\ s a -> s{_spMinTLSVersion = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
spDescription :: Lens' SSLPolicy (Maybe Text)
spDescription
  = lens _spDescription
      (\ s a -> s{_spDescription = a})

instance FromJSON SSLPolicy where
        parseJSON
          = withObject "SSLPolicy"
              (\ o ->
                 SSLPolicy' <$>
                   (o .:? "kind" .!= "compute#sslPolicy") <*>
                     (o .:? "fingerprint")
                     <*> (o .:? "profile")
                     <*> (o .:? "warnings" .!= mempty)
                     <*> (o .:? "customFeatures" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "enabledFeatures" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "minTlsVersion")
                     <*> (o .:? "description"))

instance ToJSON SSLPolicy where
        toJSON SSLPolicy'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _spKind),
                  ("fingerprint" .=) <$> _spFingerprint,
                  ("profile" .=) <$> _spProFile,
                  ("warnings" .=) <$> _spWarnings,
                  ("customFeatures" .=) <$> _spCustomFeatures,
                  ("selfLink" .=) <$> _spSelfLink,
                  ("name" .=) <$> _spName,
                  ("creationTimestamp" .=) <$> _spCreationTimestamp,
                  ("enabledFeatures" .=) <$> _spEnabledFeatures,
                  ("id" .=) <$> _spId,
                  ("minTlsVersion" .=) <$> _spMinTLSVersion,
                  ("description" .=) <$> _spDescription])

--
-- /See:/ 'backendServiceListWarningDataItem' smart constructor.
data BackendServiceListWarningDataItem = BackendServiceListWarningDataItem'
    { _bslwdiValue :: !(Maybe Text)
    , _bslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bslwdiValue'
--
-- * 'bslwdiKey'
backendServiceListWarningDataItem
    :: BackendServiceListWarningDataItem
backendServiceListWarningDataItem =
    BackendServiceListWarningDataItem'
    { _bslwdiValue = Nothing
    , _bslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
bslwdiValue :: Lens' BackendServiceListWarningDataItem (Maybe Text)
bslwdiValue
  = lens _bslwdiValue (\ s a -> s{_bslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
bslwdiKey :: Lens' BackendServiceListWarningDataItem (Maybe Text)
bslwdiKey
  = lens _bslwdiKey (\ s a -> s{_bslwdiKey = a})

instance FromJSON BackendServiceListWarningDataItem
         where
        parseJSON
          = withObject "BackendServiceListWarningDataItem"
              (\ o ->
                 BackendServiceListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON BackendServiceListWarningDataItem
         where
        toJSON BackendServiceListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _bslwdiValue,
                  ("key" .=) <$> _bslwdiKey])

--
-- /See:/ 'firewallDeniedItem' smart constructor.
data FirewallDeniedItem = FirewallDeniedItem'
    { _fdiIPProtocol :: !(Maybe Text)
    , _fdiPorts      :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'FirewallDeniedItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fdiIPProtocol'
--
-- * 'fdiPorts'
firewallDeniedItem
    :: FirewallDeniedItem
firewallDeniedItem =
    FirewallDeniedItem'
    { _fdiIPProtocol = Nothing
    , _fdiPorts = Nothing
    }

-- | The IP protocol to which this rule applies. The protocol type is
-- required when creating a firewall rule. This value can either be one of
-- the following well known protocol strings (tcp, udp, icmp, esp, ah,
-- ipip, sctp), or the IP protocol number.
fdiIPProtocol :: Lens' FirewallDeniedItem (Maybe Text)
fdiIPProtocol
  = lens _fdiIPProtocol
      (\ s a -> s{_fdiIPProtocol = a})

-- | An optional list of ports to which this rule applies. This field is only
-- applicable for UDP or TCP protocol. Each entry must be either an integer
-- or a range. If not specified, this rule applies to connections through
-- any port. Example inputs include: [\"22\"], [\"80\",\"443\"], and
-- [\"12345-12349\"].
fdiPorts :: Lens' FirewallDeniedItem [Text]
fdiPorts
  = lens _fdiPorts (\ s a -> s{_fdiPorts = a}) .
      _Default
      . _Coerce

instance FromJSON FirewallDeniedItem where
        parseJSON
          = withObject "FirewallDeniedItem"
              (\ o ->
                 FirewallDeniedItem' <$>
                   (o .:? "IPProtocol") <*> (o .:? "ports" .!= mempty))

instance ToJSON FirewallDeniedItem where
        toJSON FirewallDeniedItem'{..}
          = object
              (catMaybes
                 [("IPProtocol" .=) <$> _fdiIPProtocol,
                  ("ports" .=) <$> _fdiPorts])

--
-- /See:/ 'instanceGroupManagersAbandonInstancesRequest' smart constructor.
newtype InstanceGroupManagersAbandonInstancesRequest = InstanceGroupManagersAbandonInstancesRequest'
    { _igmairInstances :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersAbandonInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmairInstances'
instanceGroupManagersAbandonInstancesRequest
    :: InstanceGroupManagersAbandonInstancesRequest
instanceGroupManagersAbandonInstancesRequest =
    InstanceGroupManagersAbandonInstancesRequest'
    { _igmairInstances = Nothing
    }

-- | The URLs of one or more instances to abandon. This can be a full URL or
-- a partial URL, such as zones\/[ZONE]\/instances\/[INSTANCE_NAME].
igmairInstances :: Lens' InstanceGroupManagersAbandonInstancesRequest [Text]
igmairInstances
  = lens _igmairInstances
      (\ s a -> s{_igmairInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         InstanceGroupManagersAbandonInstancesRequest where
        parseJSON
          = withObject
              "InstanceGroupManagersAbandonInstancesRequest"
              (\ o ->
                 InstanceGroupManagersAbandonInstancesRequest' <$>
                   (o .:? "instances" .!= mempty))

instance ToJSON
         InstanceGroupManagersAbandonInstancesRequest where
        toJSON
          InstanceGroupManagersAbandonInstancesRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _igmairInstances])

-- | A list of MachineTypesScopedList resources.
--
-- /See:/ 'machineTypeAggregatedListItems' smart constructor.
newtype MachineTypeAggregatedListItems = MachineTypeAggregatedListItems'
    { _mtaliAddtional :: HashMap Text MachineTypesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypeAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtaliAddtional'
machineTypeAggregatedListItems
    :: HashMap Text MachineTypesScopedList -- ^ 'mtaliAddtional'
    -> MachineTypeAggregatedListItems
machineTypeAggregatedListItems pMtaliAddtional_ =
    MachineTypeAggregatedListItems'
    { _mtaliAddtional = _Coerce # pMtaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of machine types.
mtaliAddtional :: Lens' MachineTypeAggregatedListItems (HashMap Text MachineTypesScopedList)
mtaliAddtional
  = lens _mtaliAddtional
      (\ s a -> s{_mtaliAddtional = a})
      . _Coerce

instance FromJSON MachineTypeAggregatedListItems
         where
        parseJSON
          = withObject "MachineTypeAggregatedListItems"
              (\ o ->
                 MachineTypeAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON MachineTypeAggregatedListItems where
        toJSON = toJSON . _mtaliAddtional

-- | A list of DiskTypesScopedList resources.
--
-- /See:/ 'diskTypeAggregatedListItems' smart constructor.
newtype DiskTypeAggregatedListItems = DiskTypeAggregatedListItems'
    { _dtaliAddtional :: HashMap Text DiskTypesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypeAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtaliAddtional'
diskTypeAggregatedListItems
    :: HashMap Text DiskTypesScopedList -- ^ 'dtaliAddtional'
    -> DiskTypeAggregatedListItems
diskTypeAggregatedListItems pDtaliAddtional_ =
    DiskTypeAggregatedListItems'
    { _dtaliAddtional = _Coerce # pDtaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of disk types.
dtaliAddtional :: Lens' DiskTypeAggregatedListItems (HashMap Text DiskTypesScopedList)
dtaliAddtional
  = lens _dtaliAddtional
      (\ s a -> s{_dtaliAddtional = a})
      . _Coerce

instance FromJSON DiskTypeAggregatedListItems where
        parseJSON
          = withObject "DiskTypeAggregatedListItems"
              (\ o ->
                 DiskTypeAggregatedListItems' <$> (parseJSONObject o))

instance ToJSON DiskTypeAggregatedListItems where
        toJSON = toJSON . _dtaliAddtional

--
-- /See:/ 'instancesSetLabelsRequest' smart constructor.
data InstancesSetLabelsRequest = InstancesSetLabelsRequest'
    { _islrLabels           :: !(Maybe InstancesSetLabelsRequestLabels)
    , _islrLabelFingerprint :: !(Maybe Bytes)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesSetLabelsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'islrLabels'
--
-- * 'islrLabelFingerprint'
instancesSetLabelsRequest
    :: InstancesSetLabelsRequest
instancesSetLabelsRequest =
    InstancesSetLabelsRequest'
    { _islrLabels = Nothing
    , _islrLabelFingerprint = Nothing
    }

islrLabels :: Lens' InstancesSetLabelsRequest (Maybe InstancesSetLabelsRequestLabels)
islrLabels
  = lens _islrLabels (\ s a -> s{_islrLabels = a})

-- | Fingerprint of the previous set of labels for this resource, used to
-- prevent conflicts. Provide the latest fingerprint value when making a
-- request to add or change labels.
islrLabelFingerprint :: Lens' InstancesSetLabelsRequest (Maybe ByteString)
islrLabelFingerprint
  = lens _islrLabelFingerprint
      (\ s a -> s{_islrLabelFingerprint = a})
      . mapping _Bytes

instance FromJSON InstancesSetLabelsRequest where
        parseJSON
          = withObject "InstancesSetLabelsRequest"
              (\ o ->
                 InstancesSetLabelsRequest' <$>
                   (o .:? "labels") <*> (o .:? "labelFingerprint"))

instance ToJSON InstancesSetLabelsRequest where
        toJSON InstancesSetLabelsRequest'{..}
          = object
              (catMaybes
                 [("labels" .=) <$> _islrLabels,
                  ("labelFingerprint" .=) <$> _islrLabelFingerprint])

-- | Contains a list of routers.
--
-- /See:/ 'routerAggregatedList' smart constructor.
data RouterAggregatedList = RouterAggregatedList'
    { _ralNextPageToken :: !(Maybe Text)
    , _ralKind          :: !Text
    , _ralItems         :: !(Maybe RouterAggregatedListItems)
    , _ralSelfLink      :: !(Maybe Text)
    , _ralWarning       :: !(Maybe RouterAggregatedListWarning)
    , _ralId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ralNextPageToken'
--
-- * 'ralKind'
--
-- * 'ralItems'
--
-- * 'ralSelfLink'
--
-- * 'ralWarning'
--
-- * 'ralId'
routerAggregatedList
    :: RouterAggregatedList
routerAggregatedList =
    RouterAggregatedList'
    { _ralNextPageToken = Nothing
    , _ralKind = "compute#routerAggregatedList"
    , _ralItems = Nothing
    , _ralSelfLink = Nothing
    , _ralWarning = Nothing
    , _ralId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ralNextPageToken :: Lens' RouterAggregatedList (Maybe Text)
ralNextPageToken
  = lens _ralNextPageToken
      (\ s a -> s{_ralNextPageToken = a})

-- | Type of resource.
ralKind :: Lens' RouterAggregatedList Text
ralKind = lens _ralKind (\ s a -> s{_ralKind = a})

-- | A list of Router resources.
ralItems :: Lens' RouterAggregatedList (Maybe RouterAggregatedListItems)
ralItems = lens _ralItems (\ s a -> s{_ralItems = a})

-- | [Output Only] Server-defined URL for this resource.
ralSelfLink :: Lens' RouterAggregatedList (Maybe Text)
ralSelfLink
  = lens _ralSelfLink (\ s a -> s{_ralSelfLink = a})

-- | [Output Only] Informational warning message.
ralWarning :: Lens' RouterAggregatedList (Maybe RouterAggregatedListWarning)
ralWarning
  = lens _ralWarning (\ s a -> s{_ralWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ralId :: Lens' RouterAggregatedList (Maybe Text)
ralId = lens _ralId (\ s a -> s{_ralId = a})

instance FromJSON RouterAggregatedList where
        parseJSON
          = withObject "RouterAggregatedList"
              (\ o ->
                 RouterAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#routerAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RouterAggregatedList where
        toJSON RouterAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ralNextPageToken,
                  Just ("kind" .= _ralKind),
                  ("items" .=) <$> _ralItems,
                  ("selfLink" .=) <$> _ralSelfLink,
                  ("warning" .=) <$> _ralWarning,
                  ("id" .=) <$> _ralId])

-- | Contains a list of firewalls.
--
-- /See:/ 'firewallList' smart constructor.
data FirewallList = FirewallList'
    { _flNextPageToken :: !(Maybe Text)
    , _flKind          :: !Text
    , _flItems         :: !(Maybe [Firewall])
    , _flSelfLink      :: !(Maybe Text)
    , _flWarning       :: !(Maybe FirewallListWarning)
    , _flId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'FirewallList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'flNextPageToken'
--
-- * 'flKind'
--
-- * 'flItems'
--
-- * 'flSelfLink'
--
-- * 'flWarning'
--
-- * 'flId'
firewallList
    :: FirewallList
firewallList =
    FirewallList'
    { _flNextPageToken = Nothing
    , _flKind = "compute#firewallList"
    , _flItems = Nothing
    , _flSelfLink = Nothing
    , _flWarning = Nothing
    , _flId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
flNextPageToken :: Lens' FirewallList (Maybe Text)
flNextPageToken
  = lens _flNextPageToken
      (\ s a -> s{_flNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#firewallList for lists of
-- firewalls.
flKind :: Lens' FirewallList Text
flKind = lens _flKind (\ s a -> s{_flKind = a})

-- | A list of Firewall resources.
flItems :: Lens' FirewallList [Firewall]
flItems
  = lens _flItems (\ s a -> s{_flItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
flSelfLink :: Lens' FirewallList (Maybe Text)
flSelfLink
  = lens _flSelfLink (\ s a -> s{_flSelfLink = a})

-- | [Output Only] Informational warning message.
flWarning :: Lens' FirewallList (Maybe FirewallListWarning)
flWarning
  = lens _flWarning (\ s a -> s{_flWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
flId :: Lens' FirewallList (Maybe Text)
flId = lens _flId (\ s a -> s{_flId = a})

instance FromJSON FirewallList where
        parseJSON
          = withObject "FirewallList"
              (\ o ->
                 FirewallList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#firewallList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON FirewallList where
        toJSON FirewallList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _flNextPageToken,
                  Just ("kind" .= _flKind), ("items" .=) <$> _flItems,
                  ("selfLink" .=) <$> _flSelfLink,
                  ("warning" .=) <$> _flWarning, ("id" .=) <$> _flId])

-- | [Output Only] Informational warning which replaces the list of instances
-- when the list is empty.
--
-- /See:/ 'instancesScopedListWarning' smart constructor.
data InstancesScopedListWarning = InstancesScopedListWarning'
    { _islwData    :: !(Maybe [InstancesScopedListWarningDataItem])
    , _islwCode    :: !(Maybe InstancesScopedListWarningCode)
    , _islwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'islwData'
--
-- * 'islwCode'
--
-- * 'islwMessage'
instancesScopedListWarning
    :: InstancesScopedListWarning
instancesScopedListWarning =
    InstancesScopedListWarning'
    { _islwData = Nothing
    , _islwCode = Nothing
    , _islwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
islwData :: Lens' InstancesScopedListWarning [InstancesScopedListWarningDataItem]
islwData
  = lens _islwData (\ s a -> s{_islwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
islwCode :: Lens' InstancesScopedListWarning (Maybe InstancesScopedListWarningCode)
islwCode = lens _islwCode (\ s a -> s{_islwCode = a})

-- | [Output Only] A human-readable description of the warning code.
islwMessage :: Lens' InstancesScopedListWarning (Maybe Text)
islwMessage
  = lens _islwMessage (\ s a -> s{_islwMessage = a})

instance FromJSON InstancesScopedListWarning where
        parseJSON
          = withObject "InstancesScopedListWarning"
              (\ o ->
                 InstancesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstancesScopedListWarning where
        toJSON InstancesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _islwData,
                  ("code" .=) <$> _islwCode,
                  ("message" .=) <$> _islwMessage])

--
-- /See:/ 'regionInstanceGroupManagersRecreateRequest' smart constructor.
newtype RegionInstanceGroupManagersRecreateRequest = RegionInstanceGroupManagersRecreateRequest'
    { _rigmrrInstances :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagersRecreateRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmrrInstances'
regionInstanceGroupManagersRecreateRequest
    :: RegionInstanceGroupManagersRecreateRequest
regionInstanceGroupManagersRecreateRequest =
    RegionInstanceGroupManagersRecreateRequest'
    { _rigmrrInstances = Nothing
    }

-- | The URLs of one or more instances to recreate. This can be a full URL or
-- a partial URL, such as zones\/[ZONE]\/instances\/[INSTANCE_NAME].
rigmrrInstances :: Lens' RegionInstanceGroupManagersRecreateRequest [Text]
rigmrrInstances
  = lens _rigmrrInstances
      (\ s a -> s{_rigmrrInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         RegionInstanceGroupManagersRecreateRequest where
        parseJSON
          = withObject
              "RegionInstanceGroupManagersRecreateRequest"
              (\ o ->
                 RegionInstanceGroupManagersRecreateRequest' <$>
                   (o .:? "instances" .!= mempty))

instance ToJSON
         RegionInstanceGroupManagersRecreateRequest where
        toJSON
          RegionInstanceGroupManagersRecreateRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _rigmrrInstances])

-- | Labels to apply to this instance. These can be later modified by the
-- setLabels method.
--
-- /See:/ 'instanceLabels' smart constructor.
newtype InstanceLabels = InstanceLabels'
    { _ilAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ilAddtional'
instanceLabels
    :: HashMap Text Text -- ^ 'ilAddtional'
    -> InstanceLabels
instanceLabels pIlAddtional_ =
    InstanceLabels'
    { _ilAddtional = _Coerce # pIlAddtional_
    }

ilAddtional :: Lens' InstanceLabels (HashMap Text Text)
ilAddtional
  = lens _ilAddtional (\ s a -> s{_ilAddtional = a}) .
      _Coerce

instance FromJSON InstanceLabels where
        parseJSON
          = withObject "InstanceLabels"
              (\ o -> InstanceLabels' <$> (parseJSONObject o))

instance ToJSON InstanceLabels where
        toJSON = toJSON . _ilAddtional

-- | Informational warning which replaces the list of backend services when
-- the list is empty.
--
-- /See:/ 'backendServicesScopedListWarning' smart constructor.
data BackendServicesScopedListWarning = BackendServicesScopedListWarning'
    { _bsslwData    :: !(Maybe [BackendServicesScopedListWarningDataItem])
    , _bsslwCode    :: !(Maybe BackendServicesScopedListWarningCode)
    , _bsslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServicesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsslwData'
--
-- * 'bsslwCode'
--
-- * 'bsslwMessage'
backendServicesScopedListWarning
    :: BackendServicesScopedListWarning
backendServicesScopedListWarning =
    BackendServicesScopedListWarning'
    { _bsslwData = Nothing
    , _bsslwCode = Nothing
    , _bsslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
bsslwData :: Lens' BackendServicesScopedListWarning [BackendServicesScopedListWarningDataItem]
bsslwData
  = lens _bsslwData (\ s a -> s{_bsslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
bsslwCode :: Lens' BackendServicesScopedListWarning (Maybe BackendServicesScopedListWarningCode)
bsslwCode
  = lens _bsslwCode (\ s a -> s{_bsslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
bsslwMessage :: Lens' BackendServicesScopedListWarning (Maybe Text)
bsslwMessage
  = lens _bsslwMessage (\ s a -> s{_bsslwMessage = a})

instance FromJSON BackendServicesScopedListWarning
         where
        parseJSON
          = withObject "BackendServicesScopedListWarning"
              (\ o ->
                 BackendServicesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON BackendServicesScopedListWarning
         where
        toJSON BackendServicesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _bsslwData,
                  ("code" .=) <$> _bsslwCode,
                  ("message" .=) <$> _bsslwMessage])

-- | Represents a match condition that incoming traffic is evaluated against.
-- Exactly one field must be specified.
--
-- /See:/ 'securityPolicyRuleMatcher' smart constructor.
data SecurityPolicyRuleMatcher = SecurityPolicyRuleMatcher'
    { _sprmVersionedExpr :: !(Maybe SecurityPolicyRuleMatcherVersionedExpr)
    , _sprmConfig        :: !(Maybe SecurityPolicyRuleMatcherConfig)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SecurityPolicyRuleMatcher' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sprmVersionedExpr'
--
-- * 'sprmConfig'
securityPolicyRuleMatcher
    :: SecurityPolicyRuleMatcher
securityPolicyRuleMatcher =
    SecurityPolicyRuleMatcher'
    { _sprmVersionedExpr = Nothing
    , _sprmConfig = Nothing
    }

-- | Preconfigured versioned expression. If this field is specified, config
-- must also be specified. Available preconfigured expressions along with
-- their requirements are: SRC_IPS_V1 - must specify the corresponding
-- src_ip_range field in config.
sprmVersionedExpr :: Lens' SecurityPolicyRuleMatcher (Maybe SecurityPolicyRuleMatcherVersionedExpr)
sprmVersionedExpr
  = lens _sprmVersionedExpr
      (\ s a -> s{_sprmVersionedExpr = a})

-- | The configuration options available when specifying versioned_expr. This
-- field must be specified if versioned_expr is specified and cannot be
-- specified if versioned_expr is not specified.
sprmConfig :: Lens' SecurityPolicyRuleMatcher (Maybe SecurityPolicyRuleMatcherConfig)
sprmConfig
  = lens _sprmConfig (\ s a -> s{_sprmConfig = a})

instance FromJSON SecurityPolicyRuleMatcher where
        parseJSON
          = withObject "SecurityPolicyRuleMatcher"
              (\ o ->
                 SecurityPolicyRuleMatcher' <$>
                   (o .:? "versionedExpr") <*> (o .:? "config"))

instance ToJSON SecurityPolicyRuleMatcher where
        toJSON SecurityPolicyRuleMatcher'{..}
          = object
              (catMaybes
                 [("versionedExpr" .=) <$> _sprmVersionedExpr,
                  ("config" .=) <$> _sprmConfig])

-- | A list of InstanceGroup resources.
--
-- /See:/ 'instanceGroupList' smart constructor.
data InstanceGroupList = InstanceGroupList'
    { _iglNextPageToken :: !(Maybe Text)
    , _iglKind          :: !Text
    , _iglItems         :: !(Maybe [InstanceGroup])
    , _iglSelfLink      :: !(Maybe Text)
    , _iglWarning       :: !(Maybe InstanceGroupListWarning)
    , _iglId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iglNextPageToken'
--
-- * 'iglKind'
--
-- * 'iglItems'
--
-- * 'iglSelfLink'
--
-- * 'iglWarning'
--
-- * 'iglId'
instanceGroupList
    :: InstanceGroupList
instanceGroupList =
    InstanceGroupList'
    { _iglNextPageToken = Nothing
    , _iglKind = "compute#instanceGroupList"
    , _iglItems = Nothing
    , _iglSelfLink = Nothing
    , _iglWarning = Nothing
    , _iglId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
iglNextPageToken :: Lens' InstanceGroupList (Maybe Text)
iglNextPageToken
  = lens _iglNextPageToken
      (\ s a -> s{_iglNextPageToken = a})

-- | [Output Only] The resource type, which is always
-- compute#instanceGroupList for instance group lists.
iglKind :: Lens' InstanceGroupList Text
iglKind = lens _iglKind (\ s a -> s{_iglKind = a})

-- | A list of InstanceGroup resources.
iglItems :: Lens' InstanceGroupList [InstanceGroup]
iglItems
  = lens _iglItems (\ s a -> s{_iglItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
iglSelfLink :: Lens' InstanceGroupList (Maybe Text)
iglSelfLink
  = lens _iglSelfLink (\ s a -> s{_iglSelfLink = a})

-- | [Output Only] Informational warning message.
iglWarning :: Lens' InstanceGroupList (Maybe InstanceGroupListWarning)
iglWarning
  = lens _iglWarning (\ s a -> s{_iglWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
iglId :: Lens' InstanceGroupList (Maybe Text)
iglId = lens _iglId (\ s a -> s{_iglId = a})

instance FromJSON InstanceGroupList where
        parseJSON
          = withObject "InstanceGroupList"
              (\ o ->
                 InstanceGroupList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#instanceGroupList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceGroupList where
        toJSON InstanceGroupList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _iglNextPageToken,
                  Just ("kind" .= _iglKind),
                  ("items" .=) <$> _iglItems,
                  ("selfLink" .=) <$> _iglSelfLink,
                  ("warning" .=) <$> _iglWarning,
                  ("id" .=) <$> _iglId])

--
-- /See:/ 'instancesSetMachineTypeRequest' smart constructor.
newtype InstancesSetMachineTypeRequest = InstancesSetMachineTypeRequest'
    { _ismtrMachineType :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesSetMachineTypeRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ismtrMachineType'
instancesSetMachineTypeRequest
    :: InstancesSetMachineTypeRequest
instancesSetMachineTypeRequest =
    InstancesSetMachineTypeRequest'
    { _ismtrMachineType = Nothing
    }

-- | Full or partial URL of the machine type resource. See Machine Types for
-- a full list of machine types. For example:
-- zones\/us-central1-f\/machineTypes\/n1-standard-1
ismtrMachineType :: Lens' InstancesSetMachineTypeRequest (Maybe Text)
ismtrMachineType
  = lens _ismtrMachineType
      (\ s a -> s{_ismtrMachineType = a})

instance FromJSON InstancesSetMachineTypeRequest
         where
        parseJSON
          = withObject "InstancesSetMachineTypeRequest"
              (\ o ->
                 InstancesSetMachineTypeRequest' <$>
                   (o .:? "machineType"))

instance ToJSON InstancesSetMachineTypeRequest where
        toJSON InstancesSetMachineTypeRequest'{..}
          = object
              (catMaybes
                 [("machineType" .=) <$> _ismtrMachineType])

-- | Contain information of Nat mapping for a VM endpoint (i.e., NIC).
--
-- /See:/ 'vMEndpointNATMAppings' smart constructor.
data VMEndpointNATMAppings = VMEndpointNATMAppings'
    { _vmenatmaInstanceName         :: !(Maybe Text)
    , _vmenatmaInterfaceNATMAppings :: !(Maybe [VMEndpointNATMAppingsInterfaceNATMAppings])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VMEndpointNATMAppings' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vmenatmaInstanceName'
--
-- * 'vmenatmaInterfaceNATMAppings'
vMEndpointNATMAppings
    :: VMEndpointNATMAppings
vMEndpointNATMAppings =
    VMEndpointNATMAppings'
    { _vmenatmaInstanceName = Nothing
    , _vmenatmaInterfaceNATMAppings = Nothing
    }

-- | Name of the VM instance which the endpoint belongs to
vmenatmaInstanceName :: Lens' VMEndpointNATMAppings (Maybe Text)
vmenatmaInstanceName
  = lens _vmenatmaInstanceName
      (\ s a -> s{_vmenatmaInstanceName = a})

vmenatmaInterfaceNATMAppings :: Lens' VMEndpointNATMAppings [VMEndpointNATMAppingsInterfaceNATMAppings]
vmenatmaInterfaceNATMAppings
  = lens _vmenatmaInterfaceNATMAppings
      (\ s a -> s{_vmenatmaInterfaceNATMAppings = a})
      . _Default
      . _Coerce

instance FromJSON VMEndpointNATMAppings where
        parseJSON
          = withObject "VMEndpointNATMAppings"
              (\ o ->
                 VMEndpointNATMAppings' <$>
                   (o .:? "instanceName") <*>
                     (o .:? "interfaceNatMappings" .!= mempty))

instance ToJSON VMEndpointNATMAppings where
        toJSON VMEndpointNATMAppings'{..}
          = object
              (catMaybes
                 [("instanceName" .=) <$> _vmenatmaInstanceName,
                  ("interfaceNatMappings" .=) <$>
                    _vmenatmaInterfaceNATMAppings])

-- | Represents a customer-supplied encryption key
--
-- /See:/ 'customerEncryptionKey' smart constructor.
data CustomerEncryptionKey = CustomerEncryptionKey'
    { _cekKmsKeyName :: !(Maybe Text)
    , _cekSha256     :: !(Maybe Text)
    , _cekRawKey     :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CustomerEncryptionKey' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cekKmsKeyName'
--
-- * 'cekSha256'
--
-- * 'cekRawKey'
customerEncryptionKey
    :: CustomerEncryptionKey
customerEncryptionKey =
    CustomerEncryptionKey'
    { _cekKmsKeyName = Nothing
    , _cekSha256 = Nothing
    , _cekRawKey = Nothing
    }

-- | The name of the encryption key that is stored in Google Cloud KMS.
cekKmsKeyName :: Lens' CustomerEncryptionKey (Maybe Text)
cekKmsKeyName
  = lens _cekKmsKeyName
      (\ s a -> s{_cekKmsKeyName = a})

-- | [Output only] The RFC 4648 base64 encoded SHA-256 hash of the
-- customer-supplied encryption key that protects this resource.
cekSha256 :: Lens' CustomerEncryptionKey (Maybe Text)
cekSha256
  = lens _cekSha256 (\ s a -> s{_cekSha256 = a})

-- | Specifies a 256-bit customer-supplied encryption key, encoded in RFC
-- 4648 base64 to either encrypt or decrypt this resource.
cekRawKey :: Lens' CustomerEncryptionKey (Maybe Text)
cekRawKey
  = lens _cekRawKey (\ s a -> s{_cekRawKey = a})

instance FromJSON CustomerEncryptionKey where
        parseJSON
          = withObject "CustomerEncryptionKey"
              (\ o ->
                 CustomerEncryptionKey' <$>
                   (o .:? "kmsKeyName") <*> (o .:? "sha256") <*>
                     (o .:? "rawKey"))

instance ToJSON CustomerEncryptionKey where
        toJSON CustomerEncryptionKey'{..}
          = object
              (catMaybes
                 [("kmsKeyName" .=) <$> _cekKmsKeyName,
                  ("sha256" .=) <$> _cekSha256,
                  ("rawKey" .=) <$> _cekRawKey])

-- | A list of AutoscalersScopedList resources.
--
-- /See:/ 'autoscalerAggregatedListItems' smart constructor.
newtype AutoscalerAggregatedListItems = AutoscalerAggregatedListItems'
    { _aaliAddtional :: HashMap Text AutoscalersScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalerAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aaliAddtional'
autoscalerAggregatedListItems
    :: HashMap Text AutoscalersScopedList -- ^ 'aaliAddtional'
    -> AutoscalerAggregatedListItems
autoscalerAggregatedListItems pAaliAddtional_ =
    AutoscalerAggregatedListItems'
    { _aaliAddtional = _Coerce # pAaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of autoscalers.
aaliAddtional :: Lens' AutoscalerAggregatedListItems (HashMap Text AutoscalersScopedList)
aaliAddtional
  = lens _aaliAddtional
      (\ s a -> s{_aaliAddtional = a})
      . _Coerce

instance FromJSON AutoscalerAggregatedListItems where
        parseJSON
          = withObject "AutoscalerAggregatedListItems"
              (\ o ->
                 AutoscalerAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON AutoscalerAggregatedListItems where
        toJSON = toJSON . _aaliAddtional

--
-- /See:/ 'instanceListWarningDataItem' smart constructor.
data InstanceListWarningDataItem = InstanceListWarningDataItem'
    { _ilwdiValue :: !(Maybe Text)
    , _ilwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ilwdiValue'
--
-- * 'ilwdiKey'
instanceListWarningDataItem
    :: InstanceListWarningDataItem
instanceListWarningDataItem =
    InstanceListWarningDataItem'
    { _ilwdiValue = Nothing
    , _ilwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ilwdiValue :: Lens' InstanceListWarningDataItem (Maybe Text)
ilwdiValue
  = lens _ilwdiValue (\ s a -> s{_ilwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ilwdiKey :: Lens' InstanceListWarningDataItem (Maybe Text)
ilwdiKey = lens _ilwdiKey (\ s a -> s{_ilwdiKey = a})

instance FromJSON InstanceListWarningDataItem where
        parseJSON
          = withObject "InstanceListWarningDataItem"
              (\ o ->
                 InstanceListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON InstanceListWarningDataItem where
        toJSON InstanceListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ilwdiValue,
                  ("key" .=) <$> _ilwdiKey])

--
-- /See:/ 'instanceGroupManagersSetInstanceTemplateRequest' smart constructor.
newtype InstanceGroupManagersSetInstanceTemplateRequest = InstanceGroupManagersSetInstanceTemplateRequest'
    { _igmsitrInstanceTemplate :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersSetInstanceTemplateRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmsitrInstanceTemplate'
instanceGroupManagersSetInstanceTemplateRequest
    :: InstanceGroupManagersSetInstanceTemplateRequest
instanceGroupManagersSetInstanceTemplateRequest =
    InstanceGroupManagersSetInstanceTemplateRequest'
    { _igmsitrInstanceTemplate = Nothing
    }

-- | The URL of the instance template that is specified for this managed
-- instance group. The group uses this template to create all new instances
-- in the managed instance group.
igmsitrInstanceTemplate :: Lens' InstanceGroupManagersSetInstanceTemplateRequest (Maybe Text)
igmsitrInstanceTemplate
  = lens _igmsitrInstanceTemplate
      (\ s a -> s{_igmsitrInstanceTemplate = a})

instance FromJSON
         InstanceGroupManagersSetInstanceTemplateRequest where
        parseJSON
          = withObject
              "InstanceGroupManagersSetInstanceTemplateRequest"
              (\ o ->
                 InstanceGroupManagersSetInstanceTemplateRequest' <$>
                   (o .:? "instanceTemplate"))

instance ToJSON
         InstanceGroupManagersSetInstanceTemplateRequest where
        toJSON
          InstanceGroupManagersSetInstanceTemplateRequest'{..}
          = object
              (catMaybes
                 [("instanceTemplate" .=) <$>
                    _igmsitrInstanceTemplate])

-- | Deprecation status for a public resource.
--
-- /See:/ 'deprecationStatus' smart constructor.
data DeprecationStatus = DeprecationStatus'
    { _dsState       :: !(Maybe DeprecationStatusState)
    , _dsDeleted     :: !(Maybe Text)
    , _dsReplacement :: !(Maybe Text)
    , _dsObsolete    :: !(Maybe Text)
    , _dsDeprecated  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DeprecationStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dsState'
--
-- * 'dsDeleted'
--
-- * 'dsReplacement'
--
-- * 'dsObsolete'
--
-- * 'dsDeprecated'
deprecationStatus
    :: DeprecationStatus
deprecationStatus =
    DeprecationStatus'
    { _dsState = Nothing
    , _dsDeleted = Nothing
    , _dsReplacement = Nothing
    , _dsObsolete = Nothing
    , _dsDeprecated = Nothing
    }

-- | The deprecation state of this resource. This can be DEPRECATED,
-- OBSOLETE, or DELETED. Operations which create a new resource using a
-- DEPRECATED resource will return successfully, but with a warning
-- indicating the deprecated resource and recommending its replacement.
-- Operations which use OBSOLETE or DELETED resources will be rejected and
-- result in an error.
dsState :: Lens' DeprecationStatus (Maybe DeprecationStatusState)
dsState = lens _dsState (\ s a -> s{_dsState = a})

-- | An optional RFC3339 timestamp on or after which the state of this
-- resource is intended to change to DELETED. This is only informational
-- and the status will not change unless the client explicitly changes it.
dsDeleted :: Lens' DeprecationStatus (Maybe Text)
dsDeleted
  = lens _dsDeleted (\ s a -> s{_dsDeleted = a})

-- | The URL of the suggested replacement for a deprecated resource. The
-- suggested replacement resource must be the same kind of resource as the
-- deprecated resource.
dsReplacement :: Lens' DeprecationStatus (Maybe Text)
dsReplacement
  = lens _dsReplacement
      (\ s a -> s{_dsReplacement = a})

-- | An optional RFC3339 timestamp on or after which the state of this
-- resource is intended to change to OBSOLETE. This is only informational
-- and the status will not change unless the client explicitly changes it.
dsObsolete :: Lens' DeprecationStatus (Maybe Text)
dsObsolete
  = lens _dsObsolete (\ s a -> s{_dsObsolete = a})

-- | An optional RFC3339 timestamp on or after which the state of this
-- resource is intended to change to DEPRECATED. This is only informational
-- and the status will not change unless the client explicitly changes it.
dsDeprecated :: Lens' DeprecationStatus (Maybe Text)
dsDeprecated
  = lens _dsDeprecated (\ s a -> s{_dsDeprecated = a})

instance FromJSON DeprecationStatus where
        parseJSON
          = withObject "DeprecationStatus"
              (\ o ->
                 DeprecationStatus' <$>
                   (o .:? "state") <*> (o .:? "deleted") <*>
                     (o .:? "replacement")
                     <*> (o .:? "obsolete")
                     <*> (o .:? "deprecated"))

instance ToJSON DeprecationStatus where
        toJSON DeprecationStatus'{..}
          = object
              (catMaybes
                 [("state" .=) <$> _dsState,
                  ("deleted" .=) <$> _dsDeleted,
                  ("replacement" .=) <$> _dsReplacement,
                  ("obsolete" .=) <$> _dsObsolete,
                  ("deprecated" .=) <$> _dsDeprecated])

--
-- /See:/ 'httpsHealthCheckListWarningDataItem' smart constructor.
data HTTPSHealthCheckListWarningDataItem = HTTPSHealthCheckListWarningDataItem'
    { _hhclwdiValue :: !(Maybe Text)
    , _hhclwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HTTPSHealthCheckListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hhclwdiValue'
--
-- * 'hhclwdiKey'
httpsHealthCheckListWarningDataItem
    :: HTTPSHealthCheckListWarningDataItem
httpsHealthCheckListWarningDataItem =
    HTTPSHealthCheckListWarningDataItem'
    { _hhclwdiValue = Nothing
    , _hhclwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
hhclwdiValue :: Lens' HTTPSHealthCheckListWarningDataItem (Maybe Text)
hhclwdiValue
  = lens _hhclwdiValue (\ s a -> s{_hhclwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
hhclwdiKey :: Lens' HTTPSHealthCheckListWarningDataItem (Maybe Text)
hhclwdiKey
  = lens _hhclwdiKey (\ s a -> s{_hhclwdiKey = a})

instance FromJSON HTTPSHealthCheckListWarningDataItem
         where
        parseJSON
          = withObject "HTTPSHealthCheckListWarningDataItem"
              (\ o ->
                 HTTPSHealthCheckListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON HTTPSHealthCheckListWarningDataItem
         where
        toJSON HTTPSHealthCheckListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _hhclwdiValue,
                  ("key" .=) <$> _hhclwdiKey])

-- | A persistent disk snapshot resource. (== resource_for beta.snapshots ==)
-- (== resource_for v1.snapshots ==)
--
-- /See:/ 'snapshot' smart constructor.
data Snapshot = Snapshot'
    { _sStorageBytesStatus      :: !(Maybe SnapshotStorageBytesStatus)
    , _sStatus                  :: !(Maybe SnapshotStatus)
    , _sDiskSizeGb              :: !(Maybe (Textual Int64))
    , _sSourceDiskId            :: !(Maybe Text)
    , _sKind                    :: !Text
    , _sSourceDiskEncryptionKey :: !(Maybe CustomerEncryptionKey)
    , _sStorageBytes            :: !(Maybe (Textual Int64))
    , _sSelfLink                :: !(Maybe Text)
    , _sSnapshotEncryptionKey   :: !(Maybe CustomerEncryptionKey)
    , _sName                    :: !(Maybe Text)
    , _sCreationTimestamp       :: !(Maybe Text)
    , _sLicenseCodes            :: !(Maybe [Textual Int64])
    , _sId                      :: !(Maybe (Textual Word64))
    , _sLabels                  :: !(Maybe SnapshotLabels)
    , _sLicenses                :: !(Maybe [Text])
    , _sSourceDisk              :: !(Maybe Text)
    , _sLabelFingerprint        :: !(Maybe Bytes)
    , _sDescription             :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Snapshot' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sStorageBytesStatus'
--
-- * 'sStatus'
--
-- * 'sDiskSizeGb'
--
-- * 'sSourceDiskId'
--
-- * 'sKind'
--
-- * 'sSourceDiskEncryptionKey'
--
-- * 'sStorageBytes'
--
-- * 'sSelfLink'
--
-- * 'sSnapshotEncryptionKey'
--
-- * 'sName'
--
-- * 'sCreationTimestamp'
--
-- * 'sLicenseCodes'
--
-- * 'sId'
--
-- * 'sLabels'
--
-- * 'sLicenses'
--
-- * 'sSourceDisk'
--
-- * 'sLabelFingerprint'
--
-- * 'sDescription'
snapshot
    :: Snapshot
snapshot =
    Snapshot'
    { _sStorageBytesStatus = Nothing
    , _sStatus = Nothing
    , _sDiskSizeGb = Nothing
    , _sSourceDiskId = Nothing
    , _sKind = "compute#snapshot"
    , _sSourceDiskEncryptionKey = Nothing
    , _sStorageBytes = Nothing
    , _sSelfLink = Nothing
    , _sSnapshotEncryptionKey = Nothing
    , _sName = Nothing
    , _sCreationTimestamp = Nothing
    , _sLicenseCodes = Nothing
    , _sId = Nothing
    , _sLabels = Nothing
    , _sLicenses = Nothing
    , _sSourceDisk = Nothing
    , _sLabelFingerprint = Nothing
    , _sDescription = Nothing
    }

-- | [Output Only] An indicator whether storageBytes is in a stable state or
-- it is being adjusted as a result of shared storage reallocation. This
-- status can either be UPDATING, meaning the size of the snapshot is being
-- updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.
sStorageBytesStatus :: Lens' Snapshot (Maybe SnapshotStorageBytesStatus)
sStorageBytesStatus
  = lens _sStorageBytesStatus
      (\ s a -> s{_sStorageBytesStatus = a})

-- | [Output Only] The status of the snapshot. This can be CREATING,
-- DELETING, FAILED, READY, or UPLOADING.
sStatus :: Lens' Snapshot (Maybe SnapshotStatus)
sStatus = lens _sStatus (\ s a -> s{_sStatus = a})

-- | [Output Only] Size of the snapshot, specified in GB.
sDiskSizeGb :: Lens' Snapshot (Maybe Int64)
sDiskSizeGb
  = lens _sDiskSizeGb (\ s a -> s{_sDiskSizeGb = a}) .
      mapping _Coerce

-- | [Output Only] The ID value of the disk used to create this snapshot.
-- This value may be used to determine whether the snapshot was taken from
-- the current or a previous instance of a given disk name.
sSourceDiskId :: Lens' Snapshot (Maybe Text)
sSourceDiskId
  = lens _sSourceDiskId
      (\ s a -> s{_sSourceDiskId = a})

-- | [Output Only] Type of the resource. Always compute#snapshot for Snapshot
-- resources.
sKind :: Lens' Snapshot Text
sKind = lens _sKind (\ s a -> s{_sKind = a})

-- | The customer-supplied encryption key of the source disk. Required if the
-- source disk is protected by a customer-supplied encryption key.
sSourceDiskEncryptionKey :: Lens' Snapshot (Maybe CustomerEncryptionKey)
sSourceDiskEncryptionKey
  = lens _sSourceDiskEncryptionKey
      (\ s a -> s{_sSourceDiskEncryptionKey = a})

-- | [Output Only] A size of the storage used by the snapshot. As snapshots
-- share storage, this number is expected to change with snapshot
-- creation\/deletion.
sStorageBytes :: Lens' Snapshot (Maybe Int64)
sStorageBytes
  = lens _sStorageBytes
      (\ s a -> s{_sStorageBytes = a})
      . mapping _Coerce

-- | [Output Only] Server-defined URL for the resource.
sSelfLink :: Lens' Snapshot (Maybe Text)
sSelfLink
  = lens _sSelfLink (\ s a -> s{_sSelfLink = a})

-- | Encrypts the snapshot using a customer-supplied encryption key. After
-- you encrypt a snapshot using a customer-supplied key, you must provide
-- the same key if you use the image later For example, you must provide
-- the encryption key when you create a disk from the encrypted snapshot in
-- a future request. Customer-supplied encryption keys do not protect
-- access to metadata of the disk. If you do not provide an encryption key
-- when creating the snapshot, then the snapshot will be encrypted using an
-- automatically generated key and you do not need to provide a key to use
-- the snapshot later.
sSnapshotEncryptionKey :: Lens' Snapshot (Maybe CustomerEncryptionKey)
sSnapshotEncryptionKey
  = lens _sSnapshotEncryptionKey
      (\ s a -> s{_sSnapshotEncryptionKey = a})

-- | Name of the resource; provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
sName :: Lens' Snapshot (Maybe Text)
sName = lens _sName (\ s a -> s{_sName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
sCreationTimestamp :: Lens' Snapshot (Maybe Text)
sCreationTimestamp
  = lens _sCreationTimestamp
      (\ s a -> s{_sCreationTimestamp = a})

-- | [Output Only] Integer license codes indicating which licenses are
-- attached to this snapshot.
sLicenseCodes :: Lens' Snapshot [Int64]
sLicenseCodes
  = lens _sLicenseCodes
      (\ s a -> s{_sLicenseCodes = a})
      . _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
sId :: Lens' Snapshot (Maybe Word64)
sId
  = lens _sId (\ s a -> s{_sId = a}) . mapping _Coerce

-- | Labels to apply to this snapshot. These can be later modified by the
-- setLabels method. Label values may be empty.
sLabels :: Lens' Snapshot (Maybe SnapshotLabels)
sLabels = lens _sLabels (\ s a -> s{_sLabels = a})

-- | [Output Only] A list of public visible licenses that apply to this
-- snapshot. This can be because the original image had licenses attached
-- (such as a Windows image).
sLicenses :: Lens' Snapshot [Text]
sLicenses
  = lens _sLicenses (\ s a -> s{_sLicenses = a}) .
      _Default
      . _Coerce

-- | [Output Only] The source disk used to create this snapshot.
sSourceDisk :: Lens' Snapshot (Maybe Text)
sSourceDisk
  = lens _sSourceDisk (\ s a -> s{_sSourceDisk = a})

-- | A fingerprint for the labels being applied to this snapshot, which is
-- essentially a hash of the labels set used for optimistic locking. The
-- fingerprint is initially generated by Compute Engine and changes after
-- every request to modify or update labels. You must always provide an
-- up-to-date fingerprint hash in order to update or change labels,
-- otherwise the request will fail with error 412 conditionNotMet. To see
-- the latest fingerprint, make a get() request to retrieve a snapshot.
sLabelFingerprint :: Lens' Snapshot (Maybe ByteString)
sLabelFingerprint
  = lens _sLabelFingerprint
      (\ s a -> s{_sLabelFingerprint = a})
      . mapping _Bytes

-- | An optional description of this resource. Provide this property when you
-- create the resource.
sDescription :: Lens' Snapshot (Maybe Text)
sDescription
  = lens _sDescription (\ s a -> s{_sDescription = a})

instance FromJSON Snapshot where
        parseJSON
          = withObject "Snapshot"
              (\ o ->
                 Snapshot' <$>
                   (o .:? "storageBytesStatus") <*> (o .:? "status") <*>
                     (o .:? "diskSizeGb")
                     <*> (o .:? "sourceDiskId")
                     <*> (o .:? "kind" .!= "compute#snapshot")
                     <*> (o .:? "sourceDiskEncryptionKey")
                     <*> (o .:? "storageBytes")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "snapshotEncryptionKey")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "licenseCodes" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "labels")
                     <*> (o .:? "licenses" .!= mempty)
                     <*> (o .:? "sourceDisk")
                     <*> (o .:? "labelFingerprint")
                     <*> (o .:? "description"))

instance ToJSON Snapshot where
        toJSON Snapshot'{..}
          = object
              (catMaybes
                 [("storageBytesStatus" .=) <$> _sStorageBytesStatus,
                  ("status" .=) <$> _sStatus,
                  ("diskSizeGb" .=) <$> _sDiskSizeGb,
                  ("sourceDiskId" .=) <$> _sSourceDiskId,
                  Just ("kind" .= _sKind),
                  ("sourceDiskEncryptionKey" .=) <$>
                    _sSourceDiskEncryptionKey,
                  ("storageBytes" .=) <$> _sStorageBytes,
                  ("selfLink" .=) <$> _sSelfLink,
                  ("snapshotEncryptionKey" .=) <$>
                    _sSnapshotEncryptionKey,
                  ("name" .=) <$> _sName,
                  ("creationTimestamp" .=) <$> _sCreationTimestamp,
                  ("licenseCodes" .=) <$> _sLicenseCodes,
                  ("id" .=) <$> _sId, ("labels" .=) <$> _sLabels,
                  ("licenses" .=) <$> _sLicenses,
                  ("sourceDisk" .=) <$> _sSourceDisk,
                  ("labelFingerprint" .=) <$> _sLabelFingerprint,
                  ("description" .=) <$> _sDescription])

--
-- /See:/ 'routerStatus' smart constructor.
data RouterStatus = RouterStatus'
    { _rsBestRoutesForRouter :: !(Maybe [Route])
    , _rsBGPPeerStatus       :: !(Maybe [RouterStatusBGPPeerStatus])
    , _rsNetwork             :: !(Maybe Text)
    , _rsNATStatus           :: !(Maybe [RouterStatusNATStatus])
    , _rsBestRoutes          :: !(Maybe [Route])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rsBestRoutesForRouter'
--
-- * 'rsBGPPeerStatus'
--
-- * 'rsNetwork'
--
-- * 'rsNATStatus'
--
-- * 'rsBestRoutes'
routerStatus
    :: RouterStatus
routerStatus =
    RouterStatus'
    { _rsBestRoutesForRouter = Nothing
    , _rsBGPPeerStatus = Nothing
    , _rsNetwork = Nothing
    , _rsNATStatus = Nothing
    , _rsBestRoutes = Nothing
    }

-- | Best routes learned by this router.
rsBestRoutesForRouter :: Lens' RouterStatus [Route]
rsBestRoutesForRouter
  = lens _rsBestRoutesForRouter
      (\ s a -> s{_rsBestRoutesForRouter = a})
      . _Default
      . _Coerce

rsBGPPeerStatus :: Lens' RouterStatus [RouterStatusBGPPeerStatus]
rsBGPPeerStatus
  = lens _rsBGPPeerStatus
      (\ s a -> s{_rsBGPPeerStatus = a})
      . _Default
      . _Coerce

-- | URI of the network to which this router belongs.
rsNetwork :: Lens' RouterStatus (Maybe Text)
rsNetwork
  = lens _rsNetwork (\ s a -> s{_rsNetwork = a})

rsNATStatus :: Lens' RouterStatus [RouterStatusNATStatus]
rsNATStatus
  = lens _rsNATStatus (\ s a -> s{_rsNATStatus = a}) .
      _Default
      . _Coerce

-- | Best routes for this router\'s network.
rsBestRoutes :: Lens' RouterStatus [Route]
rsBestRoutes
  = lens _rsBestRoutes (\ s a -> s{_rsBestRoutes = a})
      . _Default
      . _Coerce

instance FromJSON RouterStatus where
        parseJSON
          = withObject "RouterStatus"
              (\ o ->
                 RouterStatus' <$>
                   (o .:? "bestRoutesForRouter" .!= mempty) <*>
                     (o .:? "bgpPeerStatus" .!= mempty)
                     <*> (o .:? "network")
                     <*> (o .:? "natStatus" .!= mempty)
                     <*> (o .:? "bestRoutes" .!= mempty))

instance ToJSON RouterStatus where
        toJSON RouterStatus'{..}
          = object
              (catMaybes
                 [("bestRoutesForRouter" .=) <$>
                    _rsBestRoutesForRouter,
                  ("bgpPeerStatus" .=) <$> _rsBGPPeerStatus,
                  ("network" .=) <$> _rsNetwork,
                  ("natStatus" .=) <$> _rsNATStatus,
                  ("bestRoutes" .=) <$> _rsBestRoutes])

-- | Custom utilization metric policy.
--
-- /See:/ 'autoscalingPolicyCustomMetricUtilization' smart constructor.
data AutoscalingPolicyCustomMetricUtilization = AutoscalingPolicyCustomMetricUtilization'
    { _apcmuUtilizationTarget     :: !(Maybe (Textual Double))
    , _apcmuMetric                :: !(Maybe Text)
    , _apcmuUtilizationTargetType :: !(Maybe AutoscalingPolicyCustomMetricUtilizationUtilizationTargetType)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalingPolicyCustomMetricUtilization' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'apcmuUtilizationTarget'
--
-- * 'apcmuMetric'
--
-- * 'apcmuUtilizationTargetType'
autoscalingPolicyCustomMetricUtilization
    :: AutoscalingPolicyCustomMetricUtilization
autoscalingPolicyCustomMetricUtilization =
    AutoscalingPolicyCustomMetricUtilization'
    { _apcmuUtilizationTarget = Nothing
    , _apcmuMetric = Nothing
    , _apcmuUtilizationTargetType = Nothing
    }

-- | The target value of the metric that autoscaler should maintain. This
-- must be a positive value. A utilization metric scales number of virtual
-- machines handling requests to increase or decrease proportionally to the
-- metric. For example, a good metric to use as a utilization_target is
-- compute.googleapis.com\/instance\/network\/received_bytes_count. The
-- autoscaler will work to keep this value constant for each of the
-- instances.
apcmuUtilizationTarget :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe Double)
apcmuUtilizationTarget
  = lens _apcmuUtilizationTarget
      (\ s a -> s{_apcmuUtilizationTarget = a})
      . mapping _Coerce

-- | The identifier (type) of the Stackdriver Monitoring metric. The metric
-- cannot have negative values. The metric must have a value type of INT64
-- or DOUBLE.
apcmuMetric :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe Text)
apcmuMetric
  = lens _apcmuMetric (\ s a -> s{_apcmuMetric = a})

-- | Defines how target utilization value is expressed for a Stackdriver
-- Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
apcmuUtilizationTargetType :: Lens' AutoscalingPolicyCustomMetricUtilization (Maybe AutoscalingPolicyCustomMetricUtilizationUtilizationTargetType)
apcmuUtilizationTargetType
  = lens _apcmuUtilizationTargetType
      (\ s a -> s{_apcmuUtilizationTargetType = a})

instance FromJSON
         AutoscalingPolicyCustomMetricUtilization where
        parseJSON
          = withObject
              "AutoscalingPolicyCustomMetricUtilization"
              (\ o ->
                 AutoscalingPolicyCustomMetricUtilization' <$>
                   (o .:? "utilizationTarget") <*> (o .:? "metric") <*>
                     (o .:? "utilizationTargetType"))

instance ToJSON
         AutoscalingPolicyCustomMetricUtilization where
        toJSON AutoscalingPolicyCustomMetricUtilization'{..}
          = object
              (catMaybes
                 [("utilizationTarget" .=) <$>
                    _apcmuUtilizationTarget,
                  ("metric" .=) <$> _apcmuMetric,
                  ("utilizationTargetType" .=) <$>
                    _apcmuUtilizationTargetType])

-- | Contains a list of ForwardingRule resources.
--
-- /See:/ 'forwardingRuleList' smart constructor.
data ForwardingRuleList = ForwardingRuleList'
    { _frlNextPageToken :: !(Maybe Text)
    , _frlKind          :: !Text
    , _frlItems         :: !(Maybe [ForwardingRule])
    , _frlSelfLink      :: !(Maybe Text)
    , _frlWarning       :: !(Maybe ForwardingRuleListWarning)
    , _frlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRuleList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'frlNextPageToken'
--
-- * 'frlKind'
--
-- * 'frlItems'
--
-- * 'frlSelfLink'
--
-- * 'frlWarning'
--
-- * 'frlId'
forwardingRuleList
    :: ForwardingRuleList
forwardingRuleList =
    ForwardingRuleList'
    { _frlNextPageToken = Nothing
    , _frlKind = "compute#forwardingRuleList"
    , _frlItems = Nothing
    , _frlSelfLink = Nothing
    , _frlWarning = Nothing
    , _frlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
frlNextPageToken :: Lens' ForwardingRuleList (Maybe Text)
frlNextPageToken
  = lens _frlNextPageToken
      (\ s a -> s{_frlNextPageToken = a})

-- | Type of resource.
frlKind :: Lens' ForwardingRuleList Text
frlKind = lens _frlKind (\ s a -> s{_frlKind = a})

-- | A list of ForwardingRule resources.
frlItems :: Lens' ForwardingRuleList [ForwardingRule]
frlItems
  = lens _frlItems (\ s a -> s{_frlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
frlSelfLink :: Lens' ForwardingRuleList (Maybe Text)
frlSelfLink
  = lens _frlSelfLink (\ s a -> s{_frlSelfLink = a})

-- | [Output Only] Informational warning message.
frlWarning :: Lens' ForwardingRuleList (Maybe ForwardingRuleListWarning)
frlWarning
  = lens _frlWarning (\ s a -> s{_frlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
frlId :: Lens' ForwardingRuleList (Maybe Text)
frlId = lens _frlId (\ s a -> s{_frlId = a})

instance FromJSON ForwardingRuleList where
        parseJSON
          = withObject "ForwardingRuleList"
              (\ o ->
                 ForwardingRuleList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#forwardingRuleList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON ForwardingRuleList where
        toJSON ForwardingRuleList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _frlNextPageToken,
                  Just ("kind" .= _frlKind),
                  ("items" .=) <$> _frlItems,
                  ("selfLink" .=) <$> _frlSelfLink,
                  ("warning" .=) <$> _frlWarning,
                  ("id" .=) <$> _frlId])

-- | A NodeGroup resource.
--
-- /See:/ 'nodeGroup' smart constructor.
data NodeGroup = NodeGroup'
    { _ngStatus            :: !(Maybe NodeGroupStatus)
    , _ngSize              :: !(Maybe (Textual Int32))
    , _ngKind              :: !Text
    , _ngZone              :: !(Maybe Text)
    , _ngSelfLink          :: !(Maybe Text)
    , _ngName              :: !(Maybe Text)
    , _ngCreationTimestamp :: !(Maybe Text)
    , _ngId                :: !(Maybe (Textual Word64))
    , _ngNodeTemplate      :: !(Maybe Text)
    , _ngDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroup' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngStatus'
--
-- * 'ngSize'
--
-- * 'ngKind'
--
-- * 'ngZone'
--
-- * 'ngSelfLink'
--
-- * 'ngName'
--
-- * 'ngCreationTimestamp'
--
-- * 'ngId'
--
-- * 'ngNodeTemplate'
--
-- * 'ngDescription'
nodeGroup
    :: NodeGroup
nodeGroup =
    NodeGroup'
    { _ngStatus = Nothing
    , _ngSize = Nothing
    , _ngKind = "compute#nodeGroup"
    , _ngZone = Nothing
    , _ngSelfLink = Nothing
    , _ngName = Nothing
    , _ngCreationTimestamp = Nothing
    , _ngId = Nothing
    , _ngNodeTemplate = Nothing
    , _ngDescription = Nothing
    }

ngStatus :: Lens' NodeGroup (Maybe NodeGroupStatus)
ngStatus = lens _ngStatus (\ s a -> s{_ngStatus = a})

-- | [Output Only] The total number of nodes in the node group.
ngSize :: Lens' NodeGroup (Maybe Int32)
ngSize
  = lens _ngSize (\ s a -> s{_ngSize = a}) .
      mapping _Coerce

-- | [Output Only] The type of the resource. Always compute#nodeGroup for
-- node group.
ngKind :: Lens' NodeGroup Text
ngKind = lens _ngKind (\ s a -> s{_ngKind = a})

-- | [Output Only] The name of the zone where the node group resides, such as
-- us-central1-a.
ngZone :: Lens' NodeGroup (Maybe Text)
ngZone = lens _ngZone (\ s a -> s{_ngZone = a})

-- | [Output Only] Server-defined URL for the resource.
ngSelfLink :: Lens' NodeGroup (Maybe Text)
ngSelfLink
  = lens _ngSelfLink (\ s a -> s{_ngSelfLink = a})

-- | The name of the resource, provided by the client when initially creating
-- the resource. The resource name must be 1-63 characters long, and comply
-- with RFC1035. Specifically, the name must be 1-63 characters long and
-- match the regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means
-- the first character must be a lowercase letter, and all following
-- characters must be a dash, lowercase letter, or digit, except the last
-- character, which cannot be a dash.
ngName :: Lens' NodeGroup (Maybe Text)
ngName = lens _ngName (\ s a -> s{_ngName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
ngCreationTimestamp :: Lens' NodeGroup (Maybe Text)
ngCreationTimestamp
  = lens _ngCreationTimestamp
      (\ s a -> s{_ngCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
ngId :: Lens' NodeGroup (Maybe Word64)
ngId
  = lens _ngId (\ s a -> s{_ngId = a}) .
      mapping _Coerce

-- | The URL of the node template to which this node group belongs.
ngNodeTemplate :: Lens' NodeGroup (Maybe Text)
ngNodeTemplate
  = lens _ngNodeTemplate
      (\ s a -> s{_ngNodeTemplate = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
ngDescription :: Lens' NodeGroup (Maybe Text)
ngDescription
  = lens _ngDescription
      (\ s a -> s{_ngDescription = a})

instance FromJSON NodeGroup where
        parseJSON
          = withObject "NodeGroup"
              (\ o ->
                 NodeGroup' <$>
                   (o .:? "status") <*> (o .:? "size") <*>
                     (o .:? "kind" .!= "compute#nodeGroup")
                     <*> (o .:? "zone")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "nodeTemplate")
                     <*> (o .:? "description"))

instance ToJSON NodeGroup where
        toJSON NodeGroup'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _ngStatus,
                  ("size" .=) <$> _ngSize, Just ("kind" .= _ngKind),
                  ("zone" .=) <$> _ngZone,
                  ("selfLink" .=) <$> _ngSelfLink,
                  ("name" .=) <$> _ngName,
                  ("creationTimestamp" .=) <$> _ngCreationTimestamp,
                  ("id" .=) <$> _ngId,
                  ("nodeTemplate" .=) <$> _ngNodeTemplate,
                  ("description" .=) <$> _ngDescription])

--
-- /See:/ 'vpnTunnelsScopedList' smart constructor.
data VPNTunnelsScopedList = VPNTunnelsScopedList'
    { _vtslVPNTunnels :: !(Maybe [VPNTunnel])
    , _vtslWarning    :: !(Maybe VPNTunnelsScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelsScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtslVPNTunnels'
--
-- * 'vtslWarning'
vpnTunnelsScopedList
    :: VPNTunnelsScopedList
vpnTunnelsScopedList =
    VPNTunnelsScopedList'
    { _vtslVPNTunnels = Nothing
    , _vtslWarning = Nothing
    }

-- | A list of vpn tunnels contained in this scope.
vtslVPNTunnels :: Lens' VPNTunnelsScopedList [VPNTunnel]
vtslVPNTunnels
  = lens _vtslVPNTunnels
      (\ s a -> s{_vtslVPNTunnels = a})
      . _Default
      . _Coerce

-- | Informational warning which replaces the list of addresses when the list
-- is empty.
vtslWarning :: Lens' VPNTunnelsScopedList (Maybe VPNTunnelsScopedListWarning)
vtslWarning
  = lens _vtslWarning (\ s a -> s{_vtslWarning = a})

instance FromJSON VPNTunnelsScopedList where
        parseJSON
          = withObject "VPNTunnelsScopedList"
              (\ o ->
                 VPNTunnelsScopedList' <$>
                   (o .:? "vpnTunnels" .!= mempty) <*>
                     (o .:? "warning"))

instance ToJSON VPNTunnelsScopedList where
        toJSON VPNTunnelsScopedList'{..}
          = object
              (catMaybes
                 [("vpnTunnels" .=) <$> _vtslVPNTunnels,
                  ("warning" .=) <$> _vtslWarning])

-- | Represents a secondary IP range of a subnetwork.
--
-- /See:/ 'subnetworkSecondaryRange' smart constructor.
data SubnetworkSecondaryRange = SubnetworkSecondaryRange'
    { _ssrRangeName   :: !(Maybe Text)
    , _ssrIPCIdRRange :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworkSecondaryRange' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ssrRangeName'
--
-- * 'ssrIPCIdRRange'
subnetworkSecondaryRange
    :: SubnetworkSecondaryRange
subnetworkSecondaryRange =
    SubnetworkSecondaryRange'
    { _ssrRangeName = Nothing
    , _ssrIPCIdRRange = Nothing
    }

-- | The name associated with this subnetwork secondary range, used when
-- adding an alias IP range to a VM instance. The name must be 1-63
-- characters long, and comply with RFC1035. The name must be unique within
-- the subnetwork.
ssrRangeName :: Lens' SubnetworkSecondaryRange (Maybe Text)
ssrRangeName
  = lens _ssrRangeName (\ s a -> s{_ssrRangeName = a})

-- | The range of IP addresses belonging to this subnetwork secondary range.
-- Provide this property when you create the subnetwork. Ranges must be
-- unique and non-overlapping with all primary and secondary IP ranges
-- within a network. Only IPv4 is supported.
ssrIPCIdRRange :: Lens' SubnetworkSecondaryRange (Maybe Text)
ssrIPCIdRRange
  = lens _ssrIPCIdRRange
      (\ s a -> s{_ssrIPCIdRRange = a})

instance FromJSON SubnetworkSecondaryRange where
        parseJSON
          = withObject "SubnetworkSecondaryRange"
              (\ o ->
                 SubnetworkSecondaryRange' <$>
                   (o .:? "rangeName") <*> (o .:? "ipCidrRange"))

instance ToJSON SubnetworkSecondaryRange where
        toJSON SubnetworkSecondaryRange'{..}
          = object
              (catMaybes
                 [("rangeName" .=) <$> _ssrRangeName,
                  ("ipCidrRange" .=) <$> _ssrIPCIdRRange])

--
-- /See:/ 'nodeTypesScopedList' smart constructor.
data NodeTypesScopedList = NodeTypesScopedList'
    { _ntslNodeTypes :: !(Maybe [NodeType])
    , _ntslWarning   :: !(Maybe NodeTypesScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntslNodeTypes'
--
-- * 'ntslWarning'
nodeTypesScopedList
    :: NodeTypesScopedList
nodeTypesScopedList =
    NodeTypesScopedList'
    { _ntslNodeTypes = Nothing
    , _ntslWarning = Nothing
    }

-- | [Output Only] A list of node types contained in this scope.
ntslNodeTypes :: Lens' NodeTypesScopedList [NodeType]
ntslNodeTypes
  = lens _ntslNodeTypes
      (\ s a -> s{_ntslNodeTypes = a})
      . _Default
      . _Coerce

-- | [Output Only] An informational warning that appears when the node types
-- list is empty.
ntslWarning :: Lens' NodeTypesScopedList (Maybe NodeTypesScopedListWarning)
ntslWarning
  = lens _ntslWarning (\ s a -> s{_ntslWarning = a})

instance FromJSON NodeTypesScopedList where
        parseJSON
          = withObject "NodeTypesScopedList"
              (\ o ->
                 NodeTypesScopedList' <$>
                   (o .:? "nodeTypes" .!= mempty) <*> (o .:? "warning"))

instance ToJSON NodeTypesScopedList where
        toJSON NodeTypesScopedList'{..}
          = object
              (catMaybes
                 [("nodeTypes" .=) <$> _ntslNodeTypes,
                  ("warning" .=) <$> _ntslWarning])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'regionInstanceGroupsListInstancesWarning' smart constructor.
data RegionInstanceGroupsListInstancesWarning = RegionInstanceGroupsListInstancesWarning'
    { _rigliwData    :: !(Maybe [RegionInstanceGroupsListInstancesWarningDataItem])
    , _rigliwCode    :: !(Maybe RegionInstanceGroupsListInstancesWarningCode)
    , _rigliwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupsListInstancesWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigliwData'
--
-- * 'rigliwCode'
--
-- * 'rigliwMessage'
regionInstanceGroupsListInstancesWarning
    :: RegionInstanceGroupsListInstancesWarning
regionInstanceGroupsListInstancesWarning =
    RegionInstanceGroupsListInstancesWarning'
    { _rigliwData = Nothing
    , _rigliwCode = Nothing
    , _rigliwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rigliwData :: Lens' RegionInstanceGroupsListInstancesWarning [RegionInstanceGroupsListInstancesWarningDataItem]
rigliwData
  = lens _rigliwData (\ s a -> s{_rigliwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rigliwCode :: Lens' RegionInstanceGroupsListInstancesWarning (Maybe RegionInstanceGroupsListInstancesWarningCode)
rigliwCode
  = lens _rigliwCode (\ s a -> s{_rigliwCode = a})

-- | [Output Only] A human-readable description of the warning code.
rigliwMessage :: Lens' RegionInstanceGroupsListInstancesWarning (Maybe Text)
rigliwMessage
  = lens _rigliwMessage
      (\ s a -> s{_rigliwMessage = a})

instance FromJSON
         RegionInstanceGroupsListInstancesWarning where
        parseJSON
          = withObject
              "RegionInstanceGroupsListInstancesWarning"
              (\ o ->
                 RegionInstanceGroupsListInstancesWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON
         RegionInstanceGroupsListInstancesWarning where
        toJSON RegionInstanceGroupsListInstancesWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rigliwData,
                  ("code" .=) <$> _rigliwCode,
                  ("message" .=) <$> _rigliwMessage])

-- | Specifies the audit configuration for a service. The configuration
-- determines which permission types are logged, and what identities, if
-- any, are exempted from logging. An AuditConfig must have one or more
-- AuditLogConfigs. If there are AuditConfigs for both \`allServices\` and
-- a specific service, the union of the two AuditConfigs is used for that
-- service: the log_types specified in each AuditConfig are enabled, and
-- the exempted_members in each AuditLogConfig are exempted. Example Policy
-- with multiple AuditConfigs: { \"audit_configs\": [ { \"service\":
-- \"allServices\" \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\",
-- \"exempted_members\": [ \"user:foo\'gmail.com\" ] }, { \"log_type\":
-- \"DATA_WRITE\", }, { \"log_type\": \"ADMIN_READ\", } ] }, { \"service\":
-- \"fooservice.googleapis.com\" \"audit_log_configs\": [ { \"log_type\":
-- \"DATA_READ\", }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\":
-- [ \"user:bar\'gmail.com\" ] } ] } ] } For fooservice, this policy
-- enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts
-- foo\'gmail.com from DATA_READ logging, and bar\'gmail.com from
-- DATA_WRITE logging.
--
-- /See:/ 'auditConfig' smart constructor.
data AuditConfig = AuditConfig'
    { _acService         :: !(Maybe Text)
    , _acAuditLogConfigs :: !(Maybe [AuditLogConfig])
    , _acExemptedMembers :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AuditConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acService'
--
-- * 'acAuditLogConfigs'
--
-- * 'acExemptedMembers'
auditConfig
    :: AuditConfig
auditConfig =
    AuditConfig'
    { _acService = Nothing
    , _acAuditLogConfigs = Nothing
    , _acExemptedMembers = Nothing
    }

-- | Specifies a service that will be enabled for audit logging. For example,
-- \`storage.googleapis.com\`, \`cloudsql.googleapis.com\`. \`allServices\`
-- is a special value that covers all services.
acService :: Lens' AuditConfig (Maybe Text)
acService
  = lens _acService (\ s a -> s{_acService = a})

-- | The configuration for logging of each type of permission.
acAuditLogConfigs :: Lens' AuditConfig [AuditLogConfig]
acAuditLogConfigs
  = lens _acAuditLogConfigs
      (\ s a -> s{_acAuditLogConfigs = a})
      . _Default
      . _Coerce

-- |
acExemptedMembers :: Lens' AuditConfig [Text]
acExemptedMembers
  = lens _acExemptedMembers
      (\ s a -> s{_acExemptedMembers = a})
      . _Default
      . _Coerce

instance FromJSON AuditConfig where
        parseJSON
          = withObject "AuditConfig"
              (\ o ->
                 AuditConfig' <$>
                   (o .:? "service") <*>
                     (o .:? "auditLogConfigs" .!= mempty)
                     <*> (o .:? "exemptedMembers" .!= mempty))

instance ToJSON AuditConfig where
        toJSON AuditConfig'{..}
          = object
              (catMaybes
                 [("service" .=) <$> _acService,
                  ("auditLogConfigs" .=) <$> _acAuditLogConfigs,
                  ("exemptedMembers" .=) <$> _acExemptedMembers])

--
-- /See:/ 'acceleratorTypeAggregatedListWarningDataItem' smart constructor.
data AcceleratorTypeAggregatedListWarningDataItem = AcceleratorTypeAggregatedListWarningDataItem'
    { _atalwdiValue :: !(Maybe Text)
    , _atalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypeAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atalwdiValue'
--
-- * 'atalwdiKey'
acceleratorTypeAggregatedListWarningDataItem
    :: AcceleratorTypeAggregatedListWarningDataItem
acceleratorTypeAggregatedListWarningDataItem =
    AcceleratorTypeAggregatedListWarningDataItem'
    { _atalwdiValue = Nothing
    , _atalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
atalwdiValue :: Lens' AcceleratorTypeAggregatedListWarningDataItem (Maybe Text)
atalwdiValue
  = lens _atalwdiValue (\ s a -> s{_atalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
atalwdiKey :: Lens' AcceleratorTypeAggregatedListWarningDataItem (Maybe Text)
atalwdiKey
  = lens _atalwdiKey (\ s a -> s{_atalwdiKey = a})

instance FromJSON
         AcceleratorTypeAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "AcceleratorTypeAggregatedListWarningDataItem"
              (\ o ->
                 AcceleratorTypeAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         AcceleratorTypeAggregatedListWarningDataItem where
        toJSON
          AcceleratorTypeAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _atalwdiValue,
                  ("key" .=) <$> _atalwdiKey])

--
-- /See:/ 'instanceGroupsSetNamedPortsRequest' smart constructor.
data InstanceGroupsSetNamedPortsRequest = InstanceGroupsSetNamedPortsRequest'
    { _igsnprFingerprint :: !(Maybe Bytes)
    , _igsnprNamedPorts  :: !(Maybe [NamedPort])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsSetNamedPortsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igsnprFingerprint'
--
-- * 'igsnprNamedPorts'
instanceGroupsSetNamedPortsRequest
    :: InstanceGroupsSetNamedPortsRequest
instanceGroupsSetNamedPortsRequest =
    InstanceGroupsSetNamedPortsRequest'
    { _igsnprFingerprint = Nothing
    , _igsnprNamedPorts = Nothing
    }

-- | The fingerprint of the named ports information for this instance group.
-- Use this optional property to prevent conflicts when multiple users
-- change the named ports settings concurrently. Obtain the fingerprint
-- with the instanceGroups.get method. Then, include the fingerprint in
-- your request to ensure that you do not overwrite changes that were
-- applied from another concurrent request. A request with an incorrect
-- fingerprint will fail with error 412 conditionNotMet.
igsnprFingerprint :: Lens' InstanceGroupsSetNamedPortsRequest (Maybe ByteString)
igsnprFingerprint
  = lens _igsnprFingerprint
      (\ s a -> s{_igsnprFingerprint = a})
      . mapping _Bytes

-- | The list of named ports to set for this instance group.
igsnprNamedPorts :: Lens' InstanceGroupsSetNamedPortsRequest [NamedPort]
igsnprNamedPorts
  = lens _igsnprNamedPorts
      (\ s a -> s{_igsnprNamedPorts = a})
      . _Default
      . _Coerce

instance FromJSON InstanceGroupsSetNamedPortsRequest
         where
        parseJSON
          = withObject "InstanceGroupsSetNamedPortsRequest"
              (\ o ->
                 InstanceGroupsSetNamedPortsRequest' <$>
                   (o .:? "fingerprint") <*>
                     (o .:? "namedPorts" .!= mempty))

instance ToJSON InstanceGroupsSetNamedPortsRequest
         where
        toJSON InstanceGroupsSetNamedPortsRequest'{..}
          = object
              (catMaybes
                 [("fingerprint" .=) <$> _igsnprFingerprint,
                  ("namedPorts" .=) <$> _igsnprNamedPorts])

-- | Labels to use for node affinity, which will be used in instance
-- scheduling.
--
-- /See:/ 'nodeTemplateNodeAffinityLabels' smart constructor.
newtype NodeTemplateNodeAffinityLabels = NodeTemplateNodeAffinityLabels'
    { _ntnalAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateNodeAffinityLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntnalAddtional'
nodeTemplateNodeAffinityLabels
    :: HashMap Text Text -- ^ 'ntnalAddtional'
    -> NodeTemplateNodeAffinityLabels
nodeTemplateNodeAffinityLabels pNtnalAddtional_ =
    NodeTemplateNodeAffinityLabels'
    { _ntnalAddtional = _Coerce # pNtnalAddtional_
    }

ntnalAddtional :: Lens' NodeTemplateNodeAffinityLabels (HashMap Text Text)
ntnalAddtional
  = lens _ntnalAddtional
      (\ s a -> s{_ntnalAddtional = a})
      . _Coerce

instance FromJSON NodeTemplateNodeAffinityLabels
         where
        parseJSON
          = withObject "NodeTemplateNodeAffinityLabels"
              (\ o ->
                 NodeTemplateNodeAffinityLabels' <$>
                   (parseJSONObject o))

instance ToJSON NodeTemplateNodeAffinityLabels where
        toJSON = toJSON . _ntnalAddtional

-- | Contains a list of Operation resources.
--
-- /See:/ 'operationList' smart constructor.
data OperationList = OperationList'
    { _olNextPageToken :: !(Maybe Text)
    , _olKind          :: !Text
    , _olItems         :: !(Maybe [Operation])
    , _olSelfLink      :: !(Maybe Text)
    , _olWarning       :: !(Maybe OperationListWarning)
    , _olId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'olNextPageToken'
--
-- * 'olKind'
--
-- * 'olItems'
--
-- * 'olSelfLink'
--
-- * 'olWarning'
--
-- * 'olId'
operationList
    :: OperationList
operationList =
    OperationList'
    { _olNextPageToken = Nothing
    , _olKind = "compute#operationList"
    , _olItems = Nothing
    , _olSelfLink = Nothing
    , _olWarning = Nothing
    , _olId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
olNextPageToken :: Lens' OperationList (Maybe Text)
olNextPageToken
  = lens _olNextPageToken
      (\ s a -> s{_olNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#operations for Operations
-- resource.
olKind :: Lens' OperationList Text
olKind = lens _olKind (\ s a -> s{_olKind = a})

-- | [Output Only] A list of Operation resources.
olItems :: Lens' OperationList [Operation]
olItems
  = lens _olItems (\ s a -> s{_olItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
olSelfLink :: Lens' OperationList (Maybe Text)
olSelfLink
  = lens _olSelfLink (\ s a -> s{_olSelfLink = a})

-- | [Output Only] Informational warning message.
olWarning :: Lens' OperationList (Maybe OperationListWarning)
olWarning
  = lens _olWarning (\ s a -> s{_olWarning = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
olId :: Lens' OperationList (Maybe Text)
olId = lens _olId (\ s a -> s{_olId = a})

instance FromJSON OperationList where
        parseJSON
          = withObject "OperationList"
              (\ o ->
                 OperationList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#operationList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON OperationList where
        toJSON OperationList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _olNextPageToken,
                  Just ("kind" .= _olKind), ("items" .=) <$> _olItems,
                  ("selfLink" .=) <$> _olSelfLink,
                  ("warning" .=) <$> _olWarning, ("id" .=) <$> _olId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'nodeGroupListWarning' smart constructor.
data NodeGroupListWarning = NodeGroupListWarning'
    { _nglwData    :: !(Maybe [NodeGroupListWarningDataItem])
    , _nglwCode    :: !(Maybe NodeGroupListWarningCode)
    , _nglwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nglwData'
--
-- * 'nglwCode'
--
-- * 'nglwMessage'
nodeGroupListWarning
    :: NodeGroupListWarning
nodeGroupListWarning =
    NodeGroupListWarning'
    { _nglwData = Nothing
    , _nglwCode = Nothing
    , _nglwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
nglwData :: Lens' NodeGroupListWarning [NodeGroupListWarningDataItem]
nglwData
  = lens _nglwData (\ s a -> s{_nglwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
nglwCode :: Lens' NodeGroupListWarning (Maybe NodeGroupListWarningCode)
nglwCode = lens _nglwCode (\ s a -> s{_nglwCode = a})

-- | [Output Only] A human-readable description of the warning code.
nglwMessage :: Lens' NodeGroupListWarning (Maybe Text)
nglwMessage
  = lens _nglwMessage (\ s a -> s{_nglwMessage = a})

instance FromJSON NodeGroupListWarning where
        parseJSON
          = withObject "NodeGroupListWarning"
              (\ o ->
                 NodeGroupListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeGroupListWarning where
        toJSON NodeGroupListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _nglwData,
                  ("code" .=) <$> _nglwCode,
                  ("message" .=) <$> _nglwMessage])

-- | A list of Disk resources.
--
-- /See:/ 'diskList' smart constructor.
data DiskList = DiskList'
    { _dlNextPageToken :: !(Maybe Text)
    , _dlKind          :: !Text
    , _dlItems         :: !(Maybe [Disk])
    , _dlSelfLink      :: !(Maybe Text)
    , _dlWarning       :: !(Maybe DiskListWarning)
    , _dlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dlNextPageToken'
--
-- * 'dlKind'
--
-- * 'dlItems'
--
-- * 'dlSelfLink'
--
-- * 'dlWarning'
--
-- * 'dlId'
diskList
    :: DiskList
diskList =
    DiskList'
    { _dlNextPageToken = Nothing
    , _dlKind = "compute#diskList"
    , _dlItems = Nothing
    , _dlSelfLink = Nothing
    , _dlWarning = Nothing
    , _dlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
dlNextPageToken :: Lens' DiskList (Maybe Text)
dlNextPageToken
  = lens _dlNextPageToken
      (\ s a -> s{_dlNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#diskList for lists of
-- disks.
dlKind :: Lens' DiskList Text
dlKind = lens _dlKind (\ s a -> s{_dlKind = a})

-- | A list of Disk resources.
dlItems :: Lens' DiskList [Disk]
dlItems
  = lens _dlItems (\ s a -> s{_dlItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
dlSelfLink :: Lens' DiskList (Maybe Text)
dlSelfLink
  = lens _dlSelfLink (\ s a -> s{_dlSelfLink = a})

-- | [Output Only] Informational warning message.
dlWarning :: Lens' DiskList (Maybe DiskListWarning)
dlWarning
  = lens _dlWarning (\ s a -> s{_dlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
dlId :: Lens' DiskList (Maybe Text)
dlId = lens _dlId (\ s a -> s{_dlId = a})

instance FromJSON DiskList where
        parseJSON
          = withObject "DiskList"
              (\ o ->
                 DiskList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#diskList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON DiskList where
        toJSON DiskList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _dlNextPageToken,
                  Just ("kind" .= _dlKind), ("items" .=) <$> _dlItems,
                  ("selfLink" .=) <$> _dlSelfLink,
                  ("warning" .=) <$> _dlWarning, ("id" .=) <$> _dlId])

--
-- /See:/ 'targetPoolsAddInstanceRequest' smart constructor.
newtype TargetPoolsAddInstanceRequest = TargetPoolsAddInstanceRequest'
    { _tpairInstances :: Maybe [InstanceReference]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolsAddInstanceRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpairInstances'
targetPoolsAddInstanceRequest
    :: TargetPoolsAddInstanceRequest
targetPoolsAddInstanceRequest =
    TargetPoolsAddInstanceRequest'
    { _tpairInstances = Nothing
    }

-- | A full or partial URL to an instance to add to this target pool. This
-- can be a full or partial URL. For example, the following are valid URLs:
-- -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project-id\/zones\/zone\/instances\/instance-name
-- - projects\/project-id\/zones\/zone\/instances\/instance-name -
-- zones\/zone\/instances\/instance-name
tpairInstances :: Lens' TargetPoolsAddInstanceRequest [InstanceReference]
tpairInstances
  = lens _tpairInstances
      (\ s a -> s{_tpairInstances = a})
      . _Default
      . _Coerce

instance FromJSON TargetPoolsAddInstanceRequest where
        parseJSON
          = withObject "TargetPoolsAddInstanceRequest"
              (\ o ->
                 TargetPoolsAddInstanceRequest' <$>
                   (o .:? "instances" .!= mempty))

instance ToJSON TargetPoolsAddInstanceRequest where
        toJSON TargetPoolsAddInstanceRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _tpairInstances])

--
-- /See:/ 'nodeGroupsDeleteNodesRequest' smart constructor.
newtype NodeGroupsDeleteNodesRequest = NodeGroupsDeleteNodesRequest'
    { _ngdnrNodes :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsDeleteNodesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngdnrNodes'
nodeGroupsDeleteNodesRequest
    :: NodeGroupsDeleteNodesRequest
nodeGroupsDeleteNodesRequest =
    NodeGroupsDeleteNodesRequest'
    { _ngdnrNodes = Nothing
    }

ngdnrNodes :: Lens' NodeGroupsDeleteNodesRequest [Text]
ngdnrNodes
  = lens _ngdnrNodes (\ s a -> s{_ngdnrNodes = a}) .
      _Default
      . _Coerce

instance FromJSON NodeGroupsDeleteNodesRequest where
        parseJSON
          = withObject "NodeGroupsDeleteNodesRequest"
              (\ o ->
                 NodeGroupsDeleteNodesRequest' <$>
                   (o .:? "nodes" .!= mempty))

instance ToJSON NodeGroupsDeleteNodesRequest where
        toJSON NodeGroupsDeleteNodesRequest'{..}
          = object (catMaybes [("nodes" .=) <$> _ngdnrNodes])

-- | Contains a list of autoscalers.
--
-- /See:/ 'regionAutoscalerList' smart constructor.
data RegionAutoscalerList = RegionAutoscalerList'
    { _rNextPageToken :: !(Maybe Text)
    , _rKind          :: !Text
    , _rItems         :: !(Maybe [Autoscaler])
    , _rSelfLink      :: !(Maybe Text)
    , _rWarning       :: !(Maybe RegionAutoscalerListWarning)
    , _rId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionAutoscalerList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rNextPageToken'
--
-- * 'rKind'
--
-- * 'rItems'
--
-- * 'rSelfLink'
--
-- * 'rWarning'
--
-- * 'rId'
regionAutoscalerList
    :: RegionAutoscalerList
regionAutoscalerList =
    RegionAutoscalerList'
    { _rNextPageToken = Nothing
    , _rKind = "compute#regionAutoscalerList"
    , _rItems = Nothing
    , _rSelfLink = Nothing
    , _rWarning = Nothing
    , _rId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
rNextPageToken :: Lens' RegionAutoscalerList (Maybe Text)
rNextPageToken
  = lens _rNextPageToken
      (\ s a -> s{_rNextPageToken = a})

-- | Type of resource.
rKind :: Lens' RegionAutoscalerList Text
rKind = lens _rKind (\ s a -> s{_rKind = a})

-- | A list of Autoscaler resources.
rItems :: Lens' RegionAutoscalerList [Autoscaler]
rItems
  = lens _rItems (\ s a -> s{_rItems = a}) . _Default .
      _Coerce

-- | [Output Only] Server-defined URL for this resource.
rSelfLink :: Lens' RegionAutoscalerList (Maybe Text)
rSelfLink
  = lens _rSelfLink (\ s a -> s{_rSelfLink = a})

-- | [Output Only] Informational warning message.
rWarning :: Lens' RegionAutoscalerList (Maybe RegionAutoscalerListWarning)
rWarning = lens _rWarning (\ s a -> s{_rWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
rId :: Lens' RegionAutoscalerList (Maybe Text)
rId = lens _rId (\ s a -> s{_rId = a})

instance FromJSON RegionAutoscalerList where
        parseJSON
          = withObject "RegionAutoscalerList"
              (\ o ->
                 RegionAutoscalerList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#regionAutoscalerList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RegionAutoscalerList where
        toJSON RegionAutoscalerList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _rNextPageToken,
                  Just ("kind" .= _rKind), ("items" .=) <$> _rItems,
                  ("selfLink" .=) <$> _rSelfLink,
                  ("warning" .=) <$> _rWarning, ("id" .=) <$> _rId])

--
-- /See:/ 'healthCheckListWarningDataItem' smart constructor.
data HealthCheckListWarningDataItem = HealthCheckListWarningDataItem'
    { _hclwdiValue :: !(Maybe Text)
    , _hclwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HealthCheckListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hclwdiValue'
--
-- * 'hclwdiKey'
healthCheckListWarningDataItem
    :: HealthCheckListWarningDataItem
healthCheckListWarningDataItem =
    HealthCheckListWarningDataItem'
    { _hclwdiValue = Nothing
    , _hclwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
hclwdiValue :: Lens' HealthCheckListWarningDataItem (Maybe Text)
hclwdiValue
  = lens _hclwdiValue (\ s a -> s{_hclwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
hclwdiKey :: Lens' HealthCheckListWarningDataItem (Maybe Text)
hclwdiKey
  = lens _hclwdiKey (\ s a -> s{_hclwdiKey = a})

instance FromJSON HealthCheckListWarningDataItem
         where
        parseJSON
          = withObject "HealthCheckListWarningDataItem"
              (\ o ->
                 HealthCheckListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON HealthCheckListWarningDataItem where
        toJSON HealthCheckListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _hclwdiValue,
                  ("key" .=) <$> _hclwdiKey])

--
-- /See:/ 'nodeGroupAggregatedListWarningDataItem' smart constructor.
data NodeGroupAggregatedListWarningDataItem = NodeGroupAggregatedListWarningDataItem'
    { _ngalwdiValue :: !(Maybe Text)
    , _ngalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngalwdiValue'
--
-- * 'ngalwdiKey'
nodeGroupAggregatedListWarningDataItem
    :: NodeGroupAggregatedListWarningDataItem
nodeGroupAggregatedListWarningDataItem =
    NodeGroupAggregatedListWarningDataItem'
    { _ngalwdiValue = Nothing
    , _ngalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ngalwdiValue :: Lens' NodeGroupAggregatedListWarningDataItem (Maybe Text)
ngalwdiValue
  = lens _ngalwdiValue (\ s a -> s{_ngalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ngalwdiKey :: Lens' NodeGroupAggregatedListWarningDataItem (Maybe Text)
ngalwdiKey
  = lens _ngalwdiKey (\ s a -> s{_ngalwdiKey = a})

instance FromJSON
         NodeGroupAggregatedListWarningDataItem where
        parseJSON
          = withObject "NodeGroupAggregatedListWarningDataItem"
              (\ o ->
                 NodeGroupAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         NodeGroupAggregatedListWarningDataItem where
        toJSON NodeGroupAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ngalwdiValue,
                  ("key" .=) <$> _ngalwdiKey])

--
-- /See:/ 'instanceGroupsAddInstancesRequest' smart constructor.
newtype InstanceGroupsAddInstancesRequest = InstanceGroupsAddInstancesRequest'
    { _igairInstances :: Maybe [InstanceReference]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsAddInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igairInstances'
instanceGroupsAddInstancesRequest
    :: InstanceGroupsAddInstancesRequest
instanceGroupsAddInstancesRequest =
    InstanceGroupsAddInstancesRequest'
    { _igairInstances = Nothing
    }

-- | The list of instances to add to the instance group.
igairInstances :: Lens' InstanceGroupsAddInstancesRequest [InstanceReference]
igairInstances
  = lens _igairInstances
      (\ s a -> s{_igairInstances = a})
      . _Default
      . _Coerce

instance FromJSON InstanceGroupsAddInstancesRequest
         where
        parseJSON
          = withObject "InstanceGroupsAddInstancesRequest"
              (\ o ->
                 InstanceGroupsAddInstancesRequest' <$>
                   (o .:? "instances" .!= mempty))

instance ToJSON InstanceGroupsAddInstancesRequest
         where
        toJSON InstanceGroupsAddInstancesRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _igairInstances])

--
-- /See:/ 'nodeGroupNode' smart constructor.
data NodeGroupNode = NodeGroupNode'
    { _ngnStatus    :: !(Maybe NodeGroupNodeStatus)
    , _ngnName      :: !(Maybe Text)
    , _ngnInstances :: !(Maybe [Text])
    , _ngnNodeType  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupNode' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngnStatus'
--
-- * 'ngnName'
--
-- * 'ngnInstances'
--
-- * 'ngnNodeType'
nodeGroupNode
    :: NodeGroupNode
nodeGroupNode =
    NodeGroupNode'
    { _ngnStatus = Nothing
    , _ngnName = Nothing
    , _ngnInstances = Nothing
    , _ngnNodeType = Nothing
    }

ngnStatus :: Lens' NodeGroupNode (Maybe NodeGroupNodeStatus)
ngnStatus
  = lens _ngnStatus (\ s a -> s{_ngnStatus = a})

-- | The name of the node.
ngnName :: Lens' NodeGroupNode (Maybe Text)
ngnName = lens _ngnName (\ s a -> s{_ngnName = a})

-- | Instances scheduled on this node.
ngnInstances :: Lens' NodeGroupNode [Text]
ngnInstances
  = lens _ngnInstances (\ s a -> s{_ngnInstances = a})
      . _Default
      . _Coerce

-- | The type of this node.
ngnNodeType :: Lens' NodeGroupNode (Maybe Text)
ngnNodeType
  = lens _ngnNodeType (\ s a -> s{_ngnNodeType = a})

instance FromJSON NodeGroupNode where
        parseJSON
          = withObject "NodeGroupNode"
              (\ o ->
                 NodeGroupNode' <$>
                   (o .:? "status") <*> (o .:? "name") <*>
                     (o .:? "instances" .!= mempty)
                     <*> (o .:? "nodeType"))

instance ToJSON NodeGroupNode where
        toJSON NodeGroupNode'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _ngnStatus,
                  ("name" .=) <$> _ngnName,
                  ("instances" .=) <$> _ngnInstances,
                  ("nodeType" .=) <$> _ngnNodeType])

-- | [Output Only] A list of managed instance groups.
--
-- /See:/ 'instanceGroupManagerList' smart constructor.
data InstanceGroupManagerList = InstanceGroupManagerList'
    { _igmlNextPageToken :: !(Maybe Text)
    , _igmlKind          :: !Text
    , _igmlItems         :: !(Maybe [InstanceGroupManager])
    , _igmlSelfLink      :: !(Maybe Text)
    , _igmlWarning       :: !(Maybe InstanceGroupManagerListWarning)
    , _igmlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagerList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmlNextPageToken'
--
-- * 'igmlKind'
--
-- * 'igmlItems'
--
-- * 'igmlSelfLink'
--
-- * 'igmlWarning'
--
-- * 'igmlId'
instanceGroupManagerList
    :: InstanceGroupManagerList
instanceGroupManagerList =
    InstanceGroupManagerList'
    { _igmlNextPageToken = Nothing
    , _igmlKind = "compute#instanceGroupManagerList"
    , _igmlItems = Nothing
    , _igmlSelfLink = Nothing
    , _igmlWarning = Nothing
    , _igmlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
igmlNextPageToken :: Lens' InstanceGroupManagerList (Maybe Text)
igmlNextPageToken
  = lens _igmlNextPageToken
      (\ s a -> s{_igmlNextPageToken = a})

-- | [Output Only] The resource type, which is always
-- compute#instanceGroupManagerList for a list of managed instance groups.
igmlKind :: Lens' InstanceGroupManagerList Text
igmlKind = lens _igmlKind (\ s a -> s{_igmlKind = a})

-- | A list of InstanceGroupManager resources.
igmlItems :: Lens' InstanceGroupManagerList [InstanceGroupManager]
igmlItems
  = lens _igmlItems (\ s a -> s{_igmlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
igmlSelfLink :: Lens' InstanceGroupManagerList (Maybe Text)
igmlSelfLink
  = lens _igmlSelfLink (\ s a -> s{_igmlSelfLink = a})

-- | [Output Only] Informational warning message.
igmlWarning :: Lens' InstanceGroupManagerList (Maybe InstanceGroupManagerListWarning)
igmlWarning
  = lens _igmlWarning (\ s a -> s{_igmlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
igmlId :: Lens' InstanceGroupManagerList (Maybe Text)
igmlId = lens _igmlId (\ s a -> s{_igmlId = a})

instance FromJSON InstanceGroupManagerList where
        parseJSON
          = withObject "InstanceGroupManagerList"
              (\ o ->
                 InstanceGroupManagerList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#instanceGroupManagerList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceGroupManagerList where
        toJSON InstanceGroupManagerList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _igmlNextPageToken,
                  Just ("kind" .= _igmlKind),
                  ("items" .=) <$> _igmlItems,
                  ("selfLink" .=) <$> _igmlSelfLink,
                  ("warning" .=) <$> _igmlWarning,
                  ("id" .=) <$> _igmlId])

-- | An informational warning that appears when the list of addresses is
-- empty.
--
-- /See:/ 'subnetworksScopedListWarning' smart constructor.
data SubnetworksScopedListWarning = SubnetworksScopedListWarning'
    { _sslwData    :: !(Maybe [SubnetworksScopedListWarningDataItem])
    , _sslwCode    :: !(Maybe SubnetworksScopedListWarningCode)
    , _sslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworksScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sslwData'
--
-- * 'sslwCode'
--
-- * 'sslwMessage'
subnetworksScopedListWarning
    :: SubnetworksScopedListWarning
subnetworksScopedListWarning =
    SubnetworksScopedListWarning'
    { _sslwData = Nothing
    , _sslwCode = Nothing
    , _sslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
sslwData :: Lens' SubnetworksScopedListWarning [SubnetworksScopedListWarningDataItem]
sslwData
  = lens _sslwData (\ s a -> s{_sslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
sslwCode :: Lens' SubnetworksScopedListWarning (Maybe SubnetworksScopedListWarningCode)
sslwCode = lens _sslwCode (\ s a -> s{_sslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
sslwMessage :: Lens' SubnetworksScopedListWarning (Maybe Text)
sslwMessage
  = lens _sslwMessage (\ s a -> s{_sslwMessage = a})

instance FromJSON SubnetworksScopedListWarning where
        parseJSON
          = withObject "SubnetworksScopedListWarning"
              (\ o ->
                 SubnetworksScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON SubnetworksScopedListWarning where
        toJSON SubnetworksScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _sslwData,
                  ("code" .=) <$> _sslwCode,
                  ("message" .=) <$> _sslwMessage])

--
-- /See:/ 'nodeGroupsSetNodeTemplateRequest' smart constructor.
newtype NodeGroupsSetNodeTemplateRequest = NodeGroupsSetNodeTemplateRequest'
    { _ngsntrNodeTemplate :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsSetNodeTemplateRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngsntrNodeTemplate'
nodeGroupsSetNodeTemplateRequest
    :: NodeGroupsSetNodeTemplateRequest
nodeGroupsSetNodeTemplateRequest =
    NodeGroupsSetNodeTemplateRequest'
    { _ngsntrNodeTemplate = Nothing
    }

-- | Full or partial URL of the node template resource to be updated for this
-- node group.
ngsntrNodeTemplate :: Lens' NodeGroupsSetNodeTemplateRequest (Maybe Text)
ngsntrNodeTemplate
  = lens _ngsntrNodeTemplate
      (\ s a -> s{_ngsntrNodeTemplate = a})

instance FromJSON NodeGroupsSetNodeTemplateRequest
         where
        parseJSON
          = withObject "NodeGroupsSetNodeTemplateRequest"
              (\ o ->
                 NodeGroupsSetNodeTemplateRequest' <$>
                   (o .:? "nodeTemplate"))

instance ToJSON NodeGroupsSetNodeTemplateRequest
         where
        toJSON NodeGroupsSetNodeTemplateRequest'{..}
          = object
              (catMaybes
                 [("nodeTemplate" .=) <$> _ngsntrNodeTemplate])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'acceleratorTypeListWarning' smart constructor.
data AcceleratorTypeListWarning = AcceleratorTypeListWarning'
    { _atlwData    :: !(Maybe [AcceleratorTypeListWarningDataItem])
    , _atlwCode    :: !(Maybe AcceleratorTypeListWarningCode)
    , _atlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypeListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atlwData'
--
-- * 'atlwCode'
--
-- * 'atlwMessage'
acceleratorTypeListWarning
    :: AcceleratorTypeListWarning
acceleratorTypeListWarning =
    AcceleratorTypeListWarning'
    { _atlwData = Nothing
    , _atlwCode = Nothing
    , _atlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
atlwData :: Lens' AcceleratorTypeListWarning [AcceleratorTypeListWarningDataItem]
atlwData
  = lens _atlwData (\ s a -> s{_atlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
atlwCode :: Lens' AcceleratorTypeListWarning (Maybe AcceleratorTypeListWarningCode)
atlwCode = lens _atlwCode (\ s a -> s{_atlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
atlwMessage :: Lens' AcceleratorTypeListWarning (Maybe Text)
atlwMessage
  = lens _atlwMessage (\ s a -> s{_atlwMessage = a})

instance FromJSON AcceleratorTypeListWarning where
        parseJSON
          = withObject "AcceleratorTypeListWarning"
              (\ o ->
                 AcceleratorTypeListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AcceleratorTypeListWarning where
        toJSON AcceleratorTypeListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _atlwData,
                  ("code" .=) <$> _atlwCode,
                  ("message" .=) <$> _atlwMessage])

-- | An Image resource. (== resource_for beta.images ==) (== resource_for
-- v1.images ==)
--
-- /See:/ 'image' smart constructor.
data Image = Image'
    { _iStatus                      :: !(Maybe ImageStatus)
    , _iSourceSnapshotId            :: !(Maybe Text)
    , _iImageEncryptionKey          :: !(Maybe CustomerEncryptionKey)
    , _iSourceImage                 :: !(Maybe Text)
    , _iDiskSizeGb                  :: !(Maybe (Textual Int64))
    , _iSourceType                  :: !ImageSourceType
    , _iSourceDiskId                :: !(Maybe Text)
    , _iKind                        :: !Text
    , _iSourceDiskEncryptionKey     :: !(Maybe CustomerEncryptionKey)
    , _iGuestOSFeatures             :: !(Maybe [GuestOSFeature])
    , _iArchiveSizeBytes            :: !(Maybe (Textual Int64))
    , _iFamily                      :: !(Maybe Text)
    , _iRawDisk                     :: !(Maybe ImageRawDisk)
    , _iSelfLink                    :: !(Maybe Text)
    , _iName                        :: !(Maybe Text)
    , _iSourceImageId               :: !(Maybe Text)
    , _iCreationTimestamp           :: !(Maybe Text)
    , _iSourceImageEncryptionKey    :: !(Maybe CustomerEncryptionKey)
    , _iLicenseCodes                :: !(Maybe [Textual Int64])
    , _iId                          :: !(Maybe (Textual Word64))
    , _iLabels                      :: !(Maybe ImageLabels)
    , _iLicenses                    :: !(Maybe [Text])
    , _iSourceDisk                  :: !(Maybe Text)
    , _iLabelFingerprint            :: !(Maybe Bytes)
    , _iDescription                 :: !(Maybe Text)
    , _iSourceSnapshotEncryptionKey :: !(Maybe CustomerEncryptionKey)
    , _iDeprecated                  :: !(Maybe DeprecationStatus)
    , _iSourceSnapshot              :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Image' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iStatus'
--
-- * 'iSourceSnapshotId'
--
-- * 'iImageEncryptionKey'
--
-- * 'iSourceImage'
--
-- * 'iDiskSizeGb'
--
-- * 'iSourceType'
--
-- * 'iSourceDiskId'
--
-- * 'iKind'
--
-- * 'iSourceDiskEncryptionKey'
--
-- * 'iGuestOSFeatures'
--
-- * 'iArchiveSizeBytes'
--
-- * 'iFamily'
--
-- * 'iRawDisk'
--
-- * 'iSelfLink'
--
-- * 'iName'
--
-- * 'iSourceImageId'
--
-- * 'iCreationTimestamp'
--
-- * 'iSourceImageEncryptionKey'
--
-- * 'iLicenseCodes'
--
-- * 'iId'
--
-- * 'iLabels'
--
-- * 'iLicenses'
--
-- * 'iSourceDisk'
--
-- * 'iLabelFingerprint'
--
-- * 'iDescription'
--
-- * 'iSourceSnapshotEncryptionKey'
--
-- * 'iDeprecated'
--
-- * 'iSourceSnapshot'
image
    :: Image
image =
    Image'
    { _iStatus = Nothing
    , _iSourceSnapshotId = Nothing
    , _iImageEncryptionKey = Nothing
    , _iSourceImage = Nothing
    , _iDiskSizeGb = Nothing
    , _iSourceType = Raw
    , _iSourceDiskId = Nothing
    , _iKind = "compute#image"
    , _iSourceDiskEncryptionKey = Nothing
    , _iGuestOSFeatures = Nothing
    , _iArchiveSizeBytes = Nothing
    , _iFamily = Nothing
    , _iRawDisk = Nothing
    , _iSelfLink = Nothing
    , _iName = Nothing
    , _iSourceImageId = Nothing
    , _iCreationTimestamp = Nothing
    , _iSourceImageEncryptionKey = Nothing
    , _iLicenseCodes = Nothing
    , _iId = Nothing
    , _iLabels = Nothing
    , _iLicenses = Nothing
    , _iSourceDisk = Nothing
    , _iLabelFingerprint = Nothing
    , _iDescription = Nothing
    , _iSourceSnapshotEncryptionKey = Nothing
    , _iDeprecated = Nothing
    , _iSourceSnapshot = Nothing
    }

-- | [Output Only] The status of the image. An image can be used to create
-- other resources, such as instances, only after the image has been
-- successfully created and the status is set to READY. Possible values are
-- FAILED, PENDING, or READY.
iStatus :: Lens' Image (Maybe ImageStatus)
iStatus = lens _iStatus (\ s a -> s{_iStatus = a})

-- | [Output Only] The ID value of the snapshot used to create this image.
-- This value may be used to determine whether the snapshot was taken from
-- the current or a previous instance of a given snapshot name.
iSourceSnapshotId :: Lens' Image (Maybe Text)
iSourceSnapshotId
  = lens _iSourceSnapshotId
      (\ s a -> s{_iSourceSnapshotId = a})

-- | Encrypts the image using a customer-supplied encryption key. After you
-- encrypt an image with a customer-supplied key, you must provide the same
-- key if you use the image later (e.g. to create a disk from the image).
-- Customer-supplied encryption keys do not protect access to metadata of
-- the disk. If you do not provide an encryption key when creating the
-- image, then the disk will be encrypted using an automatically generated
-- key and you do not need to provide a key to use the image later.
iImageEncryptionKey :: Lens' Image (Maybe CustomerEncryptionKey)
iImageEncryptionKey
  = lens _iImageEncryptionKey
      (\ s a -> s{_iImageEncryptionKey = a})

-- | URL of the source image used to create this image. This can be a full or
-- valid partial URL. You must provide exactly one of: - this property, or
-- - the rawDisk.source property, or - the sourceDisk property in order to
-- create an image.
iSourceImage :: Lens' Image (Maybe Text)
iSourceImage
  = lens _iSourceImage (\ s a -> s{_iSourceImage = a})

-- | Size of the image when restored onto a persistent disk (in GB).
iDiskSizeGb :: Lens' Image (Maybe Int64)
iDiskSizeGb
  = lens _iDiskSizeGb (\ s a -> s{_iDiskSizeGb = a}) .
      mapping _Coerce

-- | The type of the image used to create this disk. The default and only
-- value is RAW
iSourceType :: Lens' Image ImageSourceType
iSourceType
  = lens _iSourceType (\ s a -> s{_iSourceType = a})

-- | [Output Only] The ID value of the disk used to create this image. This
-- value may be used to determine whether the image was taken from the
-- current or a previous instance of a given disk name.
iSourceDiskId :: Lens' Image (Maybe Text)
iSourceDiskId
  = lens _iSourceDiskId
      (\ s a -> s{_iSourceDiskId = a})

-- | [Output Only] Type of the resource. Always compute#image for images.
iKind :: Lens' Image Text
iKind = lens _iKind (\ s a -> s{_iKind = a})

-- | The customer-supplied encryption key of the source disk. Required if the
-- source disk is protected by a customer-supplied encryption key.
iSourceDiskEncryptionKey :: Lens' Image (Maybe CustomerEncryptionKey)
iSourceDiskEncryptionKey
  = lens _iSourceDiskEncryptionKey
      (\ s a -> s{_iSourceDiskEncryptionKey = a})

-- | A list of features to enable on the guest operating system. Applicable
-- only for bootable images. Read Enabling guest operating system features
-- to see a list of available options.
iGuestOSFeatures :: Lens' Image [GuestOSFeature]
iGuestOSFeatures
  = lens _iGuestOSFeatures
      (\ s a -> s{_iGuestOSFeatures = a})
      . _Default
      . _Coerce

-- | Size of the image tar.gz archive stored in Google Cloud Storage (in
-- bytes).
iArchiveSizeBytes :: Lens' Image (Maybe Int64)
iArchiveSizeBytes
  = lens _iArchiveSizeBytes
      (\ s a -> s{_iArchiveSizeBytes = a})
      . mapping _Coerce

-- | The name of the image family to which this image belongs. You can create
-- disks by specifying an image family instead of a specific image name.
-- The image family always returns its latest image that is not deprecated.
-- The name of the image family must comply with RFC1035.
iFamily :: Lens' Image (Maybe Text)
iFamily = lens _iFamily (\ s a -> s{_iFamily = a})

-- | The parameters of the raw disk image.
iRawDisk :: Lens' Image (Maybe ImageRawDisk)
iRawDisk = lens _iRawDisk (\ s a -> s{_iRawDisk = a})

-- | [Output Only] Server-defined URL for the resource.
iSelfLink :: Lens' Image (Maybe Text)
iSelfLink
  = lens _iSelfLink (\ s a -> s{_iSelfLink = a})

-- | Name of the resource; provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
iName :: Lens' Image (Maybe Text)
iName = lens _iName (\ s a -> s{_iName = a})

-- | [Output Only] The ID value of the image used to create this image. This
-- value may be used to determine whether the image was taken from the
-- current or a previous instance of a given image name.
iSourceImageId :: Lens' Image (Maybe Text)
iSourceImageId
  = lens _iSourceImageId
      (\ s a -> s{_iSourceImageId = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
iCreationTimestamp :: Lens' Image (Maybe Text)
iCreationTimestamp
  = lens _iCreationTimestamp
      (\ s a -> s{_iCreationTimestamp = a})

-- | The customer-supplied encryption key of the source image. Required if
-- the source image is protected by a customer-supplied encryption key.
iSourceImageEncryptionKey :: Lens' Image (Maybe CustomerEncryptionKey)
iSourceImageEncryptionKey
  = lens _iSourceImageEncryptionKey
      (\ s a -> s{_iSourceImageEncryptionKey = a})

-- | Integer license codes indicating which licenses are attached to this
-- image.
iLicenseCodes :: Lens' Image [Int64]
iLicenseCodes
  = lens _iLicenseCodes
      (\ s a -> s{_iLicenseCodes = a})
      . _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
iId :: Lens' Image (Maybe Word64)
iId
  = lens _iId (\ s a -> s{_iId = a}) . mapping _Coerce

-- | Labels to apply to this image. These can be later modified by the
-- setLabels method.
iLabels :: Lens' Image (Maybe ImageLabels)
iLabels = lens _iLabels (\ s a -> s{_iLabels = a})

-- | Any applicable license URI.
iLicenses :: Lens' Image [Text]
iLicenses
  = lens _iLicenses (\ s a -> s{_iLicenses = a}) .
      _Default
      . _Coerce

-- | URL of the source disk used to create this image. This can be a full or
-- valid partial URL. You must provide either this property or the
-- rawDisk.source property but not both to create an image. For example,
-- the following are valid values: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/disks\/disk
-- - projects\/project\/zones\/zone\/disks\/disk - zones\/zone\/disks\/disk
iSourceDisk :: Lens' Image (Maybe Text)
iSourceDisk
  = lens _iSourceDisk (\ s a -> s{_iSourceDisk = a})

-- | A fingerprint for the labels being applied to this image, which is
-- essentially a hash of the labels used for optimistic locking. The
-- fingerprint is initially generated by Compute Engine and changes after
-- every request to modify or update labels. You must always provide an
-- up-to-date fingerprint hash in order to update or change labels,
-- otherwise the request will fail with error 412 conditionNotMet. To see
-- the latest fingerprint, make a get() request to retrieve an image.
iLabelFingerprint :: Lens' Image (Maybe ByteString)
iLabelFingerprint
  = lens _iLabelFingerprint
      (\ s a -> s{_iLabelFingerprint = a})
      . mapping _Bytes

-- | An optional description of this resource. Provide this property when you
-- create the resource.
iDescription :: Lens' Image (Maybe Text)
iDescription
  = lens _iDescription (\ s a -> s{_iDescription = a})

-- | The customer-supplied encryption key of the source snapshot. Required if
-- the source snapshot is protected by a customer-supplied encryption key.
iSourceSnapshotEncryptionKey :: Lens' Image (Maybe CustomerEncryptionKey)
iSourceSnapshotEncryptionKey
  = lens _iSourceSnapshotEncryptionKey
      (\ s a -> s{_iSourceSnapshotEncryptionKey = a})

-- | The deprecation status associated with this image.
iDeprecated :: Lens' Image (Maybe DeprecationStatus)
iDeprecated
  = lens _iDeprecated (\ s a -> s{_iDeprecated = a})

-- | URL of the source snapshot used to create this image. This can be a full
-- or valid partial URL. You must provide exactly one of: - this property,
-- or - the sourceImage property, or - the rawDisk.source property, or -
-- the sourceDisk property in order to create an image.
iSourceSnapshot :: Lens' Image (Maybe Text)
iSourceSnapshot
  = lens _iSourceSnapshot
      (\ s a -> s{_iSourceSnapshot = a})

instance FromJSON Image where
        parseJSON
          = withObject "Image"
              (\ o ->
                 Image' <$>
                   (o .:? "status") <*> (o .:? "sourceSnapshotId") <*>
                     (o .:? "imageEncryptionKey")
                     <*> (o .:? "sourceImage")
                     <*> (o .:? "diskSizeGb")
                     <*> (o .:? "sourceType" .!= Raw)
                     <*> (o .:? "sourceDiskId")
                     <*> (o .:? "kind" .!= "compute#image")
                     <*> (o .:? "sourceDiskEncryptionKey")
                     <*> (o .:? "guestOsFeatures" .!= mempty)
                     <*> (o .:? "archiveSizeBytes")
                     <*> (o .:? "family")
                     <*> (o .:? "rawDisk")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "sourceImageId")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "sourceImageEncryptionKey")
                     <*> (o .:? "licenseCodes" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "labels")
                     <*> (o .:? "licenses" .!= mempty)
                     <*> (o .:? "sourceDisk")
                     <*> (o .:? "labelFingerprint")
                     <*> (o .:? "description")
                     <*> (o .:? "sourceSnapshotEncryptionKey")
                     <*> (o .:? "deprecated")
                     <*> (o .:? "sourceSnapshot"))

instance ToJSON Image where
        toJSON Image'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _iStatus,
                  ("sourceSnapshotId" .=) <$> _iSourceSnapshotId,
                  ("imageEncryptionKey" .=) <$> _iImageEncryptionKey,
                  ("sourceImage" .=) <$> _iSourceImage,
                  ("diskSizeGb" .=) <$> _iDiskSizeGb,
                  Just ("sourceType" .= _iSourceType),
                  ("sourceDiskId" .=) <$> _iSourceDiskId,
                  Just ("kind" .= _iKind),
                  ("sourceDiskEncryptionKey" .=) <$>
                    _iSourceDiskEncryptionKey,
                  ("guestOsFeatures" .=) <$> _iGuestOSFeatures,
                  ("archiveSizeBytes" .=) <$> _iArchiveSizeBytes,
                  ("family" .=) <$> _iFamily,
                  ("rawDisk" .=) <$> _iRawDisk,
                  ("selfLink" .=) <$> _iSelfLink,
                  ("name" .=) <$> _iName,
                  ("sourceImageId" .=) <$> _iSourceImageId,
                  ("creationTimestamp" .=) <$> _iCreationTimestamp,
                  ("sourceImageEncryptionKey" .=) <$>
                    _iSourceImageEncryptionKey,
                  ("licenseCodes" .=) <$> _iLicenseCodes,
                  ("id" .=) <$> _iId, ("labels" .=) <$> _iLabels,
                  ("licenses" .=) <$> _iLicenses,
                  ("sourceDisk" .=) <$> _iSourceDisk,
                  ("labelFingerprint" .=) <$> _iLabelFingerprint,
                  ("description" .=) <$> _iDescription,
                  ("sourceSnapshotEncryptionKey" .=) <$>
                    _iSourceSnapshotEncryptionKey,
                  ("deprecated" .=) <$> _iDeprecated,
                  ("sourceSnapshot" .=) <$> _iSourceSnapshot])

--
-- /See:/ 'networksAddPeeringRequest' smart constructor.
data NetworksAddPeeringRequest = NetworksAddPeeringRequest'
    { _naprPeerNetwork      :: !(Maybe Text)
    , _naprName             :: !(Maybe Text)
    , _naprAutoCreateRoutes :: !(Maybe Bool)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NetworksAddPeeringRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'naprPeerNetwork'
--
-- * 'naprName'
--
-- * 'naprAutoCreateRoutes'
networksAddPeeringRequest
    :: NetworksAddPeeringRequest
networksAddPeeringRequest =
    NetworksAddPeeringRequest'
    { _naprPeerNetwork = Nothing
    , _naprName = Nothing
    , _naprAutoCreateRoutes = Nothing
    }

-- | URL of the peer network. It can be either full URL or partial URL. The
-- peer network may belong to a different project. If the partial URL does
-- not contain project, it is assumed that the peer network is in the same
-- project as the current network.
naprPeerNetwork :: Lens' NetworksAddPeeringRequest (Maybe Text)
naprPeerNetwork
  = lens _naprPeerNetwork
      (\ s a -> s{_naprPeerNetwork = a})

-- | Name of the peering, which should conform to RFC1035.
naprName :: Lens' NetworksAddPeeringRequest (Maybe Text)
naprName = lens _naprName (\ s a -> s{_naprName = a})

-- | Whether Google Compute Engine manages the routes automatically.
naprAutoCreateRoutes :: Lens' NetworksAddPeeringRequest (Maybe Bool)
naprAutoCreateRoutes
  = lens _naprAutoCreateRoutes
      (\ s a -> s{_naprAutoCreateRoutes = a})

instance FromJSON NetworksAddPeeringRequest where
        parseJSON
          = withObject "NetworksAddPeeringRequest"
              (\ o ->
                 NetworksAddPeeringRequest' <$>
                   (o .:? "peerNetwork") <*> (o .:? "name") <*>
                     (o .:? "autoCreateRoutes"))

instance ToJSON NetworksAddPeeringRequest where
        toJSON NetworksAddPeeringRequest'{..}
          = object
              (catMaybes
                 [("peerNetwork" .=) <$> _naprPeerNetwork,
                  ("name" .=) <$> _naprName,
                  ("autoCreateRoutes" .=) <$> _naprAutoCreateRoutes])

--
-- /See:/ 'nodeTemplatesScopedList' smart constructor.
data NodeTemplatesScopedList = NodeTemplatesScopedList'
    { _nNodeTemplates :: !(Maybe [NodeTemplate])
    , _nWarning       :: !(Maybe NodeTemplatesScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplatesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nNodeTemplates'
--
-- * 'nWarning'
nodeTemplatesScopedList
    :: NodeTemplatesScopedList
nodeTemplatesScopedList =
    NodeTemplatesScopedList'
    { _nNodeTemplates = Nothing
    , _nWarning = Nothing
    }

-- | [Output Only] A list of node templates contained in this scope.
nNodeTemplates :: Lens' NodeTemplatesScopedList [NodeTemplate]
nNodeTemplates
  = lens _nNodeTemplates
      (\ s a -> s{_nNodeTemplates = a})
      . _Default
      . _Coerce

-- | [Output Only] An informational warning that appears when the node
-- templates list is empty.
nWarning :: Lens' NodeTemplatesScopedList (Maybe NodeTemplatesScopedListWarning)
nWarning = lens _nWarning (\ s a -> s{_nWarning = a})

instance FromJSON NodeTemplatesScopedList where
        parseJSON
          = withObject "NodeTemplatesScopedList"
              (\ o ->
                 NodeTemplatesScopedList' <$>
                   (o .:? "nodeTemplates" .!= mempty) <*>
                     (o .:? "warning"))

instance ToJSON NodeTemplatesScopedList where
        toJSON NodeTemplatesScopedList'{..}
          = object
              (catMaybes
                 [("nodeTemplates" .=) <$> _nNodeTemplates,
                  ("warning" .=) <$> _nWarning])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'urlMapListWarning' smart constructor.
data URLMapListWarning = URLMapListWarning'
    { _umlwData    :: !(Maybe [URLMapListWarningDataItem])
    , _umlwCode    :: !(Maybe URLMapListWarningCode)
    , _umlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMapListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umlwData'
--
-- * 'umlwCode'
--
-- * 'umlwMessage'
urlMapListWarning
    :: URLMapListWarning
urlMapListWarning =
    URLMapListWarning'
    { _umlwData = Nothing
    , _umlwCode = Nothing
    , _umlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
umlwData :: Lens' URLMapListWarning [URLMapListWarningDataItem]
umlwData
  = lens _umlwData (\ s a -> s{_umlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
umlwCode :: Lens' URLMapListWarning (Maybe URLMapListWarningCode)
umlwCode = lens _umlwCode (\ s a -> s{_umlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
umlwMessage :: Lens' URLMapListWarning (Maybe Text)
umlwMessage
  = lens _umlwMessage (\ s a -> s{_umlwMessage = a})

instance FromJSON URLMapListWarning where
        parseJSON
          = withObject "URLMapListWarning"
              (\ o ->
                 URLMapListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON URLMapListWarning where
        toJSON URLMapListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _umlwData,
                  ("code" .=) <$> _umlwCode,
                  ("message" .=) <$> _umlwMessage])

--
-- /See:/ 'nodeGroupsScopedListWarningDataItem' smart constructor.
data NodeGroupsScopedListWarningDataItem = NodeGroupsScopedListWarningDataItem'
    { _ngslwdiValue :: !(Maybe Text)
    , _ngslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngslwdiValue'
--
-- * 'ngslwdiKey'
nodeGroupsScopedListWarningDataItem
    :: NodeGroupsScopedListWarningDataItem
nodeGroupsScopedListWarningDataItem =
    NodeGroupsScopedListWarningDataItem'
    { _ngslwdiValue = Nothing
    , _ngslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ngslwdiValue :: Lens' NodeGroupsScopedListWarningDataItem (Maybe Text)
ngslwdiValue
  = lens _ngslwdiValue (\ s a -> s{_ngslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ngslwdiKey :: Lens' NodeGroupsScopedListWarningDataItem (Maybe Text)
ngslwdiKey
  = lens _ngslwdiKey (\ s a -> s{_ngslwdiKey = a})

instance FromJSON NodeGroupsScopedListWarningDataItem
         where
        parseJSON
          = withObject "NodeGroupsScopedListWarningDataItem"
              (\ o ->
                 NodeGroupsScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON NodeGroupsScopedListWarningDataItem
         where
        toJSON NodeGroupsScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ngslwdiValue,
                  ("key" .=) <$> _ngslwdiKey])

-- | A UrlMap resource. This resource defines the mapping from URL to the
-- BackendService resource, based on the \"longest-match\" of the URL\'s
-- host and path.
--
-- /See:/ 'urlMap' smart constructor.
data URLMap = URLMap'
    { _umTests             :: !(Maybe [URLMapTest])
    , _umKind              :: !Text
    , _umFingerprint       :: !(Maybe Bytes)
    , _umDefaultService    :: !(Maybe Text)
    , _umSelfLink          :: !(Maybe Text)
    , _umName              :: !(Maybe Text)
    , _umCreationTimestamp :: !(Maybe Text)
    , _umPathMatchers      :: !(Maybe [PathMatcher])
    , _umId                :: !(Maybe (Textual Word64))
    , _umHostRules         :: !(Maybe [HostRule])
    , _umDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMap' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umTests'
--
-- * 'umKind'
--
-- * 'umFingerprint'
--
-- * 'umDefaultService'
--
-- * 'umSelfLink'
--
-- * 'umName'
--
-- * 'umCreationTimestamp'
--
-- * 'umPathMatchers'
--
-- * 'umId'
--
-- * 'umHostRules'
--
-- * 'umDescription'
urlMap
    :: URLMap
urlMap =
    URLMap'
    { _umTests = Nothing
    , _umKind = "compute#urlMap"
    , _umFingerprint = Nothing
    , _umDefaultService = Nothing
    , _umSelfLink = Nothing
    , _umName = Nothing
    , _umCreationTimestamp = Nothing
    , _umPathMatchers = Nothing
    , _umId = Nothing
    , _umHostRules = Nothing
    , _umDescription = Nothing
    }

-- | The list of expected URL mapping tests. Request to update this UrlMap
-- will succeed only if all of the test cases pass. You can specify a
-- maximum of 100 tests per UrlMap.
umTests :: Lens' URLMap [URLMapTest]
umTests
  = lens _umTests (\ s a -> s{_umTests = a}) . _Default
      . _Coerce

-- | [Output Only] Type of the resource. Always compute#urlMaps for url maps.
umKind :: Lens' URLMap Text
umKind = lens _umKind (\ s a -> s{_umKind = a})

-- | Fingerprint of this resource. A hash of the contents stored in this
-- object. This field is used in optimistic locking. This field will be
-- ignored when inserting a UrlMap. An up-to-date fingerprint must be
-- provided in order to update the UrlMap, otherwise the request will fail
-- with error 412 conditionNotMet. To see the latest fingerprint, make a
-- get() request to retrieve a UrlMap.
umFingerprint :: Lens' URLMap (Maybe ByteString)
umFingerprint
  = lens _umFingerprint
      (\ s a -> s{_umFingerprint = a})
      . mapping _Bytes

-- | The URL of the backendService resource if none of the hostRules match.
-- Use defaultService instead of defaultRouteAction when simple routing to
-- a backendService is desired and other advanced capabilities like traffic
-- splitting and rewrites are not required. Only one of defaultService,
-- defaultRouteAction or defaultUrlRedirect should must be set.
umDefaultService :: Lens' URLMap (Maybe Text)
umDefaultService
  = lens _umDefaultService
      (\ s a -> s{_umDefaultService = a})

-- | [Output Only] Server-defined URL for the resource.
umSelfLink :: Lens' URLMap (Maybe Text)
umSelfLink
  = lens _umSelfLink (\ s a -> s{_umSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
umName :: Lens' URLMap (Maybe Text)
umName = lens _umName (\ s a -> s{_umName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
umCreationTimestamp :: Lens' URLMap (Maybe Text)
umCreationTimestamp
  = lens _umCreationTimestamp
      (\ s a -> s{_umCreationTimestamp = a})

-- | The list of named PathMatchers to use against the URL.
umPathMatchers :: Lens' URLMap [PathMatcher]
umPathMatchers
  = lens _umPathMatchers
      (\ s a -> s{_umPathMatchers = a})
      . _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
umId :: Lens' URLMap (Maybe Word64)
umId
  = lens _umId (\ s a -> s{_umId = a}) .
      mapping _Coerce

-- | The list of HostRules to use against the URL.
umHostRules :: Lens' URLMap [HostRule]
umHostRules
  = lens _umHostRules (\ s a -> s{_umHostRules = a}) .
      _Default
      . _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
umDescription :: Lens' URLMap (Maybe Text)
umDescription
  = lens _umDescription
      (\ s a -> s{_umDescription = a})

instance FromJSON URLMap where
        parseJSON
          = withObject "URLMap"
              (\ o ->
                 URLMap' <$>
                   (o .:? "tests" .!= mempty) <*>
                     (o .:? "kind" .!= "compute#urlMap")
                     <*> (o .:? "fingerprint")
                     <*> (o .:? "defaultService")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "pathMatchers" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "hostRules" .!= mempty)
                     <*> (o .:? "description"))

instance ToJSON URLMap where
        toJSON URLMap'{..}
          = object
              (catMaybes
                 [("tests" .=) <$> _umTests, Just ("kind" .= _umKind),
                  ("fingerprint" .=) <$> _umFingerprint,
                  ("defaultService" .=) <$> _umDefaultService,
                  ("selfLink" .=) <$> _umSelfLink,
                  ("name" .=) <$> _umName,
                  ("creationTimestamp" .=) <$> _umCreationTimestamp,
                  ("pathMatchers" .=) <$> _umPathMatchers,
                  ("id" .=) <$> _umId,
                  ("hostRules" .=) <$> _umHostRules,
                  ("description" .=) <$> _umDescription])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'imageListWarning' smart constructor.
data ImageListWarning = ImageListWarning'
    { _ilwData    :: !(Maybe [ImageListWarningDataItem])
    , _ilwCode    :: !(Maybe ImageListWarningCode)
    , _ilwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ImageListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ilwData'
--
-- * 'ilwCode'
--
-- * 'ilwMessage'
imageListWarning
    :: ImageListWarning
imageListWarning =
    ImageListWarning'
    { _ilwData = Nothing
    , _ilwCode = Nothing
    , _ilwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ilwData :: Lens' ImageListWarning [ImageListWarningDataItem]
ilwData
  = lens _ilwData (\ s a -> s{_ilwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ilwCode :: Lens' ImageListWarning (Maybe ImageListWarningCode)
ilwCode = lens _ilwCode (\ s a -> s{_ilwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ilwMessage :: Lens' ImageListWarning (Maybe Text)
ilwMessage
  = lens _ilwMessage (\ s a -> s{_ilwMessage = a})

instance FromJSON ImageListWarning where
        parseJSON
          = withObject "ImageListWarning"
              (\ o ->
                 ImageListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON ImageListWarning where
        toJSON ImageListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ilwData, ("code" .=) <$> _ilwCode,
                  ("message" .=) <$> _ilwMessage])

-- | Represents an expression text. Example: title: \"User account presence\"
-- description: \"Determines whether the request has a user account\"
-- expression: \"size(request.user) > 0\"
--
-- /See:/ 'expr' smart constructor.
data Expr = Expr'
    { _eLocation    :: !(Maybe Text)
    , _eExpression  :: !(Maybe Text)
    , _eTitle       :: !(Maybe Text)
    , _eDescription :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Expr' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'eLocation'
--
-- * 'eExpression'
--
-- * 'eTitle'
--
-- * 'eDescription'
expr
    :: Expr
expr =
    Expr'
    { _eLocation = Nothing
    , _eExpression = Nothing
    , _eTitle = Nothing
    , _eDescription = Nothing
    }

-- | An optional string indicating the location of the expression for error
-- reporting, e.g. a file name and a position in the file.
eLocation :: Lens' Expr (Maybe Text)
eLocation
  = lens _eLocation (\ s a -> s{_eLocation = a})

-- | Textual representation of an expression in Common Expression Language
-- syntax. The application context of the containing message determines
-- which well-known feature set of CEL is supported.
eExpression :: Lens' Expr (Maybe Text)
eExpression
  = lens _eExpression (\ s a -> s{_eExpression = a})

-- | An optional title for the expression, i.e. a short string describing its
-- purpose. This can be used e.g. in UIs which allow to enter the
-- expression.
eTitle :: Lens' Expr (Maybe Text)
eTitle = lens _eTitle (\ s a -> s{_eTitle = a})

-- | An optional description of the expression. This is a longer text which
-- describes the expression, e.g. when hovered over it in a UI.
eDescription :: Lens' Expr (Maybe Text)
eDescription
  = lens _eDescription (\ s a -> s{_eDescription = a})

instance FromJSON Expr where
        parseJSON
          = withObject "Expr"
              (\ o ->
                 Expr' <$>
                   (o .:? "location") <*> (o .:? "expression") <*>
                     (o .:? "title")
                     <*> (o .:? "description"))

instance ToJSON Expr where
        toJSON Expr'{..}
          = object
              (catMaybes
                 [("location" .=) <$> _eLocation,
                  ("expression" .=) <$> _eExpression,
                  ("title" .=) <$> _eTitle,
                  ("description" .=) <$> _eDescription])

--
-- /See:/ 'sslPolicyReference' smart constructor.
newtype SSLPolicyReference = SSLPolicyReference'
    { _sprSSLPolicy :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLPolicyReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sprSSLPolicy'
sslPolicyReference
    :: SSLPolicyReference
sslPolicyReference =
    SSLPolicyReference'
    { _sprSSLPolicy = Nothing
    }

-- | URL of the SSL policy resource. Set this to empty string to clear any
-- existing SSL policy associated with the target proxy resource.
sprSSLPolicy :: Lens' SSLPolicyReference (Maybe Text)
sprSSLPolicy
  = lens _sprSSLPolicy (\ s a -> s{_sprSSLPolicy = a})

instance FromJSON SSLPolicyReference where
        parseJSON
          = withObject "SSLPolicyReference"
              (\ o -> SSLPolicyReference' <$> (o .:? "sslPolicy"))

instance ToJSON SSLPolicyReference where
        toJSON SSLPolicyReference'{..}
          = object
              (catMaybes [("sslPolicy" .=) <$> _sprSSLPolicy])

-- | A list of InstanceGroupsScopedList resources.
--
-- /See:/ 'instanceGroupAggregatedListItems' smart constructor.
newtype InstanceGroupAggregatedListItems = InstanceGroupAggregatedListItems'
    { _igaliAddtional :: HashMap Text InstanceGroupsScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igaliAddtional'
instanceGroupAggregatedListItems
    :: HashMap Text InstanceGroupsScopedList -- ^ 'igaliAddtional'
    -> InstanceGroupAggregatedListItems
instanceGroupAggregatedListItems pIgaliAddtional_ =
    InstanceGroupAggregatedListItems'
    { _igaliAddtional = _Coerce # pIgaliAddtional_
    }

-- | The name of the scope that contains this set of instance groups.
igaliAddtional :: Lens' InstanceGroupAggregatedListItems (HashMap Text InstanceGroupsScopedList)
igaliAddtional
  = lens _igaliAddtional
      (\ s a -> s{_igaliAddtional = a})
      . _Coerce

instance FromJSON InstanceGroupAggregatedListItems
         where
        parseJSON
          = withObject "InstanceGroupAggregatedListItems"
              (\ o ->
                 InstanceGroupAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON InstanceGroupAggregatedListItems
         where
        toJSON = toJSON . _igaliAddtional

-- | Contains a list of TargetPool resources.
--
-- /See:/ 'targetPoolList' smart constructor.
data TargetPoolList = TargetPoolList'
    { _tplNextPageToken :: !(Maybe Text)
    , _tplKind          :: !Text
    , _tplItems         :: !(Maybe [TargetPool])
    , _tplSelfLink      :: !(Maybe Text)
    , _tplWarning       :: !(Maybe TargetPoolListWarning)
    , _tplId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tplNextPageToken'
--
-- * 'tplKind'
--
-- * 'tplItems'
--
-- * 'tplSelfLink'
--
-- * 'tplWarning'
--
-- * 'tplId'
targetPoolList
    :: TargetPoolList
targetPoolList =
    TargetPoolList'
    { _tplNextPageToken = Nothing
    , _tplKind = "compute#targetPoolList"
    , _tplItems = Nothing
    , _tplSelfLink = Nothing
    , _tplWarning = Nothing
    , _tplId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
tplNextPageToken :: Lens' TargetPoolList (Maybe Text)
tplNextPageToken
  = lens _tplNextPageToken
      (\ s a -> s{_tplNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#targetPoolList for lists
-- of target pools.
tplKind :: Lens' TargetPoolList Text
tplKind = lens _tplKind (\ s a -> s{_tplKind = a})

-- | A list of TargetPool resources.
tplItems :: Lens' TargetPoolList [TargetPool]
tplItems
  = lens _tplItems (\ s a -> s{_tplItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
tplSelfLink :: Lens' TargetPoolList (Maybe Text)
tplSelfLink
  = lens _tplSelfLink (\ s a -> s{_tplSelfLink = a})

-- | [Output Only] Informational warning message.
tplWarning :: Lens' TargetPoolList (Maybe TargetPoolListWarning)
tplWarning
  = lens _tplWarning (\ s a -> s{_tplWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
tplId :: Lens' TargetPoolList (Maybe Text)
tplId = lens _tplId (\ s a -> s{_tplId = a})

instance FromJSON TargetPoolList where
        parseJSON
          = withObject "TargetPoolList"
              (\ o ->
                 TargetPoolList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#targetPoolList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetPoolList where
        toJSON TargetPoolList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _tplNextPageToken,
                  Just ("kind" .= _tplKind),
                  ("items" .=) <$> _tplItems,
                  ("selfLink" .=) <$> _tplSelfLink,
                  ("warning" .=) <$> _tplWarning,
                  ("id" .=) <$> _tplId])

-- | An Accelerator Type resource. (== resource_for beta.acceleratorTypes ==)
-- (== resource_for v1.acceleratorTypes ==)
--
-- /See:/ 'acceleratorType' smart constructor.
data AcceleratorType = AcceleratorType'
    { _atKind                    :: !Text
    , _atZone                    :: !(Maybe Text)
    , _atMaximumCardsPerInstance :: !(Maybe (Textual Int32))
    , _atSelfLink                :: !(Maybe Text)
    , _atName                    :: !(Maybe Text)
    , _atCreationTimestamp       :: !(Maybe Text)
    , _atId                      :: !(Maybe (Textual Word64))
    , _atDescription             :: !(Maybe Text)
    , _atDeprecated              :: !(Maybe DeprecationStatus)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorType' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atKind'
--
-- * 'atZone'
--
-- * 'atMaximumCardsPerInstance'
--
-- * 'atSelfLink'
--
-- * 'atName'
--
-- * 'atCreationTimestamp'
--
-- * 'atId'
--
-- * 'atDescription'
--
-- * 'atDeprecated'
acceleratorType
    :: AcceleratorType
acceleratorType =
    AcceleratorType'
    { _atKind = "compute#acceleratorType"
    , _atZone = Nothing
    , _atMaximumCardsPerInstance = Nothing
    , _atSelfLink = Nothing
    , _atName = Nothing
    , _atCreationTimestamp = Nothing
    , _atId = Nothing
    , _atDescription = Nothing
    , _atDeprecated = Nothing
    }

-- | [Output Only] The type of the resource. Always compute#acceleratorType
-- for accelerator types.
atKind :: Lens' AcceleratorType Text
atKind = lens _atKind (\ s a -> s{_atKind = a})

-- | [Output Only] The name of the zone where the accelerator type resides,
-- such as us-central1-a. You must specify this field as part of the HTTP
-- request URL. It is not settable as a field in the request body.
atZone :: Lens' AcceleratorType (Maybe Text)
atZone = lens _atZone (\ s a -> s{_atZone = a})

-- | [Output Only] Maximum accelerator cards allowed per instance.
atMaximumCardsPerInstance :: Lens' AcceleratorType (Maybe Int32)
atMaximumCardsPerInstance
  = lens _atMaximumCardsPerInstance
      (\ s a -> s{_atMaximumCardsPerInstance = a})
      . mapping _Coerce

-- | [Output Only] Server-defined fully-qualified URL for this resource.
atSelfLink :: Lens' AcceleratorType (Maybe Text)
atSelfLink
  = lens _atSelfLink (\ s a -> s{_atSelfLink = a})

-- | [Output Only] Name of the resource.
atName :: Lens' AcceleratorType (Maybe Text)
atName = lens _atName (\ s a -> s{_atName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
atCreationTimestamp :: Lens' AcceleratorType (Maybe Text)
atCreationTimestamp
  = lens _atCreationTimestamp
      (\ s a -> s{_atCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
atId :: Lens' AcceleratorType (Maybe Word64)
atId
  = lens _atId (\ s a -> s{_atId = a}) .
      mapping _Coerce

-- | [Output Only] An optional textual description of the resource.
atDescription :: Lens' AcceleratorType (Maybe Text)
atDescription
  = lens _atDescription
      (\ s a -> s{_atDescription = a})

-- | [Output Only] The deprecation status associated with this accelerator
-- type.
atDeprecated :: Lens' AcceleratorType (Maybe DeprecationStatus)
atDeprecated
  = lens _atDeprecated (\ s a -> s{_atDeprecated = a})

instance FromJSON AcceleratorType where
        parseJSON
          = withObject "AcceleratorType"
              (\ o ->
                 AcceleratorType' <$>
                   (o .:? "kind" .!= "compute#acceleratorType") <*>
                     (o .:? "zone")
                     <*> (o .:? "maximumCardsPerInstance")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "description")
                     <*> (o .:? "deprecated"))

instance ToJSON AcceleratorType where
        toJSON AcceleratorType'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _atKind), ("zone" .=) <$> _atZone,
                  ("maximumCardsPerInstance" .=) <$>
                    _atMaximumCardsPerInstance,
                  ("selfLink" .=) <$> _atSelfLink,
                  ("name" .=) <$> _atName,
                  ("creationTimestamp" .=) <$> _atCreationTimestamp,
                  ("id" .=) <$> _atId,
                  ("description" .=) <$> _atDescription,
                  ("deprecated" .=) <$> _atDeprecated])

--
-- /See:/ 'backendBucketListWarningDataItem' smart constructor.
data BackendBucketListWarningDataItem = BackendBucketListWarningDataItem'
    { _bblwdiValue :: !(Maybe Text)
    , _bblwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendBucketListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bblwdiValue'
--
-- * 'bblwdiKey'
backendBucketListWarningDataItem
    :: BackendBucketListWarningDataItem
backendBucketListWarningDataItem =
    BackendBucketListWarningDataItem'
    { _bblwdiValue = Nothing
    , _bblwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
bblwdiValue :: Lens' BackendBucketListWarningDataItem (Maybe Text)
bblwdiValue
  = lens _bblwdiValue (\ s a -> s{_bblwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
bblwdiKey :: Lens' BackendBucketListWarningDataItem (Maybe Text)
bblwdiKey
  = lens _bblwdiKey (\ s a -> s{_bblwdiKey = a})

instance FromJSON BackendBucketListWarningDataItem
         where
        parseJSON
          = withObject "BackendBucketListWarningDataItem"
              (\ o ->
                 BackendBucketListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON BackendBucketListWarningDataItem
         where
        toJSON BackendBucketListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _bblwdiValue,
                  ("key" .=) <$> _bblwdiKey])

--
-- /See:/ 'acceleratorTypesScopedListWarningDataItem' smart constructor.
data AcceleratorTypesScopedListWarningDataItem = AcceleratorTypesScopedListWarningDataItem'
    { _atslwdiValue :: !(Maybe Text)
    , _atslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atslwdiValue'
--
-- * 'atslwdiKey'
acceleratorTypesScopedListWarningDataItem
    :: AcceleratorTypesScopedListWarningDataItem
acceleratorTypesScopedListWarningDataItem =
    AcceleratorTypesScopedListWarningDataItem'
    { _atslwdiValue = Nothing
    , _atslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
atslwdiValue :: Lens' AcceleratorTypesScopedListWarningDataItem (Maybe Text)
atslwdiValue
  = lens _atslwdiValue (\ s a -> s{_atslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
atslwdiKey :: Lens' AcceleratorTypesScopedListWarningDataItem (Maybe Text)
atslwdiKey
  = lens _atslwdiKey (\ s a -> s{_atslwdiKey = a})

instance FromJSON
         AcceleratorTypesScopedListWarningDataItem where
        parseJSON
          = withObject
              "AcceleratorTypesScopedListWarningDataItem"
              (\ o ->
                 AcceleratorTypesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         AcceleratorTypesScopedListWarningDataItem where
        toJSON AcceleratorTypesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _atslwdiValue,
                  ("key" .=) <$> _atslwdiKey])

--
-- /See:/ 'regionDiskTypeList' smart constructor.
data RegionDiskTypeList = RegionDiskTypeList'
    { _rdtlNextPageToken :: !(Maybe Text)
    , _rdtlKind          :: !Text
    , _rdtlItems         :: !(Maybe [DiskType])
    , _rdtlSelfLink      :: !(Maybe Text)
    , _rdtlWarning       :: !(Maybe RegionDiskTypeListWarning)
    , _rdtlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionDiskTypeList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rdtlNextPageToken'
--
-- * 'rdtlKind'
--
-- * 'rdtlItems'
--
-- * 'rdtlSelfLink'
--
-- * 'rdtlWarning'
--
-- * 'rdtlId'
regionDiskTypeList
    :: RegionDiskTypeList
regionDiskTypeList =
    RegionDiskTypeList'
    { _rdtlNextPageToken = Nothing
    , _rdtlKind = "compute#regionDiskTypeList"
    , _rdtlItems = Nothing
    , _rdtlSelfLink = Nothing
    , _rdtlWarning = Nothing
    , _rdtlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
rdtlNextPageToken :: Lens' RegionDiskTypeList (Maybe Text)
rdtlNextPageToken
  = lens _rdtlNextPageToken
      (\ s a -> s{_rdtlNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#regionDiskTypeList for
-- region disk types.
rdtlKind :: Lens' RegionDiskTypeList Text
rdtlKind = lens _rdtlKind (\ s a -> s{_rdtlKind = a})

-- | A list of DiskType resources.
rdtlItems :: Lens' RegionDiskTypeList [DiskType]
rdtlItems
  = lens _rdtlItems (\ s a -> s{_rdtlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
rdtlSelfLink :: Lens' RegionDiskTypeList (Maybe Text)
rdtlSelfLink
  = lens _rdtlSelfLink (\ s a -> s{_rdtlSelfLink = a})

-- | [Output Only] Informational warning message.
rdtlWarning :: Lens' RegionDiskTypeList (Maybe RegionDiskTypeListWarning)
rdtlWarning
  = lens _rdtlWarning (\ s a -> s{_rdtlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
rdtlId :: Lens' RegionDiskTypeList (Maybe Text)
rdtlId = lens _rdtlId (\ s a -> s{_rdtlId = a})

instance FromJSON RegionDiskTypeList where
        parseJSON
          = withObject "RegionDiskTypeList"
              (\ o ->
                 RegionDiskTypeList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#regionDiskTypeList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RegionDiskTypeList where
        toJSON RegionDiskTypeList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _rdtlNextPageToken,
                  Just ("kind" .= _rdtlKind),
                  ("items" .=) <$> _rdtlItems,
                  ("selfLink" .=) <$> _rdtlSelfLink,
                  ("warning" .=) <$> _rdtlWarning,
                  ("id" .=) <$> _rdtlId])

--
-- /See:/ 'targetInstanceAggregatedList' smart constructor.
data TargetInstanceAggregatedList = TargetInstanceAggregatedList'
    { _tialNextPageToken :: !(Maybe Text)
    , _tialKind          :: !Text
    , _tialItems         :: !(Maybe TargetInstanceAggregatedListItems)
    , _tialSelfLink      :: !(Maybe Text)
    , _tialWarning       :: !(Maybe TargetInstanceAggregatedListWarning)
    , _tialId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstanceAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tialNextPageToken'
--
-- * 'tialKind'
--
-- * 'tialItems'
--
-- * 'tialSelfLink'
--
-- * 'tialWarning'
--
-- * 'tialId'
targetInstanceAggregatedList
    :: TargetInstanceAggregatedList
targetInstanceAggregatedList =
    TargetInstanceAggregatedList'
    { _tialNextPageToken = Nothing
    , _tialKind = "compute#targetInstanceAggregatedList"
    , _tialItems = Nothing
    , _tialSelfLink = Nothing
    , _tialWarning = Nothing
    , _tialId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
tialNextPageToken :: Lens' TargetInstanceAggregatedList (Maybe Text)
tialNextPageToken
  = lens _tialNextPageToken
      (\ s a -> s{_tialNextPageToken = a})

-- | Type of resource.
tialKind :: Lens' TargetInstanceAggregatedList Text
tialKind = lens _tialKind (\ s a -> s{_tialKind = a})

-- | A list of TargetInstance resources.
tialItems :: Lens' TargetInstanceAggregatedList (Maybe TargetInstanceAggregatedListItems)
tialItems
  = lens _tialItems (\ s a -> s{_tialItems = a})

-- | [Output Only] Server-defined URL for this resource.
tialSelfLink :: Lens' TargetInstanceAggregatedList (Maybe Text)
tialSelfLink
  = lens _tialSelfLink (\ s a -> s{_tialSelfLink = a})

-- | [Output Only] Informational warning message.
tialWarning :: Lens' TargetInstanceAggregatedList (Maybe TargetInstanceAggregatedListWarning)
tialWarning
  = lens _tialWarning (\ s a -> s{_tialWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
tialId :: Lens' TargetInstanceAggregatedList (Maybe Text)
tialId = lens _tialId (\ s a -> s{_tialId = a})

instance FromJSON TargetInstanceAggregatedList where
        parseJSON
          = withObject "TargetInstanceAggregatedList"
              (\ o ->
                 TargetInstanceAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#targetInstanceAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetInstanceAggregatedList where
        toJSON TargetInstanceAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _tialNextPageToken,
                  Just ("kind" .= _tialKind),
                  ("items" .=) <$> _tialItems,
                  ("selfLink" .=) <$> _tialSelfLink,
                  ("warning" .=) <$> _tialWarning,
                  ("id" .=) <$> _tialId])

--
-- /See:/ 'nodeGroupsListNodesWarningDataItem' smart constructor.
data NodeGroupsListNodesWarningDataItem = NodeGroupsListNodesWarningDataItem'
    { _nglnwdiValue :: !(Maybe Text)
    , _nglnwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsListNodesWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nglnwdiValue'
--
-- * 'nglnwdiKey'
nodeGroupsListNodesWarningDataItem
    :: NodeGroupsListNodesWarningDataItem
nodeGroupsListNodesWarningDataItem =
    NodeGroupsListNodesWarningDataItem'
    { _nglnwdiValue = Nothing
    , _nglnwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
nglnwdiValue :: Lens' NodeGroupsListNodesWarningDataItem (Maybe Text)
nglnwdiValue
  = lens _nglnwdiValue (\ s a -> s{_nglnwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
nglnwdiKey :: Lens' NodeGroupsListNodesWarningDataItem (Maybe Text)
nglnwdiKey
  = lens _nglnwdiKey (\ s a -> s{_nglnwdiKey = a})

instance FromJSON NodeGroupsListNodesWarningDataItem
         where
        parseJSON
          = withObject "NodeGroupsListNodesWarningDataItem"
              (\ o ->
                 NodeGroupsListNodesWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON NodeGroupsListNodesWarningDataItem
         where
        toJSON NodeGroupsListNodesWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _nglnwdiValue,
                  ("key" .=) <$> _nglnwdiKey])

--
-- /See:/ 'usableSubnetworksAggregatedList' smart constructor.
data UsableSubnetworksAggregatedList = UsableSubnetworksAggregatedList'
    { _usalNextPageToken :: !(Maybe Text)
    , _usalKind          :: !Text
    , _usalItems         :: !(Maybe [UsableSubnetwork])
    , _usalSelfLink      :: !(Maybe Text)
    , _usalWarning       :: !(Maybe UsableSubnetworksAggregatedListWarning)
    , _usalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UsableSubnetworksAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'usalNextPageToken'
--
-- * 'usalKind'
--
-- * 'usalItems'
--
-- * 'usalSelfLink'
--
-- * 'usalWarning'
--
-- * 'usalId'
usableSubnetworksAggregatedList
    :: UsableSubnetworksAggregatedList
usableSubnetworksAggregatedList =
    UsableSubnetworksAggregatedList'
    { _usalNextPageToken = Nothing
    , _usalKind = "compute#usableSubnetworksAggregatedList"
    , _usalItems = Nothing
    , _usalSelfLink = Nothing
    , _usalWarning = Nothing
    , _usalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
usalNextPageToken :: Lens' UsableSubnetworksAggregatedList (Maybe Text)
usalNextPageToken
  = lens _usalNextPageToken
      (\ s a -> s{_usalNextPageToken = a})

-- | [Output Only] Type of resource. Always
-- compute#usableSubnetworksAggregatedList for aggregated lists of usable
-- subnetworks.
usalKind :: Lens' UsableSubnetworksAggregatedList Text
usalKind = lens _usalKind (\ s a -> s{_usalKind = a})

-- | [Output] A list of usable subnetwork URLs.
usalItems :: Lens' UsableSubnetworksAggregatedList [UsableSubnetwork]
usalItems
  = lens _usalItems (\ s a -> s{_usalItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
usalSelfLink :: Lens' UsableSubnetworksAggregatedList (Maybe Text)
usalSelfLink
  = lens _usalSelfLink (\ s a -> s{_usalSelfLink = a})

-- | [Output Only] Informational warning message.
usalWarning :: Lens' UsableSubnetworksAggregatedList (Maybe UsableSubnetworksAggregatedListWarning)
usalWarning
  = lens _usalWarning (\ s a -> s{_usalWarning = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
usalId :: Lens' UsableSubnetworksAggregatedList (Maybe Text)
usalId = lens _usalId (\ s a -> s{_usalId = a})

instance FromJSON UsableSubnetworksAggregatedList
         where
        parseJSON
          = withObject "UsableSubnetworksAggregatedList"
              (\ o ->
                 UsableSubnetworksAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#usableSubnetworksAggregatedList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON UsableSubnetworksAggregatedList where
        toJSON UsableSubnetworksAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _usalNextPageToken,
                  Just ("kind" .= _usalKind),
                  ("items" .=) <$> _usalItems,
                  ("selfLink" .=) <$> _usalSelfLink,
                  ("warning" .=) <$> _usalWarning,
                  ("id" .=) <$> _usalId])

--
-- /See:/ 'disksScopedList' smart constructor.
data DisksScopedList = DisksScopedList'
    { _dslWarning :: !(Maybe DisksScopedListWarning)
    , _dslDisks   :: !(Maybe [Disk])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DisksScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dslWarning'
--
-- * 'dslDisks'
disksScopedList
    :: DisksScopedList
disksScopedList =
    DisksScopedList'
    { _dslWarning = Nothing
    , _dslDisks = Nothing
    }

-- | [Output Only] Informational warning which replaces the list of disks
-- when the list is empty.
dslWarning :: Lens' DisksScopedList (Maybe DisksScopedListWarning)
dslWarning
  = lens _dslWarning (\ s a -> s{_dslWarning = a})

-- | [Output Only] A list of disks contained in this scope.
dslDisks :: Lens' DisksScopedList [Disk]
dslDisks
  = lens _dslDisks (\ s a -> s{_dslDisks = a}) .
      _Default
      . _Coerce

instance FromJSON DisksScopedList where
        parseJSON
          = withObject "DisksScopedList"
              (\ o ->
                 DisksScopedList' <$>
                   (o .:? "warning") <*> (o .:? "disks" .!= mempty))

instance ToJSON DisksScopedList where
        toJSON DisksScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _dslWarning,
                  ("disks" .=) <$> _dslDisks])

--
-- /See:/ 'interconnectLocationListWarningDataItem' smart constructor.
data InterconnectLocationListWarningDataItem = InterconnectLocationListWarningDataItem'
    { _illwdiValue :: !(Maybe Text)
    , _illwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectLocationListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'illwdiValue'
--
-- * 'illwdiKey'
interconnectLocationListWarningDataItem
    :: InterconnectLocationListWarningDataItem
interconnectLocationListWarningDataItem =
    InterconnectLocationListWarningDataItem'
    { _illwdiValue = Nothing
    , _illwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
illwdiValue :: Lens' InterconnectLocationListWarningDataItem (Maybe Text)
illwdiValue
  = lens _illwdiValue (\ s a -> s{_illwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
illwdiKey :: Lens' InterconnectLocationListWarningDataItem (Maybe Text)
illwdiKey
  = lens _illwdiKey (\ s a -> s{_illwdiKey = a})

instance FromJSON
         InterconnectLocationListWarningDataItem where
        parseJSON
          = withObject
              "InterconnectLocationListWarningDataItem"
              (\ o ->
                 InterconnectLocationListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InterconnectLocationListWarningDataItem where
        toJSON InterconnectLocationListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _illwdiValue,
                  ("key" .=) <$> _illwdiKey])

--
-- /See:/ 'instanceGroupManagersScopedList' smart constructor.
data InstanceGroupManagersScopedList = InstanceGroupManagersScopedList'
    { _igmslWarning               :: !(Maybe InstanceGroupManagersScopedListWarning)
    , _igmslInstanceGroupManagers :: !(Maybe [InstanceGroupManager])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmslWarning'
--
-- * 'igmslInstanceGroupManagers'
instanceGroupManagersScopedList
    :: InstanceGroupManagersScopedList
instanceGroupManagersScopedList =
    InstanceGroupManagersScopedList'
    { _igmslWarning = Nothing
    , _igmslInstanceGroupManagers = Nothing
    }

-- | [Output Only] The warning that replaces the list of managed instance
-- groups when the list is empty.
igmslWarning :: Lens' InstanceGroupManagersScopedList (Maybe InstanceGroupManagersScopedListWarning)
igmslWarning
  = lens _igmslWarning (\ s a -> s{_igmslWarning = a})

-- | [Output Only] The list of managed instance groups that are contained in
-- the specified project and zone.
igmslInstanceGroupManagers :: Lens' InstanceGroupManagersScopedList [InstanceGroupManager]
igmslInstanceGroupManagers
  = lens _igmslInstanceGroupManagers
      (\ s a -> s{_igmslInstanceGroupManagers = a})
      . _Default
      . _Coerce

instance FromJSON InstanceGroupManagersScopedList
         where
        parseJSON
          = withObject "InstanceGroupManagersScopedList"
              (\ o ->
                 InstanceGroupManagersScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "instanceGroupManagers" .!= mempty))

instance ToJSON InstanceGroupManagersScopedList where
        toJSON InstanceGroupManagersScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _igmslWarning,
                  ("instanceGroupManagers" .=) <$>
                    _igmslInstanceGroupManagers])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'subnetworkListWarning' smart constructor.
data SubnetworkListWarning = SubnetworkListWarning'
    { _slwData    :: !(Maybe [SubnetworkListWarningDataItem])
    , _slwCode    :: !(Maybe SubnetworkListWarningCode)
    , _slwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworkListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'slwData'
--
-- * 'slwCode'
--
-- * 'slwMessage'
subnetworkListWarning
    :: SubnetworkListWarning
subnetworkListWarning =
    SubnetworkListWarning'
    { _slwData = Nothing
    , _slwCode = Nothing
    , _slwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
slwData :: Lens' SubnetworkListWarning [SubnetworkListWarningDataItem]
slwData
  = lens _slwData (\ s a -> s{_slwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
slwCode :: Lens' SubnetworkListWarning (Maybe SubnetworkListWarningCode)
slwCode = lens _slwCode (\ s a -> s{_slwCode = a})

-- | [Output Only] A human-readable description of the warning code.
slwMessage :: Lens' SubnetworkListWarning (Maybe Text)
slwMessage
  = lens _slwMessage (\ s a -> s{_slwMessage = a})

instance FromJSON SubnetworkListWarning where
        parseJSON
          = withObject "SubnetworkListWarning"
              (\ o ->
                 SubnetworkListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON SubnetworkListWarning where
        toJSON SubnetworkListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _slwData, ("code" .=) <$> _slwCode,
                  ("message" .=) <$> _slwMessage])

-- | An HealthCheck resource. This resource defines a template for how
-- individual virtual machines should be checked for health, via one of the
-- supported protocols.
--
-- /See:/ 'healthCheck' smart constructor.
data HealthCheck = HealthCheck'
    { _hcHealthyThreshold   :: !(Maybe (Textual Int32))
    , _hcTCPHealthCheck     :: !(Maybe TCPHealthCheck)
    , _hcKind               :: !Text
    , _hcSSLHealthCheck     :: !(Maybe SSLHealthCheck)
    , _hcSelfLink           :: !(Maybe Text)
    , _hcCheckIntervalSec   :: !(Maybe (Textual Int32))
    , _hcName               :: !(Maybe Text)
    , _hcCreationTimestamp  :: !(Maybe Text)
    , _hcHTTPHealthCheck    :: !(Maybe HTTPHealthCheck)
    , _hcId                 :: !(Maybe (Textual Word64))
    , _hcType               :: !(Maybe HealthCheckType)
    , _hcTimeoutSec         :: !(Maybe (Textual Int32))
    , _hcDescription        :: !(Maybe Text)
    , _hcUnhealthyThreshold :: !(Maybe (Textual Int32))
    , _hcHTTPSHealthCheck   :: !(Maybe HTTPSHealthCheck)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HealthCheck' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hcHealthyThreshold'
--
-- * 'hcTCPHealthCheck'
--
-- * 'hcKind'
--
-- * 'hcSSLHealthCheck'
--
-- * 'hcSelfLink'
--
-- * 'hcCheckIntervalSec'
--
-- * 'hcName'
--
-- * 'hcCreationTimestamp'
--
-- * 'hcHTTPHealthCheck'
--
-- * 'hcId'
--
-- * 'hcType'
--
-- * 'hcTimeoutSec'
--
-- * 'hcDescription'
--
-- * 'hcUnhealthyThreshold'
--
-- * 'hcHTTPSHealthCheck'
healthCheck
    :: HealthCheck
healthCheck =
    HealthCheck'
    { _hcHealthyThreshold = Nothing
    , _hcTCPHealthCheck = Nothing
    , _hcKind = "compute#healthCheck"
    , _hcSSLHealthCheck = Nothing
    , _hcSelfLink = Nothing
    , _hcCheckIntervalSec = Nothing
    , _hcName = Nothing
    , _hcCreationTimestamp = Nothing
    , _hcHTTPHealthCheck = Nothing
    , _hcId = Nothing
    , _hcType = Nothing
    , _hcTimeoutSec = Nothing
    , _hcDescription = Nothing
    , _hcUnhealthyThreshold = Nothing
    , _hcHTTPSHealthCheck = Nothing
    }

-- | A so-far unhealthy instance will be marked healthy after this many
-- consecutive successes. The default value is 2.
hcHealthyThreshold :: Lens' HealthCheck (Maybe Int32)
hcHealthyThreshold
  = lens _hcHealthyThreshold
      (\ s a -> s{_hcHealthyThreshold = a})
      . mapping _Coerce

hcTCPHealthCheck :: Lens' HealthCheck (Maybe TCPHealthCheck)
hcTCPHealthCheck
  = lens _hcTCPHealthCheck
      (\ s a -> s{_hcTCPHealthCheck = a})

-- | Type of the resource.
hcKind :: Lens' HealthCheck Text
hcKind = lens _hcKind (\ s a -> s{_hcKind = a})

hcSSLHealthCheck :: Lens' HealthCheck (Maybe SSLHealthCheck)
hcSSLHealthCheck
  = lens _hcSSLHealthCheck
      (\ s a -> s{_hcSSLHealthCheck = a})

-- | [Output Only] Server-defined URL for the resource.
hcSelfLink :: Lens' HealthCheck (Maybe Text)
hcSelfLink
  = lens _hcSelfLink (\ s a -> s{_hcSelfLink = a})

-- | How often (in seconds) to send a health check. The default value is 5
-- seconds.
hcCheckIntervalSec :: Lens' HealthCheck (Maybe Int32)
hcCheckIntervalSec
  = lens _hcCheckIntervalSec
      (\ s a -> s{_hcCheckIntervalSec = a})
      . mapping _Coerce

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
hcName :: Lens' HealthCheck (Maybe Text)
hcName = lens _hcName (\ s a -> s{_hcName = a})

-- | [Output Only] Creation timestamp in 3339 text format.
hcCreationTimestamp :: Lens' HealthCheck (Maybe Text)
hcCreationTimestamp
  = lens _hcCreationTimestamp
      (\ s a -> s{_hcCreationTimestamp = a})

hcHTTPHealthCheck :: Lens' HealthCheck (Maybe HTTPHealthCheck)
hcHTTPHealthCheck
  = lens _hcHTTPHealthCheck
      (\ s a -> s{_hcHTTPHealthCheck = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
hcId :: Lens' HealthCheck (Maybe Word64)
hcId
  = lens _hcId (\ s a -> s{_hcId = a}) .
      mapping _Coerce

-- | Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS.
-- If not specified, the default is TCP. Exactly one of the
-- protocol-specific health check field must be specified, which must match
-- type field.
hcType :: Lens' HealthCheck (Maybe HealthCheckType)
hcType = lens _hcType (\ s a -> s{_hcType = a})

-- | How long (in seconds) to wait before claiming failure. The default value
-- is 5 seconds. It is invalid for timeoutSec to have greater value than
-- checkIntervalSec.
hcTimeoutSec :: Lens' HealthCheck (Maybe Int32)
hcTimeoutSec
  = lens _hcTimeoutSec (\ s a -> s{_hcTimeoutSec = a})
      . mapping _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
hcDescription :: Lens' HealthCheck (Maybe Text)
hcDescription
  = lens _hcDescription
      (\ s a -> s{_hcDescription = a})

-- | A so-far healthy instance will be marked unhealthy after this many
-- consecutive failures. The default value is 2.
hcUnhealthyThreshold :: Lens' HealthCheck (Maybe Int32)
hcUnhealthyThreshold
  = lens _hcUnhealthyThreshold
      (\ s a -> s{_hcUnhealthyThreshold = a})
      . mapping _Coerce

hcHTTPSHealthCheck :: Lens' HealthCheck (Maybe HTTPSHealthCheck)
hcHTTPSHealthCheck
  = lens _hcHTTPSHealthCheck
      (\ s a -> s{_hcHTTPSHealthCheck = a})

instance FromJSON HealthCheck where
        parseJSON
          = withObject "HealthCheck"
              (\ o ->
                 HealthCheck' <$>
                   (o .:? "healthyThreshold") <*>
                     (o .:? "tcpHealthCheck")
                     <*> (o .:? "kind" .!= "compute#healthCheck")
                     <*> (o .:? "sslHealthCheck")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "checkIntervalSec")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "httpHealthCheck")
                     <*> (o .:? "id")
                     <*> (o .:? "type")
                     <*> (o .:? "timeoutSec")
                     <*> (o .:? "description")
                     <*> (o .:? "unhealthyThreshold")
                     <*> (o .:? "httpsHealthCheck"))

instance ToJSON HealthCheck where
        toJSON HealthCheck'{..}
          = object
              (catMaybes
                 [("healthyThreshold" .=) <$> _hcHealthyThreshold,
                  ("tcpHealthCheck" .=) <$> _hcTCPHealthCheck,
                  Just ("kind" .= _hcKind),
                  ("sslHealthCheck" .=) <$> _hcSSLHealthCheck,
                  ("selfLink" .=) <$> _hcSelfLink,
                  ("checkIntervalSec" .=) <$> _hcCheckIntervalSec,
                  ("name" .=) <$> _hcName,
                  ("creationTimestamp" .=) <$> _hcCreationTimestamp,
                  ("httpHealthCheck" .=) <$> _hcHTTPHealthCheck,
                  ("id" .=) <$> _hcId, ("type" .=) <$> _hcType,
                  ("timeoutSec" .=) <$> _hcTimeoutSec,
                  ("description" .=) <$> _hcDescription,
                  ("unhealthyThreshold" .=) <$> _hcUnhealthyThreshold,
                  ("httpsHealthCheck" .=) <$> _hcHTTPSHealthCheck])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'hTTPHealthCheckListWarning' smart constructor.
data HTTPHealthCheckListWarning = HTTPHealthCheckListWarning'
    { _httphclwData    :: !(Maybe [HTTPHealthCheckListWarningDataItem])
    , _httphclwCode    :: !(Maybe HTTPHealthCheckListWarningCode)
    , _httphclwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HTTPHealthCheckListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'httphclwData'
--
-- * 'httphclwCode'
--
-- * 'httphclwMessage'
hTTPHealthCheckListWarning
    :: HTTPHealthCheckListWarning
hTTPHealthCheckListWarning =
    HTTPHealthCheckListWarning'
    { _httphclwData = Nothing
    , _httphclwCode = Nothing
    , _httphclwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
httphclwData :: Lens' HTTPHealthCheckListWarning [HTTPHealthCheckListWarningDataItem]
httphclwData
  = lens _httphclwData (\ s a -> s{_httphclwData = a})
      . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
httphclwCode :: Lens' HTTPHealthCheckListWarning (Maybe HTTPHealthCheckListWarningCode)
httphclwCode
  = lens _httphclwCode (\ s a -> s{_httphclwCode = a})

-- | [Output Only] A human-readable description of the warning code.
httphclwMessage :: Lens' HTTPHealthCheckListWarning (Maybe Text)
httphclwMessage
  = lens _httphclwMessage
      (\ s a -> s{_httphclwMessage = a})

instance FromJSON HTTPHealthCheckListWarning where
        parseJSON
          = withObject "HTTPHealthCheckListWarning"
              (\ o ->
                 HTTPHealthCheckListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON HTTPHealthCheckListWarning where
        toJSON HTTPHealthCheckListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _httphclwData,
                  ("code" .=) <$> _httphclwCode,
                  ("message" .=) <$> _httphclwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'sslPoliciesListWarning' smart constructor.
data SSLPoliciesListWarning = SSLPoliciesListWarning'
    { _splwData    :: !(Maybe [SSLPoliciesListWarningDataItem])
    , _splwCode    :: !(Maybe SSLPoliciesListWarningCode)
    , _splwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLPoliciesListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'splwData'
--
-- * 'splwCode'
--
-- * 'splwMessage'
sslPoliciesListWarning
    :: SSLPoliciesListWarning
sslPoliciesListWarning =
    SSLPoliciesListWarning'
    { _splwData = Nothing
    , _splwCode = Nothing
    , _splwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
splwData :: Lens' SSLPoliciesListWarning [SSLPoliciesListWarningDataItem]
splwData
  = lens _splwData (\ s a -> s{_splwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
splwCode :: Lens' SSLPoliciesListWarning (Maybe SSLPoliciesListWarningCode)
splwCode = lens _splwCode (\ s a -> s{_splwCode = a})

-- | [Output Only] A human-readable description of the warning code.
splwMessage :: Lens' SSLPoliciesListWarning (Maybe Text)
splwMessage
  = lens _splwMessage (\ s a -> s{_splwMessage = a})

instance FromJSON SSLPoliciesListWarning where
        parseJSON
          = withObject "SSLPoliciesListWarning"
              (\ o ->
                 SSLPoliciesListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON SSLPoliciesListWarning where
        toJSON SSLPoliciesListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _splwData,
                  ("code" .=) <$> _splwCode,
                  ("message" .=) <$> _splwMessage])

-- | A list of CommitmentsScopedList resources.
--
-- /See:/ 'commitmentAggregatedListItems' smart constructor.
newtype CommitmentAggregatedListItems = CommitmentAggregatedListItems'
    { _caliAddtional :: HashMap Text CommitmentsScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'caliAddtional'
commitmentAggregatedListItems
    :: HashMap Text CommitmentsScopedList -- ^ 'caliAddtional'
    -> CommitmentAggregatedListItems
commitmentAggregatedListItems pCaliAddtional_ =
    CommitmentAggregatedListItems'
    { _caliAddtional = _Coerce # pCaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of commitments.
caliAddtional :: Lens' CommitmentAggregatedListItems (HashMap Text CommitmentsScopedList)
caliAddtional
  = lens _caliAddtional
      (\ s a -> s{_caliAddtional = a})
      . _Coerce

instance FromJSON CommitmentAggregatedListItems where
        parseJSON
          = withObject "CommitmentAggregatedListItems"
              (\ o ->
                 CommitmentAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON CommitmentAggregatedListItems where
        toJSON = toJSON . _caliAddtional

--
-- /See:/ 'diskAggregatedList' smart constructor.
data DiskAggregatedList = DiskAggregatedList'
    { _dalNextPageToken :: !(Maybe Text)
    , _dalKind          :: !Text
    , _dalItems         :: !(Maybe DiskAggregatedListItems)
    , _dalSelfLink      :: !(Maybe Text)
    , _dalWarning       :: !(Maybe DiskAggregatedListWarning)
    , _dalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dalNextPageToken'
--
-- * 'dalKind'
--
-- * 'dalItems'
--
-- * 'dalSelfLink'
--
-- * 'dalWarning'
--
-- * 'dalId'
diskAggregatedList
    :: DiskAggregatedList
diskAggregatedList =
    DiskAggregatedList'
    { _dalNextPageToken = Nothing
    , _dalKind = "compute#diskAggregatedList"
    , _dalItems = Nothing
    , _dalSelfLink = Nothing
    , _dalWarning = Nothing
    , _dalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
dalNextPageToken :: Lens' DiskAggregatedList (Maybe Text)
dalNextPageToken
  = lens _dalNextPageToken
      (\ s a -> s{_dalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#diskAggregatedList for
-- aggregated lists of persistent disks.
dalKind :: Lens' DiskAggregatedList Text
dalKind = lens _dalKind (\ s a -> s{_dalKind = a})

-- | A list of DisksScopedList resources.
dalItems :: Lens' DiskAggregatedList (Maybe DiskAggregatedListItems)
dalItems = lens _dalItems (\ s a -> s{_dalItems = a})

-- | [Output Only] Server-defined URL for this resource.
dalSelfLink :: Lens' DiskAggregatedList (Maybe Text)
dalSelfLink
  = lens _dalSelfLink (\ s a -> s{_dalSelfLink = a})

-- | [Output Only] Informational warning message.
dalWarning :: Lens' DiskAggregatedList (Maybe DiskAggregatedListWarning)
dalWarning
  = lens _dalWarning (\ s a -> s{_dalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
dalId :: Lens' DiskAggregatedList (Maybe Text)
dalId = lens _dalId (\ s a -> s{_dalId = a})

instance FromJSON DiskAggregatedList where
        parseJSON
          = withObject "DiskAggregatedList"
              (\ o ->
                 DiskAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#diskAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON DiskAggregatedList where
        toJSON DiskAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _dalNextPageToken,
                  Just ("kind" .= _dalKind),
                  ("items" .=) <$> _dalItems,
                  ("selfLink" .=) <$> _dalSelfLink,
                  ("warning" .=) <$> _dalWarning,
                  ("id" .=) <$> _dalId])

--
-- /See:/ 'instanceGroupsListInstancesWarningDataItem' smart constructor.
data InstanceGroupsListInstancesWarningDataItem = InstanceGroupsListInstancesWarningDataItem'
    { _igliwdiValue :: !(Maybe Text)
    , _igliwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsListInstancesWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igliwdiValue'
--
-- * 'igliwdiKey'
instanceGroupsListInstancesWarningDataItem
    :: InstanceGroupsListInstancesWarningDataItem
instanceGroupsListInstancesWarningDataItem =
    InstanceGroupsListInstancesWarningDataItem'
    { _igliwdiValue = Nothing
    , _igliwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
igliwdiValue :: Lens' InstanceGroupsListInstancesWarningDataItem (Maybe Text)
igliwdiValue
  = lens _igliwdiValue (\ s a -> s{_igliwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
igliwdiKey :: Lens' InstanceGroupsListInstancesWarningDataItem (Maybe Text)
igliwdiKey
  = lens _igliwdiKey (\ s a -> s{_igliwdiKey = a})

instance FromJSON
         InstanceGroupsListInstancesWarningDataItem where
        parseJSON
          = withObject
              "InstanceGroupsListInstancesWarningDataItem"
              (\ o ->
                 InstanceGroupsListInstancesWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InstanceGroupsListInstancesWarningDataItem where
        toJSON
          InstanceGroupsListInstancesWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _igliwdiValue,
                  ("key" .=) <$> _igliwdiKey])

--
-- /See:/ 'instanceWithNamedPorts' smart constructor.
data InstanceWithNamedPorts = InstanceWithNamedPorts'
    { _iwnpStatus     :: !(Maybe InstanceWithNamedPortsStatus)
    , _iwnpNamedPorts :: !(Maybe [NamedPort])
    , _iwnpInstance   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceWithNamedPorts' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iwnpStatus'
--
-- * 'iwnpNamedPorts'
--
-- * 'iwnpInstance'
instanceWithNamedPorts
    :: InstanceWithNamedPorts
instanceWithNamedPorts =
    InstanceWithNamedPorts'
    { _iwnpStatus = Nothing
    , _iwnpNamedPorts = Nothing
    , _iwnpInstance = Nothing
    }

-- | [Output Only] The status of the instance.
iwnpStatus :: Lens' InstanceWithNamedPorts (Maybe InstanceWithNamedPortsStatus)
iwnpStatus
  = lens _iwnpStatus (\ s a -> s{_iwnpStatus = a})

-- | [Output Only] The named ports that belong to this instance group.
iwnpNamedPorts :: Lens' InstanceWithNamedPorts [NamedPort]
iwnpNamedPorts
  = lens _iwnpNamedPorts
      (\ s a -> s{_iwnpNamedPorts = a})
      . _Default
      . _Coerce

-- | [Output Only] The URL of the instance.
iwnpInstance :: Lens' InstanceWithNamedPorts (Maybe Text)
iwnpInstance
  = lens _iwnpInstance (\ s a -> s{_iwnpInstance = a})

instance FromJSON InstanceWithNamedPorts where
        parseJSON
          = withObject "InstanceWithNamedPorts"
              (\ o ->
                 InstanceWithNamedPorts' <$>
                   (o .:? "status") <*> (o .:? "namedPorts" .!= mempty)
                     <*> (o .:? "instance"))

instance ToJSON InstanceWithNamedPorts where
        toJSON InstanceWithNamedPorts'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _iwnpStatus,
                  ("namedPorts" .=) <$> _iwnpNamedPorts,
                  ("instance" .=) <$> _iwnpInstance])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'interconnectListWarning' smart constructor.
data InterconnectListWarning = InterconnectListWarning'
    { _iData    :: !(Maybe [InterconnectListWarningDataItem])
    , _iCode    :: !(Maybe InterconnectListWarningCode)
    , _iMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iData'
--
-- * 'iCode'
--
-- * 'iMessage'
interconnectListWarning
    :: InterconnectListWarning
interconnectListWarning =
    InterconnectListWarning'
    { _iData = Nothing
    , _iCode = Nothing
    , _iMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
iData :: Lens' InterconnectListWarning [InterconnectListWarningDataItem]
iData
  = lens _iData (\ s a -> s{_iData = a}) . _Default .
      _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
iCode :: Lens' InterconnectListWarning (Maybe InterconnectListWarningCode)
iCode = lens _iCode (\ s a -> s{_iCode = a})

-- | [Output Only] A human-readable description of the warning code.
iMessage :: Lens' InterconnectListWarning (Maybe Text)
iMessage = lens _iMessage (\ s a -> s{_iMessage = a})

instance FromJSON InterconnectListWarning where
        parseJSON
          = withObject "InterconnectListWarning"
              (\ o ->
                 InterconnectListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InterconnectListWarning where
        toJSON InterconnectListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _iData, ("code" .=) <$> _iCode,
                  ("message" .=) <$> _iMessage])

--
-- /See:/ 'forwardingRulesScopedList' smart constructor.
data ForwardingRulesScopedList = ForwardingRulesScopedList'
    { _frslWarning         :: !(Maybe ForwardingRulesScopedListWarning)
    , _frslForwardingRules :: !(Maybe [ForwardingRule])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRulesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'frslWarning'
--
-- * 'frslForwardingRules'
forwardingRulesScopedList
    :: ForwardingRulesScopedList
forwardingRulesScopedList =
    ForwardingRulesScopedList'
    { _frslWarning = Nothing
    , _frslForwardingRules = Nothing
    }

-- | Informational warning which replaces the list of forwarding rules when
-- the list is empty.
frslWarning :: Lens' ForwardingRulesScopedList (Maybe ForwardingRulesScopedListWarning)
frslWarning
  = lens _frslWarning (\ s a -> s{_frslWarning = a})

-- | A list of forwarding rules contained in this scope.
frslForwardingRules :: Lens' ForwardingRulesScopedList [ForwardingRule]
frslForwardingRules
  = lens _frslForwardingRules
      (\ s a -> s{_frslForwardingRules = a})
      . _Default
      . _Coerce

instance FromJSON ForwardingRulesScopedList where
        parseJSON
          = withObject "ForwardingRulesScopedList"
              (\ o ->
                 ForwardingRulesScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "forwardingRules" .!= mempty))

instance ToJSON ForwardingRulesScopedList where
        toJSON ForwardingRulesScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _frslWarning,
                  ("forwardingRules" .=) <$> _frslForwardingRules])

--
-- /See:/ 'instanceReference' smart constructor.
newtype InstanceReference = InstanceReference'
    { _iInstance :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iInstance'
instanceReference
    :: InstanceReference
instanceReference =
    InstanceReference'
    { _iInstance = Nothing
    }

-- | The URL for a specific instance.
iInstance :: Lens' InstanceReference (Maybe Text)
iInstance
  = lens _iInstance (\ s a -> s{_iInstance = a})

instance FromJSON InstanceReference where
        parseJSON
          = withObject "InstanceReference"
              (\ o -> InstanceReference' <$> (o .:? "instance"))

instance ToJSON InstanceReference where
        toJSON InstanceReference'{..}
          = object (catMaybes [("instance" .=) <$> _iInstance])

--
-- /See:/ 'operationAggregatedList' smart constructor.
data OperationAggregatedList = OperationAggregatedList'
    { _oalNextPageToken :: !(Maybe Text)
    , _oalKind          :: !Text
    , _oalItems         :: !(Maybe OperationAggregatedListItems)
    , _oalSelfLink      :: !(Maybe Text)
    , _oalWarning       :: !(Maybe OperationAggregatedListWarning)
    , _oalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oalNextPageToken'
--
-- * 'oalKind'
--
-- * 'oalItems'
--
-- * 'oalSelfLink'
--
-- * 'oalWarning'
--
-- * 'oalId'
operationAggregatedList
    :: OperationAggregatedList
operationAggregatedList =
    OperationAggregatedList'
    { _oalNextPageToken = Nothing
    , _oalKind = "compute#operationAggregatedList"
    , _oalItems = Nothing
    , _oalSelfLink = Nothing
    , _oalWarning = Nothing
    , _oalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
oalNextPageToken :: Lens' OperationAggregatedList (Maybe Text)
oalNextPageToken
  = lens _oalNextPageToken
      (\ s a -> s{_oalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#operationAggregatedList
-- for aggregated lists of operations.
oalKind :: Lens' OperationAggregatedList Text
oalKind = lens _oalKind (\ s a -> s{_oalKind = a})

-- | [Output Only] A map of scoped operation lists.
oalItems :: Lens' OperationAggregatedList (Maybe OperationAggregatedListItems)
oalItems = lens _oalItems (\ s a -> s{_oalItems = a})

-- | [Output Only] Server-defined URL for this resource.
oalSelfLink :: Lens' OperationAggregatedList (Maybe Text)
oalSelfLink
  = lens _oalSelfLink (\ s a -> s{_oalSelfLink = a})

-- | [Output Only] Informational warning message.
oalWarning :: Lens' OperationAggregatedList (Maybe OperationAggregatedListWarning)
oalWarning
  = lens _oalWarning (\ s a -> s{_oalWarning = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
oalId :: Lens' OperationAggregatedList (Maybe Text)
oalId = lens _oalId (\ s a -> s{_oalId = a})

instance FromJSON OperationAggregatedList where
        parseJSON
          = withObject "OperationAggregatedList"
              (\ o ->
                 OperationAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#operationAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON OperationAggregatedList where
        toJSON OperationAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _oalNextPageToken,
                  Just ("kind" .= _oalKind),
                  ("items" .=) <$> _oalItems,
                  ("selfLink" .=) <$> _oalSelfLink,
                  ("warning" .=) <$> _oalWarning,
                  ("id" .=) <$> _oalId])

--
-- /See:/ 'operationsScopedList' smart constructor.
data OperationsScopedList = OperationsScopedList'
    { _oslWarning    :: !(Maybe OperationsScopedListWarning)
    , _oslOperations :: !(Maybe [Operation])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationsScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oslWarning'
--
-- * 'oslOperations'
operationsScopedList
    :: OperationsScopedList
operationsScopedList =
    OperationsScopedList'
    { _oslWarning = Nothing
    , _oslOperations = Nothing
    }

-- | [Output Only] Informational warning which replaces the list of
-- operations when the list is empty.
oslWarning :: Lens' OperationsScopedList (Maybe OperationsScopedListWarning)
oslWarning
  = lens _oslWarning (\ s a -> s{_oslWarning = a})

-- | [Output Only] A list of operations contained in this scope.
oslOperations :: Lens' OperationsScopedList [Operation]
oslOperations
  = lens _oslOperations
      (\ s a -> s{_oslOperations = a})
      . _Default
      . _Coerce

instance FromJSON OperationsScopedList where
        parseJSON
          = withObject "OperationsScopedList"
              (\ o ->
                 OperationsScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "operations" .!= mempty))

instance ToJSON OperationsScopedList where
        toJSON OperationsScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _oslWarning,
                  ("operations" .=) <$> _oslOperations])

-- | The named port. For example: .
--
-- /See:/ 'namedPort' smart constructor.
data NamedPort = NamedPort'
    { _npName :: !(Maybe Text)
    , _npPort :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NamedPort' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'npName'
--
-- * 'npPort'
namedPort
    :: NamedPort
namedPort =
    NamedPort'
    { _npName = Nothing
    , _npPort = Nothing
    }

-- | The name for this named port. The name must be 1-63 characters long, and
-- comply with RFC1035.
npName :: Lens' NamedPort (Maybe Text)
npName = lens _npName (\ s a -> s{_npName = a})

-- | The port number, which can be a value between 1 and 65535.
npPort :: Lens' NamedPort (Maybe Int32)
npPort
  = lens _npPort (\ s a -> s{_npPort = a}) .
      mapping _Coerce

instance FromJSON NamedPort where
        parseJSON
          = withObject "NamedPort"
              (\ o ->
                 NamedPort' <$> (o .:? "name") <*> (o .:? "port"))

instance ToJSON NamedPort where
        toJSON NamedPort'{..}
          = object
              (catMaybes
                 [("name" .=) <$> _npName, ("port" .=) <$> _npPort])

--
-- /See:/ 'subnetworkAggregatedListWarningDataItem' smart constructor.
data SubnetworkAggregatedListWarningDataItem = SubnetworkAggregatedListWarningDataItem'
    { _salwdiValue :: !(Maybe Text)
    , _salwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworkAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'salwdiValue'
--
-- * 'salwdiKey'
subnetworkAggregatedListWarningDataItem
    :: SubnetworkAggregatedListWarningDataItem
subnetworkAggregatedListWarningDataItem =
    SubnetworkAggregatedListWarningDataItem'
    { _salwdiValue = Nothing
    , _salwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
salwdiValue :: Lens' SubnetworkAggregatedListWarningDataItem (Maybe Text)
salwdiValue
  = lens _salwdiValue (\ s a -> s{_salwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
salwdiKey :: Lens' SubnetworkAggregatedListWarningDataItem (Maybe Text)
salwdiKey
  = lens _salwdiKey (\ s a -> s{_salwdiKey = a})

instance FromJSON
         SubnetworkAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "SubnetworkAggregatedListWarningDataItem"
              (\ o ->
                 SubnetworkAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         SubnetworkAggregatedListWarningDataItem where
        toJSON SubnetworkAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _salwdiValue,
                  ("key" .=) <$> _salwdiKey])

--
-- /See:/ 'interconnectDiagnosticsLinkStatus' smart constructor.
data InterconnectDiagnosticsLinkStatus = InterconnectDiagnosticsLinkStatus'
    { _idlsLacpStatus               :: !(Maybe InterconnectDiagnosticsLinkLACPStatus)
    , _idlsReceivingOpticalPower    :: !(Maybe InterconnectDiagnosticsLinkOpticalPower)
    , _idlsGoogleDemarc             :: !(Maybe Text)
    , _idlsCircuitId                :: !(Maybe Text)
    , _idlsArpCaches                :: !(Maybe [InterconnectDiagnosticsARPEntry])
    , _idlsTransmittingOpticalPower :: !(Maybe InterconnectDiagnosticsLinkOpticalPower)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectDiagnosticsLinkStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'idlsLacpStatus'
--
-- * 'idlsReceivingOpticalPower'
--
-- * 'idlsGoogleDemarc'
--
-- * 'idlsCircuitId'
--
-- * 'idlsArpCaches'
--
-- * 'idlsTransmittingOpticalPower'
interconnectDiagnosticsLinkStatus
    :: InterconnectDiagnosticsLinkStatus
interconnectDiagnosticsLinkStatus =
    InterconnectDiagnosticsLinkStatus'
    { _idlsLacpStatus = Nothing
    , _idlsReceivingOpticalPower = Nothing
    , _idlsGoogleDemarc = Nothing
    , _idlsCircuitId = Nothing
    , _idlsArpCaches = Nothing
    , _idlsTransmittingOpticalPower = Nothing
    }

idlsLacpStatus :: Lens' InterconnectDiagnosticsLinkStatus (Maybe InterconnectDiagnosticsLinkLACPStatus)
idlsLacpStatus
  = lens _idlsLacpStatus
      (\ s a -> s{_idlsLacpStatus = a})

idlsReceivingOpticalPower :: Lens' InterconnectDiagnosticsLinkStatus (Maybe InterconnectDiagnosticsLinkOpticalPower)
idlsReceivingOpticalPower
  = lens _idlsReceivingOpticalPower
      (\ s a -> s{_idlsReceivingOpticalPower = a})

-- | The Demarc address assigned by Google and provided in the LoA.
idlsGoogleDemarc :: Lens' InterconnectDiagnosticsLinkStatus (Maybe Text)
idlsGoogleDemarc
  = lens _idlsGoogleDemarc
      (\ s a -> s{_idlsGoogleDemarc = a})

-- | The unique ID for this link assigned during turn up by Google.
idlsCircuitId :: Lens' InterconnectDiagnosticsLinkStatus (Maybe Text)
idlsCircuitId
  = lens _idlsCircuitId
      (\ s a -> s{_idlsCircuitId = a})

-- | A list of InterconnectDiagnostics.ARPEntry objects, describing the ARP
-- neighbor entries seen on this link. This will be empty if the link is
-- bundled
idlsArpCaches :: Lens' InterconnectDiagnosticsLinkStatus [InterconnectDiagnosticsARPEntry]
idlsArpCaches
  = lens _idlsArpCaches
      (\ s a -> s{_idlsArpCaches = a})
      . _Default
      . _Coerce

idlsTransmittingOpticalPower :: Lens' InterconnectDiagnosticsLinkStatus (Maybe InterconnectDiagnosticsLinkOpticalPower)
idlsTransmittingOpticalPower
  = lens _idlsTransmittingOpticalPower
      (\ s a -> s{_idlsTransmittingOpticalPower = a})

instance FromJSON InterconnectDiagnosticsLinkStatus
         where
        parseJSON
          = withObject "InterconnectDiagnosticsLinkStatus"
              (\ o ->
                 InterconnectDiagnosticsLinkStatus' <$>
                   (o .:? "lacpStatus") <*>
                     (o .:? "receivingOpticalPower")
                     <*> (o .:? "googleDemarc")
                     <*> (o .:? "circuitId")
                     <*> (o .:? "arpCaches" .!= mempty)
                     <*> (o .:? "transmittingOpticalPower"))

instance ToJSON InterconnectDiagnosticsLinkStatus
         where
        toJSON InterconnectDiagnosticsLinkStatus'{..}
          = object
              (catMaybes
                 [("lacpStatus" .=) <$> _idlsLacpStatus,
                  ("receivingOpticalPower" .=) <$>
                    _idlsReceivingOpticalPower,
                  ("googleDemarc" .=) <$> _idlsGoogleDemarc,
                  ("circuitId" .=) <$> _idlsCircuitId,
                  ("arpCaches" .=) <$> _idlsArpCaches,
                  ("transmittingOpticalPower" .=) <$>
                    _idlsTransmittingOpticalPower])

-- | Contains a list of TargetInstance resources.
--
-- /See:/ 'targetInstanceList' smart constructor.
data TargetInstanceList = TargetInstanceList'
    { _tilNextPageToken :: !(Maybe Text)
    , _tilKind          :: !Text
    , _tilItems         :: !(Maybe [TargetInstance])
    , _tilSelfLink      :: !(Maybe Text)
    , _tilWarning       :: !(Maybe TargetInstanceListWarning)
    , _tilId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstanceList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tilNextPageToken'
--
-- * 'tilKind'
--
-- * 'tilItems'
--
-- * 'tilSelfLink'
--
-- * 'tilWarning'
--
-- * 'tilId'
targetInstanceList
    :: TargetInstanceList
targetInstanceList =
    TargetInstanceList'
    { _tilNextPageToken = Nothing
    , _tilKind = "compute#targetInstanceList"
    , _tilItems = Nothing
    , _tilSelfLink = Nothing
    , _tilWarning = Nothing
    , _tilId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
tilNextPageToken :: Lens' TargetInstanceList (Maybe Text)
tilNextPageToken
  = lens _tilNextPageToken
      (\ s a -> s{_tilNextPageToken = a})

-- | Type of resource.
tilKind :: Lens' TargetInstanceList Text
tilKind = lens _tilKind (\ s a -> s{_tilKind = a})

-- | A list of TargetInstance resources.
tilItems :: Lens' TargetInstanceList [TargetInstance]
tilItems
  = lens _tilItems (\ s a -> s{_tilItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
tilSelfLink :: Lens' TargetInstanceList (Maybe Text)
tilSelfLink
  = lens _tilSelfLink (\ s a -> s{_tilSelfLink = a})

-- | [Output Only] Informational warning message.
tilWarning :: Lens' TargetInstanceList (Maybe TargetInstanceListWarning)
tilWarning
  = lens _tilWarning (\ s a -> s{_tilWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
tilId :: Lens' TargetInstanceList (Maybe Text)
tilId = lens _tilId (\ s a -> s{_tilId = a})

instance FromJSON TargetInstanceList where
        parseJSON
          = withObject "TargetInstanceList"
              (\ o ->
                 TargetInstanceList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#targetInstanceList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetInstanceList where
        toJSON TargetInstanceList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _tilNextPageToken,
                  Just ("kind" .= _tilKind),
                  ("items" .=) <$> _tilItems,
                  ("selfLink" .=) <$> _tilSelfLink,
                  ("warning" .=) <$> _tilWarning,
                  ("id" .=) <$> _tilId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetTCPProxyListWarning' smart constructor.
data TargetTCPProxyListWarning = TargetTCPProxyListWarning'
    { _ttplwData    :: !(Maybe [TargetTCPProxyListWarningDataItem])
    , _ttplwCode    :: !(Maybe TargetTCPProxyListWarningCode)
    , _ttplwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetTCPProxyListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ttplwData'
--
-- * 'ttplwCode'
--
-- * 'ttplwMessage'
targetTCPProxyListWarning
    :: TargetTCPProxyListWarning
targetTCPProxyListWarning =
    TargetTCPProxyListWarning'
    { _ttplwData = Nothing
    , _ttplwCode = Nothing
    , _ttplwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ttplwData :: Lens' TargetTCPProxyListWarning [TargetTCPProxyListWarningDataItem]
ttplwData
  = lens _ttplwData (\ s a -> s{_ttplwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ttplwCode :: Lens' TargetTCPProxyListWarning (Maybe TargetTCPProxyListWarningCode)
ttplwCode
  = lens _ttplwCode (\ s a -> s{_ttplwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ttplwMessage :: Lens' TargetTCPProxyListWarning (Maybe Text)
ttplwMessage
  = lens _ttplwMessage (\ s a -> s{_ttplwMessage = a})

instance FromJSON TargetTCPProxyListWarning where
        parseJSON
          = withObject "TargetTCPProxyListWarning"
              (\ o ->
                 TargetTCPProxyListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetTCPProxyListWarning where
        toJSON TargetTCPProxyListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ttplwData,
                  ("code" .=) <$> _ttplwCode,
                  ("message" .=) <$> _ttplwMessage])

--
-- /See:/ 'instanceGroupManagerAggregatedList' smart constructor.
data InstanceGroupManagerAggregatedList = InstanceGroupManagerAggregatedList'
    { _igmalNextPageToken :: !(Maybe Text)
    , _igmalKind          :: !Text
    , _igmalItems         :: !(Maybe InstanceGroupManagerAggregatedListItems)
    , _igmalSelfLink      :: !(Maybe Text)
    , _igmalWarning       :: !(Maybe InstanceGroupManagerAggregatedListWarning)
    , _igmalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagerAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmalNextPageToken'
--
-- * 'igmalKind'
--
-- * 'igmalItems'
--
-- * 'igmalSelfLink'
--
-- * 'igmalWarning'
--
-- * 'igmalId'
instanceGroupManagerAggregatedList
    :: InstanceGroupManagerAggregatedList
instanceGroupManagerAggregatedList =
    InstanceGroupManagerAggregatedList'
    { _igmalNextPageToken = Nothing
    , _igmalKind = "compute#instanceGroupManagerAggregatedList"
    , _igmalItems = Nothing
    , _igmalSelfLink = Nothing
    , _igmalWarning = Nothing
    , _igmalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
igmalNextPageToken :: Lens' InstanceGroupManagerAggregatedList (Maybe Text)
igmalNextPageToken
  = lens _igmalNextPageToken
      (\ s a -> s{_igmalNextPageToken = a})

-- | [Output Only] The resource type, which is always
-- compute#instanceGroupManagerAggregatedList for an aggregated list of
-- managed instance groups.
igmalKind :: Lens' InstanceGroupManagerAggregatedList Text
igmalKind
  = lens _igmalKind (\ s a -> s{_igmalKind = a})

-- | A list of InstanceGroupManagersScopedList resources.
igmalItems :: Lens' InstanceGroupManagerAggregatedList (Maybe InstanceGroupManagerAggregatedListItems)
igmalItems
  = lens _igmalItems (\ s a -> s{_igmalItems = a})

-- | [Output Only] Server-defined URL for this resource.
igmalSelfLink :: Lens' InstanceGroupManagerAggregatedList (Maybe Text)
igmalSelfLink
  = lens _igmalSelfLink
      (\ s a -> s{_igmalSelfLink = a})

-- | [Output Only] Informational warning message.
igmalWarning :: Lens' InstanceGroupManagerAggregatedList (Maybe InstanceGroupManagerAggregatedListWarning)
igmalWarning
  = lens _igmalWarning (\ s a -> s{_igmalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
igmalId :: Lens' InstanceGroupManagerAggregatedList (Maybe Text)
igmalId = lens _igmalId (\ s a -> s{_igmalId = a})

instance FromJSON InstanceGroupManagerAggregatedList
         where
        parseJSON
          = withObject "InstanceGroupManagerAggregatedList"
              (\ o ->
                 InstanceGroupManagerAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#instanceGroupManagerAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceGroupManagerAggregatedList
         where
        toJSON InstanceGroupManagerAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _igmalNextPageToken,
                  Just ("kind" .= _igmalKind),
                  ("items" .=) <$> _igmalItems,
                  ("selfLink" .=) <$> _igmalSelfLink,
                  ("warning" .=) <$> _igmalWarning,
                  ("id" .=) <$> _igmalId])

-- | A BackendBucket resource. This resource defines a Cloud Storage bucket.
--
-- /See:/ 'backendBucket' smart constructor.
data BackendBucket = BackendBucket'
    { _bbKind              :: !Text
    , _bbEnableCdn         :: !(Maybe Bool)
    , _bbBucketName        :: !(Maybe Text)
    , _bbCdnPolicy         :: !(Maybe BackendBucketCdnPolicy)
    , _bbSelfLink          :: !(Maybe Text)
    , _bbName              :: !(Maybe Text)
    , _bbCreationTimestamp :: !(Maybe Text)
    , _bbId                :: !(Maybe (Textual Word64))
    , _bbDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendBucket' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bbKind'
--
-- * 'bbEnableCdn'
--
-- * 'bbBucketName'
--
-- * 'bbCdnPolicy'
--
-- * 'bbSelfLink'
--
-- * 'bbName'
--
-- * 'bbCreationTimestamp'
--
-- * 'bbId'
--
-- * 'bbDescription'
backendBucket
    :: BackendBucket
backendBucket =
    BackendBucket'
    { _bbKind = "compute#backendBucket"
    , _bbEnableCdn = Nothing
    , _bbBucketName = Nothing
    , _bbCdnPolicy = Nothing
    , _bbSelfLink = Nothing
    , _bbName = Nothing
    , _bbCreationTimestamp = Nothing
    , _bbId = Nothing
    , _bbDescription = Nothing
    }

-- | Type of the resource.
bbKind :: Lens' BackendBucket Text
bbKind = lens _bbKind (\ s a -> s{_bbKind = a})

-- | If true, enable Cloud CDN for this BackendBucket.
bbEnableCdn :: Lens' BackendBucket (Maybe Bool)
bbEnableCdn
  = lens _bbEnableCdn (\ s a -> s{_bbEnableCdn = a})

-- | Cloud Storage bucket name.
bbBucketName :: Lens' BackendBucket (Maybe Text)
bbBucketName
  = lens _bbBucketName (\ s a -> s{_bbBucketName = a})

-- | Cloud CDN configuration for this BackendBucket.
bbCdnPolicy :: Lens' BackendBucket (Maybe BackendBucketCdnPolicy)
bbCdnPolicy
  = lens _bbCdnPolicy (\ s a -> s{_bbCdnPolicy = a})

-- | [Output Only] Server-defined URL for the resource.
bbSelfLink :: Lens' BackendBucket (Maybe Text)
bbSelfLink
  = lens _bbSelfLink (\ s a -> s{_bbSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
bbName :: Lens' BackendBucket (Maybe Text)
bbName = lens _bbName (\ s a -> s{_bbName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
bbCreationTimestamp :: Lens' BackendBucket (Maybe Text)
bbCreationTimestamp
  = lens _bbCreationTimestamp
      (\ s a -> s{_bbCreationTimestamp = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
bbId :: Lens' BackendBucket (Maybe Word64)
bbId
  = lens _bbId (\ s a -> s{_bbId = a}) .
      mapping _Coerce

-- | An optional textual description of the resource; provided by the client
-- when the resource is created.
bbDescription :: Lens' BackendBucket (Maybe Text)
bbDescription
  = lens _bbDescription
      (\ s a -> s{_bbDescription = a})

instance FromJSON BackendBucket where
        parseJSON
          = withObject "BackendBucket"
              (\ o ->
                 BackendBucket' <$>
                   (o .:? "kind" .!= "compute#backendBucket") <*>
                     (o .:? "enableCdn")
                     <*> (o .:? "bucketName")
                     <*> (o .:? "cdnPolicy")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "description"))

instance ToJSON BackendBucket where
        toJSON BackendBucket'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _bbKind),
                  ("enableCdn" .=) <$> _bbEnableCdn,
                  ("bucketName" .=) <$> _bbBucketName,
                  ("cdnPolicy" .=) <$> _bbCdnPolicy,
                  ("selfLink" .=) <$> _bbSelfLink,
                  ("name" .=) <$> _bbName,
                  ("creationTimestamp" .=) <$> _bbCreationTimestamp,
                  ("id" .=) <$> _bbId,
                  ("description" .=) <$> _bbDescription])

--
-- /See:/ 'projectsEnableXpnResourceRequest' smart constructor.
newtype ProjectsEnableXpnResourceRequest = ProjectsEnableXpnResourceRequest'
    { _pexrrXpnResource :: Maybe XpnResourceId
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ProjectsEnableXpnResourceRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pexrrXpnResource'
projectsEnableXpnResourceRequest
    :: ProjectsEnableXpnResourceRequest
projectsEnableXpnResourceRequest =
    ProjectsEnableXpnResourceRequest'
    { _pexrrXpnResource = Nothing
    }

-- | Service resource (a.k.a service project) ID.
pexrrXpnResource :: Lens' ProjectsEnableXpnResourceRequest (Maybe XpnResourceId)
pexrrXpnResource
  = lens _pexrrXpnResource
      (\ s a -> s{_pexrrXpnResource = a})

instance FromJSON ProjectsEnableXpnResourceRequest
         where
        parseJSON
          = withObject "ProjectsEnableXpnResourceRequest"
              (\ o ->
                 ProjectsEnableXpnResourceRequest' <$>
                   (o .:? "xpnResource"))

instance ToJSON ProjectsEnableXpnResourceRequest
         where
        toJSON ProjectsEnableXpnResourceRequest'{..}
          = object
              (catMaybes
                 [("xpnResource" .=) <$> _pexrrXpnResource])

--
-- /See:/ 'targetPoolsScopedList' smart constructor.
data TargetPoolsScopedList = TargetPoolsScopedList'
    { _tpslWarning     :: !(Maybe TargetPoolsScopedListWarning)
    , _tpslTargetPools :: !(Maybe [TargetPool])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolsScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpslWarning'
--
-- * 'tpslTargetPools'
targetPoolsScopedList
    :: TargetPoolsScopedList
targetPoolsScopedList =
    TargetPoolsScopedList'
    { _tpslWarning = Nothing
    , _tpslTargetPools = Nothing
    }

-- | Informational warning which replaces the list of addresses when the list
-- is empty.
tpslWarning :: Lens' TargetPoolsScopedList (Maybe TargetPoolsScopedListWarning)
tpslWarning
  = lens _tpslWarning (\ s a -> s{_tpslWarning = a})

-- | A list of target pools contained in this scope.
tpslTargetPools :: Lens' TargetPoolsScopedList [TargetPool]
tpslTargetPools
  = lens _tpslTargetPools
      (\ s a -> s{_tpslTargetPools = a})
      . _Default
      . _Coerce

instance FromJSON TargetPoolsScopedList where
        parseJSON
          = withObject "TargetPoolsScopedList"
              (\ o ->
                 TargetPoolsScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "targetPools" .!= mempty))

instance ToJSON TargetPoolsScopedList where
        toJSON TargetPoolsScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _tpslWarning,
                  ("targetPools" .=) <$> _tpslTargetPools])

-- | A list of InterconnectAttachmentsScopedList resources.
--
-- /See:/ 'interconnectAttachmentAggregatedListItems' smart constructor.
newtype InterconnectAttachmentAggregatedListItems = InterconnectAttachmentAggregatedListItems'
    { _iaaliAddtional :: HashMap Text InterconnectAttachmentsScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iaaliAddtional'
interconnectAttachmentAggregatedListItems
    :: HashMap Text InterconnectAttachmentsScopedList -- ^ 'iaaliAddtional'
    -> InterconnectAttachmentAggregatedListItems
interconnectAttachmentAggregatedListItems pIaaliAddtional_ =
    InterconnectAttachmentAggregatedListItems'
    { _iaaliAddtional = _Coerce # pIaaliAddtional_
    }

-- | Name of the scope containing this set of interconnect attachments.
iaaliAddtional :: Lens' InterconnectAttachmentAggregatedListItems (HashMap Text InterconnectAttachmentsScopedList)
iaaliAddtional
  = lens _iaaliAddtional
      (\ s a -> s{_iaaliAddtional = a})
      . _Coerce

instance FromJSON
         InterconnectAttachmentAggregatedListItems where
        parseJSON
          = withObject
              "InterconnectAttachmentAggregatedListItems"
              (\ o ->
                 InterconnectAttachmentAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON
         InterconnectAttachmentAggregatedListItems where
        toJSON = toJSON . _iaaliAddtional

-- | Increment a streamz counter with the specified metric and field names.
-- Metric names should start with a \'\/\', generally be lowercase-only,
-- and end in \"_count\". Field names should not contain an initial slash.
-- The actual exported metric names will have \"\/iam\/policy\" prepended.
-- Field names correspond to IAM request parameters and field values are
-- their respective values. Supported field names: - \"authority\", which
-- is \"[token]\" if IAMContext.token is present, otherwise the value of
-- IAMContext.authority_selector if present, and otherwise a representation
-- of IAMContext.principal; or - \"iam_principal\", a representation of
-- IAMContext.principal even if a token or authority selector is present;
-- or - \"\" (empty string), resulting in a counter with no fields.
-- Examples: counter { metric: \"\/debug_access_count\" field:
-- \"iam_principal\" } ==> increment counter
-- \/iam\/policy\/backend_debug_access_count {iam_principal=[value of
-- IAMContext.principal]} At this time we do not support multiple field
-- names (though this may be supported in the future).
--
-- /See:/ 'logConfigCounterOptions' smart constructor.
data LogConfigCounterOptions = LogConfigCounterOptions'
    { _lccoField  :: !(Maybe Text)
    , _lccoMetric :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LogConfigCounterOptions' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lccoField'
--
-- * 'lccoMetric'
logConfigCounterOptions
    :: LogConfigCounterOptions
logConfigCounterOptions =
    LogConfigCounterOptions'
    { _lccoField = Nothing
    , _lccoMetric = Nothing
    }

-- | The field value to attribute.
lccoField :: Lens' LogConfigCounterOptions (Maybe Text)
lccoField
  = lens _lccoField (\ s a -> s{_lccoField = a})

-- | The metric to update.
lccoMetric :: Lens' LogConfigCounterOptions (Maybe Text)
lccoMetric
  = lens _lccoMetric (\ s a -> s{_lccoMetric = a})

instance FromJSON LogConfigCounterOptions where
        parseJSON
          = withObject "LogConfigCounterOptions"
              (\ o ->
                 LogConfigCounterOptions' <$>
                   (o .:? "field") <*> (o .:? "metric"))

instance ToJSON LogConfigCounterOptions where
        toJSON LogConfigCounterOptions'{..}
          = object
              (catMaybes
                 [("field" .=) <$> _lccoField,
                  ("metric" .=) <$> _lccoMetric])

--
-- /See:/ 'instancesSetMinCPUPlatformRequest' smart constructor.
newtype InstancesSetMinCPUPlatformRequest = InstancesSetMinCPUPlatformRequest'
    { _ismcprMinCPUPlatform :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesSetMinCPUPlatformRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ismcprMinCPUPlatform'
instancesSetMinCPUPlatformRequest
    :: InstancesSetMinCPUPlatformRequest
instancesSetMinCPUPlatformRequest =
    InstancesSetMinCPUPlatformRequest'
    { _ismcprMinCPUPlatform = Nothing
    }

-- | Minimum cpu\/platform this instance should be started at.
ismcprMinCPUPlatform :: Lens' InstancesSetMinCPUPlatformRequest (Maybe Text)
ismcprMinCPUPlatform
  = lens _ismcprMinCPUPlatform
      (\ s a -> s{_ismcprMinCPUPlatform = a})

instance FromJSON InstancesSetMinCPUPlatformRequest
         where
        parseJSON
          = withObject "InstancesSetMinCPUPlatformRequest"
              (\ o ->
                 InstancesSetMinCPUPlatformRequest' <$>
                   (o .:? "minCpuPlatform"))

instance ToJSON InstancesSetMinCPUPlatformRequest
         where
        toJSON InstancesSetMinCPUPlatformRequest'{..}
          = object
              (catMaybes
                 [("minCpuPlatform" .=) <$> _ismcprMinCPUPlatform])

--
-- /See:/ 'forwardingRuleAggregatedList' smart constructor.
data ForwardingRuleAggregatedList = ForwardingRuleAggregatedList'
    { _fralNextPageToken :: !(Maybe Text)
    , _fralKind          :: !Text
    , _fralItems         :: !(Maybe ForwardingRuleAggregatedListItems)
    , _fralSelfLink      :: !(Maybe Text)
    , _fralWarning       :: !(Maybe ForwardingRuleAggregatedListWarning)
    , _fralId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRuleAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fralNextPageToken'
--
-- * 'fralKind'
--
-- * 'fralItems'
--
-- * 'fralSelfLink'
--
-- * 'fralWarning'
--
-- * 'fralId'
forwardingRuleAggregatedList
    :: ForwardingRuleAggregatedList
forwardingRuleAggregatedList =
    ForwardingRuleAggregatedList'
    { _fralNextPageToken = Nothing
    , _fralKind = "compute#forwardingRuleAggregatedList"
    , _fralItems = Nothing
    , _fralSelfLink = Nothing
    , _fralWarning = Nothing
    , _fralId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
fralNextPageToken :: Lens' ForwardingRuleAggregatedList (Maybe Text)
fralNextPageToken
  = lens _fralNextPageToken
      (\ s a -> s{_fralNextPageToken = a})

-- | [Output Only] Type of resource. Always
-- compute#forwardingRuleAggregatedList for lists of forwarding rules.
fralKind :: Lens' ForwardingRuleAggregatedList Text
fralKind = lens _fralKind (\ s a -> s{_fralKind = a})

-- | A list of ForwardingRulesScopedList resources.
fralItems :: Lens' ForwardingRuleAggregatedList (Maybe ForwardingRuleAggregatedListItems)
fralItems
  = lens _fralItems (\ s a -> s{_fralItems = a})

-- | [Output Only] Server-defined URL for this resource.
fralSelfLink :: Lens' ForwardingRuleAggregatedList (Maybe Text)
fralSelfLink
  = lens _fralSelfLink (\ s a -> s{_fralSelfLink = a})

-- | [Output Only] Informational warning message.
fralWarning :: Lens' ForwardingRuleAggregatedList (Maybe ForwardingRuleAggregatedListWarning)
fralWarning
  = lens _fralWarning (\ s a -> s{_fralWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
fralId :: Lens' ForwardingRuleAggregatedList (Maybe Text)
fralId = lens _fralId (\ s a -> s{_fralId = a})

instance FromJSON ForwardingRuleAggregatedList where
        parseJSON
          = withObject "ForwardingRuleAggregatedList"
              (\ o ->
                 ForwardingRuleAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#forwardingRuleAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON ForwardingRuleAggregatedList where
        toJSON ForwardingRuleAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _fralNextPageToken,
                  Just ("kind" .= _fralKind),
                  ("items" .=) <$> _fralItems,
                  ("selfLink" .=) <$> _fralSelfLink,
                  ("warning" .=) <$> _fralWarning,
                  ("id" .=) <$> _fralId])

--
-- /See:/ 'targetReference' smart constructor.
newtype TargetReference = TargetReference'
    { _trTarget :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'trTarget'
targetReference
    :: TargetReference
targetReference =
    TargetReference'
    { _trTarget = Nothing
    }

trTarget :: Lens' TargetReference (Maybe Text)
trTarget = lens _trTarget (\ s a -> s{_trTarget = a})

instance FromJSON TargetReference where
        parseJSON
          = withObject "TargetReference"
              (\ o -> TargetReference' <$> (o .:? "target"))

instance ToJSON TargetReference where
        toJSON TargetReference'{..}
          = object (catMaybes [("target" .=) <$> _trTarget])

--
-- /See:/ 'targetPoolAggregatedList' smart constructor.
data TargetPoolAggregatedList = TargetPoolAggregatedList'
    { _tpalNextPageToken :: !(Maybe Text)
    , _tpalKind          :: !Text
    , _tpalItems         :: !(Maybe TargetPoolAggregatedListItems)
    , _tpalSelfLink      :: !(Maybe Text)
    , _tpalWarning       :: !(Maybe TargetPoolAggregatedListWarning)
    , _tpalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpalNextPageToken'
--
-- * 'tpalKind'
--
-- * 'tpalItems'
--
-- * 'tpalSelfLink'
--
-- * 'tpalWarning'
--
-- * 'tpalId'
targetPoolAggregatedList
    :: TargetPoolAggregatedList
targetPoolAggregatedList =
    TargetPoolAggregatedList'
    { _tpalNextPageToken = Nothing
    , _tpalKind = "compute#targetPoolAggregatedList"
    , _tpalItems = Nothing
    , _tpalSelfLink = Nothing
    , _tpalWarning = Nothing
    , _tpalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
tpalNextPageToken :: Lens' TargetPoolAggregatedList (Maybe Text)
tpalNextPageToken
  = lens _tpalNextPageToken
      (\ s a -> s{_tpalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#targetPoolAggregatedList
-- for aggregated lists of target pools.
tpalKind :: Lens' TargetPoolAggregatedList Text
tpalKind = lens _tpalKind (\ s a -> s{_tpalKind = a})

-- | A list of TargetPool resources.
tpalItems :: Lens' TargetPoolAggregatedList (Maybe TargetPoolAggregatedListItems)
tpalItems
  = lens _tpalItems (\ s a -> s{_tpalItems = a})

-- | [Output Only] Server-defined URL for this resource.
tpalSelfLink :: Lens' TargetPoolAggregatedList (Maybe Text)
tpalSelfLink
  = lens _tpalSelfLink (\ s a -> s{_tpalSelfLink = a})

-- | [Output Only] Informational warning message.
tpalWarning :: Lens' TargetPoolAggregatedList (Maybe TargetPoolAggregatedListWarning)
tpalWarning
  = lens _tpalWarning (\ s a -> s{_tpalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
tpalId :: Lens' TargetPoolAggregatedList (Maybe Text)
tpalId = lens _tpalId (\ s a -> s{_tpalId = a})

instance FromJSON TargetPoolAggregatedList where
        parseJSON
          = withObject "TargetPoolAggregatedList"
              (\ o ->
                 TargetPoolAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#targetPoolAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetPoolAggregatedList where
        toJSON TargetPoolAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _tpalNextPageToken,
                  Just ("kind" .= _tpalKind),
                  ("items" .=) <$> _tpalItems,
                  ("selfLink" .=) <$> _tpalSelfLink,
                  ("warning" .=) <$> _tpalWarning,
                  ("id" .=) <$> _tpalId])

--
-- /See:/ 'operationsScopedListWarningDataItem' smart constructor.
data OperationsScopedListWarningDataItem = OperationsScopedListWarningDataItem'
    { _oslwdiValue :: !(Maybe Text)
    , _oslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationsScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oslwdiValue'
--
-- * 'oslwdiKey'
operationsScopedListWarningDataItem
    :: OperationsScopedListWarningDataItem
operationsScopedListWarningDataItem =
    OperationsScopedListWarningDataItem'
    { _oslwdiValue = Nothing
    , _oslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
oslwdiValue :: Lens' OperationsScopedListWarningDataItem (Maybe Text)
oslwdiValue
  = lens _oslwdiValue (\ s a -> s{_oslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
oslwdiKey :: Lens' OperationsScopedListWarningDataItem (Maybe Text)
oslwdiKey
  = lens _oslwdiKey (\ s a -> s{_oslwdiKey = a})

instance FromJSON OperationsScopedListWarningDataItem
         where
        parseJSON
          = withObject "OperationsScopedListWarningDataItem"
              (\ o ->
                 OperationsScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON OperationsScopedListWarningDataItem
         where
        toJSON OperationsScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _oslwdiValue,
                  ("key" .=) <$> _oslwdiKey])

--
-- /See:/ 'globalSetLabelsRequest' smart constructor.
data GlobalSetLabelsRequest = GlobalSetLabelsRequest'
    { _gslrLabels           :: !(Maybe GlobalSetLabelsRequestLabels)
    , _gslrLabelFingerprint :: !(Maybe Bytes)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'GlobalSetLabelsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gslrLabels'
--
-- * 'gslrLabelFingerprint'
globalSetLabelsRequest
    :: GlobalSetLabelsRequest
globalSetLabelsRequest =
    GlobalSetLabelsRequest'
    { _gslrLabels = Nothing
    , _gslrLabelFingerprint = Nothing
    }

-- | A list of labels to apply for this resource. Each label key & value must
-- comply with RFC1035. Specifically, the name must be 1-63 characters long
-- and match the regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which
-- means the first character must be a lowercase letter, and all following
-- characters must be a dash, lowercase letter, or digit, except the last
-- character, which cannot be a dash. For example, \"webserver-frontend\":
-- \"images\". A label value can also be empty (e.g. \"my-label\": \"\").
gslrLabels :: Lens' GlobalSetLabelsRequest (Maybe GlobalSetLabelsRequestLabels)
gslrLabels
  = lens _gslrLabels (\ s a -> s{_gslrLabels = a})

-- | The fingerprint of the previous set of labels for this resource, used to
-- detect conflicts. The fingerprint is initially generated by Compute
-- Engine and changes after every request to modify or update labels. You
-- must always provide an up-to-date fingerprint hash when updating or
-- changing labels, otherwise the request will fail with error 412
-- conditionNotMet. Make a get() request to the resource to get the latest
-- fingerprint.
gslrLabelFingerprint :: Lens' GlobalSetLabelsRequest (Maybe ByteString)
gslrLabelFingerprint
  = lens _gslrLabelFingerprint
      (\ s a -> s{_gslrLabelFingerprint = a})
      . mapping _Bytes

instance FromJSON GlobalSetLabelsRequest where
        parseJSON
          = withObject "GlobalSetLabelsRequest"
              (\ o ->
                 GlobalSetLabelsRequest' <$>
                   (o .:? "labels") <*> (o .:? "labelFingerprint"))

instance ToJSON GlobalSetLabelsRequest where
        toJSON GlobalSetLabelsRequest'{..}
          = object
              (catMaybes
                 [("labels" .=) <$> _gslrLabels,
                  ("labelFingerprint" .=) <$> _gslrLabelFingerprint])

-- | A TargetPool resource. This resource defines a pool of instances, an
-- associated HttpHealthCheck resource, and the fallback target pool. (==
-- resource_for beta.targetPools ==) (== resource_for v1.targetPools ==)
--
-- /See:/ 'targetPool' smart constructor.
data TargetPool = TargetPool'
    { _tpSessionAffinity   :: !(Maybe TargetPoolSessionAffinity)
    , _tpBackupPool        :: !(Maybe Text)
    , _tpKind              :: !Text
    , _tpSelfLink          :: !(Maybe Text)
    , _tpName              :: !(Maybe Text)
    , _tpCreationTimestamp :: !(Maybe Text)
    , _tpInstances         :: !(Maybe [Text])
    , _tpId                :: !(Maybe (Textual Word64))
    , _tpFailoverRatio     :: !(Maybe (Textual Double))
    , _tpRegion            :: !(Maybe Text)
    , _tpDescription       :: !(Maybe Text)
    , _tpHealthChecks      :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPool' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpSessionAffinity'
--
-- * 'tpBackupPool'
--
-- * 'tpKind'
--
-- * 'tpSelfLink'
--
-- * 'tpName'
--
-- * 'tpCreationTimestamp'
--
-- * 'tpInstances'
--
-- * 'tpId'
--
-- * 'tpFailoverRatio'
--
-- * 'tpRegion'
--
-- * 'tpDescription'
--
-- * 'tpHealthChecks'
targetPool
    :: TargetPool
targetPool =
    TargetPool'
    { _tpSessionAffinity = Nothing
    , _tpBackupPool = Nothing
    , _tpKind = "compute#targetPool"
    , _tpSelfLink = Nothing
    , _tpName = Nothing
    , _tpCreationTimestamp = Nothing
    , _tpInstances = Nothing
    , _tpId = Nothing
    , _tpFailoverRatio = Nothing
    , _tpRegion = Nothing
    , _tpDescription = Nothing
    , _tpHealthChecks = Nothing
    }

-- | Session affinity option, must be one of the following values: NONE:
-- Connections from the same client IP may go to any instance in the pool.
-- CLIENT_IP: Connections from the same client IP will go to the same
-- instance in the pool while that instance remains healthy.
-- CLIENT_IP_PROTO: Connections from the same client IP with the same IP
-- protocol will go to the same instance in the pool while that instance
-- remains healthy.
tpSessionAffinity :: Lens' TargetPool (Maybe TargetPoolSessionAffinity)
tpSessionAffinity
  = lens _tpSessionAffinity
      (\ s a -> s{_tpSessionAffinity = a})

-- | This field is applicable only when the containing target pool is serving
-- a forwarding rule as the primary pool, and its failoverRatio field is
-- properly set to a value between [0, 1]. backupPool and failoverRatio
-- together define the fallback behavior of the primary target pool: if the
-- ratio of the healthy instances in the primary pool is at or below
-- failoverRatio, traffic arriving at the load-balanced IP will be directed
-- to the backup pool. In case where failoverRatio and backupPool are not
-- set, or all the instances in the backup pool are unhealthy, the traffic
-- will be directed back to the primary pool in the \"force\" mode, where
-- traffic will be spread to the healthy instances with the best effort, or
-- to all instances when no instance is healthy.
tpBackupPool :: Lens' TargetPool (Maybe Text)
tpBackupPool
  = lens _tpBackupPool (\ s a -> s{_tpBackupPool = a})

-- | [Output Only] Type of the resource. Always compute#targetPool for target
-- pools.
tpKind :: Lens' TargetPool Text
tpKind = lens _tpKind (\ s a -> s{_tpKind = a})

-- | [Output Only] Server-defined URL for the resource.
tpSelfLink :: Lens' TargetPool (Maybe Text)
tpSelfLink
  = lens _tpSelfLink (\ s a -> s{_tpSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
tpName :: Lens' TargetPool (Maybe Text)
tpName = lens _tpName (\ s a -> s{_tpName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
tpCreationTimestamp :: Lens' TargetPool (Maybe Text)
tpCreationTimestamp
  = lens _tpCreationTimestamp
      (\ s a -> s{_tpCreationTimestamp = a})

-- | A list of resource URLs to the virtual machine instances serving this
-- pool. They must live in zones contained in the same region as this pool.
tpInstances :: Lens' TargetPool [Text]
tpInstances
  = lens _tpInstances (\ s a -> s{_tpInstances = a}) .
      _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
tpId :: Lens' TargetPool (Maybe Word64)
tpId
  = lens _tpId (\ s a -> s{_tpId = a}) .
      mapping _Coerce

-- | This field is applicable only when the containing target pool is serving
-- a forwarding rule as the primary pool (i.e., not as a backup pool to
-- some other target pool). The value of the field must be in [0, 1]. If
-- set, backupPool must also be set. They together define the fallback
-- behavior of the primary target pool: if the ratio of the healthy
-- instances in the primary pool is at or below this number, traffic
-- arriving at the load-balanced IP will be directed to the backup pool. In
-- case where failoverRatio is not set or all the instances in the backup
-- pool are unhealthy, the traffic will be directed back to the primary
-- pool in the \"force\" mode, where traffic will be spread to the healthy
-- instances with the best effort, or to all instances when no instance is
-- healthy.
tpFailoverRatio :: Lens' TargetPool (Maybe Double)
tpFailoverRatio
  = lens _tpFailoverRatio
      (\ s a -> s{_tpFailoverRatio = a})
      . mapping _Coerce

-- | [Output Only] URL of the region where the target pool resides.
tpRegion :: Lens' TargetPool (Maybe Text)
tpRegion = lens _tpRegion (\ s a -> s{_tpRegion = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
tpDescription :: Lens' TargetPool (Maybe Text)
tpDescription
  = lens _tpDescription
      (\ s a -> s{_tpDescription = a})

-- | The URL of the HttpHealthCheck resource. A member instance in this pool
-- is considered healthy if and only if the health checks pass. An empty
-- list means all member instances will be considered healthy at all times.
-- Only HttpHealthChecks are supported. Only one health check may be
-- specified.
tpHealthChecks :: Lens' TargetPool [Text]
tpHealthChecks
  = lens _tpHealthChecks
      (\ s a -> s{_tpHealthChecks = a})
      . _Default
      . _Coerce

instance FromJSON TargetPool where
        parseJSON
          = withObject "TargetPool"
              (\ o ->
                 TargetPool' <$>
                   (o .:? "sessionAffinity") <*> (o .:? "backupPool")
                     <*> (o .:? "kind" .!= "compute#targetPool")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "instances" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "failoverRatio")
                     <*> (o .:? "region")
                     <*> (o .:? "description")
                     <*> (o .:? "healthChecks" .!= mempty))

instance ToJSON TargetPool where
        toJSON TargetPool'{..}
          = object
              (catMaybes
                 [("sessionAffinity" .=) <$> _tpSessionAffinity,
                  ("backupPool" .=) <$> _tpBackupPool,
                  Just ("kind" .= _tpKind),
                  ("selfLink" .=) <$> _tpSelfLink,
                  ("name" .=) <$> _tpName,
                  ("creationTimestamp" .=) <$> _tpCreationTimestamp,
                  ("instances" .=) <$> _tpInstances,
                  ("id" .=) <$> _tpId,
                  ("failoverRatio" .=) <$> _tpFailoverRatio,
                  ("region" .=) <$> _tpRegion,
                  ("description" .=) <$> _tpDescription,
                  ("healthChecks" .=) <$> _tpHealthChecks])

-- | Contains a list of images.
--
-- /See:/ 'imageList' smart constructor.
data ImageList = ImageList'
    { _ilNextPageToken :: !(Maybe Text)
    , _ilKind          :: !Text
    , _ilItems         :: !(Maybe [Image])
    , _ilSelfLink      :: !(Maybe Text)
    , _ilWarning       :: !(Maybe ImageListWarning)
    , _ilId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ImageList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ilNextPageToken'
--
-- * 'ilKind'
--
-- * 'ilItems'
--
-- * 'ilSelfLink'
--
-- * 'ilWarning'
--
-- * 'ilId'
imageList
    :: ImageList
imageList =
    ImageList'
    { _ilNextPageToken = Nothing
    , _ilKind = "compute#imageList"
    , _ilItems = Nothing
    , _ilSelfLink = Nothing
    , _ilWarning = Nothing
    , _ilId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ilNextPageToken :: Lens' ImageList (Maybe Text)
ilNextPageToken
  = lens _ilNextPageToken
      (\ s a -> s{_ilNextPageToken = a})

-- | Type of resource.
ilKind :: Lens' ImageList Text
ilKind = lens _ilKind (\ s a -> s{_ilKind = a})

-- | A list of Image resources.
ilItems :: Lens' ImageList [Image]
ilItems
  = lens _ilItems (\ s a -> s{_ilItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
ilSelfLink :: Lens' ImageList (Maybe Text)
ilSelfLink
  = lens _ilSelfLink (\ s a -> s{_ilSelfLink = a})

-- | [Output Only] Informational warning message.
ilWarning :: Lens' ImageList (Maybe ImageListWarning)
ilWarning
  = lens _ilWarning (\ s a -> s{_ilWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ilId :: Lens' ImageList (Maybe Text)
ilId = lens _ilId (\ s a -> s{_ilId = a})

instance FromJSON ImageList where
        parseJSON
          = withObject "ImageList"
              (\ o ->
                 ImageList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#imageList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON ImageList where
        toJSON ImageList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ilNextPageToken,
                  Just ("kind" .= _ilKind), ("items" .=) <$> _ilItems,
                  ("selfLink" .=) <$> _ilSelfLink,
                  ("warning" .=) <$> _ilWarning, ("id" .=) <$> _ilId])

--
-- /See:/ 'operationAggregatedListWarningDataItem' smart constructor.
data OperationAggregatedListWarningDataItem = OperationAggregatedListWarningDataItem'
    { _oalwdiValue :: !(Maybe Text)
    , _oalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oalwdiValue'
--
-- * 'oalwdiKey'
operationAggregatedListWarningDataItem
    :: OperationAggregatedListWarningDataItem
operationAggregatedListWarningDataItem =
    OperationAggregatedListWarningDataItem'
    { _oalwdiValue = Nothing
    , _oalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
oalwdiValue :: Lens' OperationAggregatedListWarningDataItem (Maybe Text)
oalwdiValue
  = lens _oalwdiValue (\ s a -> s{_oalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
oalwdiKey :: Lens' OperationAggregatedListWarningDataItem (Maybe Text)
oalwdiKey
  = lens _oalwdiKey (\ s a -> s{_oalwdiKey = a})

instance FromJSON
         OperationAggregatedListWarningDataItem where
        parseJSON
          = withObject "OperationAggregatedListWarningDataItem"
              (\ o ->
                 OperationAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         OperationAggregatedListWarningDataItem where
        toJSON OperationAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _oalwdiValue,
                  ("key" .=) <$> _oalwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'forwardingRuleListWarning' smart constructor.
data ForwardingRuleListWarning = ForwardingRuleListWarning'
    { _frlwData    :: !(Maybe [ForwardingRuleListWarningDataItem])
    , _frlwCode    :: !(Maybe ForwardingRuleListWarningCode)
    , _frlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRuleListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'frlwData'
--
-- * 'frlwCode'
--
-- * 'frlwMessage'
forwardingRuleListWarning
    :: ForwardingRuleListWarning
forwardingRuleListWarning =
    ForwardingRuleListWarning'
    { _frlwData = Nothing
    , _frlwCode = Nothing
    , _frlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
frlwData :: Lens' ForwardingRuleListWarning [ForwardingRuleListWarningDataItem]
frlwData
  = lens _frlwData (\ s a -> s{_frlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
frlwCode :: Lens' ForwardingRuleListWarning (Maybe ForwardingRuleListWarningCode)
frlwCode = lens _frlwCode (\ s a -> s{_frlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
frlwMessage :: Lens' ForwardingRuleListWarning (Maybe Text)
frlwMessage
  = lens _frlwMessage (\ s a -> s{_frlwMessage = a})

instance FromJSON ForwardingRuleListWarning where
        parseJSON
          = withObject "ForwardingRuleListWarning"
              (\ o ->
                 ForwardingRuleListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON ForwardingRuleListWarning where
        toJSON ForwardingRuleListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _frlwData,
                  ("code" .=) <$> _frlwCode,
                  ("message" .=) <$> _frlwMessage])

-- | Informational warning which replaces the list of addresses when the list
-- is empty.
--
-- /See:/ 'vpnTunnelsScopedListWarning' smart constructor.
data VPNTunnelsScopedListWarning = VPNTunnelsScopedListWarning'
    { _vtslwData    :: !(Maybe [VPNTunnelsScopedListWarningDataItem])
    , _vtslwCode    :: !(Maybe VPNTunnelsScopedListWarningCode)
    , _vtslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelsScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtslwData'
--
-- * 'vtslwCode'
--
-- * 'vtslwMessage'
vpnTunnelsScopedListWarning
    :: VPNTunnelsScopedListWarning
vpnTunnelsScopedListWarning =
    VPNTunnelsScopedListWarning'
    { _vtslwData = Nothing
    , _vtslwCode = Nothing
    , _vtslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
vtslwData :: Lens' VPNTunnelsScopedListWarning [VPNTunnelsScopedListWarningDataItem]
vtslwData
  = lens _vtslwData (\ s a -> s{_vtslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
vtslwCode :: Lens' VPNTunnelsScopedListWarning (Maybe VPNTunnelsScopedListWarningCode)
vtslwCode
  = lens _vtslwCode (\ s a -> s{_vtslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
vtslwMessage :: Lens' VPNTunnelsScopedListWarning (Maybe Text)
vtslwMessage
  = lens _vtslwMessage (\ s a -> s{_vtslwMessage = a})

instance FromJSON VPNTunnelsScopedListWarning where
        parseJSON
          = withObject "VPNTunnelsScopedListWarning"
              (\ o ->
                 VPNTunnelsScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON VPNTunnelsScopedListWarning where
        toJSON VPNTunnelsScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _vtslwData,
                  ("code" .=) <$> _vtslwCode,
                  ("message" .=) <$> _vtslwMessage])

--
-- /See:/ 'regionDisksResizeRequest' smart constructor.
newtype RegionDisksResizeRequest = RegionDisksResizeRequest'
    { _rdrrSizeGb :: Maybe (Textual Int64)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionDisksResizeRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rdrrSizeGb'
regionDisksResizeRequest
    :: RegionDisksResizeRequest
regionDisksResizeRequest =
    RegionDisksResizeRequest'
    { _rdrrSizeGb = Nothing
    }

-- | The new size of the regional persistent disk, which is specified in GB.
rdrrSizeGb :: Lens' RegionDisksResizeRequest (Maybe Int64)
rdrrSizeGb
  = lens _rdrrSizeGb (\ s a -> s{_rdrrSizeGb = a}) .
      mapping _Coerce

instance FromJSON RegionDisksResizeRequest where
        parseJSON
          = withObject "RegionDisksResizeRequest"
              (\ o ->
                 RegionDisksResizeRequest' <$> (o .:? "sizeGb"))

instance ToJSON RegionDisksResizeRequest where
        toJSON RegionDisksResizeRequest'{..}
          = object (catMaybes [("sizeGb" .=) <$> _rdrrSizeGb])

-- | [Output Only] An informational warning that appears when the node types
-- list is empty.
--
-- /See:/ 'nodeTypesScopedListWarning' smart constructor.
data NodeTypesScopedListWarning = NodeTypesScopedListWarning'
    { _ntslwData    :: !(Maybe [NodeTypesScopedListWarningDataItem])
    , _ntslwCode    :: !(Maybe NodeTypesScopedListWarningCode)
    , _ntslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntslwData'
--
-- * 'ntslwCode'
--
-- * 'ntslwMessage'
nodeTypesScopedListWarning
    :: NodeTypesScopedListWarning
nodeTypesScopedListWarning =
    NodeTypesScopedListWarning'
    { _ntslwData = Nothing
    , _ntslwCode = Nothing
    , _ntslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ntslwData :: Lens' NodeTypesScopedListWarning [NodeTypesScopedListWarningDataItem]
ntslwData
  = lens _ntslwData (\ s a -> s{_ntslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ntslwCode :: Lens' NodeTypesScopedListWarning (Maybe NodeTypesScopedListWarningCode)
ntslwCode
  = lens _ntslwCode (\ s a -> s{_ntslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ntslwMessage :: Lens' NodeTypesScopedListWarning (Maybe Text)
ntslwMessage
  = lens _ntslwMessage (\ s a -> s{_ntslwMessage = a})

instance FromJSON NodeTypesScopedListWarning where
        parseJSON
          = withObject "NodeTypesScopedListWarning"
              (\ o ->
                 NodeTypesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeTypesScopedListWarning where
        toJSON NodeTypesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ntslwData,
                  ("code" .=) <$> _ntslwCode,
                  ("message" .=) <$> _ntslwMessage])

--
-- /See:/ 'nodeTemplateNodeTypeFlexibility' smart constructor.
data NodeTemplateNodeTypeFlexibility = NodeTemplateNodeTypeFlexibility'
    { _ntntfMemory   :: !(Maybe Text)
    , _ntntfCPUs     :: !(Maybe Text)
    , _ntntfLocalSsd :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateNodeTypeFlexibility' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntntfMemory'
--
-- * 'ntntfCPUs'
--
-- * 'ntntfLocalSsd'
nodeTemplateNodeTypeFlexibility
    :: NodeTemplateNodeTypeFlexibility
nodeTemplateNodeTypeFlexibility =
    NodeTemplateNodeTypeFlexibility'
    { _ntntfMemory = Nothing
    , _ntntfCPUs = Nothing
    , _ntntfLocalSsd = Nothing
    }

ntntfMemory :: Lens' NodeTemplateNodeTypeFlexibility (Maybe Text)
ntntfMemory
  = lens _ntntfMemory (\ s a -> s{_ntntfMemory = a})

ntntfCPUs :: Lens' NodeTemplateNodeTypeFlexibility (Maybe Text)
ntntfCPUs
  = lens _ntntfCPUs (\ s a -> s{_ntntfCPUs = a})

ntntfLocalSsd :: Lens' NodeTemplateNodeTypeFlexibility (Maybe Text)
ntntfLocalSsd
  = lens _ntntfLocalSsd
      (\ s a -> s{_ntntfLocalSsd = a})

instance FromJSON NodeTemplateNodeTypeFlexibility
         where
        parseJSON
          = withObject "NodeTemplateNodeTypeFlexibility"
              (\ o ->
                 NodeTemplateNodeTypeFlexibility' <$>
                   (o .:? "memory") <*> (o .:? "cpus") <*>
                     (o .:? "localSsd"))

instance ToJSON NodeTemplateNodeTypeFlexibility where
        toJSON NodeTemplateNodeTypeFlexibility'{..}
          = object
              (catMaybes
                 [("memory" .=) <$> _ntntfMemory,
                  ("cpus" .=) <$> _ntntfCPUs,
                  ("localSsd" .=) <$> _ntntfLocalSsd])

--
-- /See:/ 'licenseResourceRequirements' smart constructor.
data LicenseResourceRequirements = LicenseResourceRequirements'
    { _lrrMinMemoryMb      :: !(Maybe (Textual Int32))
    , _lrrMinGuestCPUCount :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LicenseResourceRequirements' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lrrMinMemoryMb'
--
-- * 'lrrMinGuestCPUCount'
licenseResourceRequirements
    :: LicenseResourceRequirements
licenseResourceRequirements =
    LicenseResourceRequirements'
    { _lrrMinMemoryMb = Nothing
    , _lrrMinGuestCPUCount = Nothing
    }

-- | Minimum memory required to use the Instance. Enforced at Instance
-- creation and Instance start.
lrrMinMemoryMb :: Lens' LicenseResourceRequirements (Maybe Int32)
lrrMinMemoryMb
  = lens _lrrMinMemoryMb
      (\ s a -> s{_lrrMinMemoryMb = a})
      . mapping _Coerce

-- | Minimum number of guest cpus required to use the Instance. Enforced at
-- Instance creation and Instance start.
lrrMinGuestCPUCount :: Lens' LicenseResourceRequirements (Maybe Int32)
lrrMinGuestCPUCount
  = lens _lrrMinGuestCPUCount
      (\ s a -> s{_lrrMinGuestCPUCount = a})
      . mapping _Coerce

instance FromJSON LicenseResourceRequirements where
        parseJSON
          = withObject "LicenseResourceRequirements"
              (\ o ->
                 LicenseResourceRequirements' <$>
                   (o .:? "minMemoryMb") <*> (o .:? "minGuestCpuCount"))

instance ToJSON LicenseResourceRequirements where
        toJSON LicenseResourceRequirements'{..}
          = object
              (catMaybes
                 [("minMemoryMb" .=) <$> _lrrMinMemoryMb,
                  ("minGuestCpuCount" .=) <$> _lrrMinGuestCPUCount])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'regionDiskTypeListWarning' smart constructor.
data RegionDiskTypeListWarning = RegionDiskTypeListWarning'
    { _rdtlwData    :: !(Maybe [RegionDiskTypeListWarningDataItem])
    , _rdtlwCode    :: !(Maybe RegionDiskTypeListWarningCode)
    , _rdtlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionDiskTypeListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rdtlwData'
--
-- * 'rdtlwCode'
--
-- * 'rdtlwMessage'
regionDiskTypeListWarning
    :: RegionDiskTypeListWarning
regionDiskTypeListWarning =
    RegionDiskTypeListWarning'
    { _rdtlwData = Nothing
    , _rdtlwCode = Nothing
    , _rdtlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rdtlwData :: Lens' RegionDiskTypeListWarning [RegionDiskTypeListWarningDataItem]
rdtlwData
  = lens _rdtlwData (\ s a -> s{_rdtlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rdtlwCode :: Lens' RegionDiskTypeListWarning (Maybe RegionDiskTypeListWarningCode)
rdtlwCode
  = lens _rdtlwCode (\ s a -> s{_rdtlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
rdtlwMessage :: Lens' RegionDiskTypeListWarning (Maybe Text)
rdtlwMessage
  = lens _rdtlwMessage (\ s a -> s{_rdtlwMessage = a})

instance FromJSON RegionDiskTypeListWarning where
        parseJSON
          = withObject "RegionDiskTypeListWarning"
              (\ o ->
                 RegionDiskTypeListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RegionDiskTypeListWarning where
        toJSON RegionDiskTypeListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rdtlwData,
                  ("code" .=) <$> _rdtlwCode,
                  ("message" .=) <$> _rdtlwMessage])

--
-- /See:/ 'targetSSLProxiesSetBackendServiceRequest' smart constructor.
newtype TargetSSLProxiesSetBackendServiceRequest = TargetSSLProxiesSetBackendServiceRequest'
    { _tspsbsrService :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetSSLProxiesSetBackendServiceRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tspsbsrService'
targetSSLProxiesSetBackendServiceRequest
    :: TargetSSLProxiesSetBackendServiceRequest
targetSSLProxiesSetBackendServiceRequest =
    TargetSSLProxiesSetBackendServiceRequest'
    { _tspsbsrService = Nothing
    }

-- | The URL of the new BackendService resource for the targetSslProxy.
tspsbsrService :: Lens' TargetSSLProxiesSetBackendServiceRequest (Maybe Text)
tspsbsrService
  = lens _tspsbsrService
      (\ s a -> s{_tspsbsrService = a})

instance FromJSON
         TargetSSLProxiesSetBackendServiceRequest where
        parseJSON
          = withObject
              "TargetSSLProxiesSetBackendServiceRequest"
              (\ o ->
                 TargetSSLProxiesSetBackendServiceRequest' <$>
                   (o .:? "service"))

instance ToJSON
         TargetSSLProxiesSetBackendServiceRequest where
        toJSON TargetSSLProxiesSetBackendServiceRequest'{..}
          = object
              (catMaybes [("service" .=) <$> _tspsbsrService])

-- | A ForwardingRule resource. A ForwardingRule resource specifies which
-- pool of target virtual machines to forward a packet to if it matches the
-- given [IPAddress, IPProtocol, ports] tuple. (== resource_for
-- beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (==
-- resource_for beta.globalForwardingRules ==) (== resource_for
-- v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules
-- ==) (== resource_for v1.regionForwardingRules ==)
--
-- /See:/ 'forwardingRule' smart constructor.
data ForwardingRule = ForwardingRule'
    { _frNetworkTier         :: !(Maybe ForwardingRuleNetworkTier)
    , _frIPAddress           :: !(Maybe Text)
    , _frLoadBalancingScheme :: !(Maybe ForwardingRuleLoadBalancingScheme)
    , _frKind                :: !Text
    , _frIPVersion           :: !(Maybe ForwardingRuleIPVersion)
    , _frNetwork             :: !(Maybe Text)
    , _frPortRange           :: !(Maybe Text)
    , _frSelfLink            :: !(Maybe Text)
    , _frName                :: !(Maybe Text)
    , _frIPProtocol          :: !(Maybe ForwardingRuleIPProtocol)
    , _frCreationTimestamp   :: !(Maybe Text)
    , _frSubnetwork          :: !(Maybe Text)
    , _frPorts               :: !(Maybe [Text])
    , _frId                  :: !(Maybe (Textual Word64))
    , _frRegion              :: !(Maybe Text)
    , _frDescription         :: !(Maybe Text)
    , _frTarget              :: !(Maybe Text)
    , _frBackendService      :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRule' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'frNetworkTier'
--
-- * 'frIPAddress'
--
-- * 'frLoadBalancingScheme'
--
-- * 'frKind'
--
-- * 'frIPVersion'
--
-- * 'frNetwork'
--
-- * 'frPortRange'
--
-- * 'frSelfLink'
--
-- * 'frName'
--
-- * 'frIPProtocol'
--
-- * 'frCreationTimestamp'
--
-- * 'frSubnetwork'
--
-- * 'frPorts'
--
-- * 'frId'
--
-- * 'frRegion'
--
-- * 'frDescription'
--
-- * 'frTarget'
--
-- * 'frBackendService'
forwardingRule
    :: ForwardingRule
forwardingRule =
    ForwardingRule'
    { _frNetworkTier = Nothing
    , _frIPAddress = Nothing
    , _frLoadBalancingScheme = Nothing
    , _frKind = "compute#forwardingRule"
    , _frIPVersion = Nothing
    , _frNetwork = Nothing
    , _frPortRange = Nothing
    , _frSelfLink = Nothing
    , _frName = Nothing
    , _frIPProtocol = Nothing
    , _frCreationTimestamp = Nothing
    , _frSubnetwork = Nothing
    , _frPorts = Nothing
    , _frId = Nothing
    , _frRegion = Nothing
    , _frDescription = Nothing
    , _frTarget = Nothing
    , _frBackendService = Nothing
    }

-- | This signifies the networking tier used for configuring this load
-- balancer and can only take the following values: PREMIUM , STANDARD. For
-- regional ForwardingRule, the valid values are PREMIUM and STANDARD. For
-- GlobalForwardingRule, the valid value is PREMIUM. If this field is not
-- specified, it is assumed to be PREMIUM. If IPAddress is specified, this
-- value must be equal to the networkTier of the Address.
frNetworkTier :: Lens' ForwardingRule (Maybe ForwardingRuleNetworkTier)
frNetworkTier
  = lens _frNetworkTier
      (\ s a -> s{_frNetworkTier = a})

-- | The IP address that this forwarding rule is serving on behalf of.
-- Addresses are restricted based on the forwarding rule\'s load balancing
-- scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the
-- load balancing scheme is EXTERNAL, for global forwarding rules, the
-- address must be a global IP, and for regional forwarding rules, the
-- address must live in the same region as the forwarding rule. If this
-- field is empty, an ephemeral IPv4 address from the same scope (global or
-- regional) will be assigned. A regional forwarding rule supports IPv4
-- only. A global forwarding rule supports either IPv4 or IPv6. When the
-- load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL
-- reference to an existing Address resource ( internal regional static IP
-- address), with a purpose of GCE_END_POINT and address_type of INTERNAL.
-- When the load balancing scheme is INTERNAL, this can only be an RFC 1918
-- IP address belonging to the network\/subnet configured for the
-- forwarding rule. By default, if this field is empty, an ephemeral
-- internal IP address will be automatically allocated from the IP range of
-- the subnet or network configured for this forwarding rule. An address
-- can be specified either by a literal IP address or a URL reference to an
-- existing Address resource. The following examples are all valid: -
-- 100.1.2.3 -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/regions\/region\/addresses\/address
-- - projects\/project\/regions\/region\/addresses\/address -
-- regions\/region\/addresses\/address - global\/addresses\/address -
-- address
frIPAddress :: Lens' ForwardingRule (Maybe Text)
frIPAddress
  = lens _frIPAddress (\ s a -> s{_frIPAddress = a})

-- | This signifies what the ForwardingRule will be used for and can only
-- take the following values: INTERNAL, INTERNAL_SELF_MANAGED, EXTERNAL.
-- The value of INTERNAL means that this will be used for Internal Network
-- Load Balancing (TCP, UDP). The value of INTERNAL_SELF_MANAGED means that
-- this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL
-- means that this will be used for External Load Balancing (HTTP(S) LB,
-- External TCP\/UDP LB, SSL Proxy)
frLoadBalancingScheme :: Lens' ForwardingRule (Maybe ForwardingRuleLoadBalancingScheme)
frLoadBalancingScheme
  = lens _frLoadBalancingScheme
      (\ s a -> s{_frLoadBalancingScheme = a})

-- | [Output Only] Type of the resource. Always compute#forwardingRule for
-- Forwarding Rule resources.
frKind :: Lens' ForwardingRule Text
frKind = lens _frKind (\ s a -> s{_frKind = a})

-- | The IP Version that will be used by this forwarding rule. Valid options
-- are IPV4 or IPV6. This can only be specified for an external global
-- forwarding rule.
frIPVersion :: Lens' ForwardingRule (Maybe ForwardingRuleIPVersion)
frIPVersion
  = lens _frIPVersion (\ s a -> s{_frIPVersion = a})

-- | This field is not used for external load balancing. For INTERNAL and
-- INTERNAL_SELF_MANAGED load balancing, this field identifies the network
-- that the load balanced IP should belong to for this Forwarding Rule. If
-- this field is not specified, the default network will be used.
frNetwork :: Lens' ForwardingRule (Maybe Text)
frNetwork
  = lens _frNetwork (\ s a -> s{_frNetwork = a})

-- | This field is used along with the target field for TargetHttpProxy,
-- TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway,
-- TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP,
-- or SCTP, only packets addressed to ports in the specified range will be
-- forwarded to target. Forwarding rules with the same [IPAddress,
-- IPProtocol] pair must have disjoint port ranges. Some types of
-- forwarding target have constraints on the acceptable ports: -
-- TargetHttpProxy: 80, 8080 - TargetHttpsProxy: 443 - TargetTcpProxy: 25,
-- 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 -
-- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995,
-- 1688, 1883, 5222 - TargetVpnGateway: 500, 4500
frPortRange :: Lens' ForwardingRule (Maybe Text)
frPortRange
  = lens _frPortRange (\ s a -> s{_frPortRange = a})

-- | [Output Only] Server-defined URL for the resource.
frSelfLink :: Lens' ForwardingRule (Maybe Text)
frSelfLink
  = lens _frSelfLink (\ s a -> s{_frSelfLink = a})

-- | Name of the resource; provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
frName :: Lens' ForwardingRule (Maybe Text)
frName = lens _frName (\ s a -> s{_frName = a})

-- | The IP protocol to which this rule applies. Valid options are TCP, UDP,
-- ESP, AH, SCTP or ICMP. When the load balancing scheme is INTERNAL, only
-- TCP and UDP are valid. When the load balancing scheme is
-- INTERNAL_SELF_MANAGED, only TCPis valid.
frIPProtocol :: Lens' ForwardingRule (Maybe ForwardingRuleIPProtocol)
frIPProtocol
  = lens _frIPProtocol (\ s a -> s{_frIPProtocol = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
frCreationTimestamp :: Lens' ForwardingRule (Maybe Text)
frCreationTimestamp
  = lens _frCreationTimestamp
      (\ s a -> s{_frCreationTimestamp = a})

-- | This field is only used for INTERNAL load balancing. For internal load
-- balancing, this field identifies the subnetwork that the load balanced
-- IP should belong to for this Forwarding Rule. If the network specified
-- is in auto subnet mode, this field is optional. However, if the network
-- is in custom subnet mode, a subnetwork must be specified.
frSubnetwork :: Lens' ForwardingRule (Maybe Text)
frSubnetwork
  = lens _frSubnetwork (\ s a -> s{_frSubnetwork = a})

-- | This field is used along with the backend_service field for internal
-- load balancing. When the load balancing scheme is INTERNAL, a list of
-- ports can be configured, for example, [\'80\'], [\'8000\',\'9000\'] etc.
-- Only packets addressed to these ports will be forwarded to the backends
-- configured with this forwarding rule. You may specify a maximum of up to
-- 5 ports.
frPorts :: Lens' ForwardingRule [Text]
frPorts
  = lens _frPorts (\ s a -> s{_frPorts = a}) . _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
frId :: Lens' ForwardingRule (Maybe Word64)
frId
  = lens _frId (\ s a -> s{_frId = a}) .
      mapping _Coerce

-- | [Output Only] URL of the region where the regional forwarding rule
-- resides. This field is not applicable to global forwarding rules. You
-- must specify this field as part of the HTTP request URL. It is not
-- settable as a field in the request body.
frRegion :: Lens' ForwardingRule (Maybe Text)
frRegion = lens _frRegion (\ s a -> s{_frRegion = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
frDescription :: Lens' ForwardingRule (Maybe Text)
frDescription
  = lens _frDescription
      (\ s a -> s{_frDescription = a})

-- | The URL of the target resource to receive the matched traffic. For
-- regional forwarding rules, this target must live in the same region as
-- the forwarding rule. For global forwarding rules, this target must be a
-- global load balancing resource. The forwarded traffic must be of a type
-- appropriate to the target object. For INTERNAL_SELF_MANAGED\" load
-- balancing, only HTTP and HTTPS targets are valid.
frTarget :: Lens' ForwardingRule (Maybe Text)
frTarget = lens _frTarget (\ s a -> s{_frTarget = a})

-- | This field is only used for INTERNAL load balancing. For internal load
-- balancing, this field identifies the BackendService resource to receive
-- the matched traffic.
frBackendService :: Lens' ForwardingRule (Maybe Text)
frBackendService
  = lens _frBackendService
      (\ s a -> s{_frBackendService = a})

instance FromJSON ForwardingRule where
        parseJSON
          = withObject "ForwardingRule"
              (\ o ->
                 ForwardingRule' <$>
                   (o .:? "networkTier") <*> (o .:? "IPAddress") <*>
                     (o .:? "loadBalancingScheme")
                     <*> (o .:? "kind" .!= "compute#forwardingRule")
                     <*> (o .:? "ipVersion")
                     <*> (o .:? "network")
                     <*> (o .:? "portRange")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "IPProtocol")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "subnetwork")
                     <*> (o .:? "ports" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "description")
                     <*> (o .:? "target")
                     <*> (o .:? "backendService"))

instance ToJSON ForwardingRule where
        toJSON ForwardingRule'{..}
          = object
              (catMaybes
                 [("networkTier" .=) <$> _frNetworkTier,
                  ("IPAddress" .=) <$> _frIPAddress,
                  ("loadBalancingScheme" .=) <$>
                    _frLoadBalancingScheme,
                  Just ("kind" .= _frKind),
                  ("ipVersion" .=) <$> _frIPVersion,
                  ("network" .=) <$> _frNetwork,
                  ("portRange" .=) <$> _frPortRange,
                  ("selfLink" .=) <$> _frSelfLink,
                  ("name" .=) <$> _frName,
                  ("IPProtocol" .=) <$> _frIPProtocol,
                  ("creationTimestamp" .=) <$> _frCreationTimestamp,
                  ("subnetwork" .=) <$> _frSubnetwork,
                  ("ports" .=) <$> _frPorts, ("id" .=) <$> _frId,
                  ("region" .=) <$> _frRegion,
                  ("description" .=) <$> _frDescription,
                  ("target" .=) <$> _frTarget,
                  ("backendService" .=) <$> _frBackendService])

-- | Contains a list of UrlMap resources.
--
-- /See:/ 'urlMapList' smart constructor.
data URLMapList = URLMapList'
    { _umlNextPageToken :: !(Maybe Text)
    , _umlKind          :: !Text
    , _umlItems         :: !(Maybe [URLMap])
    , _umlSelfLink      :: !(Maybe Text)
    , _umlWarning       :: !(Maybe URLMapListWarning)
    , _umlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMapList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umlNextPageToken'
--
-- * 'umlKind'
--
-- * 'umlItems'
--
-- * 'umlSelfLink'
--
-- * 'umlWarning'
--
-- * 'umlId'
urlMapList
    :: URLMapList
urlMapList =
    URLMapList'
    { _umlNextPageToken = Nothing
    , _umlKind = "compute#urlMapList"
    , _umlItems = Nothing
    , _umlSelfLink = Nothing
    , _umlWarning = Nothing
    , _umlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
umlNextPageToken :: Lens' URLMapList (Maybe Text)
umlNextPageToken
  = lens _umlNextPageToken
      (\ s a -> s{_umlNextPageToken = a})

-- | Type of resource.
umlKind :: Lens' URLMapList Text
umlKind = lens _umlKind (\ s a -> s{_umlKind = a})

-- | A list of UrlMap resources.
umlItems :: Lens' URLMapList [URLMap]
umlItems
  = lens _umlItems (\ s a -> s{_umlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
umlSelfLink :: Lens' URLMapList (Maybe Text)
umlSelfLink
  = lens _umlSelfLink (\ s a -> s{_umlSelfLink = a})

-- | [Output Only] Informational warning message.
umlWarning :: Lens' URLMapList (Maybe URLMapListWarning)
umlWarning
  = lens _umlWarning (\ s a -> s{_umlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
umlId :: Lens' URLMapList (Maybe Text)
umlId = lens _umlId (\ s a -> s{_umlId = a})

instance FromJSON URLMapList where
        parseJSON
          = withObject "URLMapList"
              (\ o ->
                 URLMapList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#urlMapList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON URLMapList where
        toJSON URLMapList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _umlNextPageToken,
                  Just ("kind" .= _umlKind),
                  ("items" .=) <$> _umlItems,
                  ("selfLink" .=) <$> _umlSelfLink,
                  ("warning" .=) <$> _umlWarning,
                  ("id" .=) <$> _umlId])

--
-- /See:/ 'forwardingRulesScopedListWarningDataItem' smart constructor.
data ForwardingRulesScopedListWarningDataItem = ForwardingRulesScopedListWarningDataItem'
    { _frslwdiValue :: !(Maybe Text)
    , _frslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRulesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'frslwdiValue'
--
-- * 'frslwdiKey'
forwardingRulesScopedListWarningDataItem
    :: ForwardingRulesScopedListWarningDataItem
forwardingRulesScopedListWarningDataItem =
    ForwardingRulesScopedListWarningDataItem'
    { _frslwdiValue = Nothing
    , _frslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
frslwdiValue :: Lens' ForwardingRulesScopedListWarningDataItem (Maybe Text)
frslwdiValue
  = lens _frslwdiValue (\ s a -> s{_frslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
frslwdiKey :: Lens' ForwardingRulesScopedListWarningDataItem (Maybe Text)
frslwdiKey
  = lens _frslwdiKey (\ s a -> s{_frslwdiKey = a})

instance FromJSON
         ForwardingRulesScopedListWarningDataItem where
        parseJSON
          = withObject
              "ForwardingRulesScopedListWarningDataItem"
              (\ o ->
                 ForwardingRulesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         ForwardingRulesScopedListWarningDataItem where
        toJSON ForwardingRulesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _frslwdiValue,
                  ("key" .=) <$> _frslwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetInstanceAggregatedListWarning' smart constructor.
data TargetInstanceAggregatedListWarning = TargetInstanceAggregatedListWarning'
    { _tialwData    :: !(Maybe [TargetInstanceAggregatedListWarningDataItem])
    , _tialwCode    :: !(Maybe TargetInstanceAggregatedListWarningCode)
    , _tialwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstanceAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tialwData'
--
-- * 'tialwCode'
--
-- * 'tialwMessage'
targetInstanceAggregatedListWarning
    :: TargetInstanceAggregatedListWarning
targetInstanceAggregatedListWarning =
    TargetInstanceAggregatedListWarning'
    { _tialwData = Nothing
    , _tialwCode = Nothing
    , _tialwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tialwData :: Lens' TargetInstanceAggregatedListWarning [TargetInstanceAggregatedListWarningDataItem]
tialwData
  = lens _tialwData (\ s a -> s{_tialwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tialwCode :: Lens' TargetInstanceAggregatedListWarning (Maybe TargetInstanceAggregatedListWarningCode)
tialwCode
  = lens _tialwCode (\ s a -> s{_tialwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tialwMessage :: Lens' TargetInstanceAggregatedListWarning (Maybe Text)
tialwMessage
  = lens _tialwMessage (\ s a -> s{_tialwMessage = a})

instance FromJSON TargetInstanceAggregatedListWarning
         where
        parseJSON
          = withObject "TargetInstanceAggregatedListWarning"
              (\ o ->
                 TargetInstanceAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetInstanceAggregatedListWarning
         where
        toJSON TargetInstanceAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tialwData,
                  ("code" .=) <$> _tialwCode,
                  ("message" .=) <$> _tialwMessage])

--
-- /See:/ 'instanceGroupManagersScopedListWarningDataItem' smart constructor.
data InstanceGroupManagersScopedListWarningDataItem = InstanceGroupManagersScopedListWarningDataItem'
    { _igmslwdiValue :: !(Maybe Text)
    , _igmslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmslwdiValue'
--
-- * 'igmslwdiKey'
instanceGroupManagersScopedListWarningDataItem
    :: InstanceGroupManagersScopedListWarningDataItem
instanceGroupManagersScopedListWarningDataItem =
    InstanceGroupManagersScopedListWarningDataItem'
    { _igmslwdiValue = Nothing
    , _igmslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
igmslwdiValue :: Lens' InstanceGroupManagersScopedListWarningDataItem (Maybe Text)
igmslwdiValue
  = lens _igmslwdiValue
      (\ s a -> s{_igmslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
igmslwdiKey :: Lens' InstanceGroupManagersScopedListWarningDataItem (Maybe Text)
igmslwdiKey
  = lens _igmslwdiKey (\ s a -> s{_igmslwdiKey = a})

instance FromJSON
         InstanceGroupManagersScopedListWarningDataItem where
        parseJSON
          = withObject
              "InstanceGroupManagersScopedListWarningDataItem"
              (\ o ->
                 InstanceGroupManagersScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InstanceGroupManagersScopedListWarningDataItem where
        toJSON
          InstanceGroupManagersScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _igmslwdiValue,
                  ("key" .=) <$> _igmslwdiKey])

--
-- /See:/ 'subnetworksScopedList' smart constructor.
data SubnetworksScopedList = SubnetworksScopedList'
    { _sslSubnetworks :: !(Maybe [Subnetwork])
    , _sslWarning     :: !(Maybe SubnetworksScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworksScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sslSubnetworks'
--
-- * 'sslWarning'
subnetworksScopedList
    :: SubnetworksScopedList
subnetworksScopedList =
    SubnetworksScopedList'
    { _sslSubnetworks = Nothing
    , _sslWarning = Nothing
    }

-- | A list of subnetworks contained in this scope.
sslSubnetworks :: Lens' SubnetworksScopedList [Subnetwork]
sslSubnetworks
  = lens _sslSubnetworks
      (\ s a -> s{_sslSubnetworks = a})
      . _Default
      . _Coerce

-- | An informational warning that appears when the list of addresses is
-- empty.
sslWarning :: Lens' SubnetworksScopedList (Maybe SubnetworksScopedListWarning)
sslWarning
  = lens _sslWarning (\ s a -> s{_sslWarning = a})

instance FromJSON SubnetworksScopedList where
        parseJSON
          = withObject "SubnetworksScopedList"
              (\ o ->
                 SubnetworksScopedList' <$>
                   (o .:? "subnetworks" .!= mempty) <*>
                     (o .:? "warning"))

instance ToJSON SubnetworksScopedList where
        toJSON SubnetworksScopedList'{..}
          = object
              (catMaybes
                 [("subnetworks" .=) <$> _sslSubnetworks,
                  ("warning" .=) <$> _sslWarning])

-- | Contains a list of accelerator types.
--
-- /See:/ 'acceleratorTypeList' smart constructor.
data AcceleratorTypeList = AcceleratorTypeList'
    { _atlNextPageToken :: !(Maybe Text)
    , _atlKind          :: !Text
    , _atlItems         :: !(Maybe [AcceleratorType])
    , _atlSelfLink      :: !(Maybe Text)
    , _atlWarning       :: !(Maybe AcceleratorTypeListWarning)
    , _atlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypeList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atlNextPageToken'
--
-- * 'atlKind'
--
-- * 'atlItems'
--
-- * 'atlSelfLink'
--
-- * 'atlWarning'
--
-- * 'atlId'
acceleratorTypeList
    :: AcceleratorTypeList
acceleratorTypeList =
    AcceleratorTypeList'
    { _atlNextPageToken = Nothing
    , _atlKind = "compute#acceleratorTypeList"
    , _atlItems = Nothing
    , _atlSelfLink = Nothing
    , _atlWarning = Nothing
    , _atlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
atlNextPageToken :: Lens' AcceleratorTypeList (Maybe Text)
atlNextPageToken
  = lens _atlNextPageToken
      (\ s a -> s{_atlNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#acceleratorTypeList for
-- lists of accelerator types.
atlKind :: Lens' AcceleratorTypeList Text
atlKind = lens _atlKind (\ s a -> s{_atlKind = a})

-- | A list of AcceleratorType resources.
atlItems :: Lens' AcceleratorTypeList [AcceleratorType]
atlItems
  = lens _atlItems (\ s a -> s{_atlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
atlSelfLink :: Lens' AcceleratorTypeList (Maybe Text)
atlSelfLink
  = lens _atlSelfLink (\ s a -> s{_atlSelfLink = a})

-- | [Output Only] Informational warning message.
atlWarning :: Lens' AcceleratorTypeList (Maybe AcceleratorTypeListWarning)
atlWarning
  = lens _atlWarning (\ s a -> s{_atlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
atlId :: Lens' AcceleratorTypeList (Maybe Text)
atlId = lens _atlId (\ s a -> s{_atlId = a})

instance FromJSON AcceleratorTypeList where
        parseJSON
          = withObject "AcceleratorTypeList"
              (\ o ->
                 AcceleratorTypeList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#acceleratorTypeList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON AcceleratorTypeList where
        toJSON AcceleratorTypeList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _atlNextPageToken,
                  Just ("kind" .= _atlKind),
                  ("items" .=) <$> _atlItems,
                  ("selfLink" .=) <$> _atlSelfLink,
                  ("warning" .=) <$> _atlWarning,
                  ("id" .=) <$> _atlId])

--
-- /See:/ 'diskAggregatedListWarningDataItem' smart constructor.
data DiskAggregatedListWarningDataItem = DiskAggregatedListWarningDataItem'
    { _dalwdiValue :: !(Maybe Text)
    , _dalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dalwdiValue'
--
-- * 'dalwdiKey'
diskAggregatedListWarningDataItem
    :: DiskAggregatedListWarningDataItem
diskAggregatedListWarningDataItem =
    DiskAggregatedListWarningDataItem'
    { _dalwdiValue = Nothing
    , _dalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
dalwdiValue :: Lens' DiskAggregatedListWarningDataItem (Maybe Text)
dalwdiValue
  = lens _dalwdiValue (\ s a -> s{_dalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
dalwdiKey :: Lens' DiskAggregatedListWarningDataItem (Maybe Text)
dalwdiKey
  = lens _dalwdiKey (\ s a -> s{_dalwdiKey = a})

instance FromJSON DiskAggregatedListWarningDataItem
         where
        parseJSON
          = withObject "DiskAggregatedListWarningDataItem"
              (\ o ->
                 DiskAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON DiskAggregatedListWarningDataItem
         where
        toJSON DiskAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _dalwdiValue,
                  ("key" .=) <$> _dalwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetPoolListWarning' smart constructor.
data TargetPoolListWarning = TargetPoolListWarning'
    { _tplwData    :: !(Maybe [TargetPoolListWarningDataItem])
    , _tplwCode    :: !(Maybe TargetPoolListWarningCode)
    , _tplwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tplwData'
--
-- * 'tplwCode'
--
-- * 'tplwMessage'
targetPoolListWarning
    :: TargetPoolListWarning
targetPoolListWarning =
    TargetPoolListWarning'
    { _tplwData = Nothing
    , _tplwCode = Nothing
    , _tplwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tplwData :: Lens' TargetPoolListWarning [TargetPoolListWarningDataItem]
tplwData
  = lens _tplwData (\ s a -> s{_tplwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tplwCode :: Lens' TargetPoolListWarning (Maybe TargetPoolListWarningCode)
tplwCode = lens _tplwCode (\ s a -> s{_tplwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tplwMessage :: Lens' TargetPoolListWarning (Maybe Text)
tplwMessage
  = lens _tplwMessage (\ s a -> s{_tplwMessage = a})

instance FromJSON TargetPoolListWarning where
        parseJSON
          = withObject "TargetPoolListWarning"
              (\ o ->
                 TargetPoolListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetPoolListWarning where
        toJSON TargetPoolListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tplwData,
                  ("code" .=) <$> _tplwCode,
                  ("message" .=) <$> _tplwMessage])

-- | [Output Only] An informational warning that appears when the node
-- templates list is empty.
--
-- /See:/ 'nodeTemplatesScopedListWarning' smart constructor.
data NodeTemplatesScopedListWarning = NodeTemplatesScopedListWarning'
    { _nData    :: !(Maybe [NodeTemplatesScopedListWarningDataItem])
    , _nCode    :: !(Maybe NodeTemplatesScopedListWarningCode)
    , _nMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplatesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nData'
--
-- * 'nCode'
--
-- * 'nMessage'
nodeTemplatesScopedListWarning
    :: NodeTemplatesScopedListWarning
nodeTemplatesScopedListWarning =
    NodeTemplatesScopedListWarning'
    { _nData = Nothing
    , _nCode = Nothing
    , _nMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
nData :: Lens' NodeTemplatesScopedListWarning [NodeTemplatesScopedListWarningDataItem]
nData
  = lens _nData (\ s a -> s{_nData = a}) . _Default .
      _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
nCode :: Lens' NodeTemplatesScopedListWarning (Maybe NodeTemplatesScopedListWarningCode)
nCode = lens _nCode (\ s a -> s{_nCode = a})

-- | [Output Only] A human-readable description of the warning code.
nMessage :: Lens' NodeTemplatesScopedListWarning (Maybe Text)
nMessage = lens _nMessage (\ s a -> s{_nMessage = a})

instance FromJSON NodeTemplatesScopedListWarning
         where
        parseJSON
          = withObject "NodeTemplatesScopedListWarning"
              (\ o ->
                 NodeTemplatesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeTemplatesScopedListWarning where
        toJSON NodeTemplatesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _nData, ("code" .=) <$> _nCode,
                  ("message" .=) <$> _nMessage])

--
-- /See:/ 'targetPoolAggregatedListWarningDataItem' smart constructor.
data TargetPoolAggregatedListWarningDataItem = TargetPoolAggregatedListWarningDataItem'
    { _tpalwdiValue :: !(Maybe Text)
    , _tpalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpalwdiValue'
--
-- * 'tpalwdiKey'
targetPoolAggregatedListWarningDataItem
    :: TargetPoolAggregatedListWarningDataItem
targetPoolAggregatedListWarningDataItem =
    TargetPoolAggregatedListWarningDataItem'
    { _tpalwdiValue = Nothing
    , _tpalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tpalwdiValue :: Lens' TargetPoolAggregatedListWarningDataItem (Maybe Text)
tpalwdiValue
  = lens _tpalwdiValue (\ s a -> s{_tpalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tpalwdiKey :: Lens' TargetPoolAggregatedListWarningDataItem (Maybe Text)
tpalwdiKey
  = lens _tpalwdiKey (\ s a -> s{_tpalwdiKey = a})

instance FromJSON
         TargetPoolAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "TargetPoolAggregatedListWarningDataItem"
              (\ o ->
                 TargetPoolAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         TargetPoolAggregatedListWarningDataItem where
        toJSON TargetPoolAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tpalwdiValue,
                  ("key" .=) <$> _tpalwdiKey])

-- | A Project resource. For an overview of projects, see Cloud Platform
-- Resource Hierarchy. (== resource_for v1.projects ==) (== resource_for
-- beta.projects ==)
--
-- /See:/ 'project' smart constructor.
data Project = Project'
    { _pXpnProjectStatus       :: !(Maybe ProjectXpnProjectStatus)
    , _pKind                   :: !Text
    , _pUsageExportLocation    :: !(Maybe UsageExportLocation)
    , _pSelfLink               :: !(Maybe Text)
    , _pName                   :: !(Maybe Text)
    , _pDefaultServiceAccount  :: !(Maybe Text)
    , _pDefaultNetworkTier     :: !(Maybe ProjectDefaultNetworkTier)
    , _pCreationTimestamp      :: !(Maybe Text)
    , _pEnabledFeatures        :: !(Maybe [Text])
    , _pQuotas                 :: !(Maybe [Quota])
    , _pId                     :: !(Maybe (Textual Word64))
    , _pDescription            :: !(Maybe Text)
    , _pCommonInstanceMetadata :: !(Maybe Metadata)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Project' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pXpnProjectStatus'
--
-- * 'pKind'
--
-- * 'pUsageExportLocation'
--
-- * 'pSelfLink'
--
-- * 'pName'
--
-- * 'pDefaultServiceAccount'
--
-- * 'pDefaultNetworkTier'
--
-- * 'pCreationTimestamp'
--
-- * 'pEnabledFeatures'
--
-- * 'pQuotas'
--
-- * 'pId'
--
-- * 'pDescription'
--
-- * 'pCommonInstanceMetadata'
project
    :: Project
project =
    Project'
    { _pXpnProjectStatus = Nothing
    , _pKind = "compute#project"
    , _pUsageExportLocation = Nothing
    , _pSelfLink = Nothing
    , _pName = Nothing
    , _pDefaultServiceAccount = Nothing
    , _pDefaultNetworkTier = Nothing
    , _pCreationTimestamp = Nothing
    , _pEnabledFeatures = Nothing
    , _pQuotas = Nothing
    , _pId = Nothing
    , _pDescription = Nothing
    , _pCommonInstanceMetadata = Nothing
    }

-- | [Output Only] The role this project has in a shared VPC configuration.
-- Currently only HOST projects are differentiated.
pXpnProjectStatus :: Lens' Project (Maybe ProjectXpnProjectStatus)
pXpnProjectStatus
  = lens _pXpnProjectStatus
      (\ s a -> s{_pXpnProjectStatus = a})

-- | [Output Only] Type of the resource. Always compute#project for projects.
pKind :: Lens' Project Text
pKind = lens _pKind (\ s a -> s{_pKind = a})

-- | The naming prefix for daily usage reports and the Google Cloud Storage
-- bucket where they are stored.
pUsageExportLocation :: Lens' Project (Maybe UsageExportLocation)
pUsageExportLocation
  = lens _pUsageExportLocation
      (\ s a -> s{_pUsageExportLocation = a})

-- | [Output Only] Server-defined URL for the resource.
pSelfLink :: Lens' Project (Maybe Text)
pSelfLink
  = lens _pSelfLink (\ s a -> s{_pSelfLink = a})

-- | The project ID. For example: my-example-project. Use the project ID to
-- make requests to Compute Engine.
pName :: Lens' Project (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})

-- | [Output Only] Default service account used by VMs running in this
-- project.
pDefaultServiceAccount :: Lens' Project (Maybe Text)
pDefaultServiceAccount
  = lens _pDefaultServiceAccount
      (\ s a -> s{_pDefaultServiceAccount = a})

-- | This signifies the default network tier used for configuring resources
-- of the project and can only take the following values: PREMIUM,
-- STANDARD. Initially the default network tier is PREMIUM.
pDefaultNetworkTier :: Lens' Project (Maybe ProjectDefaultNetworkTier)
pDefaultNetworkTier
  = lens _pDefaultNetworkTier
      (\ s a -> s{_pDefaultNetworkTier = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
pCreationTimestamp :: Lens' Project (Maybe Text)
pCreationTimestamp
  = lens _pCreationTimestamp
      (\ s a -> s{_pCreationTimestamp = a})

-- | Restricted features enabled for use on this project.
pEnabledFeatures :: Lens' Project [Text]
pEnabledFeatures
  = lens _pEnabledFeatures
      (\ s a -> s{_pEnabledFeatures = a})
      . _Default
      . _Coerce

-- | [Output Only] Quotas assigned to this project.
pQuotas :: Lens' Project [Quota]
pQuotas
  = lens _pQuotas (\ s a -> s{_pQuotas = a}) . _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server. This is not the project ID, and is just a unique
-- ID used by Compute Engine to identify resources.
pId :: Lens' Project (Maybe Word64)
pId
  = lens _pId (\ s a -> s{_pId = a}) . mapping _Coerce

-- | An optional textual description of the resource.
pDescription :: Lens' Project (Maybe Text)
pDescription
  = lens _pDescription (\ s a -> s{_pDescription = a})

-- | Metadata key\/value pairs available to all instances contained in this
-- project. See Custom metadata for more information.
pCommonInstanceMetadata :: Lens' Project (Maybe Metadata)
pCommonInstanceMetadata
  = lens _pCommonInstanceMetadata
      (\ s a -> s{_pCommonInstanceMetadata = a})

instance FromJSON Project where
        parseJSON
          = withObject "Project"
              (\ o ->
                 Project' <$>
                   (o .:? "xpnProjectStatus") <*>
                     (o .:? "kind" .!= "compute#project")
                     <*> (o .:? "usageExportLocation")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "defaultServiceAccount")
                     <*> (o .:? "defaultNetworkTier")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "enabledFeatures" .!= mempty)
                     <*> (o .:? "quotas" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "description")
                     <*> (o .:? "commonInstanceMetadata"))

instance ToJSON Project where
        toJSON Project'{..}
          = object
              (catMaybes
                 [("xpnProjectStatus" .=) <$> _pXpnProjectStatus,
                  Just ("kind" .= _pKind),
                  ("usageExportLocation" .=) <$> _pUsageExportLocation,
                  ("selfLink" .=) <$> _pSelfLink,
                  ("name" .=) <$> _pName,
                  ("defaultServiceAccount" .=) <$>
                    _pDefaultServiceAccount,
                  ("defaultNetworkTier" .=) <$> _pDefaultNetworkTier,
                  ("creationTimestamp" .=) <$> _pCreationTimestamp,
                  ("enabledFeatures" .=) <$> _pEnabledFeatures,
                  ("quotas" .=) <$> _pQuotas, ("id" .=) <$> _pId,
                  ("description" .=) <$> _pDescription,
                  ("commonInstanceMetadata" .=) <$>
                    _pCommonInstanceMetadata])

--
-- /See:/ 'regionInstanceGroupManagersListInstancesResponse' smart constructor.
newtype RegionInstanceGroupManagersListInstancesResponse = RegionInstanceGroupManagersListInstancesResponse'
    { _rigmlirManagedInstances :: Maybe [ManagedInstance]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagersListInstancesResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmlirManagedInstances'
regionInstanceGroupManagersListInstancesResponse
    :: RegionInstanceGroupManagersListInstancesResponse
regionInstanceGroupManagersListInstancesResponse =
    RegionInstanceGroupManagersListInstancesResponse'
    { _rigmlirManagedInstances = Nothing
    }

-- | A list of managed instances.
rigmlirManagedInstances :: Lens' RegionInstanceGroupManagersListInstancesResponse [ManagedInstance]
rigmlirManagedInstances
  = lens _rigmlirManagedInstances
      (\ s a -> s{_rigmlirManagedInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         RegionInstanceGroupManagersListInstancesResponse
         where
        parseJSON
          = withObject
              "RegionInstanceGroupManagersListInstancesResponse"
              (\ o ->
                 RegionInstanceGroupManagersListInstancesResponse' <$>
                   (o .:? "managedInstances" .!= mempty))

instance ToJSON
         RegionInstanceGroupManagersListInstancesResponse
         where
        toJSON
          RegionInstanceGroupManagersListInstancesResponse'{..}
          = object
              (catMaybes
                 [("managedInstances" .=) <$>
                    _rigmlirManagedInstances])

-- | An Operation resource, used to manage asynchronous API requests. (==
-- resource_for v1.globalOperations ==) (== resource_for
-- beta.globalOperations ==) (== resource_for v1.regionOperations ==) (==
-- resource_for beta.regionOperations ==) (== resource_for
-- v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
--
-- /See:/ 'operation' smart constructor.
data Operation = Operation'
    { _oTargetId            :: !(Maybe (Textual Word64))
    , _oStatus              :: !(Maybe OperationStatus)
    , _oInsertTime          :: !(Maybe Text)
    , _oProgress            :: !(Maybe (Textual Int32))
    , _oStartTime           :: !(Maybe Text)
    , _oKind                :: !Text
    , _oError               :: !(Maybe OperationError)
    , _oHTTPErrorMessage    :: !(Maybe Text)
    , _oZone                :: !(Maybe Text)
    , _oWarnings            :: !(Maybe [OperationWarningsItem])
    , _oHTTPErrorStatusCode :: !(Maybe (Textual Int32))
    , _oUser                :: !(Maybe Text)
    , _oSelfLink            :: !(Maybe Text)
    , _oName                :: !(Maybe Text)
    , _oStatusMessage       :: !(Maybe Text)
    , _oCreationTimestamp   :: !(Maybe Text)
    , _oEndTime             :: !(Maybe Text)
    , _oId                  :: !(Maybe (Textual Word64))
    , _oOperationType       :: !(Maybe Text)
    , _oRegion              :: !(Maybe Text)
    , _oDescription         :: !(Maybe Text)
    , _oTargetLink          :: !(Maybe Text)
    , _oClientOperationId   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Operation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oTargetId'
--
-- * 'oStatus'
--
-- * 'oInsertTime'
--
-- * 'oProgress'
--
-- * 'oStartTime'
--
-- * 'oKind'
--
-- * 'oError'
--
-- * 'oHTTPErrorMessage'
--
-- * 'oZone'
--
-- * 'oWarnings'
--
-- * 'oHTTPErrorStatusCode'
--
-- * 'oUser'
--
-- * 'oSelfLink'
--
-- * 'oName'
--
-- * 'oStatusMessage'
--
-- * 'oCreationTimestamp'
--
-- * 'oEndTime'
--
-- * 'oId'
--
-- * 'oOperationType'
--
-- * 'oRegion'
--
-- * 'oDescription'
--
-- * 'oTargetLink'
--
-- * 'oClientOperationId'
operation
    :: Operation
operation =
    Operation'
    { _oTargetId = Nothing
    , _oStatus = Nothing
    , _oInsertTime = Nothing
    , _oProgress = Nothing
    , _oStartTime = Nothing
    , _oKind = "compute#operation"
    , _oError = Nothing
    , _oHTTPErrorMessage = Nothing
    , _oZone = Nothing
    , _oWarnings = Nothing
    , _oHTTPErrorStatusCode = Nothing
    , _oUser = Nothing
    , _oSelfLink = Nothing
    , _oName = Nothing
    , _oStatusMessage = Nothing
    , _oCreationTimestamp = Nothing
    , _oEndTime = Nothing
    , _oId = Nothing
    , _oOperationType = Nothing
    , _oRegion = Nothing
    , _oDescription = Nothing
    , _oTargetLink = Nothing
    , _oClientOperationId = Nothing
    }

-- | [Output Only] The unique target ID, which identifies a specific
-- incarnation of the target resource.
oTargetId :: Lens' Operation (Maybe Word64)
oTargetId
  = lens _oTargetId (\ s a -> s{_oTargetId = a}) .
      mapping _Coerce

-- | [Output Only] The status of the operation, which can be one of the
-- following: PENDING, RUNNING, or DONE.
oStatus :: Lens' Operation (Maybe OperationStatus)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a})

-- | [Output Only] The time that this operation was requested. This value is
-- in RFC3339 text format.
oInsertTime :: Lens' Operation (Maybe Text)
oInsertTime
  = lens _oInsertTime (\ s a -> s{_oInsertTime = a})

-- | [Output Only] An optional progress indicator that ranges from 0 to 100.
-- There is no requirement that this be linear or support any granularity
-- of operations. This should not be used to guess when the operation will
-- be complete. This number should monotonically increase as the operation
-- progresses.
oProgress :: Lens' Operation (Maybe Int32)
oProgress
  = lens _oProgress (\ s a -> s{_oProgress = a}) .
      mapping _Coerce

-- | [Output Only] The time that this operation was started by the server.
-- This value is in RFC3339 text format.
oStartTime :: Lens' Operation (Maybe Text)
oStartTime
  = lens _oStartTime (\ s a -> s{_oStartTime = a})

-- | [Output Only] Type of the resource. Always compute#operation for
-- Operation resources.
oKind :: Lens' Operation Text
oKind = lens _oKind (\ s a -> s{_oKind = a})

-- | [Output Only] If errors are generated during processing of the
-- operation, this field will be populated.
oError :: Lens' Operation (Maybe OperationError)
oError = lens _oError (\ s a -> s{_oError = a})

-- | [Output Only] If the operation fails, this field contains the HTTP error
-- message that was returned, such as NOT FOUND.
oHTTPErrorMessage :: Lens' Operation (Maybe Text)
oHTTPErrorMessage
  = lens _oHTTPErrorMessage
      (\ s a -> s{_oHTTPErrorMessage = a})

-- | [Output Only] The URL of the zone where the operation resides. Only
-- available when performing per-zone operations. You must specify this
-- field as part of the HTTP request URL. It is not settable as a field in
-- the request body.
oZone :: Lens' Operation (Maybe Text)
oZone = lens _oZone (\ s a -> s{_oZone = a})

-- | [Output Only] If warning messages are generated during processing of the
-- operation, this field will be populated.
oWarnings :: Lens' Operation [OperationWarningsItem]
oWarnings
  = lens _oWarnings (\ s a -> s{_oWarnings = a}) .
      _Default
      . _Coerce

-- | [Output Only] If the operation fails, this field contains the HTTP error
-- status code that was returned. For example, a 404 means the resource was
-- not found.
oHTTPErrorStatusCode :: Lens' Operation (Maybe Int32)
oHTTPErrorStatusCode
  = lens _oHTTPErrorStatusCode
      (\ s a -> s{_oHTTPErrorStatusCode = a})
      . mapping _Coerce

-- | [Output Only] User who requested the operation, for example:
-- user\'example.com.
oUser :: Lens' Operation (Maybe Text)
oUser = lens _oUser (\ s a -> s{_oUser = a})

-- | [Output Only] Server-defined URL for the resource.
oSelfLink :: Lens' Operation (Maybe Text)
oSelfLink
  = lens _oSelfLink (\ s a -> s{_oSelfLink = a})

-- | [Output Only] Name of the resource.
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})

-- | [Output Only] An optional textual description of the current status of
-- the operation.
oStatusMessage :: Lens' Operation (Maybe Text)
oStatusMessage
  = lens _oStatusMessage
      (\ s a -> s{_oStatusMessage = a})

-- | [Deprecated] This field is deprecated.
oCreationTimestamp :: Lens' Operation (Maybe Text)
oCreationTimestamp
  = lens _oCreationTimestamp
      (\ s a -> s{_oCreationTimestamp = a})

-- | [Output Only] The time that this operation was completed. This value is
-- in RFC3339 text format.
oEndTime :: Lens' Operation (Maybe Text)
oEndTime = lens _oEndTime (\ s a -> s{_oEndTime = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
oId :: Lens' Operation (Maybe Word64)
oId
  = lens _oId (\ s a -> s{_oId = a}) . mapping _Coerce

-- | [Output Only] The type of operation, such as insert, update, or delete,
-- and so on.
oOperationType :: Lens' Operation (Maybe Text)
oOperationType
  = lens _oOperationType
      (\ s a -> s{_oOperationType = a})

-- | [Output Only] The URL of the region where the operation resides. Only
-- available when performing regional operations. You must specify this
-- field as part of the HTTP request URL. It is not settable as a field in
-- the request body.
oRegion :: Lens' Operation (Maybe Text)
oRegion = lens _oRegion (\ s a -> s{_oRegion = a})

-- | [Output Only] A textual description of the operation, which is set when
-- the operation is created.
oDescription :: Lens' Operation (Maybe Text)
oDescription
  = lens _oDescription (\ s a -> s{_oDescription = a})

-- | [Output Only] The URL of the resource that the operation modifies. For
-- operations related to creating a snapshot, this points to the persistent
-- disk that the snapshot was created from.
oTargetLink :: Lens' Operation (Maybe Text)
oTargetLink
  = lens _oTargetLink (\ s a -> s{_oTargetLink = a})

-- | [Output Only] The value of \`requestId\` if you provided it in the
-- request. Not present otherwise.
oClientOperationId :: Lens' Operation (Maybe Text)
oClientOperationId
  = lens _oClientOperationId
      (\ s a -> s{_oClientOperationId = a})

instance FromJSON Operation where
        parseJSON
          = withObject "Operation"
              (\ o ->
                 Operation' <$>
                   (o .:? "targetId") <*> (o .:? "status") <*>
                     (o .:? "insertTime")
                     <*> (o .:? "progress")
                     <*> (o .:? "startTime")
                     <*> (o .:? "kind" .!= "compute#operation")
                     <*> (o .:? "error")
                     <*> (o .:? "httpErrorMessage")
                     <*> (o .:? "zone")
                     <*> (o .:? "warnings" .!= mempty)
                     <*> (o .:? "httpErrorStatusCode")
                     <*> (o .:? "user")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "statusMessage")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "endTime")
                     <*> (o .:? "id")
                     <*> (o .:? "operationType")
                     <*> (o .:? "region")
                     <*> (o .:? "description")
                     <*> (o .:? "targetLink")
                     <*> (o .:? "clientOperationId"))

instance ToJSON Operation where
        toJSON Operation'{..}
          = object
              (catMaybes
                 [("targetId" .=) <$> _oTargetId,
                  ("status" .=) <$> _oStatus,
                  ("insertTime" .=) <$> _oInsertTime,
                  ("progress" .=) <$> _oProgress,
                  ("startTime" .=) <$> _oStartTime,
                  Just ("kind" .= _oKind), ("error" .=) <$> _oError,
                  ("httpErrorMessage" .=) <$> _oHTTPErrorMessage,
                  ("zone" .=) <$> _oZone,
                  ("warnings" .=) <$> _oWarnings,
                  ("httpErrorStatusCode" .=) <$> _oHTTPErrorStatusCode,
                  ("user" .=) <$> _oUser,
                  ("selfLink" .=) <$> _oSelfLink,
                  ("name" .=) <$> _oName,
                  ("statusMessage" .=) <$> _oStatusMessage,
                  ("creationTimestamp" .=) <$> _oCreationTimestamp,
                  ("endTime" .=) <$> _oEndTime, ("id" .=) <$> _oId,
                  ("operationType" .=) <$> _oOperationType,
                  ("region" .=) <$> _oRegion,
                  ("description" .=) <$> _oDescription,
                  ("targetLink" .=) <$> _oTargetLink,
                  ("clientOperationId" .=) <$> _oClientOperationId])

--
-- /See:/ 'disksScopedListWarningDataItem' smart constructor.
data DisksScopedListWarningDataItem = DisksScopedListWarningDataItem'
    { _dslwdiValue :: !(Maybe Text)
    , _dslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DisksScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dslwdiValue'
--
-- * 'dslwdiKey'
disksScopedListWarningDataItem
    :: DisksScopedListWarningDataItem
disksScopedListWarningDataItem =
    DisksScopedListWarningDataItem'
    { _dslwdiValue = Nothing
    , _dslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
dslwdiValue :: Lens' DisksScopedListWarningDataItem (Maybe Text)
dslwdiValue
  = lens _dslwdiValue (\ s a -> s{_dslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
dslwdiKey :: Lens' DisksScopedListWarningDataItem (Maybe Text)
dslwdiKey
  = lens _dslwdiKey (\ s a -> s{_dslwdiKey = a})

instance FromJSON DisksScopedListWarningDataItem
         where
        parseJSON
          = withObject "DisksScopedListWarningDataItem"
              (\ o ->
                 DisksScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON DisksScopedListWarningDataItem where
        toJSON DisksScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _dslwdiValue,
                  ("key" .=) <$> _dslwdiKey])

-- | A Disk resource. (== resource_for beta.disks ==) (== resource_for
-- v1.disks ==)
--
-- /See:/ 'disk' smart constructor.
data Disk = Disk'
    { _dStatus                      :: !(Maybe DiskStatus)
    , _dSourceSnapshotId            :: !(Maybe Text)
    , _dLastAttachTimestamp         :: !(Maybe Text)
    , _dUsers                       :: !(Maybe [Text])
    , _dSourceImage                 :: !(Maybe Text)
    , _dReplicaZones                :: !(Maybe [Text])
    , _dDiskEncryptionKey           :: !(Maybe CustomerEncryptionKey)
    , _dSizeGb                      :: !(Maybe (Textual Int64))
    , _dKind                        :: !Text
    , _dLastDetachTimestamp         :: !(Maybe Text)
    , _dGuestOSFeatures             :: !(Maybe [GuestOSFeature])
    , _dZone                        :: !(Maybe Text)
    , _dSelfLink                    :: !(Maybe Text)
    , _dName                        :: !(Maybe Text)
    , _dSourceImageId               :: !(Maybe Text)
    , _dCreationTimestamp           :: !(Maybe Text)
    , _dSourceImageEncryptionKey    :: !(Maybe CustomerEncryptionKey)
    , _dLicenseCodes                :: !(Maybe [Textual Int64])
    , _dId                          :: !(Maybe (Textual Word64))
    , _dLabels                      :: !(Maybe DiskLabels)
    , _dLicenses                    :: !(Maybe [Text])
    , _dRegion                      :: !(Maybe Text)
    , _dOptions                     :: !(Maybe Text)
    , _dPhysicalBlockSizeBytes      :: !(Maybe (Textual Int64))
    , _dType                        :: !(Maybe Text)
    , _dLabelFingerprint            :: !(Maybe Bytes)
    , _dDescription                 :: !(Maybe Text)
    , _dSourceSnapshotEncryptionKey :: !(Maybe CustomerEncryptionKey)
    , _dSourceSnapshot              :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Disk' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dStatus'
--
-- * 'dSourceSnapshotId'
--
-- * 'dLastAttachTimestamp'
--
-- * 'dUsers'
--
-- * 'dSourceImage'
--
-- * 'dReplicaZones'
--
-- * 'dDiskEncryptionKey'
--
-- * 'dSizeGb'
--
-- * 'dKind'
--
-- * 'dLastDetachTimestamp'
--
-- * 'dGuestOSFeatures'
--
-- * 'dZone'
--
-- * 'dSelfLink'
--
-- * 'dName'
--
-- * 'dSourceImageId'
--
-- * 'dCreationTimestamp'
--
-- * 'dSourceImageEncryptionKey'
--
-- * 'dLicenseCodes'
--
-- * 'dId'
--
-- * 'dLabels'
--
-- * 'dLicenses'
--
-- * 'dRegion'
--
-- * 'dOptions'
--
-- * 'dPhysicalBlockSizeBytes'
--
-- * 'dType'
--
-- * 'dLabelFingerprint'
--
-- * 'dDescription'
--
-- * 'dSourceSnapshotEncryptionKey'
--
-- * 'dSourceSnapshot'
disk
    :: Disk
disk =
    Disk'
    { _dStatus = Nothing
    , _dSourceSnapshotId = Nothing
    , _dLastAttachTimestamp = Nothing
    , _dUsers = Nothing
    , _dSourceImage = Nothing
    , _dReplicaZones = Nothing
    , _dDiskEncryptionKey = Nothing
    , _dSizeGb = Nothing
    , _dKind = "compute#disk"
    , _dLastDetachTimestamp = Nothing
    , _dGuestOSFeatures = Nothing
    , _dZone = Nothing
    , _dSelfLink = Nothing
    , _dName = Nothing
    , _dSourceImageId = Nothing
    , _dCreationTimestamp = Nothing
    , _dSourceImageEncryptionKey = Nothing
    , _dLicenseCodes = Nothing
    , _dId = Nothing
    , _dLabels = Nothing
    , _dLicenses = Nothing
    , _dRegion = Nothing
    , _dOptions = Nothing
    , _dPhysicalBlockSizeBytes = Nothing
    , _dType = Nothing
    , _dLabelFingerprint = Nothing
    , _dDescription = Nothing
    , _dSourceSnapshotEncryptionKey = Nothing
    , _dSourceSnapshot = Nothing
    }

-- | [Output Only] The status of disk creation.
dStatus :: Lens' Disk (Maybe DiskStatus)
dStatus = lens _dStatus (\ s a -> s{_dStatus = a})

-- | [Output Only] The unique ID of the snapshot used to create this disk.
-- This value identifies the exact snapshot that was used to create this
-- persistent disk. For example, if you created the persistent disk from a
-- snapshot that was later deleted and recreated under the same name, the
-- source snapshot ID would identify the exact version of the snapshot that
-- was used.
dSourceSnapshotId :: Lens' Disk (Maybe Text)
dSourceSnapshotId
  = lens _dSourceSnapshotId
      (\ s a -> s{_dSourceSnapshotId = a})

-- | [Output Only] Last attach timestamp in RFC3339 text format.
dLastAttachTimestamp :: Lens' Disk (Maybe Text)
dLastAttachTimestamp
  = lens _dLastAttachTimestamp
      (\ s a -> s{_dLastAttachTimestamp = a})

-- | [Output Only] Links to the users of the disk (attached instances) in
-- form: project\/zones\/zone\/instances\/instance
dUsers :: Lens' Disk [Text]
dUsers
  = lens _dUsers (\ s a -> s{_dUsers = a}) . _Default .
      _Coerce

-- | The source image used to create this disk. If the source image is
-- deleted, this field will not be set. To create a disk with one of the
-- public operating system images, specify the image by its family name.
-- For example, specify family\/debian-9 to use the latest Debian 9 image:
-- projects\/debian-cloud\/global\/images\/family\/debian-9 Alternatively,
-- use a specific version of a public operating system image:
-- projects\/debian-cloud\/global\/images\/debian-9-stretch-vYYYYMMDD To
-- create a disk with a custom image that you created, specify the image
-- name in the following format: global\/images\/my-custom-image You can
-- also specify a custom image by its image family, which returns the
-- latest version of the image in that family. Replace the image name with
-- family\/family-name: global\/images\/family\/my-image-family
dSourceImage :: Lens' Disk (Maybe Text)
dSourceImage
  = lens _dSourceImage (\ s a -> s{_dSourceImage = a})

-- | URLs of the zones where the disk should be replicated to. Only
-- applicable for regional resources.
dReplicaZones :: Lens' Disk [Text]
dReplicaZones
  = lens _dReplicaZones
      (\ s a -> s{_dReplicaZones = a})
      . _Default
      . _Coerce

-- | Encrypts the disk using a customer-supplied encryption key. After you
-- encrypt a disk with a customer-supplied key, you must provide the same
-- key if you use the disk later (e.g. to create a disk snapshot or an
-- image, or to attach the disk to a virtual machine). Customer-supplied
-- encryption keys do not protect access to metadata of the disk. If you do
-- not provide an encryption key when creating the disk, then the disk will
-- be encrypted using an automatically generated key and you do not need to
-- provide a key to use the disk later.
dDiskEncryptionKey :: Lens' Disk (Maybe CustomerEncryptionKey)
dDiskEncryptionKey
  = lens _dDiskEncryptionKey
      (\ s a -> s{_dDiskEncryptionKey = a})

-- | Size of the persistent disk, specified in GB. You can specify this field
-- when creating a persistent disk using the sourceImage or sourceSnapshot
-- parameter, or specify it alone to create an empty persistent disk. If
-- you specify this field along with sourceImage or sourceSnapshot, the
-- value of sizeGb must not be less than the size of the sourceImage or the
-- size of the snapshot. Acceptable values are 1 to 65536, inclusive.
dSizeGb :: Lens' Disk (Maybe Int64)
dSizeGb
  = lens _dSizeGb (\ s a -> s{_dSizeGb = a}) .
      mapping _Coerce

-- | [Output Only] Type of the resource. Always compute#disk for disks.
dKind :: Lens' Disk Text
dKind = lens _dKind (\ s a -> s{_dKind = a})

-- | [Output Only] Last detach timestamp in RFC3339 text format.
dLastDetachTimestamp :: Lens' Disk (Maybe Text)
dLastDetachTimestamp
  = lens _dLastDetachTimestamp
      (\ s a -> s{_dLastDetachTimestamp = a})

-- | A list of features to enable on the guest operating system. Applicable
-- only for bootable images. Read Enabling guest operating system features
-- to see a list of available options.
dGuestOSFeatures :: Lens' Disk [GuestOSFeature]
dGuestOSFeatures
  = lens _dGuestOSFeatures
      (\ s a -> s{_dGuestOSFeatures = a})
      . _Default
      . _Coerce

-- | [Output Only] URL of the zone where the disk resides. You must specify
-- this field as part of the HTTP request URL. It is not settable as a
-- field in the request body.
dZone :: Lens' Disk (Maybe Text)
dZone = lens _dZone (\ s a -> s{_dZone = a})

-- | [Output Only] Server-defined fully-qualified URL for this resource.
dSelfLink :: Lens' Disk (Maybe Text)
dSelfLink
  = lens _dSelfLink (\ s a -> s{_dSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
dName :: Lens' Disk (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a})

-- | [Output Only] The ID value of the image used to create this disk. This
-- value identifies the exact image that was used to create this persistent
-- disk. For example, if you created the persistent disk from an image that
-- was later deleted and recreated under the same name, the source image ID
-- would identify the exact version of the image that was used.
dSourceImageId :: Lens' Disk (Maybe Text)
dSourceImageId
  = lens _dSourceImageId
      (\ s a -> s{_dSourceImageId = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
dCreationTimestamp :: Lens' Disk (Maybe Text)
dCreationTimestamp
  = lens _dCreationTimestamp
      (\ s a -> s{_dCreationTimestamp = a})

-- | The customer-supplied encryption key of the source image. Required if
-- the source image is protected by a customer-supplied encryption key.
dSourceImageEncryptionKey :: Lens' Disk (Maybe CustomerEncryptionKey)
dSourceImageEncryptionKey
  = lens _dSourceImageEncryptionKey
      (\ s a -> s{_dSourceImageEncryptionKey = a})

-- | Integer license codes indicating which licenses are attached to this
-- disk.
dLicenseCodes :: Lens' Disk [Int64]
dLicenseCodes
  = lens _dLicenseCodes
      (\ s a -> s{_dLicenseCodes = a})
      . _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
dId :: Lens' Disk (Maybe Word64)
dId
  = lens _dId (\ s a -> s{_dId = a}) . mapping _Coerce

-- | Labels to apply to this disk. These can be later modified by the
-- setLabels method.
dLabels :: Lens' Disk (Maybe DiskLabels)
dLabels = lens _dLabels (\ s a -> s{_dLabels = a})

-- | A list of publicly visible licenses. Reserved for Google\'s use.
dLicenses :: Lens' Disk [Text]
dLicenses
  = lens _dLicenses (\ s a -> s{_dLicenses = a}) .
      _Default
      . _Coerce

-- | [Output Only] URL of the region where the disk resides. Only applicable
-- for regional resources. You must specify this field as part of the HTTP
-- request URL. It is not settable as a field in the request body.
dRegion :: Lens' Disk (Maybe Text)
dRegion = lens _dRegion (\ s a -> s{_dRegion = a})

-- | Internal use only.
dOptions :: Lens' Disk (Maybe Text)
dOptions = lens _dOptions (\ s a -> s{_dOptions = a})

-- | Physical block size of the persistent disk, in bytes. If not present in
-- a request, a default value is used. Currently supported sizes are 4096
-- and 16384, other sizes may be added in the future. If an unsupported
-- value is requested, the error message will list the supported values for
-- the caller\'s project.
dPhysicalBlockSizeBytes :: Lens' Disk (Maybe Int64)
dPhysicalBlockSizeBytes
  = lens _dPhysicalBlockSizeBytes
      (\ s a -> s{_dPhysicalBlockSizeBytes = a})
      . mapping _Coerce

-- | URL of the disk type resource describing which disk type to use to
-- create the disk. Provide this when creating the disk. For example:
-- project\/zones\/zone\/diskTypes\/pd-standard or pd-ssd
dType :: Lens' Disk (Maybe Text)
dType = lens _dType (\ s a -> s{_dType = a})

-- | A fingerprint for the labels being applied to this disk, which is
-- essentially a hash of the labels set used for optimistic locking. The
-- fingerprint is initially generated by Compute Engine and changes after
-- every request to modify or update labels. You must always provide an
-- up-to-date fingerprint hash in order to update or change labels,
-- otherwise the request will fail with error 412 conditionNotMet. To see
-- the latest fingerprint, make a get() request to retrieve a disk.
dLabelFingerprint :: Lens' Disk (Maybe ByteString)
dLabelFingerprint
  = lens _dLabelFingerprint
      (\ s a -> s{_dLabelFingerprint = a})
      . mapping _Bytes

-- | An optional description of this resource. Provide this property when you
-- create the resource.
dDescription :: Lens' Disk (Maybe Text)
dDescription
  = lens _dDescription (\ s a -> s{_dDescription = a})

-- | The customer-supplied encryption key of the source snapshot. Required if
-- the source snapshot is protected by a customer-supplied encryption key.
dSourceSnapshotEncryptionKey :: Lens' Disk (Maybe CustomerEncryptionKey)
dSourceSnapshotEncryptionKey
  = lens _dSourceSnapshotEncryptionKey
      (\ s a -> s{_dSourceSnapshotEncryptionKey = a})

-- | The source snapshot used to create this disk. You can provide this as a
-- partial or full URL to the resource. For example, the following are
-- valid values: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/global\/snapshots\/snapshot
-- - projects\/project\/global\/snapshots\/snapshot -
-- global\/snapshots\/snapshot
dSourceSnapshot :: Lens' Disk (Maybe Text)
dSourceSnapshot
  = lens _dSourceSnapshot
      (\ s a -> s{_dSourceSnapshot = a})

instance FromJSON Disk where
        parseJSON
          = withObject "Disk"
              (\ o ->
                 Disk' <$>
                   (o .:? "status") <*> (o .:? "sourceSnapshotId") <*>
                     (o .:? "lastAttachTimestamp")
                     <*> (o .:? "users" .!= mempty)
                     <*> (o .:? "sourceImage")
                     <*> (o .:? "replicaZones" .!= mempty)
                     <*> (o .:? "diskEncryptionKey")
                     <*> (o .:? "sizeGb")
                     <*> (o .:? "kind" .!= "compute#disk")
                     <*> (o .:? "lastDetachTimestamp")
                     <*> (o .:? "guestOsFeatures" .!= mempty)
                     <*> (o .:? "zone")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "sourceImageId")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "sourceImageEncryptionKey")
                     <*> (o .:? "licenseCodes" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "labels")
                     <*> (o .:? "licenses" .!= mempty)
                     <*> (o .:? "region")
                     <*> (o .:? "options")
                     <*> (o .:? "physicalBlockSizeBytes")
                     <*> (o .:? "type")
                     <*> (o .:? "labelFingerprint")
                     <*> (o .:? "description")
                     <*> (o .:? "sourceSnapshotEncryptionKey")
                     <*> (o .:? "sourceSnapshot"))

instance ToJSON Disk where
        toJSON Disk'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _dStatus,
                  ("sourceSnapshotId" .=) <$> _dSourceSnapshotId,
                  ("lastAttachTimestamp" .=) <$> _dLastAttachTimestamp,
                  ("users" .=) <$> _dUsers,
                  ("sourceImage" .=) <$> _dSourceImage,
                  ("replicaZones" .=) <$> _dReplicaZones,
                  ("diskEncryptionKey" .=) <$> _dDiskEncryptionKey,
                  ("sizeGb" .=) <$> _dSizeGb, Just ("kind" .= _dKind),
                  ("lastDetachTimestamp" .=) <$> _dLastDetachTimestamp,
                  ("guestOsFeatures" .=) <$> _dGuestOSFeatures,
                  ("zone" .=) <$> _dZone,
                  ("selfLink" .=) <$> _dSelfLink,
                  ("name" .=) <$> _dName,
                  ("sourceImageId" .=) <$> _dSourceImageId,
                  ("creationTimestamp" .=) <$> _dCreationTimestamp,
                  ("sourceImageEncryptionKey" .=) <$>
                    _dSourceImageEncryptionKey,
                  ("licenseCodes" .=) <$> _dLicenseCodes,
                  ("id" .=) <$> _dId, ("labels" .=) <$> _dLabels,
                  ("licenses" .=) <$> _dLicenses,
                  ("region" .=) <$> _dRegion,
                  ("options" .=) <$> _dOptions,
                  ("physicalBlockSizeBytes" .=) <$>
                    _dPhysicalBlockSizeBytes,
                  ("type" .=) <$> _dType,
                  ("labelFingerprint" .=) <$> _dLabelFingerprint,
                  ("description" .=) <$> _dDescription,
                  ("sourceSnapshotEncryptionKey" .=) <$>
                    _dSourceSnapshotEncryptionKey,
                  ("sourceSnapshot" .=) <$> _dSourceSnapshot])

--
-- /See:/ 'usableSubnetworksAggregatedListWarningDataItem' smart constructor.
data UsableSubnetworksAggregatedListWarningDataItem = UsableSubnetworksAggregatedListWarningDataItem'
    { _usalwdiValue :: !(Maybe Text)
    , _usalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UsableSubnetworksAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'usalwdiValue'
--
-- * 'usalwdiKey'
usableSubnetworksAggregatedListWarningDataItem
    :: UsableSubnetworksAggregatedListWarningDataItem
usableSubnetworksAggregatedListWarningDataItem =
    UsableSubnetworksAggregatedListWarningDataItem'
    { _usalwdiValue = Nothing
    , _usalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
usalwdiValue :: Lens' UsableSubnetworksAggregatedListWarningDataItem (Maybe Text)
usalwdiValue
  = lens _usalwdiValue (\ s a -> s{_usalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
usalwdiKey :: Lens' UsableSubnetworksAggregatedListWarningDataItem (Maybe Text)
usalwdiKey
  = lens _usalwdiKey (\ s a -> s{_usalwdiKey = a})

instance FromJSON
         UsableSubnetworksAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "UsableSubnetworksAggregatedListWarningDataItem"
              (\ o ->
                 UsableSubnetworksAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         UsableSubnetworksAggregatedListWarningDataItem where
        toJSON
          UsableSubnetworksAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _usalwdiValue,
                  ("key" .=) <$> _usalwdiKey])

-- | Contains a list of nodeGroups.
--
-- /See:/ 'nodeGroupList' smart constructor.
data NodeGroupList = NodeGroupList'
    { _nglNextPageToken :: !(Maybe Text)
    , _nglKind          :: !Text
    , _nglItems         :: !(Maybe [NodeGroup])
    , _nglSelfLink      :: !(Maybe Text)
    , _nglWarning       :: !(Maybe NodeGroupListWarning)
    , _nglId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nglNextPageToken'
--
-- * 'nglKind'
--
-- * 'nglItems'
--
-- * 'nglSelfLink'
--
-- * 'nglWarning'
--
-- * 'nglId'
nodeGroupList
    :: NodeGroupList
nodeGroupList =
    NodeGroupList'
    { _nglNextPageToken = Nothing
    , _nglKind = "compute#nodeGroupList"
    , _nglItems = Nothing
    , _nglSelfLink = Nothing
    , _nglWarning = Nothing
    , _nglId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
nglNextPageToken :: Lens' NodeGroupList (Maybe Text)
nglNextPageToken
  = lens _nglNextPageToken
      (\ s a -> s{_nglNextPageToken = a})

-- | [Output Only] Type of resource.Always compute#nodeGroupList for lists of
-- node groups.
nglKind :: Lens' NodeGroupList Text
nglKind = lens _nglKind (\ s a -> s{_nglKind = a})

-- | A list of NodeGroup resources.
nglItems :: Lens' NodeGroupList [NodeGroup]
nglItems
  = lens _nglItems (\ s a -> s{_nglItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
nglSelfLink :: Lens' NodeGroupList (Maybe Text)
nglSelfLink
  = lens _nglSelfLink (\ s a -> s{_nglSelfLink = a})

-- | [Output Only] Informational warning message.
nglWarning :: Lens' NodeGroupList (Maybe NodeGroupListWarning)
nglWarning
  = lens _nglWarning (\ s a -> s{_nglWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
nglId :: Lens' NodeGroupList (Maybe Text)
nglId = lens _nglId (\ s a -> s{_nglId = a})

instance FromJSON NodeGroupList where
        parseJSON
          = withObject "NodeGroupList"
              (\ o ->
                 NodeGroupList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#nodeGroupList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON NodeGroupList where
        toJSON NodeGroupList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _nglNextPageToken,
                  Just ("kind" .= _nglKind),
                  ("items" .=) <$> _nglItems,
                  ("selfLink" .=) <$> _nglSelfLink,
                  ("warning" .=) <$> _nglWarning,
                  ("id" .=) <$> _nglId])

--
-- /See:/ 'diskMoveRequest' smart constructor.
data DiskMoveRequest = DiskMoveRequest'
    { _dmrTargetDisk      :: !(Maybe Text)
    , _dmrDestinationZone :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskMoveRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dmrTargetDisk'
--
-- * 'dmrDestinationZone'
diskMoveRequest
    :: DiskMoveRequest
diskMoveRequest =
    DiskMoveRequest'
    { _dmrTargetDisk = Nothing
    , _dmrDestinationZone = Nothing
    }

-- | The URL of the target disk to move. This can be a full or partial URL.
-- For example, the following are all valid URLs to a disk: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/disks\/disk
-- - projects\/project\/zones\/zone\/disks\/disk - zones\/zone\/disks\/disk
dmrTargetDisk :: Lens' DiskMoveRequest (Maybe Text)
dmrTargetDisk
  = lens _dmrTargetDisk
      (\ s a -> s{_dmrTargetDisk = a})

-- | The URL of the destination zone to move the disk. This can be a full or
-- partial URL. For example, the following are all valid URLs to a zone: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone
-- - projects\/project\/zones\/zone - zones\/zone
dmrDestinationZone :: Lens' DiskMoveRequest (Maybe Text)
dmrDestinationZone
  = lens _dmrDestinationZone
      (\ s a -> s{_dmrDestinationZone = a})

instance FromJSON DiskMoveRequest where
        parseJSON
          = withObject "DiskMoveRequest"
              (\ o ->
                 DiskMoveRequest' <$>
                   (o .:? "targetDisk") <*> (o .:? "destinationZone"))

instance ToJSON DiskMoveRequest where
        toJSON DiskMoveRequest'{..}
          = object
              (catMaybes
                 [("targetDisk" .=) <$> _dmrTargetDisk,
                  ("destinationZone" .=) <$> _dmrDestinationZone])

--
-- /See:/ 'sslPolicyWarningsItemDataItem' smart constructor.
data SSLPolicyWarningsItemDataItem = SSLPolicyWarningsItemDataItem'
    { _spwidiValue :: !(Maybe Text)
    , _spwidiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLPolicyWarningsItemDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spwidiValue'
--
-- * 'spwidiKey'
sslPolicyWarningsItemDataItem
    :: SSLPolicyWarningsItemDataItem
sslPolicyWarningsItemDataItem =
    SSLPolicyWarningsItemDataItem'
    { _spwidiValue = Nothing
    , _spwidiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
spwidiValue :: Lens' SSLPolicyWarningsItemDataItem (Maybe Text)
spwidiValue
  = lens _spwidiValue (\ s a -> s{_spwidiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
spwidiKey :: Lens' SSLPolicyWarningsItemDataItem (Maybe Text)
spwidiKey
  = lens _spwidiKey (\ s a -> s{_spwidiKey = a})

instance FromJSON SSLPolicyWarningsItemDataItem where
        parseJSON
          = withObject "SSLPolicyWarningsItemDataItem"
              (\ o ->
                 SSLPolicyWarningsItemDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON SSLPolicyWarningsItemDataItem where
        toJSON SSLPolicyWarningsItemDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _spwidiValue,
                  ("key" .=) <$> _spwidiKey])

-- | Configuration parameters of autoscaling based on load balancing.
--
-- /See:/ 'autoscalingPolicyLoadBalancingUtilization' smart constructor.
newtype AutoscalingPolicyLoadBalancingUtilization = AutoscalingPolicyLoadBalancingUtilization'
    { _aplbuUtilizationTarget :: Maybe (Textual Double)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalingPolicyLoadBalancingUtilization' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aplbuUtilizationTarget'
autoscalingPolicyLoadBalancingUtilization
    :: AutoscalingPolicyLoadBalancingUtilization
autoscalingPolicyLoadBalancingUtilization =
    AutoscalingPolicyLoadBalancingUtilization'
    { _aplbuUtilizationTarget = Nothing
    }

-- | Fraction of backend capacity utilization (set in HTTP(s) load balancing
-- configuration) that autoscaler should maintain. Must be a positive float
-- value. If not defined, the default is 0.8.
aplbuUtilizationTarget :: Lens' AutoscalingPolicyLoadBalancingUtilization (Maybe Double)
aplbuUtilizationTarget
  = lens _aplbuUtilizationTarget
      (\ s a -> s{_aplbuUtilizationTarget = a})
      . mapping _Coerce

instance FromJSON
         AutoscalingPolicyLoadBalancingUtilization where
        parseJSON
          = withObject
              "AutoscalingPolicyLoadBalancingUtilization"
              (\ o ->
                 AutoscalingPolicyLoadBalancingUtilization' <$>
                   (o .:? "utilizationTarget"))

instance ToJSON
         AutoscalingPolicyLoadBalancingUtilization where
        toJSON AutoscalingPolicyLoadBalancingUtilization'{..}
          = object
              (catMaybes
                 [("utilizationTarget" .=) <$>
                    _aplbuUtilizationTarget])

--
-- /See:/ 'forwardingRuleAggregatedListWarningDataItem' smart constructor.
data ForwardingRuleAggregatedListWarningDataItem = ForwardingRuleAggregatedListWarningDataItem'
    { _fralwdiValue :: !(Maybe Text)
    , _fralwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRuleAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fralwdiValue'
--
-- * 'fralwdiKey'
forwardingRuleAggregatedListWarningDataItem
    :: ForwardingRuleAggregatedListWarningDataItem
forwardingRuleAggregatedListWarningDataItem =
    ForwardingRuleAggregatedListWarningDataItem'
    { _fralwdiValue = Nothing
    , _fralwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
fralwdiValue :: Lens' ForwardingRuleAggregatedListWarningDataItem (Maybe Text)
fralwdiValue
  = lens _fralwdiValue (\ s a -> s{_fralwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
fralwdiKey :: Lens' ForwardingRuleAggregatedListWarningDataItem (Maybe Text)
fralwdiKey
  = lens _fralwdiKey (\ s a -> s{_fralwdiKey = a})

instance FromJSON
         ForwardingRuleAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "ForwardingRuleAggregatedListWarningDataItem"
              (\ o ->
                 ForwardingRuleAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         ForwardingRuleAggregatedListWarningDataItem where
        toJSON
          ForwardingRuleAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _fralwdiValue,
                  ("key" .=) <$> _fralwdiKey])

--
-- /See:/ 'targetPoolsScopedListWarningDataItem' smart constructor.
data TargetPoolsScopedListWarningDataItem = TargetPoolsScopedListWarningDataItem'
    { _tpslwdiValue :: !(Maybe Text)
    , _tpslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolsScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpslwdiValue'
--
-- * 'tpslwdiKey'
targetPoolsScopedListWarningDataItem
    :: TargetPoolsScopedListWarningDataItem
targetPoolsScopedListWarningDataItem =
    TargetPoolsScopedListWarningDataItem'
    { _tpslwdiValue = Nothing
    , _tpslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tpslwdiValue :: Lens' TargetPoolsScopedListWarningDataItem (Maybe Text)
tpslwdiValue
  = lens _tpslwdiValue (\ s a -> s{_tpslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tpslwdiKey :: Lens' TargetPoolsScopedListWarningDataItem (Maybe Text)
tpslwdiKey
  = lens _tpslwdiKey (\ s a -> s{_tpslwdiKey = a})

instance FromJSON
         TargetPoolsScopedListWarningDataItem where
        parseJSON
          = withObject "TargetPoolsScopedListWarningDataItem"
              (\ o ->
                 TargetPoolsScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON TargetPoolsScopedListWarningDataItem
         where
        toJSON TargetPoolsScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tpslwdiValue,
                  ("key" .=) <$> _tpslwdiKey])

-- | An Instance Group Manager resource. (== resource_for
-- beta.instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers
-- ==) (== resource_for beta.regionInstanceGroupManagers ==) (==
-- resource_for v1.regionInstanceGroupManagers ==)
--
-- /See:/ 'instanceGroupManager' smart constructor.
data InstanceGroupManager = InstanceGroupManager'
    { _igmKind               :: !Text
    , _igmFingerprint        :: !(Maybe Bytes)
    , _igmBaseInstanceName   :: !(Maybe Text)
    , _igmZone               :: !(Maybe Text)
    , _igmInstanceTemplate   :: !(Maybe Text)
    , _igmTargetSize         :: !(Maybe (Textual Int32))
    , _igmSelfLink           :: !(Maybe Text)
    , _igmCurrentActions     :: !(Maybe InstanceGroupManagerActionsSummary)
    , _igmName               :: !(Maybe Text)
    , _igmCreationTimestamp  :: !(Maybe Text)
    , _igmDistributionPolicy :: !(Maybe DistributionPolicy)
    , _igmId                 :: !(Maybe (Textual Word64))
    , _igmRegion             :: !(Maybe Text)
    , _igmTargetPools        :: !(Maybe [Text])
    , _igmDescription        :: !(Maybe Text)
    , _igmInstanceGroup      :: !(Maybe Text)
    , _igmNamedPorts         :: !(Maybe [NamedPort])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManager' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmKind'
--
-- * 'igmFingerprint'
--
-- * 'igmBaseInstanceName'
--
-- * 'igmZone'
--
-- * 'igmInstanceTemplate'
--
-- * 'igmTargetSize'
--
-- * 'igmSelfLink'
--
-- * 'igmCurrentActions'
--
-- * 'igmName'
--
-- * 'igmCreationTimestamp'
--
-- * 'igmDistributionPolicy'
--
-- * 'igmId'
--
-- * 'igmRegion'
--
-- * 'igmTargetPools'
--
-- * 'igmDescription'
--
-- * 'igmInstanceGroup'
--
-- * 'igmNamedPorts'
instanceGroupManager
    :: InstanceGroupManager
instanceGroupManager =
    InstanceGroupManager'
    { _igmKind = "compute#instanceGroupManager"
    , _igmFingerprint = Nothing
    , _igmBaseInstanceName = Nothing
    , _igmZone = Nothing
    , _igmInstanceTemplate = Nothing
    , _igmTargetSize = Nothing
    , _igmSelfLink = Nothing
    , _igmCurrentActions = Nothing
    , _igmName = Nothing
    , _igmCreationTimestamp = Nothing
    , _igmDistributionPolicy = Nothing
    , _igmId = Nothing
    , _igmRegion = Nothing
    , _igmTargetPools = Nothing
    , _igmDescription = Nothing
    , _igmInstanceGroup = Nothing
    , _igmNamedPorts = Nothing
    }

-- | [Output Only] The resource type, which is always
-- compute#instanceGroupManager for managed instance groups.
igmKind :: Lens' InstanceGroupManager Text
igmKind = lens _igmKind (\ s a -> s{_igmKind = a})

-- | Fingerprint of this resource. This field may be used in optimistic
-- locking. It will be ignored when inserting an InstanceGroupManager. An
-- up-to-date fingerprint must be provided in order to update the
-- InstanceGroupManager, otherwise the request will fail with error 412
-- conditionNotMet. To see the latest fingerprint, make a get() request to
-- retrieve an InstanceGroupManager.
igmFingerprint :: Lens' InstanceGroupManager (Maybe ByteString)
igmFingerprint
  = lens _igmFingerprint
      (\ s a -> s{_igmFingerprint = a})
      . mapping _Bytes

-- | The base instance name to use for instances in this group. The value
-- must be 1-58 characters long. Instances are named by appending a hyphen
-- and a random four-character string to the base instance name. The base
-- instance name must comply with RFC1035.
igmBaseInstanceName :: Lens' InstanceGroupManager (Maybe Text)
igmBaseInstanceName
  = lens _igmBaseInstanceName
      (\ s a -> s{_igmBaseInstanceName = a})

-- | [Output Only] The URL of the zone where the managed instance group is
-- located (for zonal resources).
igmZone :: Lens' InstanceGroupManager (Maybe Text)
igmZone = lens _igmZone (\ s a -> s{_igmZone = a})

-- | The URL of the instance template that is specified for this managed
-- instance group. The group uses this template to create all new instances
-- in the managed instance group.
igmInstanceTemplate :: Lens' InstanceGroupManager (Maybe Text)
igmInstanceTemplate
  = lens _igmInstanceTemplate
      (\ s a -> s{_igmInstanceTemplate = a})

-- | The target number of running instances for this managed instance group.
-- Deleting or abandoning instances reduces this number. Resizing the group
-- changes this number.
igmTargetSize :: Lens' InstanceGroupManager (Maybe Int32)
igmTargetSize
  = lens _igmTargetSize
      (\ s a -> s{_igmTargetSize = a})
      . mapping _Coerce

-- | [Output Only] The URL for this managed instance group. The server
-- defines this URL.
igmSelfLink :: Lens' InstanceGroupManager (Maybe Text)
igmSelfLink
  = lens _igmSelfLink (\ s a -> s{_igmSelfLink = a})

-- | [Output Only] The list of instance actions and the number of instances
-- in this managed instance group that are scheduled for each of those
-- actions.
igmCurrentActions :: Lens' InstanceGroupManager (Maybe InstanceGroupManagerActionsSummary)
igmCurrentActions
  = lens _igmCurrentActions
      (\ s a -> s{_igmCurrentActions = a})

-- | The name of the managed instance group. The name must be 1-63 characters
-- long, and comply with RFC1035.
igmName :: Lens' InstanceGroupManager (Maybe Text)
igmName = lens _igmName (\ s a -> s{_igmName = a})

-- | [Output Only] The creation timestamp for this managed instance group in
-- RFC3339 text format.
igmCreationTimestamp :: Lens' InstanceGroupManager (Maybe Text)
igmCreationTimestamp
  = lens _igmCreationTimestamp
      (\ s a -> s{_igmCreationTimestamp = a})

-- | Policy specifying intended distribution of instances in regional managed
-- instance group.
igmDistributionPolicy :: Lens' InstanceGroupManager (Maybe DistributionPolicy)
igmDistributionPolicy
  = lens _igmDistributionPolicy
      (\ s a -> s{_igmDistributionPolicy = a})

-- | [Output Only] A unique identifier for this resource type. The server
-- generates this identifier.
igmId :: Lens' InstanceGroupManager (Maybe Word64)
igmId
  = lens _igmId (\ s a -> s{_igmId = a}) .
      mapping _Coerce

-- | [Output Only] The URL of the region where the managed instance group
-- resides (for regional resources).
igmRegion :: Lens' InstanceGroupManager (Maybe Text)
igmRegion
  = lens _igmRegion (\ s a -> s{_igmRegion = a})

-- | The URLs for all TargetPool resources to which instances in the
-- instanceGroup field are added. The target pools automatically apply to
-- all of the instances in the managed instance group.
igmTargetPools :: Lens' InstanceGroupManager [Text]
igmTargetPools
  = lens _igmTargetPools
      (\ s a -> s{_igmTargetPools = a})
      . _Default
      . _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
igmDescription :: Lens' InstanceGroupManager (Maybe Text)
igmDescription
  = lens _igmDescription
      (\ s a -> s{_igmDescription = a})

-- | [Output Only] The URL of the Instance Group resource.
igmInstanceGroup :: Lens' InstanceGroupManager (Maybe Text)
igmInstanceGroup
  = lens _igmInstanceGroup
      (\ s a -> s{_igmInstanceGroup = a})

-- | Named ports configured for the Instance Groups complementary to this
-- Instance Group Manager.
igmNamedPorts :: Lens' InstanceGroupManager [NamedPort]
igmNamedPorts
  = lens _igmNamedPorts
      (\ s a -> s{_igmNamedPorts = a})
      . _Default
      . _Coerce

instance FromJSON InstanceGroupManager where
        parseJSON
          = withObject "InstanceGroupManager"
              (\ o ->
                 InstanceGroupManager' <$>
                   (o .:? "kind" .!= "compute#instanceGroupManager") <*>
                     (o .:? "fingerprint")
                     <*> (o .:? "baseInstanceName")
                     <*> (o .:? "zone")
                     <*> (o .:? "instanceTemplate")
                     <*> (o .:? "targetSize")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "currentActions")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "distributionPolicy")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "targetPools" .!= mempty)
                     <*> (o .:? "description")
                     <*> (o .:? "instanceGroup")
                     <*> (o .:? "namedPorts" .!= mempty))

instance ToJSON InstanceGroupManager where
        toJSON InstanceGroupManager'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _igmKind),
                  ("fingerprint" .=) <$> _igmFingerprint,
                  ("baseInstanceName" .=) <$> _igmBaseInstanceName,
                  ("zone" .=) <$> _igmZone,
                  ("instanceTemplate" .=) <$> _igmInstanceTemplate,
                  ("targetSize" .=) <$> _igmTargetSize,
                  ("selfLink" .=) <$> _igmSelfLink,
                  ("currentActions" .=) <$> _igmCurrentActions,
                  ("name" .=) <$> _igmName,
                  ("creationTimestamp" .=) <$> _igmCreationTimestamp,
                  ("distributionPolicy" .=) <$> _igmDistributionPolicy,
                  ("id" .=) <$> _igmId, ("region" .=) <$> _igmRegion,
                  ("targetPools" .=) <$> _igmTargetPools,
                  ("description" .=) <$> _igmDescription,
                  ("instanceGroup" .=) <$> _igmInstanceGroup,
                  ("namedPorts" .=) <$> _igmNamedPorts])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceGroupManagerListWarning' smart constructor.
data InstanceGroupManagerListWarning = InstanceGroupManagerListWarning'
    { _igmlwData    :: !(Maybe [InstanceGroupManagerListWarningDataItem])
    , _igmlwCode    :: !(Maybe InstanceGroupManagerListWarningCode)
    , _igmlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagerListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmlwData'
--
-- * 'igmlwCode'
--
-- * 'igmlwMessage'
instanceGroupManagerListWarning
    :: InstanceGroupManagerListWarning
instanceGroupManagerListWarning =
    InstanceGroupManagerListWarning'
    { _igmlwData = Nothing
    , _igmlwCode = Nothing
    , _igmlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
igmlwData :: Lens' InstanceGroupManagerListWarning [InstanceGroupManagerListWarningDataItem]
igmlwData
  = lens _igmlwData (\ s a -> s{_igmlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
igmlwCode :: Lens' InstanceGroupManagerListWarning (Maybe InstanceGroupManagerListWarningCode)
igmlwCode
  = lens _igmlwCode (\ s a -> s{_igmlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
igmlwMessage :: Lens' InstanceGroupManagerListWarning (Maybe Text)
igmlwMessage
  = lens _igmlwMessage (\ s a -> s{_igmlwMessage = a})

instance FromJSON InstanceGroupManagerListWarning
         where
        parseJSON
          = withObject "InstanceGroupManagerListWarning"
              (\ o ->
                 InstanceGroupManagerListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceGroupManagerListWarning where
        toJSON InstanceGroupManagerListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _igmlwData,
                  ("code" .=) <$> _igmlwCode,
                  ("message" .=) <$> _igmlwMessage])

--
-- /See:/ 'regionInstanceGroupsListInstances' smart constructor.
data RegionInstanceGroupsListInstances = RegionInstanceGroupsListInstances'
    { _rigliNextPageToken :: !(Maybe Text)
    , _rigliKind          :: !Text
    , _rigliItems         :: !(Maybe [InstanceWithNamedPorts])
    , _rigliSelfLink      :: !(Maybe Text)
    , _rigliWarning       :: !(Maybe RegionInstanceGroupsListInstancesWarning)
    , _rigliId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupsListInstances' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigliNextPageToken'
--
-- * 'rigliKind'
--
-- * 'rigliItems'
--
-- * 'rigliSelfLink'
--
-- * 'rigliWarning'
--
-- * 'rigliId'
regionInstanceGroupsListInstances
    :: RegionInstanceGroupsListInstances
regionInstanceGroupsListInstances =
    RegionInstanceGroupsListInstances'
    { _rigliNextPageToken = Nothing
    , _rigliKind = "compute#regionInstanceGroupsListInstances"
    , _rigliItems = Nothing
    , _rigliSelfLink = Nothing
    , _rigliWarning = Nothing
    , _rigliId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
rigliNextPageToken :: Lens' RegionInstanceGroupsListInstances (Maybe Text)
rigliNextPageToken
  = lens _rigliNextPageToken
      (\ s a -> s{_rigliNextPageToken = a})

-- | The resource type.
rigliKind :: Lens' RegionInstanceGroupsListInstances Text
rigliKind
  = lens _rigliKind (\ s a -> s{_rigliKind = a})

-- | A list of InstanceWithNamedPorts resources.
rigliItems :: Lens' RegionInstanceGroupsListInstances [InstanceWithNamedPorts]
rigliItems
  = lens _rigliItems (\ s a -> s{_rigliItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
rigliSelfLink :: Lens' RegionInstanceGroupsListInstances (Maybe Text)
rigliSelfLink
  = lens _rigliSelfLink
      (\ s a -> s{_rigliSelfLink = a})

-- | [Output Only] Informational warning message.
rigliWarning :: Lens' RegionInstanceGroupsListInstances (Maybe RegionInstanceGroupsListInstancesWarning)
rigliWarning
  = lens _rigliWarning (\ s a -> s{_rigliWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
rigliId :: Lens' RegionInstanceGroupsListInstances (Maybe Text)
rigliId = lens _rigliId (\ s a -> s{_rigliId = a})

instance FromJSON RegionInstanceGroupsListInstances
         where
        parseJSON
          = withObject "RegionInstanceGroupsListInstances"
              (\ o ->
                 RegionInstanceGroupsListInstances' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#regionInstanceGroupsListInstances")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RegionInstanceGroupsListInstances
         where
        toJSON RegionInstanceGroupsListInstances'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _rigliNextPageToken,
                  Just ("kind" .= _rigliKind),
                  ("items" .=) <$> _rigliItems,
                  ("selfLink" .=) <$> _rigliSelfLink,
                  ("warning" .=) <$> _rigliWarning,
                  ("id" .=) <$> _rigliId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'diskListWarning' smart constructor.
data DiskListWarning = DiskListWarning'
    { _dlwData    :: !(Maybe [DiskListWarningDataItem])
    , _dlwCode    :: !(Maybe DiskListWarningCode)
    , _dlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dlwData'
--
-- * 'dlwCode'
--
-- * 'dlwMessage'
diskListWarning
    :: DiskListWarning
diskListWarning =
    DiskListWarning'
    { _dlwData = Nothing
    , _dlwCode = Nothing
    , _dlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
dlwData :: Lens' DiskListWarning [DiskListWarningDataItem]
dlwData
  = lens _dlwData (\ s a -> s{_dlwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
dlwCode :: Lens' DiskListWarning (Maybe DiskListWarningCode)
dlwCode = lens _dlwCode (\ s a -> s{_dlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
dlwMessage :: Lens' DiskListWarning (Maybe Text)
dlwMessage
  = lens _dlwMessage (\ s a -> s{_dlwMessage = a})

instance FromJSON DiskListWarning where
        parseJSON
          = withObject "DiskListWarning"
              (\ o ->
                 DiskListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON DiskListWarning where
        toJSON DiskListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _dlwData, ("code" .=) <$> _dlwCode,
                  ("message" .=) <$> _dlwMessage])

--
-- /See:/ 'tcpHealthCheck' smart constructor.
data TCPHealthCheck = TCPHealthCheck'
    { _thcResponse    :: !(Maybe Text)
    , _thcProxyHeader :: !(Maybe TCPHealthCheckProxyHeader)
    , _thcPortName    :: !(Maybe Text)
    , _thcPort        :: !(Maybe (Textual Int32))
    , _thcRequest     :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TCPHealthCheck' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thcResponse'
--
-- * 'thcProxyHeader'
--
-- * 'thcPortName'
--
-- * 'thcPort'
--
-- * 'thcRequest'
tcpHealthCheck
    :: TCPHealthCheck
tcpHealthCheck =
    TCPHealthCheck'
    { _thcResponse = Nothing
    , _thcProxyHeader = Nothing
    , _thcPortName = Nothing
    , _thcPort = Nothing
    , _thcRequest = Nothing
    }

-- | The bytes to match against the beginning of the response data. If left
-- empty (the default value), any response will indicate health. The
-- response data can only be ASCII.
thcResponse :: Lens' TCPHealthCheck (Maybe Text)
thcResponse
  = lens _thcResponse (\ s a -> s{_thcResponse = a})

-- | Specifies the type of proxy header to append before sending data to the
-- backend, either NONE or PROXY_V1. The default is NONE.
thcProxyHeader :: Lens' TCPHealthCheck (Maybe TCPHealthCheckProxyHeader)
thcProxyHeader
  = lens _thcProxyHeader
      (\ s a -> s{_thcProxyHeader = a})

-- | Port name as defined in InstanceGroup#NamedPort#name. If both port and
-- port_name are defined, port takes precedence.
thcPortName :: Lens' TCPHealthCheck (Maybe Text)
thcPortName
  = lens _thcPortName (\ s a -> s{_thcPortName = a})

-- | The TCP port number for the health check request. The default value is
-- 80. Valid values are 1 through 65535.
thcPort :: Lens' TCPHealthCheck (Maybe Int32)
thcPort
  = lens _thcPort (\ s a -> s{_thcPort = a}) .
      mapping _Coerce

-- | The application data to send once the TCP connection has been
-- established (default value is empty). If both request and response are
-- empty, the connection establishment alone will indicate health. The
-- request data can only be ASCII.
thcRequest :: Lens' TCPHealthCheck (Maybe Text)
thcRequest
  = lens _thcRequest (\ s a -> s{_thcRequest = a})

instance FromJSON TCPHealthCheck where
        parseJSON
          = withObject "TCPHealthCheck"
              (\ o ->
                 TCPHealthCheck' <$>
                   (o .:? "response") <*> (o .:? "proxyHeader") <*>
                     (o .:? "portName")
                     <*> (o .:? "port")
                     <*> (o .:? "request"))

instance ToJSON TCPHealthCheck where
        toJSON TCPHealthCheck'{..}
          = object
              (catMaybes
                 [("response" .=) <$> _thcResponse,
                  ("proxyHeader" .=) <$> _thcProxyHeader,
                  ("portName" .=) <$> _thcPortName,
                  ("port" .=) <$> _thcPort,
                  ("request" .=) <$> _thcRequest])

--
-- /See:/ 'instanceGroupManagerAggregatedListWarningDataItem' smart constructor.
data InstanceGroupManagerAggregatedListWarningDataItem = InstanceGroupManagerAggregatedListWarningDataItem'
    { _igmalwdiValue :: !(Maybe Text)
    , _igmalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagerAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmalwdiValue'
--
-- * 'igmalwdiKey'
instanceGroupManagerAggregatedListWarningDataItem
    :: InstanceGroupManagerAggregatedListWarningDataItem
instanceGroupManagerAggregatedListWarningDataItem =
    InstanceGroupManagerAggregatedListWarningDataItem'
    { _igmalwdiValue = Nothing
    , _igmalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
igmalwdiValue :: Lens' InstanceGroupManagerAggregatedListWarningDataItem (Maybe Text)
igmalwdiValue
  = lens _igmalwdiValue
      (\ s a -> s{_igmalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
igmalwdiKey :: Lens' InstanceGroupManagerAggregatedListWarningDataItem (Maybe Text)
igmalwdiKey
  = lens _igmalwdiKey (\ s a -> s{_igmalwdiKey = a})

instance FromJSON
         InstanceGroupManagerAggregatedListWarningDataItem
         where
        parseJSON
          = withObject
              "InstanceGroupManagerAggregatedListWarningDataItem"
              (\ o ->
                 InstanceGroupManagerAggregatedListWarningDataItem'
                   <$> (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InstanceGroupManagerAggregatedListWarningDataItem
         where
        toJSON
          InstanceGroupManagerAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _igmalwdiValue,
                  ("key" .=) <$> _igmalwdiKey])

--
-- /See:/ 'testPermissionsResponse' smart constructor.
newtype TestPermissionsResponse = TestPermissionsResponse'
    { _tprPermissions :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TestPermissionsResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tprPermissions'
testPermissionsResponse
    :: TestPermissionsResponse
testPermissionsResponse =
    TestPermissionsResponse'
    { _tprPermissions = Nothing
    }

-- | A subset of \`TestPermissionsRequest.permissions\` that the caller is
-- allowed.
tprPermissions :: Lens' TestPermissionsResponse [Text]
tprPermissions
  = lens _tprPermissions
      (\ s a -> s{_tprPermissions = a})
      . _Default
      . _Coerce

instance FromJSON TestPermissionsResponse where
        parseJSON
          = withObject "TestPermissionsResponse"
              (\ o ->
                 TestPermissionsResponse' <$>
                   (o .:? "permissions" .!= mempty))

instance ToJSON TestPermissionsResponse where
        toJSON TestPermissionsResponse'{..}
          = object
              (catMaybes [("permissions" .=) <$> _tprPermissions])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'regionAutoscalerListWarning' smart constructor.
data RegionAutoscalerListWarning = RegionAutoscalerListWarning'
    { _ralwData    :: !(Maybe [RegionAutoscalerListWarningDataItem])
    , _ralwCode    :: !(Maybe RegionAutoscalerListWarningCode)
    , _ralwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionAutoscalerListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ralwData'
--
-- * 'ralwCode'
--
-- * 'ralwMessage'
regionAutoscalerListWarning
    :: RegionAutoscalerListWarning
regionAutoscalerListWarning =
    RegionAutoscalerListWarning'
    { _ralwData = Nothing
    , _ralwCode = Nothing
    , _ralwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ralwData :: Lens' RegionAutoscalerListWarning [RegionAutoscalerListWarningDataItem]
ralwData
  = lens _ralwData (\ s a -> s{_ralwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ralwCode :: Lens' RegionAutoscalerListWarning (Maybe RegionAutoscalerListWarningCode)
ralwCode = lens _ralwCode (\ s a -> s{_ralwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ralwMessage :: Lens' RegionAutoscalerListWarning (Maybe Text)
ralwMessage
  = lens _ralwMessage (\ s a -> s{_ralwMessage = a})

instance FromJSON RegionAutoscalerListWarning where
        parseJSON
          = withObject "RegionAutoscalerListWarning"
              (\ o ->
                 RegionAutoscalerListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RegionAutoscalerListWarning where
        toJSON RegionAutoscalerListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ralwData,
                  ("code" .=) <$> _ralwCode,
                  ("message" .=) <$> _ralwMessage])

--
-- /See:/ 'targetInstanceListWarningDataItem' smart constructor.
data TargetInstanceListWarningDataItem = TargetInstanceListWarningDataItem'
    { _tilwdiValue :: !(Maybe Text)
    , _tilwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstanceListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tilwdiValue'
--
-- * 'tilwdiKey'
targetInstanceListWarningDataItem
    :: TargetInstanceListWarningDataItem
targetInstanceListWarningDataItem =
    TargetInstanceListWarningDataItem'
    { _tilwdiValue = Nothing
    , _tilwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tilwdiValue :: Lens' TargetInstanceListWarningDataItem (Maybe Text)
tilwdiValue
  = lens _tilwdiValue (\ s a -> s{_tilwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tilwdiKey :: Lens' TargetInstanceListWarningDataItem (Maybe Text)
tilwdiKey
  = lens _tilwdiKey (\ s a -> s{_tilwdiKey = a})

instance FromJSON TargetInstanceListWarningDataItem
         where
        parseJSON
          = withObject "TargetInstanceListWarningDataItem"
              (\ o ->
                 TargetInstanceListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON TargetInstanceListWarningDataItem
         where
        toJSON TargetInstanceListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tilwdiValue,
                  ("key" .=) <$> _tilwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'operationListWarning' smart constructor.
data OperationListWarning = OperationListWarning'
    { _olwData    :: !(Maybe [OperationListWarningDataItem])
    , _olwCode    :: !(Maybe OperationListWarningCode)
    , _olwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'olwData'
--
-- * 'olwCode'
--
-- * 'olwMessage'
operationListWarning
    :: OperationListWarning
operationListWarning =
    OperationListWarning'
    { _olwData = Nothing
    , _olwCode = Nothing
    , _olwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
olwData :: Lens' OperationListWarning [OperationListWarningDataItem]
olwData
  = lens _olwData (\ s a -> s{_olwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
olwCode :: Lens' OperationListWarning (Maybe OperationListWarningCode)
olwCode = lens _olwCode (\ s a -> s{_olwCode = a})

-- | [Output Only] A human-readable description of the warning code.
olwMessage :: Lens' OperationListWarning (Maybe Text)
olwMessage
  = lens _olwMessage (\ s a -> s{_olwMessage = a})

instance FromJSON OperationListWarning where
        parseJSON
          = withObject "OperationListWarning"
              (\ o ->
                 OperationListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON OperationListWarning where
        toJSON OperationListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _olwData, ("code" .=) <$> _olwCode,
                  ("message" .=) <$> _olwMessage])

--
-- /See:/ 'instanceGroupsRemoveInstancesRequest' smart constructor.
newtype InstanceGroupsRemoveInstancesRequest = InstanceGroupsRemoveInstancesRequest'
    { _igrirInstances :: Maybe [InstanceReference]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsRemoveInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igrirInstances'
instanceGroupsRemoveInstancesRequest
    :: InstanceGroupsRemoveInstancesRequest
instanceGroupsRemoveInstancesRequest =
    InstanceGroupsRemoveInstancesRequest'
    { _igrirInstances = Nothing
    }

-- | The list of instances to remove from the instance group.
igrirInstances :: Lens' InstanceGroupsRemoveInstancesRequest [InstanceReference]
igrirInstances
  = lens _igrirInstances
      (\ s a -> s{_igrirInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         InstanceGroupsRemoveInstancesRequest where
        parseJSON
          = withObject "InstanceGroupsRemoveInstancesRequest"
              (\ o ->
                 InstanceGroupsRemoveInstancesRequest' <$>
                   (o .:? "instances" .!= mempty))

instance ToJSON InstanceGroupsRemoveInstancesRequest
         where
        toJSON InstanceGroupsRemoveInstancesRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _igrirInstances])

-- | Informational metadata about Partner attachments from Partners to
-- display to customers. These fields are propagated from PARTNER_PROVIDER
-- attachments to their corresponding PARTNER attachments.
--
-- /See:/ 'interconnectAttachmentPartnerMetadata' smart constructor.
data InterconnectAttachmentPartnerMetadata = InterconnectAttachmentPartnerMetadata'
    { _iapmPortalURL        :: !(Maybe Text)
    , _iapmInterconnectName :: !(Maybe Text)
    , _iapmPartnerName      :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentPartnerMetadata' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iapmPortalURL'
--
-- * 'iapmInterconnectName'
--
-- * 'iapmPartnerName'
interconnectAttachmentPartnerMetadata
    :: InterconnectAttachmentPartnerMetadata
interconnectAttachmentPartnerMetadata =
    InterconnectAttachmentPartnerMetadata'
    { _iapmPortalURL = Nothing
    , _iapmInterconnectName = Nothing
    , _iapmPartnerName = Nothing
    }

-- | URL of the Partner?s portal for this Attachment. Partners may customise
-- this to be a deep-link to the specific resource on the Partner portal.
-- This value may be validated to match approved Partner values.
iapmPortalURL :: Lens' InterconnectAttachmentPartnerMetadata (Maybe Text)
iapmPortalURL
  = lens _iapmPortalURL
      (\ s a -> s{_iapmPortalURL = a})

-- | Plain text name of the Interconnect this attachment is connected to, as
-- displayed in the Partner?s portal. For instance \"Chicago 1\". This
-- value may be validated to match approved Partner values.
iapmInterconnectName :: Lens' InterconnectAttachmentPartnerMetadata (Maybe Text)
iapmInterconnectName
  = lens _iapmInterconnectName
      (\ s a -> s{_iapmInterconnectName = a})

-- | Plain text name of the Partner providing this attachment. This value may
-- be validated to match approved Partner values.
iapmPartnerName :: Lens' InterconnectAttachmentPartnerMetadata (Maybe Text)
iapmPartnerName
  = lens _iapmPartnerName
      (\ s a -> s{_iapmPartnerName = a})

instance FromJSON
         InterconnectAttachmentPartnerMetadata where
        parseJSON
          = withObject "InterconnectAttachmentPartnerMetadata"
              (\ o ->
                 InterconnectAttachmentPartnerMetadata' <$>
                   (o .:? "portalUrl") <*> (o .:? "interconnectName")
                     <*> (o .:? "partnerName"))

instance ToJSON InterconnectAttachmentPartnerMetadata
         where
        toJSON InterconnectAttachmentPartnerMetadata'{..}
          = object
              (catMaybes
                 [("portalUrl" .=) <$> _iapmPortalURL,
                  ("interconnectName" .=) <$> _iapmInterconnectName,
                  ("partnerName" .=) <$> _iapmPartnerName])

--
-- /See:/ 'machineTypeListWarningDataItem' smart constructor.
data MachineTypeListWarningDataItem = MachineTypeListWarningDataItem'
    { _mtlwdiValue :: !(Maybe Text)
    , _mtlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypeListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtlwdiValue'
--
-- * 'mtlwdiKey'
machineTypeListWarningDataItem
    :: MachineTypeListWarningDataItem
machineTypeListWarningDataItem =
    MachineTypeListWarningDataItem'
    { _mtlwdiValue = Nothing
    , _mtlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
mtlwdiValue :: Lens' MachineTypeListWarningDataItem (Maybe Text)
mtlwdiValue
  = lens _mtlwdiValue (\ s a -> s{_mtlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
mtlwdiKey :: Lens' MachineTypeListWarningDataItem (Maybe Text)
mtlwdiKey
  = lens _mtlwdiKey (\ s a -> s{_mtlwdiKey = a})

instance FromJSON MachineTypeListWarningDataItem
         where
        parseJSON
          = withObject "MachineTypeListWarningDataItem"
              (\ o ->
                 MachineTypeListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON MachineTypeListWarningDataItem where
        toJSON MachineTypeListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _mtlwdiValue,
                  ("key" .=) <$> _mtlwdiKey])

--
-- /See:/ 'networksRemovePeeringRequest' smart constructor.
newtype NetworksRemovePeeringRequest = NetworksRemovePeeringRequest'
    { _nrprName :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NetworksRemovePeeringRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nrprName'
networksRemovePeeringRequest
    :: NetworksRemovePeeringRequest
networksRemovePeeringRequest =
    NetworksRemovePeeringRequest'
    { _nrprName = Nothing
    }

-- | Name of the peering, which should conform to RFC1035.
nrprName :: Lens' NetworksRemovePeeringRequest (Maybe Text)
nrprName = lens _nrprName (\ s a -> s{_nrprName = a})

instance FromJSON NetworksRemovePeeringRequest where
        parseJSON
          = withObject "NetworksRemovePeeringRequest"
              (\ o ->
                 NetworksRemovePeeringRequest' <$> (o .:? "name"))

instance ToJSON NetworksRemovePeeringRequest where
        toJSON NetworksRemovePeeringRequest'{..}
          = object (catMaybes [("name" .=) <$> _nrprName])

--
-- /See:/ 'targetHTTPProxyListWarningDataItem' smart constructor.
data TargetHTTPProxyListWarningDataItem = TargetHTTPProxyListWarningDataItem'
    { _thttpplwdiValue :: !(Maybe Text)
    , _thttpplwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPProxyListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thttpplwdiValue'
--
-- * 'thttpplwdiKey'
targetHTTPProxyListWarningDataItem
    :: TargetHTTPProxyListWarningDataItem
targetHTTPProxyListWarningDataItem =
    TargetHTTPProxyListWarningDataItem'
    { _thttpplwdiValue = Nothing
    , _thttpplwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
thttpplwdiValue :: Lens' TargetHTTPProxyListWarningDataItem (Maybe Text)
thttpplwdiValue
  = lens _thttpplwdiValue
      (\ s a -> s{_thttpplwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
thttpplwdiKey :: Lens' TargetHTTPProxyListWarningDataItem (Maybe Text)
thttpplwdiKey
  = lens _thttpplwdiKey
      (\ s a -> s{_thttpplwdiKey = a})

instance FromJSON TargetHTTPProxyListWarningDataItem
         where
        parseJSON
          = withObject "TargetHTTPProxyListWarningDataItem"
              (\ o ->
                 TargetHTTPProxyListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON TargetHTTPProxyListWarningDataItem
         where
        toJSON TargetHTTPProxyListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _thttpplwdiValue,
                  ("key" .=) <$> _thttpplwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'machineTypeAggregatedListWarning' smart constructor.
data MachineTypeAggregatedListWarning = MachineTypeAggregatedListWarning'
    { _mtalwData    :: !(Maybe [MachineTypeAggregatedListWarningDataItem])
    , _mtalwCode    :: !(Maybe MachineTypeAggregatedListWarningCode)
    , _mtalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypeAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtalwData'
--
-- * 'mtalwCode'
--
-- * 'mtalwMessage'
machineTypeAggregatedListWarning
    :: MachineTypeAggregatedListWarning
machineTypeAggregatedListWarning =
    MachineTypeAggregatedListWarning'
    { _mtalwData = Nothing
    , _mtalwCode = Nothing
    , _mtalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
mtalwData :: Lens' MachineTypeAggregatedListWarning [MachineTypeAggregatedListWarningDataItem]
mtalwData
  = lens _mtalwData (\ s a -> s{_mtalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
mtalwCode :: Lens' MachineTypeAggregatedListWarning (Maybe MachineTypeAggregatedListWarningCode)
mtalwCode
  = lens _mtalwCode (\ s a -> s{_mtalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
mtalwMessage :: Lens' MachineTypeAggregatedListWarning (Maybe Text)
mtalwMessage
  = lens _mtalwMessage (\ s a -> s{_mtalwMessage = a})

instance FromJSON MachineTypeAggregatedListWarning
         where
        parseJSON
          = withObject "MachineTypeAggregatedListWarning"
              (\ o ->
                 MachineTypeAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON MachineTypeAggregatedListWarning
         where
        toJSON MachineTypeAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _mtalwData,
                  ("code" .=) <$> _mtalwCode,
                  ("message" .=) <$> _mtalwMessage])

--
-- /See:/ 'nodeTemplateAggregatedListWarningDataItem' smart constructor.
data NodeTemplateAggregatedListWarningDataItem = NodeTemplateAggregatedListWarningDataItem'
    { _ntalwdiValue :: !(Maybe Text)
    , _ntalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntalwdiValue'
--
-- * 'ntalwdiKey'
nodeTemplateAggregatedListWarningDataItem
    :: NodeTemplateAggregatedListWarningDataItem
nodeTemplateAggregatedListWarningDataItem =
    NodeTemplateAggregatedListWarningDataItem'
    { _ntalwdiValue = Nothing
    , _ntalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ntalwdiValue :: Lens' NodeTemplateAggregatedListWarningDataItem (Maybe Text)
ntalwdiValue
  = lens _ntalwdiValue (\ s a -> s{_ntalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ntalwdiKey :: Lens' NodeTemplateAggregatedListWarningDataItem (Maybe Text)
ntalwdiKey
  = lens _ntalwdiKey (\ s a -> s{_ntalwdiKey = a})

instance FromJSON
         NodeTemplateAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "NodeTemplateAggregatedListWarningDataItem"
              (\ o ->
                 NodeTemplateAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         NodeTemplateAggregatedListWarningDataItem where
        toJSON NodeTemplateAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ntalwdiValue,
                  ("key" .=) <$> _ntalwdiKey])

-- | Contains a list of BackendBucket resources.
--
-- /See:/ 'backendBucketList' smart constructor.
data BackendBucketList = BackendBucketList'
    { _bblNextPageToken :: !(Maybe Text)
    , _bblKind          :: !Text
    , _bblItems         :: !(Maybe [BackendBucket])
    , _bblSelfLink      :: !(Maybe Text)
    , _bblWarning       :: !(Maybe BackendBucketListWarning)
    , _bblId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendBucketList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bblNextPageToken'
--
-- * 'bblKind'
--
-- * 'bblItems'
--
-- * 'bblSelfLink'
--
-- * 'bblWarning'
--
-- * 'bblId'
backendBucketList
    :: BackendBucketList
backendBucketList =
    BackendBucketList'
    { _bblNextPageToken = Nothing
    , _bblKind = "compute#backendBucketList"
    , _bblItems = Nothing
    , _bblSelfLink = Nothing
    , _bblWarning = Nothing
    , _bblId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
bblNextPageToken :: Lens' BackendBucketList (Maybe Text)
bblNextPageToken
  = lens _bblNextPageToken
      (\ s a -> s{_bblNextPageToken = a})

-- | Type of resource.
bblKind :: Lens' BackendBucketList Text
bblKind = lens _bblKind (\ s a -> s{_bblKind = a})

-- | A list of BackendBucket resources.
bblItems :: Lens' BackendBucketList [BackendBucket]
bblItems
  = lens _bblItems (\ s a -> s{_bblItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
bblSelfLink :: Lens' BackendBucketList (Maybe Text)
bblSelfLink
  = lens _bblSelfLink (\ s a -> s{_bblSelfLink = a})

-- | [Output Only] Informational warning message.
bblWarning :: Lens' BackendBucketList (Maybe BackendBucketListWarning)
bblWarning
  = lens _bblWarning (\ s a -> s{_bblWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
bblId :: Lens' BackendBucketList (Maybe Text)
bblId = lens _bblId (\ s a -> s{_bblId = a})

instance FromJSON BackendBucketList where
        parseJSON
          = withObject "BackendBucketList"
              (\ o ->
                 BackendBucketList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#backendBucketList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON BackendBucketList where
        toJSON BackendBucketList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _bblNextPageToken,
                  Just ("kind" .= _bblKind),
                  ("items" .=) <$> _bblItems,
                  ("selfLink" .=) <$> _bblSelfLink,
                  ("warning" .=) <$> _bblWarning,
                  ("id" .=) <$> _bblId])

-- | Information for an interconnect attachment when this belongs to an
-- interconnect of type DEDICATED.
--
-- /See:/ 'interconnectAttachmentPrivateInfo' smart constructor.
newtype InterconnectAttachmentPrivateInfo = InterconnectAttachmentPrivateInfo'
    { _iapiTag8021q :: Maybe (Textual Word32)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentPrivateInfo' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iapiTag8021q'
interconnectAttachmentPrivateInfo
    :: InterconnectAttachmentPrivateInfo
interconnectAttachmentPrivateInfo =
    InterconnectAttachmentPrivateInfo'
    { _iapiTag8021q = Nothing
    }

-- | [Output Only] 802.1q encapsulation tag to be used for traffic between
-- Google and the customer, going to and from this network and region.
iapiTag8021q :: Lens' InterconnectAttachmentPrivateInfo (Maybe Word32)
iapiTag8021q
  = lens _iapiTag8021q (\ s a -> s{_iapiTag8021q = a})
      . mapping _Coerce

instance FromJSON InterconnectAttachmentPrivateInfo
         where
        parseJSON
          = withObject "InterconnectAttachmentPrivateInfo"
              (\ o ->
                 InterconnectAttachmentPrivateInfo' <$>
                   (o .:? "tag8021q"))

instance ToJSON InterconnectAttachmentPrivateInfo
         where
        toJSON InterconnectAttachmentPrivateInfo'{..}
          = object
              (catMaybes [("tag8021q" .=) <$> _iapiTag8021q])

--
-- /See:/ 'acceleratorTypesScopedList' smart constructor.
data AcceleratorTypesScopedList = AcceleratorTypesScopedList'
    { _atslAcceleratorTypes :: !(Maybe [AcceleratorType])
    , _atslWarning          :: !(Maybe AcceleratorTypesScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atslAcceleratorTypes'
--
-- * 'atslWarning'
acceleratorTypesScopedList
    :: AcceleratorTypesScopedList
acceleratorTypesScopedList =
    AcceleratorTypesScopedList'
    { _atslAcceleratorTypes = Nothing
    , _atslWarning = Nothing
    }

-- | [Output Only] A list of accelerator types contained in this scope.
atslAcceleratorTypes :: Lens' AcceleratorTypesScopedList [AcceleratorType]
atslAcceleratorTypes
  = lens _atslAcceleratorTypes
      (\ s a -> s{_atslAcceleratorTypes = a})
      . _Default
      . _Coerce

-- | [Output Only] An informational warning that appears when the accelerator
-- types list is empty.
atslWarning :: Lens' AcceleratorTypesScopedList (Maybe AcceleratorTypesScopedListWarning)
atslWarning
  = lens _atslWarning (\ s a -> s{_atslWarning = a})

instance FromJSON AcceleratorTypesScopedList where
        parseJSON
          = withObject "AcceleratorTypesScopedList"
              (\ o ->
                 AcceleratorTypesScopedList' <$>
                   (o .:? "acceleratorTypes" .!= mempty) <*>
                     (o .:? "warning"))

instance ToJSON AcceleratorTypesScopedList where
        toJSON AcceleratorTypesScopedList'{..}
          = object
              (catMaybes
                 [("acceleratorTypes" .=) <$> _atslAcceleratorTypes,
                  ("warning" .=) <$> _atslWarning])

-- | Message containing Cloud CDN configuration for a backend service.
--
-- /See:/ 'backendServiceCdnPolicy' smart constructor.
data BackendServiceCdnPolicy = BackendServiceCdnPolicy'
    { _bscpSignedURLCacheMaxAgeSec :: !(Maybe (Textual Int64))
    , _bscpSignedURLKeyNames       :: !(Maybe [Text])
    , _bscpCacheKeyPolicy          :: !(Maybe CacheKeyPolicy)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceCdnPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bscpSignedURLCacheMaxAgeSec'
--
-- * 'bscpSignedURLKeyNames'
--
-- * 'bscpCacheKeyPolicy'
backendServiceCdnPolicy
    :: BackendServiceCdnPolicy
backendServiceCdnPolicy =
    BackendServiceCdnPolicy'
    { _bscpSignedURLCacheMaxAgeSec = Nothing
    , _bscpSignedURLKeyNames = Nothing
    , _bscpCacheKeyPolicy = Nothing
    }

-- | Maximum number of seconds the response to a signed URL request will be
-- considered fresh. After this time period, the response will be
-- revalidated before being served. Defaults to 1hr (3600s). When serving
-- responses to signed URL requests, Cloud CDN will internally behave as
-- though all responses from this backend had a \"Cache-Control: public,
-- max-age=[TTL]\" header, regardless of any existing Cache-Control header.
-- The actual headers served in responses will not be altered.
bscpSignedURLCacheMaxAgeSec :: Lens' BackendServiceCdnPolicy (Maybe Int64)
bscpSignedURLCacheMaxAgeSec
  = lens _bscpSignedURLCacheMaxAgeSec
      (\ s a -> s{_bscpSignedURLCacheMaxAgeSec = a})
      . mapping _Coerce

-- | [Output Only] Names of the keys for signing request URLs.
bscpSignedURLKeyNames :: Lens' BackendServiceCdnPolicy [Text]
bscpSignedURLKeyNames
  = lens _bscpSignedURLKeyNames
      (\ s a -> s{_bscpSignedURLKeyNames = a})
      . _Default
      . _Coerce

-- | The CacheKeyPolicy for this CdnPolicy.
bscpCacheKeyPolicy :: Lens' BackendServiceCdnPolicy (Maybe CacheKeyPolicy)
bscpCacheKeyPolicy
  = lens _bscpCacheKeyPolicy
      (\ s a -> s{_bscpCacheKeyPolicy = a})

instance FromJSON BackendServiceCdnPolicy where
        parseJSON
          = withObject "BackendServiceCdnPolicy"
              (\ o ->
                 BackendServiceCdnPolicy' <$>
                   (o .:? "signedUrlCacheMaxAgeSec") <*>
                     (o .:? "signedUrlKeyNames" .!= mempty)
                     <*> (o .:? "cacheKeyPolicy"))

instance ToJSON BackendServiceCdnPolicy where
        toJSON BackendServiceCdnPolicy'{..}
          = object
              (catMaybes
                 [("signedUrlCacheMaxAgeSec" .=) <$>
                    _bscpSignedURLCacheMaxAgeSec,
                  ("signedUrlKeyNames" .=) <$> _bscpSignedURLKeyNames,
                  ("cacheKeyPolicy" .=) <$> _bscpCacheKeyPolicy])

--
-- /See:/ 'routeWarningsItemDataItem' smart constructor.
data RouteWarningsItemDataItem = RouteWarningsItemDataItem'
    { _rwidiValue :: !(Maybe Text)
    , _rwidiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouteWarningsItemDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rwidiValue'
--
-- * 'rwidiKey'
routeWarningsItemDataItem
    :: RouteWarningsItemDataItem
routeWarningsItemDataItem =
    RouteWarningsItemDataItem'
    { _rwidiValue = Nothing
    , _rwidiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
rwidiValue :: Lens' RouteWarningsItemDataItem (Maybe Text)
rwidiValue
  = lens _rwidiValue (\ s a -> s{_rwidiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
rwidiKey :: Lens' RouteWarningsItemDataItem (Maybe Text)
rwidiKey = lens _rwidiKey (\ s a -> s{_rwidiKey = a})

instance FromJSON RouteWarningsItemDataItem where
        parseJSON
          = withObject "RouteWarningsItemDataItem"
              (\ o ->
                 RouteWarningsItemDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON RouteWarningsItemDataItem where
        toJSON RouteWarningsItemDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _rwidiValue,
                  ("key" .=) <$> _rwidiKey])

--
-- /See:/ 'nodeGroupAggregatedList' smart constructor.
data NodeGroupAggregatedList = NodeGroupAggregatedList'
    { _ngalNextPageToken :: !(Maybe Text)
    , _ngalKind          :: !Text
    , _ngalItems         :: !(Maybe NodeGroupAggregatedListItems)
    , _ngalSelfLink      :: !(Maybe Text)
    , _ngalWarning       :: !(Maybe NodeGroupAggregatedListWarning)
    , _ngalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngalNextPageToken'
--
-- * 'ngalKind'
--
-- * 'ngalItems'
--
-- * 'ngalSelfLink'
--
-- * 'ngalWarning'
--
-- * 'ngalId'
nodeGroupAggregatedList
    :: NodeGroupAggregatedList
nodeGroupAggregatedList =
    NodeGroupAggregatedList'
    { _ngalNextPageToken = Nothing
    , _ngalKind = "compute#nodeGroupAggregatedList"
    , _ngalItems = Nothing
    , _ngalSelfLink = Nothing
    , _ngalWarning = Nothing
    , _ngalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ngalNextPageToken :: Lens' NodeGroupAggregatedList (Maybe Text)
ngalNextPageToken
  = lens _ngalNextPageToken
      (\ s a -> s{_ngalNextPageToken = a})

-- | [Output Only] Type of resource.Always compute#nodeGroupAggregatedList
-- for aggregated lists of node groups.
ngalKind :: Lens' NodeGroupAggregatedList Text
ngalKind = lens _ngalKind (\ s a -> s{_ngalKind = a})

-- | A list of NodeGroupsScopedList resources.
ngalItems :: Lens' NodeGroupAggregatedList (Maybe NodeGroupAggregatedListItems)
ngalItems
  = lens _ngalItems (\ s a -> s{_ngalItems = a})

-- | [Output Only] Server-defined URL for this resource.
ngalSelfLink :: Lens' NodeGroupAggregatedList (Maybe Text)
ngalSelfLink
  = lens _ngalSelfLink (\ s a -> s{_ngalSelfLink = a})

-- | [Output Only] Informational warning message.
ngalWarning :: Lens' NodeGroupAggregatedList (Maybe NodeGroupAggregatedListWarning)
ngalWarning
  = lens _ngalWarning (\ s a -> s{_ngalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ngalId :: Lens' NodeGroupAggregatedList (Maybe Text)
ngalId = lens _ngalId (\ s a -> s{_ngalId = a})

instance FromJSON NodeGroupAggregatedList where
        parseJSON
          = withObject "NodeGroupAggregatedList"
              (\ o ->
                 NodeGroupAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#nodeGroupAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON NodeGroupAggregatedList where
        toJSON NodeGroupAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ngalNextPageToken,
                  Just ("kind" .= _ngalKind),
                  ("items" .=) <$> _ngalItems,
                  ("selfLink" .=) <$> _ngalSelfLink,
                  ("warning" .=) <$> _ngalWarning,
                  ("id" .=) <$> _ngalId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'vpnTunnelListWarning' smart constructor.
data VPNTunnelListWarning = VPNTunnelListWarning'
    { _vtlwData    :: !(Maybe [VPNTunnelListWarningDataItem])
    , _vtlwCode    :: !(Maybe VPNTunnelListWarningCode)
    , _vtlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtlwData'
--
-- * 'vtlwCode'
--
-- * 'vtlwMessage'
vpnTunnelListWarning
    :: VPNTunnelListWarning
vpnTunnelListWarning =
    VPNTunnelListWarning'
    { _vtlwData = Nothing
    , _vtlwCode = Nothing
    , _vtlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
vtlwData :: Lens' VPNTunnelListWarning [VPNTunnelListWarningDataItem]
vtlwData
  = lens _vtlwData (\ s a -> s{_vtlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
vtlwCode :: Lens' VPNTunnelListWarning (Maybe VPNTunnelListWarningCode)
vtlwCode = lens _vtlwCode (\ s a -> s{_vtlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
vtlwMessage :: Lens' VPNTunnelListWarning (Maybe Text)
vtlwMessage
  = lens _vtlwMessage (\ s a -> s{_vtlwMessage = a})

instance FromJSON VPNTunnelListWarning where
        parseJSON
          = withObject "VPNTunnelListWarning"
              (\ o ->
                 VPNTunnelListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON VPNTunnelListWarning where
        toJSON VPNTunnelListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _vtlwData,
                  ("code" .=) <$> _vtlwCode,
                  ("message" .=) <$> _vtlwMessage])

-- | A list of BackendServicesScopedList resources.
--
-- /See:/ 'backendServiceAggregatedListItems' smart constructor.
newtype BackendServiceAggregatedListItems = BackendServiceAggregatedListItems'
    { _bsaliAddtional :: HashMap Text BackendServicesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsaliAddtional'
backendServiceAggregatedListItems
    :: HashMap Text BackendServicesScopedList -- ^ 'bsaliAddtional'
    -> BackendServiceAggregatedListItems
backendServiceAggregatedListItems pBsaliAddtional_ =
    BackendServiceAggregatedListItems'
    { _bsaliAddtional = _Coerce # pBsaliAddtional_
    }

-- | Name of the scope containing this set of BackendServices.
bsaliAddtional :: Lens' BackendServiceAggregatedListItems (HashMap Text BackendServicesScopedList)
bsaliAddtional
  = lens _bsaliAddtional
      (\ s a -> s{_bsaliAddtional = a})
      . _Coerce

instance FromJSON BackendServiceAggregatedListItems
         where
        parseJSON
          = withObject "BackendServiceAggregatedListItems"
              (\ o ->
                 BackendServiceAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON BackendServiceAggregatedListItems
         where
        toJSON = toJSON . _bsaliAddtional

-- | A list of InstancesScopedList resources.
--
-- /See:/ 'instanceAggregatedListItems' smart constructor.
newtype InstanceAggregatedListItems = InstanceAggregatedListItems'
    { _ialiAddtional :: HashMap Text InstancesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ialiAddtional'
instanceAggregatedListItems
    :: HashMap Text InstancesScopedList -- ^ 'ialiAddtional'
    -> InstanceAggregatedListItems
instanceAggregatedListItems pIaliAddtional_ =
    InstanceAggregatedListItems'
    { _ialiAddtional = _Coerce # pIaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of instances.
ialiAddtional :: Lens' InstanceAggregatedListItems (HashMap Text InstancesScopedList)
ialiAddtional
  = lens _ialiAddtional
      (\ s a -> s{_ialiAddtional = a})
      . _Coerce

instance FromJSON InstanceAggregatedListItems where
        parseJSON
          = withObject "InstanceAggregatedListItems"
              (\ o ->
                 InstanceAggregatedListItems' <$> (parseJSONObject o))

instance ToJSON InstanceAggregatedListItems where
        toJSON = toJSON . _ialiAddtional

-- | [Output Only] Informational warning which replaces the list of
-- autoscalers when the list is empty.
--
-- /See:/ 'autoscalersScopedListWarning' smart constructor.
data AutoscalersScopedListWarning = AutoscalersScopedListWarning'
    { _aslwData    :: !(Maybe [AutoscalersScopedListWarningDataItem])
    , _aslwCode    :: !(Maybe AutoscalersScopedListWarningCode)
    , _aslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalersScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aslwData'
--
-- * 'aslwCode'
--
-- * 'aslwMessage'
autoscalersScopedListWarning
    :: AutoscalersScopedListWarning
autoscalersScopedListWarning =
    AutoscalersScopedListWarning'
    { _aslwData = Nothing
    , _aslwCode = Nothing
    , _aslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
aslwData :: Lens' AutoscalersScopedListWarning [AutoscalersScopedListWarningDataItem]
aslwData
  = lens _aslwData (\ s a -> s{_aslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
aslwCode :: Lens' AutoscalersScopedListWarning (Maybe AutoscalersScopedListWarningCode)
aslwCode = lens _aslwCode (\ s a -> s{_aslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
aslwMessage :: Lens' AutoscalersScopedListWarning (Maybe Text)
aslwMessage
  = lens _aslwMessage (\ s a -> s{_aslwMessage = a})

instance FromJSON AutoscalersScopedListWarning where
        parseJSON
          = withObject "AutoscalersScopedListWarning"
              (\ o ->
                 AutoscalersScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AutoscalersScopedListWarning where
        toJSON AutoscalersScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _aslwData,
                  ("code" .=) <$> _aslwCode,
                  ("message" .=) <$> _aslwMessage])

-- | A specification of the desired way to instantiate a disk in the instance
-- template when its created from a source instance.
--
-- /See:/ 'diskInstantiationConfig' smart constructor.
data DiskInstantiationConfig = DiskInstantiationConfig'
    { _dicAutoDelete      :: !(Maybe Bool)
    , _dicInstantiateFrom :: !(Maybe DiskInstantiationConfigInstantiateFrom)
    , _dicCustomImage     :: !(Maybe Text)
    , _dicDeviceName      :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskInstantiationConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dicAutoDelete'
--
-- * 'dicInstantiateFrom'
--
-- * 'dicCustomImage'
--
-- * 'dicDeviceName'
diskInstantiationConfig
    :: DiskInstantiationConfig
diskInstantiationConfig =
    DiskInstantiationConfig'
    { _dicAutoDelete = Nothing
    , _dicInstantiateFrom = Nothing
    , _dicCustomImage = Nothing
    , _dicDeviceName = Nothing
    }

-- | Specifies whether the disk will be auto-deleted when the instance is
-- deleted (but not when the disk is detached from the instance).
dicAutoDelete :: Lens' DiskInstantiationConfig (Maybe Bool)
dicAutoDelete
  = lens _dicAutoDelete
      (\ s a -> s{_dicAutoDelete = a})

-- | Specifies whether to include the disk and what image to use. Possible
-- values are: - source-image: to use the same image that was used to
-- create the source instance\'s corresponding disk. Applicable to the boot
-- disk and additional read-write disks. - source-image-family: to use the
-- same image family that was used to create the source instance\'s
-- corresponding disk. Applicable to the boot disk and additional
-- read-write disks. - custom-image: to use a user-provided image url for
-- disk creation. Applicable to the boot disk and additional read-write
-- disks. - attach-read-only: to attach a read-only disk. Applicable to
-- read-only disks. - do-not-include: to exclude a disk from the template.
-- Applicable to additional read-write disks, local SSDs, and read-only
-- disks.
dicInstantiateFrom :: Lens' DiskInstantiationConfig (Maybe DiskInstantiationConfigInstantiateFrom)
dicInstantiateFrom
  = lens _dicInstantiateFrom
      (\ s a -> s{_dicInstantiateFrom = a})

-- | The custom source image to be used to restore this disk when
-- instantiating this instance template.
dicCustomImage :: Lens' DiskInstantiationConfig (Maybe Text)
dicCustomImage
  = lens _dicCustomImage
      (\ s a -> s{_dicCustomImage = a})

-- | Specifies the device name of the disk to which the configurations apply
-- to.
dicDeviceName :: Lens' DiskInstantiationConfig (Maybe Text)
dicDeviceName
  = lens _dicDeviceName
      (\ s a -> s{_dicDeviceName = a})

instance FromJSON DiskInstantiationConfig where
        parseJSON
          = withObject "DiskInstantiationConfig"
              (\ o ->
                 DiskInstantiationConfig' <$>
                   (o .:? "autoDelete") <*> (o .:? "instantiateFrom")
                     <*> (o .:? "customImage")
                     <*> (o .:? "deviceName"))

instance ToJSON DiskInstantiationConfig where
        toJSON DiskInstantiationConfig'{..}
          = object
              (catMaybes
                 [("autoDelete" .=) <$> _dicAutoDelete,
                  ("instantiateFrom" .=) <$> _dicInstantiateFrom,
                  ("customImage" .=) <$> _dicCustomImage,
                  ("deviceName" .=) <$> _dicDeviceName])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'diskTypeAggregatedListWarning' smart constructor.
data DiskTypeAggregatedListWarning = DiskTypeAggregatedListWarning'
    { _dtalwData    :: !(Maybe [DiskTypeAggregatedListWarningDataItem])
    , _dtalwCode    :: !(Maybe DiskTypeAggregatedListWarningCode)
    , _dtalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypeAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtalwData'
--
-- * 'dtalwCode'
--
-- * 'dtalwMessage'
diskTypeAggregatedListWarning
    :: DiskTypeAggregatedListWarning
diskTypeAggregatedListWarning =
    DiskTypeAggregatedListWarning'
    { _dtalwData = Nothing
    , _dtalwCode = Nothing
    , _dtalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
dtalwData :: Lens' DiskTypeAggregatedListWarning [DiskTypeAggregatedListWarningDataItem]
dtalwData
  = lens _dtalwData (\ s a -> s{_dtalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
dtalwCode :: Lens' DiskTypeAggregatedListWarning (Maybe DiskTypeAggregatedListWarningCode)
dtalwCode
  = lens _dtalwCode (\ s a -> s{_dtalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
dtalwMessage :: Lens' DiskTypeAggregatedListWarning (Maybe Text)
dtalwMessage
  = lens _dtalwMessage (\ s a -> s{_dtalwMessage = a})

instance FromJSON DiskTypeAggregatedListWarning where
        parseJSON
          = withObject "DiskTypeAggregatedListWarning"
              (\ o ->
                 DiskTypeAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON DiskTypeAggregatedListWarning where
        toJSON DiskTypeAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _dtalwData,
                  ("code" .=) <$> _dtalwCode,
                  ("message" .=) <$> _dtalwMessage])

--
-- /See:/ 'diskTypeListWarningDataItem' smart constructor.
data DiskTypeListWarningDataItem = DiskTypeListWarningDataItem'
    { _dtlwdiValue :: !(Maybe Text)
    , _dtlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypeListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtlwdiValue'
--
-- * 'dtlwdiKey'
diskTypeListWarningDataItem
    :: DiskTypeListWarningDataItem
diskTypeListWarningDataItem =
    DiskTypeListWarningDataItem'
    { _dtlwdiValue = Nothing
    , _dtlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
dtlwdiValue :: Lens' DiskTypeListWarningDataItem (Maybe Text)
dtlwdiValue
  = lens _dtlwdiValue (\ s a -> s{_dtlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
dtlwdiKey :: Lens' DiskTypeListWarningDataItem (Maybe Text)
dtlwdiKey
  = lens _dtlwdiKey (\ s a -> s{_dtlwdiKey = a})

instance FromJSON DiskTypeListWarningDataItem where
        parseJSON
          = withObject "DiskTypeListWarningDataItem"
              (\ o ->
                 DiskTypeListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON DiskTypeListWarningDataItem where
        toJSON DiskTypeListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _dtlwdiValue,
                  ("key" .=) <$> _dtlwdiKey])

-- | Represents a rule that describes one or more match conditions along with
-- the action to be taken when traffic matches this condition (allow or
-- deny).
--
-- /See:/ 'securityPolicyRule' smart constructor.
data SecurityPolicyRule = SecurityPolicyRule'
    { _sprPriority    :: !(Maybe (Textual Int32))
    , _sprKind        :: !Text
    , _sprAction      :: !(Maybe Text)
    , _sprPreview     :: !(Maybe Bool)
    , _sprMatch       :: !(Maybe SecurityPolicyRuleMatcher)
    , _sprDescription :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SecurityPolicyRule' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sprPriority'
--
-- * 'sprKind'
--
-- * 'sprAction'
--
-- * 'sprPreview'
--
-- * 'sprMatch'
--
-- * 'sprDescription'
securityPolicyRule
    :: SecurityPolicyRule
securityPolicyRule =
    SecurityPolicyRule'
    { _sprPriority = Nothing
    , _sprKind = "compute#securityPolicyRule"
    , _sprAction = Nothing
    , _sprPreview = Nothing
    , _sprMatch = Nothing
    , _sprDescription = Nothing
    }

-- | An integer indicating the priority of a rule in the list. The priority
-- must be a positive value between 0 and 2147483647. Rules are evaluated
-- from highest to lowest priority where 0 is the highest priority and
-- 2147483647 is the lowest prority.
sprPriority :: Lens' SecurityPolicyRule (Maybe Int32)
sprPriority
  = lens _sprPriority (\ s a -> s{_sprPriority = a}) .
      mapping _Coerce

-- | [Output only] Type of the resource. Always compute#securityPolicyRule
-- for security policy rules
sprKind :: Lens' SecurityPolicyRule Text
sprKind = lens _sprKind (\ s a -> s{_sprKind = a})

-- | The Action to preform when the client connection triggers the rule. Can
-- currently be either \"allow\" or \"deny()\" where valid values for
-- status are 403, 404, and 502.
sprAction :: Lens' SecurityPolicyRule (Maybe Text)
sprAction
  = lens _sprAction (\ s a -> s{_sprAction = a})

-- | If set to true, the specified action is not enforced.
sprPreview :: Lens' SecurityPolicyRule (Maybe Bool)
sprPreview
  = lens _sprPreview (\ s a -> s{_sprPreview = a})

-- | A match condition that incoming traffic is evaluated against. If it
-- evaluates to true, the corresponding ?action? is enforced.
sprMatch :: Lens' SecurityPolicyRule (Maybe SecurityPolicyRuleMatcher)
sprMatch = lens _sprMatch (\ s a -> s{_sprMatch = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
sprDescription :: Lens' SecurityPolicyRule (Maybe Text)
sprDescription
  = lens _sprDescription
      (\ s a -> s{_sprDescription = a})

instance FromJSON SecurityPolicyRule where
        parseJSON
          = withObject "SecurityPolicyRule"
              (\ o ->
                 SecurityPolicyRule' <$>
                   (o .:? "priority") <*>
                     (o .:? "kind" .!= "compute#securityPolicyRule")
                     <*> (o .:? "action")
                     <*> (o .:? "preview")
                     <*> (o .:? "match")
                     <*> (o .:? "description"))

instance ToJSON SecurityPolicyRule where
        toJSON SecurityPolicyRule'{..}
          = object
              (catMaybes
                 [("priority" .=) <$> _sprPriority,
                  Just ("kind" .= _sprKind),
                  ("action" .=) <$> _sprAction,
                  ("preview" .=) <$> _sprPreview,
                  ("match" .=) <$> _sprMatch,
                  ("description" .=) <$> _sprDescription])

-- | Response for the InterconnectsGetDiagnosticsRequest.
--
-- /See:/ 'interconnectsGetDiagnosticsResponse' smart constructor.
newtype InterconnectsGetDiagnosticsResponse = InterconnectsGetDiagnosticsResponse'
    { _igdrResult :: Maybe InterconnectDiagnostics
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectsGetDiagnosticsResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igdrResult'
interconnectsGetDiagnosticsResponse
    :: InterconnectsGetDiagnosticsResponse
interconnectsGetDiagnosticsResponse =
    InterconnectsGetDiagnosticsResponse'
    { _igdrResult = Nothing
    }

igdrResult :: Lens' InterconnectsGetDiagnosticsResponse (Maybe InterconnectDiagnostics)
igdrResult
  = lens _igdrResult (\ s a -> s{_igdrResult = a})

instance FromJSON InterconnectsGetDiagnosticsResponse
         where
        parseJSON
          = withObject "InterconnectsGetDiagnosticsResponse"
              (\ o ->
                 InterconnectsGetDiagnosticsResponse' <$>
                   (o .:? "result"))

instance ToJSON InterconnectsGetDiagnosticsResponse
         where
        toJSON InterconnectsGetDiagnosticsResponse'{..}
          = object (catMaybes [("result" .=) <$> _igdrResult])

--
-- /See:/ 'vpnTunnelAggregatedListWarningDataItem' smart constructor.
data VPNTunnelAggregatedListWarningDataItem = VPNTunnelAggregatedListWarningDataItem'
    { _vtalwdiValue :: !(Maybe Text)
    , _vtalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtalwdiValue'
--
-- * 'vtalwdiKey'
vpnTunnelAggregatedListWarningDataItem
    :: VPNTunnelAggregatedListWarningDataItem
vpnTunnelAggregatedListWarningDataItem =
    VPNTunnelAggregatedListWarningDataItem'
    { _vtalwdiValue = Nothing
    , _vtalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
vtalwdiValue :: Lens' VPNTunnelAggregatedListWarningDataItem (Maybe Text)
vtalwdiValue
  = lens _vtalwdiValue (\ s a -> s{_vtalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
vtalwdiKey :: Lens' VPNTunnelAggregatedListWarningDataItem (Maybe Text)
vtalwdiKey
  = lens _vtalwdiKey (\ s a -> s{_vtalwdiKey = a})

instance FromJSON
         VPNTunnelAggregatedListWarningDataItem where
        parseJSON
          = withObject "VPNTunnelAggregatedListWarningDataItem"
              (\ o ->
                 VPNTunnelAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         VPNTunnelAggregatedListWarningDataItem where
        toJSON VPNTunnelAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _vtalwdiValue,
                  ("key" .=) <$> _vtalwdiKey])

-- | The available logging options for a firewall rule.
--
-- /See:/ 'firewallLogConfig' smart constructor.
newtype FirewallLogConfig = FirewallLogConfig'
    { _flcEnable :: Maybe Bool
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'FirewallLogConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'flcEnable'
firewallLogConfig
    :: FirewallLogConfig
firewallLogConfig =
    FirewallLogConfig'
    { _flcEnable = Nothing
    }

-- | This field denotes whether to enable logging for a particular firewall
-- rule.
flcEnable :: Lens' FirewallLogConfig (Maybe Bool)
flcEnable
  = lens _flcEnable (\ s a -> s{_flcEnable = a})

instance FromJSON FirewallLogConfig where
        parseJSON
          = withObject "FirewallLogConfig"
              (\ o -> FirewallLogConfig' <$> (o .:? "enable"))

instance ToJSON FirewallLogConfig where
        toJSON FirewallLogConfig'{..}
          = object (catMaybes [("enable" .=) <$> _flcEnable])

-- | Represents a Nat resource. It enables the VMs within the specified
-- subnetworks to access Internet without external IP addresses. It
-- specifies a list of subnetworks (and the ranges within) that want to use
-- NAT. Customers can also provide the external IPs that would be used for
-- NAT. GCP would auto-allocate ephemeral IPs if no external IPs are
-- provided.
--
-- /See:/ 'routerNAT' smart constructor.
data RouterNAT = RouterNAT'
    { _rnatNATIPAllocateOption           :: !(Maybe RouterNATNATIPAllocateOption)
    , _rnatICMPIdleTimeoutSec            :: !(Maybe (Textual Int32))
    , _rnatUdpIdleTimeoutSec             :: !(Maybe (Textual Int32))
    , _rnatNATIPs                        :: !(Maybe [Text])
    , _rnatSubnetworks                   :: !(Maybe [RouterNATSubnetworkToNAT])
    , _rnatMinPortsPerVM                 :: !(Maybe (Textual Int32))
    , _rnatName                          :: !(Maybe Text)
    , _rnatSourceSubnetworkIPRangesToNAT :: !(Maybe RouterNATSourceSubnetworkIPRangesToNAT)
    , _rnatTCPEstablishedIdleTimeoutSec  :: !(Maybe (Textual Int32))
    , _rnatTCPTransitoryIdleTimeoutSec   :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterNAT' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rnatNATIPAllocateOption'
--
-- * 'rnatICMPIdleTimeoutSec'
--
-- * 'rnatUdpIdleTimeoutSec'
--
-- * 'rnatNATIPs'
--
-- * 'rnatSubnetworks'
--
-- * 'rnatMinPortsPerVM'
--
-- * 'rnatName'
--
-- * 'rnatSourceSubnetworkIPRangesToNAT'
--
-- * 'rnatTCPEstablishedIdleTimeoutSec'
--
-- * 'rnatTCPTransitoryIdleTimeoutSec'
routerNAT
    :: RouterNAT
routerNAT =
    RouterNAT'
    { _rnatNATIPAllocateOption = Nothing
    , _rnatICMPIdleTimeoutSec = Nothing
    , _rnatUdpIdleTimeoutSec = Nothing
    , _rnatNATIPs = Nothing
    , _rnatSubnetworks = Nothing
    , _rnatMinPortsPerVM = Nothing
    , _rnatName = Nothing
    , _rnatSourceSubnetworkIPRangesToNAT = Nothing
    , _rnatTCPEstablishedIdleTimeoutSec = Nothing
    , _rnatTCPTransitoryIdleTimeoutSec = Nothing
    }

-- | Specify the NatIpAllocateOption. If it is AUTO_ONLY, then nat_ip should
-- be empty.
rnatNATIPAllocateOption :: Lens' RouterNAT (Maybe RouterNATNATIPAllocateOption)
rnatNATIPAllocateOption
  = lens _rnatNATIPAllocateOption
      (\ s a -> s{_rnatNATIPAllocateOption = a})

-- | Timeout (in seconds) for ICMP connections. Defaults to 30s if not set.
rnatICMPIdleTimeoutSec :: Lens' RouterNAT (Maybe Int32)
rnatICMPIdleTimeoutSec
  = lens _rnatICMPIdleTimeoutSec
      (\ s a -> s{_rnatICMPIdleTimeoutSec = a})
      . mapping _Coerce

-- | Timeout (in seconds) for UDP connections. Defaults to 30s if not set.
rnatUdpIdleTimeoutSec :: Lens' RouterNAT (Maybe Int32)
rnatUdpIdleTimeoutSec
  = lens _rnatUdpIdleTimeoutSec
      (\ s a -> s{_rnatUdpIdleTimeoutSec = a})
      . mapping _Coerce

-- | A list of URLs of the IP resources used for this Nat service. These IPs
-- must be valid static external IP addresses assigned to the project.
-- max_length is subject to change post alpha.
rnatNATIPs :: Lens' RouterNAT [Text]
rnatNATIPs
  = lens _rnatNATIPs (\ s a -> s{_rnatNATIPs = a}) .
      _Default
      . _Coerce

-- | A list of Subnetwork resources whose traffic should be translated by NAT
-- Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the
-- SubnetworkIpRangeToNatOption above.
rnatSubnetworks :: Lens' RouterNAT [RouterNATSubnetworkToNAT]
rnatSubnetworks
  = lens _rnatSubnetworks
      (\ s a -> s{_rnatSubnetworks = a})
      . _Default
      . _Coerce

-- | Minimum number of ports allocated to a VM from this NAT config. If not
-- set, a default number of ports is allocated to a VM. This gets rounded
-- up to the nearest power of 2. Eg. if the value of this field is 50, at
-- least 64 ports will be allocated to a VM.
rnatMinPortsPerVM :: Lens' RouterNAT (Maybe Int32)
rnatMinPortsPerVM
  = lens _rnatMinPortsPerVM
      (\ s a -> s{_rnatMinPortsPerVM = a})
      . mapping _Coerce

-- | Unique name of this Nat service. The name must be 1-63 characters long
-- and comply with RFC1035.
rnatName :: Lens' RouterNAT (Maybe Text)
rnatName = lens _rnatName (\ s a -> s{_rnatName = a})

-- | Specify the Nat option. If this field contains
-- ALL_SUBNETWORKS_ALL_IP_RANGES or ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES,
-- then there should not be any other Router.Nat section in any Router for
-- this network in this region.
rnatSourceSubnetworkIPRangesToNAT :: Lens' RouterNAT (Maybe RouterNATSourceSubnetworkIPRangesToNAT)
rnatSourceSubnetworkIPRangesToNAT
  = lens _rnatSourceSubnetworkIPRangesToNAT
      (\ s a -> s{_rnatSourceSubnetworkIPRangesToNAT = a})

-- | Timeout (in seconds) for TCP established connections. Defaults to 1200s
-- if not set.
rnatTCPEstablishedIdleTimeoutSec :: Lens' RouterNAT (Maybe Int32)
rnatTCPEstablishedIdleTimeoutSec
  = lens _rnatTCPEstablishedIdleTimeoutSec
      (\ s a -> s{_rnatTCPEstablishedIdleTimeoutSec = a})
      . mapping _Coerce

-- | Timeout (in seconds) for TCP transitory connections. Defaults to 30s if
-- not set.
rnatTCPTransitoryIdleTimeoutSec :: Lens' RouterNAT (Maybe Int32)
rnatTCPTransitoryIdleTimeoutSec
  = lens _rnatTCPTransitoryIdleTimeoutSec
      (\ s a -> s{_rnatTCPTransitoryIdleTimeoutSec = a})
      . mapping _Coerce

instance FromJSON RouterNAT where
        parseJSON
          = withObject "RouterNAT"
              (\ o ->
                 RouterNAT' <$>
                   (o .:? "natIpAllocateOption") <*>
                     (o .:? "icmpIdleTimeoutSec")
                     <*> (o .:? "udpIdleTimeoutSec")
                     <*> (o .:? "natIps" .!= mempty)
                     <*> (o .:? "subnetworks" .!= mempty)
                     <*> (o .:? "minPortsPerVm")
                     <*> (o .:? "name")
                     <*> (o .:? "sourceSubnetworkIpRangesToNat")
                     <*> (o .:? "tcpEstablishedIdleTimeoutSec")
                     <*> (o .:? "tcpTransitoryIdleTimeoutSec"))

instance ToJSON RouterNAT where
        toJSON RouterNAT'{..}
          = object
              (catMaybes
                 [("natIpAllocateOption" .=) <$>
                    _rnatNATIPAllocateOption,
                  ("icmpIdleTimeoutSec" .=) <$>
                    _rnatICMPIdleTimeoutSec,
                  ("udpIdleTimeoutSec" .=) <$> _rnatUdpIdleTimeoutSec,
                  ("natIps" .=) <$> _rnatNATIPs,
                  ("subnetworks" .=) <$> _rnatSubnetworks,
                  ("minPortsPerVm" .=) <$> _rnatMinPortsPerVM,
                  ("name" .=) <$> _rnatName,
                  ("sourceSubnetworkIpRangesToNat" .=) <$>
                    _rnatSourceSubnetworkIPRangesToNAT,
                  ("tcpEstablishedIdleTimeoutSec" .=) <$>
                    _rnatTCPEstablishedIdleTimeoutSec,
                  ("tcpTransitoryIdleTimeoutSec" .=) <$>
                    _rnatTCPTransitoryIdleTimeoutSec])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'autoscalerAggregatedListWarning' smart constructor.
data AutoscalerAggregatedListWarning = AutoscalerAggregatedListWarning'
    { _aalwData    :: !(Maybe [AutoscalerAggregatedListWarningDataItem])
    , _aalwCode    :: !(Maybe AutoscalerAggregatedListWarningCode)
    , _aalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalerAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aalwData'
--
-- * 'aalwCode'
--
-- * 'aalwMessage'
autoscalerAggregatedListWarning
    :: AutoscalerAggregatedListWarning
autoscalerAggregatedListWarning =
    AutoscalerAggregatedListWarning'
    { _aalwData = Nothing
    , _aalwCode = Nothing
    , _aalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
aalwData :: Lens' AutoscalerAggregatedListWarning [AutoscalerAggregatedListWarningDataItem]
aalwData
  = lens _aalwData (\ s a -> s{_aalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
aalwCode :: Lens' AutoscalerAggregatedListWarning (Maybe AutoscalerAggregatedListWarningCode)
aalwCode = lens _aalwCode (\ s a -> s{_aalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
aalwMessage :: Lens' AutoscalerAggregatedListWarning (Maybe Text)
aalwMessage
  = lens _aalwMessage (\ s a -> s{_aalwMessage = a})

instance FromJSON AutoscalerAggregatedListWarning
         where
        parseJSON
          = withObject "AutoscalerAggregatedListWarning"
              (\ o ->
                 AutoscalerAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AutoscalerAggregatedListWarning where
        toJSON AutoscalerAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _aalwData,
                  ("code" .=) <$> _aalwCode,
                  ("message" .=) <$> _aalwMessage])

--
-- /See:/ 'autoscalerListWarningDataItem' smart constructor.
data AutoscalerListWarningDataItem = AutoscalerListWarningDataItem'
    { _alwdiValue :: !(Maybe Text)
    , _alwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalerListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'alwdiValue'
--
-- * 'alwdiKey'
autoscalerListWarningDataItem
    :: AutoscalerListWarningDataItem
autoscalerListWarningDataItem =
    AutoscalerListWarningDataItem'
    { _alwdiValue = Nothing
    , _alwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
alwdiValue :: Lens' AutoscalerListWarningDataItem (Maybe Text)
alwdiValue
  = lens _alwdiValue (\ s a -> s{_alwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
alwdiKey :: Lens' AutoscalerListWarningDataItem (Maybe Text)
alwdiKey = lens _alwdiKey (\ s a -> s{_alwdiKey = a})

instance FromJSON AutoscalerListWarningDataItem where
        parseJSON
          = withObject "AutoscalerListWarningDataItem"
              (\ o ->
                 AutoscalerListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON AutoscalerListWarningDataItem where
        toJSON AutoscalerListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _alwdiValue,
                  ("key" .=) <$> _alwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'nodeTypeListWarning' smart constructor.
data NodeTypeListWarning = NodeTypeListWarning'
    { _ntlwData    :: !(Maybe [NodeTypeListWarningDataItem])
    , _ntlwCode    :: !(Maybe NodeTypeListWarningCode)
    , _ntlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypeListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntlwData'
--
-- * 'ntlwCode'
--
-- * 'ntlwMessage'
nodeTypeListWarning
    :: NodeTypeListWarning
nodeTypeListWarning =
    NodeTypeListWarning'
    { _ntlwData = Nothing
    , _ntlwCode = Nothing
    , _ntlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ntlwData :: Lens' NodeTypeListWarning [NodeTypeListWarningDataItem]
ntlwData
  = lens _ntlwData (\ s a -> s{_ntlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ntlwCode :: Lens' NodeTypeListWarning (Maybe NodeTypeListWarningCode)
ntlwCode = lens _ntlwCode (\ s a -> s{_ntlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ntlwMessage :: Lens' NodeTypeListWarning (Maybe Text)
ntlwMessage
  = lens _ntlwMessage (\ s a -> s{_ntlwMessage = a})

instance FromJSON NodeTypeListWarning where
        parseJSON
          = withObject "NodeTypeListWarning"
              (\ o ->
                 NodeTypeListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeTypeListWarning where
        toJSON NodeTypeListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ntlwData,
                  ("code" .=) <$> _ntlwCode,
                  ("message" .=) <$> _ntlwMessage])

-- | Contains a list of HealthCheck resources.
--
-- /See:/ 'healthCheckList' smart constructor.
data HealthCheckList = HealthCheckList'
    { _hclNextPageToken :: !(Maybe Text)
    , _hclKind          :: !Text
    , _hclItems         :: !(Maybe [HealthCheck])
    , _hclSelfLink      :: !(Maybe Text)
    , _hclWarning       :: !(Maybe HealthCheckListWarning)
    , _hclId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HealthCheckList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hclNextPageToken'
--
-- * 'hclKind'
--
-- * 'hclItems'
--
-- * 'hclSelfLink'
--
-- * 'hclWarning'
--
-- * 'hclId'
healthCheckList
    :: HealthCheckList
healthCheckList =
    HealthCheckList'
    { _hclNextPageToken = Nothing
    , _hclKind = "compute#healthCheckList"
    , _hclItems = Nothing
    , _hclSelfLink = Nothing
    , _hclWarning = Nothing
    , _hclId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
hclNextPageToken :: Lens' HealthCheckList (Maybe Text)
hclNextPageToken
  = lens _hclNextPageToken
      (\ s a -> s{_hclNextPageToken = a})

-- | Type of resource.
hclKind :: Lens' HealthCheckList Text
hclKind = lens _hclKind (\ s a -> s{_hclKind = a})

-- | A list of HealthCheck resources.
hclItems :: Lens' HealthCheckList [HealthCheck]
hclItems
  = lens _hclItems (\ s a -> s{_hclItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
hclSelfLink :: Lens' HealthCheckList (Maybe Text)
hclSelfLink
  = lens _hclSelfLink (\ s a -> s{_hclSelfLink = a})

-- | [Output Only] Informational warning message.
hclWarning :: Lens' HealthCheckList (Maybe HealthCheckListWarning)
hclWarning
  = lens _hclWarning (\ s a -> s{_hclWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
hclId :: Lens' HealthCheckList (Maybe Text)
hclId = lens _hclId (\ s a -> s{_hclId = a})

instance FromJSON HealthCheckList where
        parseJSON
          = withObject "HealthCheckList"
              (\ o ->
                 HealthCheckList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#healthCheckList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON HealthCheckList where
        toJSON HealthCheckList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _hclNextPageToken,
                  Just ("kind" .= _hclKind),
                  ("items" .=) <$> _hclItems,
                  ("selfLink" .=) <$> _hclSelfLink,
                  ("warning" .=) <$> _hclWarning,
                  ("id" .=) <$> _hclId])

-- | [Output Only] Encountered errors during the last attempt to create or
-- delete the instance.
--
-- /See:/ 'managedInstanceLastAttemptErrors' smart constructor.
newtype ManagedInstanceLastAttemptErrors = ManagedInstanceLastAttemptErrors'
    { _milaeErrors :: Maybe [ManagedInstanceLastAttemptErrorsErrorsItem]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ManagedInstanceLastAttemptErrors' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'milaeErrors'
managedInstanceLastAttemptErrors
    :: ManagedInstanceLastAttemptErrors
managedInstanceLastAttemptErrors =
    ManagedInstanceLastAttemptErrors'
    { _milaeErrors = Nothing
    }

-- | [Output Only] The array of errors encountered while processing this
-- operation.
milaeErrors :: Lens' ManagedInstanceLastAttemptErrors [ManagedInstanceLastAttemptErrorsErrorsItem]
milaeErrors
  = lens _milaeErrors (\ s a -> s{_milaeErrors = a}) .
      _Default
      . _Coerce

instance FromJSON ManagedInstanceLastAttemptErrors
         where
        parseJSON
          = withObject "ManagedInstanceLastAttemptErrors"
              (\ o ->
                 ManagedInstanceLastAttemptErrors' <$>
                   (o .:? "errors" .!= mempty))

instance ToJSON ManagedInstanceLastAttemptErrors
         where
        toJSON ManagedInstanceLastAttemptErrors'{..}
          = object (catMaybes [("errors" .=) <$> _milaeErrors])

-- | Status of a NAT contained in this router.
--
-- /See:/ 'routerStatusNATStatus' smart constructor.
data RouterStatusNATStatus = RouterStatusNATStatus'
    { _rsnatsUserAllocatedNATIPResources   :: !(Maybe [Text])
    , _rsnatsName                          :: !(Maybe Text)
    , _rsnatsAutoAllocatedNATIPs           :: !(Maybe [Text])
    , _rsnatsMinExtraNATIPsNeeded          :: !(Maybe (Textual Int32))
    , _rsnatsNumVMEndpointsWithNATMAppings :: !(Maybe (Textual Int32))
    , _rsnatsUserAllocatedNATIPs           :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterStatusNATStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rsnatsUserAllocatedNATIPResources'
--
-- * 'rsnatsName'
--
-- * 'rsnatsAutoAllocatedNATIPs'
--
-- * 'rsnatsMinExtraNATIPsNeeded'
--
-- * 'rsnatsNumVMEndpointsWithNATMAppings'
--
-- * 'rsnatsUserAllocatedNATIPs'
routerStatusNATStatus
    :: RouterStatusNATStatus
routerStatusNATStatus =
    RouterStatusNATStatus'
    { _rsnatsUserAllocatedNATIPResources = Nothing
    , _rsnatsName = Nothing
    , _rsnatsAutoAllocatedNATIPs = Nothing
    , _rsnatsMinExtraNATIPsNeeded = Nothing
    , _rsnatsNumVMEndpointsWithNATMAppings = Nothing
    , _rsnatsUserAllocatedNATIPs = Nothing
    }

-- | A list of fully qualified URLs of reserved IP address resources.
rsnatsUserAllocatedNATIPResources :: Lens' RouterStatusNATStatus [Text]
rsnatsUserAllocatedNATIPResources
  = lens _rsnatsUserAllocatedNATIPResources
      (\ s a -> s{_rsnatsUserAllocatedNATIPResources = a})
      . _Default
      . _Coerce

-- | Unique name of this NAT.
rsnatsName :: Lens' RouterStatusNATStatus (Maybe Text)
rsnatsName
  = lens _rsnatsName (\ s a -> s{_rsnatsName = a})

-- | A list of IPs auto-allocated for NAT. Example: [\"1.1.1.1\",
-- \"129.2.16.89\"]
rsnatsAutoAllocatedNATIPs :: Lens' RouterStatusNATStatus [Text]
rsnatsAutoAllocatedNATIPs
  = lens _rsnatsAutoAllocatedNATIPs
      (\ s a -> s{_rsnatsAutoAllocatedNATIPs = a})
      . _Default
      . _Coerce

-- | The number of extra IPs to allocate. This will be greater than 0 only if
-- user-specified IPs are NOT enough to allow all configured VMs to use
-- NAT. This value is meaningful only when auto-allocation of NAT IPs is
-- *not* used.
rsnatsMinExtraNATIPsNeeded :: Lens' RouterStatusNATStatus (Maybe Int32)
rsnatsMinExtraNATIPsNeeded
  = lens _rsnatsMinExtraNATIPsNeeded
      (\ s a -> s{_rsnatsMinExtraNATIPsNeeded = a})
      . mapping _Coerce

-- | Number of VM endpoints (i.e., Nics) that can use NAT.
rsnatsNumVMEndpointsWithNATMAppings :: Lens' RouterStatusNATStatus (Maybe Int32)
rsnatsNumVMEndpointsWithNATMAppings
  = lens _rsnatsNumVMEndpointsWithNATMAppings
      (\ s a ->
         s{_rsnatsNumVMEndpointsWithNATMAppings = a})
      . mapping _Coerce

-- | A list of IPs user-allocated for NAT. They will be raw IP strings like
-- \"179.12.26.133\".
rsnatsUserAllocatedNATIPs :: Lens' RouterStatusNATStatus [Text]
rsnatsUserAllocatedNATIPs
  = lens _rsnatsUserAllocatedNATIPs
      (\ s a -> s{_rsnatsUserAllocatedNATIPs = a})
      . _Default
      . _Coerce

instance FromJSON RouterStatusNATStatus where
        parseJSON
          = withObject "RouterStatusNATStatus"
              (\ o ->
                 RouterStatusNATStatus' <$>
                   (o .:? "userAllocatedNatIpResources" .!= mempty) <*>
                     (o .:? "name")
                     <*> (o .:? "autoAllocatedNatIps" .!= mempty)
                     <*> (o .:? "minExtraNatIpsNeeded")
                     <*> (o .:? "numVmEndpointsWithNatMappings")
                     <*> (o .:? "userAllocatedNatIps" .!= mempty))

instance ToJSON RouterStatusNATStatus where
        toJSON RouterStatusNATStatus'{..}
          = object
              (catMaybes
                 [("userAllocatedNatIpResources" .=) <$>
                    _rsnatsUserAllocatedNATIPResources,
                  ("name" .=) <$> _rsnatsName,
                  ("autoAllocatedNatIps" .=) <$>
                    _rsnatsAutoAllocatedNATIPs,
                  ("minExtraNatIpsNeeded" .=) <$>
                    _rsnatsMinExtraNATIPsNeeded,
                  ("numVmEndpointsWithNatMappings" .=) <$>
                    _rsnatsNumVMEndpointsWithNATMAppings,
                  ("userAllocatedNatIps" .=) <$>
                    _rsnatsUserAllocatedNATIPs])

--
-- /See:/ 'targetPoolsRemoveInstanceRequest' smart constructor.
newtype TargetPoolsRemoveInstanceRequest = TargetPoolsRemoveInstanceRequest'
    { _tprirInstances :: Maybe [InstanceReference]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolsRemoveInstanceRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tprirInstances'
targetPoolsRemoveInstanceRequest
    :: TargetPoolsRemoveInstanceRequest
targetPoolsRemoveInstanceRequest =
    TargetPoolsRemoveInstanceRequest'
    { _tprirInstances = Nothing
    }

-- | URLs of the instances to be removed from target pool.
tprirInstances :: Lens' TargetPoolsRemoveInstanceRequest [InstanceReference]
tprirInstances
  = lens _tprirInstances
      (\ s a -> s{_tprirInstances = a})
      . _Default
      . _Coerce

instance FromJSON TargetPoolsRemoveInstanceRequest
         where
        parseJSON
          = withObject "TargetPoolsRemoveInstanceRequest"
              (\ o ->
                 TargetPoolsRemoveInstanceRequest' <$>
                   (o .:? "instances" .!= mempty))

instance ToJSON TargetPoolsRemoveInstanceRequest
         where
        toJSON TargetPoolsRemoveInstanceRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _tprirInstances])

--
-- /See:/ 'nodeTypeAggregatedListWarningDataItem' smart constructor.
data NodeTypeAggregatedListWarningDataItem = NodeTypeAggregatedListWarningDataItem'
    { _nValue :: !(Maybe Text)
    , _nKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypeAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nValue'
--
-- * 'nKey'
nodeTypeAggregatedListWarningDataItem
    :: NodeTypeAggregatedListWarningDataItem
nodeTypeAggregatedListWarningDataItem =
    NodeTypeAggregatedListWarningDataItem'
    { _nValue = Nothing
    , _nKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
nValue :: Lens' NodeTypeAggregatedListWarningDataItem (Maybe Text)
nValue = lens _nValue (\ s a -> s{_nValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
nKey :: Lens' NodeTypeAggregatedListWarningDataItem (Maybe Text)
nKey = lens _nKey (\ s a -> s{_nKey = a})

instance FromJSON
         NodeTypeAggregatedListWarningDataItem where
        parseJSON
          = withObject "NodeTypeAggregatedListWarningDataItem"
              (\ o ->
                 NodeTypeAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON NodeTypeAggregatedListWarningDataItem
         where
        toJSON NodeTypeAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _nValue, ("key" .=) <$> _nKey])

--
-- /See:/ 'targetInstancesScopedListWarningDataItem' smart constructor.
data TargetInstancesScopedListWarningDataItem = TargetInstancesScopedListWarningDataItem'
    { _tislwdiValue :: !(Maybe Text)
    , _tislwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstancesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tislwdiValue'
--
-- * 'tislwdiKey'
targetInstancesScopedListWarningDataItem
    :: TargetInstancesScopedListWarningDataItem
targetInstancesScopedListWarningDataItem =
    TargetInstancesScopedListWarningDataItem'
    { _tislwdiValue = Nothing
    , _tislwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tislwdiValue :: Lens' TargetInstancesScopedListWarningDataItem (Maybe Text)
tislwdiValue
  = lens _tislwdiValue (\ s a -> s{_tislwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tislwdiKey :: Lens' TargetInstancesScopedListWarningDataItem (Maybe Text)
tislwdiKey
  = lens _tislwdiKey (\ s a -> s{_tislwdiKey = a})

instance FromJSON
         TargetInstancesScopedListWarningDataItem where
        parseJSON
          = withObject
              "TargetInstancesScopedListWarningDataItem"
              (\ o ->
                 TargetInstancesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         TargetInstancesScopedListWarningDataItem where
        toJSON TargetInstancesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tislwdiValue,
                  ("key" .=) <$> _tislwdiKey])

-- | [Output Only] An informational warning that appears when the machine
-- types list is empty.
--
-- /See:/ 'machineTypesScopedListWarning' smart constructor.
data MachineTypesScopedListWarning = MachineTypesScopedListWarning'
    { _mtslwData    :: !(Maybe [MachineTypesScopedListWarningDataItem])
    , _mtslwCode    :: !(Maybe MachineTypesScopedListWarningCode)
    , _mtslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtslwData'
--
-- * 'mtslwCode'
--
-- * 'mtslwMessage'
machineTypesScopedListWarning
    :: MachineTypesScopedListWarning
machineTypesScopedListWarning =
    MachineTypesScopedListWarning'
    { _mtslwData = Nothing
    , _mtslwCode = Nothing
    , _mtslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
mtslwData :: Lens' MachineTypesScopedListWarning [MachineTypesScopedListWarningDataItem]
mtslwData
  = lens _mtslwData (\ s a -> s{_mtslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
mtslwCode :: Lens' MachineTypesScopedListWarning (Maybe MachineTypesScopedListWarningCode)
mtslwCode
  = lens _mtslwCode (\ s a -> s{_mtslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
mtslwMessage :: Lens' MachineTypesScopedListWarning (Maybe Text)
mtslwMessage
  = lens _mtslwMessage (\ s a -> s{_mtslwMessage = a})

instance FromJSON MachineTypesScopedListWarning where
        parseJSON
          = withObject "MachineTypesScopedListWarning"
              (\ o ->
                 MachineTypesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON MachineTypesScopedListWarning where
        toJSON MachineTypesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _mtslwData,
                  ("code" .=) <$> _mtslwCode,
                  ("message" .=) <$> _mtslwMessage])

--
-- /See:/ 'zoneSetLabelsRequest' smart constructor.
data ZoneSetLabelsRequest = ZoneSetLabelsRequest'
    { _zslrLabels           :: !(Maybe ZoneSetLabelsRequestLabels)
    , _zslrLabelFingerprint :: !(Maybe Bytes)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ZoneSetLabelsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zslrLabels'
--
-- * 'zslrLabelFingerprint'
zoneSetLabelsRequest
    :: ZoneSetLabelsRequest
zoneSetLabelsRequest =
    ZoneSetLabelsRequest'
    { _zslrLabels = Nothing
    , _zslrLabelFingerprint = Nothing
    }

-- | The labels to set for this resource.
zslrLabels :: Lens' ZoneSetLabelsRequest (Maybe ZoneSetLabelsRequestLabels)
zslrLabels
  = lens _zslrLabels (\ s a -> s{_zslrLabels = a})

-- | The fingerprint of the previous set of labels for this resource, used to
-- detect conflicts. The fingerprint is initially generated by Compute
-- Engine and changes after every request to modify or update labels. You
-- must always provide an up-to-date fingerprint hash in order to update or
-- change labels. Make a get() request to the resource to get the latest
-- fingerprint.
zslrLabelFingerprint :: Lens' ZoneSetLabelsRequest (Maybe ByteString)
zslrLabelFingerprint
  = lens _zslrLabelFingerprint
      (\ s a -> s{_zslrLabelFingerprint = a})
      . mapping _Bytes

instance FromJSON ZoneSetLabelsRequest where
        parseJSON
          = withObject "ZoneSetLabelsRequest"
              (\ o ->
                 ZoneSetLabelsRequest' <$>
                   (o .:? "labels") <*> (o .:? "labelFingerprint"))

instance ToJSON ZoneSetLabelsRequest where
        toJSON ZoneSetLabelsRequest'{..}
          = object
              (catMaybes
                 [("labels" .=) <$> _zslrLabels,
                  ("labelFingerprint" .=) <$> _zslrLabelFingerprint])

-- | A TargetInstance resource. This resource defines an endpoint instance
-- that terminates traffic of certain protocols. (== resource_for
-- beta.targetInstances ==) (== resource_for v1.targetInstances ==)
--
-- /See:/ 'targetInstance' smart constructor.
data TargetInstance = TargetInstance'
    { _tiKind              :: !Text
    , _tiNATPolicy         :: !(Maybe TargetInstanceNATPolicy)
    , _tiZone              :: !(Maybe Text)
    , _tiSelfLink          :: !(Maybe Text)
    , _tiName              :: !(Maybe Text)
    , _tiCreationTimestamp :: !(Maybe Text)
    , _tiId                :: !(Maybe (Textual Word64))
    , _tiDescription       :: !(Maybe Text)
    , _tiInstance          :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstance' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tiKind'
--
-- * 'tiNATPolicy'
--
-- * 'tiZone'
--
-- * 'tiSelfLink'
--
-- * 'tiName'
--
-- * 'tiCreationTimestamp'
--
-- * 'tiId'
--
-- * 'tiDescription'
--
-- * 'tiInstance'
targetInstance
    :: TargetInstance
targetInstance =
    TargetInstance'
    { _tiKind = "compute#targetInstance"
    , _tiNATPolicy = Nothing
    , _tiZone = Nothing
    , _tiSelfLink = Nothing
    , _tiName = Nothing
    , _tiCreationTimestamp = Nothing
    , _tiId = Nothing
    , _tiDescription = Nothing
    , _tiInstance = Nothing
    }

-- | [Output Only] The type of the resource. Always compute#targetInstance
-- for target instances.
tiKind :: Lens' TargetInstance Text
tiKind = lens _tiKind (\ s a -> s{_tiKind = a})

-- | NAT option controlling how IPs are NAT\'ed to the instance. Currently
-- only NO_NAT (default value) is supported.
tiNATPolicy :: Lens' TargetInstance (Maybe TargetInstanceNATPolicy)
tiNATPolicy
  = lens _tiNATPolicy (\ s a -> s{_tiNATPolicy = a})

-- | [Output Only] URL of the zone where the target instance resides. You
-- must specify this field as part of the HTTP request URL. It is not
-- settable as a field in the request body.
tiZone :: Lens' TargetInstance (Maybe Text)
tiZone = lens _tiZone (\ s a -> s{_tiZone = a})

-- | [Output Only] Server-defined URL for the resource.
tiSelfLink :: Lens' TargetInstance (Maybe Text)
tiSelfLink
  = lens _tiSelfLink (\ s a -> s{_tiSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
tiName :: Lens' TargetInstance (Maybe Text)
tiName = lens _tiName (\ s a -> s{_tiName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
tiCreationTimestamp :: Lens' TargetInstance (Maybe Text)
tiCreationTimestamp
  = lens _tiCreationTimestamp
      (\ s a -> s{_tiCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
tiId :: Lens' TargetInstance (Maybe Word64)
tiId
  = lens _tiId (\ s a -> s{_tiId = a}) .
      mapping _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
tiDescription :: Lens' TargetInstance (Maybe Text)
tiDescription
  = lens _tiDescription
      (\ s a -> s{_tiDescription = a})

-- | A URL to the virtual machine instance that handles traffic for this
-- target instance. When creating a target instance, you can provide the
-- fully-qualified URL or a valid partial URL to the desired virtual
-- machine. For example, the following are all valid URLs: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/instances\/instance
-- - projects\/project\/zones\/zone\/instances\/instance -
-- zones\/zone\/instances\/instance
tiInstance :: Lens' TargetInstance (Maybe Text)
tiInstance
  = lens _tiInstance (\ s a -> s{_tiInstance = a})

instance FromJSON TargetInstance where
        parseJSON
          = withObject "TargetInstance"
              (\ o ->
                 TargetInstance' <$>
                   (o .:? "kind" .!= "compute#targetInstance") <*>
                     (o .:? "natPolicy")
                     <*> (o .:? "zone")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "description")
                     <*> (o .:? "instance"))

instance ToJSON TargetInstance where
        toJSON TargetInstance'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _tiKind),
                  ("natPolicy" .=) <$> _tiNATPolicy,
                  ("zone" .=) <$> _tiZone,
                  ("selfLink" .=) <$> _tiSelfLink,
                  ("name" .=) <$> _tiName,
                  ("creationTimestamp" .=) <$> _tiCreationTimestamp,
                  ("id" .=) <$> _tiId,
                  ("description" .=) <$> _tiDescription,
                  ("instance" .=) <$> _tiInstance])

--
-- /See:/ 'targetPoolInstanceHealth' smart constructor.
data TargetPoolInstanceHealth = TargetPoolInstanceHealth'
    { _tpihKind         :: !Text
    , _tpihHealthStatus :: !(Maybe [HealthStatus])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolInstanceHealth' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpihKind'
--
-- * 'tpihHealthStatus'
targetPoolInstanceHealth
    :: TargetPoolInstanceHealth
targetPoolInstanceHealth =
    TargetPoolInstanceHealth'
    { _tpihKind = "compute#targetPoolInstanceHealth"
    , _tpihHealthStatus = Nothing
    }

-- | [Output Only] Type of resource. Always compute#targetPoolInstanceHealth
-- when checking the health of an instance.
tpihKind :: Lens' TargetPoolInstanceHealth Text
tpihKind = lens _tpihKind (\ s a -> s{_tpihKind = a})

tpihHealthStatus :: Lens' TargetPoolInstanceHealth [HealthStatus]
tpihHealthStatus
  = lens _tpihHealthStatus
      (\ s a -> s{_tpihHealthStatus = a})
      . _Default
      . _Coerce

instance FromJSON TargetPoolInstanceHealth where
        parseJSON
          = withObject "TargetPoolInstanceHealth"
              (\ o ->
                 TargetPoolInstanceHealth' <$>
                   (o .:? "kind" .!= "compute#targetPoolInstanceHealth")
                     <*> (o .:? "healthStatus" .!= mempty))

instance ToJSON TargetPoolInstanceHealth where
        toJSON TargetPoolInstanceHealth'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _tpihKind),
                  ("healthStatus" .=) <$> _tpihHealthStatus])

--
-- /See:/ 'acceleratorTypeAggregatedList' smart constructor.
data AcceleratorTypeAggregatedList = AcceleratorTypeAggregatedList'
    { _atalNextPageToken :: !(Maybe Text)
    , _atalKind          :: !Text
    , _atalItems         :: !(Maybe AcceleratorTypeAggregatedListItems)
    , _atalSelfLink      :: !(Maybe Text)
    , _atalWarning       :: !(Maybe AcceleratorTypeAggregatedListWarning)
    , _atalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypeAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atalNextPageToken'
--
-- * 'atalKind'
--
-- * 'atalItems'
--
-- * 'atalSelfLink'
--
-- * 'atalWarning'
--
-- * 'atalId'
acceleratorTypeAggregatedList
    :: AcceleratorTypeAggregatedList
acceleratorTypeAggregatedList =
    AcceleratorTypeAggregatedList'
    { _atalNextPageToken = Nothing
    , _atalKind = "compute#acceleratorTypeAggregatedList"
    , _atalItems = Nothing
    , _atalSelfLink = Nothing
    , _atalWarning = Nothing
    , _atalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
atalNextPageToken :: Lens' AcceleratorTypeAggregatedList (Maybe Text)
atalNextPageToken
  = lens _atalNextPageToken
      (\ s a -> s{_atalNextPageToken = a})

-- | [Output Only] Type of resource. Always
-- compute#acceleratorTypeAggregatedList for aggregated lists of
-- accelerator types.
atalKind :: Lens' AcceleratorTypeAggregatedList Text
atalKind = lens _atalKind (\ s a -> s{_atalKind = a})

-- | A list of AcceleratorTypesScopedList resources.
atalItems :: Lens' AcceleratorTypeAggregatedList (Maybe AcceleratorTypeAggregatedListItems)
atalItems
  = lens _atalItems (\ s a -> s{_atalItems = a})

-- | [Output Only] Server-defined URL for this resource.
atalSelfLink :: Lens' AcceleratorTypeAggregatedList (Maybe Text)
atalSelfLink
  = lens _atalSelfLink (\ s a -> s{_atalSelfLink = a})

-- | [Output Only] Informational warning message.
atalWarning :: Lens' AcceleratorTypeAggregatedList (Maybe AcceleratorTypeAggregatedListWarning)
atalWarning
  = lens _atalWarning (\ s a -> s{_atalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
atalId :: Lens' AcceleratorTypeAggregatedList (Maybe Text)
atalId = lens _atalId (\ s a -> s{_atalId = a})

instance FromJSON AcceleratorTypeAggregatedList where
        parseJSON
          = withObject "AcceleratorTypeAggregatedList"
              (\ o ->
                 AcceleratorTypeAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#acceleratorTypeAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON AcceleratorTypeAggregatedList where
        toJSON AcceleratorTypeAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _atalNextPageToken,
                  Just ("kind" .= _atalKind),
                  ("items" .=) <$> _atalItems,
                  ("selfLink" .=) <$> _atalSelfLink,
                  ("warning" .=) <$> _atalWarning,
                  ("id" .=) <$> _atalId])

-- | A routing configuration attached to a network resource. The message
-- includes the list of routers associated with the network, and a flag
-- indicating the type of routing behavior to enforce network-wide.
--
-- /See:/ 'networkRoutingConfig' smart constructor.
newtype NetworkRoutingConfig = NetworkRoutingConfig'
    { _nrcRoutingMode :: Maybe NetworkRoutingConfigRoutingMode
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NetworkRoutingConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nrcRoutingMode'
networkRoutingConfig
    :: NetworkRoutingConfig
networkRoutingConfig =
    NetworkRoutingConfig'
    { _nrcRoutingMode = Nothing
    }

-- | The network-wide routing mode to use. If set to REGIONAL, this
-- network\'s cloud routers will only advertise routes with subnets of this
-- network in the same region as the router. If set to GLOBAL, this
-- network\'s cloud routers will advertise routes with all subnets of this
-- network, across regions.
nrcRoutingMode :: Lens' NetworkRoutingConfig (Maybe NetworkRoutingConfigRoutingMode)
nrcRoutingMode
  = lens _nrcRoutingMode
      (\ s a -> s{_nrcRoutingMode = a})

instance FromJSON NetworkRoutingConfig where
        parseJSON
          = withObject "NetworkRoutingConfig"
              (\ o ->
                 NetworkRoutingConfig' <$> (o .:? "routingMode"))

instance ToJSON NetworkRoutingConfig where
        toJSON NetworkRoutingConfig'{..}
          = object
              (catMaybes [("routingMode" .=) <$> _nrcRoutingMode])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'nodeTemplateListWarning' smart constructor.
data NodeTemplateListWarning = NodeTemplateListWarning'
    { _nodData    :: !(Maybe [NodeTemplateListWarningDataItem])
    , _nodCode    :: !(Maybe NodeTemplateListWarningCode)
    , _nodMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nodData'
--
-- * 'nodCode'
--
-- * 'nodMessage'
nodeTemplateListWarning
    :: NodeTemplateListWarning
nodeTemplateListWarning =
    NodeTemplateListWarning'
    { _nodData = Nothing
    , _nodCode = Nothing
    , _nodMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
nodData :: Lens' NodeTemplateListWarning [NodeTemplateListWarningDataItem]
nodData
  = lens _nodData (\ s a -> s{_nodData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
nodCode :: Lens' NodeTemplateListWarning (Maybe NodeTemplateListWarningCode)
nodCode = lens _nodCode (\ s a -> s{_nodCode = a})

-- | [Output Only] A human-readable description of the warning code.
nodMessage :: Lens' NodeTemplateListWarning (Maybe Text)
nodMessage
  = lens _nodMessage (\ s a -> s{_nodMessage = a})

instance FromJSON NodeTemplateListWarning where
        parseJSON
          = withObject "NodeTemplateListWarning"
              (\ o ->
                 NodeTemplateListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeTemplateListWarning where
        toJSON NodeTemplateListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _nodData, ("code" .=) <$> _nodCode,
                  ("message" .=) <$> _nodMessage])

--
-- /See:/ 'instanceGroupManagersListManagedInstancesResponse' smart constructor.
newtype InstanceGroupManagersListManagedInstancesResponse = InstanceGroupManagersListManagedInstancesResponse'
    { _igmlmirManagedInstances :: Maybe [ManagedInstance]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersListManagedInstancesResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmlmirManagedInstances'
instanceGroupManagersListManagedInstancesResponse
    :: InstanceGroupManagersListManagedInstancesResponse
instanceGroupManagersListManagedInstancesResponse =
    InstanceGroupManagersListManagedInstancesResponse'
    { _igmlmirManagedInstances = Nothing
    }

-- | [Output Only] The list of instances in the managed instance group.
igmlmirManagedInstances :: Lens' InstanceGroupManagersListManagedInstancesResponse [ManagedInstance]
igmlmirManagedInstances
  = lens _igmlmirManagedInstances
      (\ s a -> s{_igmlmirManagedInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         InstanceGroupManagersListManagedInstancesResponse
         where
        parseJSON
          = withObject
              "InstanceGroupManagersListManagedInstancesResponse"
              (\ o ->
                 InstanceGroupManagersListManagedInstancesResponse'
                   <$> (o .:? "managedInstances" .!= mempty))

instance ToJSON
         InstanceGroupManagersListManagedInstancesResponse
         where
        toJSON
          InstanceGroupManagersListManagedInstancesResponse'{..}
          = object
              (catMaybes
                 [("managedInstances" .=) <$>
                    _igmlmirManagedInstances])

-- |
--
-- /See:/ 'instanceProperties' smart constructor.
data InstanceProperties = InstanceProperties'
    { _ipServiceAccounts   :: !(Maybe [ServiceAccount])
    , _ipNetworkInterfaces :: !(Maybe [NetworkInterface])
    , _ipGuestAccelerators :: !(Maybe [AcceleratorConfig])
    , _ipMachineType       :: !(Maybe Text)
    , _ipMetadata          :: !(Maybe Metadata)
    , _ipLabels            :: !(Maybe InstancePropertiesLabels)
    , _ipScheduling        :: !(Maybe Scheduling)
    , _ipMinCPUPlatform    :: !(Maybe Text)
    , _ipDisks             :: !(Maybe [AttachedDisk])
    , _ipCanIPForward      :: !(Maybe Bool)
    , _ipDescription       :: !(Maybe Text)
    , _ipTags              :: !(Maybe Tags)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceProperties' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ipServiceAccounts'
--
-- * 'ipNetworkInterfaces'
--
-- * 'ipGuestAccelerators'
--
-- * 'ipMachineType'
--
-- * 'ipMetadata'
--
-- * 'ipLabels'
--
-- * 'ipScheduling'
--
-- * 'ipMinCPUPlatform'
--
-- * 'ipDisks'
--
-- * 'ipCanIPForward'
--
-- * 'ipDescription'
--
-- * 'ipTags'
instanceProperties
    :: InstanceProperties
instanceProperties =
    InstanceProperties'
    { _ipServiceAccounts = Nothing
    , _ipNetworkInterfaces = Nothing
    , _ipGuestAccelerators = Nothing
    , _ipMachineType = Nothing
    , _ipMetadata = Nothing
    , _ipLabels = Nothing
    , _ipScheduling = Nothing
    , _ipMinCPUPlatform = Nothing
    , _ipDisks = Nothing
    , _ipCanIPForward = Nothing
    , _ipDescription = Nothing
    , _ipTags = Nothing
    }

-- | A list of service accounts with specified scopes. Access tokens for
-- these service accounts are available to the instances that are created
-- from this template. Use metadata queries to obtain the access tokens for
-- these instances.
ipServiceAccounts :: Lens' InstanceProperties [ServiceAccount]
ipServiceAccounts
  = lens _ipServiceAccounts
      (\ s a -> s{_ipServiceAccounts = a})
      . _Default
      . _Coerce

-- | An array of network access configurations for this interface.
ipNetworkInterfaces :: Lens' InstanceProperties [NetworkInterface]
ipNetworkInterfaces
  = lens _ipNetworkInterfaces
      (\ s a -> s{_ipNetworkInterfaces = a})
      . _Default
      . _Coerce

-- | A list of guest accelerator cards\' type and count to use for instances
-- created from the instance template.
ipGuestAccelerators :: Lens' InstanceProperties [AcceleratorConfig]
ipGuestAccelerators
  = lens _ipGuestAccelerators
      (\ s a -> s{_ipGuestAccelerators = a})
      . _Default
      . _Coerce

-- | The machine type to use for instances that are created from this
-- template.
ipMachineType :: Lens' InstanceProperties (Maybe Text)
ipMachineType
  = lens _ipMachineType
      (\ s a -> s{_ipMachineType = a})

-- | The metadata key\/value pairs to assign to instances that are created
-- from this template. These pairs can consist of custom metadata or
-- predefined keys. See Project and instance metadata for more information.
ipMetadata :: Lens' InstanceProperties (Maybe Metadata)
ipMetadata
  = lens _ipMetadata (\ s a -> s{_ipMetadata = a})

-- | Labels to apply to instances that are created from this template.
ipLabels :: Lens' InstanceProperties (Maybe InstancePropertiesLabels)
ipLabels = lens _ipLabels (\ s a -> s{_ipLabels = a})

-- | Specifies the scheduling options for the instances that are created from
-- this template.
ipScheduling :: Lens' InstanceProperties (Maybe Scheduling)
ipScheduling
  = lens _ipScheduling (\ s a -> s{_ipScheduling = a})

-- | Minimum cpu\/platform to be used by this instance. The instance may be
-- scheduled on the specified or newer cpu\/platform. Applicable values are
-- the friendly names of CPU platforms, such as minCpuPlatform: \"Intel
-- Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\". For more
-- information, read Specifying a Minimum CPU Platform.
ipMinCPUPlatform :: Lens' InstanceProperties (Maybe Text)
ipMinCPUPlatform
  = lens _ipMinCPUPlatform
      (\ s a -> s{_ipMinCPUPlatform = a})

-- | An array of disks that are associated with the instances that are
-- created from this template.
ipDisks :: Lens' InstanceProperties [AttachedDisk]
ipDisks
  = lens _ipDisks (\ s a -> s{_ipDisks = a}) . _Default
      . _Coerce

-- | Enables instances created based on this template to send packets with
-- source IP addresses other than their own and receive packets with
-- destination IP addresses other than their own. If these instances will
-- be used as an IP gateway or it will be set as the next-hop in a Route
-- resource, specify true. If unsure, leave this set to false. See the
-- Enable IP forwarding documentation for more information.
ipCanIPForward :: Lens' InstanceProperties (Maybe Bool)
ipCanIPForward
  = lens _ipCanIPForward
      (\ s a -> s{_ipCanIPForward = a})

-- | An optional text description for the instances that are created from
-- this instance template.
ipDescription :: Lens' InstanceProperties (Maybe Text)
ipDescription
  = lens _ipDescription
      (\ s a -> s{_ipDescription = a})

-- | A list of tags to apply to the instances that are created from this
-- template. The tags identify valid sources or targets for network
-- firewalls. The setTags method can modify this list of tags. Each tag
-- within the list must comply with RFC1035.
ipTags :: Lens' InstanceProperties (Maybe Tags)
ipTags = lens _ipTags (\ s a -> s{_ipTags = a})

instance FromJSON InstanceProperties where
        parseJSON
          = withObject "InstanceProperties"
              (\ o ->
                 InstanceProperties' <$>
                   (o .:? "serviceAccounts" .!= mempty) <*>
                     (o .:? "networkInterfaces" .!= mempty)
                     <*> (o .:? "guestAccelerators" .!= mempty)
                     <*> (o .:? "machineType")
                     <*> (o .:? "metadata")
                     <*> (o .:? "labels")
                     <*> (o .:? "scheduling")
                     <*> (o .:? "minCpuPlatform")
                     <*> (o .:? "disks" .!= mempty)
                     <*> (o .:? "canIpForward")
                     <*> (o .:? "description")
                     <*> (o .:? "tags"))

instance ToJSON InstanceProperties where
        toJSON InstanceProperties'{..}
          = object
              (catMaybes
                 [("serviceAccounts" .=) <$> _ipServiceAccounts,
                  ("networkInterfaces" .=) <$> _ipNetworkInterfaces,
                  ("guestAccelerators" .=) <$> _ipGuestAccelerators,
                  ("machineType" .=) <$> _ipMachineType,
                  ("metadata" .=) <$> _ipMetadata,
                  ("labels" .=) <$> _ipLabels,
                  ("scheduling" .=) <$> _ipScheduling,
                  ("minCpuPlatform" .=) <$> _ipMinCPUPlatform,
                  ("disks" .=) <$> _ipDisks,
                  ("canIpForward" .=) <$> _ipCanIPForward,
                  ("description" .=) <$> _ipDescription,
                  ("tags" .=) <$> _ipTags])

--
-- /See:/ 'projectsListXpnHostsRequest' smart constructor.
newtype ProjectsListXpnHostsRequest = ProjectsListXpnHostsRequest'
    { _plxhrOrganization :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ProjectsListXpnHostsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'plxhrOrganization'
projectsListXpnHostsRequest
    :: ProjectsListXpnHostsRequest
projectsListXpnHostsRequest =
    ProjectsListXpnHostsRequest'
    { _plxhrOrganization = Nothing
    }

-- | Optional organization ID managed by Cloud Resource Manager, for which to
-- list shared VPC host projects. If not specified, the organization will
-- be inferred from the project.
plxhrOrganization :: Lens' ProjectsListXpnHostsRequest (Maybe Text)
plxhrOrganization
  = lens _plxhrOrganization
      (\ s a -> s{_plxhrOrganization = a})

instance FromJSON ProjectsListXpnHostsRequest where
        parseJSON
          = withObject "ProjectsListXpnHostsRequest"
              (\ o ->
                 ProjectsListXpnHostsRequest' <$>
                   (o .:? "organization"))

instance ToJSON ProjectsListXpnHostsRequest where
        toJSON ProjectsListXpnHostsRequest'{..}
          = object
              (catMaybes
                 [("organization" .=) <$> _plxhrOrganization])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'regionListWarning' smart constructor.
data RegionListWarning = RegionListWarning'
    { _rlwData    :: !(Maybe [RegionListWarningDataItem])
    , _rlwCode    :: !(Maybe RegionListWarningCode)
    , _rlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rlwData'
--
-- * 'rlwCode'
--
-- * 'rlwMessage'
regionListWarning
    :: RegionListWarning
regionListWarning =
    RegionListWarning'
    { _rlwData = Nothing
    , _rlwCode = Nothing
    , _rlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rlwData :: Lens' RegionListWarning [RegionListWarningDataItem]
rlwData
  = lens _rlwData (\ s a -> s{_rlwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rlwCode :: Lens' RegionListWarning (Maybe RegionListWarningCode)
rlwCode = lens _rlwCode (\ s a -> s{_rlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
rlwMessage :: Lens' RegionListWarning (Maybe Text)
rlwMessage
  = lens _rlwMessage (\ s a -> s{_rlwMessage = a})

instance FromJSON RegionListWarning where
        parseJSON
          = withObject "RegionListWarning"
              (\ o ->
                 RegionListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RegionListWarning where
        toJSON RegionListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rlwData, ("code" .=) <$> _rlwCode,
                  ("message" .=) <$> _rlwMessage])

--
-- /See:/ 'nodeGroupsScopedList' smart constructor.
data NodeGroupsScopedList = NodeGroupsScopedList'
    { _ngslNodeGroups :: !(Maybe [NodeGroup])
    , _ngslWarning    :: !(Maybe NodeGroupsScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngslNodeGroups'
--
-- * 'ngslWarning'
nodeGroupsScopedList
    :: NodeGroupsScopedList
nodeGroupsScopedList =
    NodeGroupsScopedList'
    { _ngslNodeGroups = Nothing
    , _ngslWarning = Nothing
    }

-- | [Output Only] A list of node groups contained in this scope.
ngslNodeGroups :: Lens' NodeGroupsScopedList [NodeGroup]
ngslNodeGroups
  = lens _ngslNodeGroups
      (\ s a -> s{_ngslNodeGroups = a})
      . _Default
      . _Coerce

-- | [Output Only] An informational warning that appears when the nodeGroup
-- list is empty.
ngslWarning :: Lens' NodeGroupsScopedList (Maybe NodeGroupsScopedListWarning)
ngslWarning
  = lens _ngslWarning (\ s a -> s{_ngslWarning = a})

instance FromJSON NodeGroupsScopedList where
        parseJSON
          = withObject "NodeGroupsScopedList"
              (\ o ->
                 NodeGroupsScopedList' <$>
                   (o .:? "nodeGroups" .!= mempty) <*>
                     (o .:? "warning"))

instance ToJSON NodeGroupsScopedList where
        toJSON NodeGroupsScopedList'{..}
          = object
              (catMaybes
                 [("nodeGroups" .=) <$> _ngslNodeGroups,
                  ("warning" .=) <$> _ngslWarning])

-- | [Output Only] Informational warning which replaces the list of disk
-- types when the list is empty.
--
-- /See:/ 'diskTypesScopedListWarning' smart constructor.
data DiskTypesScopedListWarning = DiskTypesScopedListWarning'
    { _dtslwData    :: !(Maybe [DiskTypesScopedListWarningDataItem])
    , _dtslwCode    :: !(Maybe DiskTypesScopedListWarningCode)
    , _dtslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtslwData'
--
-- * 'dtslwCode'
--
-- * 'dtslwMessage'
diskTypesScopedListWarning
    :: DiskTypesScopedListWarning
diskTypesScopedListWarning =
    DiskTypesScopedListWarning'
    { _dtslwData = Nothing
    , _dtslwCode = Nothing
    , _dtslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
dtslwData :: Lens' DiskTypesScopedListWarning [DiskTypesScopedListWarningDataItem]
dtslwData
  = lens _dtslwData (\ s a -> s{_dtslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
dtslwCode :: Lens' DiskTypesScopedListWarning (Maybe DiskTypesScopedListWarningCode)
dtslwCode
  = lens _dtslwCode (\ s a -> s{_dtslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
dtslwMessage :: Lens' DiskTypesScopedListWarning (Maybe Text)
dtslwMessage
  = lens _dtslwMessage (\ s a -> s{_dtslwMessage = a})

instance FromJSON DiskTypesScopedListWarning where
        parseJSON
          = withObject "DiskTypesScopedListWarning"
              (\ o ->
                 DiskTypesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON DiskTypesScopedListWarning where
        toJSON DiskTypesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _dtslwData,
                  ("code" .=) <$> _dtslwCode,
                  ("message" .=) <$> _dtslwMessage])

--
-- /See:/ 'regionInstanceGroupManagerListWarningDataItem' smart constructor.
data RegionInstanceGroupManagerListWarningDataItem = RegionInstanceGroupManagerListWarningDataItem'
    { _rigmlwdiValue :: !(Maybe Text)
    , _rigmlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagerListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmlwdiValue'
--
-- * 'rigmlwdiKey'
regionInstanceGroupManagerListWarningDataItem
    :: RegionInstanceGroupManagerListWarningDataItem
regionInstanceGroupManagerListWarningDataItem =
    RegionInstanceGroupManagerListWarningDataItem'
    { _rigmlwdiValue = Nothing
    , _rigmlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
rigmlwdiValue :: Lens' RegionInstanceGroupManagerListWarningDataItem (Maybe Text)
rigmlwdiValue
  = lens _rigmlwdiValue
      (\ s a -> s{_rigmlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
rigmlwdiKey :: Lens' RegionInstanceGroupManagerListWarningDataItem (Maybe Text)
rigmlwdiKey
  = lens _rigmlwdiKey (\ s a -> s{_rigmlwdiKey = a})

instance FromJSON
         RegionInstanceGroupManagerListWarningDataItem where
        parseJSON
          = withObject
              "RegionInstanceGroupManagerListWarningDataItem"
              (\ o ->
                 RegionInstanceGroupManagerListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         RegionInstanceGroupManagerListWarningDataItem where
        toJSON
          RegionInstanceGroupManagerListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _rigmlwdiValue,
                  ("key" .=) <$> _rigmlwdiKey])

-- | [Input Only] Specifies the parameters for a new disk that will be
-- created alongside the new instance. Use initialization parameters to
-- create boot disks or local SSDs attached to the new instance. This
-- property is mutually exclusive with the source property; you can only
-- define one or the other, but not both.
--
-- /See:/ 'attachedDiskInitializeParams' smart constructor.
data AttachedDiskInitializeParams = AttachedDiskInitializeParams'
    { _adipSourceImage              :: !(Maybe Text)
    , _adipDiskSizeGb               :: !(Maybe (Textual Int64))
    , _adipDiskName                 :: !(Maybe Text)
    , _adipSourceImageEncryptionKey :: !(Maybe CustomerEncryptionKey)
    , _adipDiskType                 :: !(Maybe Text)
    , _adipLabels                   :: !(Maybe AttachedDiskInitializeParamsLabels)
    , _adipDescription              :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AttachedDiskInitializeParams' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'adipSourceImage'
--
-- * 'adipDiskSizeGb'
--
-- * 'adipDiskName'
--
-- * 'adipSourceImageEncryptionKey'
--
-- * 'adipDiskType'
--
-- * 'adipLabels'
--
-- * 'adipDescription'
attachedDiskInitializeParams
    :: AttachedDiskInitializeParams
attachedDiskInitializeParams =
    AttachedDiskInitializeParams'
    { _adipSourceImage = Nothing
    , _adipDiskSizeGb = Nothing
    , _adipDiskName = Nothing
    , _adipSourceImageEncryptionKey = Nothing
    , _adipDiskType = Nothing
    , _adipLabels = Nothing
    , _adipDescription = Nothing
    }

-- | The source image to create this disk. When creating a new instance, one
-- of initializeParams.sourceImage or disks.source is required except for
-- local SSD. To create a disk with one of the public operating system
-- images, specify the image by its family name. For example, specify
-- family\/debian-9 to use the latest Debian 9 image:
-- projects\/debian-cloud\/global\/images\/family\/debian-9 Alternatively,
-- use a specific version of a public operating system image:
-- projects\/debian-cloud\/global\/images\/debian-9-stretch-vYYYYMMDD To
-- create a disk with a custom image that you created, specify the image
-- name in the following format: global\/images\/my-custom-image You can
-- also specify a custom image by its image family, which returns the
-- latest version of the image in that family. Replace the image name with
-- family\/family-name: global\/images\/family\/my-image-family If the
-- source image is deleted later, this field will not be set.
adipSourceImage :: Lens' AttachedDiskInitializeParams (Maybe Text)
adipSourceImage
  = lens _adipSourceImage
      (\ s a -> s{_adipSourceImage = a})

-- | Specifies the size of the disk in base-2 GB.
adipDiskSizeGb :: Lens' AttachedDiskInitializeParams (Maybe Int64)
adipDiskSizeGb
  = lens _adipDiskSizeGb
      (\ s a -> s{_adipDiskSizeGb = a})
      . mapping _Coerce

-- | Specifies the disk name. If not specified, the default is to use the
-- name of the instance. If the disk with the instance name exists already
-- in the given zone\/region, a new name will be automatically generated.
adipDiskName :: Lens' AttachedDiskInitializeParams (Maybe Text)
adipDiskName
  = lens _adipDiskName (\ s a -> s{_adipDiskName = a})

-- | The customer-supplied encryption key of the source image. Required if
-- the source image is protected by a customer-supplied encryption key.
-- Instance templates do not store customer-supplied encryption keys, so
-- you cannot create disks for instances in a managed instance group if the
-- source images are encrypted with your own keys.
adipSourceImageEncryptionKey :: Lens' AttachedDiskInitializeParams (Maybe CustomerEncryptionKey)
adipSourceImageEncryptionKey
  = lens _adipSourceImageEncryptionKey
      (\ s a -> s{_adipSourceImageEncryptionKey = a})

-- | Specifies the disk type to use to create the instance. If not specified,
-- the default is pd-standard, specified using the full URL. For example:
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/diskTypes\/pd-standard
-- Other values include pd-ssd and local-ssd. If you define this field, you
-- can provide either the full or partial URL. For example, the following
-- are valid values: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/diskTypes\/diskType
-- - projects\/project\/zones\/zone\/diskTypes\/diskType -
-- zones\/zone\/diskTypes\/diskType Note that for InstanceTemplate, this is
-- the name of the disk type, not URL.
adipDiskType :: Lens' AttachedDiskInitializeParams (Maybe Text)
adipDiskType
  = lens _adipDiskType (\ s a -> s{_adipDiskType = a})

-- | Labels to apply to this disk. These can be later modified by the
-- disks.setLabels method. This field is only applicable for persistent
-- disks.
adipLabels :: Lens' AttachedDiskInitializeParams (Maybe AttachedDiskInitializeParamsLabels)
adipLabels
  = lens _adipLabels (\ s a -> s{_adipLabels = a})

-- | An optional description. Provide this property when creating the disk.
adipDescription :: Lens' AttachedDiskInitializeParams (Maybe Text)
adipDescription
  = lens _adipDescription
      (\ s a -> s{_adipDescription = a})

instance FromJSON AttachedDiskInitializeParams where
        parseJSON
          = withObject "AttachedDiskInitializeParams"
              (\ o ->
                 AttachedDiskInitializeParams' <$>
                   (o .:? "sourceImage") <*> (o .:? "diskSizeGb") <*>
                     (o .:? "diskName")
                     <*> (o .:? "sourceImageEncryptionKey")
                     <*> (o .:? "diskType")
                     <*> (o .:? "labels")
                     <*> (o .:? "description"))

instance ToJSON AttachedDiskInitializeParams where
        toJSON AttachedDiskInitializeParams'{..}
          = object
              (catMaybes
                 [("sourceImage" .=) <$> _adipSourceImage,
                  ("diskSizeGb" .=) <$> _adipDiskSizeGb,
                  ("diskName" .=) <$> _adipDiskName,
                  ("sourceImageEncryptionKey" .=) <$>
                    _adipSourceImageEncryptionKey,
                  ("diskType" .=) <$> _adipDiskType,
                  ("labels" .=) <$> _adipLabels,
                  ("description" .=) <$> _adipDescription])

-- | Secondary IP range of a usable subnetwork.
--
-- /See:/ 'usableSubnetworkSecondaryRange' smart constructor.
data UsableSubnetworkSecondaryRange = UsableSubnetworkSecondaryRange'
    { _ussrRangeName   :: !(Maybe Text)
    , _ussrIPCIdRRange :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UsableSubnetworkSecondaryRange' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ussrRangeName'
--
-- * 'ussrIPCIdRRange'
usableSubnetworkSecondaryRange
    :: UsableSubnetworkSecondaryRange
usableSubnetworkSecondaryRange =
    UsableSubnetworkSecondaryRange'
    { _ussrRangeName = Nothing
    , _ussrIPCIdRRange = Nothing
    }

-- | The name associated with this subnetwork secondary range, used when
-- adding an alias IP range to a VM instance. The name must be 1-63
-- characters long, and comply with RFC1035. The name must be unique within
-- the subnetwork.
ussrRangeName :: Lens' UsableSubnetworkSecondaryRange (Maybe Text)
ussrRangeName
  = lens _ussrRangeName
      (\ s a -> s{_ussrRangeName = a})

-- | The range of IP addresses belonging to this subnetwork secondary range.
ussrIPCIdRRange :: Lens' UsableSubnetworkSecondaryRange (Maybe Text)
ussrIPCIdRRange
  = lens _ussrIPCIdRRange
      (\ s a -> s{_ussrIPCIdRRange = a})

instance FromJSON UsableSubnetworkSecondaryRange
         where
        parseJSON
          = withObject "UsableSubnetworkSecondaryRange"
              (\ o ->
                 UsableSubnetworkSecondaryRange' <$>
                   (o .:? "rangeName") <*> (o .:? "ipCidrRange"))

instance ToJSON UsableSubnetworkSecondaryRange where
        toJSON UsableSubnetworkSecondaryRange'{..}
          = object
              (catMaybes
                 [("rangeName" .=) <$> _ussrRangeName,
                  ("ipCidrRange" .=) <$> _ussrIPCIdRRange])

--
-- /See:/ 'addressesScopedListWarningDataItem' smart constructor.
data AddressesScopedListWarningDataItem = AddressesScopedListWarningDataItem'
    { _aslwdiValue :: !(Maybe Text)
    , _aslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aslwdiValue'
--
-- * 'aslwdiKey'
addressesScopedListWarningDataItem
    :: AddressesScopedListWarningDataItem
addressesScopedListWarningDataItem =
    AddressesScopedListWarningDataItem'
    { _aslwdiValue = Nothing
    , _aslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
aslwdiValue :: Lens' AddressesScopedListWarningDataItem (Maybe Text)
aslwdiValue
  = lens _aslwdiValue (\ s a -> s{_aslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
aslwdiKey :: Lens' AddressesScopedListWarningDataItem (Maybe Text)
aslwdiKey
  = lens _aslwdiKey (\ s a -> s{_aslwdiKey = a})

instance FromJSON AddressesScopedListWarningDataItem
         where
        parseJSON
          = withObject "AddressesScopedListWarningDataItem"
              (\ o ->
                 AddressesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON AddressesScopedListWarningDataItem
         where
        toJSON AddressesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _aslwdiValue,
                  ("key" .=) <$> _aslwdiKey])

--
-- /See:/ 'instanceGroupListWarningDataItem' smart constructor.
data InstanceGroupListWarningDataItem = InstanceGroupListWarningDataItem'
    { _iglwdiValue :: !(Maybe Text)
    , _iglwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iglwdiValue'
--
-- * 'iglwdiKey'
instanceGroupListWarningDataItem
    :: InstanceGroupListWarningDataItem
instanceGroupListWarningDataItem =
    InstanceGroupListWarningDataItem'
    { _iglwdiValue = Nothing
    , _iglwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
iglwdiValue :: Lens' InstanceGroupListWarningDataItem (Maybe Text)
iglwdiValue
  = lens _iglwdiValue (\ s a -> s{_iglwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
iglwdiKey :: Lens' InstanceGroupListWarningDataItem (Maybe Text)
iglwdiKey
  = lens _iglwdiKey (\ s a -> s{_iglwdiKey = a})

instance FromJSON InstanceGroupListWarningDataItem
         where
        parseJSON
          = withObject "InstanceGroupListWarningDataItem"
              (\ o ->
                 InstanceGroupListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON InstanceGroupListWarningDataItem
         where
        toJSON InstanceGroupListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _iglwdiValue,
                  ("key" .=) <$> _iglwdiKey])

-- | A network interface resource attached to an instance.
--
-- /See:/ 'networkInterface' smart constructor.
data NetworkInterface = NetworkInterface'
    { _niKind          :: !Text
    , _niFingerprint   :: !(Maybe Bytes)
    , _niAliasIPRanges :: !(Maybe [AliasIPRange])
    , _niNetwork       :: !(Maybe Text)
    , _niName          :: !(Maybe Text)
    , _niNetworkIP     :: !(Maybe Text)
    , _niSubnetwork    :: !(Maybe Text)
    , _niAccessConfigs :: !(Maybe [AccessConfig])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NetworkInterface' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'niKind'
--
-- * 'niFingerprint'
--
-- * 'niAliasIPRanges'
--
-- * 'niNetwork'
--
-- * 'niName'
--
-- * 'niNetworkIP'
--
-- * 'niSubnetwork'
--
-- * 'niAccessConfigs'
networkInterface
    :: NetworkInterface
networkInterface =
    NetworkInterface'
    { _niKind = "compute#networkInterface"
    , _niFingerprint = Nothing
    , _niAliasIPRanges = Nothing
    , _niNetwork = Nothing
    , _niName = Nothing
    , _niNetworkIP = Nothing
    , _niSubnetwork = Nothing
    , _niAccessConfigs = Nothing
    }

-- | [Output Only] Type of the resource. Always compute#networkInterface for
-- network interfaces.
niKind :: Lens' NetworkInterface Text
niKind = lens _niKind (\ s a -> s{_niKind = a})

-- | Fingerprint hash of contents stored in this network interface. This
-- field will be ignored when inserting an Instance or adding a
-- NetworkInterface. An up-to-date fingerprint must be provided in order to
-- update the NetworkInterface, otherwise the request will fail with error
-- 412 conditionNotMet.
niFingerprint :: Lens' NetworkInterface (Maybe ByteString)
niFingerprint
  = lens _niFingerprint
      (\ s a -> s{_niFingerprint = a})
      . mapping _Bytes

-- | An array of alias IP ranges for this network interface. Can only be
-- specified for network interfaces on subnet-mode networks.
niAliasIPRanges :: Lens' NetworkInterface [AliasIPRange]
niAliasIPRanges
  = lens _niAliasIPRanges
      (\ s a -> s{_niAliasIPRanges = a})
      . _Default
      . _Coerce

-- | URL of the network resource for this instance. When creating an
-- instance, if neither the network nor the subnetwork is specified, the
-- default network global\/networks\/default is used; if the network is not
-- specified but the subnetwork is specified, the network is inferred. This
-- field is optional when creating a firewall rule. If not specified when
-- creating a firewall rule, the default network global\/networks\/default
-- is used. If you specify this property, you can specify the network as a
-- full or partial URL. For example, the following are all valid URLs: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/global\/networks\/network
-- - projects\/project\/global\/networks\/network -
-- global\/networks\/default
niNetwork :: Lens' NetworkInterface (Maybe Text)
niNetwork
  = lens _niNetwork (\ s a -> s{_niNetwork = a})

-- | [Output Only] The name of the network interface, generated by the
-- server. For network devices, these are eth0, eth1, etc.
niName :: Lens' NetworkInterface (Maybe Text)
niName = lens _niName (\ s a -> s{_niName = a})

-- | An IPv4 internal network address to assign to the instance for this
-- network interface. If not specified by the user, an unused internal IP
-- is assigned by the system.
niNetworkIP :: Lens' NetworkInterface (Maybe Text)
niNetworkIP
  = lens _niNetworkIP (\ s a -> s{_niNetworkIP = a})

-- | The URL of the Subnetwork resource for this instance. If the network
-- resource is in legacy mode, do not provide this property. If the network
-- is in auto subnet mode, providing the subnetwork is optional. If the
-- network is in custom subnet mode, then this field should be specified.
-- If you specify this property, you can specify the subnetwork as a full
-- or partial URL. For example, the following are all valid URLs: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/regions\/region\/subnetworks\/subnetwork
-- - regions\/region\/subnetworks\/subnetwork
niSubnetwork :: Lens' NetworkInterface (Maybe Text)
niSubnetwork
  = lens _niSubnetwork (\ s a -> s{_niSubnetwork = a})

-- | An array of configurations for this interface. Currently, only one
-- access config, ONE_TO_ONE_NAT, is supported. If there are no
-- accessConfigs specified, then this instance will have no external
-- internet access.
niAccessConfigs :: Lens' NetworkInterface [AccessConfig]
niAccessConfigs
  = lens _niAccessConfigs
      (\ s a -> s{_niAccessConfigs = a})
      . _Default
      . _Coerce

instance FromJSON NetworkInterface where
        parseJSON
          = withObject "NetworkInterface"
              (\ o ->
                 NetworkInterface' <$>
                   (o .:? "kind" .!= "compute#networkInterface") <*>
                     (o .:? "fingerprint")
                     <*> (o .:? "aliasIpRanges" .!= mempty)
                     <*> (o .:? "network")
                     <*> (o .:? "name")
                     <*> (o .:? "networkIP")
                     <*> (o .:? "subnetwork")
                     <*> (o .:? "accessConfigs" .!= mempty))

instance ToJSON NetworkInterface where
        toJSON NetworkInterface'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _niKind),
                  ("fingerprint" .=) <$> _niFingerprint,
                  ("aliasIpRanges" .=) <$> _niAliasIPRanges,
                  ("network" .=) <$> _niNetwork,
                  ("name" .=) <$> _niName,
                  ("networkIP" .=) <$> _niNetworkIP,
                  ("subnetwork" .=) <$> _niSubnetwork,
                  ("accessConfigs" .=) <$> _niAccessConfigs])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'routerListWarning' smart constructor.
data RouterListWarning = RouterListWarning'
    { _rData    :: !(Maybe [RouterListWarningDataItem])
    , _rCode    :: !(Maybe RouterListWarningCode)
    , _rMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rData'
--
-- * 'rCode'
--
-- * 'rMessage'
routerListWarning
    :: RouterListWarning
routerListWarning =
    RouterListWarning'
    { _rData = Nothing
    , _rCode = Nothing
    , _rMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rData :: Lens' RouterListWarning [RouterListWarningDataItem]
rData
  = lens _rData (\ s a -> s{_rData = a}) . _Default .
      _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rCode :: Lens' RouterListWarning (Maybe RouterListWarningCode)
rCode = lens _rCode (\ s a -> s{_rCode = a})

-- | [Output Only] A human-readable description of the warning code.
rMessage :: Lens' RouterListWarning (Maybe Text)
rMessage = lens _rMessage (\ s a -> s{_rMessage = a})

instance FromJSON RouterListWarning where
        parseJSON
          = withObject "RouterListWarning"
              (\ o ->
                 RouterListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RouterListWarning where
        toJSON RouterListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rData, ("code" .=) <$> _rCode,
                  ("message" .=) <$> _rMessage])

--
-- /See:/ 'firewallListWarningDataItem' smart constructor.
data FirewallListWarningDataItem = FirewallListWarningDataItem'
    { _flwdiValue :: !(Maybe Text)
    , _flwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'FirewallListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'flwdiValue'
--
-- * 'flwdiKey'
firewallListWarningDataItem
    :: FirewallListWarningDataItem
firewallListWarningDataItem =
    FirewallListWarningDataItem'
    { _flwdiValue = Nothing
    , _flwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
flwdiValue :: Lens' FirewallListWarningDataItem (Maybe Text)
flwdiValue
  = lens _flwdiValue (\ s a -> s{_flwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
flwdiKey :: Lens' FirewallListWarningDataItem (Maybe Text)
flwdiKey = lens _flwdiKey (\ s a -> s{_flwdiKey = a})

instance FromJSON FirewallListWarningDataItem where
        parseJSON
          = withObject "FirewallListWarningDataItem"
              (\ o ->
                 FirewallListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON FirewallListWarningDataItem where
        toJSON FirewallListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _flwdiValue,
                  ("key" .=) <$> _flwdiKey])

--
-- /See:/ 'targetPoolsRemoveHealthCheckRequest' smart constructor.
newtype TargetPoolsRemoveHealthCheckRequest = TargetPoolsRemoveHealthCheckRequest'
    { _tprhcrHealthChecks :: Maybe [HealthCheckReference]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolsRemoveHealthCheckRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tprhcrHealthChecks'
targetPoolsRemoveHealthCheckRequest
    :: TargetPoolsRemoveHealthCheckRequest
targetPoolsRemoveHealthCheckRequest =
    TargetPoolsRemoveHealthCheckRequest'
    { _tprhcrHealthChecks = Nothing
    }

-- | Health check URL to be removed. This can be a full or valid partial URL.
-- For example, the following are valid URLs: -
-- https:\/\/www.googleapis.com\/compute\/beta\/projects\/project\/global\/httpHealthChecks\/health-check
-- - projects\/project\/global\/httpHealthChecks\/health-check -
-- global\/httpHealthChecks\/health-check
tprhcrHealthChecks :: Lens' TargetPoolsRemoveHealthCheckRequest [HealthCheckReference]
tprhcrHealthChecks
  = lens _tprhcrHealthChecks
      (\ s a -> s{_tprhcrHealthChecks = a})
      . _Default
      . _Coerce

instance FromJSON TargetPoolsRemoveHealthCheckRequest
         where
        parseJSON
          = withObject "TargetPoolsRemoveHealthCheckRequest"
              (\ o ->
                 TargetPoolsRemoveHealthCheckRequest' <$>
                   (o .:? "healthChecks" .!= mempty))

instance ToJSON TargetPoolsRemoveHealthCheckRequest
         where
        toJSON TargetPoolsRemoveHealthCheckRequest'{..}
          = object
              (catMaybes
                 [("healthChecks" .=) <$> _tprhcrHealthChecks])

--
-- /See:/ 'regionInstanceGroupManagersSetTargetPoolsRequest' smart constructor.
data RegionInstanceGroupManagersSetTargetPoolsRequest = RegionInstanceGroupManagersSetTargetPoolsRequest'
    { _rigmstprFingerprint :: !(Maybe Bytes)
    , _rigmstprTargetPools :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagersSetTargetPoolsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmstprFingerprint'
--
-- * 'rigmstprTargetPools'
regionInstanceGroupManagersSetTargetPoolsRequest
    :: RegionInstanceGroupManagersSetTargetPoolsRequest
regionInstanceGroupManagersSetTargetPoolsRequest =
    RegionInstanceGroupManagersSetTargetPoolsRequest'
    { _rigmstprFingerprint = Nothing
    , _rigmstprTargetPools = Nothing
    }

-- | Fingerprint of the target pools information, which is a hash of the
-- contents. This field is used for optimistic locking when you update the
-- target pool entries. This field is optional.
rigmstprFingerprint :: Lens' RegionInstanceGroupManagersSetTargetPoolsRequest (Maybe ByteString)
rigmstprFingerprint
  = lens _rigmstprFingerprint
      (\ s a -> s{_rigmstprFingerprint = a})
      . mapping _Bytes

-- | The URL of all TargetPool resources to which instances in the
-- instanceGroup field are added. The target pools automatically apply to
-- all of the instances in the managed instance group.
rigmstprTargetPools :: Lens' RegionInstanceGroupManagersSetTargetPoolsRequest [Text]
rigmstprTargetPools
  = lens _rigmstprTargetPools
      (\ s a -> s{_rigmstprTargetPools = a})
      . _Default
      . _Coerce

instance FromJSON
         RegionInstanceGroupManagersSetTargetPoolsRequest
         where
        parseJSON
          = withObject
              "RegionInstanceGroupManagersSetTargetPoolsRequest"
              (\ o ->
                 RegionInstanceGroupManagersSetTargetPoolsRequest' <$>
                   (o .:? "fingerprint") <*>
                     (o .:? "targetPools" .!= mempty))

instance ToJSON
         RegionInstanceGroupManagersSetTargetPoolsRequest
         where
        toJSON
          RegionInstanceGroupManagersSetTargetPoolsRequest'{..}
          = object
              (catMaybes
                 [("fingerprint" .=) <$> _rigmstprFingerprint,
                  ("targetPools" .=) <$> _rigmstprTargetPools])

-- | Message containing Cloud CDN configuration for a backend bucket.
--
-- /See:/ 'backendBucketCdnPolicy' smart constructor.
data BackendBucketCdnPolicy = BackendBucketCdnPolicy'
    { _bbcpSignedURLCacheMaxAgeSec :: !(Maybe (Textual Int64))
    , _bbcpSignedURLKeyNames       :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendBucketCdnPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bbcpSignedURLCacheMaxAgeSec'
--
-- * 'bbcpSignedURLKeyNames'
backendBucketCdnPolicy
    :: BackendBucketCdnPolicy
backendBucketCdnPolicy =
    BackendBucketCdnPolicy'
    { _bbcpSignedURLCacheMaxAgeSec = Nothing
    , _bbcpSignedURLKeyNames = Nothing
    }

-- | Maximum number of seconds the response to a signed URL request will be
-- considered fresh. After this time period, the response will be
-- revalidated before being served. Defaults to 1hr (3600s). When serving
-- responses to signed URL requests, Cloud CDN will internally behave as
-- though all responses from this backend had a \"Cache-Control: public,
-- max-age=[TTL]\" header, regardless of any existing Cache-Control header.
-- The actual headers served in responses will not be altered.
bbcpSignedURLCacheMaxAgeSec :: Lens' BackendBucketCdnPolicy (Maybe Int64)
bbcpSignedURLCacheMaxAgeSec
  = lens _bbcpSignedURLCacheMaxAgeSec
      (\ s a -> s{_bbcpSignedURLCacheMaxAgeSec = a})
      . mapping _Coerce

-- | [Output Only] Names of the keys for signing request URLs.
bbcpSignedURLKeyNames :: Lens' BackendBucketCdnPolicy [Text]
bbcpSignedURLKeyNames
  = lens _bbcpSignedURLKeyNames
      (\ s a -> s{_bbcpSignedURLKeyNames = a})
      . _Default
      . _Coerce

instance FromJSON BackendBucketCdnPolicy where
        parseJSON
          = withObject "BackendBucketCdnPolicy"
              (\ o ->
                 BackendBucketCdnPolicy' <$>
                   (o .:? "signedUrlCacheMaxAgeSec") <*>
                     (o .:? "signedUrlKeyNames" .!= mempty))

instance ToJSON BackendBucketCdnPolicy where
        toJSON BackendBucketCdnPolicy'{..}
          = object
              (catMaybes
                 [("signedUrlCacheMaxAgeSec" .=) <$>
                    _bbcpSignedURLCacheMaxAgeSec,
                  ("signedUrlKeyNames" .=) <$> _bbcpSignedURLKeyNames])

-- | Contains a list of TargetSslProxy resources.
--
-- /See:/ 'targetSSLProxyList' smart constructor.
data TargetSSLProxyList = TargetSSLProxyList'
    { _tsplNextPageToken :: !(Maybe Text)
    , _tsplKind          :: !Text
    , _tsplItems         :: !(Maybe [TargetSSLProxy])
    , _tsplSelfLink      :: !(Maybe Text)
    , _tsplWarning       :: !(Maybe TargetSSLProxyListWarning)
    , _tsplId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetSSLProxyList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tsplNextPageToken'
--
-- * 'tsplKind'
--
-- * 'tsplItems'
--
-- * 'tsplSelfLink'
--
-- * 'tsplWarning'
--
-- * 'tsplId'
targetSSLProxyList
    :: TargetSSLProxyList
targetSSLProxyList =
    TargetSSLProxyList'
    { _tsplNextPageToken = Nothing
    , _tsplKind = "compute#targetSslProxyList"
    , _tsplItems = Nothing
    , _tsplSelfLink = Nothing
    , _tsplWarning = Nothing
    , _tsplId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
tsplNextPageToken :: Lens' TargetSSLProxyList (Maybe Text)
tsplNextPageToken
  = lens _tsplNextPageToken
      (\ s a -> s{_tsplNextPageToken = a})

-- | Type of resource.
tsplKind :: Lens' TargetSSLProxyList Text
tsplKind = lens _tsplKind (\ s a -> s{_tsplKind = a})

-- | A list of TargetSslProxy resources.
tsplItems :: Lens' TargetSSLProxyList [TargetSSLProxy]
tsplItems
  = lens _tsplItems (\ s a -> s{_tsplItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
tsplSelfLink :: Lens' TargetSSLProxyList (Maybe Text)
tsplSelfLink
  = lens _tsplSelfLink (\ s a -> s{_tsplSelfLink = a})

-- | [Output Only] Informational warning message.
tsplWarning :: Lens' TargetSSLProxyList (Maybe TargetSSLProxyListWarning)
tsplWarning
  = lens _tsplWarning (\ s a -> s{_tsplWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
tsplId :: Lens' TargetSSLProxyList (Maybe Text)
tsplId = lens _tsplId (\ s a -> s{_tsplId = a})

instance FromJSON TargetSSLProxyList where
        parseJSON
          = withObject "TargetSSLProxyList"
              (\ o ->
                 TargetSSLProxyList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#targetSslProxyList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetSSLProxyList where
        toJSON TargetSSLProxyList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _tsplNextPageToken,
                  Just ("kind" .= _tsplKind),
                  ("items" .=) <$> _tsplItems,
                  ("selfLink" .=) <$> _tsplSelfLink,
                  ("warning" .=) <$> _tsplWarning,
                  ("id" .=) <$> _tsplId])

--
-- /See:/ 'customerEncryptionKeyProtectedDisk' smart constructor.
data CustomerEncryptionKeyProtectedDisk = CustomerEncryptionKeyProtectedDisk'
    { _cekpdDiskEncryptionKey :: !(Maybe CustomerEncryptionKey)
    , _cekpdSource            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CustomerEncryptionKeyProtectedDisk' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cekpdDiskEncryptionKey'
--
-- * 'cekpdSource'
customerEncryptionKeyProtectedDisk
    :: CustomerEncryptionKeyProtectedDisk
customerEncryptionKeyProtectedDisk =
    CustomerEncryptionKeyProtectedDisk'
    { _cekpdDiskEncryptionKey = Nothing
    , _cekpdSource = Nothing
    }

-- | Decrypts data associated with the disk with a customer-supplied
-- encryption key.
cekpdDiskEncryptionKey :: Lens' CustomerEncryptionKeyProtectedDisk (Maybe CustomerEncryptionKey)
cekpdDiskEncryptionKey
  = lens _cekpdDiskEncryptionKey
      (\ s a -> s{_cekpdDiskEncryptionKey = a})

-- | Specifies a valid partial or full URL to an existing Persistent Disk
-- resource. This field is only applicable for persistent disks.
cekpdSource :: Lens' CustomerEncryptionKeyProtectedDisk (Maybe Text)
cekpdSource
  = lens _cekpdSource (\ s a -> s{_cekpdSource = a})

instance FromJSON CustomerEncryptionKeyProtectedDisk
         where
        parseJSON
          = withObject "CustomerEncryptionKeyProtectedDisk"
              (\ o ->
                 CustomerEncryptionKeyProtectedDisk' <$>
                   (o .:? "diskEncryptionKey") <*> (o .:? "source"))

instance ToJSON CustomerEncryptionKeyProtectedDisk
         where
        toJSON CustomerEncryptionKeyProtectedDisk'{..}
          = object
              (catMaybes
                 [("diskEncryptionKey" .=) <$>
                    _cekpdDiskEncryptionKey,
                  ("source" .=) <$> _cekpdSource])

-- | A list of instance templates.
--
-- /See:/ 'instanceTemplateList' smart constructor.
data InstanceTemplateList = InstanceTemplateList'
    { _itlNextPageToken :: !(Maybe Text)
    , _itlKind          :: !Text
    , _itlItems         :: !(Maybe [InstanceTemplate])
    , _itlSelfLink      :: !(Maybe Text)
    , _itlWarning       :: !(Maybe InstanceTemplateListWarning)
    , _itlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceTemplateList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'itlNextPageToken'
--
-- * 'itlKind'
--
-- * 'itlItems'
--
-- * 'itlSelfLink'
--
-- * 'itlWarning'
--
-- * 'itlId'
instanceTemplateList
    :: InstanceTemplateList
instanceTemplateList =
    InstanceTemplateList'
    { _itlNextPageToken = Nothing
    , _itlKind = "compute#instanceTemplateList"
    , _itlItems = Nothing
    , _itlSelfLink = Nothing
    , _itlWarning = Nothing
    , _itlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
itlNextPageToken :: Lens' InstanceTemplateList (Maybe Text)
itlNextPageToken
  = lens _itlNextPageToken
      (\ s a -> s{_itlNextPageToken = a})

-- | [Output Only] The resource type, which is always
-- compute#instanceTemplatesListResponse for instance template lists.
itlKind :: Lens' InstanceTemplateList Text
itlKind = lens _itlKind (\ s a -> s{_itlKind = a})

-- | A list of InstanceTemplate resources.
itlItems :: Lens' InstanceTemplateList [InstanceTemplate]
itlItems
  = lens _itlItems (\ s a -> s{_itlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
itlSelfLink :: Lens' InstanceTemplateList (Maybe Text)
itlSelfLink
  = lens _itlSelfLink (\ s a -> s{_itlSelfLink = a})

-- | [Output Only] Informational warning message.
itlWarning :: Lens' InstanceTemplateList (Maybe InstanceTemplateListWarning)
itlWarning
  = lens _itlWarning (\ s a -> s{_itlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
itlId :: Lens' InstanceTemplateList (Maybe Text)
itlId = lens _itlId (\ s a -> s{_itlId = a})

instance FromJSON InstanceTemplateList where
        parseJSON
          = withObject "InstanceTemplateList"
              (\ o ->
                 InstanceTemplateList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#instanceTemplateList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceTemplateList where
        toJSON InstanceTemplateList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _itlNextPageToken,
                  Just ("kind" .= _itlKind),
                  ("items" .=) <$> _itlItems,
                  ("selfLink" .=) <$> _itlSelfLink,
                  ("warning" .=) <$> _itlWarning,
                  ("id" .=) <$> _itlId])

-- | Represents a reference to a resource.
--
-- /See:/ 'reference' smart constructor.
data Reference = Reference'
    { _refKind          :: !Text
    , _refReferrer      :: !(Maybe Text)
    , _refReferenceType :: !(Maybe Text)
    , _refTarget        :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Reference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'refKind'
--
-- * 'refReferrer'
--
-- * 'refReferenceType'
--
-- * 'refTarget'
reference
    :: Reference
reference =
    Reference'
    { _refKind = "compute#reference"
    , _refReferrer = Nothing
    , _refReferenceType = Nothing
    , _refTarget = Nothing
    }

-- | [Output Only] Type of the resource. Always compute#reference for
-- references.
refKind :: Lens' Reference Text
refKind = lens _refKind (\ s a -> s{_refKind = a})

-- | URL of the resource which refers to the target.
refReferrer :: Lens' Reference (Maybe Text)
refReferrer
  = lens _refReferrer (\ s a -> s{_refReferrer = a})

-- | A description of the reference type with no implied semantics. Possible
-- values include: - MEMBER_OF
refReferenceType :: Lens' Reference (Maybe Text)
refReferenceType
  = lens _refReferenceType
      (\ s a -> s{_refReferenceType = a})

-- | URL of the resource to which this reference points.
refTarget :: Lens' Reference (Maybe Text)
refTarget
  = lens _refTarget (\ s a -> s{_refTarget = a})

instance FromJSON Reference where
        parseJSON
          = withObject "Reference"
              (\ o ->
                 Reference' <$>
                   (o .:? "kind" .!= "compute#reference") <*>
                     (o .:? "referrer")
                     <*> (o .:? "referenceType")
                     <*> (o .:? "target"))

instance ToJSON Reference where
        toJSON Reference'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _refKind),
                  ("referrer" .=) <$> _refReferrer,
                  ("referenceType" .=) <$> _refReferenceType,
                  ("target" .=) <$> _refTarget])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceGroupAggregatedListWarning' smart constructor.
data InstanceGroupAggregatedListWarning = InstanceGroupAggregatedListWarning'
    { _igalwData    :: !(Maybe [InstanceGroupAggregatedListWarningDataItem])
    , _igalwCode    :: !(Maybe InstanceGroupAggregatedListWarningCode)
    , _igalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igalwData'
--
-- * 'igalwCode'
--
-- * 'igalwMessage'
instanceGroupAggregatedListWarning
    :: InstanceGroupAggregatedListWarning
instanceGroupAggregatedListWarning =
    InstanceGroupAggregatedListWarning'
    { _igalwData = Nothing
    , _igalwCode = Nothing
    , _igalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
igalwData :: Lens' InstanceGroupAggregatedListWarning [InstanceGroupAggregatedListWarningDataItem]
igalwData
  = lens _igalwData (\ s a -> s{_igalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
igalwCode :: Lens' InstanceGroupAggregatedListWarning (Maybe InstanceGroupAggregatedListWarningCode)
igalwCode
  = lens _igalwCode (\ s a -> s{_igalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
igalwMessage :: Lens' InstanceGroupAggregatedListWarning (Maybe Text)
igalwMessage
  = lens _igalwMessage (\ s a -> s{_igalwMessage = a})

instance FromJSON InstanceGroupAggregatedListWarning
         where
        parseJSON
          = withObject "InstanceGroupAggregatedListWarning"
              (\ o ->
                 InstanceGroupAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceGroupAggregatedListWarning
         where
        toJSON InstanceGroupAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _igalwData,
                  ("code" .=) <$> _igalwCode,
                  ("message" .=) <$> _igalwMessage])

-- | Contains a list of Route resources.
--
-- /See:/ 'routeList' smart constructor.
data RouteList = RouteList'
    { _rlNextPageToken :: !(Maybe Text)
    , _rlKind          :: !Text
    , _rlItems         :: !(Maybe [Route])
    , _rlSelfLink      :: !(Maybe Text)
    , _rlWarning       :: !(Maybe RouteListWarning)
    , _rlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouteList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rlNextPageToken'
--
-- * 'rlKind'
--
-- * 'rlItems'
--
-- * 'rlSelfLink'
--
-- * 'rlWarning'
--
-- * 'rlId'
routeList
    :: RouteList
routeList =
    RouteList'
    { _rlNextPageToken = Nothing
    , _rlKind = "compute#routeList"
    , _rlItems = Nothing
    , _rlSelfLink = Nothing
    , _rlWarning = Nothing
    , _rlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
rlNextPageToken :: Lens' RouteList (Maybe Text)
rlNextPageToken
  = lens _rlNextPageToken
      (\ s a -> s{_rlNextPageToken = a})

-- | Type of resource.
rlKind :: Lens' RouteList Text
rlKind = lens _rlKind (\ s a -> s{_rlKind = a})

-- | A list of Route resources.
rlItems :: Lens' RouteList [Route]
rlItems
  = lens _rlItems (\ s a -> s{_rlItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
rlSelfLink :: Lens' RouteList (Maybe Text)
rlSelfLink
  = lens _rlSelfLink (\ s a -> s{_rlSelfLink = a})

-- | [Output Only] Informational warning message.
rlWarning :: Lens' RouteList (Maybe RouteListWarning)
rlWarning
  = lens _rlWarning (\ s a -> s{_rlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
rlId :: Lens' RouteList (Maybe Text)
rlId = lens _rlId (\ s a -> s{_rlId = a})

instance FromJSON RouteList where
        parseJSON
          = withObject "RouteList"
              (\ o ->
                 RouteList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#routeList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RouteList where
        toJSON RouteList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _rlNextPageToken,
                  Just ("kind" .= _rlKind), ("items" .=) <$> _rlItems,
                  ("selfLink" .=) <$> _rlSelfLink,
                  ("warning" .=) <$> _rlWarning, ("id" .=) <$> _rlId])

-- | Contains a list of instance referrers.
--
-- /See:/ 'instanceListReferrers' smart constructor.
data InstanceListReferrers = InstanceListReferrers'
    { _ilrNextPageToken :: !(Maybe Text)
    , _ilrKind          :: !Text
    , _ilrItems         :: !(Maybe [Reference])
    , _ilrSelfLink      :: !(Maybe Text)
    , _ilrWarning       :: !(Maybe InstanceListReferrersWarning)
    , _ilrId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceListReferrers' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ilrNextPageToken'
--
-- * 'ilrKind'
--
-- * 'ilrItems'
--
-- * 'ilrSelfLink'
--
-- * 'ilrWarning'
--
-- * 'ilrId'
instanceListReferrers
    :: InstanceListReferrers
instanceListReferrers =
    InstanceListReferrers'
    { _ilrNextPageToken = Nothing
    , _ilrKind = "compute#instanceListReferrers"
    , _ilrItems = Nothing
    , _ilrSelfLink = Nothing
    , _ilrWarning = Nothing
    , _ilrId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ilrNextPageToken :: Lens' InstanceListReferrers (Maybe Text)
ilrNextPageToken
  = lens _ilrNextPageToken
      (\ s a -> s{_ilrNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#instanceListReferrers for
-- lists of Instance referrers.
ilrKind :: Lens' InstanceListReferrers Text
ilrKind = lens _ilrKind (\ s a -> s{_ilrKind = a})

-- | A list of Reference resources.
ilrItems :: Lens' InstanceListReferrers [Reference]
ilrItems
  = lens _ilrItems (\ s a -> s{_ilrItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
ilrSelfLink :: Lens' InstanceListReferrers (Maybe Text)
ilrSelfLink
  = lens _ilrSelfLink (\ s a -> s{_ilrSelfLink = a})

-- | [Output Only] Informational warning message.
ilrWarning :: Lens' InstanceListReferrers (Maybe InstanceListReferrersWarning)
ilrWarning
  = lens _ilrWarning (\ s a -> s{_ilrWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ilrId :: Lens' InstanceListReferrers (Maybe Text)
ilrId = lens _ilrId (\ s a -> s{_ilrId = a})

instance FromJSON InstanceListReferrers where
        parseJSON
          = withObject "InstanceListReferrers"
              (\ o ->
                 InstanceListReferrers' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#instanceListReferrers")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceListReferrers where
        toJSON InstanceListReferrers'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ilrNextPageToken,
                  Just ("kind" .= _ilrKind),
                  ("items" .=) <$> _ilrItems,
                  ("selfLink" .=) <$> _ilrSelfLink,
                  ("warning" .=) <$> _ilrWarning,
                  ("id" .=) <$> _ilrId])

-- | Router resource.
--
-- /See:/ 'router' smart constructor.
data Router = Router'
    { _rouBGPPeers          :: !(Maybe [RouterBGPPeer])
    , _rouBGP               :: !(Maybe RouterBGP)
    , _rouKind              :: !Text
    , _rouNetwork           :: !(Maybe Text)
    , _rouInterfaces        :: !(Maybe [RouterInterface])
    , _rouSelfLink          :: !(Maybe Text)
    , _rouName              :: !(Maybe Text)
    , _rouCreationTimestamp :: !(Maybe Text)
    , _rouId                :: !(Maybe (Textual Word64))
    , _rouRegion            :: !(Maybe Text)
    , _rouNATs              :: !(Maybe [RouterNAT])
    , _rouDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Router' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rouBGPPeers'
--
-- * 'rouBGP'
--
-- * 'rouKind'
--
-- * 'rouNetwork'
--
-- * 'rouInterfaces'
--
-- * 'rouSelfLink'
--
-- * 'rouName'
--
-- * 'rouCreationTimestamp'
--
-- * 'rouId'
--
-- * 'rouRegion'
--
-- * 'rouNATs'
--
-- * 'rouDescription'
router
    :: Router
router =
    Router'
    { _rouBGPPeers = Nothing
    , _rouBGP = Nothing
    , _rouKind = "compute#router"
    , _rouNetwork = Nothing
    , _rouInterfaces = Nothing
    , _rouSelfLink = Nothing
    , _rouName = Nothing
    , _rouCreationTimestamp = Nothing
    , _rouId = Nothing
    , _rouRegion = Nothing
    , _rouNATs = Nothing
    , _rouDescription = Nothing
    }

-- | BGP information that needs to be configured into the routing stack to
-- establish the BGP peering. It must specify peer ASN and either interface
-- name, IP, or peer IP. Please refer to RFC4273.
rouBGPPeers :: Lens' Router [RouterBGPPeer]
rouBGPPeers
  = lens _rouBGPPeers (\ s a -> s{_rouBGPPeers = a}) .
      _Default
      . _Coerce

-- | BGP information specific to this router.
rouBGP :: Lens' Router (Maybe RouterBGP)
rouBGP = lens _rouBGP (\ s a -> s{_rouBGP = a})

-- | [Output Only] Type of resource. Always compute#router for routers.
rouKind :: Lens' Router Text
rouKind = lens _rouKind (\ s a -> s{_rouKind = a})

-- | URI of the network to which this router belongs.
rouNetwork :: Lens' Router (Maybe Text)
rouNetwork
  = lens _rouNetwork (\ s a -> s{_rouNetwork = a})

-- | Router interfaces. Each interface requires either one linked resource
-- (e.g. linkedVpnTunnel), or IP address and IP address range (e.g.
-- ipRange), or both.
rouInterfaces :: Lens' Router [RouterInterface]
rouInterfaces
  = lens _rouInterfaces
      (\ s a -> s{_rouInterfaces = a})
      . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for the resource.
rouSelfLink :: Lens' Router (Maybe Text)
rouSelfLink
  = lens _rouSelfLink (\ s a -> s{_rouSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
rouName :: Lens' Router (Maybe Text)
rouName = lens _rouName (\ s a -> s{_rouName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
rouCreationTimestamp :: Lens' Router (Maybe Text)
rouCreationTimestamp
  = lens _rouCreationTimestamp
      (\ s a -> s{_rouCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
rouId :: Lens' Router (Maybe Word64)
rouId
  = lens _rouId (\ s a -> s{_rouId = a}) .
      mapping _Coerce

-- | [Output Only] URI of the region where the router resides. You must
-- specify this field as part of the HTTP request URL. It is not settable
-- as a field in the request body.
rouRegion :: Lens' Router (Maybe Text)
rouRegion
  = lens _rouRegion (\ s a -> s{_rouRegion = a})

-- | A list of Nat services created in this router.
rouNATs :: Lens' Router [RouterNAT]
rouNATs
  = lens _rouNATs (\ s a -> s{_rouNATs = a}) . _Default
      . _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
rouDescription :: Lens' Router (Maybe Text)
rouDescription
  = lens _rouDescription
      (\ s a -> s{_rouDescription = a})

instance FromJSON Router where
        parseJSON
          = withObject "Router"
              (\ o ->
                 Router' <$>
                   (o .:? "bgpPeers" .!= mempty) <*> (o .:? "bgp") <*>
                     (o .:? "kind" .!= "compute#router")
                     <*> (o .:? "network")
                     <*> (o .:? "interfaces" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "nats" .!= mempty)
                     <*> (o .:? "description"))

instance ToJSON Router where
        toJSON Router'{..}
          = object
              (catMaybes
                 [("bgpPeers" .=) <$> _rouBGPPeers,
                  ("bgp" .=) <$> _rouBGP, Just ("kind" .= _rouKind),
                  ("network" .=) <$> _rouNetwork,
                  ("interfaces" .=) <$> _rouInterfaces,
                  ("selfLink" .=) <$> _rouSelfLink,
                  ("name" .=) <$> _rouName,
                  ("creationTimestamp" .=) <$> _rouCreationTimestamp,
                  ("id" .=) <$> _rouId, ("region" .=) <$> _rouRegion,
                  ("nats" .=) <$> _rouNATs,
                  ("description" .=) <$> _rouDescription])

--
-- /See:/ 'routerAggregatedListWarningDataItem' smart constructor.
data RouterAggregatedListWarningDataItem = RouterAggregatedListWarningDataItem'
    { _ralwdiValue :: !(Maybe Text)
    , _ralwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ralwdiValue'
--
-- * 'ralwdiKey'
routerAggregatedListWarningDataItem
    :: RouterAggregatedListWarningDataItem
routerAggregatedListWarningDataItem =
    RouterAggregatedListWarningDataItem'
    { _ralwdiValue = Nothing
    , _ralwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ralwdiValue :: Lens' RouterAggregatedListWarningDataItem (Maybe Text)
ralwdiValue
  = lens _ralwdiValue (\ s a -> s{_ralwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ralwdiKey :: Lens' RouterAggregatedListWarningDataItem (Maybe Text)
ralwdiKey
  = lens _ralwdiKey (\ s a -> s{_ralwdiKey = a})

instance FromJSON RouterAggregatedListWarningDataItem
         where
        parseJSON
          = withObject "RouterAggregatedListWarningDataItem"
              (\ o ->
                 RouterAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON RouterAggregatedListWarningDataItem
         where
        toJSON RouterAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ralwdiValue,
                  ("key" .=) <$> _ralwdiKey])

--
-- /See:/ 'routersScopedListWarningDataItem' smart constructor.
data RoutersScopedListWarningDataItem = RoutersScopedListWarningDataItem'
    { _rslwdiValue :: !(Maybe Text)
    , _rslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RoutersScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rslwdiValue'
--
-- * 'rslwdiKey'
routersScopedListWarningDataItem
    :: RoutersScopedListWarningDataItem
routersScopedListWarningDataItem =
    RoutersScopedListWarningDataItem'
    { _rslwdiValue = Nothing
    , _rslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
rslwdiValue :: Lens' RoutersScopedListWarningDataItem (Maybe Text)
rslwdiValue
  = lens _rslwdiValue (\ s a -> s{_rslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
rslwdiKey :: Lens' RoutersScopedListWarningDataItem (Maybe Text)
rslwdiKey
  = lens _rslwdiKey (\ s a -> s{_rslwdiKey = a})

instance FromJSON RoutersScopedListWarningDataItem
         where
        parseJSON
          = withObject "RoutersScopedListWarningDataItem"
              (\ o ->
                 RoutersScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON RoutersScopedListWarningDataItem
         where
        toJSON RoutersScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _rslwdiValue,
                  ("key" .=) <$> _rslwdiKey])

--
-- /See:/ 'subnetworksSetPrivateIPGoogleAccessRequest' smart constructor.
newtype SubnetworksSetPrivateIPGoogleAccessRequest = SubnetworksSetPrivateIPGoogleAccessRequest'
    { _sspigarPrivateIPGoogleAccess :: Maybe Bool
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworksSetPrivateIPGoogleAccessRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sspigarPrivateIPGoogleAccess'
subnetworksSetPrivateIPGoogleAccessRequest
    :: SubnetworksSetPrivateIPGoogleAccessRequest
subnetworksSetPrivateIPGoogleAccessRequest =
    SubnetworksSetPrivateIPGoogleAccessRequest'
    { _sspigarPrivateIPGoogleAccess = Nothing
    }

sspigarPrivateIPGoogleAccess :: Lens' SubnetworksSetPrivateIPGoogleAccessRequest (Maybe Bool)
sspigarPrivateIPGoogleAccess
  = lens _sspigarPrivateIPGoogleAccess
      (\ s a -> s{_sspigarPrivateIPGoogleAccess = a})

instance FromJSON
         SubnetworksSetPrivateIPGoogleAccessRequest where
        parseJSON
          = withObject
              "SubnetworksSetPrivateIPGoogleAccessRequest"
              (\ o ->
                 SubnetworksSetPrivateIPGoogleAccessRequest' <$>
                   (o .:? "privateIpGoogleAccess"))

instance ToJSON
         SubnetworksSetPrivateIPGoogleAccessRequest where
        toJSON
          SubnetworksSetPrivateIPGoogleAccessRequest'{..}
          = object
              (catMaybes
                 [("privateIpGoogleAccess" .=) <$>
                    _sspigarPrivateIPGoogleAccess])

--
-- /See:/ 'targetHTTPSProxyListWarningDataItem' smart constructor.
data TargetHTTPSProxyListWarningDataItem = TargetHTTPSProxyListWarningDataItem'
    { _thplwdiValue :: !(Maybe Text)
    , _thplwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPSProxyListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thplwdiValue'
--
-- * 'thplwdiKey'
targetHTTPSProxyListWarningDataItem
    :: TargetHTTPSProxyListWarningDataItem
targetHTTPSProxyListWarningDataItem =
    TargetHTTPSProxyListWarningDataItem'
    { _thplwdiValue = Nothing
    , _thplwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
thplwdiValue :: Lens' TargetHTTPSProxyListWarningDataItem (Maybe Text)
thplwdiValue
  = lens _thplwdiValue (\ s a -> s{_thplwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
thplwdiKey :: Lens' TargetHTTPSProxyListWarningDataItem (Maybe Text)
thplwdiKey
  = lens _thplwdiKey (\ s a -> s{_thplwdiKey = a})

instance FromJSON TargetHTTPSProxyListWarningDataItem
         where
        parseJSON
          = withObject "TargetHTTPSProxyListWarningDataItem"
              (\ o ->
                 TargetHTTPSProxyListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON TargetHTTPSProxyListWarningDataItem
         where
        toJSON TargetHTTPSProxyListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _thplwdiValue,
                  ("key" .=) <$> _thplwdiKey])

-- | Contains a list of TargetVpnGateway resources.
--
-- /See:/ 'targetVPNGatewayList' smart constructor.
data TargetVPNGatewayList = TargetVPNGatewayList'
    { _tvglNextPageToken :: !(Maybe Text)
    , _tvglKind          :: !Text
    , _tvglItems         :: !(Maybe [TargetVPNGateway])
    , _tvglSelfLink      :: !(Maybe Text)
    , _tvglWarning       :: !(Maybe TargetVPNGatewayListWarning)
    , _tvglId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewayList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvglNextPageToken'
--
-- * 'tvglKind'
--
-- * 'tvglItems'
--
-- * 'tvglSelfLink'
--
-- * 'tvglWarning'
--
-- * 'tvglId'
targetVPNGatewayList
    :: TargetVPNGatewayList
targetVPNGatewayList =
    TargetVPNGatewayList'
    { _tvglNextPageToken = Nothing
    , _tvglKind = "compute#targetVpnGatewayList"
    , _tvglItems = Nothing
    , _tvglSelfLink = Nothing
    , _tvglWarning = Nothing
    , _tvglId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
tvglNextPageToken :: Lens' TargetVPNGatewayList (Maybe Text)
tvglNextPageToken
  = lens _tvglNextPageToken
      (\ s a -> s{_tvglNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#targetVpnGateway for
-- target VPN gateways.
tvglKind :: Lens' TargetVPNGatewayList Text
tvglKind = lens _tvglKind (\ s a -> s{_tvglKind = a})

-- | A list of TargetVpnGateway resources.
tvglItems :: Lens' TargetVPNGatewayList [TargetVPNGateway]
tvglItems
  = lens _tvglItems (\ s a -> s{_tvglItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
tvglSelfLink :: Lens' TargetVPNGatewayList (Maybe Text)
tvglSelfLink
  = lens _tvglSelfLink (\ s a -> s{_tvglSelfLink = a})

-- | [Output Only] Informational warning message.
tvglWarning :: Lens' TargetVPNGatewayList (Maybe TargetVPNGatewayListWarning)
tvglWarning
  = lens _tvglWarning (\ s a -> s{_tvglWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
tvglId :: Lens' TargetVPNGatewayList (Maybe Text)
tvglId = lens _tvglId (\ s a -> s{_tvglId = a})

instance FromJSON TargetVPNGatewayList where
        parseJSON
          = withObject "TargetVPNGatewayList"
              (\ o ->
                 TargetVPNGatewayList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#targetVpnGatewayList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetVPNGatewayList where
        toJSON TargetVPNGatewayList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _tvglNextPageToken,
                  Just ("kind" .= _tvglKind),
                  ("items" .=) <$> _tvglItems,
                  ("selfLink" .=) <$> _tvglSelfLink,
                  ("warning" .=) <$> _tvglWarning,
                  ("id" .=) <$> _tvglId])

-- | Contains a list of SslCertificate resources.
--
-- /See:/ 'sslCertificateList' smart constructor.
data SSLCertificateList = SSLCertificateList'
    { _sclNextPageToken :: !(Maybe Text)
    , _sclKind          :: !Text
    , _sclItems         :: !(Maybe [SSLCertificate])
    , _sclSelfLink      :: !(Maybe Text)
    , _sclWarning       :: !(Maybe SSLCertificateListWarning)
    , _sclId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLCertificateList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sclNextPageToken'
--
-- * 'sclKind'
--
-- * 'sclItems'
--
-- * 'sclSelfLink'
--
-- * 'sclWarning'
--
-- * 'sclId'
sslCertificateList
    :: SSLCertificateList
sslCertificateList =
    SSLCertificateList'
    { _sclNextPageToken = Nothing
    , _sclKind = "compute#sslCertificateList"
    , _sclItems = Nothing
    , _sclSelfLink = Nothing
    , _sclWarning = Nothing
    , _sclId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
sclNextPageToken :: Lens' SSLCertificateList (Maybe Text)
sclNextPageToken
  = lens _sclNextPageToken
      (\ s a -> s{_sclNextPageToken = a})

-- | Type of resource.
sclKind :: Lens' SSLCertificateList Text
sclKind = lens _sclKind (\ s a -> s{_sclKind = a})

-- | A list of SslCertificate resources.
sclItems :: Lens' SSLCertificateList [SSLCertificate]
sclItems
  = lens _sclItems (\ s a -> s{_sclItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
sclSelfLink :: Lens' SSLCertificateList (Maybe Text)
sclSelfLink
  = lens _sclSelfLink (\ s a -> s{_sclSelfLink = a})

-- | [Output Only] Informational warning message.
sclWarning :: Lens' SSLCertificateList (Maybe SSLCertificateListWarning)
sclWarning
  = lens _sclWarning (\ s a -> s{_sclWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
sclId :: Lens' SSLCertificateList (Maybe Text)
sclId = lens _sclId (\ s a -> s{_sclId = a})

instance FromJSON SSLCertificateList where
        parseJSON
          = withObject "SSLCertificateList"
              (\ o ->
                 SSLCertificateList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#sslCertificateList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON SSLCertificateList where
        toJSON SSLCertificateList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _sclNextPageToken,
                  Just ("kind" .= _sclKind),
                  ("items" .=) <$> _sclItems,
                  ("selfLink" .=) <$> _sclSelfLink,
                  ("warning" .=) <$> _sclWarning,
                  ("id" .=) <$> _sclId])

--
-- /See:/ 'firewallAllowedItem' smart constructor.
data FirewallAllowedItem = FirewallAllowedItem'
    { _faiIPProtocol :: !(Maybe Text)
    , _faiPorts      :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'FirewallAllowedItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'faiIPProtocol'
--
-- * 'faiPorts'
firewallAllowedItem
    :: FirewallAllowedItem
firewallAllowedItem =
    FirewallAllowedItem'
    { _faiIPProtocol = Nothing
    , _faiPorts = Nothing
    }

-- | The IP protocol to which this rule applies. The protocol type is
-- required when creating a firewall rule. This value can either be one of
-- the following well known protocol strings (tcp, udp, icmp, esp, ah,
-- ipip, sctp), or the IP protocol number.
faiIPProtocol :: Lens' FirewallAllowedItem (Maybe Text)
faiIPProtocol
  = lens _faiIPProtocol
      (\ s a -> s{_faiIPProtocol = a})

-- | An optional list of ports to which this rule applies. This field is only
-- applicable for UDP or TCP protocol. Each entry must be either an integer
-- or a range. If not specified, this rule applies to connections through
-- any port. Example inputs include: [\"22\"], [\"80\",\"443\"], and
-- [\"12345-12349\"].
faiPorts :: Lens' FirewallAllowedItem [Text]
faiPorts
  = lens _faiPorts (\ s a -> s{_faiPorts = a}) .
      _Default
      . _Coerce

instance FromJSON FirewallAllowedItem where
        parseJSON
          = withObject "FirewallAllowedItem"
              (\ o ->
                 FirewallAllowedItem' <$>
                   (o .:? "IPProtocol") <*> (o .:? "ports" .!= mempty))

instance ToJSON FirewallAllowedItem where
        toJSON FirewallAllowedItem'{..}
          = object
              (catMaybes
                 [("IPProtocol" .=) <$> _faiIPProtocol,
                  ("ports" .=) <$> _faiPorts])

-- | Description-tagged IP ranges for the router to advertise.
--
-- /See:/ 'routerAdvertisedIPRange' smart constructor.
data RouterAdvertisedIPRange = RouterAdvertisedIPRange'
    { _rairRange       :: !(Maybe Text)
    , _rairDescription :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterAdvertisedIPRange' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rairRange'
--
-- * 'rairDescription'
routerAdvertisedIPRange
    :: RouterAdvertisedIPRange
routerAdvertisedIPRange =
    RouterAdvertisedIPRange'
    { _rairRange = Nothing
    , _rairDescription = Nothing
    }

-- | The IP range to advertise. The value must be a CIDR-formatted string.
rairRange :: Lens' RouterAdvertisedIPRange (Maybe Text)
rairRange
  = lens _rairRange (\ s a -> s{_rairRange = a})

-- | User-specified description for the IP range.
rairDescription :: Lens' RouterAdvertisedIPRange (Maybe Text)
rairDescription
  = lens _rairDescription
      (\ s a -> s{_rairDescription = a})

instance FromJSON RouterAdvertisedIPRange where
        parseJSON
          = withObject "RouterAdvertisedIPRange"
              (\ o ->
                 RouterAdvertisedIPRange' <$>
                   (o .:? "range") <*> (o .:? "description"))

instance ToJSON RouterAdvertisedIPRange where
        toJSON RouterAdvertisedIPRange'{..}
          = object
              (catMaybes
                 [("range" .=) <$> _rairRange,
                  ("description" .=) <$> _rairDescription])

--
-- /See:/ 'routerListWarningDataItem' smart constructor.
data RouterListWarningDataItem = RouterListWarningDataItem'
    { _rlwdiValue :: !(Maybe Text)
    , _rlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rlwdiValue'
--
-- * 'rlwdiKey'
routerListWarningDataItem
    :: RouterListWarningDataItem
routerListWarningDataItem =
    RouterListWarningDataItem'
    { _rlwdiValue = Nothing
    , _rlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
rlwdiValue :: Lens' RouterListWarningDataItem (Maybe Text)
rlwdiValue
  = lens _rlwdiValue (\ s a -> s{_rlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
rlwdiKey :: Lens' RouterListWarningDataItem (Maybe Text)
rlwdiKey = lens _rlwdiKey (\ s a -> s{_rlwdiKey = a})

instance FromJSON RouterListWarningDataItem where
        parseJSON
          = withObject "RouterListWarningDataItem"
              (\ o ->
                 RouterListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON RouterListWarningDataItem where
        toJSON RouterListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _rlwdiValue,
                  ("key" .=) <$> _rlwdiKey])

-- | A rule to be applied in a Policy.
--
-- /See:/ 'rule' smart constructor.
data Rule = Rule'
    { _rAction      :: !(Maybe RuleAction)
    , _rNotIns      :: !(Maybe [Text])
    , _rIns         :: !(Maybe [Text])
    , _rLogConfigs  :: !(Maybe [LogConfig])
    , _rConditions  :: !(Maybe [Condition])
    , _rPermissions :: !(Maybe [Text])
    , _rDescription :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Rule' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rAction'
--
-- * 'rNotIns'
--
-- * 'rIns'
--
-- * 'rLogConfigs'
--
-- * 'rConditions'
--
-- * 'rPermissions'
--
-- * 'rDescription'
rule
    :: Rule
rule =
    Rule'
    { _rAction = Nothing
    , _rNotIns = Nothing
    , _rIns = Nothing
    , _rLogConfigs = Nothing
    , _rConditions = Nothing
    , _rPermissions = Nothing
    , _rDescription = Nothing
    }

-- | Required
rAction :: Lens' Rule (Maybe RuleAction)
rAction = lens _rAction (\ s a -> s{_rAction = a})

-- | If one or more \'not_in\' clauses are specified, the rule matches if the
-- PRINCIPAL\/AUTHORITY_SELECTOR is in none of the entries.
rNotIns :: Lens' Rule [Text]
rNotIns
  = lens _rNotIns (\ s a -> s{_rNotIns = a}) . _Default
      . _Coerce

-- | If one or more \'in\' clauses are specified, the rule matches if the
-- PRINCIPAL\/AUTHORITY_SELECTOR is in at least one of these entries.
rIns :: Lens' Rule [Text]
rIns
  = lens _rIns (\ s a -> s{_rIns = a}) . _Default .
      _Coerce

-- | The config returned to callers of tech.iam.IAM.CheckPolicy for any
-- entries that match the LOG action.
rLogConfigs :: Lens' Rule [LogConfig]
rLogConfigs
  = lens _rLogConfigs (\ s a -> s{_rLogConfigs = a}) .
      _Default
      . _Coerce

-- | Additional restrictions that must be met. All conditions must pass for
-- the rule to match.
rConditions :: Lens' Rule [Condition]
rConditions
  = lens _rConditions (\ s a -> s{_rConditions = a}) .
      _Default
      . _Coerce

-- | A permission is a string of form \'..\' (e.g.,
-- \'storage.buckets.list\'). A value of \'*\' matches all permissions, and
-- a verb part of \'*\' (e.g., \'storage.buckets.*\') matches all verbs.
rPermissions :: Lens' Rule [Text]
rPermissions
  = lens _rPermissions (\ s a -> s{_rPermissions = a})
      . _Default
      . _Coerce

-- | Human-readable description of the rule.
rDescription :: Lens' Rule (Maybe Text)
rDescription
  = lens _rDescription (\ s a -> s{_rDescription = a})

instance FromJSON Rule where
        parseJSON
          = withObject "Rule"
              (\ o ->
                 Rule' <$>
                   (o .:? "action") <*> (o .:? "notIns" .!= mempty) <*>
                     (o .:? "ins" .!= mempty)
                     <*> (o .:? "logConfigs" .!= mempty)
                     <*> (o .:? "conditions" .!= mempty)
                     <*> (o .:? "permissions" .!= mempty)
                     <*> (o .:? "description"))

instance ToJSON Rule where
        toJSON Rule'{..}
          = object
              (catMaybes
                 [("action" .=) <$> _rAction,
                  ("notIns" .=) <$> _rNotIns, ("ins" .=) <$> _rIns,
                  ("logConfigs" .=) <$> _rLogConfigs,
                  ("conditions" .=) <$> _rConditions,
                  ("permissions" .=) <$> _rPermissions,
                  ("description" .=) <$> _rDescription])

-- | Contains a list of BackendServicesScopedList.
--
-- /See:/ 'backendServiceAggregatedList' smart constructor.
data BackendServiceAggregatedList = BackendServiceAggregatedList'
    { _bsalNextPageToken :: !(Maybe Text)
    , _bsalKind          :: !Text
    , _bsalItems         :: !(Maybe BackendServiceAggregatedListItems)
    , _bsalSelfLink      :: !(Maybe Text)
    , _bsalWarning       :: !(Maybe BackendServiceAggregatedListWarning)
    , _bsalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsalNextPageToken'
--
-- * 'bsalKind'
--
-- * 'bsalItems'
--
-- * 'bsalSelfLink'
--
-- * 'bsalWarning'
--
-- * 'bsalId'
backendServiceAggregatedList
    :: BackendServiceAggregatedList
backendServiceAggregatedList =
    BackendServiceAggregatedList'
    { _bsalNextPageToken = Nothing
    , _bsalKind = "compute#backendServiceAggregatedList"
    , _bsalItems = Nothing
    , _bsalSelfLink = Nothing
    , _bsalWarning = Nothing
    , _bsalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
bsalNextPageToken :: Lens' BackendServiceAggregatedList (Maybe Text)
bsalNextPageToken
  = lens _bsalNextPageToken
      (\ s a -> s{_bsalNextPageToken = a})

-- | Type of resource.
bsalKind :: Lens' BackendServiceAggregatedList Text
bsalKind = lens _bsalKind (\ s a -> s{_bsalKind = a})

-- | A list of BackendServicesScopedList resources.
bsalItems :: Lens' BackendServiceAggregatedList (Maybe BackendServiceAggregatedListItems)
bsalItems
  = lens _bsalItems (\ s a -> s{_bsalItems = a})

-- | [Output Only] Server-defined URL for this resource.
bsalSelfLink :: Lens' BackendServiceAggregatedList (Maybe Text)
bsalSelfLink
  = lens _bsalSelfLink (\ s a -> s{_bsalSelfLink = a})

-- | [Output Only] Informational warning message.
bsalWarning :: Lens' BackendServiceAggregatedList (Maybe BackendServiceAggregatedListWarning)
bsalWarning
  = lens _bsalWarning (\ s a -> s{_bsalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
bsalId :: Lens' BackendServiceAggregatedList (Maybe Text)
bsalId = lens _bsalId (\ s a -> s{_bsalId = a})

instance FromJSON BackendServiceAggregatedList where
        parseJSON
          = withObject "BackendServiceAggregatedList"
              (\ o ->
                 BackendServiceAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#backendServiceAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON BackendServiceAggregatedList where
        toJSON BackendServiceAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _bsalNextPageToken,
                  Just ("kind" .= _bsalKind),
                  ("items" .=) <$> _bsalItems,
                  ("selfLink" .=) <$> _bsalSelfLink,
                  ("warning" .=) <$> _bsalWarning,
                  ("id" .=) <$> _bsalId])

-- | Represents a Network resource. Read Virtual Private Cloud (VPC) Network
-- Overview for more information. (== resource_for v1.networks ==) (==
-- resource_for beta.networks ==)
--
-- /See:/ 'network' smart constructor.
data Network = Network'
    { _nAutoCreateSubnetworks :: !(Maybe Bool)
    , _nKind                  :: !Text
    , _nRoutingConfig         :: !(Maybe NetworkRoutingConfig)
    , _nSubnetworks           :: !(Maybe [Text])
    , _nIPv4Range             :: !(Maybe Text)
    , _nSelfLink              :: !(Maybe Text)
    , _nName                  :: !(Maybe Text)
    , _nCreationTimestamp     :: !(Maybe Text)
    , _nId                    :: !(Maybe (Textual Word64))
    , _nGatewayIPv4           :: !(Maybe Text)
    , _nDescription           :: !(Maybe Text)
    , _nPeerings              :: !(Maybe [NetworkPeering])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Network' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nAutoCreateSubnetworks'
--
-- * 'nKind'
--
-- * 'nRoutingConfig'
--
-- * 'nSubnetworks'
--
-- * 'nIPv4Range'
--
-- * 'nSelfLink'
--
-- * 'nName'
--
-- * 'nCreationTimestamp'
--
-- * 'nId'
--
-- * 'nGatewayIPv4'
--
-- * 'nDescription'
--
-- * 'nPeerings'
network
    :: Network
network =
    Network'
    { _nAutoCreateSubnetworks = Nothing
    , _nKind = "compute#network"
    , _nRoutingConfig = Nothing
    , _nSubnetworks = Nothing
    , _nIPv4Range = Nothing
    , _nSelfLink = Nothing
    , _nName = Nothing
    , _nCreationTimestamp = Nothing
    , _nId = Nothing
    , _nGatewayIPv4 = Nothing
    , _nDescription = Nothing
    , _nPeerings = Nothing
    }

-- | When set to true, the VPC network is created in \"auto\" mode. When set
-- to false, the VPC network is created in \"custom\" mode. An auto mode
-- VPC network starts with one subnet per region. Each subnet has a
-- predetermined range as described in Auto mode VPC network IP ranges.
nAutoCreateSubnetworks :: Lens' Network (Maybe Bool)
nAutoCreateSubnetworks
  = lens _nAutoCreateSubnetworks
      (\ s a -> s{_nAutoCreateSubnetworks = a})

-- | [Output Only] Type of the resource. Always compute#network for networks.
nKind :: Lens' Network Text
nKind = lens _nKind (\ s a -> s{_nKind = a})

-- | The network-level routing configuration for this network. Used by Cloud
-- Router to determine what type of network-wide routing behavior to
-- enforce.
nRoutingConfig :: Lens' Network (Maybe NetworkRoutingConfig)
nRoutingConfig
  = lens _nRoutingConfig
      (\ s a -> s{_nRoutingConfig = a})

-- | [Output Only] Server-defined fully-qualified URLs for all subnetworks in
-- this VPC network.
nSubnetworks :: Lens' Network [Text]
nSubnetworks
  = lens _nSubnetworks (\ s a -> s{_nSubnetworks = a})
      . _Default
      . _Coerce

-- | The range of internal addresses that are legal on this network. This
-- range is a CIDR specification, for example: 192.168.0.0\/16. Provided by
-- the client when the network is created.
nIPv4Range :: Lens' Network (Maybe Text)
nIPv4Range
  = lens _nIPv4Range (\ s a -> s{_nIPv4Range = a})

-- | [Output Only] Server-defined URL for the resource.
nSelfLink :: Lens' Network (Maybe Text)
nSelfLink
  = lens _nSelfLink (\ s a -> s{_nSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
nName :: Lens' Network (Maybe Text)
nName = lens _nName (\ s a -> s{_nName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
nCreationTimestamp :: Lens' Network (Maybe Text)
nCreationTimestamp
  = lens _nCreationTimestamp
      (\ s a -> s{_nCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
nId :: Lens' Network (Maybe Word64)
nId
  = lens _nId (\ s a -> s{_nId = a}) . mapping _Coerce

-- | [Output Only] The gateway address for default routing out of the
-- network. This value is read only and is selected by GCP.
nGatewayIPv4 :: Lens' Network (Maybe Text)
nGatewayIPv4
  = lens _nGatewayIPv4 (\ s a -> s{_nGatewayIPv4 = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
nDescription :: Lens' Network (Maybe Text)
nDescription
  = lens _nDescription (\ s a -> s{_nDescription = a})

-- | [Output Only] A list of network peerings for the resource.
nPeerings :: Lens' Network [NetworkPeering]
nPeerings
  = lens _nPeerings (\ s a -> s{_nPeerings = a}) .
      _Default
      . _Coerce

instance FromJSON Network where
        parseJSON
          = withObject "Network"
              (\ o ->
                 Network' <$>
                   (o .:? "autoCreateSubnetworks") <*>
                     (o .:? "kind" .!= "compute#network")
                     <*> (o .:? "routingConfig")
                     <*> (o .:? "subnetworks" .!= mempty)
                     <*> (o .:? "IPv4Range")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "gatewayIPv4")
                     <*> (o .:? "description")
                     <*> (o .:? "peerings" .!= mempty))

instance ToJSON Network where
        toJSON Network'{..}
          = object
              (catMaybes
                 [("autoCreateSubnetworks" .=) <$>
                    _nAutoCreateSubnetworks,
                  Just ("kind" .= _nKind),
                  ("routingConfig" .=) <$> _nRoutingConfig,
                  ("subnetworks" .=) <$> _nSubnetworks,
                  ("IPv4Range" .=) <$> _nIPv4Range,
                  ("selfLink" .=) <$> _nSelfLink,
                  ("name" .=) <$> _nName,
                  ("creationTimestamp" .=) <$> _nCreationTimestamp,
                  ("id" .=) <$> _nId,
                  ("gatewayIPv4" .=) <$> _nGatewayIPv4,
                  ("description" .=) <$> _nDescription,
                  ("peerings" .=) <$> _nPeerings])

-- | Informational warning which replaces the list of routers when the list
-- is empty.
--
-- /See:/ 'routersScopedListWarning' smart constructor.
data RoutersScopedListWarning = RoutersScopedListWarning'
    { _rslwData    :: !(Maybe [RoutersScopedListWarningDataItem])
    , _rslwCode    :: !(Maybe RoutersScopedListWarningCode)
    , _rslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RoutersScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rslwData'
--
-- * 'rslwCode'
--
-- * 'rslwMessage'
routersScopedListWarning
    :: RoutersScopedListWarning
routersScopedListWarning =
    RoutersScopedListWarning'
    { _rslwData = Nothing
    , _rslwCode = Nothing
    , _rslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rslwData :: Lens' RoutersScopedListWarning [RoutersScopedListWarningDataItem]
rslwData
  = lens _rslwData (\ s a -> s{_rslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rslwCode :: Lens' RoutersScopedListWarning (Maybe RoutersScopedListWarningCode)
rslwCode = lens _rslwCode (\ s a -> s{_rslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
rslwMessage :: Lens' RoutersScopedListWarning (Maybe Text)
rslwMessage
  = lens _rslwMessage (\ s a -> s{_rslwMessage = a})

instance FromJSON RoutersScopedListWarning where
        parseJSON
          = withObject "RoutersScopedListWarning"
              (\ o ->
                 RoutersScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RoutersScopedListWarning where
        toJSON RoutersScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rslwData,
                  ("code" .=) <$> _rslwCode,
                  ("message" .=) <$> _rslwMessage])

-- | Subnetwork which the current user has compute.subnetworks.use permission
-- on.
--
-- /See:/ 'usableSubnetwork' smart constructor.
data UsableSubnetwork = UsableSubnetwork'
    { _usNetwork           :: !(Maybe Text)
    , _usSecondaryIPRanges :: !(Maybe [UsableSubnetworkSecondaryRange])
    , _usIPCIdRRange       :: !(Maybe Text)
    , _usSubnetwork        :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UsableSubnetwork' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'usNetwork'
--
-- * 'usSecondaryIPRanges'
--
-- * 'usIPCIdRRange'
--
-- * 'usSubnetwork'
usableSubnetwork
    :: UsableSubnetwork
usableSubnetwork =
    UsableSubnetwork'
    { _usNetwork = Nothing
    , _usSecondaryIPRanges = Nothing
    , _usIPCIdRRange = Nothing
    , _usSubnetwork = Nothing
    }

-- | Network URL.
usNetwork :: Lens' UsableSubnetwork (Maybe Text)
usNetwork
  = lens _usNetwork (\ s a -> s{_usNetwork = a})

-- | Secondary IP ranges.
usSecondaryIPRanges :: Lens' UsableSubnetwork [UsableSubnetworkSecondaryRange]
usSecondaryIPRanges
  = lens _usSecondaryIPRanges
      (\ s a -> s{_usSecondaryIPRanges = a})
      . _Default
      . _Coerce

-- | The range of internal addresses that are owned by this subnetwork.
usIPCIdRRange :: Lens' UsableSubnetwork (Maybe Text)
usIPCIdRRange
  = lens _usIPCIdRRange
      (\ s a -> s{_usIPCIdRRange = a})

-- | Subnetwork URL.
usSubnetwork :: Lens' UsableSubnetwork (Maybe Text)
usSubnetwork
  = lens _usSubnetwork (\ s a -> s{_usSubnetwork = a})

instance FromJSON UsableSubnetwork where
        parseJSON
          = withObject "UsableSubnetwork"
              (\ o ->
                 UsableSubnetwork' <$>
                   (o .:? "network") <*>
                     (o .:? "secondaryIpRanges" .!= mempty)
                     <*> (o .:? "ipCidrRange")
                     <*> (o .:? "subnetwork"))

instance ToJSON UsableSubnetwork where
        toJSON UsableSubnetwork'{..}
          = object
              (catMaybes
                 [("network" .=) <$> _usNetwork,
                  ("secondaryIpRanges" .=) <$> _usSecondaryIPRanges,
                  ("ipCidrRange" .=) <$> _usIPCIdRRange,
                  ("subnetwork" .=) <$> _usSubnetwork])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetHTTPSProxyListWarning' smart constructor.
data TargetHTTPSProxyListWarning = TargetHTTPSProxyListWarning'
    { _thplwData    :: !(Maybe [TargetHTTPSProxyListWarningDataItem])
    , _thplwCode    :: !(Maybe TargetHTTPSProxyListWarningCode)
    , _thplwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPSProxyListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thplwData'
--
-- * 'thplwCode'
--
-- * 'thplwMessage'
targetHTTPSProxyListWarning
    :: TargetHTTPSProxyListWarning
targetHTTPSProxyListWarning =
    TargetHTTPSProxyListWarning'
    { _thplwData = Nothing
    , _thplwCode = Nothing
    , _thplwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
thplwData :: Lens' TargetHTTPSProxyListWarning [TargetHTTPSProxyListWarningDataItem]
thplwData
  = lens _thplwData (\ s a -> s{_thplwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
thplwCode :: Lens' TargetHTTPSProxyListWarning (Maybe TargetHTTPSProxyListWarningCode)
thplwCode
  = lens _thplwCode (\ s a -> s{_thplwCode = a})

-- | [Output Only] A human-readable description of the warning code.
thplwMessage :: Lens' TargetHTTPSProxyListWarning (Maybe Text)
thplwMessage
  = lens _thplwMessage (\ s a -> s{_thplwMessage = a})

instance FromJSON TargetHTTPSProxyListWarning where
        parseJSON
          = withObject "TargetHTTPSProxyListWarning"
              (\ o ->
                 TargetHTTPSProxyListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetHTTPSProxyListWarning where
        toJSON TargetHTTPSProxyListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _thplwData,
                  ("code" .=) <$> _thplwCode,
                  ("message" .=) <$> _thplwMessage])

-- | [Output Only] Informational warning which replaces the list of addresses
-- when the list is empty.
--
-- /See:/ 'addressesScopedListWarning' smart constructor.
data AddressesScopedListWarning = AddressesScopedListWarning'
    { _aData    :: !(Maybe [AddressesScopedListWarningDataItem])
    , _aCode    :: !(Maybe AddressesScopedListWarningCode)
    , _aMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aData'
--
-- * 'aCode'
--
-- * 'aMessage'
addressesScopedListWarning
    :: AddressesScopedListWarning
addressesScopedListWarning =
    AddressesScopedListWarning'
    { _aData = Nothing
    , _aCode = Nothing
    , _aMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
aData :: Lens' AddressesScopedListWarning [AddressesScopedListWarningDataItem]
aData
  = lens _aData (\ s a -> s{_aData = a}) . _Default .
      _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
aCode :: Lens' AddressesScopedListWarning (Maybe AddressesScopedListWarningCode)
aCode = lens _aCode (\ s a -> s{_aCode = a})

-- | [Output Only] A human-readable description of the warning code.
aMessage :: Lens' AddressesScopedListWarning (Maybe Text)
aMessage = lens _aMessage (\ s a -> s{_aMessage = a})

instance FromJSON AddressesScopedListWarning where
        parseJSON
          = withObject "AddressesScopedListWarning"
              (\ o ->
                 AddressesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AddressesScopedListWarning where
        toJSON AddressesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _aData, ("code" .=) <$> _aCode,
                  ("message" .=) <$> _aMessage])

-- | A security policy is comprised of one or more rules. It can also be
-- associated with one or more \'targets\'. (== resource_for
-- v1.securityPolicies ==) (== resource_for beta.securityPolicies ==)
--
-- /See:/ 'securityPolicy' smart constructor.
data SecurityPolicy = SecurityPolicy'
    { _secRules             :: !(Maybe [SecurityPolicyRule])
    , _secKind              :: !Text
    , _secFingerprint       :: !(Maybe Bytes)
    , _secSelfLink          :: !(Maybe Text)
    , _secName              :: !(Maybe Text)
    , _secCreationTimestamp :: !(Maybe Text)
    , _secId                :: !(Maybe (Textual Word64))
    , _secDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SecurityPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'secRules'
--
-- * 'secKind'
--
-- * 'secFingerprint'
--
-- * 'secSelfLink'
--
-- * 'secName'
--
-- * 'secCreationTimestamp'
--
-- * 'secId'
--
-- * 'secDescription'
securityPolicy
    :: SecurityPolicy
securityPolicy =
    SecurityPolicy'
    { _secRules = Nothing
    , _secKind = "compute#securityPolicy"
    , _secFingerprint = Nothing
    , _secSelfLink = Nothing
    , _secName = Nothing
    , _secCreationTimestamp = Nothing
    , _secId = Nothing
    , _secDescription = Nothing
    }

-- | A list of rules that belong to this policy. There must always be a
-- default rule (rule with priority 2147483647 and match \"*\"). If no
-- rules are provided when creating a security policy, a default rule with
-- action \"allow\" will be added.
secRules :: Lens' SecurityPolicy [SecurityPolicyRule]
secRules
  = lens _secRules (\ s a -> s{_secRules = a}) .
      _Default
      . _Coerce

-- | [Output only] Type of the resource. Always compute#securityPolicyfor
-- security policies
secKind :: Lens' SecurityPolicy Text
secKind = lens _secKind (\ s a -> s{_secKind = a})

-- | Specifies a fingerprint for this resource, which is essentially a hash
-- of the metadata\'s contents and used for optimistic locking. The
-- fingerprint is initially generated by Compute Engine and changes after
-- every request to modify or update metadata. You must always provide an
-- up-to-date fingerprint hash in order to update or change metadata,
-- otherwise the request will fail with error 412 conditionNotMet. To see
-- the latest fingerprint, make get() request to the security policy.
secFingerprint :: Lens' SecurityPolicy (Maybe ByteString)
secFingerprint
  = lens _secFingerprint
      (\ s a -> s{_secFingerprint = a})
      . mapping _Bytes

-- | [Output Only] Server-defined URL for the resource.
secSelfLink :: Lens' SecurityPolicy (Maybe Text)
secSelfLink
  = lens _secSelfLink (\ s a -> s{_secSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
secName :: Lens' SecurityPolicy (Maybe Text)
secName = lens _secName (\ s a -> s{_secName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
secCreationTimestamp :: Lens' SecurityPolicy (Maybe Text)
secCreationTimestamp
  = lens _secCreationTimestamp
      (\ s a -> s{_secCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
secId :: Lens' SecurityPolicy (Maybe Word64)
secId
  = lens _secId (\ s a -> s{_secId = a}) .
      mapping _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
secDescription :: Lens' SecurityPolicy (Maybe Text)
secDescription
  = lens _secDescription
      (\ s a -> s{_secDescription = a})

instance FromJSON SecurityPolicy where
        parseJSON
          = withObject "SecurityPolicy"
              (\ o ->
                 SecurityPolicy' <$>
                   (o .:? "rules" .!= mempty) <*>
                     (o .:? "kind" .!= "compute#securityPolicy")
                     <*> (o .:? "fingerprint")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "description"))

instance ToJSON SecurityPolicy where
        toJSON SecurityPolicy'{..}
          = object
              (catMaybes
                 [("rules" .=) <$> _secRules,
                  Just ("kind" .= _secKind),
                  ("fingerprint" .=) <$> _secFingerprint,
                  ("selfLink" .=) <$> _secSelfLink,
                  ("name" .=) <$> _secName,
                  ("creationTimestamp" .=) <$> _secCreationTimestamp,
                  ("id" .=) <$> _secId,
                  ("description" .=) <$> _secDescription])

--
-- /See:/ 'instanceGroupAggregatedListWarningDataItem' smart constructor.
data InstanceGroupAggregatedListWarningDataItem = InstanceGroupAggregatedListWarningDataItem'
    { _igalwdiValue :: !(Maybe Text)
    , _igalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igalwdiValue'
--
-- * 'igalwdiKey'
instanceGroupAggregatedListWarningDataItem
    :: InstanceGroupAggregatedListWarningDataItem
instanceGroupAggregatedListWarningDataItem =
    InstanceGroupAggregatedListWarningDataItem'
    { _igalwdiValue = Nothing
    , _igalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
igalwdiValue :: Lens' InstanceGroupAggregatedListWarningDataItem (Maybe Text)
igalwdiValue
  = lens _igalwdiValue (\ s a -> s{_igalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
igalwdiKey :: Lens' InstanceGroupAggregatedListWarningDataItem (Maybe Text)
igalwdiKey
  = lens _igalwdiKey (\ s a -> s{_igalwdiKey = a})

instance FromJSON
         InstanceGroupAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "InstanceGroupAggregatedListWarningDataItem"
              (\ o ->
                 InstanceGroupAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InstanceGroupAggregatedListWarningDataItem where
        toJSON
          InstanceGroupAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _igalwdiValue,
                  ("key" .=) <$> _igalwdiKey])

-- | The parameters of the raw disk image.
--
-- /See:/ 'imageRawDisk' smart constructor.
data ImageRawDisk = ImageRawDisk'
    { _irdContainerType :: !(Maybe ImageRawDiskContainerType)
    , _irdSource        :: !(Maybe Text)
    , _irdSha1Checksum  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ImageRawDisk' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'irdContainerType'
--
-- * 'irdSource'
--
-- * 'irdSha1Checksum'
imageRawDisk
    :: ImageRawDisk
imageRawDisk =
    ImageRawDisk'
    { _irdContainerType = Nothing
    , _irdSource = Nothing
    , _irdSha1Checksum = Nothing
    }

-- | The format used to encode and transmit the block device, which should be
-- TAR. This is just a container and transmission format and not a runtime
-- format. Provided by the client when the disk image is created.
irdContainerType :: Lens' ImageRawDisk (Maybe ImageRawDiskContainerType)
irdContainerType
  = lens _irdContainerType
      (\ s a -> s{_irdContainerType = a})

-- | The full Google Cloud Storage URL where the disk image is stored. You
-- must provide either this property or the sourceDisk property but not
-- both.
irdSource :: Lens' ImageRawDisk (Maybe Text)
irdSource
  = lens _irdSource (\ s a -> s{_irdSource = a})

-- | An optional SHA1 checksum of the disk image before unpackaging; provided
-- by the client when the disk image is created.
irdSha1Checksum :: Lens' ImageRawDisk (Maybe Text)
irdSha1Checksum
  = lens _irdSha1Checksum
      (\ s a -> s{_irdSha1Checksum = a})

instance FromJSON ImageRawDisk where
        parseJSON
          = withObject "ImageRawDisk"
              (\ o ->
                 ImageRawDisk' <$>
                   (o .:? "containerType") <*> (o .:? "source") <*>
                     (o .:? "sha1Checksum"))

instance ToJSON ImageRawDisk where
        toJSON ImageRawDisk'{..}
          = object
              (catMaybes
                 [("containerType" .=) <$> _irdContainerType,
                  ("source" .=) <$> _irdSource,
                  ("sha1Checksum" .=) <$> _irdSha1Checksum])

--
-- /See:/ 'instanceAggregatedList' smart constructor.
data InstanceAggregatedList = InstanceAggregatedList'
    { _ialNextPageToken :: !(Maybe Text)
    , _ialKind          :: !Text
    , _ialItems         :: !(Maybe InstanceAggregatedListItems)
    , _ialSelfLink      :: !(Maybe Text)
    , _ialWarning       :: !(Maybe InstanceAggregatedListWarning)
    , _ialId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ialNextPageToken'
--
-- * 'ialKind'
--
-- * 'ialItems'
--
-- * 'ialSelfLink'
--
-- * 'ialWarning'
--
-- * 'ialId'
instanceAggregatedList
    :: InstanceAggregatedList
instanceAggregatedList =
    InstanceAggregatedList'
    { _ialNextPageToken = Nothing
    , _ialKind = "compute#instanceAggregatedList"
    , _ialItems = Nothing
    , _ialSelfLink = Nothing
    , _ialWarning = Nothing
    , _ialId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ialNextPageToken :: Lens' InstanceAggregatedList (Maybe Text)
ialNextPageToken
  = lens _ialNextPageToken
      (\ s a -> s{_ialNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#instanceAggregatedList
-- for aggregated lists of Instance resources.
ialKind :: Lens' InstanceAggregatedList Text
ialKind = lens _ialKind (\ s a -> s{_ialKind = a})

-- | A list of InstancesScopedList resources.
ialItems :: Lens' InstanceAggregatedList (Maybe InstanceAggregatedListItems)
ialItems = lens _ialItems (\ s a -> s{_ialItems = a})

-- | [Output Only] Server-defined URL for this resource.
ialSelfLink :: Lens' InstanceAggregatedList (Maybe Text)
ialSelfLink
  = lens _ialSelfLink (\ s a -> s{_ialSelfLink = a})

-- | [Output Only] Informational warning message.
ialWarning :: Lens' InstanceAggregatedList (Maybe InstanceAggregatedListWarning)
ialWarning
  = lens _ialWarning (\ s a -> s{_ialWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ialId :: Lens' InstanceAggregatedList (Maybe Text)
ialId = lens _ialId (\ s a -> s{_ialId = a})

instance FromJSON InstanceAggregatedList where
        parseJSON
          = withObject "InstanceAggregatedList"
              (\ o ->
                 InstanceAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#instanceAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceAggregatedList where
        toJSON InstanceAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ialNextPageToken,
                  Just ("kind" .= _ialKind),
                  ("items" .=) <$> _ialItems,
                  ("selfLink" .=) <$> _ialSelfLink,
                  ("warning" .=) <$> _ialWarning,
                  ("id" .=) <$> _ialId])

--
-- /See:/ 'targetTCPProxiesSetBackendServiceRequest' smart constructor.
newtype TargetTCPProxiesSetBackendServiceRequest = TargetTCPProxiesSetBackendServiceRequest'
    { _ttpsbsrService :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetTCPProxiesSetBackendServiceRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ttpsbsrService'
targetTCPProxiesSetBackendServiceRequest
    :: TargetTCPProxiesSetBackendServiceRequest
targetTCPProxiesSetBackendServiceRequest =
    TargetTCPProxiesSetBackendServiceRequest'
    { _ttpsbsrService = Nothing
    }

-- | The URL of the new BackendService resource for the targetTcpProxy.
ttpsbsrService :: Lens' TargetTCPProxiesSetBackendServiceRequest (Maybe Text)
ttpsbsrService
  = lens _ttpsbsrService
      (\ s a -> s{_ttpsbsrService = a})

instance FromJSON
         TargetTCPProxiesSetBackendServiceRequest where
        parseJSON
          = withObject
              "TargetTCPProxiesSetBackendServiceRequest"
              (\ o ->
                 TargetTCPProxiesSetBackendServiceRequest' <$>
                   (o .:? "service"))

instance ToJSON
         TargetTCPProxiesSetBackendServiceRequest where
        toJSON TargetTCPProxiesSetBackendServiceRequest'{..}
          = object
              (catMaybes [("service" .=) <$> _ttpsbsrService])

--
-- /See:/ 'sslHealthCheck' smart constructor.
data SSLHealthCheck = SSLHealthCheck'
    { _shcResponse    :: !(Maybe Text)
    , _shcProxyHeader :: !(Maybe SSLHealthCheckProxyHeader)
    , _shcPortName    :: !(Maybe Text)
    , _shcPort        :: !(Maybe (Textual Int32))
    , _shcRequest     :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLHealthCheck' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'shcResponse'
--
-- * 'shcProxyHeader'
--
-- * 'shcPortName'
--
-- * 'shcPort'
--
-- * 'shcRequest'
sslHealthCheck
    :: SSLHealthCheck
sslHealthCheck =
    SSLHealthCheck'
    { _shcResponse = Nothing
    , _shcProxyHeader = Nothing
    , _shcPortName = Nothing
    , _shcPort = Nothing
    , _shcRequest = Nothing
    }

-- | The bytes to match against the beginning of the response data. If left
-- empty (the default value), any response will indicate health. The
-- response data can only be ASCII.
shcResponse :: Lens' SSLHealthCheck (Maybe Text)
shcResponse
  = lens _shcResponse (\ s a -> s{_shcResponse = a})

-- | Specifies the type of proxy header to append before sending data to the
-- backend, either NONE or PROXY_V1. The default is NONE.
shcProxyHeader :: Lens' SSLHealthCheck (Maybe SSLHealthCheckProxyHeader)
shcProxyHeader
  = lens _shcProxyHeader
      (\ s a -> s{_shcProxyHeader = a})

-- | Port name as defined in InstanceGroup#NamedPort#name. If both port and
-- port_name are defined, port takes precedence.
shcPortName :: Lens' SSLHealthCheck (Maybe Text)
shcPortName
  = lens _shcPortName (\ s a -> s{_shcPortName = a})

-- | The TCP port number for the health check request. The default value is
-- 443. Valid values are 1 through 65535.
shcPort :: Lens' SSLHealthCheck (Maybe Int32)
shcPort
  = lens _shcPort (\ s a -> s{_shcPort = a}) .
      mapping _Coerce

-- | The application data to send once the SSL connection has been
-- established (default value is empty). If both request and response are
-- empty, the connection establishment alone will indicate health. The
-- request data can only be ASCII.
shcRequest :: Lens' SSLHealthCheck (Maybe Text)
shcRequest
  = lens _shcRequest (\ s a -> s{_shcRequest = a})

instance FromJSON SSLHealthCheck where
        parseJSON
          = withObject "SSLHealthCheck"
              (\ o ->
                 SSLHealthCheck' <$>
                   (o .:? "response") <*> (o .:? "proxyHeader") <*>
                     (o .:? "portName")
                     <*> (o .:? "port")
                     <*> (o .:? "request"))

instance ToJSON SSLHealthCheck where
        toJSON SSLHealthCheck'{..}
          = object
              (catMaybes
                 [("response" .=) <$> _shcResponse,
                  ("proxyHeader" .=) <$> _shcProxyHeader,
                  ("portName" .=) <$> _shcPortName,
                  ("port" .=) <$> _shcPort,
                  ("request" .=) <$> _shcRequest])

-- | A reserved address resource. (== resource_for beta.addresses ==) (==
-- resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==)
-- (== resource_for v1.globalAddresses ==)
--
-- /See:/ 'address' smart constructor.
data Address = Address'
    { _aPrefixLength      :: !(Maybe (Textual Int32))
    , _aNetworkTier       :: !(Maybe AddressNetworkTier)
    , _aStatus            :: !(Maybe AddressStatus)
    , _aUsers             :: !(Maybe [Text])
    , _aKind              :: !Text
    , _aIPVersion         :: !(Maybe AddressIPVersion)
    , _aNetwork           :: !(Maybe Text)
    , _aAddress           :: !(Maybe Text)
    , _aPurpose           :: !(Maybe AddressPurpose)
    , _aSelfLink          :: !(Maybe Text)
    , _aName              :: !(Maybe Text)
    , _aCreationTimestamp :: !(Maybe Text)
    , _aSubnetwork        :: !(Maybe Text)
    , _aId                :: !(Maybe (Textual Word64))
    , _aRegion            :: !(Maybe Text)
    , _aDescription       :: !(Maybe Text)
    , _aAddressType       :: !(Maybe AddressAddressType)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Address' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aPrefixLength'
--
-- * 'aNetworkTier'
--
-- * 'aStatus'
--
-- * 'aUsers'
--
-- * 'aKind'
--
-- * 'aIPVersion'
--
-- * 'aNetwork'
--
-- * 'aAddress'
--
-- * 'aPurpose'
--
-- * 'aSelfLink'
--
-- * 'aName'
--
-- * 'aCreationTimestamp'
--
-- * 'aSubnetwork'
--
-- * 'aId'
--
-- * 'aRegion'
--
-- * 'aDescription'
--
-- * 'aAddressType'
address
    :: Address
address =
    Address'
    { _aPrefixLength = Nothing
    , _aNetworkTier = Nothing
    , _aStatus = Nothing
    , _aUsers = Nothing
    , _aKind = "compute#address"
    , _aIPVersion = Nothing
    , _aNetwork = Nothing
    , _aAddress = Nothing
    , _aPurpose = Nothing
    , _aSelfLink = Nothing
    , _aName = Nothing
    , _aCreationTimestamp = Nothing
    , _aSubnetwork = Nothing
    , _aId = Nothing
    , _aRegion = Nothing
    , _aDescription = Nothing
    , _aAddressType = Nothing
    }

-- | The prefix length if the resource reprensents an IP range.
aPrefixLength :: Lens' Address (Maybe Int32)
aPrefixLength
  = lens _aPrefixLength
      (\ s a -> s{_aPrefixLength = a})
      . mapping _Coerce

-- | This signifies the networking tier used for configuring this Address and
-- can only take the following values: PREMIUM, STANDARD. Global forwarding
-- rules can only be Premium Tier. Regional forwarding rules can be either
-- Premium or Standard Tier. Standard Tier addresses applied to regional
-- forwarding rules can be used with any external load balancer. Regional
-- forwarding rules in Premium Tier can only be used with a Network load
-- balancer. If this field is not specified, it is assumed to be PREMIUM.
aNetworkTier :: Lens' Address (Maybe AddressNetworkTier)
aNetworkTier
  = lens _aNetworkTier (\ s a -> s{_aNetworkTier = a})

-- | [Output Only] The status of the address, which can be one of RESERVING,
-- RESERVED, or IN_USE. An address that is RESERVING is currently in the
-- process of being reserved. A RESERVED address is currently reserved and
-- available to use. An IN_USE address is currently being used by another
-- resource and is not available.
aStatus :: Lens' Address (Maybe AddressStatus)
aStatus = lens _aStatus (\ s a -> s{_aStatus = a})

-- | [Output Only] The URLs of the resources that are using this address.
aUsers :: Lens' Address [Text]
aUsers
  = lens _aUsers (\ s a -> s{_aUsers = a}) . _Default .
      _Coerce

-- | [Output Only] Type of the resource. Always compute#address for
-- addresses.
aKind :: Lens' Address Text
aKind = lens _aKind (\ s a -> s{_aKind = a})

-- | The IP Version that will be used by this address. Valid options are IPV4
-- or IPV6. This can only be specified for a global address.
aIPVersion :: Lens' Address (Maybe AddressIPVersion)
aIPVersion
  = lens _aIPVersion (\ s a -> s{_aIPVersion = a})

-- | The URL of the network in which to reserve the address. This field can
-- only be used with INTERNAL type with VPC_PEERING purpose.
aNetwork :: Lens' Address (Maybe Text)
aNetwork = lens _aNetwork (\ s a -> s{_aNetwork = a})

-- | The static IP address represented by this resource.
aAddress :: Lens' Address (Maybe Text)
aAddress = lens _aAddress (\ s a -> s{_aAddress = a})

-- | The purpose of resource, only used with INTERNAL type.
aPurpose :: Lens' Address (Maybe AddressPurpose)
aPurpose = lens _aPurpose (\ s a -> s{_aPurpose = a})

-- | [Output Only] Server-defined URL for the resource.
aSelfLink :: Lens' Address (Maybe Text)
aSelfLink
  = lens _aSelfLink (\ s a -> s{_aSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
aName :: Lens' Address (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
aCreationTimestamp :: Lens' Address (Maybe Text)
aCreationTimestamp
  = lens _aCreationTimestamp
      (\ s a -> s{_aCreationTimestamp = a})

-- | The URL of the subnetwork in which to reserve the address. If an IP
-- address is specified, it must be within the subnetwork\'s IP range. This
-- field can only be used with INTERNAL type with
-- GCE_ENDPOINT\/DNS_RESOLVER purposes.
aSubnetwork :: Lens' Address (Maybe Text)
aSubnetwork
  = lens _aSubnetwork (\ s a -> s{_aSubnetwork = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
aId :: Lens' Address (Maybe Word64)
aId
  = lens _aId (\ s a -> s{_aId = a}) . mapping _Coerce

-- | [Output Only] URL of the region where the regional address resides. This
-- field is not applicable to global addresses. You must specify this field
-- as part of the HTTP request URL. You cannot set this field in the
-- request body.
aRegion :: Lens' Address (Maybe Text)
aRegion = lens _aRegion (\ s a -> s{_aRegion = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
aDescription :: Lens' Address (Maybe Text)
aDescription
  = lens _aDescription (\ s a -> s{_aDescription = a})

-- | The type of address to reserve, either INTERNAL or EXTERNAL. If
-- unspecified, defaults to EXTERNAL.
aAddressType :: Lens' Address (Maybe AddressAddressType)
aAddressType
  = lens _aAddressType (\ s a -> s{_aAddressType = a})

instance FromJSON Address where
        parseJSON
          = withObject "Address"
              (\ o ->
                 Address' <$>
                   (o .:? "prefixLength") <*> (o .:? "networkTier") <*>
                     (o .:? "status")
                     <*> (o .:? "users" .!= mempty)
                     <*> (o .:? "kind" .!= "compute#address")
                     <*> (o .:? "ipVersion")
                     <*> (o .:? "network")
                     <*> (o .:? "address")
                     <*> (o .:? "purpose")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "subnetwork")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "description")
                     <*> (o .:? "addressType"))

instance ToJSON Address where
        toJSON Address'{..}
          = object
              (catMaybes
                 [("prefixLength" .=) <$> _aPrefixLength,
                  ("networkTier" .=) <$> _aNetworkTier,
                  ("status" .=) <$> _aStatus, ("users" .=) <$> _aUsers,
                  Just ("kind" .= _aKind),
                  ("ipVersion" .=) <$> _aIPVersion,
                  ("network" .=) <$> _aNetwork,
                  ("address" .=) <$> _aAddress,
                  ("purpose" .=) <$> _aPurpose,
                  ("selfLink" .=) <$> _aSelfLink,
                  ("name" .=) <$> _aName,
                  ("creationTimestamp" .=) <$> _aCreationTimestamp,
                  ("subnetwork" .=) <$> _aSubnetwork,
                  ("id" .=) <$> _aId, ("region" .=) <$> _aRegion,
                  ("description" .=) <$> _aDescription,
                  ("addressType" .=) <$> _aAddressType])

-- | A list of NodeGroupsScopedList resources.
--
-- /See:/ 'nodeGroupAggregatedListItems' smart constructor.
newtype NodeGroupAggregatedListItems = NodeGroupAggregatedListItems'
    { _ngaliAddtional :: HashMap Text NodeGroupsScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngaliAddtional'
nodeGroupAggregatedListItems
    :: HashMap Text NodeGroupsScopedList -- ^ 'ngaliAddtional'
    -> NodeGroupAggregatedListItems
nodeGroupAggregatedListItems pNgaliAddtional_ =
    NodeGroupAggregatedListItems'
    { _ngaliAddtional = _Coerce # pNgaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of node groups.
ngaliAddtional :: Lens' NodeGroupAggregatedListItems (HashMap Text NodeGroupsScopedList)
ngaliAddtional
  = lens _ngaliAddtional
      (\ s a -> s{_ngaliAddtional = a})
      . _Coerce

instance FromJSON NodeGroupAggregatedListItems where
        parseJSON
          = withObject "NodeGroupAggregatedListItems"
              (\ o ->
                 NodeGroupAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON NodeGroupAggregatedListItems where
        toJSON = toJSON . _ngaliAddtional

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceGroupListWarning' smart constructor.
data InstanceGroupListWarning = InstanceGroupListWarning'
    { _iglwData    :: !(Maybe [InstanceGroupListWarningDataItem])
    , _iglwCode    :: !(Maybe InstanceGroupListWarningCode)
    , _iglwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iglwData'
--
-- * 'iglwCode'
--
-- * 'iglwMessage'
instanceGroupListWarning
    :: InstanceGroupListWarning
instanceGroupListWarning =
    InstanceGroupListWarning'
    { _iglwData = Nothing
    , _iglwCode = Nothing
    , _iglwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
iglwData :: Lens' InstanceGroupListWarning [InstanceGroupListWarningDataItem]
iglwData
  = lens _iglwData (\ s a -> s{_iglwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
iglwCode :: Lens' InstanceGroupListWarning (Maybe InstanceGroupListWarningCode)
iglwCode = lens _iglwCode (\ s a -> s{_iglwCode = a})

-- | [Output Only] A human-readable description of the warning code.
iglwMessage :: Lens' InstanceGroupListWarning (Maybe Text)
iglwMessage
  = lens _iglwMessage (\ s a -> s{_iglwMessage = a})

instance FromJSON InstanceGroupListWarning where
        parseJSON
          = withObject "InstanceGroupListWarning"
              (\ o ->
                 InstanceGroupListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceGroupListWarning where
        toJSON InstanceGroupListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _iglwData,
                  ("code" .=) <$> _iglwCode,
                  ("message" .=) <$> _iglwMessage])

-- | Labels to apply to this disk. These can be later modified by the
-- disks.setLabels method. This field is only applicable for persistent
-- disks.
--
-- /See:/ 'attachedDiskInitializeParamsLabels' smart constructor.
newtype AttachedDiskInitializeParamsLabels = AttachedDiskInitializeParamsLabels'
    { _adiplAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AttachedDiskInitializeParamsLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'adiplAddtional'
attachedDiskInitializeParamsLabels
    :: HashMap Text Text -- ^ 'adiplAddtional'
    -> AttachedDiskInitializeParamsLabels
attachedDiskInitializeParamsLabels pAdiplAddtional_ =
    AttachedDiskInitializeParamsLabels'
    { _adiplAddtional = _Coerce # pAdiplAddtional_
    }

adiplAddtional :: Lens' AttachedDiskInitializeParamsLabels (HashMap Text Text)
adiplAddtional
  = lens _adiplAddtional
      (\ s a -> s{_adiplAddtional = a})
      . _Coerce

instance FromJSON AttachedDiskInitializeParamsLabels
         where
        parseJSON
          = withObject "AttachedDiskInitializeParamsLabels"
              (\ o ->
                 AttachedDiskInitializeParamsLabels' <$>
                   (parseJSONObject o))

instance ToJSON AttachedDiskInitializeParamsLabels
         where
        toJSON = toJSON . _adiplAddtional

-- | A Zone resource. (== resource_for beta.zones ==) (== resource_for
-- v1.zones ==)
--
-- /See:/ 'zone' smart constructor.
data Zone = Zone'
    { _zStatus                :: !(Maybe ZoneStatus)
    , _zKind                  :: !Text
    , _zSelfLink              :: !(Maybe Text)
    , _zName                  :: !(Maybe Text)
    , _zCreationTimestamp     :: !(Maybe Text)
    , _zId                    :: !(Maybe (Textual Word64))
    , _zRegion                :: !(Maybe Text)
    , _zAvailableCPUPlatforms :: !(Maybe [Text])
    , _zDescription           :: !(Maybe Text)
    , _zDeprecated            :: !(Maybe DeprecationStatus)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Zone' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zStatus'
--
-- * 'zKind'
--
-- * 'zSelfLink'
--
-- * 'zName'
--
-- * 'zCreationTimestamp'
--
-- * 'zId'
--
-- * 'zRegion'
--
-- * 'zAvailableCPUPlatforms'
--
-- * 'zDescription'
--
-- * 'zDeprecated'
zone
    :: Zone
zone =
    Zone'
    { _zStatus = Nothing
    , _zKind = "compute#zone"
    , _zSelfLink = Nothing
    , _zName = Nothing
    , _zCreationTimestamp = Nothing
    , _zId = Nothing
    , _zRegion = Nothing
    , _zAvailableCPUPlatforms = Nothing
    , _zDescription = Nothing
    , _zDeprecated = Nothing
    }

-- | [Output Only] Status of the zone, either UP or DOWN.
zStatus :: Lens' Zone (Maybe ZoneStatus)
zStatus = lens _zStatus (\ s a -> s{_zStatus = a})

-- | [Output Only] Type of the resource. Always compute#zone for zones.
zKind :: Lens' Zone Text
zKind = lens _zKind (\ s a -> s{_zKind = a})

-- | [Output Only] Server-defined URL for the resource.
zSelfLink :: Lens' Zone (Maybe Text)
zSelfLink
  = lens _zSelfLink (\ s a -> s{_zSelfLink = a})

-- | [Output Only] Name of the resource.
zName :: Lens' Zone (Maybe Text)
zName = lens _zName (\ s a -> s{_zName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
zCreationTimestamp :: Lens' Zone (Maybe Text)
zCreationTimestamp
  = lens _zCreationTimestamp
      (\ s a -> s{_zCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
zId :: Lens' Zone (Maybe Word64)
zId
  = lens _zId (\ s a -> s{_zId = a}) . mapping _Coerce

-- | [Output Only] Full URL reference to the region which hosts the zone.
zRegion :: Lens' Zone (Maybe Text)
zRegion = lens _zRegion (\ s a -> s{_zRegion = a})

-- | [Output Only] Available cpu\/platform selections for the zone.
zAvailableCPUPlatforms :: Lens' Zone [Text]
zAvailableCPUPlatforms
  = lens _zAvailableCPUPlatforms
      (\ s a -> s{_zAvailableCPUPlatforms = a})
      . _Default
      . _Coerce

-- | [Output Only] Textual description of the resource.
zDescription :: Lens' Zone (Maybe Text)
zDescription
  = lens _zDescription (\ s a -> s{_zDescription = a})

-- | [Output Only] The deprecation status associated with this zone.
zDeprecated :: Lens' Zone (Maybe DeprecationStatus)
zDeprecated
  = lens _zDeprecated (\ s a -> s{_zDeprecated = a})

instance FromJSON Zone where
        parseJSON
          = withObject "Zone"
              (\ o ->
                 Zone' <$>
                   (o .:? "status") <*>
                     (o .:? "kind" .!= "compute#zone")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "availableCpuPlatforms" .!= mempty)
                     <*> (o .:? "description")
                     <*> (o .:? "deprecated"))

instance ToJSON Zone where
        toJSON Zone'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _zStatus, Just ("kind" .= _zKind),
                  ("selfLink" .=) <$> _zSelfLink,
                  ("name" .=) <$> _zName,
                  ("creationTimestamp" .=) <$> _zCreationTimestamp,
                  ("id" .=) <$> _zId, ("region" .=) <$> _zRegion,
                  ("availableCpuPlatforms" .=) <$>
                    _zAvailableCPUPlatforms,
                  ("description" .=) <$> _zDescription,
                  ("deprecated" .=) <$> _zDeprecated])

--
-- /See:/ 'routerBGP' smart constructor.
data RouterBGP = RouterBGP'
    { _rbASN                :: !(Maybe (Textual Word32))
    , _rbAdvertiseMode      :: !(Maybe RouterBGPAdvertiseMode)
    , _rbAdvertisedGroups   :: !(Maybe [RouterBGPAdvertisedGroupsItem])
    , _rbAdvertisedIPRanges :: !(Maybe [RouterAdvertisedIPRange])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterBGP' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rbASN'
--
-- * 'rbAdvertiseMode'
--
-- * 'rbAdvertisedGroups'
--
-- * 'rbAdvertisedIPRanges'
routerBGP
    :: RouterBGP
routerBGP =
    RouterBGP'
    { _rbASN = Nothing
    , _rbAdvertiseMode = Nothing
    , _rbAdvertisedGroups = Nothing
    , _rbAdvertisedIPRanges = Nothing
    }

-- | Local BGP Autonomous System Number (ASN). Must be an RFC6996 private
-- ASN, either 16-bit or 32-bit. The value will be fixed for this router
-- resource. All VPN tunnels that link to this router will have the same
-- local ASN.
rbASN :: Lens' RouterBGP (Maybe Word32)
rbASN
  = lens _rbASN (\ s a -> s{_rbASN = a}) .
      mapping _Coerce

-- | User-specified flag to indicate which mode to use for advertisement.
rbAdvertiseMode :: Lens' RouterBGP (Maybe RouterBGPAdvertiseMode)
rbAdvertiseMode
  = lens _rbAdvertiseMode
      (\ s a -> s{_rbAdvertiseMode = a})

-- | User-specified list of prefix groups to advertise in custom mode. This
-- field can only be populated if advertise_mode is CUSTOM and is
-- advertised to all peers of the router. These groups will be advertised
-- in addition to any specified prefixes. Leave this field blank to
-- advertise no custom groups.
rbAdvertisedGroups :: Lens' RouterBGP [RouterBGPAdvertisedGroupsItem]
rbAdvertisedGroups
  = lens _rbAdvertisedGroups
      (\ s a -> s{_rbAdvertisedGroups = a})
      . _Default
      . _Coerce

-- | User-specified list of individual IP ranges to advertise in custom mode.
-- This field can only be populated if advertise_mode is CUSTOM and is
-- advertised to all peers of the router. These IP ranges will be
-- advertised in addition to any specified groups. Leave this field blank
-- to advertise no custom IP ranges.
rbAdvertisedIPRanges :: Lens' RouterBGP [RouterAdvertisedIPRange]
rbAdvertisedIPRanges
  = lens _rbAdvertisedIPRanges
      (\ s a -> s{_rbAdvertisedIPRanges = a})
      . _Default
      . _Coerce

instance FromJSON RouterBGP where
        parseJSON
          = withObject "RouterBGP"
              (\ o ->
                 RouterBGP' <$>
                   (o .:? "asn") <*> (o .:? "advertiseMode") <*>
                     (o .:? "advertisedGroups" .!= mempty)
                     <*> (o .:? "advertisedIpRanges" .!= mempty))

instance ToJSON RouterBGP where
        toJSON RouterBGP'{..}
          = object
              (catMaybes
                 [("asn" .=) <$> _rbASN,
                  ("advertiseMode" .=) <$> _rbAdvertiseMode,
                  ("advertisedGroups" .=) <$> _rbAdvertisedGroups,
                  ("advertisedIpRanges" .=) <$> _rbAdvertisedIPRanges])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'firewallListWarning' smart constructor.
data FirewallListWarning = FirewallListWarning'
    { _flwData    :: !(Maybe [FirewallListWarningDataItem])
    , _flwCode    :: !(Maybe FirewallListWarningCode)
    , _flwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'FirewallListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'flwData'
--
-- * 'flwCode'
--
-- * 'flwMessage'
firewallListWarning
    :: FirewallListWarning
firewallListWarning =
    FirewallListWarning'
    { _flwData = Nothing
    , _flwCode = Nothing
    , _flwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
flwData :: Lens' FirewallListWarning [FirewallListWarningDataItem]
flwData
  = lens _flwData (\ s a -> s{_flwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
flwCode :: Lens' FirewallListWarning (Maybe FirewallListWarningCode)
flwCode = lens _flwCode (\ s a -> s{_flwCode = a})

-- | [Output Only] A human-readable description of the warning code.
flwMessage :: Lens' FirewallListWarning (Maybe Text)
flwMessage
  = lens _flwMessage (\ s a -> s{_flwMessage = a})

instance FromJSON FirewallListWarning where
        parseJSON
          = withObject "FirewallListWarning"
              (\ o ->
                 FirewallListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON FirewallListWarning where
        toJSON FirewallListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _flwData, ("code" .=) <$> _flwCode,
                  ("message" .=) <$> _flwMessage])

--
-- /See:/ 'backendServicesScopedList' smart constructor.
data BackendServicesScopedList = BackendServicesScopedList'
    { _bsslWarning         :: !(Maybe BackendServicesScopedListWarning)
    , _bsslBackendServices :: !(Maybe [BackendService])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServicesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsslWarning'
--
-- * 'bsslBackendServices'
backendServicesScopedList
    :: BackendServicesScopedList
backendServicesScopedList =
    BackendServicesScopedList'
    { _bsslWarning = Nothing
    , _bsslBackendServices = Nothing
    }

-- | Informational warning which replaces the list of backend services when
-- the list is empty.
bsslWarning :: Lens' BackendServicesScopedList (Maybe BackendServicesScopedListWarning)
bsslWarning
  = lens _bsslWarning (\ s a -> s{_bsslWarning = a})

-- | A list of BackendServices contained in this scope.
bsslBackendServices :: Lens' BackendServicesScopedList [BackendService]
bsslBackendServices
  = lens _bsslBackendServices
      (\ s a -> s{_bsslBackendServices = a})
      . _Default
      . _Coerce

instance FromJSON BackendServicesScopedList where
        parseJSON
          = withObject "BackendServicesScopedList"
              (\ o ->
                 BackendServicesScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "backendServices" .!= mempty))

instance ToJSON BackendServicesScopedList where
        toJSON BackendServicesScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _bsslWarning,
                  ("backendServices" .=) <$> _bsslBackendServices])

--
-- /See:/ 'instanceGroupManagersRecreateInstancesRequest' smart constructor.
newtype InstanceGroupManagersRecreateInstancesRequest = InstanceGroupManagersRecreateInstancesRequest'
    { _igmrirInstances :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersRecreateInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmrirInstances'
instanceGroupManagersRecreateInstancesRequest
    :: InstanceGroupManagersRecreateInstancesRequest
instanceGroupManagersRecreateInstancesRequest =
    InstanceGroupManagersRecreateInstancesRequest'
    { _igmrirInstances = Nothing
    }

-- | The URLs of one or more instances to recreate. This can be a full URL or
-- a partial URL, such as zones\/[ZONE]\/instances\/[INSTANCE_NAME].
igmrirInstances :: Lens' InstanceGroupManagersRecreateInstancesRequest [Text]
igmrirInstances
  = lens _igmrirInstances
      (\ s a -> s{_igmrirInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         InstanceGroupManagersRecreateInstancesRequest where
        parseJSON
          = withObject
              "InstanceGroupManagersRecreateInstancesRequest"
              (\ o ->
                 InstanceGroupManagersRecreateInstancesRequest' <$>
                   (o .:? "instances" .!= mempty))

instance ToJSON
         InstanceGroupManagersRecreateInstancesRequest where
        toJSON
          InstanceGroupManagersRecreateInstancesRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _igmrirInstances])

--
-- /See:/ 'targetSSLProxiesSetSSLCertificatesRequest' smart constructor.
newtype TargetSSLProxiesSetSSLCertificatesRequest = TargetSSLProxiesSetSSLCertificatesRequest'
    { _tspsscrSSLCertificates :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetSSLProxiesSetSSLCertificatesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tspsscrSSLCertificates'
targetSSLProxiesSetSSLCertificatesRequest
    :: TargetSSLProxiesSetSSLCertificatesRequest
targetSSLProxiesSetSSLCertificatesRequest =
    TargetSSLProxiesSetSSLCertificatesRequest'
    { _tspsscrSSLCertificates = Nothing
    }

-- | New set of URLs to SslCertificate resources to associate with this
-- TargetSslProxy. Currently exactly one ssl certificate must be specified.
tspsscrSSLCertificates :: Lens' TargetSSLProxiesSetSSLCertificatesRequest [Text]
tspsscrSSLCertificates
  = lens _tspsscrSSLCertificates
      (\ s a -> s{_tspsscrSSLCertificates = a})
      . _Default
      . _Coerce

instance FromJSON
         TargetSSLProxiesSetSSLCertificatesRequest where
        parseJSON
          = withObject
              "TargetSSLProxiesSetSSLCertificatesRequest"
              (\ o ->
                 TargetSSLProxiesSetSSLCertificatesRequest' <$>
                   (o .:? "sslCertificates" .!= mempty))

instance ToJSON
         TargetSSLProxiesSetSSLCertificatesRequest where
        toJSON TargetSSLProxiesSetSSLCertificatesRequest'{..}
          = object
              (catMaybes
                 [("sslCertificates" .=) <$> _tspsscrSSLCertificates])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'routerAggregatedListWarning' smart constructor.
data RouterAggregatedListWarning = RouterAggregatedListWarning'
    { _rouData    :: !(Maybe [RouterAggregatedListWarningDataItem])
    , _rouCode    :: !(Maybe RouterAggregatedListWarningCode)
    , _rouMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rouData'
--
-- * 'rouCode'
--
-- * 'rouMessage'
routerAggregatedListWarning
    :: RouterAggregatedListWarning
routerAggregatedListWarning =
    RouterAggregatedListWarning'
    { _rouData = Nothing
    , _rouCode = Nothing
    , _rouMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rouData :: Lens' RouterAggregatedListWarning [RouterAggregatedListWarningDataItem]
rouData
  = lens _rouData (\ s a -> s{_rouData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rouCode :: Lens' RouterAggregatedListWarning (Maybe RouterAggregatedListWarningCode)
rouCode = lens _rouCode (\ s a -> s{_rouCode = a})

-- | [Output Only] A human-readable description of the warning code.
rouMessage :: Lens' RouterAggregatedListWarning (Maybe Text)
rouMessage
  = lens _rouMessage (\ s a -> s{_rouMessage = a})

instance FromJSON RouterAggregatedListWarning where
        parseJSON
          = withObject "RouterAggregatedListWarning"
              (\ o ->
                 RouterAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RouterAggregatedListWarning where
        toJSON RouterAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rouData, ("code" .=) <$> _rouCode,
                  ("message" .=) <$> _rouMessage])

--
-- /See:/ 'instancesScopedList' smart constructor.
data InstancesScopedList = InstancesScopedList'
    { _islWarning   :: !(Maybe InstancesScopedListWarning)
    , _islInstances :: !(Maybe [Instance])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'islWarning'
--
-- * 'islInstances'
instancesScopedList
    :: InstancesScopedList
instancesScopedList =
    InstancesScopedList'
    { _islWarning = Nothing
    , _islInstances = Nothing
    }

-- | [Output Only] Informational warning which replaces the list of instances
-- when the list is empty.
islWarning :: Lens' InstancesScopedList (Maybe InstancesScopedListWarning)
islWarning
  = lens _islWarning (\ s a -> s{_islWarning = a})

-- | [Output Only] A list of instances contained in this scope.
islInstances :: Lens' InstancesScopedList [Instance]
islInstances
  = lens _islInstances (\ s a -> s{_islInstances = a})
      . _Default
      . _Coerce

instance FromJSON InstancesScopedList where
        parseJSON
          = withObject "InstancesScopedList"
              (\ o ->
                 InstancesScopedList' <$>
                   (o .:? "warning") <*> (o .:? "instances" .!= mempty))

instance ToJSON InstancesScopedList where
        toJSON InstancesScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _islWarning,
                  ("instances" .=) <$> _islInstances])

-- | A list of AcceleratorTypesScopedList resources.
--
-- /See:/ 'acceleratorTypeAggregatedListItems' smart constructor.
newtype AcceleratorTypeAggregatedListItems = AcceleratorTypeAggregatedListItems'
    { _ataliAddtional :: HashMap Text AcceleratorTypesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypeAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ataliAddtional'
acceleratorTypeAggregatedListItems
    :: HashMap Text AcceleratorTypesScopedList -- ^ 'ataliAddtional'
    -> AcceleratorTypeAggregatedListItems
acceleratorTypeAggregatedListItems pAtaliAddtional_ =
    AcceleratorTypeAggregatedListItems'
    { _ataliAddtional = _Coerce # pAtaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of accelerator
-- types.
ataliAddtional :: Lens' AcceleratorTypeAggregatedListItems (HashMap Text AcceleratorTypesScopedList)
ataliAddtional
  = lens _ataliAddtional
      (\ s a -> s{_ataliAddtional = a})
      . _Coerce

instance FromJSON AcceleratorTypeAggregatedListItems
         where
        parseJSON
          = withObject "AcceleratorTypeAggregatedListItems"
              (\ o ->
                 AcceleratorTypeAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON AcceleratorTypeAggregatedListItems
         where
        toJSON = toJSON . _ataliAddtional

--
-- /See:/ 'targetVPNGatewayAggregatedListWarningDataItem' smart constructor.
data TargetVPNGatewayAggregatedListWarningDataItem = TargetVPNGatewayAggregatedListWarningDataItem'
    { _tvgalwdiValue :: !(Maybe Text)
    , _tvgalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewayAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvgalwdiValue'
--
-- * 'tvgalwdiKey'
targetVPNGatewayAggregatedListWarningDataItem
    :: TargetVPNGatewayAggregatedListWarningDataItem
targetVPNGatewayAggregatedListWarningDataItem =
    TargetVPNGatewayAggregatedListWarningDataItem'
    { _tvgalwdiValue = Nothing
    , _tvgalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tvgalwdiValue :: Lens' TargetVPNGatewayAggregatedListWarningDataItem (Maybe Text)
tvgalwdiValue
  = lens _tvgalwdiValue
      (\ s a -> s{_tvgalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tvgalwdiKey :: Lens' TargetVPNGatewayAggregatedListWarningDataItem (Maybe Text)
tvgalwdiKey
  = lens _tvgalwdiKey (\ s a -> s{_tvgalwdiKey = a})

instance FromJSON
         TargetVPNGatewayAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "TargetVPNGatewayAggregatedListWarningDataItem"
              (\ o ->
                 TargetVPNGatewayAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         TargetVPNGatewayAggregatedListWarningDataItem where
        toJSON
          TargetVPNGatewayAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tvgalwdiValue,
                  ("key" .=) <$> _tvgalwdiKey])

-- | A full or valid partial URL to a health check. For example, the
-- following are valid URLs: -
-- https:\/\/www.googleapis.com\/compute\/beta\/projects\/project-id\/global\/httpHealthChecks\/health-check
-- - projects\/project-id\/global\/httpHealthChecks\/health-check -
-- global\/httpHealthChecks\/health-check
--
-- /See:/ 'healthCheckReference' smart constructor.
newtype HealthCheckReference = HealthCheckReference'
    { _hcrHealthCheck :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HealthCheckReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hcrHealthCheck'
healthCheckReference
    :: HealthCheckReference
healthCheckReference =
    HealthCheckReference'
    { _hcrHealthCheck = Nothing
    }

hcrHealthCheck :: Lens' HealthCheckReference (Maybe Text)
hcrHealthCheck
  = lens _hcrHealthCheck
      (\ s a -> s{_hcrHealthCheck = a})

instance FromJSON HealthCheckReference where
        parseJSON
          = withObject "HealthCheckReference"
              (\ o ->
                 HealthCheckReference' <$> (o .:? "healthCheck"))

instance ToJSON HealthCheckReference where
        toJSON HealthCheckReference'{..}
          = object
              (catMaybes [("healthCheck" .=) <$> _hcrHealthCheck])

-- | A list of TargetInstance resources.
--
-- /See:/ 'targetInstanceAggregatedListItems' smart constructor.
newtype TargetInstanceAggregatedListItems = TargetInstanceAggregatedListItems'
    { _tialiAddtional :: HashMap Text TargetInstancesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstanceAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tialiAddtional'
targetInstanceAggregatedListItems
    :: HashMap Text TargetInstancesScopedList -- ^ 'tialiAddtional'
    -> TargetInstanceAggregatedListItems
targetInstanceAggregatedListItems pTialiAddtional_ =
    TargetInstanceAggregatedListItems'
    { _tialiAddtional = _Coerce # pTialiAddtional_
    }

-- | Name of the scope containing this set of target instances.
tialiAddtional :: Lens' TargetInstanceAggregatedListItems (HashMap Text TargetInstancesScopedList)
tialiAddtional
  = lens _tialiAddtional
      (\ s a -> s{_tialiAddtional = a})
      . _Coerce

instance FromJSON TargetInstanceAggregatedListItems
         where
        parseJSON
          = withObject "TargetInstanceAggregatedListItems"
              (\ o ->
                 TargetInstanceAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON TargetInstanceAggregatedListItems
         where
        toJSON = toJSON . _tialiAddtional

--
-- /See:/ 'targetHTTPSProxiesSetQuicOverrideRequest' smart constructor.
newtype TargetHTTPSProxiesSetQuicOverrideRequest = TargetHTTPSProxiesSetQuicOverrideRequest'
    { _thpsqorQuicOverride :: Maybe TargetHTTPSProxiesSetQuicOverrideRequestQuicOverride
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPSProxiesSetQuicOverrideRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thpsqorQuicOverride'
targetHTTPSProxiesSetQuicOverrideRequest
    :: TargetHTTPSProxiesSetQuicOverrideRequest
targetHTTPSProxiesSetQuicOverrideRequest =
    TargetHTTPSProxiesSetQuicOverrideRequest'
    { _thpsqorQuicOverride = Nothing
    }

-- | QUIC policy for the TargetHttpsProxy resource.
thpsqorQuicOverride :: Lens' TargetHTTPSProxiesSetQuicOverrideRequest (Maybe TargetHTTPSProxiesSetQuicOverrideRequestQuicOverride)
thpsqorQuicOverride
  = lens _thpsqorQuicOverride
      (\ s a -> s{_thpsqorQuicOverride = a})

instance FromJSON
         TargetHTTPSProxiesSetQuicOverrideRequest where
        parseJSON
          = withObject
              "TargetHTTPSProxiesSetQuicOverrideRequest"
              (\ o ->
                 TargetHTTPSProxiesSetQuicOverrideRequest' <$>
                   (o .:? "quicOverride"))

instance ToJSON
         TargetHTTPSProxiesSetQuicOverrideRequest where
        toJSON TargetHTTPSProxiesSetQuicOverrideRequest'{..}
          = object
              (catMaybes
                 [("quicOverride" .=) <$> _thpsqorQuicOverride])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetSSLProxyListWarning' smart constructor.
data TargetSSLProxyListWarning = TargetSSLProxyListWarning'
    { _tsplwData    :: !(Maybe [TargetSSLProxyListWarningDataItem])
    , _tsplwCode    :: !(Maybe TargetSSLProxyListWarningCode)
    , _tsplwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetSSLProxyListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tsplwData'
--
-- * 'tsplwCode'
--
-- * 'tsplwMessage'
targetSSLProxyListWarning
    :: TargetSSLProxyListWarning
targetSSLProxyListWarning =
    TargetSSLProxyListWarning'
    { _tsplwData = Nothing
    , _tsplwCode = Nothing
    , _tsplwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tsplwData :: Lens' TargetSSLProxyListWarning [TargetSSLProxyListWarningDataItem]
tsplwData
  = lens _tsplwData (\ s a -> s{_tsplwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tsplwCode :: Lens' TargetSSLProxyListWarning (Maybe TargetSSLProxyListWarningCode)
tsplwCode
  = lens _tsplwCode (\ s a -> s{_tsplwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tsplwMessage :: Lens' TargetSSLProxyListWarning (Maybe Text)
tsplwMessage
  = lens _tsplwMessage (\ s a -> s{_tsplwMessage = a})

instance FromJSON TargetSSLProxyListWarning where
        parseJSON
          = withObject "TargetSSLProxyListWarning"
              (\ o ->
                 TargetSSLProxyListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetSSLProxyListWarning where
        toJSON TargetSSLProxyListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tsplwData,
                  ("code" .=) <$> _tsplwCode,
                  ("message" .=) <$> _tsplwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceTemplateListWarning' smart constructor.
data InstanceTemplateListWarning = InstanceTemplateListWarning'
    { _itlwData    :: !(Maybe [InstanceTemplateListWarningDataItem])
    , _itlwCode    :: !(Maybe InstanceTemplateListWarningCode)
    , _itlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceTemplateListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'itlwData'
--
-- * 'itlwCode'
--
-- * 'itlwMessage'
instanceTemplateListWarning
    :: InstanceTemplateListWarning
instanceTemplateListWarning =
    InstanceTemplateListWarning'
    { _itlwData = Nothing
    , _itlwCode = Nothing
    , _itlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
itlwData :: Lens' InstanceTemplateListWarning [InstanceTemplateListWarningDataItem]
itlwData
  = lens _itlwData (\ s a -> s{_itlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
itlwCode :: Lens' InstanceTemplateListWarning (Maybe InstanceTemplateListWarningCode)
itlwCode = lens _itlwCode (\ s a -> s{_itlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
itlwMessage :: Lens' InstanceTemplateListWarning (Maybe Text)
itlwMessage
  = lens _itlwMessage (\ s a -> s{_itlwMessage = a})

instance FromJSON InstanceTemplateListWarning where
        parseJSON
          = withObject "InstanceTemplateListWarning"
              (\ o ->
                 InstanceTemplateListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceTemplateListWarning where
        toJSON InstanceTemplateListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _itlwData,
                  ("code" .=) <$> _itlwCode,
                  ("message" .=) <$> _itlwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceListReferrersWarning' smart constructor.
data InstanceListReferrersWarning = InstanceListReferrersWarning'
    { _ilrwData    :: !(Maybe [InstanceListReferrersWarningDataItem])
    , _ilrwCode    :: !(Maybe InstanceListReferrersWarningCode)
    , _ilrwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceListReferrersWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ilrwData'
--
-- * 'ilrwCode'
--
-- * 'ilrwMessage'
instanceListReferrersWarning
    :: InstanceListReferrersWarning
instanceListReferrersWarning =
    InstanceListReferrersWarning'
    { _ilrwData = Nothing
    , _ilrwCode = Nothing
    , _ilrwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ilrwData :: Lens' InstanceListReferrersWarning [InstanceListReferrersWarningDataItem]
ilrwData
  = lens _ilrwData (\ s a -> s{_ilrwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ilrwCode :: Lens' InstanceListReferrersWarning (Maybe InstanceListReferrersWarningCode)
ilrwCode = lens _ilrwCode (\ s a -> s{_ilrwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ilrwMessage :: Lens' InstanceListReferrersWarning (Maybe Text)
ilrwMessage
  = lens _ilrwMessage (\ s a -> s{_ilrwMessage = a})

instance FromJSON InstanceListReferrersWarning where
        parseJSON
          = withObject "InstanceListReferrersWarning"
              (\ o ->
                 InstanceListReferrersWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceListReferrersWarning where
        toJSON InstanceListReferrersWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ilrwData,
                  ("code" .=) <$> _ilrwCode,
                  ("message" .=) <$> _ilrwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'routeListWarning' smart constructor.
data RouteListWarning = RouteListWarning'
    { _rlwlData    :: !(Maybe [RouteListWarningDataItem])
    , _rlwlCode    :: !(Maybe RouteListWarningCode)
    , _rlwlMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouteListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rlwlData'
--
-- * 'rlwlCode'
--
-- * 'rlwlMessage'
routeListWarning
    :: RouteListWarning
routeListWarning =
    RouteListWarning'
    { _rlwlData = Nothing
    , _rlwlCode = Nothing
    , _rlwlMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rlwlData :: Lens' RouteListWarning [RouteListWarningDataItem]
rlwlData
  = lens _rlwlData (\ s a -> s{_rlwlData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rlwlCode :: Lens' RouteListWarning (Maybe RouteListWarningCode)
rlwlCode = lens _rlwlCode (\ s a -> s{_rlwlCode = a})

-- | [Output Only] A human-readable description of the warning code.
rlwlMessage :: Lens' RouteListWarning (Maybe Text)
rlwlMessage
  = lens _rlwlMessage (\ s a -> s{_rlwlMessage = a})

instance FromJSON RouteListWarning where
        parseJSON
          = withObject "RouteListWarning"
              (\ o ->
                 RouteListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RouteListWarning where
        toJSON RouteListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rlwlData,
                  ("code" .=) <$> _rlwlCode,
                  ("message" .=) <$> _rlwlMessage])

--
-- /See:/ 'instanceGroupAggregatedList' smart constructor.
data InstanceGroupAggregatedList = InstanceGroupAggregatedList'
    { _igalNextPageToken :: !(Maybe Text)
    , _igalKind          :: !Text
    , _igalItems         :: !(Maybe InstanceGroupAggregatedListItems)
    , _igalSelfLink      :: !(Maybe Text)
    , _igalWarning       :: !(Maybe InstanceGroupAggregatedListWarning)
    , _igalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igalNextPageToken'
--
-- * 'igalKind'
--
-- * 'igalItems'
--
-- * 'igalSelfLink'
--
-- * 'igalWarning'
--
-- * 'igalId'
instanceGroupAggregatedList
    :: InstanceGroupAggregatedList
instanceGroupAggregatedList =
    InstanceGroupAggregatedList'
    { _igalNextPageToken = Nothing
    , _igalKind = "compute#instanceGroupAggregatedList"
    , _igalItems = Nothing
    , _igalSelfLink = Nothing
    , _igalWarning = Nothing
    , _igalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
igalNextPageToken :: Lens' InstanceGroupAggregatedList (Maybe Text)
igalNextPageToken
  = lens _igalNextPageToken
      (\ s a -> s{_igalNextPageToken = a})

-- | [Output Only] The resource type, which is always
-- compute#instanceGroupAggregatedList for aggregated lists of instance
-- groups.
igalKind :: Lens' InstanceGroupAggregatedList Text
igalKind = lens _igalKind (\ s a -> s{_igalKind = a})

-- | A list of InstanceGroupsScopedList resources.
igalItems :: Lens' InstanceGroupAggregatedList (Maybe InstanceGroupAggregatedListItems)
igalItems
  = lens _igalItems (\ s a -> s{_igalItems = a})

-- | [Output Only] Server-defined URL for this resource.
igalSelfLink :: Lens' InstanceGroupAggregatedList (Maybe Text)
igalSelfLink
  = lens _igalSelfLink (\ s a -> s{_igalSelfLink = a})

-- | [Output Only] Informational warning message.
igalWarning :: Lens' InstanceGroupAggregatedList (Maybe InstanceGroupAggregatedListWarning)
igalWarning
  = lens _igalWarning (\ s a -> s{_igalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
igalId :: Lens' InstanceGroupAggregatedList (Maybe Text)
igalId = lens _igalId (\ s a -> s{_igalId = a})

instance FromJSON InstanceGroupAggregatedList where
        parseJSON
          = withObject "InstanceGroupAggregatedList"
              (\ o ->
                 InstanceGroupAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#instanceGroupAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceGroupAggregatedList where
        toJSON InstanceGroupAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _igalNextPageToken,
                  Just ("kind" .= _igalKind),
                  ("items" .=) <$> _igalItems,
                  ("selfLink" .=) <$> _igalSelfLink,
                  ("warning" .=) <$> _igalWarning,
                  ("id" .=) <$> _igalId])

-- | Represents a Route resource. A route specifies how certain packets
-- should be handled by the network. Routes are associated with instances
-- by tags and the set of routes for a particular instance is called its
-- routing table. For each packet leaving an instance, the system searches
-- that instance\'s routing table for a single best matching route. Routes
-- match packets by destination IP address, preferring smaller or more
-- specific ranges over larger ones. If there is a tie, the system selects
-- the route with the smallest priority value. If there is still a tie, it
-- uses the layer three and four packet headers to select just one of the
-- remaining matching routes. The packet is then forwarded as specified by
-- the nextHop field of the winning route - either to another instance
-- destination, an instance gateway, or a Google Compute Engine-operated
-- gateway. Packets that do not match any route in the sending instance\'s
-- routing table are dropped. (== resource_for beta.routes ==) (==
-- resource_for v1.routes ==)
--
-- /See:/ 'route' smart constructor.
data Route = Route'
    { _rrNextHopPeering    :: !(Maybe Text)
    , _rrPriority          :: !(Maybe (Textual Word32))
    , _rrKind              :: !Text
    , _rrNextHopGateway    :: !(Maybe Text)
    , _rrNextHopNetwork    :: !(Maybe Text)
    , _rrNetwork           :: !(Maybe Text)
    , _rrWarnings          :: !(Maybe [RouteWarningsItem])
    , _rrNextHopIP         :: !(Maybe Text)
    , _rrDestRange         :: !(Maybe Text)
    , _rrSelfLink          :: !(Maybe Text)
    , _rrName              :: !(Maybe Text)
    , _rrCreationTimestamp :: !(Maybe Text)
    , _rrId                :: !(Maybe (Textual Word64))
    , _rrNextHopVPNTunnel  :: !(Maybe Text)
    , _rrDescription       :: !(Maybe Text)
    , _rrTags              :: !(Maybe [Text])
    , _rrNextHopInstance   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Route' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rrNextHopPeering'
--
-- * 'rrPriority'
--
-- * 'rrKind'
--
-- * 'rrNextHopGateway'
--
-- * 'rrNextHopNetwork'
--
-- * 'rrNetwork'
--
-- * 'rrWarnings'
--
-- * 'rrNextHopIP'
--
-- * 'rrDestRange'
--
-- * 'rrSelfLink'
--
-- * 'rrName'
--
-- * 'rrCreationTimestamp'
--
-- * 'rrId'
--
-- * 'rrNextHopVPNTunnel'
--
-- * 'rrDescription'
--
-- * 'rrTags'
--
-- * 'rrNextHopInstance'
route
    :: Route
route =
    Route'
    { _rrNextHopPeering = Nothing
    , _rrPriority = Nothing
    , _rrKind = "compute#route"
    , _rrNextHopGateway = Nothing
    , _rrNextHopNetwork = Nothing
    , _rrNetwork = Nothing
    , _rrWarnings = Nothing
    , _rrNextHopIP = Nothing
    , _rrDestRange = Nothing
    , _rrSelfLink = Nothing
    , _rrName = Nothing
    , _rrCreationTimestamp = Nothing
    , _rrId = Nothing
    , _rrNextHopVPNTunnel = Nothing
    , _rrDescription = Nothing
    , _rrTags = Nothing
    , _rrNextHopInstance = Nothing
    }

-- | [Output Only] The network peering name that should handle matching
-- packets, which should conform to RFC1035.
rrNextHopPeering :: Lens' Route (Maybe Text)
rrNextHopPeering
  = lens _rrNextHopPeering
      (\ s a -> s{_rrNextHopPeering = a})

-- | The priority of this route. Priority is used to break ties in cases
-- where there is more than one matching route of equal prefix length. In
-- the case of two routes with equal prefix length, the one with the
-- lowest-numbered priority value wins. Default value is 1000. Valid range
-- is 0 through 65535.
rrPriority :: Lens' Route (Maybe Word32)
rrPriority
  = lens _rrPriority (\ s a -> s{_rrPriority = a}) .
      mapping _Coerce

-- | [Output Only] Type of this resource. Always compute#routes for Route
-- resources.
rrKind :: Lens' Route Text
rrKind = lens _rrKind (\ s a -> s{_rrKind = a})

-- | The URL to a gateway that should handle matching packets. You can only
-- specify the internet gateway using a full or partial valid URL:
-- projects\/\/global\/gateways\/default-internet-gateway
rrNextHopGateway :: Lens' Route (Maybe Text)
rrNextHopGateway
  = lens _rrNextHopGateway
      (\ s a -> s{_rrNextHopGateway = a})

-- | The URL of the local network if it should handle matching packets.
rrNextHopNetwork :: Lens' Route (Maybe Text)
rrNextHopNetwork
  = lens _rrNextHopNetwork
      (\ s a -> s{_rrNextHopNetwork = a})

-- | Fully-qualified URL of the network that this route applies to.
rrNetwork :: Lens' Route (Maybe Text)
rrNetwork
  = lens _rrNetwork (\ s a -> s{_rrNetwork = a})

-- | [Output Only] If potential misconfigurations are detected for this
-- route, this field will be populated with warning messages.
rrWarnings :: Lens' Route [RouteWarningsItem]
rrWarnings
  = lens _rrWarnings (\ s a -> s{_rrWarnings = a}) .
      _Default
      . _Coerce

-- | The network IP address of an instance that should handle matching
-- packets. Only IPv4 is supported.
rrNextHopIP :: Lens' Route (Maybe Text)
rrNextHopIP
  = lens _rrNextHopIP (\ s a -> s{_rrNextHopIP = a})

-- | The destination range of outgoing packets that this route applies to.
-- Only IPv4 is supported.
rrDestRange :: Lens' Route (Maybe Text)
rrDestRange
  = lens _rrDestRange (\ s a -> s{_rrDestRange = a})

-- | [Output Only] Server-defined fully-qualified URL for this resource.
rrSelfLink :: Lens' Route (Maybe Text)
rrSelfLink
  = lens _rrSelfLink (\ s a -> s{_rrSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
rrName :: Lens' Route (Maybe Text)
rrName = lens _rrName (\ s a -> s{_rrName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
rrCreationTimestamp :: Lens' Route (Maybe Text)
rrCreationTimestamp
  = lens _rrCreationTimestamp
      (\ s a -> s{_rrCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
rrId :: Lens' Route (Maybe Word64)
rrId
  = lens _rrId (\ s a -> s{_rrId = a}) .
      mapping _Coerce

-- | The URL to a VpnTunnel that should handle matching packets.
rrNextHopVPNTunnel :: Lens' Route (Maybe Text)
rrNextHopVPNTunnel
  = lens _rrNextHopVPNTunnel
      (\ s a -> s{_rrNextHopVPNTunnel = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
rrDescription :: Lens' Route (Maybe Text)
rrDescription
  = lens _rrDescription
      (\ s a -> s{_rrDescription = a})

-- | A list of instance tags to which this route applies.
rrTags :: Lens' Route [Text]
rrTags
  = lens _rrTags (\ s a -> s{_rrTags = a}) . _Default .
      _Coerce

-- | The URL to an instance that should handle matching packets. You can
-- specify this as a full or partial URL. For example:
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/instances\/
rrNextHopInstance :: Lens' Route (Maybe Text)
rrNextHopInstance
  = lens _rrNextHopInstance
      (\ s a -> s{_rrNextHopInstance = a})

instance FromJSON Route where
        parseJSON
          = withObject "Route"
              (\ o ->
                 Route' <$>
                   (o .:? "nextHopPeering") <*> (o .:? "priority") <*>
                     (o .:? "kind" .!= "compute#route")
                     <*> (o .:? "nextHopGateway")
                     <*> (o .:? "nextHopNetwork")
                     <*> (o .:? "network")
                     <*> (o .:? "warnings" .!= mempty)
                     <*> (o .:? "nextHopIp")
                     <*> (o .:? "destRange")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "nextHopVpnTunnel")
                     <*> (o .:? "description")
                     <*> (o .:? "tags" .!= mempty)
                     <*> (o .:? "nextHopInstance"))

instance ToJSON Route where
        toJSON Route'{..}
          = object
              (catMaybes
                 [("nextHopPeering" .=) <$> _rrNextHopPeering,
                  ("priority" .=) <$> _rrPriority,
                  Just ("kind" .= _rrKind),
                  ("nextHopGateway" .=) <$> _rrNextHopGateway,
                  ("nextHopNetwork" .=) <$> _rrNextHopNetwork,
                  ("network" .=) <$> _rrNetwork,
                  ("warnings" .=) <$> _rrWarnings,
                  ("nextHopIp" .=) <$> _rrNextHopIP,
                  ("destRange" .=) <$> _rrDestRange,
                  ("selfLink" .=) <$> _rrSelfLink,
                  ("name" .=) <$> _rrName,
                  ("creationTimestamp" .=) <$> _rrCreationTimestamp,
                  ("id" .=) <$> _rrId,
                  ("nextHopVpnTunnel" .=) <$> _rrNextHopVPNTunnel,
                  ("description" .=) <$> _rrDescription,
                  ("tags" .=) <$> _rrTags,
                  ("nextHopInstance" .=) <$> _rrNextHopInstance])

--
-- /See:/ 'targetVPNGatewaysScopedListWarningDataItem' smart constructor.
data TargetVPNGatewaysScopedListWarningDataItem = TargetVPNGatewaysScopedListWarningDataItem'
    { _tvgslwdiValue :: !(Maybe Text)
    , _tvgslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewaysScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvgslwdiValue'
--
-- * 'tvgslwdiKey'
targetVPNGatewaysScopedListWarningDataItem
    :: TargetVPNGatewaysScopedListWarningDataItem
targetVPNGatewaysScopedListWarningDataItem =
    TargetVPNGatewaysScopedListWarningDataItem'
    { _tvgslwdiValue = Nothing
    , _tvgslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tvgslwdiValue :: Lens' TargetVPNGatewaysScopedListWarningDataItem (Maybe Text)
tvgslwdiValue
  = lens _tvgslwdiValue
      (\ s a -> s{_tvgslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tvgslwdiKey :: Lens' TargetVPNGatewaysScopedListWarningDataItem (Maybe Text)
tvgslwdiKey
  = lens _tvgslwdiKey (\ s a -> s{_tvgslwdiKey = a})

instance FromJSON
         TargetVPNGatewaysScopedListWarningDataItem where
        parseJSON
          = withObject
              "TargetVPNGatewaysScopedListWarningDataItem"
              (\ o ->
                 TargetVPNGatewaysScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         TargetVPNGatewaysScopedListWarningDataItem where
        toJSON
          TargetVPNGatewaysScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tvgslwdiValue,
                  ("key" .=) <$> _tvgslwdiKey])

-- | Information about any potential InterconnectAttachments between an
-- Interconnect at a specific InterconnectLocation, and a specific Cloud
-- Region.
--
-- /See:/ 'interconnectLocationRegionInfo' smart constructor.
data InterconnectLocationRegionInfo = InterconnectLocationRegionInfo'
    { _ilriLocationPresence :: !(Maybe InterconnectLocationRegionInfoLocationPresence)
    , _ilriExpectedRttMs    :: !(Maybe (Textual Int64))
    , _ilriRegion           :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectLocationRegionInfo' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ilriLocationPresence'
--
-- * 'ilriExpectedRttMs'
--
-- * 'ilriRegion'
interconnectLocationRegionInfo
    :: InterconnectLocationRegionInfo
interconnectLocationRegionInfo =
    InterconnectLocationRegionInfo'
    { _ilriLocationPresence = Nothing
    , _ilriExpectedRttMs = Nothing
    , _ilriRegion = Nothing
    }

-- | Identifies the network presence of this location.
ilriLocationPresence :: Lens' InterconnectLocationRegionInfo (Maybe InterconnectLocationRegionInfoLocationPresence)
ilriLocationPresence
  = lens _ilriLocationPresence
      (\ s a -> s{_ilriLocationPresence = a})

-- | Expected round-trip time in milliseconds, from this InterconnectLocation
-- to a VM in this region.
ilriExpectedRttMs :: Lens' InterconnectLocationRegionInfo (Maybe Int64)
ilriExpectedRttMs
  = lens _ilriExpectedRttMs
      (\ s a -> s{_ilriExpectedRttMs = a})
      . mapping _Coerce

-- | URL for the region of this location.
ilriRegion :: Lens' InterconnectLocationRegionInfo (Maybe Text)
ilriRegion
  = lens _ilriRegion (\ s a -> s{_ilriRegion = a})

instance FromJSON InterconnectLocationRegionInfo
         where
        parseJSON
          = withObject "InterconnectLocationRegionInfo"
              (\ o ->
                 InterconnectLocationRegionInfo' <$>
                   (o .:? "locationPresence") <*>
                     (o .:? "expectedRttMs")
                     <*> (o .:? "region"))

instance ToJSON InterconnectLocationRegionInfo where
        toJSON InterconnectLocationRegionInfo'{..}
          = object
              (catMaybes
                 [("locationPresence" .=) <$> _ilriLocationPresence,
                  ("expectedRttMs" .=) <$> _ilriExpectedRttMs,
                  ("region" .=) <$> _ilriRegion])

--
-- /See:/ 'targetHTTPSProxiesSetSSLCertificatesRequest' smart constructor.
newtype TargetHTTPSProxiesSetSSLCertificatesRequest = TargetHTTPSProxiesSetSSLCertificatesRequest'
    { _thpsscrSSLCertificates :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPSProxiesSetSSLCertificatesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thpsscrSSLCertificates'
targetHTTPSProxiesSetSSLCertificatesRequest
    :: TargetHTTPSProxiesSetSSLCertificatesRequest
targetHTTPSProxiesSetSSLCertificatesRequest =
    TargetHTTPSProxiesSetSSLCertificatesRequest'
    { _thpsscrSSLCertificates = Nothing
    }

-- | New set of SslCertificate resources to associate with this
-- TargetHttpsProxy resource. Currently exactly one SslCertificate resource
-- must be specified.
thpsscrSSLCertificates :: Lens' TargetHTTPSProxiesSetSSLCertificatesRequest [Text]
thpsscrSSLCertificates
  = lens _thpsscrSSLCertificates
      (\ s a -> s{_thpsscrSSLCertificates = a})
      . _Default
      . _Coerce

instance FromJSON
         TargetHTTPSProxiesSetSSLCertificatesRequest where
        parseJSON
          = withObject
              "TargetHTTPSProxiesSetSSLCertificatesRequest"
              (\ o ->
                 TargetHTTPSProxiesSetSSLCertificatesRequest' <$>
                   (o .:? "sslCertificates" .!= mempty))

instance ToJSON
         TargetHTTPSProxiesSetSSLCertificatesRequest where
        toJSON
          TargetHTTPSProxiesSetSSLCertificatesRequest'{..}
          = object
              (catMaybes
                 [("sslCertificates" .=) <$> _thpsscrSSLCertificates])

-- | An Instance Template resource. (== resource_for beta.instanceTemplates
-- ==) (== resource_for v1.instanceTemplates ==)
--
-- /See:/ 'instanceTemplate' smart constructor.
data InstanceTemplate = InstanceTemplate'
    { _itSourceInstance       :: !(Maybe Text)
    , _itKind                 :: !Text
    , _itSelfLink             :: !(Maybe Text)
    , _itName                 :: !(Maybe Text)
    , _itCreationTimestamp    :: !(Maybe Text)
    , _itId                   :: !(Maybe (Textual Word64))
    , _itSourceInstanceParams :: !(Maybe SourceInstanceParams)
    , _itDescription          :: !(Maybe Text)
    , _itProperties           :: !(Maybe InstanceProperties)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceTemplate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'itSourceInstance'
--
-- * 'itKind'
--
-- * 'itSelfLink'
--
-- * 'itName'
--
-- * 'itCreationTimestamp'
--
-- * 'itId'
--
-- * 'itSourceInstanceParams'
--
-- * 'itDescription'
--
-- * 'itProperties'
instanceTemplate
    :: InstanceTemplate
instanceTemplate =
    InstanceTemplate'
    { _itSourceInstance = Nothing
    , _itKind = "compute#instanceTemplate"
    , _itSelfLink = Nothing
    , _itName = Nothing
    , _itCreationTimestamp = Nothing
    , _itId = Nothing
    , _itSourceInstanceParams = Nothing
    , _itDescription = Nothing
    , _itProperties = Nothing
    }

-- | The source instance used to create the template. You can provide this as
-- a partial or full URL to the resource. For example, the following are
-- valid values: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/instances\/instance
-- - projects\/project\/zones\/zone\/instances\/instance
itSourceInstance :: Lens' InstanceTemplate (Maybe Text)
itSourceInstance
  = lens _itSourceInstance
      (\ s a -> s{_itSourceInstance = a})

-- | [Output Only] The resource type, which is always
-- compute#instanceTemplate for instance templates.
itKind :: Lens' InstanceTemplate Text
itKind = lens _itKind (\ s a -> s{_itKind = a})

-- | [Output Only] The URL for this instance template. The server defines
-- this URL.
itSelfLink :: Lens' InstanceTemplate (Maybe Text)
itSelfLink
  = lens _itSelfLink (\ s a -> s{_itSelfLink = a})

-- | Name of the resource; provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
itName :: Lens' InstanceTemplate (Maybe Text)
itName = lens _itName (\ s a -> s{_itName = a})

-- | [Output Only] The creation timestamp for this instance template in
-- RFC3339 text format.
itCreationTimestamp :: Lens' InstanceTemplate (Maybe Text)
itCreationTimestamp
  = lens _itCreationTimestamp
      (\ s a -> s{_itCreationTimestamp = a})

-- | [Output Only] A unique identifier for this instance template. The server
-- defines this identifier.
itId :: Lens' InstanceTemplate (Maybe Word64)
itId
  = lens _itId (\ s a -> s{_itId = a}) .
      mapping _Coerce

-- | The source instance params to use to create this instance template.
itSourceInstanceParams :: Lens' InstanceTemplate (Maybe SourceInstanceParams)
itSourceInstanceParams
  = lens _itSourceInstanceParams
      (\ s a -> s{_itSourceInstanceParams = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
itDescription :: Lens' InstanceTemplate (Maybe Text)
itDescription
  = lens _itDescription
      (\ s a -> s{_itDescription = a})

-- | The instance properties for this instance template.
itProperties :: Lens' InstanceTemplate (Maybe InstanceProperties)
itProperties
  = lens _itProperties (\ s a -> s{_itProperties = a})

instance FromJSON InstanceTemplate where
        parseJSON
          = withObject "InstanceTemplate"
              (\ o ->
                 InstanceTemplate' <$>
                   (o .:? "sourceInstance") <*>
                     (o .:? "kind" .!= "compute#instanceTemplate")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "sourceInstanceParams")
                     <*> (o .:? "description")
                     <*> (o .:? "properties"))

instance ToJSON InstanceTemplate where
        toJSON InstanceTemplate'{..}
          = object
              (catMaybes
                 [("sourceInstance" .=) <$> _itSourceInstance,
                  Just ("kind" .= _itKind),
                  ("selfLink" .=) <$> _itSelfLink,
                  ("name" .=) <$> _itName,
                  ("creationTimestamp" .=) <$> _itCreationTimestamp,
                  ("id" .=) <$> _itId,
                  ("sourceInstanceParams" .=) <$>
                    _itSourceInstanceParams,
                  ("description" .=) <$> _itDescription,
                  ("properties" .=) <$> _itProperties])

-- | Service resource (a.k.a service project) ID.
--
-- /See:/ 'xpnResourceId' smart constructor.
data XpnResourceId = XpnResourceId'
    { _xriId   :: !(Maybe Text)
    , _xriType :: !(Maybe XpnResourceIdType)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'XpnResourceId' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'xriId'
--
-- * 'xriType'
xpnResourceId
    :: XpnResourceId
xpnResourceId =
    XpnResourceId'
    { _xriId = Nothing
    , _xriType = Nothing
    }

-- | The ID of the service resource. In the case of projects, this field
-- supports project id (e.g., my-project-123) and project number (e.g.
-- 12345678).
xriId :: Lens' XpnResourceId (Maybe Text)
xriId = lens _xriId (\ s a -> s{_xriId = a})

-- | The type of the service resource.
xriType :: Lens' XpnResourceId (Maybe XpnResourceIdType)
xriType = lens _xriType (\ s a -> s{_xriType = a})

instance FromJSON XpnResourceId where
        parseJSON
          = withObject "XpnResourceId"
              (\ o ->
                 XpnResourceId' <$> (o .:? "id") <*> (o .:? "type"))

instance ToJSON XpnResourceId where
        toJSON XpnResourceId'{..}
          = object
              (catMaybes
                 [("id" .=) <$> _xriId, ("type" .=) <$> _xriType])

-- | Contains a list of Router resources.
--
-- /See:/ 'routerList' smart constructor.
data RouterList = RouterList'
    { _rllNextPageToken :: !(Maybe Text)
    , _rllKind          :: !Text
    , _rllItems         :: !(Maybe [Router])
    , _rllSelfLink      :: !(Maybe Text)
    , _rllWarning       :: !(Maybe RouterListWarning)
    , _rllId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rllNextPageToken'
--
-- * 'rllKind'
--
-- * 'rllItems'
--
-- * 'rllSelfLink'
--
-- * 'rllWarning'
--
-- * 'rllId'
routerList
    :: RouterList
routerList =
    RouterList'
    { _rllNextPageToken = Nothing
    , _rllKind = "compute#routerList"
    , _rllItems = Nothing
    , _rllSelfLink = Nothing
    , _rllWarning = Nothing
    , _rllId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
rllNextPageToken :: Lens' RouterList (Maybe Text)
rllNextPageToken
  = lens _rllNextPageToken
      (\ s a -> s{_rllNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#router for routers.
rllKind :: Lens' RouterList Text
rllKind = lens _rllKind (\ s a -> s{_rllKind = a})

-- | A list of Router resources.
rllItems :: Lens' RouterList [Router]
rllItems
  = lens _rllItems (\ s a -> s{_rllItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
rllSelfLink :: Lens' RouterList (Maybe Text)
rllSelfLink
  = lens _rllSelfLink (\ s a -> s{_rllSelfLink = a})

-- | [Output Only] Informational warning message.
rllWarning :: Lens' RouterList (Maybe RouterListWarning)
rllWarning
  = lens _rllWarning (\ s a -> s{_rllWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
rllId :: Lens' RouterList (Maybe Text)
rllId = lens _rllId (\ s a -> s{_rllId = a})

instance FromJSON RouterList where
        parseJSON
          = withObject "RouterList"
              (\ o ->
                 RouterList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#routerList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RouterList where
        toJSON RouterList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _rllNextPageToken,
                  Just ("kind" .= _rllKind),
                  ("items" .=) <$> _rllItems,
                  ("selfLink" .=) <$> _rllSelfLink,
                  ("warning" .=) <$> _rllWarning,
                  ("id" .=) <$> _rllId])

-- | A TargetSslProxy resource. This resource defines an SSL proxy. (==
-- resource_for beta.targetSslProxies ==) (== resource_for
-- v1.targetSslProxies ==)
--
-- /See:/ 'targetSSLProxy' smart constructor.
data TargetSSLProxy = TargetSSLProxy'
    { _tspSSLPolicy         :: !(Maybe Text)
    , _tspSSLCertificates   :: !(Maybe [Text])
    , _tspService           :: !(Maybe Text)
    , _tspKind              :: !Text
    , _tspSelfLink          :: !(Maybe Text)
    , _tspName              :: !(Maybe Text)
    , _tspCreationTimestamp :: !(Maybe Text)
    , _tspId                :: !(Maybe (Textual Word64))
    , _tspProxyHeader       :: !(Maybe TargetSSLProxyProxyHeader)
    , _tspDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetSSLProxy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tspSSLPolicy'
--
-- * 'tspSSLCertificates'
--
-- * 'tspService'
--
-- * 'tspKind'
--
-- * 'tspSelfLink'
--
-- * 'tspName'
--
-- * 'tspCreationTimestamp'
--
-- * 'tspId'
--
-- * 'tspProxyHeader'
--
-- * 'tspDescription'
targetSSLProxy
    :: TargetSSLProxy
targetSSLProxy =
    TargetSSLProxy'
    { _tspSSLPolicy = Nothing
    , _tspSSLCertificates = Nothing
    , _tspService = Nothing
    , _tspKind = "compute#targetSslProxy"
    , _tspSelfLink = Nothing
    , _tspName = Nothing
    , _tspCreationTimestamp = Nothing
    , _tspId = Nothing
    , _tspProxyHeader = Nothing
    , _tspDescription = Nothing
    }

-- | URL of SslPolicy resource that will be associated with the
-- TargetSslProxy resource. If not set, the TargetSslProxy resource will
-- not have any SSL policy configured.
tspSSLPolicy :: Lens' TargetSSLProxy (Maybe Text)
tspSSLPolicy
  = lens _tspSSLPolicy (\ s a -> s{_tspSSLPolicy = a})

-- | URLs to SslCertificate resources that are used to authenticate
-- connections to Backends. At least one SSL certificate must be specified.
-- Currently, you may specify up to 15 SSL certificates.
tspSSLCertificates :: Lens' TargetSSLProxy [Text]
tspSSLCertificates
  = lens _tspSSLCertificates
      (\ s a -> s{_tspSSLCertificates = a})
      . _Default
      . _Coerce

-- | URL to the BackendService resource.
tspService :: Lens' TargetSSLProxy (Maybe Text)
tspService
  = lens _tspService (\ s a -> s{_tspService = a})

-- | [Output Only] Type of the resource. Always compute#targetSslProxy for
-- target SSL proxies.
tspKind :: Lens' TargetSSLProxy Text
tspKind = lens _tspKind (\ s a -> s{_tspKind = a})

-- | [Output Only] Server-defined URL for the resource.
tspSelfLink :: Lens' TargetSSLProxy (Maybe Text)
tspSelfLink
  = lens _tspSelfLink (\ s a -> s{_tspSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
tspName :: Lens' TargetSSLProxy (Maybe Text)
tspName = lens _tspName (\ s a -> s{_tspName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
tspCreationTimestamp :: Lens' TargetSSLProxy (Maybe Text)
tspCreationTimestamp
  = lens _tspCreationTimestamp
      (\ s a -> s{_tspCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
tspId :: Lens' TargetSSLProxy (Maybe Word64)
tspId
  = lens _tspId (\ s a -> s{_tspId = a}) .
      mapping _Coerce

-- | Specifies the type of proxy header to append before sending data to the
-- backend, either NONE or PROXY_V1. The default is NONE.
tspProxyHeader :: Lens' TargetSSLProxy (Maybe TargetSSLProxyProxyHeader)
tspProxyHeader
  = lens _tspProxyHeader
      (\ s a -> s{_tspProxyHeader = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
tspDescription :: Lens' TargetSSLProxy (Maybe Text)
tspDescription
  = lens _tspDescription
      (\ s a -> s{_tspDescription = a})

instance FromJSON TargetSSLProxy where
        parseJSON
          = withObject "TargetSSLProxy"
              (\ o ->
                 TargetSSLProxy' <$>
                   (o .:? "sslPolicy") <*>
                     (o .:? "sslCertificates" .!= mempty)
                     <*> (o .:? "service")
                     <*> (o .:? "kind" .!= "compute#targetSslProxy")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "proxyHeader")
                     <*> (o .:? "description"))

instance ToJSON TargetSSLProxy where
        toJSON TargetSSLProxy'{..}
          = object
              (catMaybes
                 [("sslPolicy" .=) <$> _tspSSLPolicy,
                  ("sslCertificates" .=) <$> _tspSSLCertificates,
                  ("service" .=) <$> _tspService,
                  Just ("kind" .= _tspKind),
                  ("selfLink" .=) <$> _tspSelfLink,
                  ("name" .=) <$> _tspName,
                  ("creationTimestamp" .=) <$> _tspCreationTimestamp,
                  ("id" .=) <$> _tspId,
                  ("proxyHeader" .=) <$> _tspProxyHeader,
                  ("description" .=) <$> _tspDescription])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'sslCertificateListWarning' smart constructor.
data SSLCertificateListWarning = SSLCertificateListWarning'
    { _sclwData    :: !(Maybe [SSLCertificateListWarningDataItem])
    , _sclwCode    :: !(Maybe SSLCertificateListWarningCode)
    , _sclwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLCertificateListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sclwData'
--
-- * 'sclwCode'
--
-- * 'sclwMessage'
sslCertificateListWarning
    :: SSLCertificateListWarning
sslCertificateListWarning =
    SSLCertificateListWarning'
    { _sclwData = Nothing
    , _sclwCode = Nothing
    , _sclwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
sclwData :: Lens' SSLCertificateListWarning [SSLCertificateListWarningDataItem]
sclwData
  = lens _sclwData (\ s a -> s{_sclwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
sclwCode :: Lens' SSLCertificateListWarning (Maybe SSLCertificateListWarningCode)
sclwCode = lens _sclwCode (\ s a -> s{_sclwCode = a})

-- | [Output Only] A human-readable description of the warning code.
sclwMessage :: Lens' SSLCertificateListWarning (Maybe Text)
sclwMessage
  = lens _sclwMessage (\ s a -> s{_sclwMessage = a})

instance FromJSON SSLCertificateListWarning where
        parseJSON
          = withObject "SSLCertificateListWarning"
              (\ o ->
                 SSLCertificateListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON SSLCertificateListWarning where
        toJSON SSLCertificateListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _sclwData,
                  ("code" .=) <$> _sclwCode,
                  ("message" .=) <$> _sclwMessage])

--
-- /See:/ 'snapshotListWarningDataItem' smart constructor.
data SnapshotListWarningDataItem = SnapshotListWarningDataItem'
    { _slwdiValue :: !(Maybe Text)
    , _slwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SnapshotListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'slwdiValue'
--
-- * 'slwdiKey'
snapshotListWarningDataItem
    :: SnapshotListWarningDataItem
snapshotListWarningDataItem =
    SnapshotListWarningDataItem'
    { _slwdiValue = Nothing
    , _slwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
slwdiValue :: Lens' SnapshotListWarningDataItem (Maybe Text)
slwdiValue
  = lens _slwdiValue (\ s a -> s{_slwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
slwdiKey :: Lens' SnapshotListWarningDataItem (Maybe Text)
slwdiKey = lens _slwdiKey (\ s a -> s{_slwdiKey = a})

instance FromJSON SnapshotListWarningDataItem where
        parseJSON
          = withObject "SnapshotListWarningDataItem"
              (\ o ->
                 SnapshotListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON SnapshotListWarningDataItem where
        toJSON SnapshotListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _slwdiValue,
                  ("key" .=) <$> _slwdiKey])

-- | Represents a Target VPN gateway resource. (== resource_for
-- beta.targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==)
--
-- /See:/ 'targetVPNGateway' smart constructor.
data TargetVPNGateway = TargetVPNGateway'
    { _tvgStatus            :: !(Maybe TargetVPNGatewayStatus)
    , _tvgKind              :: !Text
    , _tvgNetwork           :: !(Maybe Text)
    , _tvgSelfLink          :: !(Maybe Text)
    , _tvgName              :: !(Maybe Text)
    , _tvgCreationTimestamp :: !(Maybe Text)
    , _tvgId                :: !(Maybe (Textual Word64))
    , _tvgRegion            :: !(Maybe Text)
    , _tvgTunnels           :: !(Maybe [Text])
    , _tvgDescription       :: !(Maybe Text)
    , _tvgForwardingRules   :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGateway' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvgStatus'
--
-- * 'tvgKind'
--
-- * 'tvgNetwork'
--
-- * 'tvgSelfLink'
--
-- * 'tvgName'
--
-- * 'tvgCreationTimestamp'
--
-- * 'tvgId'
--
-- * 'tvgRegion'
--
-- * 'tvgTunnels'
--
-- * 'tvgDescription'
--
-- * 'tvgForwardingRules'
targetVPNGateway
    :: TargetVPNGateway
targetVPNGateway =
    TargetVPNGateway'
    { _tvgStatus = Nothing
    , _tvgKind = "compute#targetVpnGateway"
    , _tvgNetwork = Nothing
    , _tvgSelfLink = Nothing
    , _tvgName = Nothing
    , _tvgCreationTimestamp = Nothing
    , _tvgId = Nothing
    , _tvgRegion = Nothing
    , _tvgTunnels = Nothing
    , _tvgDescription = Nothing
    , _tvgForwardingRules = Nothing
    }

-- | [Output Only] The status of the VPN gateway.
tvgStatus :: Lens' TargetVPNGateway (Maybe TargetVPNGatewayStatus)
tvgStatus
  = lens _tvgStatus (\ s a -> s{_tvgStatus = a})

-- | [Output Only] Type of resource. Always compute#targetVpnGateway for
-- target VPN gateways.
tvgKind :: Lens' TargetVPNGateway Text
tvgKind = lens _tvgKind (\ s a -> s{_tvgKind = a})

-- | URL of the network to which this VPN gateway is attached. Provided by
-- the client when the VPN gateway is created.
tvgNetwork :: Lens' TargetVPNGateway (Maybe Text)
tvgNetwork
  = lens _tvgNetwork (\ s a -> s{_tvgNetwork = a})

-- | [Output Only] Server-defined URL for the resource.
tvgSelfLink :: Lens' TargetVPNGateway (Maybe Text)
tvgSelfLink
  = lens _tvgSelfLink (\ s a -> s{_tvgSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
tvgName :: Lens' TargetVPNGateway (Maybe Text)
tvgName = lens _tvgName (\ s a -> s{_tvgName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
tvgCreationTimestamp :: Lens' TargetVPNGateway (Maybe Text)
tvgCreationTimestamp
  = lens _tvgCreationTimestamp
      (\ s a -> s{_tvgCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
tvgId :: Lens' TargetVPNGateway (Maybe Word64)
tvgId
  = lens _tvgId (\ s a -> s{_tvgId = a}) .
      mapping _Coerce

-- | [Output Only] URL of the region where the target VPN gateway resides.
-- You must specify this field as part of the HTTP request URL. It is not
-- settable as a field in the request body.
tvgRegion :: Lens' TargetVPNGateway (Maybe Text)
tvgRegion
  = lens _tvgRegion (\ s a -> s{_tvgRegion = a})

-- | [Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are
-- created using compute.vpntunnels.insert method and associated to a VPN
-- gateway.
tvgTunnels :: Lens' TargetVPNGateway [Text]
tvgTunnels
  = lens _tvgTunnels (\ s a -> s{_tvgTunnels = a}) .
      _Default
      . _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
tvgDescription :: Lens' TargetVPNGateway (Maybe Text)
tvgDescription
  = lens _tvgDescription
      (\ s a -> s{_tvgDescription = a})

-- | [Output Only] A list of URLs to the ForwardingRule resources.
-- ForwardingRules are created using compute.forwardingRules.insert and
-- associated to a VPN gateway.
tvgForwardingRules :: Lens' TargetVPNGateway [Text]
tvgForwardingRules
  = lens _tvgForwardingRules
      (\ s a -> s{_tvgForwardingRules = a})
      . _Default
      . _Coerce

instance FromJSON TargetVPNGateway where
        parseJSON
          = withObject "TargetVPNGateway"
              (\ o ->
                 TargetVPNGateway' <$>
                   (o .:? "status") <*>
                     (o .:? "kind" .!= "compute#targetVpnGateway")
                     <*> (o .:? "network")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "tunnels" .!= mempty)
                     <*> (o .:? "description")
                     <*> (o .:? "forwardingRules" .!= mempty))

instance ToJSON TargetVPNGateway where
        toJSON TargetVPNGateway'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _tvgStatus,
                  Just ("kind" .= _tvgKind),
                  ("network" .=) <$> _tvgNetwork,
                  ("selfLink" .=) <$> _tvgSelfLink,
                  ("name" .=) <$> _tvgName,
                  ("creationTimestamp" .=) <$> _tvgCreationTimestamp,
                  ("id" .=) <$> _tvgId, ("region" .=) <$> _tvgRegion,
                  ("tunnels" .=) <$> _tvgTunnels,
                  ("description" .=) <$> _tvgDescription,
                  ("forwardingRules" .=) <$> _tvgForwardingRules])

-- | Commitment for a particular resource (a Commitment is composed of one or
-- more of these).
--
-- /See:/ 'resourceCommitment' smart constructor.
data ResourceCommitment = ResourceCommitment'
    { _rcAmount :: !(Maybe (Textual Int64))
    , _rcType   :: !(Maybe ResourceCommitmentType)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ResourceCommitment' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rcAmount'
--
-- * 'rcType'
resourceCommitment
    :: ResourceCommitment
resourceCommitment =
    ResourceCommitment'
    { _rcAmount = Nothing
    , _rcType = Nothing
    }

-- | The amount of the resource purchased (in a type-dependent unit, such as
-- bytes). For vCPUs, this can just be an integer. For memory, this must be
-- provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of
-- memory per every vCPU.
rcAmount :: Lens' ResourceCommitment (Maybe Int64)
rcAmount
  = lens _rcAmount (\ s a -> s{_rcAmount = a}) .
      mapping _Coerce

-- | Type of resource for which this commitment applies. Possible values are
-- VCPU and MEMORY
rcType :: Lens' ResourceCommitment (Maybe ResourceCommitmentType)
rcType = lens _rcType (\ s a -> s{_rcType = a})

instance FromJSON ResourceCommitment where
        parseJSON
          = withObject "ResourceCommitment"
              (\ o ->
                 ResourceCommitment' <$>
                   (o .:? "amount") <*> (o .:? "type"))

instance ToJSON ResourceCommitment where
        toJSON ResourceCommitment'{..}
          = object
              (catMaybes
                 [("amount" .=) <$> _rcAmount,
                  ("type" .=) <$> _rcType])

-- | Identity-Aware Proxy
--
-- /See:/ 'backendServiceIAP' smart constructor.
data BackendServiceIAP = BackendServiceIAP'
    { _bsiapEnabled                  :: !(Maybe Bool)
    , _bsiapOAuth2ClientSecretSha256 :: !(Maybe Text)
    , _bsiapOAuth2ClientSecret       :: !(Maybe Text)
    , _bsiapOAuth2ClientId           :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceIAP' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsiapEnabled'
--
-- * 'bsiapOAuth2ClientSecretSha256'
--
-- * 'bsiapOAuth2ClientSecret'
--
-- * 'bsiapOAuth2ClientId'
backendServiceIAP
    :: BackendServiceIAP
backendServiceIAP =
    BackendServiceIAP'
    { _bsiapEnabled = Nothing
    , _bsiapOAuth2ClientSecretSha256 = Nothing
    , _bsiapOAuth2ClientSecret = Nothing
    , _bsiapOAuth2ClientId = Nothing
    }

bsiapEnabled :: Lens' BackendServiceIAP (Maybe Bool)
bsiapEnabled
  = lens _bsiapEnabled (\ s a -> s{_bsiapEnabled = a})

-- | [Output Only] SHA256 hash value for the field oauth2_client_secret
-- above.
bsiapOAuth2ClientSecretSha256 :: Lens' BackendServiceIAP (Maybe Text)
bsiapOAuth2ClientSecretSha256
  = lens _bsiapOAuth2ClientSecretSha256
      (\ s a -> s{_bsiapOAuth2ClientSecretSha256 = a})

bsiapOAuth2ClientSecret :: Lens' BackendServiceIAP (Maybe Text)
bsiapOAuth2ClientSecret
  = lens _bsiapOAuth2ClientSecret
      (\ s a -> s{_bsiapOAuth2ClientSecret = a})

bsiapOAuth2ClientId :: Lens' BackendServiceIAP (Maybe Text)
bsiapOAuth2ClientId
  = lens _bsiapOAuth2ClientId
      (\ s a -> s{_bsiapOAuth2ClientId = a})

instance FromJSON BackendServiceIAP where
        parseJSON
          = withObject "BackendServiceIAP"
              (\ o ->
                 BackendServiceIAP' <$>
                   (o .:? "enabled") <*>
                     (o .:? "oauth2ClientSecretSha256")
                     <*> (o .:? "oauth2ClientSecret")
                     <*> (o .:? "oauth2ClientId"))

instance ToJSON BackendServiceIAP where
        toJSON BackendServiceIAP'{..}
          = object
              (catMaybes
                 [("enabled" .=) <$> _bsiapEnabled,
                  ("oauth2ClientSecretSha256" .=) <$>
                    _bsiapOAuth2ClientSecretSha256,
                  ("oauth2ClientSecret" .=) <$>
                    _bsiapOAuth2ClientSecret,
                  ("oauth2ClientId" .=) <$> _bsiapOAuth2ClientId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetVPNGatewayListWarning' smart constructor.
data TargetVPNGatewayListWarning = TargetVPNGatewayListWarning'
    { _tvglwData    :: !(Maybe [TargetVPNGatewayListWarningDataItem])
    , _tvglwCode    :: !(Maybe TargetVPNGatewayListWarningCode)
    , _tvglwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewayListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvglwData'
--
-- * 'tvglwCode'
--
-- * 'tvglwMessage'
targetVPNGatewayListWarning
    :: TargetVPNGatewayListWarning
targetVPNGatewayListWarning =
    TargetVPNGatewayListWarning'
    { _tvglwData = Nothing
    , _tvglwCode = Nothing
    , _tvglwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tvglwData :: Lens' TargetVPNGatewayListWarning [TargetVPNGatewayListWarningDataItem]
tvglwData
  = lens _tvglwData (\ s a -> s{_tvglwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tvglwCode :: Lens' TargetVPNGatewayListWarning (Maybe TargetVPNGatewayListWarningCode)
tvglwCode
  = lens _tvglwCode (\ s a -> s{_tvglwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tvglwMessage :: Lens' TargetVPNGatewayListWarning (Maybe Text)
tvglwMessage
  = lens _tvglwMessage (\ s a -> s{_tvglwMessage = a})

instance FromJSON TargetVPNGatewayListWarning where
        parseJSON
          = withObject "TargetVPNGatewayListWarning"
              (\ o ->
                 TargetVPNGatewayListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetVPNGatewayListWarning where
        toJSON TargetVPNGatewayListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tvglwData,
                  ("code" .=) <$> _tvglwCode,
                  ("message" .=) <$> _tvglwMessage])

--
-- /See:/ 'vMEndpointNATMAppingsListWarningDataItem' smart constructor.
data VMEndpointNATMAppingsListWarningDataItem = VMEndpointNATMAppingsListWarningDataItem'
    { _vmenatmalwdiValue :: !(Maybe Text)
    , _vmenatmalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VMEndpointNATMAppingsListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vmenatmalwdiValue'
--
-- * 'vmenatmalwdiKey'
vMEndpointNATMAppingsListWarningDataItem
    :: VMEndpointNATMAppingsListWarningDataItem
vMEndpointNATMAppingsListWarningDataItem =
    VMEndpointNATMAppingsListWarningDataItem'
    { _vmenatmalwdiValue = Nothing
    , _vmenatmalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
vmenatmalwdiValue :: Lens' VMEndpointNATMAppingsListWarningDataItem (Maybe Text)
vmenatmalwdiValue
  = lens _vmenatmalwdiValue
      (\ s a -> s{_vmenatmalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
vmenatmalwdiKey :: Lens' VMEndpointNATMAppingsListWarningDataItem (Maybe Text)
vmenatmalwdiKey
  = lens _vmenatmalwdiKey
      (\ s a -> s{_vmenatmalwdiKey = a})

instance FromJSON
         VMEndpointNATMAppingsListWarningDataItem where
        parseJSON
          = withObject
              "VMEndpointNATMAppingsListWarningDataItem"
              (\ o ->
                 VMEndpointNATMAppingsListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         VMEndpointNATMAppingsListWarningDataItem where
        toJSON VMEndpointNATMAppingsListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _vmenatmalwdiValue,
                  ("key" .=) <$> _vmenatmalwdiKey])

--
-- /See:/ 'urlMapsValidateResponse' smart constructor.
newtype URLMapsValidateResponse = URLMapsValidateResponse'
    { _umvrResult :: Maybe URLMapValidationResult
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMapsValidateResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umvrResult'
urlMapsValidateResponse
    :: URLMapsValidateResponse
urlMapsValidateResponse =
    URLMapsValidateResponse'
    { _umvrResult = Nothing
    }

umvrResult :: Lens' URLMapsValidateResponse (Maybe URLMapValidationResult)
umvrResult
  = lens _umvrResult (\ s a -> s{_umvrResult = a})

instance FromJSON URLMapsValidateResponse where
        parseJSON
          = withObject "URLMapsValidateResponse"
              (\ o ->
                 URLMapsValidateResponse' <$> (o .:? "result"))

instance ToJSON URLMapsValidateResponse where
        toJSON URLMapsValidateResponse'{..}
          = object (catMaybes [("result" .=) <$> _umvrResult])

-- | An SslCertificate resource. This resource provides a mechanism to upload
-- an SSL key and certificate to the load balancer to serve secure
-- connections from the user. (== resource_for beta.sslCertificates ==) (==
-- resource_for v1.sslCertificates ==)
--
-- /See:/ 'sslCertificate' smart constructor.
data SSLCertificate = SSLCertificate'
    { _scPrivateKey        :: !(Maybe Text)
    , _scKind              :: !Text
    , _scSelfLink          :: !(Maybe Text)
    , _scName              :: !(Maybe Text)
    , _scCreationTimestamp :: !(Maybe Text)
    , _scId                :: !(Maybe (Textual Word64))
    , _scCertificate       :: !(Maybe Text)
    , _scDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLCertificate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'scPrivateKey'
--
-- * 'scKind'
--
-- * 'scSelfLink'
--
-- * 'scName'
--
-- * 'scCreationTimestamp'
--
-- * 'scId'
--
-- * 'scCertificate'
--
-- * 'scDescription'
sslCertificate
    :: SSLCertificate
sslCertificate =
    SSLCertificate'
    { _scPrivateKey = Nothing
    , _scKind = "compute#sslCertificate"
    , _scSelfLink = Nothing
    , _scName = Nothing
    , _scCreationTimestamp = Nothing
    , _scId = Nothing
    , _scCertificate = Nothing
    , _scDescription = Nothing
    }

-- | A write-only private key in PEM format. Only insert requests will
-- include this field.
scPrivateKey :: Lens' SSLCertificate (Maybe Text)
scPrivateKey
  = lens _scPrivateKey (\ s a -> s{_scPrivateKey = a})

-- | [Output Only] Type of the resource. Always compute#sslCertificate for
-- SSL certificates.
scKind :: Lens' SSLCertificate Text
scKind = lens _scKind (\ s a -> s{_scKind = a})

-- | [Output only] Server-defined URL for the resource.
scSelfLink :: Lens' SSLCertificate (Maybe Text)
scSelfLink
  = lens _scSelfLink (\ s a -> s{_scSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
scName :: Lens' SSLCertificate (Maybe Text)
scName = lens _scName (\ s a -> s{_scName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
scCreationTimestamp :: Lens' SSLCertificate (Maybe Text)
scCreationTimestamp
  = lens _scCreationTimestamp
      (\ s a -> s{_scCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
scId :: Lens' SSLCertificate (Maybe Word64)
scId
  = lens _scId (\ s a -> s{_scId = a}) .
      mapping _Coerce

-- | A local certificate file. The certificate must be in PEM format. The
-- certificate chain must be no greater than 5 certs long. The chain must
-- include at least one intermediate cert.
scCertificate :: Lens' SSLCertificate (Maybe Text)
scCertificate
  = lens _scCertificate
      (\ s a -> s{_scCertificate = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
scDescription :: Lens' SSLCertificate (Maybe Text)
scDescription
  = lens _scDescription
      (\ s a -> s{_scDescription = a})

instance FromJSON SSLCertificate where
        parseJSON
          = withObject "SSLCertificate"
              (\ o ->
                 SSLCertificate' <$>
                   (o .:? "privateKey") <*>
                     (o .:? "kind" .!= "compute#sslCertificate")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "certificate")
                     <*> (o .:? "description"))

instance ToJSON SSLCertificate where
        toJSON SSLCertificate'{..}
          = object
              (catMaybes
                 [("privateKey" .=) <$> _scPrivateKey,
                  Just ("kind" .= _scKind),
                  ("selfLink" .=) <$> _scSelfLink,
                  ("name" .=) <$> _scName,
                  ("creationTimestamp" .=) <$> _scCreationTimestamp,
                  ("id" .=) <$> _scId,
                  ("certificate" .=) <$> _scCertificate,
                  ("description" .=) <$> _scDescription])

--
-- /See:/ 'routerStatusBGPPeerStatus' smart constructor.
data RouterStatusBGPPeerStatus = RouterStatusBGPPeerStatus'
    { _rsbpsStatus           :: !(Maybe RouterStatusBGPPeerStatusStatus)
    , _rsbpsIPAddress        :: !(Maybe Text)
    , _rsbpsState            :: !(Maybe Text)
    , _rsbpsPeerIPAddress    :: !(Maybe Text)
    , _rsbpsUptime           :: !(Maybe Text)
    , _rsbpsNumLearnedRoutes :: !(Maybe (Textual Word32))
    , _rsbpsName             :: !(Maybe Text)
    , _rsbpsUptimeSeconds    :: !(Maybe Text)
    , _rsbpsAdvertisedRoutes :: !(Maybe [Route])
    , _rsbpsLinkedVPNTunnel  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterStatusBGPPeerStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rsbpsStatus'
--
-- * 'rsbpsIPAddress'
--
-- * 'rsbpsState'
--
-- * 'rsbpsPeerIPAddress'
--
-- * 'rsbpsUptime'
--
-- * 'rsbpsNumLearnedRoutes'
--
-- * 'rsbpsName'
--
-- * 'rsbpsUptimeSeconds'
--
-- * 'rsbpsAdvertisedRoutes'
--
-- * 'rsbpsLinkedVPNTunnel'
routerStatusBGPPeerStatus
    :: RouterStatusBGPPeerStatus
routerStatusBGPPeerStatus =
    RouterStatusBGPPeerStatus'
    { _rsbpsStatus = Nothing
    , _rsbpsIPAddress = Nothing
    , _rsbpsState = Nothing
    , _rsbpsPeerIPAddress = Nothing
    , _rsbpsUptime = Nothing
    , _rsbpsNumLearnedRoutes = Nothing
    , _rsbpsName = Nothing
    , _rsbpsUptimeSeconds = Nothing
    , _rsbpsAdvertisedRoutes = Nothing
    , _rsbpsLinkedVPNTunnel = Nothing
    }

-- | Status of the BGP peer: {UP, DOWN}
rsbpsStatus :: Lens' RouterStatusBGPPeerStatus (Maybe RouterStatusBGPPeerStatusStatus)
rsbpsStatus
  = lens _rsbpsStatus (\ s a -> s{_rsbpsStatus = a})

-- | IP address of the local BGP interface.
rsbpsIPAddress :: Lens' RouterStatusBGPPeerStatus (Maybe Text)
rsbpsIPAddress
  = lens _rsbpsIPAddress
      (\ s a -> s{_rsbpsIPAddress = a})

-- | BGP state as specified in RFC1771.
rsbpsState :: Lens' RouterStatusBGPPeerStatus (Maybe Text)
rsbpsState
  = lens _rsbpsState (\ s a -> s{_rsbpsState = a})

-- | IP address of the remote BGP interface.
rsbpsPeerIPAddress :: Lens' RouterStatusBGPPeerStatus (Maybe Text)
rsbpsPeerIPAddress
  = lens _rsbpsPeerIPAddress
      (\ s a -> s{_rsbpsPeerIPAddress = a})

-- | Time this session has been up. Format: 14 years, 51 weeks, 6 days, 23
-- hours, 59 minutes, 59 seconds
rsbpsUptime :: Lens' RouterStatusBGPPeerStatus (Maybe Text)
rsbpsUptime
  = lens _rsbpsUptime (\ s a -> s{_rsbpsUptime = a})

-- | Number of routes learned from the remote BGP Peer.
rsbpsNumLearnedRoutes :: Lens' RouterStatusBGPPeerStatus (Maybe Word32)
rsbpsNumLearnedRoutes
  = lens _rsbpsNumLearnedRoutes
      (\ s a -> s{_rsbpsNumLearnedRoutes = a})
      . mapping _Coerce

-- | Name of this BGP peer. Unique within the Routers resource.
rsbpsName :: Lens' RouterStatusBGPPeerStatus (Maybe Text)
rsbpsName
  = lens _rsbpsName (\ s a -> s{_rsbpsName = a})

-- | Time this session has been up, in seconds. Format: 145
rsbpsUptimeSeconds :: Lens' RouterStatusBGPPeerStatus (Maybe Text)
rsbpsUptimeSeconds
  = lens _rsbpsUptimeSeconds
      (\ s a -> s{_rsbpsUptimeSeconds = a})

-- | Routes that were advertised to the remote BGP peer
rsbpsAdvertisedRoutes :: Lens' RouterStatusBGPPeerStatus [Route]
rsbpsAdvertisedRoutes
  = lens _rsbpsAdvertisedRoutes
      (\ s a -> s{_rsbpsAdvertisedRoutes = a})
      . _Default
      . _Coerce

-- | URL of the VPN tunnel that this BGP peer controls.
rsbpsLinkedVPNTunnel :: Lens' RouterStatusBGPPeerStatus (Maybe Text)
rsbpsLinkedVPNTunnel
  = lens _rsbpsLinkedVPNTunnel
      (\ s a -> s{_rsbpsLinkedVPNTunnel = a})

instance FromJSON RouterStatusBGPPeerStatus where
        parseJSON
          = withObject "RouterStatusBGPPeerStatus"
              (\ o ->
                 RouterStatusBGPPeerStatus' <$>
                   (o .:? "status") <*> (o .:? "ipAddress") <*>
                     (o .:? "state")
                     <*> (o .:? "peerIpAddress")
                     <*> (o .:? "uptime")
                     <*> (o .:? "numLearnedRoutes")
                     <*> (o .:? "name")
                     <*> (o .:? "uptimeSeconds")
                     <*> (o .:? "advertisedRoutes" .!= mempty)
                     <*> (o .:? "linkedVpnTunnel"))

instance ToJSON RouterStatusBGPPeerStatus where
        toJSON RouterStatusBGPPeerStatus'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _rsbpsStatus,
                  ("ipAddress" .=) <$> _rsbpsIPAddress,
                  ("state" .=) <$> _rsbpsState,
                  ("peerIpAddress" .=) <$> _rsbpsPeerIPAddress,
                  ("uptime" .=) <$> _rsbpsUptime,
                  ("numLearnedRoutes" .=) <$> _rsbpsNumLearnedRoutes,
                  ("name" .=) <$> _rsbpsName,
                  ("uptimeSeconds" .=) <$> _rsbpsUptimeSeconds,
                  ("advertisedRoutes" .=) <$> _rsbpsAdvertisedRoutes,
                  ("linkedVpnTunnel" .=) <$> _rsbpsLinkedVPNTunnel])

--
-- /See:/ 'urlMapReference' smart constructor.
newtype URLMapReference = URLMapReference'
    { _umrURLMap :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMapReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umrURLMap'
urlMapReference
    :: URLMapReference
urlMapReference =
    URLMapReference'
    { _umrURLMap = Nothing
    }

umrURLMap :: Lens' URLMapReference (Maybe Text)
umrURLMap
  = lens _umrURLMap (\ s a -> s{_umrURLMap = a})

instance FromJSON URLMapReference where
        parseJSON
          = withObject "URLMapReference"
              (\ o -> URLMapReference' <$> (o .:? "urlMap"))

instance ToJSON URLMapReference where
        toJSON URLMapReference'{..}
          = object (catMaybes [("urlMap" .=) <$> _umrURLMap])

--
-- /See:/ 'targetPoolsAddHealthCheckRequest' smart constructor.
newtype TargetPoolsAddHealthCheckRequest = TargetPoolsAddHealthCheckRequest'
    { _tpahcrHealthChecks :: Maybe [HealthCheckReference]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolsAddHealthCheckRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpahcrHealthChecks'
targetPoolsAddHealthCheckRequest
    :: TargetPoolsAddHealthCheckRequest
targetPoolsAddHealthCheckRequest =
    TargetPoolsAddHealthCheckRequest'
    { _tpahcrHealthChecks = Nothing
    }

-- | The HttpHealthCheck to add to the target pool.
tpahcrHealthChecks :: Lens' TargetPoolsAddHealthCheckRequest [HealthCheckReference]
tpahcrHealthChecks
  = lens _tpahcrHealthChecks
      (\ s a -> s{_tpahcrHealthChecks = a})
      . _Default
      . _Coerce

instance FromJSON TargetPoolsAddHealthCheckRequest
         where
        parseJSON
          = withObject "TargetPoolsAddHealthCheckRequest"
              (\ o ->
                 TargetPoolsAddHealthCheckRequest' <$>
                   (o .:? "healthChecks" .!= mempty))

instance ToJSON TargetPoolsAddHealthCheckRequest
         where
        toJSON TargetPoolsAddHealthCheckRequest'{..}
          = object
              (catMaybes
                 [("healthChecks" .=) <$> _tpahcrHealthChecks])

--
-- /See:/ 'commitmentsScopedList' smart constructor.
data CommitmentsScopedList = CommitmentsScopedList'
    { _cslWarning     :: !(Maybe CommitmentsScopedListWarning)
    , _cslCommitments :: !(Maybe [Commitment])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentsScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cslWarning'
--
-- * 'cslCommitments'
commitmentsScopedList
    :: CommitmentsScopedList
commitmentsScopedList =
    CommitmentsScopedList'
    { _cslWarning = Nothing
    , _cslCommitments = Nothing
    }

-- | [Output Only] Informational warning which replaces the list of
-- commitments when the list is empty.
cslWarning :: Lens' CommitmentsScopedList (Maybe CommitmentsScopedListWarning)
cslWarning
  = lens _cslWarning (\ s a -> s{_cslWarning = a})

-- | [Output Only] A list of commitments contained in this scope.
cslCommitments :: Lens' CommitmentsScopedList [Commitment]
cslCommitments
  = lens _cslCommitments
      (\ s a -> s{_cslCommitments = a})
      . _Default
      . _Coerce

instance FromJSON CommitmentsScopedList where
        parseJSON
          = withObject "CommitmentsScopedList"
              (\ o ->
                 CommitmentsScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "commitments" .!= mempty))

instance ToJSON CommitmentsScopedList where
        toJSON CommitmentsScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _cslWarning,
                  ("commitments" .=) <$> _cslCommitments])

-- | A list of DisksScopedList resources.
--
-- /See:/ 'diskAggregatedListItems' smart constructor.
newtype DiskAggregatedListItems = DiskAggregatedListItems'
    { _daliAddtional :: HashMap Text DisksScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'daliAddtional'
diskAggregatedListItems
    :: HashMap Text DisksScopedList -- ^ 'daliAddtional'
    -> DiskAggregatedListItems
diskAggregatedListItems pDaliAddtional_ =
    DiskAggregatedListItems'
    { _daliAddtional = _Coerce # pDaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of disks.
daliAddtional :: Lens' DiskAggregatedListItems (HashMap Text DisksScopedList)
daliAddtional
  = lens _daliAddtional
      (\ s a -> s{_daliAddtional = a})
      . _Coerce

instance FromJSON DiskAggregatedListItems where
        parseJSON
          = withObject "DiskAggregatedListItems"
              (\ o ->
                 DiskAggregatedListItems' <$> (parseJSONObject o))

instance ToJSON DiskAggregatedListItems where
        toJSON = toJSON . _daliAddtional

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetVPNGatewayAggregatedListWarning' smart constructor.
data TargetVPNGatewayAggregatedListWarning = TargetVPNGatewayAggregatedListWarning'
    { _tvgalwData    :: !(Maybe [TargetVPNGatewayAggregatedListWarningDataItem])
    , _tvgalwCode    :: !(Maybe TargetVPNGatewayAggregatedListWarningCode)
    , _tvgalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewayAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvgalwData'
--
-- * 'tvgalwCode'
--
-- * 'tvgalwMessage'
targetVPNGatewayAggregatedListWarning
    :: TargetVPNGatewayAggregatedListWarning
targetVPNGatewayAggregatedListWarning =
    TargetVPNGatewayAggregatedListWarning'
    { _tvgalwData = Nothing
    , _tvgalwCode = Nothing
    , _tvgalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tvgalwData :: Lens' TargetVPNGatewayAggregatedListWarning [TargetVPNGatewayAggregatedListWarningDataItem]
tvgalwData
  = lens _tvgalwData (\ s a -> s{_tvgalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tvgalwCode :: Lens' TargetVPNGatewayAggregatedListWarning (Maybe TargetVPNGatewayAggregatedListWarningCode)
tvgalwCode
  = lens _tvgalwCode (\ s a -> s{_tvgalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tvgalwMessage :: Lens' TargetVPNGatewayAggregatedListWarning (Maybe Text)
tvgalwMessage
  = lens _tvgalwMessage
      (\ s a -> s{_tvgalwMessage = a})

instance FromJSON
         TargetVPNGatewayAggregatedListWarning where
        parseJSON
          = withObject "TargetVPNGatewayAggregatedListWarning"
              (\ o ->
                 TargetVPNGatewayAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetVPNGatewayAggregatedListWarning
         where
        toJSON TargetVPNGatewayAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tvgalwData,
                  ("code" .=) <$> _tvgalwCode,
                  ("message" .=) <$> _tvgalwMessage])

-- | The location in Cloud Storage and naming method of the daily usage
-- report. Contains bucket_name and report_name prefix.
--
-- /See:/ 'usageExportLocation' smart constructor.
data UsageExportLocation = UsageExportLocation'
    { _uelReportNamePrefix :: !(Maybe Text)
    , _uelBucketName       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UsageExportLocation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'uelReportNamePrefix'
--
-- * 'uelBucketName'
usageExportLocation
    :: UsageExportLocation
usageExportLocation =
    UsageExportLocation'
    { _uelReportNamePrefix = Nothing
    , _uelBucketName = Nothing
    }

-- | An optional prefix for the name of the usage report object stored in
-- bucketName. If not supplied, defaults to usage. The report is stored as
-- a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is
-- the day of the usage according to Pacific Time. If you supply a prefix,
-- it should conform to Cloud Storage object naming conventions.
uelReportNamePrefix :: Lens' UsageExportLocation (Maybe Text)
uelReportNamePrefix
  = lens _uelReportNamePrefix
      (\ s a -> s{_uelReportNamePrefix = a})

-- | The name of an existing bucket in Cloud Storage where the usage report
-- object is stored. The Google Service Account is granted write access to
-- this bucket. This can either be the bucket name by itself, such as
-- example-bucket, or the bucket name with gs:\/\/ or
-- https:\/\/storage.googleapis.com\/ in front of it, such as
-- gs:\/\/example-bucket.
uelBucketName :: Lens' UsageExportLocation (Maybe Text)
uelBucketName
  = lens _uelBucketName
      (\ s a -> s{_uelBucketName = a})

instance FromJSON UsageExportLocation where
        parseJSON
          = withObject "UsageExportLocation"
              (\ o ->
                 UsageExportLocation' <$>
                   (o .:? "reportNamePrefix") <*> (o .:? "bucketName"))

instance ToJSON UsageExportLocation where
        toJSON UsageExportLocation'{..}
          = object
              (catMaybes
                 [("reportNamePrefix" .=) <$> _uelReportNamePrefix,
                  ("bucketName" .=) <$> _uelBucketName])

-- | Contains a list of zone resources.
--
-- /See:/ 'zoneList' smart constructor.
data ZoneList = ZoneList'
    { _zlNextPageToken :: !(Maybe Text)
    , _zlKind          :: !Text
    , _zlItems         :: !(Maybe [Zone])
    , _zlSelfLink      :: !(Maybe Text)
    , _zlWarning       :: !(Maybe ZoneListWarning)
    , _zlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ZoneList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zlNextPageToken'
--
-- * 'zlKind'
--
-- * 'zlItems'
--
-- * 'zlSelfLink'
--
-- * 'zlWarning'
--
-- * 'zlId'
zoneList
    :: ZoneList
zoneList =
    ZoneList'
    { _zlNextPageToken = Nothing
    , _zlKind = "compute#zoneList"
    , _zlItems = Nothing
    , _zlSelfLink = Nothing
    , _zlWarning = Nothing
    , _zlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
zlNextPageToken :: Lens' ZoneList (Maybe Text)
zlNextPageToken
  = lens _zlNextPageToken
      (\ s a -> s{_zlNextPageToken = a})

-- | Type of resource.
zlKind :: Lens' ZoneList Text
zlKind = lens _zlKind (\ s a -> s{_zlKind = a})

-- | A list of Zone resources.
zlItems :: Lens' ZoneList [Zone]
zlItems
  = lens _zlItems (\ s a -> s{_zlItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
zlSelfLink :: Lens' ZoneList (Maybe Text)
zlSelfLink
  = lens _zlSelfLink (\ s a -> s{_zlSelfLink = a})

-- | [Output Only] Informational warning message.
zlWarning :: Lens' ZoneList (Maybe ZoneListWarning)
zlWarning
  = lens _zlWarning (\ s a -> s{_zlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
zlId :: Lens' ZoneList (Maybe Text)
zlId = lens _zlId (\ s a -> s{_zlId = a})

instance FromJSON ZoneList where
        parseJSON
          = withObject "ZoneList"
              (\ o ->
                 ZoneList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#zoneList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON ZoneList where
        toJSON ZoneList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _zlNextPageToken,
                  Just ("kind" .= _zlKind), ("items" .=) <$> _zlItems,
                  ("selfLink" .=) <$> _zlSelfLink,
                  ("warning" .=) <$> _zlWarning, ("id" .=) <$> _zlId])

--
-- /See:/ 'sslCertificateListWarningDataItem' smart constructor.
data SSLCertificateListWarningDataItem = SSLCertificateListWarningDataItem'
    { _sclwdiValue :: !(Maybe Text)
    , _sclwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLCertificateListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sclwdiValue'
--
-- * 'sclwdiKey'
sslCertificateListWarningDataItem
    :: SSLCertificateListWarningDataItem
sslCertificateListWarningDataItem =
    SSLCertificateListWarningDataItem'
    { _sclwdiValue = Nothing
    , _sclwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
sclwdiValue :: Lens' SSLCertificateListWarningDataItem (Maybe Text)
sclwdiValue
  = lens _sclwdiValue (\ s a -> s{_sclwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
sclwdiKey :: Lens' SSLCertificateListWarningDataItem (Maybe Text)
sclwdiKey
  = lens _sclwdiKey (\ s a -> s{_sclwdiKey = a})

instance FromJSON SSLCertificateListWarningDataItem
         where
        parseJSON
          = withObject "SSLCertificateListWarningDataItem"
              (\ o ->
                 SSLCertificateListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON SSLCertificateListWarningDataItem
         where
        toJSON SSLCertificateListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _sclwdiValue,
                  ("key" .=) <$> _sclwdiKey])

--
-- /See:/ 'distributionPolicyZoneConfiguration' smart constructor.
newtype DistributionPolicyZoneConfiguration = DistributionPolicyZoneConfiguration'
    { _dpzcZone :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DistributionPolicyZoneConfiguration' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dpzcZone'
distributionPolicyZoneConfiguration
    :: DistributionPolicyZoneConfiguration
distributionPolicyZoneConfiguration =
    DistributionPolicyZoneConfiguration'
    { _dpzcZone = Nothing
    }

-- | The URL of the zone. The zone must exist in the region where the managed
-- instance group is located.
dpzcZone :: Lens' DistributionPolicyZoneConfiguration (Maybe Text)
dpzcZone = lens _dpzcZone (\ s a -> s{_dpzcZone = a})

instance FromJSON DistributionPolicyZoneConfiguration
         where
        parseJSON
          = withObject "DistributionPolicyZoneConfiguration"
              (\ o ->
                 DistributionPolicyZoneConfiguration' <$>
                   (o .:? "zone"))

instance ToJSON DistributionPolicyZoneConfiguration
         where
        toJSON DistributionPolicyZoneConfiguration'{..}
          = object (catMaybes [("zone" .=) <$> _dpzcZone])

--
-- /See:/ 'targetTCPProxiesSetProxyHeaderRequest' smart constructor.
newtype TargetTCPProxiesSetProxyHeaderRequest = TargetTCPProxiesSetProxyHeaderRequest'
    { _ttpsphrProxyHeader :: Maybe TargetTCPProxiesSetProxyHeaderRequestProxyHeader
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetTCPProxiesSetProxyHeaderRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ttpsphrProxyHeader'
targetTCPProxiesSetProxyHeaderRequest
    :: TargetTCPProxiesSetProxyHeaderRequest
targetTCPProxiesSetProxyHeaderRequest =
    TargetTCPProxiesSetProxyHeaderRequest'
    { _ttpsphrProxyHeader = Nothing
    }

-- | The new type of proxy header to append before sending data to the
-- backend. NONE or PROXY_V1 are allowed.
ttpsphrProxyHeader :: Lens' TargetTCPProxiesSetProxyHeaderRequest (Maybe TargetTCPProxiesSetProxyHeaderRequestProxyHeader)
ttpsphrProxyHeader
  = lens _ttpsphrProxyHeader
      (\ s a -> s{_ttpsphrProxyHeader = a})

instance FromJSON
         TargetTCPProxiesSetProxyHeaderRequest where
        parseJSON
          = withObject "TargetTCPProxiesSetProxyHeaderRequest"
              (\ o ->
                 TargetTCPProxiesSetProxyHeaderRequest' <$>
                   (o .:? "proxyHeader"))

instance ToJSON TargetTCPProxiesSetProxyHeaderRequest
         where
        toJSON TargetTCPProxiesSetProxyHeaderRequest'{..}
          = object
              (catMaybes
                 [("proxyHeader" .=) <$> _ttpsphrProxyHeader])

--
-- /See:/ 'routerBGPPeer' smart constructor.
data RouterBGPPeer = RouterBGPPeer'
    { _rbpIPAddress               :: !(Maybe Text)
    , _rbpInterfaceName           :: !(Maybe Text)
    , _rbpPeerIPAddress           :: !(Maybe Text)
    , _rbpAdvertisedRoutePriority :: !(Maybe (Textual Word32))
    , _rbpPeerASN                 :: !(Maybe (Textual Word32))
    , _rbpAdvertiseMode           :: !(Maybe RouterBGPPeerAdvertiseMode)
    , _rbpName                    :: !(Maybe Text)
    , _rbpAdvertisedGroups        :: !(Maybe [RouterBGPPeerAdvertisedGroupsItem])
    , _rbpManagementType          :: !(Maybe RouterBGPPeerManagementType)
    , _rbpAdvertisedIPRanges      :: !(Maybe [RouterAdvertisedIPRange])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterBGPPeer' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rbpIPAddress'
--
-- * 'rbpInterfaceName'
--
-- * 'rbpPeerIPAddress'
--
-- * 'rbpAdvertisedRoutePriority'
--
-- * 'rbpPeerASN'
--
-- * 'rbpAdvertiseMode'
--
-- * 'rbpName'
--
-- * 'rbpAdvertisedGroups'
--
-- * 'rbpManagementType'
--
-- * 'rbpAdvertisedIPRanges'
routerBGPPeer
    :: RouterBGPPeer
routerBGPPeer =
    RouterBGPPeer'
    { _rbpIPAddress = Nothing
    , _rbpInterfaceName = Nothing
    , _rbpPeerIPAddress = Nothing
    , _rbpAdvertisedRoutePriority = Nothing
    , _rbpPeerASN = Nothing
    , _rbpAdvertiseMode = Nothing
    , _rbpName = Nothing
    , _rbpAdvertisedGroups = Nothing
    , _rbpManagementType = Nothing
    , _rbpAdvertisedIPRanges = Nothing
    }

-- | IP address of the interface inside Google Cloud Platform. Only IPv4 is
-- supported.
rbpIPAddress :: Lens' RouterBGPPeer (Maybe Text)
rbpIPAddress
  = lens _rbpIPAddress (\ s a -> s{_rbpIPAddress = a})

-- | Name of the interface the BGP peer is associated with.
rbpInterfaceName :: Lens' RouterBGPPeer (Maybe Text)
rbpInterfaceName
  = lens _rbpInterfaceName
      (\ s a -> s{_rbpInterfaceName = a})

-- | IP address of the BGP interface outside Google cloud. Only IPv4 is
-- supported.
rbpPeerIPAddress :: Lens' RouterBGPPeer (Maybe Text)
rbpPeerIPAddress
  = lens _rbpPeerIPAddress
      (\ s a -> s{_rbpPeerIPAddress = a})

-- | The priority of routes advertised to this BGP peer. In the case where
-- there is more than one matching route of maximum length, the routes with
-- lowest priority value win.
rbpAdvertisedRoutePriority :: Lens' RouterBGPPeer (Maybe Word32)
rbpAdvertisedRoutePriority
  = lens _rbpAdvertisedRoutePriority
      (\ s a -> s{_rbpAdvertisedRoutePriority = a})
      . mapping _Coerce

-- | Peer BGP Autonomous System Number (ASN). For VPN use case, this value
-- can be different for every tunnel.
rbpPeerASN :: Lens' RouterBGPPeer (Maybe Word32)
rbpPeerASN
  = lens _rbpPeerASN (\ s a -> s{_rbpPeerASN = a}) .
      mapping _Coerce

-- | User-specified flag to indicate which mode to use for advertisement.
rbpAdvertiseMode :: Lens' RouterBGPPeer (Maybe RouterBGPPeerAdvertiseMode)
rbpAdvertiseMode
  = lens _rbpAdvertiseMode
      (\ s a -> s{_rbpAdvertiseMode = a})

-- | Name of this BGP peer. The name must be 1-63 characters long and comply
-- with RFC1035.
rbpName :: Lens' RouterBGPPeer (Maybe Text)
rbpName = lens _rbpName (\ s a -> s{_rbpName = a})

-- | User-specified list of prefix groups to advertise in custom mode. This
-- field can only be populated if advertise_mode is CUSTOM and overrides
-- the list defined for the router (in Bgp message). These groups will be
-- advertised in addition to any specified prefixes. Leave this field blank
-- to advertise no custom groups.
rbpAdvertisedGroups :: Lens' RouterBGPPeer [RouterBGPPeerAdvertisedGroupsItem]
rbpAdvertisedGroups
  = lens _rbpAdvertisedGroups
      (\ s a -> s{_rbpAdvertisedGroups = a})
      . _Default
      . _Coerce

-- | [Output Only] The resource that configures and manages this BGP peer.
-- MANAGED_BY_USER is the default value and can be managed by you or other
-- users; MANAGED_BY_ATTACHMENT is a BGP peer that is configured and
-- managed by Cloud Interconnect, specifically by an InterconnectAttachment
-- of type PARTNER. Google will automatically create, update, and delete
-- this type of BGP peer when the PARTNER InterconnectAttachment is
-- created, updated, or deleted.
rbpManagementType :: Lens' RouterBGPPeer (Maybe RouterBGPPeerManagementType)
rbpManagementType
  = lens _rbpManagementType
      (\ s a -> s{_rbpManagementType = a})

-- | User-specified list of individual IP ranges to advertise in custom mode.
-- This field can only be populated if advertise_mode is CUSTOM and
-- overrides the list defined for the router (in Bgp message). These IP
-- ranges will be advertised in addition to any specified groups. Leave
-- this field blank to advertise no custom IP ranges.
rbpAdvertisedIPRanges :: Lens' RouterBGPPeer [RouterAdvertisedIPRange]
rbpAdvertisedIPRanges
  = lens _rbpAdvertisedIPRanges
      (\ s a -> s{_rbpAdvertisedIPRanges = a})
      . _Default
      . _Coerce

instance FromJSON RouterBGPPeer where
        parseJSON
          = withObject "RouterBGPPeer"
              (\ o ->
                 RouterBGPPeer' <$>
                   (o .:? "ipAddress") <*> (o .:? "interfaceName") <*>
                     (o .:? "peerIpAddress")
                     <*> (o .:? "advertisedRoutePriority")
                     <*> (o .:? "peerAsn")
                     <*> (o .:? "advertiseMode")
                     <*> (o .:? "name")
                     <*> (o .:? "advertisedGroups" .!= mempty)
                     <*> (o .:? "managementType")
                     <*> (o .:? "advertisedIpRanges" .!= mempty))

instance ToJSON RouterBGPPeer where
        toJSON RouterBGPPeer'{..}
          = object
              (catMaybes
                 [("ipAddress" .=) <$> _rbpIPAddress,
                  ("interfaceName" .=) <$> _rbpInterfaceName,
                  ("peerIpAddress" .=) <$> _rbpPeerIPAddress,
                  ("advertisedRoutePriority" .=) <$>
                    _rbpAdvertisedRoutePriority,
                  ("peerAsn" .=) <$> _rbpPeerASN,
                  ("advertiseMode" .=) <$> _rbpAdvertiseMode,
                  ("name" .=) <$> _rbpName,
                  ("advertisedGroups" .=) <$> _rbpAdvertisedGroups,
                  ("managementType" .=) <$> _rbpManagementType,
                  ("advertisedIpRanges" .=) <$>
                    _rbpAdvertisedIPRanges])

--
-- /See:/ 'subnetworksExpandIPCIdRRangeRequest' smart constructor.
newtype SubnetworksExpandIPCIdRRangeRequest = SubnetworksExpandIPCIdRRangeRequest'
    { _seicirrrIPCIdRRange :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworksExpandIPCIdRRangeRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'seicirrrIPCIdRRange'
subnetworksExpandIPCIdRRangeRequest
    :: SubnetworksExpandIPCIdRRangeRequest
subnetworksExpandIPCIdRRangeRequest =
    SubnetworksExpandIPCIdRRangeRequest'
    { _seicirrrIPCIdRRange = Nothing
    }

-- | The IP (in CIDR format or netmask) of internal addresses that are legal
-- on this Subnetwork. This range should be disjoint from other subnetworks
-- within this network. This range can only be larger than (i.e. a superset
-- of) the range previously defined before the update.
seicirrrIPCIdRRange :: Lens' SubnetworksExpandIPCIdRRangeRequest (Maybe Text)
seicirrrIPCIdRRange
  = lens _seicirrrIPCIdRRange
      (\ s a -> s{_seicirrrIPCIdRRange = a})

instance FromJSON SubnetworksExpandIPCIdRRangeRequest
         where
        parseJSON
          = withObject "SubnetworksExpandIPCIdRRangeRequest"
              (\ o ->
                 SubnetworksExpandIPCIdRRangeRequest' <$>
                   (o .:? "ipCidrRange"))

instance ToJSON SubnetworksExpandIPCIdRRangeRequest
         where
        toJSON SubnetworksExpandIPCIdRRangeRequest'{..}
          = object
              (catMaybes
                 [("ipCidrRange" .=) <$> _seicirrrIPCIdRRange])

-- | A Managed Instance resource.
--
-- /See:/ 'managedInstance' smart constructor.
data ManagedInstance = ManagedInstance'
    { _miLastAttempt    :: !(Maybe ManagedInstanceLastAttempt)
    , _miCurrentAction  :: !(Maybe ManagedInstanceCurrentAction)
    , _miId             :: !(Maybe (Textual Word64))
    , _miInstanceStatus :: !(Maybe ManagedInstanceInstanceStatus)
    , _miInstance       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ManagedInstance' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'miLastAttempt'
--
-- * 'miCurrentAction'
--
-- * 'miId'
--
-- * 'miInstanceStatus'
--
-- * 'miInstance'
managedInstance
    :: ManagedInstance
managedInstance =
    ManagedInstance'
    { _miLastAttempt = Nothing
    , _miCurrentAction = Nothing
    , _miId = Nothing
    , _miInstanceStatus = Nothing
    , _miInstance = Nothing
    }

-- | [Output Only] Information about the last attempt to create or delete the
-- instance.
miLastAttempt :: Lens' ManagedInstance (Maybe ManagedInstanceLastAttempt)
miLastAttempt
  = lens _miLastAttempt
      (\ s a -> s{_miLastAttempt = a})

-- | [Output Only] The current action that the managed instance group has
-- scheduled for the instance. Possible values: - NONE The instance is
-- running, and the managed instance group does not have any scheduled
-- actions for this instance. - CREATING The managed instance group is
-- creating this instance. If the group fails to create this instance, it
-- will try again until it is successful. - CREATING_WITHOUT_RETRIES The
-- managed instance group is attempting to create this instance only once.
-- If the group fails to create this instance, it does not try again and
-- the group\'s targetSize value is decreased instead. - RECREATING The
-- managed instance group is recreating this instance. - DELETING The
-- managed instance group is permanently deleting this instance. -
-- ABANDONING The managed instance group is abandoning this instance. The
-- instance will be removed from the instance group and from any target
-- pools that are associated with this group. - RESTARTING The managed
-- instance group is restarting the instance. - REFRESHING The managed
-- instance group is applying configuration changes to the instance without
-- stopping it. For example, the group can update the target pool list for
-- an instance without stopping that instance. - VERIFYING The managed
-- instance group has created the instance and it is in the process of
-- being verified.
miCurrentAction :: Lens' ManagedInstance (Maybe ManagedInstanceCurrentAction)
miCurrentAction
  = lens _miCurrentAction
      (\ s a -> s{_miCurrentAction = a})

-- | [Output only] The unique identifier for this resource. This field is
-- empty when instance does not exist.
miId :: Lens' ManagedInstance (Maybe Word64)
miId
  = lens _miId (\ s a -> s{_miId = a}) .
      mapping _Coerce

-- | [Output Only] The status of the instance. This field is empty when the
-- instance does not exist.
miInstanceStatus :: Lens' ManagedInstance (Maybe ManagedInstanceInstanceStatus)
miInstanceStatus
  = lens _miInstanceStatus
      (\ s a -> s{_miInstanceStatus = a})

-- | [Output Only] The URL of the instance. The URL can exist even if the
-- instance has not yet been created.
miInstance :: Lens' ManagedInstance (Maybe Text)
miInstance
  = lens _miInstance (\ s a -> s{_miInstance = a})

instance FromJSON ManagedInstance where
        parseJSON
          = withObject "ManagedInstance"
              (\ o ->
                 ManagedInstance' <$>
                   (o .:? "lastAttempt") <*> (o .:? "currentAction") <*>
                     (o .:? "id")
                     <*> (o .:? "instanceStatus")
                     <*> (o .:? "instance"))

instance ToJSON ManagedInstance where
        toJSON ManagedInstance'{..}
          = object
              (catMaybes
                 [("lastAttempt" .=) <$> _miLastAttempt,
                  ("currentAction" .=) <$> _miCurrentAction,
                  ("id" .=) <$> _miId,
                  ("instanceStatus" .=) <$> _miInstanceStatus,
                  ("instance" .=) <$> _miInstance])

-- | A list of InstanceGroupManagersScopedList resources.
--
-- /See:/ 'instanceGroupManagerAggregatedListItems' smart constructor.
newtype InstanceGroupManagerAggregatedListItems = InstanceGroupManagerAggregatedListItems'
    { _igmaliAddtional :: HashMap Text InstanceGroupManagersScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagerAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmaliAddtional'
instanceGroupManagerAggregatedListItems
    :: HashMap Text InstanceGroupManagersScopedList -- ^ 'igmaliAddtional'
    -> InstanceGroupManagerAggregatedListItems
instanceGroupManagerAggregatedListItems pIgmaliAddtional_ =
    InstanceGroupManagerAggregatedListItems'
    { _igmaliAddtional = _Coerce # pIgmaliAddtional_
    }

-- | [Output Only] The name of the scope that contains this set of managed
-- instance groups.
igmaliAddtional :: Lens' InstanceGroupManagerAggregatedListItems (HashMap Text InstanceGroupManagersScopedList)
igmaliAddtional
  = lens _igmaliAddtional
      (\ s a -> s{_igmaliAddtional = a})
      . _Coerce

instance FromJSON
         InstanceGroupManagerAggregatedListItems where
        parseJSON
          = withObject
              "InstanceGroupManagerAggregatedListItems"
              (\ o ->
                 InstanceGroupManagerAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON
         InstanceGroupManagerAggregatedListItems where
        toJSON = toJSON . _igmaliAddtional

--
-- /See:/ 'instanceGroupManagersDeleteInstancesRequest' smart constructor.
newtype InstanceGroupManagersDeleteInstancesRequest = InstanceGroupManagersDeleteInstancesRequest'
    { _igmdirInstances :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersDeleteInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmdirInstances'
instanceGroupManagersDeleteInstancesRequest
    :: InstanceGroupManagersDeleteInstancesRequest
instanceGroupManagersDeleteInstancesRequest =
    InstanceGroupManagersDeleteInstancesRequest'
    { _igmdirInstances = Nothing
    }

-- | The URLs of one or more instances to delete. This can be a full URL or a
-- partial URL, such as zones\/[ZONE]\/instances\/[INSTANCE_NAME].
igmdirInstances :: Lens' InstanceGroupManagersDeleteInstancesRequest [Text]
igmdirInstances
  = lens _igmdirInstances
      (\ s a -> s{_igmdirInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         InstanceGroupManagersDeleteInstancesRequest where
        parseJSON
          = withObject
              "InstanceGroupManagersDeleteInstancesRequest"
              (\ o ->
                 InstanceGroupManagersDeleteInstancesRequest' <$>
                   (o .:? "instances" .!= mempty))

instance ToJSON
         InstanceGroupManagersDeleteInstancesRequest where
        toJSON
          InstanceGroupManagersDeleteInstancesRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _igmdirInstances])

-- | Message containing information of one individual backend.
--
-- /See:/ 'backend' smart constructor.
data Backend = Backend'
    { _bGroup                     :: !(Maybe Text)
    , _bBalancingMode             :: !(Maybe BackendBalancingMode)
    , _bMaxUtilization            :: !(Maybe (Textual Double))
    , _bMaxRate                   :: !(Maybe (Textual Int32))
    , _bMaxConnections            :: !(Maybe (Textual Int32))
    , _bMaxConnectionsPerInstance :: !(Maybe (Textual Int32))
    , _bMaxRatePerInstance        :: !(Maybe (Textual Double))
    , _bDescription               :: !(Maybe Text)
    , _bCapacityScaler            :: !(Maybe (Textual Double))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Backend' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bGroup'
--
-- * 'bBalancingMode'
--
-- * 'bMaxUtilization'
--
-- * 'bMaxRate'
--
-- * 'bMaxConnections'
--
-- * 'bMaxConnectionsPerInstance'
--
-- * 'bMaxRatePerInstance'
--
-- * 'bDescription'
--
-- * 'bCapacityScaler'
backend
    :: Backend
backend =
    Backend'
    { _bGroup = Nothing
    , _bBalancingMode = Nothing
    , _bMaxUtilization = Nothing
    , _bMaxRate = Nothing
    , _bMaxConnections = Nothing
    , _bMaxConnectionsPerInstance = Nothing
    , _bMaxRatePerInstance = Nothing
    , _bDescription = Nothing
    , _bCapacityScaler = Nothing
    }

-- | The fully-qualified URL of an Instance Group or Network Endpoint Group
-- resource. In case of instance group this defines the list of instances
-- that serve traffic. Member virtual machine instances from each instance
-- group must live in the same zone as the instance group itself. No two
-- backends in a backend service are allowed to use same Instance Group
-- resource. For Network Endpoint Groups this defines list of endpoints.
-- All endpoints of Network Endpoint Group must be hosted on instances
-- located in the same zone as the Network Endpoint Group. Backend service
-- can not contain mix of Instance Group and Network Endpoint Group
-- backends. Note that you must specify an Instance Group or Network
-- Endpoint Group resource using the fully-qualified URL, rather than a
-- partial URL. When the BackendService has load balancing scheme INTERNAL,
-- the instance group must be within the same region as the BackendService.
-- Network Endpoint Groups are not supported for INTERNAL load balancing
-- scheme.
bGroup :: Lens' Backend (Maybe Text)
bGroup = lens _bGroup (\ s a -> s{_bGroup = a})

-- | Specifies the balancing mode for this backend. For global HTTP(S) or
-- TCP\/SSL load balancing, the default is UTILIZATION. Valid values are
-- UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP\/SSL). For
-- Internal Load Balancing, the default and only supported mode is
-- CONNECTION.
bBalancingMode :: Lens' Backend (Maybe BackendBalancingMode)
bBalancingMode
  = lens _bBalancingMode
      (\ s a -> s{_bBalancingMode = a})

-- | Used when balancingMode is UTILIZATION. This ratio defines the CPU
-- utilization target for the group. The default is 0.8. Valid range is
-- [0.0, 1.0]. This cannot be used for internal load balancing.
bMaxUtilization :: Lens' Backend (Maybe Double)
bMaxUtilization
  = lens _bMaxUtilization
      (\ s a -> s{_bMaxUtilization = a})
      . mapping _Coerce

-- | The max requests per second (RPS) of the group. Can be used with either
-- RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE
-- mode, either maxRate or maxRatePerInstance must be set. This cannot be
-- used for internal load balancing.
bMaxRate :: Lens' Backend (Maybe Int32)
bMaxRate
  = lens _bMaxRate (\ s a -> s{_bMaxRate = a}) .
      mapping _Coerce

-- | The max number of simultaneous connections for the group. Can be used
-- with either CONNECTION or UTILIZATION balancing modes. For CONNECTION
-- mode, either maxConnections or maxConnectionsPerInstance must be set.
-- This cannot be used for internal load balancing.
bMaxConnections :: Lens' Backend (Maybe Int32)
bMaxConnections
  = lens _bMaxConnections
      (\ s a -> s{_bMaxConnections = a})
      . mapping _Coerce

-- | The max number of simultaneous connections that a single backend
-- instance can handle. This is used to calculate the capacity of the
-- group. Can be used in either CONNECTION or UTILIZATION balancing modes.
-- For CONNECTION mode, either maxConnections or maxConnectionsPerInstance
-- must be set. This cannot be used for internal load balancing.
bMaxConnectionsPerInstance :: Lens' Backend (Maybe Int32)
bMaxConnectionsPerInstance
  = lens _bMaxConnectionsPerInstance
      (\ s a -> s{_bMaxConnectionsPerInstance = a})
      . mapping _Coerce

-- | The max requests per second (RPS) that a single backend instance can
-- handle. This is used to calculate the capacity of the group. Can be used
-- in either balancing mode. For RATE mode, either maxRate or
-- maxRatePerInstance must be set. This cannot be used for internal load
-- balancing.
bMaxRatePerInstance :: Lens' Backend (Maybe Double)
bMaxRatePerInstance
  = lens _bMaxRatePerInstance
      (\ s a -> s{_bMaxRatePerInstance = a})
      . mapping _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
bDescription :: Lens' Backend (Maybe Text)
bDescription
  = lens _bDescription (\ s a -> s{_bDescription = a})

-- | A multiplier applied to the group\'s maximum servicing capacity (based
-- on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the
-- group will serve up to 100% of its configured capacity (depending on
-- balancingMode). A setting of 0 means the group is completely drained,
-- offering 0% of its available Capacity. Valid range is [0.0,1.0]. This
-- cannot be used for internal load balancing.
bCapacityScaler :: Lens' Backend (Maybe Double)
bCapacityScaler
  = lens _bCapacityScaler
      (\ s a -> s{_bCapacityScaler = a})
      . mapping _Coerce

instance FromJSON Backend where
        parseJSON
          = withObject "Backend"
              (\ o ->
                 Backend' <$>
                   (o .:? "group") <*> (o .:? "balancingMode") <*>
                     (o .:? "maxUtilization")
                     <*> (o .:? "maxRate")
                     <*> (o .:? "maxConnections")
                     <*> (o .:? "maxConnectionsPerInstance")
                     <*> (o .:? "maxRatePerInstance")
                     <*> (o .:? "description")
                     <*> (o .:? "capacityScaler"))

instance ToJSON Backend where
        toJSON Backend'{..}
          = object
              (catMaybes
                 [("group" .=) <$> _bGroup,
                  ("balancingMode" .=) <$> _bBalancingMode,
                  ("maxUtilization" .=) <$> _bMaxUtilization,
                  ("maxRate" .=) <$> _bMaxRate,
                  ("maxConnections" .=) <$> _bMaxConnections,
                  ("maxConnectionsPerInstance" .=) <$>
                    _bMaxConnectionsPerInstance,
                  ("maxRatePerInstance" .=) <$> _bMaxRatePerInstance,
                  ("description" .=) <$> _bDescription,
                  ("capacityScaler" .=) <$> _bCapacityScaler])

-- | [Output Only] Informational warning which replaces the list of addresses
-- when the list is empty.
--
-- /See:/ 'targetVPNGatewaysScopedListWarning' smart constructor.
data TargetVPNGatewaysScopedListWarning = TargetVPNGatewaysScopedListWarning'
    { _tvgslwData    :: !(Maybe [TargetVPNGatewaysScopedListWarningDataItem])
    , _tvgslwCode    :: !(Maybe TargetVPNGatewaysScopedListWarningCode)
    , _tvgslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewaysScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvgslwData'
--
-- * 'tvgslwCode'
--
-- * 'tvgslwMessage'
targetVPNGatewaysScopedListWarning
    :: TargetVPNGatewaysScopedListWarning
targetVPNGatewaysScopedListWarning =
    TargetVPNGatewaysScopedListWarning'
    { _tvgslwData = Nothing
    , _tvgslwCode = Nothing
    , _tvgslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tvgslwData :: Lens' TargetVPNGatewaysScopedListWarning [TargetVPNGatewaysScopedListWarningDataItem]
tvgslwData
  = lens _tvgslwData (\ s a -> s{_tvgslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tvgslwCode :: Lens' TargetVPNGatewaysScopedListWarning (Maybe TargetVPNGatewaysScopedListWarningCode)
tvgslwCode
  = lens _tvgslwCode (\ s a -> s{_tvgslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tvgslwMessage :: Lens' TargetVPNGatewaysScopedListWarning (Maybe Text)
tvgslwMessage
  = lens _tvgslwMessage
      (\ s a -> s{_tvgslwMessage = a})

instance FromJSON TargetVPNGatewaysScopedListWarning
         where
        parseJSON
          = withObject "TargetVPNGatewaysScopedListWarning"
              (\ o ->
                 TargetVPNGatewaysScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetVPNGatewaysScopedListWarning
         where
        toJSON TargetVPNGatewaysScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tvgslwData,
                  ("code" .=) <$> _tvgslwCode,
                  ("message" .=) <$> _tvgslwMessage])

-- | Contains a list of addresses.
--
-- /See:/ 'addressList' smart constructor.
data AddressList = AddressList'
    { _alNextPageToken :: !(Maybe Text)
    , _alKind          :: !Text
    , _alItems         :: !(Maybe [Address])
    , _alSelfLink      :: !(Maybe Text)
    , _alWarning       :: !(Maybe AddressListWarning)
    , _alId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'alNextPageToken'
--
-- * 'alKind'
--
-- * 'alItems'
--
-- * 'alSelfLink'
--
-- * 'alWarning'
--
-- * 'alId'
addressList
    :: AddressList
addressList =
    AddressList'
    { _alNextPageToken = Nothing
    , _alKind = "compute#addressList"
    , _alItems = Nothing
    , _alSelfLink = Nothing
    , _alWarning = Nothing
    , _alId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
alNextPageToken :: Lens' AddressList (Maybe Text)
alNextPageToken
  = lens _alNextPageToken
      (\ s a -> s{_alNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#addressList for lists of
-- addresses.
alKind :: Lens' AddressList Text
alKind = lens _alKind (\ s a -> s{_alKind = a})

-- | A list of Address resources.
alItems :: Lens' AddressList [Address]
alItems
  = lens _alItems (\ s a -> s{_alItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
alSelfLink :: Lens' AddressList (Maybe Text)
alSelfLink
  = lens _alSelfLink (\ s a -> s{_alSelfLink = a})

-- | [Output Only] Informational warning message.
alWarning :: Lens' AddressList (Maybe AddressListWarning)
alWarning
  = lens _alWarning (\ s a -> s{_alWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
alId :: Lens' AddressList (Maybe Text)
alId = lens _alId (\ s a -> s{_alId = a})

instance FromJSON AddressList where
        parseJSON
          = withObject "AddressList"
              (\ o ->
                 AddressList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#addressList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON AddressList where
        toJSON AddressList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _alNextPageToken,
                  Just ("kind" .= _alKind), ("items" .=) <$> _alItems,
                  ("selfLink" .=) <$> _alSelfLink,
                  ("warning" .=) <$> _alWarning, ("id" .=) <$> _alId])

--
-- /See:/ 'targetVPNGatewayListWarningDataItem' smart constructor.
data TargetVPNGatewayListWarningDataItem = TargetVPNGatewayListWarningDataItem'
    { _tvglwdiValue :: !(Maybe Text)
    , _tvglwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewayListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvglwdiValue'
--
-- * 'tvglwdiKey'
targetVPNGatewayListWarningDataItem
    :: TargetVPNGatewayListWarningDataItem
targetVPNGatewayListWarningDataItem =
    TargetVPNGatewayListWarningDataItem'
    { _tvglwdiValue = Nothing
    , _tvglwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tvglwdiValue :: Lens' TargetVPNGatewayListWarningDataItem (Maybe Text)
tvglwdiValue
  = lens _tvglwdiValue (\ s a -> s{_tvglwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tvglwdiKey :: Lens' TargetVPNGatewayListWarningDataItem (Maybe Text)
tvglwdiKey
  = lens _tvglwdiKey (\ s a -> s{_tvglwdiKey = a})

instance FromJSON TargetVPNGatewayListWarningDataItem
         where
        parseJSON
          = withObject "TargetVPNGatewayListWarningDataItem"
              (\ o ->
                 TargetVPNGatewayListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON TargetVPNGatewayListWarningDataItem
         where
        toJSON TargetVPNGatewayListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tvglwdiValue,
                  ("key" .=) <$> _tvglwdiKey])

-- | A list of ForwardingRulesScopedList resources.
--
-- /See:/ 'forwardingRuleAggregatedListItems' smart constructor.
newtype ForwardingRuleAggregatedListItems = ForwardingRuleAggregatedListItems'
    { _fraliAddtional :: HashMap Text ForwardingRulesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRuleAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fraliAddtional'
forwardingRuleAggregatedListItems
    :: HashMap Text ForwardingRulesScopedList -- ^ 'fraliAddtional'
    -> ForwardingRuleAggregatedListItems
forwardingRuleAggregatedListItems pFraliAddtional_ =
    ForwardingRuleAggregatedListItems'
    { _fraliAddtional = _Coerce # pFraliAddtional_
    }

-- | Name of the scope containing this set of addresses.
fraliAddtional :: Lens' ForwardingRuleAggregatedListItems (HashMap Text ForwardingRulesScopedList)
fraliAddtional
  = lens _fraliAddtional
      (\ s a -> s{_fraliAddtional = a})
      . _Coerce

instance FromJSON ForwardingRuleAggregatedListItems
         where
        parseJSON
          = withObject "ForwardingRuleAggregatedListItems"
              (\ o ->
                 ForwardingRuleAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON ForwardingRuleAggregatedListItems
         where
        toJSON = toJSON . _fraliAddtional

--
-- /See:/ 'interconnectAttachmentAggregatedList' smart constructor.
data InterconnectAttachmentAggregatedList = InterconnectAttachmentAggregatedList'
    { _iaalNextPageToken :: !(Maybe Text)
    , _iaalKind          :: !Text
    , _iaalItems         :: !(Maybe InterconnectAttachmentAggregatedListItems)
    , _iaalSelfLink      :: !(Maybe Text)
    , _iaalWarning       :: !(Maybe InterconnectAttachmentAggregatedListWarning)
    , _iaalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iaalNextPageToken'
--
-- * 'iaalKind'
--
-- * 'iaalItems'
--
-- * 'iaalSelfLink'
--
-- * 'iaalWarning'
--
-- * 'iaalId'
interconnectAttachmentAggregatedList
    :: InterconnectAttachmentAggregatedList
interconnectAttachmentAggregatedList =
    InterconnectAttachmentAggregatedList'
    { _iaalNextPageToken = Nothing
    , _iaalKind = "compute#interconnectAttachmentAggregatedList"
    , _iaalItems = Nothing
    , _iaalSelfLink = Nothing
    , _iaalWarning = Nothing
    , _iaalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
iaalNextPageToken :: Lens' InterconnectAttachmentAggregatedList (Maybe Text)
iaalNextPageToken
  = lens _iaalNextPageToken
      (\ s a -> s{_iaalNextPageToken = a})

-- | [Output Only] Type of resource. Always
-- compute#interconnectAttachmentAggregatedList for aggregated lists of
-- interconnect attachments.
iaalKind :: Lens' InterconnectAttachmentAggregatedList Text
iaalKind = lens _iaalKind (\ s a -> s{_iaalKind = a})

-- | A list of InterconnectAttachmentsScopedList resources.
iaalItems :: Lens' InterconnectAttachmentAggregatedList (Maybe InterconnectAttachmentAggregatedListItems)
iaalItems
  = lens _iaalItems (\ s a -> s{_iaalItems = a})

-- | [Output Only] Server-defined URL for this resource.
iaalSelfLink :: Lens' InterconnectAttachmentAggregatedList (Maybe Text)
iaalSelfLink
  = lens _iaalSelfLink (\ s a -> s{_iaalSelfLink = a})

-- | [Output Only] Informational warning message.
iaalWarning :: Lens' InterconnectAttachmentAggregatedList (Maybe InterconnectAttachmentAggregatedListWarning)
iaalWarning
  = lens _iaalWarning (\ s a -> s{_iaalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
iaalId :: Lens' InterconnectAttachmentAggregatedList (Maybe Text)
iaalId = lens _iaalId (\ s a -> s{_iaalId = a})

instance FromJSON
         InterconnectAttachmentAggregatedList where
        parseJSON
          = withObject "InterconnectAttachmentAggregatedList"
              (\ o ->
                 InterconnectAttachmentAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#interconnectAttachmentAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InterconnectAttachmentAggregatedList
         where
        toJSON InterconnectAttachmentAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _iaalNextPageToken,
                  Just ("kind" .= _iaalKind),
                  ("items" .=) <$> _iaalItems,
                  ("selfLink" .=) <$> _iaalSelfLink,
                  ("warning" .=) <$> _iaalWarning,
                  ("id" .=) <$> _iaalId])

-- | [Output Only] A map of scoped operation lists.
--
-- /See:/ 'operationAggregatedListItems' smart constructor.
newtype OperationAggregatedListItems = OperationAggregatedListItems'
    { _oaliAddtional :: HashMap Text OperationsScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oaliAddtional'
operationAggregatedListItems
    :: HashMap Text OperationsScopedList -- ^ 'oaliAddtional'
    -> OperationAggregatedListItems
operationAggregatedListItems pOaliAddtional_ =
    OperationAggregatedListItems'
    { _oaliAddtional = _Coerce # pOaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of operations.
oaliAddtional :: Lens' OperationAggregatedListItems (HashMap Text OperationsScopedList)
oaliAddtional
  = lens _oaliAddtional
      (\ s a -> s{_oaliAddtional = a})
      . _Coerce

instance FromJSON OperationAggregatedListItems where
        parseJSON
          = withObject "OperationAggregatedListItems"
              (\ o ->
                 OperationAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON OperationAggregatedListItems where
        toJSON = toJSON . _oaliAddtional

--
-- /See:/ 'instanceGroupManagerActionsSummary' smart constructor.
data InstanceGroupManagerActionsSummary = InstanceGroupManagerActionsSummary'
    { _igmasDeleting               :: !(Maybe (Textual Int32))
    , _igmasRestarting             :: !(Maybe (Textual Int32))
    , _igmasNone                   :: !(Maybe (Textual Int32))
    , _igmasCreating               :: !(Maybe (Textual Int32))
    , _igmasVerifying              :: !(Maybe (Textual Int32))
    , _igmasRefreshing             :: !(Maybe (Textual Int32))
    , _igmasCreatingWithoutRetries :: !(Maybe (Textual Int32))
    , _igmasRecreating             :: !(Maybe (Textual Int32))
    , _igmasAbandoning             :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagerActionsSummary' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmasDeleting'
--
-- * 'igmasRestarting'
--
-- * 'igmasNone'
--
-- * 'igmasCreating'
--
-- * 'igmasVerifying'
--
-- * 'igmasRefreshing'
--
-- * 'igmasCreatingWithoutRetries'
--
-- * 'igmasRecreating'
--
-- * 'igmasAbandoning'
instanceGroupManagerActionsSummary
    :: InstanceGroupManagerActionsSummary
instanceGroupManagerActionsSummary =
    InstanceGroupManagerActionsSummary'
    { _igmasDeleting = Nothing
    , _igmasRestarting = Nothing
    , _igmasNone = Nothing
    , _igmasCreating = Nothing
    , _igmasVerifying = Nothing
    , _igmasRefreshing = Nothing
    , _igmasCreatingWithoutRetries = Nothing
    , _igmasRecreating = Nothing
    , _igmasAbandoning = Nothing
    }

-- | [Output Only] The number of instances in the managed instance group that
-- are scheduled to be deleted or are currently being deleted.
igmasDeleting :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasDeleting
  = lens _igmasDeleting
      (\ s a -> s{_igmasDeleting = a})
      . mapping _Coerce

-- | [Output Only] The number of instances in the managed instance group that
-- are scheduled to be restarted or are currently being restarted.
igmasRestarting :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasRestarting
  = lens _igmasRestarting
      (\ s a -> s{_igmasRestarting = a})
      . mapping _Coerce

-- | [Output Only] The number of instances in the managed instance group that
-- are running and have no scheduled actions.
igmasNone :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasNone
  = lens _igmasNone (\ s a -> s{_igmasNone = a}) .
      mapping _Coerce

-- | [Output Only] The number of instances in the managed instance group that
-- are scheduled to be created or are currently being created. If the group
-- fails to create any of these instances, it tries again until it creates
-- the instance successfully. If you have disabled creation retries, this
-- field will not be populated; instead, the creatingWithoutRetries field
-- will be populated.
igmasCreating :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasCreating
  = lens _igmasCreating
      (\ s a -> s{_igmasCreating = a})
      . mapping _Coerce

-- | [Output Only] The number of instances in the managed instance group that
-- are being verified. See the managedInstances[].currentAction property in
-- the listManagedInstances method documentation.
igmasVerifying :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasVerifying
  = lens _igmasVerifying
      (\ s a -> s{_igmasVerifying = a})
      . mapping _Coerce

-- | [Output Only] The number of instances in the managed instance group that
-- are being reconfigured with properties that do not require a restart or
-- a recreate action. For example, setting or removing target pools for the
-- instance.
igmasRefreshing :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasRefreshing
  = lens _igmasRefreshing
      (\ s a -> s{_igmasRefreshing = a})
      . mapping _Coerce

-- | [Output Only] The number of instances that the managed instance group
-- will attempt to create. The group attempts to create each instance only
-- once. If the group fails to create any of these instances, it decreases
-- the group\'s targetSize value accordingly.
igmasCreatingWithoutRetries :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasCreatingWithoutRetries
  = lens _igmasCreatingWithoutRetries
      (\ s a -> s{_igmasCreatingWithoutRetries = a})
      . mapping _Coerce

-- | [Output Only] The number of instances in the managed instance group that
-- are scheduled to be recreated or are currently being being recreated.
-- Recreating an instance deletes the existing root persistent disk and
-- creates a new disk from the image that is defined in the instance
-- template.
igmasRecreating :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasRecreating
  = lens _igmasRecreating
      (\ s a -> s{_igmasRecreating = a})
      . mapping _Coerce

-- | [Output Only] The total number of instances in the managed instance
-- group that are scheduled to be abandoned. Abandoning an instance removes
-- it from the managed instance group without deleting it.
igmasAbandoning :: Lens' InstanceGroupManagerActionsSummary (Maybe Int32)
igmasAbandoning
  = lens _igmasAbandoning
      (\ s a -> s{_igmasAbandoning = a})
      . mapping _Coerce

instance FromJSON InstanceGroupManagerActionsSummary
         where
        parseJSON
          = withObject "InstanceGroupManagerActionsSummary"
              (\ o ->
                 InstanceGroupManagerActionsSummary' <$>
                   (o .:? "deleting") <*> (o .:? "restarting") <*>
                     (o .:? "none")
                     <*> (o .:? "creating")
                     <*> (o .:? "verifying")
                     <*> (o .:? "refreshing")
                     <*> (o .:? "creatingWithoutRetries")
                     <*> (o .:? "recreating")
                     <*> (o .:? "abandoning"))

instance ToJSON InstanceGroupManagerActionsSummary
         where
        toJSON InstanceGroupManagerActionsSummary'{..}
          = object
              (catMaybes
                 [("deleting" .=) <$> _igmasDeleting,
                  ("restarting" .=) <$> _igmasRestarting,
                  ("none" .=) <$> _igmasNone,
                  ("creating" .=) <$> _igmasCreating,
                  ("verifying" .=) <$> _igmasVerifying,
                  ("refreshing" .=) <$> _igmasRefreshing,
                  ("creatingWithoutRetries" .=) <$>
                    _igmasCreatingWithoutRetries,
                  ("recreating" .=) <$> _igmasRecreating,
                  ("abandoning" .=) <$> _igmasAbandoning])

--
-- /See:/ 'xpnHostList' smart constructor.
data XpnHostList = XpnHostList'
    { _xhlNextPageToken :: !(Maybe Text)
    , _xhlKind          :: !Text
    , _xhlItems         :: !(Maybe [Project])
    , _xhlSelfLink      :: !(Maybe Text)
    , _xhlWarning       :: !(Maybe XpnHostListWarning)
    , _xhlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'XpnHostList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'xhlNextPageToken'
--
-- * 'xhlKind'
--
-- * 'xhlItems'
--
-- * 'xhlSelfLink'
--
-- * 'xhlWarning'
--
-- * 'xhlId'
xpnHostList
    :: XpnHostList
xpnHostList =
    XpnHostList'
    { _xhlNextPageToken = Nothing
    , _xhlKind = "compute#xpnHostList"
    , _xhlItems = Nothing
    , _xhlSelfLink = Nothing
    , _xhlWarning = Nothing
    , _xhlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
xhlNextPageToken :: Lens' XpnHostList (Maybe Text)
xhlNextPageToken
  = lens _xhlNextPageToken
      (\ s a -> s{_xhlNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#xpnHostList for lists of
-- shared VPC hosts.
xhlKind :: Lens' XpnHostList Text
xhlKind = lens _xhlKind (\ s a -> s{_xhlKind = a})

-- | [Output Only] A list of shared VPC host project URLs.
xhlItems :: Lens' XpnHostList [Project]
xhlItems
  = lens _xhlItems (\ s a -> s{_xhlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
xhlSelfLink :: Lens' XpnHostList (Maybe Text)
xhlSelfLink
  = lens _xhlSelfLink (\ s a -> s{_xhlSelfLink = a})

-- | [Output Only] Informational warning message.
xhlWarning :: Lens' XpnHostList (Maybe XpnHostListWarning)
xhlWarning
  = lens _xhlWarning (\ s a -> s{_xhlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
xhlId :: Lens' XpnHostList (Maybe Text)
xhlId = lens _xhlId (\ s a -> s{_xhlId = a})

instance FromJSON XpnHostList where
        parseJSON
          = withObject "XpnHostList"
              (\ o ->
                 XpnHostList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#xpnHostList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON XpnHostList where
        toJSON XpnHostList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _xhlNextPageToken,
                  Just ("kind" .= _xhlKind),
                  ("items" .=) <$> _xhlItems,
                  ("selfLink" .=) <$> _xhlSelfLink,
                  ("warning" .=) <$> _xhlWarning,
                  ("id" .=) <$> _xhlId])

--
-- /See:/ 'instanceTemplateListWarningDataItem' smart constructor.
data InstanceTemplateListWarningDataItem = InstanceTemplateListWarningDataItem'
    { _itlwdiValue :: !(Maybe Text)
    , _itlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceTemplateListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'itlwdiValue'
--
-- * 'itlwdiKey'
instanceTemplateListWarningDataItem
    :: InstanceTemplateListWarningDataItem
instanceTemplateListWarningDataItem =
    InstanceTemplateListWarningDataItem'
    { _itlwdiValue = Nothing
    , _itlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
itlwdiValue :: Lens' InstanceTemplateListWarningDataItem (Maybe Text)
itlwdiValue
  = lens _itlwdiValue (\ s a -> s{_itlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
itlwdiKey :: Lens' InstanceTemplateListWarningDataItem (Maybe Text)
itlwdiKey
  = lens _itlwdiKey (\ s a -> s{_itlwdiKey = a})

instance FromJSON InstanceTemplateListWarningDataItem
         where
        parseJSON
          = withObject "InstanceTemplateListWarningDataItem"
              (\ o ->
                 InstanceTemplateListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON InstanceTemplateListWarningDataItem
         where
        toJSON InstanceTemplateListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _itlwdiValue,
                  ("key" .=) <$> _itlwdiKey])

-- | A service account.
--
-- /See:/ 'serviceAccount' smart constructor.
data ServiceAccount = ServiceAccount'
    { _saEmail  :: !(Maybe Text)
    , _saScopes :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ServiceAccount' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'saEmail'
--
-- * 'saScopes'
serviceAccount
    :: ServiceAccount
serviceAccount =
    ServiceAccount'
    { _saEmail = Nothing
    , _saScopes = Nothing
    }

-- | Email address of the service account.
saEmail :: Lens' ServiceAccount (Maybe Text)
saEmail = lens _saEmail (\ s a -> s{_saEmail = a})

-- | The list of scopes to be made available for this service account.
saScopes :: Lens' ServiceAccount [Text]
saScopes
  = lens _saScopes (\ s a -> s{_saScopes = a}) .
      _Default
      . _Coerce

instance FromJSON ServiceAccount where
        parseJSON
          = withObject "ServiceAccount"
              (\ o ->
                 ServiceAccount' <$>
                   (o .:? "email") <*> (o .:? "scopes" .!= mempty))

instance ToJSON ServiceAccount where
        toJSON ServiceAccount'{..}
          = object
              (catMaybes
                 [("email" .=) <$> _saEmail,
                  ("scopes" .=) <$> _saScopes])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'snapshotListWarning' smart constructor.
data SnapshotListWarning = SnapshotListWarning'
    { _sData    :: !(Maybe [SnapshotListWarningDataItem])
    , _sCode    :: !(Maybe SnapshotListWarningCode)
    , _sMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SnapshotListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sData'
--
-- * 'sCode'
--
-- * 'sMessage'
snapshotListWarning
    :: SnapshotListWarning
snapshotListWarning =
    SnapshotListWarning'
    { _sData = Nothing
    , _sCode = Nothing
    , _sMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
sData :: Lens' SnapshotListWarning [SnapshotListWarningDataItem]
sData
  = lens _sData (\ s a -> s{_sData = a}) . _Default .
      _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
sCode :: Lens' SnapshotListWarning (Maybe SnapshotListWarningCode)
sCode = lens _sCode (\ s a -> s{_sCode = a})

-- | [Output Only] A human-readable description of the warning code.
sMessage :: Lens' SnapshotListWarning (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})

instance FromJSON SnapshotListWarning where
        parseJSON
          = withObject "SnapshotListWarning"
              (\ o ->
                 SnapshotListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON SnapshotListWarning where
        toJSON SnapshotListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _sData, ("code" .=) <$> _sCode,
                  ("message" .=) <$> _sMessage])

--
-- /See:/ 'regionInstanceGroupManagersAbandonInstancesRequest' smart constructor.
newtype RegionInstanceGroupManagersAbandonInstancesRequest = RegionInstanceGroupManagersAbandonInstancesRequest'
    { _rigmairInstances :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagersAbandonInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmairInstances'
regionInstanceGroupManagersAbandonInstancesRequest
    :: RegionInstanceGroupManagersAbandonInstancesRequest
regionInstanceGroupManagersAbandonInstancesRequest =
    RegionInstanceGroupManagersAbandonInstancesRequest'
    { _rigmairInstances = Nothing
    }

-- | The URLs of one or more instances to abandon. This can be a full URL or
-- a partial URL, such as zones\/[ZONE]\/instances\/[INSTANCE_NAME].
rigmairInstances :: Lens' RegionInstanceGroupManagersAbandonInstancesRequest [Text]
rigmairInstances
  = lens _rigmairInstances
      (\ s a -> s{_rigmairInstances = a})
      . _Default
      . _Coerce

instance FromJSON
         RegionInstanceGroupManagersAbandonInstancesRequest
         where
        parseJSON
          = withObject
              "RegionInstanceGroupManagersAbandonInstancesRequest"
              (\ o ->
                 RegionInstanceGroupManagersAbandonInstancesRequest'
                   <$> (o .:? "instances" .!= mempty))

instance ToJSON
         RegionInstanceGroupManagersAbandonInstancesRequest
         where
        toJSON
          RegionInstanceGroupManagersAbandonInstancesRequest'{..}
          = object
              (catMaybes [("instances" .=) <$> _rigmairInstances])

-- | Contains a list of networks.
--
-- /See:/ 'networkList' smart constructor.
data NetworkList = NetworkList'
    { _nlNextPageToken :: !(Maybe Text)
    , _nlKind          :: !Text
    , _nlItems         :: !(Maybe [Network])
    , _nlSelfLink      :: !(Maybe Text)
    , _nlWarning       :: !(Maybe NetworkListWarning)
    , _nlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NetworkList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nlNextPageToken'
--
-- * 'nlKind'
--
-- * 'nlItems'
--
-- * 'nlSelfLink'
--
-- * 'nlWarning'
--
-- * 'nlId'
networkList
    :: NetworkList
networkList =
    NetworkList'
    { _nlNextPageToken = Nothing
    , _nlKind = "compute#networkList"
    , _nlItems = Nothing
    , _nlSelfLink = Nothing
    , _nlWarning = Nothing
    , _nlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
nlNextPageToken :: Lens' NetworkList (Maybe Text)
nlNextPageToken
  = lens _nlNextPageToken
      (\ s a -> s{_nlNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#networkList for lists of
-- networks.
nlKind :: Lens' NetworkList Text
nlKind = lens _nlKind (\ s a -> s{_nlKind = a})

-- | A list of Network resources.
nlItems :: Lens' NetworkList [Network]
nlItems
  = lens _nlItems (\ s a -> s{_nlItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
nlSelfLink :: Lens' NetworkList (Maybe Text)
nlSelfLink
  = lens _nlSelfLink (\ s a -> s{_nlSelfLink = a})

-- | [Output Only] Informational warning message.
nlWarning :: Lens' NetworkList (Maybe NetworkListWarning)
nlWarning
  = lens _nlWarning (\ s a -> s{_nlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
nlId :: Lens' NetworkList (Maybe Text)
nlId = lens _nlId (\ s a -> s{_nlId = a})

instance FromJSON NetworkList where
        parseJSON
          = withObject "NetworkList"
              (\ o ->
                 NetworkList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#networkList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON NetworkList where
        toJSON NetworkList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _nlNextPageToken,
                  Just ("kind" .= _nlKind), ("items" .=) <$> _nlItems,
                  ("selfLink" .=) <$> _nlSelfLink,
                  ("warning" .=) <$> _nlWarning, ("id" .=) <$> _nlId])

-- | A network peering attached to a network resource. The message includes
-- the peering name, peer network, peering state, and a flag indicating
-- whether Google Compute Engine should automatically create routes for the
-- peering.
--
-- /See:/ 'networkPeering' smart constructor.
data NetworkPeering = NetworkPeering'
    { _netState            :: !(Maybe NetworkPeeringState)
    , _netStateDetails     :: !(Maybe Text)
    , _netNetwork          :: !(Maybe Text)
    , _netName             :: !(Maybe Text)
    , _netAutoCreateRoutes :: !(Maybe Bool)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NetworkPeering' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'netState'
--
-- * 'netStateDetails'
--
-- * 'netNetwork'
--
-- * 'netName'
--
-- * 'netAutoCreateRoutes'
networkPeering
    :: NetworkPeering
networkPeering =
    NetworkPeering'
    { _netState = Nothing
    , _netStateDetails = Nothing
    , _netNetwork = Nothing
    , _netName = Nothing
    , _netAutoCreateRoutes = Nothing
    }

-- | [Output Only] State for the peering.
netState :: Lens' NetworkPeering (Maybe NetworkPeeringState)
netState = lens _netState (\ s a -> s{_netState = a})

-- | [Output Only] Details about the current state of the peering.
netStateDetails :: Lens' NetworkPeering (Maybe Text)
netStateDetails
  = lens _netStateDetails
      (\ s a -> s{_netStateDetails = a})

-- | The URL of the peer network. It can be either full URL or partial URL.
-- The peer network may belong to a different project. If the partial URL
-- does not contain project, it is assumed that the peer network is in the
-- same project as the current network.
netNetwork :: Lens' NetworkPeering (Maybe Text)
netNetwork
  = lens _netNetwork (\ s a -> s{_netNetwork = a})

-- | Name of this peering. Provided by the client when the peering is
-- created. The name must comply with RFC1035. Specifically, the name must
-- be 1-63 characters long and match regular expression
-- \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first character must be a
-- lowercase letter, and all the following characters must be a dash,
-- lowercase letter, or digit, except the last character, which cannot be a
-- dash.
netName :: Lens' NetworkPeering (Maybe Text)
netName = lens _netName (\ s a -> s{_netName = a})

-- | Indicates whether full mesh connectivity is created and managed
-- automatically. When it is set to true, Google Compute Engine will
-- automatically create and manage the routes between two networks when the
-- state is ACTIVE. Otherwise, user needs to create routes manually to
-- route packets to peer network.
netAutoCreateRoutes :: Lens' NetworkPeering (Maybe Bool)
netAutoCreateRoutes
  = lens _netAutoCreateRoutes
      (\ s a -> s{_netAutoCreateRoutes = a})

instance FromJSON NetworkPeering where
        parseJSON
          = withObject "NetworkPeering"
              (\ o ->
                 NetworkPeering' <$>
                   (o .:? "state") <*> (o .:? "stateDetails") <*>
                     (o .:? "network")
                     <*> (o .:? "name")
                     <*> (o .:? "autoCreateRoutes"))

instance ToJSON NetworkPeering where
        toJSON NetworkPeering'{..}
          = object
              (catMaybes
                 [("state" .=) <$> _netState,
                  ("stateDetails" .=) <$> _netStateDetails,
                  ("network" .=) <$> _netNetwork,
                  ("name" .=) <$> _netName,
                  ("autoCreateRoutes" .=) <$> _netAutoCreateRoutes])

--
-- /See:/ 'targetSSLProxyListWarningDataItem' smart constructor.
data TargetSSLProxyListWarningDataItem = TargetSSLProxyListWarningDataItem'
    { _tsplwdiValue :: !(Maybe Text)
    , _tsplwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetSSLProxyListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tsplwdiValue'
--
-- * 'tsplwdiKey'
targetSSLProxyListWarningDataItem
    :: TargetSSLProxyListWarningDataItem
targetSSLProxyListWarningDataItem =
    TargetSSLProxyListWarningDataItem'
    { _tsplwdiValue = Nothing
    , _tsplwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tsplwdiValue :: Lens' TargetSSLProxyListWarningDataItem (Maybe Text)
tsplwdiValue
  = lens _tsplwdiValue (\ s a -> s{_tsplwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tsplwdiKey :: Lens' TargetSSLProxyListWarningDataItem (Maybe Text)
tsplwdiKey
  = lens _tsplwdiKey (\ s a -> s{_tsplwdiKey = a})

instance FromJSON TargetSSLProxyListWarningDataItem
         where
        parseJSON
          = withObject "TargetSSLProxyListWarningDataItem"
              (\ o ->
                 TargetSSLProxyListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON TargetSSLProxyListWarningDataItem
         where
        toJSON TargetSSLProxyListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tsplwdiValue,
                  ("key" .=) <$> _tsplwdiKey])

--
-- /See:/ 'instanceGroupsListInstancesRequest' smart constructor.
newtype InstanceGroupsListInstancesRequest = InstanceGroupsListInstancesRequest'
    { _iglirInstanceState :: Maybe InstanceGroupsListInstancesRequestInstanceState
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsListInstancesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iglirInstanceState'
instanceGroupsListInstancesRequest
    :: InstanceGroupsListInstancesRequest
instanceGroupsListInstancesRequest =
    InstanceGroupsListInstancesRequest'
    { _iglirInstanceState = Nothing
    }

-- | A filter for the state of the instances in the instance group. Valid
-- options are ALL or RUNNING. If you do not specify this parameter the
-- list includes all instances regardless of their state.
iglirInstanceState :: Lens' InstanceGroupsListInstancesRequest (Maybe InstanceGroupsListInstancesRequestInstanceState)
iglirInstanceState
  = lens _iglirInstanceState
      (\ s a -> s{_iglirInstanceState = a})

instance FromJSON InstanceGroupsListInstancesRequest
         where
        parseJSON
          = withObject "InstanceGroupsListInstancesRequest"
              (\ o ->
                 InstanceGroupsListInstancesRequest' <$>
                   (o .:? "instanceState"))

instance ToJSON InstanceGroupsListInstancesRequest
         where
        toJSON InstanceGroupsListInstancesRequest'{..}
          = object
              (catMaybes
                 [("instanceState" .=) <$> _iglirInstanceState])

--
-- /See:/ 'instanceListReferrersWarningDataItem' smart constructor.
data InstanceListReferrersWarningDataItem = InstanceListReferrersWarningDataItem'
    { _ilrwdiValue :: !(Maybe Text)
    , _ilrwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceListReferrersWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ilrwdiValue'
--
-- * 'ilrwdiKey'
instanceListReferrersWarningDataItem
    :: InstanceListReferrersWarningDataItem
instanceListReferrersWarningDataItem =
    InstanceListReferrersWarningDataItem'
    { _ilrwdiValue = Nothing
    , _ilrwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ilrwdiValue :: Lens' InstanceListReferrersWarningDataItem (Maybe Text)
ilrwdiValue
  = lens _ilrwdiValue (\ s a -> s{_ilrwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ilrwdiKey :: Lens' InstanceListReferrersWarningDataItem (Maybe Text)
ilrwdiKey
  = lens _ilrwdiKey (\ s a -> s{_ilrwdiKey = a})

instance FromJSON
         InstanceListReferrersWarningDataItem where
        parseJSON
          = withObject "InstanceListReferrersWarningDataItem"
              (\ o ->
                 InstanceListReferrersWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON InstanceListReferrersWarningDataItem
         where
        toJSON InstanceListReferrersWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ilrwdiValue,
                  ("key" .=) <$> _ilrwdiKey])

--
-- /See:/ 'routeListWarningDataItem' smart constructor.
data RouteListWarningDataItem = RouteListWarningDataItem'
    { _rValue :: !(Maybe Text)
    , _rKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouteListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rValue'
--
-- * 'rKey'
routeListWarningDataItem
    :: RouteListWarningDataItem
routeListWarningDataItem =
    RouteListWarningDataItem'
    { _rValue = Nothing
    , _rKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
rValue :: Lens' RouteListWarningDataItem (Maybe Text)
rValue = lens _rValue (\ s a -> s{_rValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
rKey :: Lens' RouteListWarningDataItem (Maybe Text)
rKey = lens _rKey (\ s a -> s{_rKey = a})

instance FromJSON RouteListWarningDataItem where
        parseJSON
          = withObject "RouteListWarningDataItem"
              (\ o ->
                 RouteListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON RouteListWarningDataItem where
        toJSON RouteListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _rValue, ("key" .=) <$> _rKey])

--
-- /See:/ 'interconnectAttachmentsScopedList' smart constructor.
data InterconnectAttachmentsScopedList = InterconnectAttachmentsScopedList'
    { _iaslWarning                 :: !(Maybe InterconnectAttachmentsScopedListWarning)
    , _iaslInterconnectAttachments :: !(Maybe [InterconnectAttachment])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentsScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iaslWarning'
--
-- * 'iaslInterconnectAttachments'
interconnectAttachmentsScopedList
    :: InterconnectAttachmentsScopedList
interconnectAttachmentsScopedList =
    InterconnectAttachmentsScopedList'
    { _iaslWarning = Nothing
    , _iaslInterconnectAttachments = Nothing
    }

-- | Informational warning which replaces the list of addresses when the list
-- is empty.
iaslWarning :: Lens' InterconnectAttachmentsScopedList (Maybe InterconnectAttachmentsScopedListWarning)
iaslWarning
  = lens _iaslWarning (\ s a -> s{_iaslWarning = a})

-- | A list of interconnect attachments contained in this scope.
iaslInterconnectAttachments :: Lens' InterconnectAttachmentsScopedList [InterconnectAttachment]
iaslInterconnectAttachments
  = lens _iaslInterconnectAttachments
      (\ s a -> s{_iaslInterconnectAttachments = a})
      . _Default
      . _Coerce

instance FromJSON InterconnectAttachmentsScopedList
         where
        parseJSON
          = withObject "InterconnectAttachmentsScopedList"
              (\ o ->
                 InterconnectAttachmentsScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "interconnectAttachments" .!= mempty))

instance ToJSON InterconnectAttachmentsScopedList
         where
        toJSON InterconnectAttachmentsScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _iaslWarning,
                  ("interconnectAttachments" .=) <$>
                    _iaslInterconnectAttachments])

--
-- /See:/ 'securityPolicyList' smart constructor.
data SecurityPolicyList = SecurityPolicyList'
    { _splNextPageToken :: !(Maybe Text)
    , _splKind          :: !Text
    , _splItems         :: !(Maybe [SecurityPolicy])
    , _splWarning       :: !(Maybe SecurityPolicyListWarning)
    , _splId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SecurityPolicyList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'splNextPageToken'
--
-- * 'splKind'
--
-- * 'splItems'
--
-- * 'splWarning'
--
-- * 'splId'
securityPolicyList
    :: SecurityPolicyList
securityPolicyList =
    SecurityPolicyList'
    { _splNextPageToken = Nothing
    , _splKind = "compute#securityPolicyList"
    , _splItems = Nothing
    , _splWarning = Nothing
    , _splId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
splNextPageToken :: Lens' SecurityPolicyList (Maybe Text)
splNextPageToken
  = lens _splNextPageToken
      (\ s a -> s{_splNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#securityPolicyList for
-- listsof securityPolicies
splKind :: Lens' SecurityPolicyList Text
splKind = lens _splKind (\ s a -> s{_splKind = a})

-- | A list of SecurityPolicy resources.
splItems :: Lens' SecurityPolicyList [SecurityPolicy]
splItems
  = lens _splItems (\ s a -> s{_splItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Informational warning message.
splWarning :: Lens' SecurityPolicyList (Maybe SecurityPolicyListWarning)
splWarning
  = lens _splWarning (\ s a -> s{_splWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
splId :: Lens' SecurityPolicyList (Maybe Text)
splId = lens _splId (\ s a -> s{_splId = a})

instance FromJSON SecurityPolicyList where
        parseJSON
          = withObject "SecurityPolicyList"
              (\ o ->
                 SecurityPolicyList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#securityPolicyList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON SecurityPolicyList where
        toJSON SecurityPolicyList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _splNextPageToken,
                  Just ("kind" .= _splKind),
                  ("items" .=) <$> _splItems,
                  ("warning" .=) <$> _splWarning,
                  ("id" .=) <$> _splId])

--
-- /See:/ 'commitmentAggregatedList' smart constructor.
data CommitmentAggregatedList = CommitmentAggregatedList'
    { _calNextPageToken :: !(Maybe Text)
    , _calKind          :: !Text
    , _calItems         :: !(Maybe CommitmentAggregatedListItems)
    , _calSelfLink      :: !(Maybe Text)
    , _calWarning       :: !(Maybe CommitmentAggregatedListWarning)
    , _calId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'calNextPageToken'
--
-- * 'calKind'
--
-- * 'calItems'
--
-- * 'calSelfLink'
--
-- * 'calWarning'
--
-- * 'calId'
commitmentAggregatedList
    :: CommitmentAggregatedList
commitmentAggregatedList =
    CommitmentAggregatedList'
    { _calNextPageToken = Nothing
    , _calKind = "compute#commitmentAggregatedList"
    , _calItems = Nothing
    , _calSelfLink = Nothing
    , _calWarning = Nothing
    , _calId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
calNextPageToken :: Lens' CommitmentAggregatedList (Maybe Text)
calNextPageToken
  = lens _calNextPageToken
      (\ s a -> s{_calNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#commitmentAggregatedList
-- for aggregated lists of commitments.
calKind :: Lens' CommitmentAggregatedList Text
calKind = lens _calKind (\ s a -> s{_calKind = a})

-- | A list of CommitmentsScopedList resources.
calItems :: Lens' CommitmentAggregatedList (Maybe CommitmentAggregatedListItems)
calItems = lens _calItems (\ s a -> s{_calItems = a})

-- | [Output Only] Server-defined URL for this resource.
calSelfLink :: Lens' CommitmentAggregatedList (Maybe Text)
calSelfLink
  = lens _calSelfLink (\ s a -> s{_calSelfLink = a})

-- | [Output Only] Informational warning message.
calWarning :: Lens' CommitmentAggregatedList (Maybe CommitmentAggregatedListWarning)
calWarning
  = lens _calWarning (\ s a -> s{_calWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
calId :: Lens' CommitmentAggregatedList (Maybe Text)
calId = lens _calId (\ s a -> s{_calId = a})

instance FromJSON CommitmentAggregatedList where
        parseJSON
          = withObject "CommitmentAggregatedList"
              (\ o ->
                 CommitmentAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#commitmentAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON CommitmentAggregatedList where
        toJSON CommitmentAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _calNextPageToken,
                  Just ("kind" .= _calKind),
                  ("items" .=) <$> _calItems,
                  ("selfLink" .=) <$> _calSelfLink,
                  ("warning" .=) <$> _calWarning,
                  ("id" .=) <$> _calId])

-- | Contains a list of InstanceGroup resources.
--
-- /See:/ 'regionInstanceGroupList' smart constructor.
data RegionInstanceGroupList = RegionInstanceGroupList'
    { _riglNextPageToken :: !(Maybe Text)
    , _riglKind          :: !Text
    , _riglItems         :: !(Maybe [InstanceGroup])
    , _riglSelfLink      :: !(Maybe Text)
    , _riglWarning       :: !(Maybe RegionInstanceGroupListWarning)
    , _riglId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'riglNextPageToken'
--
-- * 'riglKind'
--
-- * 'riglItems'
--
-- * 'riglSelfLink'
--
-- * 'riglWarning'
--
-- * 'riglId'
regionInstanceGroupList
    :: RegionInstanceGroupList
regionInstanceGroupList =
    RegionInstanceGroupList'
    { _riglNextPageToken = Nothing
    , _riglKind = "compute#regionInstanceGroupList"
    , _riglItems = Nothing
    , _riglSelfLink = Nothing
    , _riglWarning = Nothing
    , _riglId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
riglNextPageToken :: Lens' RegionInstanceGroupList (Maybe Text)
riglNextPageToken
  = lens _riglNextPageToken
      (\ s a -> s{_riglNextPageToken = a})

-- | The resource type.
riglKind :: Lens' RegionInstanceGroupList Text
riglKind = lens _riglKind (\ s a -> s{_riglKind = a})

-- | A list of InstanceGroup resources.
riglItems :: Lens' RegionInstanceGroupList [InstanceGroup]
riglItems
  = lens _riglItems (\ s a -> s{_riglItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
riglSelfLink :: Lens' RegionInstanceGroupList (Maybe Text)
riglSelfLink
  = lens _riglSelfLink (\ s a -> s{_riglSelfLink = a})

-- | [Output Only] Informational warning message.
riglWarning :: Lens' RegionInstanceGroupList (Maybe RegionInstanceGroupListWarning)
riglWarning
  = lens _riglWarning (\ s a -> s{_riglWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
riglId :: Lens' RegionInstanceGroupList (Maybe Text)
riglId = lens _riglId (\ s a -> s{_riglId = a})

instance FromJSON RegionInstanceGroupList where
        parseJSON
          = withObject "RegionInstanceGroupList"
              (\ o ->
                 RegionInstanceGroupList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#regionInstanceGroupList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RegionInstanceGroupList where
        toJSON RegionInstanceGroupList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _riglNextPageToken,
                  Just ("kind" .= _riglKind),
                  ("items" .=) <$> _riglItems,
                  ("selfLink" .=) <$> _riglSelfLink,
                  ("warning" .=) <$> _riglWarning,
                  ("id" .=) <$> _riglId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'vMEndpointNATMAppingsListWarning' smart constructor.
data VMEndpointNATMAppingsListWarning = VMEndpointNATMAppingsListWarning'
    { _vmenatmalwData    :: !(Maybe [VMEndpointNATMAppingsListWarningDataItem])
    , _vmenatmalwCode    :: !(Maybe VMEndpointNATMAppingsListWarningCode)
    , _vmenatmalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VMEndpointNATMAppingsListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vmenatmalwData'
--
-- * 'vmenatmalwCode'
--
-- * 'vmenatmalwMessage'
vMEndpointNATMAppingsListWarning
    :: VMEndpointNATMAppingsListWarning
vMEndpointNATMAppingsListWarning =
    VMEndpointNATMAppingsListWarning'
    { _vmenatmalwData = Nothing
    , _vmenatmalwCode = Nothing
    , _vmenatmalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
vmenatmalwData :: Lens' VMEndpointNATMAppingsListWarning [VMEndpointNATMAppingsListWarningDataItem]
vmenatmalwData
  = lens _vmenatmalwData
      (\ s a -> s{_vmenatmalwData = a})
      . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
vmenatmalwCode :: Lens' VMEndpointNATMAppingsListWarning (Maybe VMEndpointNATMAppingsListWarningCode)
vmenatmalwCode
  = lens _vmenatmalwCode
      (\ s a -> s{_vmenatmalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
vmenatmalwMessage :: Lens' VMEndpointNATMAppingsListWarning (Maybe Text)
vmenatmalwMessage
  = lens _vmenatmalwMessage
      (\ s a -> s{_vmenatmalwMessage = a})

instance FromJSON VMEndpointNATMAppingsListWarning
         where
        parseJSON
          = withObject "VMEndpointNATMAppingsListWarning"
              (\ o ->
                 VMEndpointNATMAppingsListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON VMEndpointNATMAppingsListWarning
         where
        toJSON VMEndpointNATMAppingsListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _vmenatmalwData,
                  ("code" .=) <$> _vmenatmalwCode,
                  ("message" .=) <$> _vmenatmalwMessage])

-- | A list of TargetPool resources.
--
-- /See:/ 'targetPoolAggregatedListItems' smart constructor.
newtype TargetPoolAggregatedListItems = TargetPoolAggregatedListItems'
    { _tpaliAddtional :: HashMap Text TargetPoolsScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpaliAddtional'
targetPoolAggregatedListItems
    :: HashMap Text TargetPoolsScopedList -- ^ 'tpaliAddtional'
    -> TargetPoolAggregatedListItems
targetPoolAggregatedListItems pTpaliAddtional_ =
    TargetPoolAggregatedListItems'
    { _tpaliAddtional = _Coerce # pTpaliAddtional_
    }

-- | Name of the scope containing this set of target pools.
tpaliAddtional :: Lens' TargetPoolAggregatedListItems (HashMap Text TargetPoolsScopedList)
tpaliAddtional
  = lens _tpaliAddtional
      (\ s a -> s{_tpaliAddtional = a})
      . _Coerce

instance FromJSON TargetPoolAggregatedListItems where
        parseJSON
          = withObject "TargetPoolAggregatedListItems"
              (\ o ->
                 TargetPoolAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON TargetPoolAggregatedListItems where
        toJSON = toJSON . _tpaliAddtional

--
-- /See:/ 'nodeGroupsAddNodesRequest' smart constructor.
newtype NodeGroupsAddNodesRequest = NodeGroupsAddNodesRequest'
    { _nganrAdditionalNodeCount :: Maybe (Textual Int32)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsAddNodesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nganrAdditionalNodeCount'
nodeGroupsAddNodesRequest
    :: NodeGroupsAddNodesRequest
nodeGroupsAddNodesRequest =
    NodeGroupsAddNodesRequest'
    { _nganrAdditionalNodeCount = Nothing
    }

-- | Count of additional nodes to be added to the node group.
nganrAdditionalNodeCount :: Lens' NodeGroupsAddNodesRequest (Maybe Int32)
nganrAdditionalNodeCount
  = lens _nganrAdditionalNodeCount
      (\ s a -> s{_nganrAdditionalNodeCount = a})
      . mapping _Coerce

instance FromJSON NodeGroupsAddNodesRequest where
        parseJSON
          = withObject "NodeGroupsAddNodesRequest"
              (\ o ->
                 NodeGroupsAddNodesRequest' <$>
                   (o .:? "additionalNodeCount"))

instance ToJSON NodeGroupsAddNodesRequest where
        toJSON NodeGroupsAddNodesRequest'{..}
          = object
              (catMaybes
                 [("additionalNodeCount" .=) <$>
                    _nganrAdditionalNodeCount])

--
-- /See:/ 'nodeTypeAggregatedList' smart constructor.
data NodeTypeAggregatedList = NodeTypeAggregatedList'
    { _ntalNextPageToken :: !(Maybe Text)
    , _ntalKind          :: !Text
    , _ntalItems         :: !(Maybe NodeTypeAggregatedListItems)
    , _ntalSelfLink      :: !(Maybe Text)
    , _ntalWarning       :: !(Maybe NodeTypeAggregatedListWarning)
    , _ntalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypeAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntalNextPageToken'
--
-- * 'ntalKind'
--
-- * 'ntalItems'
--
-- * 'ntalSelfLink'
--
-- * 'ntalWarning'
--
-- * 'ntalId'
nodeTypeAggregatedList
    :: NodeTypeAggregatedList
nodeTypeAggregatedList =
    NodeTypeAggregatedList'
    { _ntalNextPageToken = Nothing
    , _ntalKind = "compute#nodeTypeAggregatedList"
    , _ntalItems = Nothing
    , _ntalSelfLink = Nothing
    , _ntalWarning = Nothing
    , _ntalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ntalNextPageToken :: Lens' NodeTypeAggregatedList (Maybe Text)
ntalNextPageToken
  = lens _ntalNextPageToken
      (\ s a -> s{_ntalNextPageToken = a})

-- | [Output Only] Type of resource.Always compute#nodeTypeAggregatedList for
-- aggregated lists of node types.
ntalKind :: Lens' NodeTypeAggregatedList Text
ntalKind = lens _ntalKind (\ s a -> s{_ntalKind = a})

-- | A list of NodeTypesScopedList resources.
ntalItems :: Lens' NodeTypeAggregatedList (Maybe NodeTypeAggregatedListItems)
ntalItems
  = lens _ntalItems (\ s a -> s{_ntalItems = a})

-- | [Output Only] Server-defined URL for this resource.
ntalSelfLink :: Lens' NodeTypeAggregatedList (Maybe Text)
ntalSelfLink
  = lens _ntalSelfLink (\ s a -> s{_ntalSelfLink = a})

-- | [Output Only] Informational warning message.
ntalWarning :: Lens' NodeTypeAggregatedList (Maybe NodeTypeAggregatedListWarning)
ntalWarning
  = lens _ntalWarning (\ s a -> s{_ntalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ntalId :: Lens' NodeTypeAggregatedList (Maybe Text)
ntalId = lens _ntalId (\ s a -> s{_ntalId = a})

instance FromJSON NodeTypeAggregatedList where
        parseJSON
          = withObject "NodeTypeAggregatedList"
              (\ o ->
                 NodeTypeAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#nodeTypeAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON NodeTypeAggregatedList where
        toJSON NodeTypeAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ntalNextPageToken,
                  Just ("kind" .= _ntalKind),
                  ("items" .=) <$> _ntalItems,
                  ("selfLink" .=) <$> _ntalSelfLink,
                  ("warning" .=) <$> _ntalWarning,
                  ("id" .=) <$> _ntalId])

--
-- /See:/ 'targetInstancesScopedList' smart constructor.
data TargetInstancesScopedList = TargetInstancesScopedList'
    { _tislWarning         :: !(Maybe TargetInstancesScopedListWarning)
    , _tislTargetInstances :: !(Maybe [TargetInstance])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstancesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tislWarning'
--
-- * 'tislTargetInstances'
targetInstancesScopedList
    :: TargetInstancesScopedList
targetInstancesScopedList =
    TargetInstancesScopedList'
    { _tislWarning = Nothing
    , _tislTargetInstances = Nothing
    }

-- | Informational warning which replaces the list of addresses when the list
-- is empty.
tislWarning :: Lens' TargetInstancesScopedList (Maybe TargetInstancesScopedListWarning)
tislWarning
  = lens _tislWarning (\ s a -> s{_tislWarning = a})

-- | A list of target instances contained in this scope.
tislTargetInstances :: Lens' TargetInstancesScopedList [TargetInstance]
tislTargetInstances
  = lens _tislTargetInstances
      (\ s a -> s{_tislTargetInstances = a})
      . _Default
      . _Coerce

instance FromJSON TargetInstancesScopedList where
        parseJSON
          = withObject "TargetInstancesScopedList"
              (\ o ->
                 TargetInstancesScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "targetInstances" .!= mempty))

instance ToJSON TargetInstancesScopedList where
        toJSON TargetInstancesScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _tislWarning,
                  ("targetInstances" .=) <$> _tislTargetInstances])

--
-- /See:/ 'subnetworkListWarningDataItem' smart constructor.
data SubnetworkListWarningDataItem = SubnetworkListWarningDataItem'
    { _sValue :: !(Maybe Text)
    , _sKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworkListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sValue'
--
-- * 'sKey'
subnetworkListWarningDataItem
    :: SubnetworkListWarningDataItem
subnetworkListWarningDataItem =
    SubnetworkListWarningDataItem'
    { _sValue = Nothing
    , _sKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
sValue :: Lens' SubnetworkListWarningDataItem (Maybe Text)
sValue = lens _sValue (\ s a -> s{_sValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
sKey :: Lens' SubnetworkListWarningDataItem (Maybe Text)
sKey = lens _sKey (\ s a -> s{_sKey = a})

instance FromJSON SubnetworkListWarningDataItem where
        parseJSON
          = withObject "SubnetworkListWarningDataItem"
              (\ o ->
                 SubnetworkListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON SubnetworkListWarningDataItem where
        toJSON SubnetworkListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _sValue, ("key" .=) <$> _sKey])

--
-- /See:/ 'projectsDisableXpnResourceRequest' smart constructor.
newtype ProjectsDisableXpnResourceRequest = ProjectsDisableXpnResourceRequest'
    { _pdxrrXpnResource :: Maybe XpnResourceId
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ProjectsDisableXpnResourceRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pdxrrXpnResource'
projectsDisableXpnResourceRequest
    :: ProjectsDisableXpnResourceRequest
projectsDisableXpnResourceRequest =
    ProjectsDisableXpnResourceRequest'
    { _pdxrrXpnResource = Nothing
    }

-- | Service resource (a.k.a service project) ID.
pdxrrXpnResource :: Lens' ProjectsDisableXpnResourceRequest (Maybe XpnResourceId)
pdxrrXpnResource
  = lens _pdxrrXpnResource
      (\ s a -> s{_pdxrrXpnResource = a})

instance FromJSON ProjectsDisableXpnResourceRequest
         where
        parseJSON
          = withObject "ProjectsDisableXpnResourceRequest"
              (\ o ->
                 ProjectsDisableXpnResourceRequest' <$>
                   (o .:? "xpnResource"))

instance ToJSON ProjectsDisableXpnResourceRequest
         where
        toJSON ProjectsDisableXpnResourceRequest'{..}
          = object
              (catMaybes
                 [("xpnResource" .=) <$> _pdxrrXpnResource])

-- | A list of AddressesScopedList resources.
--
-- /See:/ 'addressAggregatedListItems' smart constructor.
newtype AddressAggregatedListItems = AddressAggregatedListItems'
    { _aAddtional :: HashMap Text AddressesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aAddtional'
addressAggregatedListItems
    :: HashMap Text AddressesScopedList -- ^ 'aAddtional'
    -> AddressAggregatedListItems
addressAggregatedListItems pAAddtional_ =
    AddressAggregatedListItems'
    { _aAddtional = _Coerce # pAAddtional_
    }

-- | [Output Only] Name of the scope containing this set of addresses.
aAddtional :: Lens' AddressAggregatedListItems (HashMap Text AddressesScopedList)
aAddtional
  = lens _aAddtional (\ s a -> s{_aAddtional = a}) .
      _Coerce

instance FromJSON AddressAggregatedListItems where
        parseJSON
          = withObject "AddressAggregatedListItems"
              (\ o ->
                 AddressAggregatedListItems' <$> (parseJSONObject o))

instance ToJSON AddressAggregatedListItems where
        toJSON = toJSON . _aAddtional

-- | Contains a list of Autoscaler resources.
--
-- /See:/ 'autoscalerList' smart constructor.
data AutoscalerList = AutoscalerList'
    { _autNextPageToken :: !(Maybe Text)
    , _autKind          :: !Text
    , _autItems         :: !(Maybe [Autoscaler])
    , _autSelfLink      :: !(Maybe Text)
    , _autWarning       :: !(Maybe AutoscalerListWarning)
    , _autId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalerList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'autNextPageToken'
--
-- * 'autKind'
--
-- * 'autItems'
--
-- * 'autSelfLink'
--
-- * 'autWarning'
--
-- * 'autId'
autoscalerList
    :: AutoscalerList
autoscalerList =
    AutoscalerList'
    { _autNextPageToken = Nothing
    , _autKind = "compute#autoscalerList"
    , _autItems = Nothing
    , _autSelfLink = Nothing
    , _autWarning = Nothing
    , _autId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
autNextPageToken :: Lens' AutoscalerList (Maybe Text)
autNextPageToken
  = lens _autNextPageToken
      (\ s a -> s{_autNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#autoscalerList for lists
-- of autoscalers.
autKind :: Lens' AutoscalerList Text
autKind = lens _autKind (\ s a -> s{_autKind = a})

-- | A list of Autoscaler resources.
autItems :: Lens' AutoscalerList [Autoscaler]
autItems
  = lens _autItems (\ s a -> s{_autItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
autSelfLink :: Lens' AutoscalerList (Maybe Text)
autSelfLink
  = lens _autSelfLink (\ s a -> s{_autSelfLink = a})

-- | [Output Only] Informational warning message.
autWarning :: Lens' AutoscalerList (Maybe AutoscalerListWarning)
autWarning
  = lens _autWarning (\ s a -> s{_autWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
autId :: Lens' AutoscalerList (Maybe Text)
autId = lens _autId (\ s a -> s{_autId = a})

instance FromJSON AutoscalerList where
        parseJSON
          = withObject "AutoscalerList"
              (\ o ->
                 AutoscalerList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#autoscalerList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON AutoscalerList where
        toJSON AutoscalerList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _autNextPageToken,
                  Just ("kind" .= _autKind),
                  ("items" .=) <$> _autItems,
                  ("selfLink" .=) <$> _autSelfLink,
                  ("warning" .=) <$> _autWarning,
                  ("id" .=) <$> _autId])

--
-- /See:/ 'interconnectListWarningDataItem' smart constructor.
data InterconnectListWarningDataItem = InterconnectListWarningDataItem'
    { _iValue :: !(Maybe Text)
    , _iKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iValue'
--
-- * 'iKey'
interconnectListWarningDataItem
    :: InterconnectListWarningDataItem
interconnectListWarningDataItem =
    InterconnectListWarningDataItem'
    { _iValue = Nothing
    , _iKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
iValue :: Lens' InterconnectListWarningDataItem (Maybe Text)
iValue = lens _iValue (\ s a -> s{_iValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
iKey :: Lens' InterconnectListWarningDataItem (Maybe Text)
iKey = lens _iKey (\ s a -> s{_iKey = a})

instance FromJSON InterconnectListWarningDataItem
         where
        parseJSON
          = withObject "InterconnectListWarningDataItem"
              (\ o ->
                 InterconnectListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON InterconnectListWarningDataItem where
        toJSON InterconnectListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _iValue, ("key" .=) <$> _iKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'subnetworkAggregatedListWarning' smart constructor.
data SubnetworkAggregatedListWarning = SubnetworkAggregatedListWarning'
    { _salwData    :: !(Maybe [SubnetworkAggregatedListWarningDataItem])
    , _salwCode    :: !(Maybe SubnetworkAggregatedListWarningCode)
    , _salwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworkAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'salwData'
--
-- * 'salwCode'
--
-- * 'salwMessage'
subnetworkAggregatedListWarning
    :: SubnetworkAggregatedListWarning
subnetworkAggregatedListWarning =
    SubnetworkAggregatedListWarning'
    { _salwData = Nothing
    , _salwCode = Nothing
    , _salwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
salwData :: Lens' SubnetworkAggregatedListWarning [SubnetworkAggregatedListWarningDataItem]
salwData
  = lens _salwData (\ s a -> s{_salwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
salwCode :: Lens' SubnetworkAggregatedListWarning (Maybe SubnetworkAggregatedListWarningCode)
salwCode = lens _salwCode (\ s a -> s{_salwCode = a})

-- | [Output Only] A human-readable description of the warning code.
salwMessage :: Lens' SubnetworkAggregatedListWarning (Maybe Text)
salwMessage
  = lens _salwMessage (\ s a -> s{_salwMessage = a})

instance FromJSON SubnetworkAggregatedListWarning
         where
        parseJSON
          = withObject "SubnetworkAggregatedListWarning"
              (\ o ->
                 SubnetworkAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON SubnetworkAggregatedListWarning where
        toJSON SubnetworkAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _salwData,
                  ("code" .=) <$> _salwCode,
                  ("message" .=) <$> _salwMessage])

-- | Represents an InterconnectLocations resource. The InterconnectLocations
-- resource describes the locations where you can connect to Google\'s
-- networks. For more information, see Colocation Facilities.
--
-- /See:/ 'interconnectLocation' smart constructor.
data InterconnectLocation = InterconnectLocation'
    { _intFacilityProviderFacilityId :: !(Maybe Text)
    , _intRegionInfos                :: !(Maybe [InterconnectLocationRegionInfo])
    , _intKind                       :: !Text
    , _intAddress                    :: !(Maybe Text)
    , _intFacilityProvider           :: !(Maybe Text)
    , _intSelfLink                   :: !(Maybe Text)
    , _intPeeringdbFacilityId        :: !(Maybe Text)
    , _intName                       :: !(Maybe Text)
    , _intCity                       :: !(Maybe Text)
    , _intAvailabilityZone           :: !(Maybe Text)
    , _intCreationTimestamp          :: !(Maybe Text)
    , _intId                         :: !(Maybe (Textual Word64))
    , _intContinent                  :: !(Maybe InterconnectLocationContinent)
    , _intDescription                :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectLocation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'intFacilityProviderFacilityId'
--
-- * 'intRegionInfos'
--
-- * 'intKind'
--
-- * 'intAddress'
--
-- * 'intFacilityProvider'
--
-- * 'intSelfLink'
--
-- * 'intPeeringdbFacilityId'
--
-- * 'intName'
--
-- * 'intCity'
--
-- * 'intAvailabilityZone'
--
-- * 'intCreationTimestamp'
--
-- * 'intId'
--
-- * 'intContinent'
--
-- * 'intDescription'
interconnectLocation
    :: InterconnectLocation
interconnectLocation =
    InterconnectLocation'
    { _intFacilityProviderFacilityId = Nothing
    , _intRegionInfos = Nothing
    , _intKind = "compute#interconnectLocation"
    , _intAddress = Nothing
    , _intFacilityProvider = Nothing
    , _intSelfLink = Nothing
    , _intPeeringdbFacilityId = Nothing
    , _intName = Nothing
    , _intCity = Nothing
    , _intAvailabilityZone = Nothing
    , _intCreationTimestamp = Nothing
    , _intId = Nothing
    , _intContinent = Nothing
    , _intDescription = Nothing
    }

-- | [Output Only] A provider-assigned Identifier for this facility (e.g.,
-- Ashburn-DC1).
intFacilityProviderFacilityId :: Lens' InterconnectLocation (Maybe Text)
intFacilityProviderFacilityId
  = lens _intFacilityProviderFacilityId
      (\ s a -> s{_intFacilityProviderFacilityId = a})

-- | [Output Only] A list of InterconnectLocation.RegionInfo objects, that
-- describe parameters pertaining to the relation between this
-- InterconnectLocation and various Google Cloud regions.
intRegionInfos :: Lens' InterconnectLocation [InterconnectLocationRegionInfo]
intRegionInfos
  = lens _intRegionInfos
      (\ s a -> s{_intRegionInfos = a})
      . _Default
      . _Coerce

-- | [Output Only] Type of the resource. Always compute#interconnectLocation
-- for interconnect locations.
intKind :: Lens' InterconnectLocation Text
intKind = lens _intKind (\ s a -> s{_intKind = a})

-- | [Output Only] The postal address of the Point of Presence, each line in
-- the address is separated by a newline character.
intAddress :: Lens' InterconnectLocation (Maybe Text)
intAddress
  = lens _intAddress (\ s a -> s{_intAddress = a})

-- | [Output Only] The name of the provider for this facility (e.g.,
-- EQUINIX).
intFacilityProvider :: Lens' InterconnectLocation (Maybe Text)
intFacilityProvider
  = lens _intFacilityProvider
      (\ s a -> s{_intFacilityProvider = a})

-- | [Output Only] Server-defined URL for the resource.
intSelfLink :: Lens' InterconnectLocation (Maybe Text)
intSelfLink
  = lens _intSelfLink (\ s a -> s{_intSelfLink = a})

-- | [Output Only] The peeringdb identifier for this facility (corresponding
-- with a netfac type in peeringdb).
intPeeringdbFacilityId :: Lens' InterconnectLocation (Maybe Text)
intPeeringdbFacilityId
  = lens _intPeeringdbFacilityId
      (\ s a -> s{_intPeeringdbFacilityId = a})

-- | [Output Only] Name of the resource.
intName :: Lens' InterconnectLocation (Maybe Text)
intName = lens _intName (\ s a -> s{_intName = a})

-- | [Output Only] Metropolitan area designator that indicates which city an
-- interconnect is located. For example: \"Chicago, IL\", \"Amsterdam,
-- Netherlands\".
intCity :: Lens' InterconnectLocation (Maybe Text)
intCity = lens _intCity (\ s a -> s{_intCity = a})

-- | [Output Only] Availability zone for this InterconnectLocation. Within a
-- metropolitan area (metro), maintenance will not be simultaneously
-- scheduled in more than one availability zone. Example: \"zone1\" or
-- \"zone2\".
intAvailabilityZone :: Lens' InterconnectLocation (Maybe Text)
intAvailabilityZone
  = lens _intAvailabilityZone
      (\ s a -> s{_intAvailabilityZone = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
intCreationTimestamp :: Lens' InterconnectLocation (Maybe Text)
intCreationTimestamp
  = lens _intCreationTimestamp
      (\ s a -> s{_intCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
intId :: Lens' InterconnectLocation (Maybe Word64)
intId
  = lens _intId (\ s a -> s{_intId = a}) .
      mapping _Coerce

-- | [Output Only] Continent for this location.
intContinent :: Lens' InterconnectLocation (Maybe InterconnectLocationContinent)
intContinent
  = lens _intContinent (\ s a -> s{_intContinent = a})

-- | [Output Only] An optional description of the resource.
intDescription :: Lens' InterconnectLocation (Maybe Text)
intDescription
  = lens _intDescription
      (\ s a -> s{_intDescription = a})

instance FromJSON InterconnectLocation where
        parseJSON
          = withObject "InterconnectLocation"
              (\ o ->
                 InterconnectLocation' <$>
                   (o .:? "facilityProviderFacilityId") <*>
                     (o .:? "regionInfos" .!= mempty)
                     <*> (o .:? "kind" .!= "compute#interconnectLocation")
                     <*> (o .:? "address")
                     <*> (o .:? "facilityProvider")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "peeringdbFacilityId")
                     <*> (o .:? "name")
                     <*> (o .:? "city")
                     <*> (o .:? "availabilityZone")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "continent")
                     <*> (o .:? "description"))

instance ToJSON InterconnectLocation where
        toJSON InterconnectLocation'{..}
          = object
              (catMaybes
                 [("facilityProviderFacilityId" .=) <$>
                    _intFacilityProviderFacilityId,
                  ("regionInfos" .=) <$> _intRegionInfos,
                  Just ("kind" .= _intKind),
                  ("address" .=) <$> _intAddress,
                  ("facilityProvider" .=) <$> _intFacilityProvider,
                  ("selfLink" .=) <$> _intSelfLink,
                  ("peeringdbFacilityId" .=) <$>
                    _intPeeringdbFacilityId,
                  ("name" .=) <$> _intName, ("city" .=) <$> _intCity,
                  ("availabilityZone" .=) <$> _intAvailabilityZone,
                  ("creationTimestamp" .=) <$> _intCreationTimestamp,
                  ("id" .=) <$> _intId,
                  ("continent" .=) <$> _intContinent,
                  ("description" .=) <$> _intDescription])

--
-- /See:/ 'targetSSLProxiesSetProxyHeaderRequest' smart constructor.
newtype TargetSSLProxiesSetProxyHeaderRequest = TargetSSLProxiesSetProxyHeaderRequest'
    { _tspsphrProxyHeader :: Maybe TargetSSLProxiesSetProxyHeaderRequestProxyHeader
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetSSLProxiesSetProxyHeaderRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tspsphrProxyHeader'
targetSSLProxiesSetProxyHeaderRequest
    :: TargetSSLProxiesSetProxyHeaderRequest
targetSSLProxiesSetProxyHeaderRequest =
    TargetSSLProxiesSetProxyHeaderRequest'
    { _tspsphrProxyHeader = Nothing
    }

-- | The new type of proxy header to append before sending data to the
-- backend. NONE or PROXY_V1 are allowed.
tspsphrProxyHeader :: Lens' TargetSSLProxiesSetProxyHeaderRequest (Maybe TargetSSLProxiesSetProxyHeaderRequestProxyHeader)
tspsphrProxyHeader
  = lens _tspsphrProxyHeader
      (\ s a -> s{_tspsphrProxyHeader = a})

instance FromJSON
         TargetSSLProxiesSetProxyHeaderRequest where
        parseJSON
          = withObject "TargetSSLProxiesSetProxyHeaderRequest"
              (\ o ->
                 TargetSSLProxiesSetProxyHeaderRequest' <$>
                   (o .:? "proxyHeader"))

instance ToJSON TargetSSLProxiesSetProxyHeaderRequest
         where
        toJSON TargetSSLProxiesSetProxyHeaderRequest'{..}
          = object
              (catMaybes
                 [("proxyHeader" .=) <$> _tspsphrProxyHeader])

--
-- /See:/ 'vpnTunnelAggregatedList' smart constructor.
data VPNTunnelAggregatedList = VPNTunnelAggregatedList'
    { _vtalNextPageToken :: !(Maybe Text)
    , _vtalKind          :: !Text
    , _vtalItems         :: !(Maybe VPNTunnelAggregatedListItems)
    , _vtalSelfLink      :: !(Maybe Text)
    , _vtalWarning       :: !(Maybe VPNTunnelAggregatedListWarning)
    , _vtalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtalNextPageToken'
--
-- * 'vtalKind'
--
-- * 'vtalItems'
--
-- * 'vtalSelfLink'
--
-- * 'vtalWarning'
--
-- * 'vtalId'
vpnTunnelAggregatedList
    :: VPNTunnelAggregatedList
vpnTunnelAggregatedList =
    VPNTunnelAggregatedList'
    { _vtalNextPageToken = Nothing
    , _vtalKind = "compute#vpnTunnelAggregatedList"
    , _vtalItems = Nothing
    , _vtalSelfLink = Nothing
    , _vtalWarning = Nothing
    , _vtalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
vtalNextPageToken :: Lens' VPNTunnelAggregatedList (Maybe Text)
vtalNextPageToken
  = lens _vtalNextPageToken
      (\ s a -> s{_vtalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#vpnTunnel for VPN
-- tunnels.
vtalKind :: Lens' VPNTunnelAggregatedList Text
vtalKind = lens _vtalKind (\ s a -> s{_vtalKind = a})

-- | A list of VpnTunnelsScopedList resources.
vtalItems :: Lens' VPNTunnelAggregatedList (Maybe VPNTunnelAggregatedListItems)
vtalItems
  = lens _vtalItems (\ s a -> s{_vtalItems = a})

-- | [Output Only] Server-defined URL for this resource.
vtalSelfLink :: Lens' VPNTunnelAggregatedList (Maybe Text)
vtalSelfLink
  = lens _vtalSelfLink (\ s a -> s{_vtalSelfLink = a})

-- | [Output Only] Informational warning message.
vtalWarning :: Lens' VPNTunnelAggregatedList (Maybe VPNTunnelAggregatedListWarning)
vtalWarning
  = lens _vtalWarning (\ s a -> s{_vtalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
vtalId :: Lens' VPNTunnelAggregatedList (Maybe Text)
vtalId = lens _vtalId (\ s a -> s{_vtalId = a})

instance FromJSON VPNTunnelAggregatedList where
        parseJSON
          = withObject "VPNTunnelAggregatedList"
              (\ o ->
                 VPNTunnelAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#vpnTunnelAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON VPNTunnelAggregatedList where
        toJSON VPNTunnelAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _vtalNextPageToken,
                  Just ("kind" .= _vtalKind),
                  ("items" .=) <$> _vtalItems,
                  ("selfLink" .=) <$> _vtalSelfLink,
                  ("warning" .=) <$> _vtalWarning,
                  ("id" .=) <$> _vtalId])

--
-- /See:/ 'sslPoliciesListWarningDataItem' smart constructor.
data SSLPoliciesListWarningDataItem = SSLPoliciesListWarningDataItem'
    { _splwdiValue :: !(Maybe Text)
    , _splwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLPoliciesListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'splwdiValue'
--
-- * 'splwdiKey'
sslPoliciesListWarningDataItem
    :: SSLPoliciesListWarningDataItem
sslPoliciesListWarningDataItem =
    SSLPoliciesListWarningDataItem'
    { _splwdiValue = Nothing
    , _splwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
splwdiValue :: Lens' SSLPoliciesListWarningDataItem (Maybe Text)
splwdiValue
  = lens _splwdiValue (\ s a -> s{_splwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
splwdiKey :: Lens' SSLPoliciesListWarningDataItem (Maybe Text)
splwdiKey
  = lens _splwdiKey (\ s a -> s{_splwdiKey = a})

instance FromJSON SSLPoliciesListWarningDataItem
         where
        parseJSON
          = withObject "SSLPoliciesListWarningDataItem"
              (\ o ->
                 SSLPoliciesListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON SSLPoliciesListWarningDataItem where
        toJSON SSLPoliciesListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _splwdiValue,
                  ("key" .=) <$> _splwdiKey])

-- | Describes a single physical circuit between the Customer and Google.
-- CircuitInfo objects are created by Google, so all fields are output
-- only. Next id: 4
--
-- /See:/ 'interconnectCircuitInfo' smart constructor.
data InterconnectCircuitInfo = InterconnectCircuitInfo'
    { _iciGoogleCircuitId  :: !(Maybe Text)
    , _iciCustomerDemarcId :: !(Maybe Text)
    , _iciGoogleDemarcId   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectCircuitInfo' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iciGoogleCircuitId'
--
-- * 'iciCustomerDemarcId'
--
-- * 'iciGoogleDemarcId'
interconnectCircuitInfo
    :: InterconnectCircuitInfo
interconnectCircuitInfo =
    InterconnectCircuitInfo'
    { _iciGoogleCircuitId = Nothing
    , _iciCustomerDemarcId = Nothing
    , _iciGoogleDemarcId = Nothing
    }

-- | Google-assigned unique ID for this circuit. Assigned at circuit turn-up.
iciGoogleCircuitId :: Lens' InterconnectCircuitInfo (Maybe Text)
iciGoogleCircuitId
  = lens _iciGoogleCircuitId
      (\ s a -> s{_iciGoogleCircuitId = a})

-- | Customer-side demarc ID for this circuit.
iciCustomerDemarcId :: Lens' InterconnectCircuitInfo (Maybe Text)
iciCustomerDemarcId
  = lens _iciCustomerDemarcId
      (\ s a -> s{_iciCustomerDemarcId = a})

-- | Google-side demarc ID for this circuit. Assigned at circuit turn-up and
-- provided by Google to the customer in the LOA.
iciGoogleDemarcId :: Lens' InterconnectCircuitInfo (Maybe Text)
iciGoogleDemarcId
  = lens _iciGoogleDemarcId
      (\ s a -> s{_iciGoogleDemarcId = a})

instance FromJSON InterconnectCircuitInfo where
        parseJSON
          = withObject "InterconnectCircuitInfo"
              (\ o ->
                 InterconnectCircuitInfo' <$>
                   (o .:? "googleCircuitId") <*>
                     (o .:? "customerDemarcId")
                     <*> (o .:? "googleDemarcId"))

instance ToJSON InterconnectCircuitInfo where
        toJSON InterconnectCircuitInfo'{..}
          = object
              (catMaybes
                 [("googleCircuitId" .=) <$> _iciGoogleCircuitId,
                  ("customerDemarcId" .=) <$> _iciCustomerDemarcId,
                  ("googleDemarcId" .=) <$> _iciGoogleDemarcId])

-- | An instance-attached disk resource.
--
-- /See:/ 'attachedDisk' smart constructor.
data AttachedDisk = AttachedDisk'
    { _adDiskEncryptionKey :: !(Maybe CustomerEncryptionKey)
    , _adKind              :: !Text
    , _adMode              :: !(Maybe AttachedDiskMode)
    , _adGuestOSFeatures   :: !(Maybe [GuestOSFeature])
    , _adBoot              :: !(Maybe Bool)
    , _adAutoDelete        :: !(Maybe Bool)
    , _adInitializeParams  :: !(Maybe AttachedDiskInitializeParams)
    , _adDeviceName        :: !(Maybe Text)
    , _adInterface         :: !(Maybe AttachedDiskInterface)
    , _adSource            :: !(Maybe Text)
    , _adLicenses          :: !(Maybe [Text])
    , _adType              :: !(Maybe AttachedDiskType)
    , _adIndex             :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AttachedDisk' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'adDiskEncryptionKey'
--
-- * 'adKind'
--
-- * 'adMode'
--
-- * 'adGuestOSFeatures'
--
-- * 'adBoot'
--
-- * 'adAutoDelete'
--
-- * 'adInitializeParams'
--
-- * 'adDeviceName'
--
-- * 'adInterface'
--
-- * 'adSource'
--
-- * 'adLicenses'
--
-- * 'adType'
--
-- * 'adIndex'
attachedDisk
    :: AttachedDisk
attachedDisk =
    AttachedDisk'
    { _adDiskEncryptionKey = Nothing
    , _adKind = "compute#attachedDisk"
    , _adMode = Nothing
    , _adGuestOSFeatures = Nothing
    , _adBoot = Nothing
    , _adAutoDelete = Nothing
    , _adInitializeParams = Nothing
    , _adDeviceName = Nothing
    , _adInterface = Nothing
    , _adSource = Nothing
    , _adLicenses = Nothing
    , _adType = Nothing
    , _adIndex = Nothing
    }

-- | Encrypts or decrypts a disk using a customer-supplied encryption key. If
-- you are creating a new disk, this field encrypts the new disk using an
-- encryption key that you provide. If you are attaching an existing disk
-- that is already encrypted, this field decrypts the disk using the
-- customer-supplied encryption key. If you encrypt a disk using a
-- customer-supplied key, you must provide the same key again when you
-- attempt to use this resource at a later time. For example, you must
-- provide the key when you create a snapshot or an image from the disk or
-- when you attach the disk to a virtual machine instance. If you do not
-- provide an encryption key, then the disk will be encrypted using an
-- automatically generated key and you do not need to provide a key to use
-- the disk later. Instance templates do not store customer-supplied
-- encryption keys, so you cannot use your own keys to encrypt disks in a
-- managed instance group.
adDiskEncryptionKey :: Lens' AttachedDisk (Maybe CustomerEncryptionKey)
adDiskEncryptionKey
  = lens _adDiskEncryptionKey
      (\ s a -> s{_adDiskEncryptionKey = a})

-- | [Output Only] Type of the resource. Always compute#attachedDisk for
-- attached disks.
adKind :: Lens' AttachedDisk Text
adKind = lens _adKind (\ s a -> s{_adKind = a})

-- | The mode in which to attach this disk, either READ_WRITE or READ_ONLY.
-- If not specified, the default is to attach the disk in READ_WRITE mode.
adMode :: Lens' AttachedDisk (Maybe AttachedDiskMode)
adMode = lens _adMode (\ s a -> s{_adMode = a})

-- | A list of features to enable on the guest operating system. Applicable
-- only for bootable images. Read Enabling guest operating system features
-- to see a list of available options.
adGuestOSFeatures :: Lens' AttachedDisk [GuestOSFeature]
adGuestOSFeatures
  = lens _adGuestOSFeatures
      (\ s a -> s{_adGuestOSFeatures = a})
      . _Default
      . _Coerce

-- | Indicates that this is a boot disk. The virtual machine will use the
-- first partition of the disk for its root filesystem.
adBoot :: Lens' AttachedDisk (Maybe Bool)
adBoot = lens _adBoot (\ s a -> s{_adBoot = a})

-- | Specifies whether the disk will be auto-deleted when the instance is
-- deleted (but not when the disk is detached from the instance).
adAutoDelete :: Lens' AttachedDisk (Maybe Bool)
adAutoDelete
  = lens _adAutoDelete (\ s a -> s{_adAutoDelete = a})

-- | [Input Only] Specifies the parameters for a new disk that will be
-- created alongside the new instance. Use initialization parameters to
-- create boot disks or local SSDs attached to the new instance. This
-- property is mutually exclusive with the source property; you can only
-- define one or the other, but not both.
adInitializeParams :: Lens' AttachedDisk (Maybe AttachedDiskInitializeParams)
adInitializeParams
  = lens _adInitializeParams
      (\ s a -> s{_adInitializeParams = a})

-- | Specifies a unique device name of your choice that is reflected into the
-- \/dev\/disk\/by-id\/google-* tree of a Linux operating system running
-- within the instance. This name can be used to reference the device for
-- mounting, resizing, and so on, from within the instance. If not
-- specified, the server chooses a default device name to apply to this
-- disk, in the form persistent-disks-x, where x is a number assigned by
-- Google Compute Engine. This field is only applicable for persistent
-- disks.
adDeviceName :: Lens' AttachedDisk (Maybe Text)
adDeviceName
  = lens _adDeviceName (\ s a -> s{_adDeviceName = a})

-- | Specifies the disk interface to use for attaching this disk, which is
-- either SCSI or NVME. The default is SCSI. Persistent disks must always
-- use SCSI and the request will fail if you attempt to attach a persistent
-- disk in any other format than SCSI. Local SSDs can use either NVME or
-- SCSI. For performance characteristics of SCSI over NVMe, see Local SSD
-- performance.
adInterface :: Lens' AttachedDisk (Maybe AttachedDiskInterface)
adInterface
  = lens _adInterface (\ s a -> s{_adInterface = a})

-- | Specifies a valid partial or full URL to an existing Persistent Disk
-- resource. When creating a new instance, one of
-- initializeParams.sourceImage or disks.source is required except for
-- local SSD. If desired, you can also attach existing non-root persistent
-- disks using this property. This field is only applicable for persistent
-- disks. Note that for InstanceTemplate, specify the disk name, not the
-- URL for the disk.
adSource :: Lens' AttachedDisk (Maybe Text)
adSource = lens _adSource (\ s a -> s{_adSource = a})

-- | [Output Only] Any valid publicly visible licenses.
adLicenses :: Lens' AttachedDisk [Text]
adLicenses
  = lens _adLicenses (\ s a -> s{_adLicenses = a}) .
      _Default
      . _Coerce

-- | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
-- specified, the default is PERSISTENT.
adType :: Lens' AttachedDisk (Maybe AttachedDiskType)
adType = lens _adType (\ s a -> s{_adType = a})

-- | [Output Only] A zero-based index to this disk, where 0 is reserved for
-- the boot disk. If you have many disks attached to an instance, each disk
-- would have a unique index number.
adIndex :: Lens' AttachedDisk (Maybe Int32)
adIndex
  = lens _adIndex (\ s a -> s{_adIndex = a}) .
      mapping _Coerce

instance FromJSON AttachedDisk where
        parseJSON
          = withObject "AttachedDisk"
              (\ o ->
                 AttachedDisk' <$>
                   (o .:? "diskEncryptionKey") <*>
                     (o .:? "kind" .!= "compute#attachedDisk")
                     <*> (o .:? "mode")
                     <*> (o .:? "guestOsFeatures" .!= mempty)
                     <*> (o .:? "boot")
                     <*> (o .:? "autoDelete")
                     <*> (o .:? "initializeParams")
                     <*> (o .:? "deviceName")
                     <*> (o .:? "interface")
                     <*> (o .:? "source")
                     <*> (o .:? "licenses" .!= mempty)
                     <*> (o .:? "type")
                     <*> (o .:? "index"))

instance ToJSON AttachedDisk where
        toJSON AttachedDisk'{..}
          = object
              (catMaybes
                 [("diskEncryptionKey" .=) <$> _adDiskEncryptionKey,
                  Just ("kind" .= _adKind), ("mode" .=) <$> _adMode,
                  ("guestOsFeatures" .=) <$> _adGuestOSFeatures,
                  ("boot" .=) <$> _adBoot,
                  ("autoDelete" .=) <$> _adAutoDelete,
                  ("initializeParams" .=) <$> _adInitializeParams,
                  ("deviceName" .=) <$> _adDeviceName,
                  ("interface" .=) <$> _adInterface,
                  ("source" .=) <$> _adSource,
                  ("licenses" .=) <$> _adLicenses,
                  ("type" .=) <$> _adType, ("index" .=) <$> _adIndex])

--
-- /See:/ 'hTTPHealthCheckListWarningDataItem' smart constructor.
data HTTPHealthCheckListWarningDataItem = HTTPHealthCheckListWarningDataItem'
    { _httphclwdiValue :: !(Maybe Text)
    , _httphclwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HTTPHealthCheckListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'httphclwdiValue'
--
-- * 'httphclwdiKey'
hTTPHealthCheckListWarningDataItem
    :: HTTPHealthCheckListWarningDataItem
hTTPHealthCheckListWarningDataItem =
    HTTPHealthCheckListWarningDataItem'
    { _httphclwdiValue = Nothing
    , _httphclwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
httphclwdiValue :: Lens' HTTPHealthCheckListWarningDataItem (Maybe Text)
httphclwdiValue
  = lens _httphclwdiValue
      (\ s a -> s{_httphclwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
httphclwdiKey :: Lens' HTTPHealthCheckListWarningDataItem (Maybe Text)
httphclwdiKey
  = lens _httphclwdiKey
      (\ s a -> s{_httphclwdiKey = a})

instance FromJSON HTTPHealthCheckListWarningDataItem
         where
        parseJSON
          = withObject "HTTPHealthCheckListWarningDataItem"
              (\ o ->
                 HTTPHealthCheckListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON HTTPHealthCheckListWarningDataItem
         where
        toJSON HTTPHealthCheckListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _httphclwdiValue,
                  ("key" .=) <$> _httphclwdiKey])

-- | Contains a list of disk types.
--
-- /See:/ 'diskTypeList' smart constructor.
data DiskTypeList = DiskTypeList'
    { _dtlNextPageToken :: !(Maybe Text)
    , _dtlKind          :: !Text
    , _dtlItems         :: !(Maybe [DiskType])
    , _dtlSelfLink      :: !(Maybe Text)
    , _dtlWarning       :: !(Maybe DiskTypeListWarning)
    , _dtlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypeList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtlNextPageToken'
--
-- * 'dtlKind'
--
-- * 'dtlItems'
--
-- * 'dtlSelfLink'
--
-- * 'dtlWarning'
--
-- * 'dtlId'
diskTypeList
    :: DiskTypeList
diskTypeList =
    DiskTypeList'
    { _dtlNextPageToken = Nothing
    , _dtlKind = "compute#diskTypeList"
    , _dtlItems = Nothing
    , _dtlSelfLink = Nothing
    , _dtlWarning = Nothing
    , _dtlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
dtlNextPageToken :: Lens' DiskTypeList (Maybe Text)
dtlNextPageToken
  = lens _dtlNextPageToken
      (\ s a -> s{_dtlNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#diskTypeList for disk
-- types.
dtlKind :: Lens' DiskTypeList Text
dtlKind = lens _dtlKind (\ s a -> s{_dtlKind = a})

-- | A list of DiskType resources.
dtlItems :: Lens' DiskTypeList [DiskType]
dtlItems
  = lens _dtlItems (\ s a -> s{_dtlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
dtlSelfLink :: Lens' DiskTypeList (Maybe Text)
dtlSelfLink
  = lens _dtlSelfLink (\ s a -> s{_dtlSelfLink = a})

-- | [Output Only] Informational warning message.
dtlWarning :: Lens' DiskTypeList (Maybe DiskTypeListWarning)
dtlWarning
  = lens _dtlWarning (\ s a -> s{_dtlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
dtlId :: Lens' DiskTypeList (Maybe Text)
dtlId = lens _dtlId (\ s a -> s{_dtlId = a})

instance FromJSON DiskTypeList where
        parseJSON
          = withObject "DiskTypeList"
              (\ o ->
                 DiskTypeList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#diskTypeList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON DiskTypeList where
        toJSON DiskTypeList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _dtlNextPageToken,
                  Just ("kind" .= _dtlKind),
                  ("items" .=) <$> _dtlItems,
                  ("selfLink" .=) <$> _dtlSelfLink,
                  ("warning" .=) <$> _dtlWarning,
                  ("id" .=) <$> _dtlId])

--
-- /See:/ 'regionInstanceGroupsSetNamedPortsRequest' smart constructor.
data RegionInstanceGroupsSetNamedPortsRequest = RegionInstanceGroupsSetNamedPortsRequest'
    { _rigsnprFingerprint :: !(Maybe Bytes)
    , _rigsnprNamedPorts  :: !(Maybe [NamedPort])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupsSetNamedPortsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigsnprFingerprint'
--
-- * 'rigsnprNamedPorts'
regionInstanceGroupsSetNamedPortsRequest
    :: RegionInstanceGroupsSetNamedPortsRequest
regionInstanceGroupsSetNamedPortsRequest =
    RegionInstanceGroupsSetNamedPortsRequest'
    { _rigsnprFingerprint = Nothing
    , _rigsnprNamedPorts = Nothing
    }

-- | The fingerprint of the named ports information for this instance group.
-- Use this optional property to prevent conflicts when multiple users
-- change the named ports settings concurrently. Obtain the fingerprint
-- with the instanceGroups.get method. Then, include the fingerprint in
-- your request to ensure that you do not overwrite changes that were
-- applied from another concurrent request.
rigsnprFingerprint :: Lens' RegionInstanceGroupsSetNamedPortsRequest (Maybe ByteString)
rigsnprFingerprint
  = lens _rigsnprFingerprint
      (\ s a -> s{_rigsnprFingerprint = a})
      . mapping _Bytes

-- | The list of named ports to set for this instance group.
rigsnprNamedPorts :: Lens' RegionInstanceGroupsSetNamedPortsRequest [NamedPort]
rigsnprNamedPorts
  = lens _rigsnprNamedPorts
      (\ s a -> s{_rigsnprNamedPorts = a})
      . _Default
      . _Coerce

instance FromJSON
         RegionInstanceGroupsSetNamedPortsRequest where
        parseJSON
          = withObject
              "RegionInstanceGroupsSetNamedPortsRequest"
              (\ o ->
                 RegionInstanceGroupsSetNamedPortsRequest' <$>
                   (o .:? "fingerprint") <*>
                     (o .:? "namedPorts" .!= mempty))

instance ToJSON
         RegionInstanceGroupsSetNamedPortsRequest where
        toJSON RegionInstanceGroupsSetNamedPortsRequest'{..}
          = object
              (catMaybes
                 [("fingerprint" .=) <$> _rigsnprFingerprint,
                  ("namedPorts" .=) <$> _rigsnprNamedPorts])

--
-- /See:/ 'testPermissionsRequest' smart constructor.
newtype TestPermissionsRequest = TestPermissionsRequest'
    { _tPermissions :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TestPermissionsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tPermissions'
testPermissionsRequest
    :: TestPermissionsRequest
testPermissionsRequest =
    TestPermissionsRequest'
    { _tPermissions = Nothing
    }

-- | The set of permissions to check for the \'resource\'. Permissions with
-- wildcards (such as \'*\' or \'storage.*\') are not allowed.
tPermissions :: Lens' TestPermissionsRequest [Text]
tPermissions
  = lens _tPermissions (\ s a -> s{_tPermissions = a})
      . _Default
      . _Coerce

instance FromJSON TestPermissionsRequest where
        parseJSON
          = withObject "TestPermissionsRequest"
              (\ o ->
                 TestPermissionsRequest' <$>
                   (o .:? "permissions" .!= mempty))

instance ToJSON TestPermissionsRequest where
        toJSON TestPermissionsRequest'{..}
          = object
              (catMaybes [("permissions" .=) <$> _tPermissions])

--
-- /See:/ 'targetTCPProxyListWarningDataItem' smart constructor.
data TargetTCPProxyListWarningDataItem = TargetTCPProxyListWarningDataItem'
    { _ttplwdiValue :: !(Maybe Text)
    , _ttplwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetTCPProxyListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ttplwdiValue'
--
-- * 'ttplwdiKey'
targetTCPProxyListWarningDataItem
    :: TargetTCPProxyListWarningDataItem
targetTCPProxyListWarningDataItem =
    TargetTCPProxyListWarningDataItem'
    { _ttplwdiValue = Nothing
    , _ttplwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ttplwdiValue :: Lens' TargetTCPProxyListWarningDataItem (Maybe Text)
ttplwdiValue
  = lens _ttplwdiValue (\ s a -> s{_ttplwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ttplwdiKey :: Lens' TargetTCPProxyListWarningDataItem (Maybe Text)
ttplwdiKey
  = lens _ttplwdiKey (\ s a -> s{_ttplwdiKey = a})

instance FromJSON TargetTCPProxyListWarningDataItem
         where
        parseJSON
          = withObject "TargetTCPProxyListWarningDataItem"
              (\ o ->
                 TargetTCPProxyListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON TargetTCPProxyListWarningDataItem
         where
        toJSON TargetTCPProxyListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ttplwdiValue,
                  ("key" .=) <$> _ttplwdiKey])

--
-- /See:/ 'projectsGetXpnResources' smart constructor.
data ProjectsGetXpnResources = ProjectsGetXpnResources'
    { _pgxrNextPageToken :: !(Maybe Text)
    , _pgxrKind          :: !Text
    , _pgxrResources     :: !(Maybe [XpnResourceId])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ProjectsGetXpnResources' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pgxrNextPageToken'
--
-- * 'pgxrKind'
--
-- * 'pgxrResources'
projectsGetXpnResources
    :: ProjectsGetXpnResources
projectsGetXpnResources =
    ProjectsGetXpnResources'
    { _pgxrNextPageToken = Nothing
    , _pgxrKind = "compute#projectsGetXpnResources"
    , _pgxrResources = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
pgxrNextPageToken :: Lens' ProjectsGetXpnResources (Maybe Text)
pgxrNextPageToken
  = lens _pgxrNextPageToken
      (\ s a -> s{_pgxrNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#projectsGetXpnResources
-- for lists of service resources (a.k.a service projects)
pgxrKind :: Lens' ProjectsGetXpnResources Text
pgxrKind = lens _pgxrKind (\ s a -> s{_pgxrKind = a})

-- | Service resources (a.k.a service projects) attached to this project as
-- their shared VPC host.
pgxrResources :: Lens' ProjectsGetXpnResources [XpnResourceId]
pgxrResources
  = lens _pgxrResources
      (\ s a -> s{_pgxrResources = a})
      . _Default
      . _Coerce

instance FromJSON ProjectsGetXpnResources where
        parseJSON
          = withObject "ProjectsGetXpnResources"
              (\ o ->
                 ProjectsGetXpnResources' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#projectsGetXpnResources")
                     <*> (o .:? "resources" .!= mempty))

instance ToJSON ProjectsGetXpnResources where
        toJSON ProjectsGetXpnResources'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _pgxrNextPageToken,
                  Just ("kind" .= _pgxrKind),
                  ("resources" .=) <$> _pgxrResources])

-- | Contains a list of machine types.
--
-- /See:/ 'machineTypeList' smart constructor.
data MachineTypeList = MachineTypeList'
    { _mtlNextPageToken :: !(Maybe Text)
    , _mtlKind          :: !Text
    , _mtlItems         :: !(Maybe [MachineType])
    , _mtlSelfLink      :: !(Maybe Text)
    , _mtlWarning       :: !(Maybe MachineTypeListWarning)
    , _mtlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypeList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtlNextPageToken'
--
-- * 'mtlKind'
--
-- * 'mtlItems'
--
-- * 'mtlSelfLink'
--
-- * 'mtlWarning'
--
-- * 'mtlId'
machineTypeList
    :: MachineTypeList
machineTypeList =
    MachineTypeList'
    { _mtlNextPageToken = Nothing
    , _mtlKind = "compute#machineTypeList"
    , _mtlItems = Nothing
    , _mtlSelfLink = Nothing
    , _mtlWarning = Nothing
    , _mtlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
mtlNextPageToken :: Lens' MachineTypeList (Maybe Text)
mtlNextPageToken
  = lens _mtlNextPageToken
      (\ s a -> s{_mtlNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#machineTypeList for lists
-- of machine types.
mtlKind :: Lens' MachineTypeList Text
mtlKind = lens _mtlKind (\ s a -> s{_mtlKind = a})

-- | A list of MachineType resources.
mtlItems :: Lens' MachineTypeList [MachineType]
mtlItems
  = lens _mtlItems (\ s a -> s{_mtlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
mtlSelfLink :: Lens' MachineTypeList (Maybe Text)
mtlSelfLink
  = lens _mtlSelfLink (\ s a -> s{_mtlSelfLink = a})

-- | [Output Only] Informational warning message.
mtlWarning :: Lens' MachineTypeList (Maybe MachineTypeListWarning)
mtlWarning
  = lens _mtlWarning (\ s a -> s{_mtlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
mtlId :: Lens' MachineTypeList (Maybe Text)
mtlId = lens _mtlId (\ s a -> s{_mtlId = a})

instance FromJSON MachineTypeList where
        parseJSON
          = withObject "MachineTypeList"
              (\ o ->
                 MachineTypeList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#machineTypeList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON MachineTypeList where
        toJSON MachineTypeList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _mtlNextPageToken,
                  Just ("kind" .= _mtlKind),
                  ("items" .=) <$> _mtlItems,
                  ("selfLink" .=) <$> _mtlSelfLink,
                  ("warning" .=) <$> _mtlWarning,
                  ("id" .=) <$> _mtlId])

-- | A list of TargetHttpProxy resources.
--
-- /See:/ 'targetHTTPProxyList' smart constructor.
data TargetHTTPProxyList = TargetHTTPProxyList'
    { _thttpplNextPageToken :: !(Maybe Text)
    , _thttpplKind          :: !Text
    , _thttpplItems         :: !(Maybe [TargetHTTPProxy])
    , _thttpplSelfLink      :: !(Maybe Text)
    , _thttpplWarning       :: !(Maybe TargetHTTPProxyListWarning)
    , _thttpplId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPProxyList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thttpplNextPageToken'
--
-- * 'thttpplKind'
--
-- * 'thttpplItems'
--
-- * 'thttpplSelfLink'
--
-- * 'thttpplWarning'
--
-- * 'thttpplId'
targetHTTPProxyList
    :: TargetHTTPProxyList
targetHTTPProxyList =
    TargetHTTPProxyList'
    { _thttpplNextPageToken = Nothing
    , _thttpplKind = "compute#targetHttpProxyList"
    , _thttpplItems = Nothing
    , _thttpplSelfLink = Nothing
    , _thttpplWarning = Nothing
    , _thttpplId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
thttpplNextPageToken :: Lens' TargetHTTPProxyList (Maybe Text)
thttpplNextPageToken
  = lens _thttpplNextPageToken
      (\ s a -> s{_thttpplNextPageToken = a})

-- | Type of resource. Always compute#targetHttpProxyList for lists of target
-- HTTP proxies.
thttpplKind :: Lens' TargetHTTPProxyList Text
thttpplKind
  = lens _thttpplKind (\ s a -> s{_thttpplKind = a})

-- | A list of TargetHttpProxy resources.
thttpplItems :: Lens' TargetHTTPProxyList [TargetHTTPProxy]
thttpplItems
  = lens _thttpplItems (\ s a -> s{_thttpplItems = a})
      . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
thttpplSelfLink :: Lens' TargetHTTPProxyList (Maybe Text)
thttpplSelfLink
  = lens _thttpplSelfLink
      (\ s a -> s{_thttpplSelfLink = a})

-- | [Output Only] Informational warning message.
thttpplWarning :: Lens' TargetHTTPProxyList (Maybe TargetHTTPProxyListWarning)
thttpplWarning
  = lens _thttpplWarning
      (\ s a -> s{_thttpplWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
thttpplId :: Lens' TargetHTTPProxyList (Maybe Text)
thttpplId
  = lens _thttpplId (\ s a -> s{_thttpplId = a})

instance FromJSON TargetHTTPProxyList where
        parseJSON
          = withObject "TargetHTTPProxyList"
              (\ o ->
                 TargetHTTPProxyList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#targetHttpProxyList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetHTTPProxyList where
        toJSON TargetHTTPProxyList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _thttpplNextPageToken,
                  Just ("kind" .= _thttpplKind),
                  ("items" .=) <$> _thttpplItems,
                  ("selfLink" .=) <$> _thttpplSelfLink,
                  ("warning" .=) <$> _thttpplWarning,
                  ("id" .=) <$> _thttpplId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'nodeGroupsListNodesWarning' smart constructor.
data NodeGroupsListNodesWarning = NodeGroupsListNodesWarning'
    { _nglnwData    :: !(Maybe [NodeGroupsListNodesWarningDataItem])
    , _nglnwCode    :: !(Maybe NodeGroupsListNodesWarningCode)
    , _nglnwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsListNodesWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nglnwData'
--
-- * 'nglnwCode'
--
-- * 'nglnwMessage'
nodeGroupsListNodesWarning
    :: NodeGroupsListNodesWarning
nodeGroupsListNodesWarning =
    NodeGroupsListNodesWarning'
    { _nglnwData = Nothing
    , _nglnwCode = Nothing
    , _nglnwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
nglnwData :: Lens' NodeGroupsListNodesWarning [NodeGroupsListNodesWarningDataItem]
nglnwData
  = lens _nglnwData (\ s a -> s{_nglnwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
nglnwCode :: Lens' NodeGroupsListNodesWarning (Maybe NodeGroupsListNodesWarningCode)
nglnwCode
  = lens _nglnwCode (\ s a -> s{_nglnwCode = a})

-- | [Output Only] A human-readable description of the warning code.
nglnwMessage :: Lens' NodeGroupsListNodesWarning (Maybe Text)
nglnwMessage
  = lens _nglnwMessage (\ s a -> s{_nglnwMessage = a})

instance FromJSON NodeGroupsListNodesWarning where
        parseJSON
          = withObject "NodeGroupsListNodesWarning"
              (\ o ->
                 NodeGroupsListNodesWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeGroupsListNodesWarning where
        toJSON NodeGroupsListNodesWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _nglnwData,
                  ("code" .=) <$> _nglnwCode,
                  ("message" .=) <$> _nglnwMessage])

--
-- /See:/ 'nodeTemplateAggregatedList' smart constructor.
data NodeTemplateAggregatedList = NodeTemplateAggregatedList'
    { _nodNextPageToken :: !(Maybe Text)
    , _nodKind          :: !Text
    , _nodItems         :: !(Maybe NodeTemplateAggregatedListItems)
    , _nodSelfLink      :: !(Maybe Text)
    , _nodWarning       :: !(Maybe NodeTemplateAggregatedListWarning)
    , _nodId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nodNextPageToken'
--
-- * 'nodKind'
--
-- * 'nodItems'
--
-- * 'nodSelfLink'
--
-- * 'nodWarning'
--
-- * 'nodId'
nodeTemplateAggregatedList
    :: NodeTemplateAggregatedList
nodeTemplateAggregatedList =
    NodeTemplateAggregatedList'
    { _nodNextPageToken = Nothing
    , _nodKind = "compute#nodeTemplateAggregatedList"
    , _nodItems = Nothing
    , _nodSelfLink = Nothing
    , _nodWarning = Nothing
    , _nodId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
nodNextPageToken :: Lens' NodeTemplateAggregatedList (Maybe Text)
nodNextPageToken
  = lens _nodNextPageToken
      (\ s a -> s{_nodNextPageToken = a})

-- | [Output Only] Type of resource.Always compute#nodeTemplateAggregatedList
-- for aggregated lists of node templates.
nodKind :: Lens' NodeTemplateAggregatedList Text
nodKind = lens _nodKind (\ s a -> s{_nodKind = a})

-- | A list of NodeTemplatesScopedList resources.
nodItems :: Lens' NodeTemplateAggregatedList (Maybe NodeTemplateAggregatedListItems)
nodItems = lens _nodItems (\ s a -> s{_nodItems = a})

-- | [Output Only] Server-defined URL for this resource.
nodSelfLink :: Lens' NodeTemplateAggregatedList (Maybe Text)
nodSelfLink
  = lens _nodSelfLink (\ s a -> s{_nodSelfLink = a})

-- | [Output Only] Informational warning message.
nodWarning :: Lens' NodeTemplateAggregatedList (Maybe NodeTemplateAggregatedListWarning)
nodWarning
  = lens _nodWarning (\ s a -> s{_nodWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
nodId :: Lens' NodeTemplateAggregatedList (Maybe Text)
nodId = lens _nodId (\ s a -> s{_nodId = a})

instance FromJSON NodeTemplateAggregatedList where
        parseJSON
          = withObject "NodeTemplateAggregatedList"
              (\ o ->
                 NodeTemplateAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#nodeTemplateAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON NodeTemplateAggregatedList where
        toJSON NodeTemplateAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _nodNextPageToken,
                  Just ("kind" .= _nodKind),
                  ("items" .=) <$> _nodItems,
                  ("selfLink" .=) <$> _nodSelfLink,
                  ("warning" .=) <$> _nodWarning,
                  ("id" .=) <$> _nodId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'interconnectLocationListWarning' smart constructor.
data InterconnectLocationListWarning = InterconnectLocationListWarning'
    { _illwData    :: !(Maybe [InterconnectLocationListWarningDataItem])
    , _illwCode    :: !(Maybe InterconnectLocationListWarningCode)
    , _illwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectLocationListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'illwData'
--
-- * 'illwCode'
--
-- * 'illwMessage'
interconnectLocationListWarning
    :: InterconnectLocationListWarning
interconnectLocationListWarning =
    InterconnectLocationListWarning'
    { _illwData = Nothing
    , _illwCode = Nothing
    , _illwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
illwData :: Lens' InterconnectLocationListWarning [InterconnectLocationListWarningDataItem]
illwData
  = lens _illwData (\ s a -> s{_illwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
illwCode :: Lens' InterconnectLocationListWarning (Maybe InterconnectLocationListWarningCode)
illwCode = lens _illwCode (\ s a -> s{_illwCode = a})

-- | [Output Only] A human-readable description of the warning code.
illwMessage :: Lens' InterconnectLocationListWarning (Maybe Text)
illwMessage
  = lens _illwMessage (\ s a -> s{_illwMessage = a})

instance FromJSON InterconnectLocationListWarning
         where
        parseJSON
          = withObject "InterconnectLocationListWarning"
              (\ o ->
                 InterconnectLocationListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InterconnectLocationListWarning where
        toJSON InterconnectLocationListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _illwData,
                  ("code" .=) <$> _illwCode,
                  ("message" .=) <$> _illwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceGroupsListInstancesWarning' smart constructor.
data InstanceGroupsListInstancesWarning = InstanceGroupsListInstancesWarning'
    { _igliwData    :: !(Maybe [InstanceGroupsListInstancesWarningDataItem])
    , _igliwCode    :: !(Maybe InstanceGroupsListInstancesWarningCode)
    , _igliwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsListInstancesWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igliwData'
--
-- * 'igliwCode'
--
-- * 'igliwMessage'
instanceGroupsListInstancesWarning
    :: InstanceGroupsListInstancesWarning
instanceGroupsListInstancesWarning =
    InstanceGroupsListInstancesWarning'
    { _igliwData = Nothing
    , _igliwCode = Nothing
    , _igliwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
igliwData :: Lens' InstanceGroupsListInstancesWarning [InstanceGroupsListInstancesWarningDataItem]
igliwData
  = lens _igliwData (\ s a -> s{_igliwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
igliwCode :: Lens' InstanceGroupsListInstancesWarning (Maybe InstanceGroupsListInstancesWarningCode)
igliwCode
  = lens _igliwCode (\ s a -> s{_igliwCode = a})

-- | [Output Only] A human-readable description of the warning code.
igliwMessage :: Lens' InstanceGroupsListInstancesWarning (Maybe Text)
igliwMessage
  = lens _igliwMessage (\ s a -> s{_igliwMessage = a})

instance FromJSON InstanceGroupsListInstancesWarning
         where
        parseJSON
          = withObject "InstanceGroupsListInstancesWarning"
              (\ o ->
                 InstanceGroupsListInstancesWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceGroupsListInstancesWarning
         where
        toJSON InstanceGroupsListInstancesWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _igliwData,
                  ("code" .=) <$> _igliwCode,
                  ("message" .=) <$> _igliwMessage])

-- | Contains a list of managed instance groups.
--
-- /See:/ 'regionInstanceGroupManagerList' smart constructor.
data RegionInstanceGroupManagerList = RegionInstanceGroupManagerList'
    { _rigmlNextPageToken :: !(Maybe Text)
    , _rigmlKind          :: !Text
    , _rigmlItems         :: !(Maybe [InstanceGroupManager])
    , _rigmlSelfLink      :: !(Maybe Text)
    , _rigmlWarning       :: !(Maybe RegionInstanceGroupManagerListWarning)
    , _rigmlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagerList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmlNextPageToken'
--
-- * 'rigmlKind'
--
-- * 'rigmlItems'
--
-- * 'rigmlSelfLink'
--
-- * 'rigmlWarning'
--
-- * 'rigmlId'
regionInstanceGroupManagerList
    :: RegionInstanceGroupManagerList
regionInstanceGroupManagerList =
    RegionInstanceGroupManagerList'
    { _rigmlNextPageToken = Nothing
    , _rigmlKind = "compute#regionInstanceGroupManagerList"
    , _rigmlItems = Nothing
    , _rigmlSelfLink = Nothing
    , _rigmlWarning = Nothing
    , _rigmlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
rigmlNextPageToken :: Lens' RegionInstanceGroupManagerList (Maybe Text)
rigmlNextPageToken
  = lens _rigmlNextPageToken
      (\ s a -> s{_rigmlNextPageToken = a})

-- | [Output Only] The resource type, which is always
-- compute#instanceGroupManagerList for a list of managed instance groups
-- that exist in th regional scope.
rigmlKind :: Lens' RegionInstanceGroupManagerList Text
rigmlKind
  = lens _rigmlKind (\ s a -> s{_rigmlKind = a})

-- | A list of InstanceGroupManager resources.
rigmlItems :: Lens' RegionInstanceGroupManagerList [InstanceGroupManager]
rigmlItems
  = lens _rigmlItems (\ s a -> s{_rigmlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
rigmlSelfLink :: Lens' RegionInstanceGroupManagerList (Maybe Text)
rigmlSelfLink
  = lens _rigmlSelfLink
      (\ s a -> s{_rigmlSelfLink = a})

-- | [Output Only] Informational warning message.
rigmlWarning :: Lens' RegionInstanceGroupManagerList (Maybe RegionInstanceGroupManagerListWarning)
rigmlWarning
  = lens _rigmlWarning (\ s a -> s{_rigmlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
rigmlId :: Lens' RegionInstanceGroupManagerList (Maybe Text)
rigmlId = lens _rigmlId (\ s a -> s{_rigmlId = a})

instance FromJSON RegionInstanceGroupManagerList
         where
        parseJSON
          = withObject "RegionInstanceGroupManagerList"
              (\ o ->
                 RegionInstanceGroupManagerList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#regionInstanceGroupManagerList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RegionInstanceGroupManagerList where
        toJSON RegionInstanceGroupManagerList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _rigmlNextPageToken,
                  Just ("kind" .= _rigmlKind),
                  ("items" .=) <$> _rigmlItems,
                  ("selfLink" .=) <$> _rigmlSelfLink,
                  ("warning" .=) <$> _rigmlWarning,
                  ("id" .=) <$> _rigmlId])

--
-- /See:/ 'diskTypesScopedList' smart constructor.
data DiskTypesScopedList = DiskTypesScopedList'
    { _dtslDiskTypes :: !(Maybe [DiskType])
    , _dtslWarning   :: !(Maybe DiskTypesScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtslDiskTypes'
--
-- * 'dtslWarning'
diskTypesScopedList
    :: DiskTypesScopedList
diskTypesScopedList =
    DiskTypesScopedList'
    { _dtslDiskTypes = Nothing
    , _dtslWarning = Nothing
    }

-- | [Output Only] A list of disk types contained in this scope.
dtslDiskTypes :: Lens' DiskTypesScopedList [DiskType]
dtslDiskTypes
  = lens _dtslDiskTypes
      (\ s a -> s{_dtslDiskTypes = a})
      . _Default
      . _Coerce

-- | [Output Only] Informational warning which replaces the list of disk
-- types when the list is empty.
dtslWarning :: Lens' DiskTypesScopedList (Maybe DiskTypesScopedListWarning)
dtslWarning
  = lens _dtslWarning (\ s a -> s{_dtslWarning = a})

instance FromJSON DiskTypesScopedList where
        parseJSON
          = withObject "DiskTypesScopedList"
              (\ o ->
                 DiskTypesScopedList' <$>
                   (o .:? "diskTypes" .!= mempty) <*> (o .:? "warning"))

instance ToJSON DiskTypesScopedList where
        toJSON DiskTypesScopedList'{..}
          = object
              (catMaybes
                 [("diskTypes" .=) <$> _dtslDiskTypes,
                  ("warning" .=) <$> _dtslWarning])

-- | Write a Cloud Audit log
--
-- /See:/ 'logConfigCloudAuditOptions' smart constructor.
data LogConfigCloudAuditOptions = LogConfigCloudAuditOptions'
    { _lccaoAuthorizationLoggingOptions :: !(Maybe AuthorizationLoggingOptions)
    , _lccaoLogName                     :: !(Maybe LogConfigCloudAuditOptionsLogName)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LogConfigCloudAuditOptions' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lccaoAuthorizationLoggingOptions'
--
-- * 'lccaoLogName'
logConfigCloudAuditOptions
    :: LogConfigCloudAuditOptions
logConfigCloudAuditOptions =
    LogConfigCloudAuditOptions'
    { _lccaoAuthorizationLoggingOptions = Nothing
    , _lccaoLogName = Nothing
    }

-- | Information used by the Cloud Audit Logging pipeline.
lccaoAuthorizationLoggingOptions :: Lens' LogConfigCloudAuditOptions (Maybe AuthorizationLoggingOptions)
lccaoAuthorizationLoggingOptions
  = lens _lccaoAuthorizationLoggingOptions
      (\ s a -> s{_lccaoAuthorizationLoggingOptions = a})

-- | The log_name to populate in the Cloud Audit Record.
lccaoLogName :: Lens' LogConfigCloudAuditOptions (Maybe LogConfigCloudAuditOptionsLogName)
lccaoLogName
  = lens _lccaoLogName (\ s a -> s{_lccaoLogName = a})

instance FromJSON LogConfigCloudAuditOptions where
        parseJSON
          = withObject "LogConfigCloudAuditOptions"
              (\ o ->
                 LogConfigCloudAuditOptions' <$>
                   (o .:? "authorizationLoggingOptions") <*>
                     (o .:? "logName"))

instance ToJSON LogConfigCloudAuditOptions where
        toJSON LogConfigCloudAuditOptions'{..}
          = object
              (catMaybes
                 [("authorizationLoggingOptions" .=) <$>
                    _lccaoAuthorizationLoggingOptions,
                  ("logName" .=) <$> _lccaoLogName])

--
-- /See:/ 'projectsSetDefaultNetworkTierRequest' smart constructor.
newtype ProjectsSetDefaultNetworkTierRequest = ProjectsSetDefaultNetworkTierRequest'
    { _psdntrNetworkTier :: Maybe ProjectsSetDefaultNetworkTierRequestNetworkTier
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ProjectsSetDefaultNetworkTierRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'psdntrNetworkTier'
projectsSetDefaultNetworkTierRequest
    :: ProjectsSetDefaultNetworkTierRequest
projectsSetDefaultNetworkTierRequest =
    ProjectsSetDefaultNetworkTierRequest'
    { _psdntrNetworkTier = Nothing
    }

-- | Default network tier to be set.
psdntrNetworkTier :: Lens' ProjectsSetDefaultNetworkTierRequest (Maybe ProjectsSetDefaultNetworkTierRequestNetworkTier)
psdntrNetworkTier
  = lens _psdntrNetworkTier
      (\ s a -> s{_psdntrNetworkTier = a})

instance FromJSON
         ProjectsSetDefaultNetworkTierRequest where
        parseJSON
          = withObject "ProjectsSetDefaultNetworkTierRequest"
              (\ o ->
                 ProjectsSetDefaultNetworkTierRequest' <$>
                   (o .:? "networkTier"))

instance ToJSON ProjectsSetDefaultNetworkTierRequest
         where
        toJSON ProjectsSetDefaultNetworkTierRequest'{..}
          = object
              (catMaybes
                 [("networkTier" .=) <$> _psdntrNetworkTier])

--
-- /See:/ 'imageListWarningDataItem' smart constructor.
data ImageListWarningDataItem = ImageListWarningDataItem'
    { _imaValue :: !(Maybe Text)
    , _imaKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ImageListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'imaValue'
--
-- * 'imaKey'
imageListWarningDataItem
    :: ImageListWarningDataItem
imageListWarningDataItem =
    ImageListWarningDataItem'
    { _imaValue = Nothing
    , _imaKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
imaValue :: Lens' ImageListWarningDataItem (Maybe Text)
imaValue = lens _imaValue (\ s a -> s{_imaValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
imaKey :: Lens' ImageListWarningDataItem (Maybe Text)
imaKey = lens _imaKey (\ s a -> s{_imaKey = a})

instance FromJSON ImageListWarningDataItem where
        parseJSON
          = withObject "ImageListWarningDataItem"
              (\ o ->
                 ImageListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON ImageListWarningDataItem where
        toJSON ImageListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _imaValue, ("key" .=) <$> _imaKey])

--
-- /See:/ 'acceleratorTypeListWarningDataItem' smart constructor.
data AcceleratorTypeListWarningDataItem = AcceleratorTypeListWarningDataItem'
    { _atlwdiValue :: !(Maybe Text)
    , _atlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypeListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atlwdiValue'
--
-- * 'atlwdiKey'
acceleratorTypeListWarningDataItem
    :: AcceleratorTypeListWarningDataItem
acceleratorTypeListWarningDataItem =
    AcceleratorTypeListWarningDataItem'
    { _atlwdiValue = Nothing
    , _atlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
atlwdiValue :: Lens' AcceleratorTypeListWarningDataItem (Maybe Text)
atlwdiValue
  = lens _atlwdiValue (\ s a -> s{_atlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
atlwdiKey :: Lens' AcceleratorTypeListWarningDataItem (Maybe Text)
atlwdiKey
  = lens _atlwdiKey (\ s a -> s{_atlwdiKey = a})

instance FromJSON AcceleratorTypeListWarningDataItem
         where
        parseJSON
          = withObject "AcceleratorTypeListWarningDataItem"
              (\ o ->
                 AcceleratorTypeListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON AcceleratorTypeListWarningDataItem
         where
        toJSON AcceleratorTypeListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _atlwdiValue,
                  ("key" .=) <$> _atlwdiKey])

-- | Description of a planned outage on this Interconnect. Next id: 9
--
-- /See:/ 'interconnectOutageNotification' smart constructor.
data InterconnectOutageNotification = InterconnectOutageNotification'
    { _ionState            :: !(Maybe InterconnectOutageNotificationState)
    , _ionAffectedCircuits :: !(Maybe [Text])
    , _ionStartTime        :: !(Maybe (Textual Int64))
    , _ionIssueType        :: !(Maybe InterconnectOutageNotificationIssueType)
    , _ionName             :: !(Maybe Text)
    , _ionEndTime          :: !(Maybe (Textual Int64))
    , _ionSource           :: !(Maybe InterconnectOutageNotificationSource)
    , _ionDescription      :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectOutageNotification' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ionState'
--
-- * 'ionAffectedCircuits'
--
-- * 'ionStartTime'
--
-- * 'ionIssueType'
--
-- * 'ionName'
--
-- * 'ionEndTime'
--
-- * 'ionSource'
--
-- * 'ionDescription'
interconnectOutageNotification
    :: InterconnectOutageNotification
interconnectOutageNotification =
    InterconnectOutageNotification'
    { _ionState = Nothing
    , _ionAffectedCircuits = Nothing
    , _ionStartTime = Nothing
    , _ionIssueType = Nothing
    , _ionName = Nothing
    , _ionEndTime = Nothing
    , _ionSource = Nothing
    , _ionDescription = Nothing
    }

-- | State of this notification. Note that the \"NS_\" versions of this enum
-- have been deprecated in favor of the unprefixed values.
ionState :: Lens' InterconnectOutageNotification (Maybe InterconnectOutageNotificationState)
ionState = lens _ionState (\ s a -> s{_ionState = a})

-- | If issue_type is IT_PARTIAL_OUTAGE, a list of the Google-side circuit
-- IDs that will be affected.
ionAffectedCircuits :: Lens' InterconnectOutageNotification [Text]
ionAffectedCircuits
  = lens _ionAffectedCircuits
      (\ s a -> s{_ionAffectedCircuits = a})
      . _Default
      . _Coerce

-- | Scheduled start time for the outage (milliseconds since Unix epoch).
ionStartTime :: Lens' InterconnectOutageNotification (Maybe Int64)
ionStartTime
  = lens _ionStartTime (\ s a -> s{_ionStartTime = a})
      . mapping _Coerce

-- | Form this outage is expected to take. Note that the \"IT_\" versions of
-- this enum have been deprecated in favor of the unprefixed values.
ionIssueType :: Lens' InterconnectOutageNotification (Maybe InterconnectOutageNotificationIssueType)
ionIssueType
  = lens _ionIssueType (\ s a -> s{_ionIssueType = a})

-- | Unique identifier for this outage notification.
ionName :: Lens' InterconnectOutageNotification (Maybe Text)
ionName = lens _ionName (\ s a -> s{_ionName = a})

-- | Scheduled end time for the outage (milliseconds since Unix epoch).
ionEndTime :: Lens' InterconnectOutageNotification (Maybe Int64)
ionEndTime
  = lens _ionEndTime (\ s a -> s{_ionEndTime = a}) .
      mapping _Coerce

-- | The party that generated this notification. Note that \"NSRC_GOOGLE\"
-- has been deprecated in favor of \"GOOGLE\"
ionSource :: Lens' InterconnectOutageNotification (Maybe InterconnectOutageNotificationSource)
ionSource
  = lens _ionSource (\ s a -> s{_ionSource = a})

-- | A description about the purpose of the outage.
ionDescription :: Lens' InterconnectOutageNotification (Maybe Text)
ionDescription
  = lens _ionDescription
      (\ s a -> s{_ionDescription = a})

instance FromJSON InterconnectOutageNotification
         where
        parseJSON
          = withObject "InterconnectOutageNotification"
              (\ o ->
                 InterconnectOutageNotification' <$>
                   (o .:? "state") <*>
                     (o .:? "affectedCircuits" .!= mempty)
                     <*> (o .:? "startTime")
                     <*> (o .:? "issueType")
                     <*> (o .:? "name")
                     <*> (o .:? "endTime")
                     <*> (o .:? "source")
                     <*> (o .:? "description"))

instance ToJSON InterconnectOutageNotification where
        toJSON InterconnectOutageNotification'{..}
          = object
              (catMaybes
                 [("state" .=) <$> _ionState,
                  ("affectedCircuits" .=) <$> _ionAffectedCircuits,
                  ("startTime" .=) <$> _ionStartTime,
                  ("issueType" .=) <$> _ionIssueType,
                  ("name" .=) <$> _ionName,
                  ("endTime" .=) <$> _ionEndTime,
                  ("source" .=) <$> _ionSource,
                  ("description" .=) <$> _ionDescription])

-- | Contains a list of node templates.
--
-- /See:/ 'nodeTemplateList' smart constructor.
data NodeTemplateList = NodeTemplateList'
    { _ntlNextPageToken :: !(Maybe Text)
    , _ntlKind          :: !Text
    , _ntlItems         :: !(Maybe [NodeTemplate])
    , _ntlSelfLink      :: !(Maybe Text)
    , _ntlWarning       :: !(Maybe NodeTemplateListWarning)
    , _ntlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntlNextPageToken'
--
-- * 'ntlKind'
--
-- * 'ntlItems'
--
-- * 'ntlSelfLink'
--
-- * 'ntlWarning'
--
-- * 'ntlId'
nodeTemplateList
    :: NodeTemplateList
nodeTemplateList =
    NodeTemplateList'
    { _ntlNextPageToken = Nothing
    , _ntlKind = "compute#nodeTemplateList"
    , _ntlItems = Nothing
    , _ntlSelfLink = Nothing
    , _ntlWarning = Nothing
    , _ntlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ntlNextPageToken :: Lens' NodeTemplateList (Maybe Text)
ntlNextPageToken
  = lens _ntlNextPageToken
      (\ s a -> s{_ntlNextPageToken = a})

-- | [Output Only] Type of resource.Always compute#nodeTemplateList for lists
-- of node templates.
ntlKind :: Lens' NodeTemplateList Text
ntlKind = lens _ntlKind (\ s a -> s{_ntlKind = a})

-- | A list of NodeTemplate resources.
ntlItems :: Lens' NodeTemplateList [NodeTemplate]
ntlItems
  = lens _ntlItems (\ s a -> s{_ntlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
ntlSelfLink :: Lens' NodeTemplateList (Maybe Text)
ntlSelfLink
  = lens _ntlSelfLink (\ s a -> s{_ntlSelfLink = a})

-- | [Output Only] Informational warning message.
ntlWarning :: Lens' NodeTemplateList (Maybe NodeTemplateListWarning)
ntlWarning
  = lens _ntlWarning (\ s a -> s{_ntlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ntlId :: Lens' NodeTemplateList (Maybe Text)
ntlId = lens _ntlId (\ s a -> s{_ntlId = a})

instance FromJSON NodeTemplateList where
        parseJSON
          = withObject "NodeTemplateList"
              (\ o ->
                 NodeTemplateList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#nodeTemplateList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON NodeTemplateList where
        toJSON NodeTemplateList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ntlNextPageToken,
                  Just ("kind" .= _ntlKind),
                  ("items" .=) <$> _ntlItems,
                  ("selfLink" .=) <$> _ntlSelfLink,
                  ("warning" .=) <$> _ntlWarning,
                  ("id" .=) <$> _ntlId])

--
-- /See:/ 'diskTypeAggregatedList' smart constructor.
data DiskTypeAggregatedList = DiskTypeAggregatedList'
    { _dtalNextPageToken :: !(Maybe Text)
    , _dtalKind          :: !Text
    , _dtalItems         :: !(Maybe DiskTypeAggregatedListItems)
    , _dtalSelfLink      :: !(Maybe Text)
    , _dtalWarning       :: !(Maybe DiskTypeAggregatedListWarning)
    , _dtalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypeAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtalNextPageToken'
--
-- * 'dtalKind'
--
-- * 'dtalItems'
--
-- * 'dtalSelfLink'
--
-- * 'dtalWarning'
--
-- * 'dtalId'
diskTypeAggregatedList
    :: DiskTypeAggregatedList
diskTypeAggregatedList =
    DiskTypeAggregatedList'
    { _dtalNextPageToken = Nothing
    , _dtalKind = "compute#diskTypeAggregatedList"
    , _dtalItems = Nothing
    , _dtalSelfLink = Nothing
    , _dtalWarning = Nothing
    , _dtalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
dtalNextPageToken :: Lens' DiskTypeAggregatedList (Maybe Text)
dtalNextPageToken
  = lens _dtalNextPageToken
      (\ s a -> s{_dtalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#diskTypeAggregatedList.
dtalKind :: Lens' DiskTypeAggregatedList Text
dtalKind = lens _dtalKind (\ s a -> s{_dtalKind = a})

-- | A list of DiskTypesScopedList resources.
dtalItems :: Lens' DiskTypeAggregatedList (Maybe DiskTypeAggregatedListItems)
dtalItems
  = lens _dtalItems (\ s a -> s{_dtalItems = a})

-- | [Output Only] Server-defined URL for this resource.
dtalSelfLink :: Lens' DiskTypeAggregatedList (Maybe Text)
dtalSelfLink
  = lens _dtalSelfLink (\ s a -> s{_dtalSelfLink = a})

-- | [Output Only] Informational warning message.
dtalWarning :: Lens' DiskTypeAggregatedList (Maybe DiskTypeAggregatedListWarning)
dtalWarning
  = lens _dtalWarning (\ s a -> s{_dtalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
dtalId :: Lens' DiskTypeAggregatedList (Maybe Text)
dtalId = lens _dtalId (\ s a -> s{_dtalId = a})

instance FromJSON DiskTypeAggregatedList where
        parseJSON
          = withObject "DiskTypeAggregatedList"
              (\ o ->
                 DiskTypeAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#diskTypeAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON DiskTypeAggregatedList where
        toJSON DiskTypeAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _dtalNextPageToken,
                  Just ("kind" .= _dtalKind),
                  ("items" .=) <$> _dtalItems,
                  ("selfLink" .=) <$> _dtalSelfLink,
                  ("warning" .=) <$> _dtalWarning,
                  ("id" .=) <$> _dtalId])

--
-- /See:/ 'hTTPHealthCheck' smart constructor.
data HTTPHealthCheck = HTTPHealthCheck'
    { _httphcResponse    :: !(Maybe Text)
    , _httphcRequestPath :: !(Maybe Text)
    , _httphcHost        :: !(Maybe Text)
    , _httphcProxyHeader :: !(Maybe HTTPHealthCheckProxyHeader)
    , _httphcPortName    :: !(Maybe Text)
    , _httphcPort        :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HTTPHealthCheck' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'httphcResponse'
--
-- * 'httphcRequestPath'
--
-- * 'httphcHost'
--
-- * 'httphcProxyHeader'
--
-- * 'httphcPortName'
--
-- * 'httphcPort'
hTTPHealthCheck
    :: HTTPHealthCheck
hTTPHealthCheck =
    HTTPHealthCheck'
    { _httphcResponse = Nothing
    , _httphcRequestPath = Nothing
    , _httphcHost = Nothing
    , _httphcProxyHeader = Nothing
    , _httphcPortName = Nothing
    , _httphcPort = Nothing
    }

-- | The string to match anywhere in the first 1024 bytes of the response
-- body. If left empty (the default value), the status code determines
-- health. The response data can only be ASCII.
httphcResponse :: Lens' HTTPHealthCheck (Maybe Text)
httphcResponse
  = lens _httphcResponse
      (\ s a -> s{_httphcResponse = a})

-- | The request path of the HTTP health check request. The default value is
-- \/.
httphcRequestPath :: Lens' HTTPHealthCheck (Maybe Text)
httphcRequestPath
  = lens _httphcRequestPath
      (\ s a -> s{_httphcRequestPath = a})

-- | The value of the host header in the HTTP health check request. If left
-- empty (default value), the IP on behalf of which this health check is
-- performed will be used.
httphcHost :: Lens' HTTPHealthCheck (Maybe Text)
httphcHost
  = lens _httphcHost (\ s a -> s{_httphcHost = a})

-- | Specifies the type of proxy header to append before sending data to the
-- backend, either NONE or PROXY_V1. The default is NONE.
httphcProxyHeader :: Lens' HTTPHealthCheck (Maybe HTTPHealthCheckProxyHeader)
httphcProxyHeader
  = lens _httphcProxyHeader
      (\ s a -> s{_httphcProxyHeader = a})

-- | Port name as defined in InstanceGroup#NamedPort#name. If both port and
-- port_name are defined, port takes precedence.
httphcPortName :: Lens' HTTPHealthCheck (Maybe Text)
httphcPortName
  = lens _httphcPortName
      (\ s a -> s{_httphcPortName = a})

-- | The TCP port number for the health check request. The default value is
-- 80. Valid values are 1 through 65535.
httphcPort :: Lens' HTTPHealthCheck (Maybe Int32)
httphcPort
  = lens _httphcPort (\ s a -> s{_httphcPort = a}) .
      mapping _Coerce

instance FromJSON HTTPHealthCheck where
        parseJSON
          = withObject "HTTPHealthCheck"
              (\ o ->
                 HTTPHealthCheck' <$>
                   (o .:? "response") <*> (o .:? "requestPath") <*>
                     (o .:? "host")
                     <*> (o .:? "proxyHeader")
                     <*> (o .:? "portName")
                     <*> (o .:? "port"))

instance ToJSON HTTPHealthCheck where
        toJSON HTTPHealthCheck'{..}
          = object
              (catMaybes
                 [("response" .=) <$> _httphcResponse,
                  ("requestPath" .=) <$> _httphcRequestPath,
                  ("host" .=) <$> _httphcHost,
                  ("proxyHeader" .=) <$> _httphcProxyHeader,
                  ("portName" .=) <$> _httphcPortName,
                  ("port" .=) <$> _httphcPort])

--
-- /See:/ 'urlMapListWarningDataItem' smart constructor.
data URLMapListWarningDataItem = URLMapListWarningDataItem'
    { _umlwdiValue :: !(Maybe Text)
    , _umlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMapListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umlwdiValue'
--
-- * 'umlwdiKey'
urlMapListWarningDataItem
    :: URLMapListWarningDataItem
urlMapListWarningDataItem =
    URLMapListWarningDataItem'
    { _umlwdiValue = Nothing
    , _umlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
umlwdiValue :: Lens' URLMapListWarningDataItem (Maybe Text)
umlwdiValue
  = lens _umlwdiValue (\ s a -> s{_umlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
umlwdiKey :: Lens' URLMapListWarningDataItem (Maybe Text)
umlwdiKey
  = lens _umlwdiKey (\ s a -> s{_umlwdiKey = a})

instance FromJSON URLMapListWarningDataItem where
        parseJSON
          = withObject "URLMapListWarningDataItem"
              (\ o ->
                 URLMapListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON URLMapListWarningDataItem where
        toJSON URLMapListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _umlwdiValue,
                  ("key" .=) <$> _umlwdiKey])

-- | Defines the IP ranges that want to use NAT for a subnetwork.
--
-- /See:/ 'routerNATSubnetworkToNAT' smart constructor.
data RouterNATSubnetworkToNAT = RouterNATSubnetworkToNAT'
    { _rnatstnatSourceIPRangesToNAT   :: !(Maybe [RouterNATSubnetworkToNATSourceIPRangesToNATItem])
    , _rnatstnatName                  :: !(Maybe Text)
    , _rnatstnatSecondaryIPRangeNames :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterNATSubnetworkToNAT' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rnatstnatSourceIPRangesToNAT'
--
-- * 'rnatstnatName'
--
-- * 'rnatstnatSecondaryIPRangeNames'
routerNATSubnetworkToNAT
    :: RouterNATSubnetworkToNAT
routerNATSubnetworkToNAT =
    RouterNATSubnetworkToNAT'
    { _rnatstnatSourceIPRangesToNAT = Nothing
    , _rnatstnatName = Nothing
    , _rnatstnatSecondaryIPRangeNames = Nothing
    }

-- | Specify the options for NAT ranges in the Subnetwork. All usages of
-- single value are valid except NAT_IP_RANGE_OPTION_UNSPECIFIED. The only
-- valid option with multiple values is: [\"PRIMARY_IP_RANGE\",
-- \"LIST_OF_SECONDARY_IP_RANGES\"] Default: [ALL_IP_RANGES]
rnatstnatSourceIPRangesToNAT :: Lens' RouterNATSubnetworkToNAT [RouterNATSubnetworkToNATSourceIPRangesToNATItem]
rnatstnatSourceIPRangesToNAT
  = lens _rnatstnatSourceIPRangesToNAT
      (\ s a -> s{_rnatstnatSourceIPRangesToNAT = a})
      . _Default
      . _Coerce

-- | URL for the subnetwork resource to use NAT.
rnatstnatName :: Lens' RouterNATSubnetworkToNAT (Maybe Text)
rnatstnatName
  = lens _rnatstnatName
      (\ s a -> s{_rnatstnatName = a})

-- | A list of the secondary ranges of the Subnetwork that are allowed to use
-- NAT. This can be populated only if \"LIST_OF_SECONDARY_IP_RANGES\" is
-- one of the values in source_ip_ranges_to_nat.
rnatstnatSecondaryIPRangeNames :: Lens' RouterNATSubnetworkToNAT [Text]
rnatstnatSecondaryIPRangeNames
  = lens _rnatstnatSecondaryIPRangeNames
      (\ s a -> s{_rnatstnatSecondaryIPRangeNames = a})
      . _Default
      . _Coerce

instance FromJSON RouterNATSubnetworkToNAT where
        parseJSON
          = withObject "RouterNATSubnetworkToNAT"
              (\ o ->
                 RouterNATSubnetworkToNAT' <$>
                   (o .:? "sourceIpRangesToNat" .!= mempty) <*>
                     (o .:? "name")
                     <*> (o .:? "secondaryIpRangeNames" .!= mempty))

instance ToJSON RouterNATSubnetworkToNAT where
        toJSON RouterNATSubnetworkToNAT'{..}
          = object
              (catMaybes
                 [("sourceIpRangesToNat" .=) <$>
                    _rnatstnatSourceIPRangesToNAT,
                  ("name" .=) <$> _rnatstnatName,
                  ("secondaryIpRangeNames" .=) <$>
                    _rnatstnatSecondaryIPRangeNames])

--
-- /See:/ 'backendServiceGroupHealth' smart constructor.
data BackendServiceGroupHealth = BackendServiceGroupHealth'
    { _bsghKind         :: !Text
    , _bsghHealthStatus :: !(Maybe [HealthStatus])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceGroupHealth' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsghKind'
--
-- * 'bsghHealthStatus'
backendServiceGroupHealth
    :: BackendServiceGroupHealth
backendServiceGroupHealth =
    BackendServiceGroupHealth'
    { _bsghKind = "compute#backendServiceGroupHealth"
    , _bsghHealthStatus = Nothing
    }

-- | [Output Only] Type of resource. Always compute#backendServiceGroupHealth
-- for the health of backend services.
bsghKind :: Lens' BackendServiceGroupHealth Text
bsghKind = lens _bsghKind (\ s a -> s{_bsghKind = a})

-- | Health state of the backend instances or endpoints in requested instance
-- or network endpoint group, determined based on configured health checks.
bsghHealthStatus :: Lens' BackendServiceGroupHealth [HealthStatus]
bsghHealthStatus
  = lens _bsghHealthStatus
      (\ s a -> s{_bsghHealthStatus = a})
      . _Default
      . _Coerce

instance FromJSON BackendServiceGroupHealth where
        parseJSON
          = withObject "BackendServiceGroupHealth"
              (\ o ->
                 BackendServiceGroupHealth' <$>
                   (o .:? "kind" .!=
                      "compute#backendServiceGroupHealth")
                     <*> (o .:? "healthStatus" .!= mempty))

instance ToJSON BackendServiceGroupHealth where
        toJSON BackendServiceGroupHealth'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _bsghKind),
                  ("healthStatus" .=) <$> _bsghHealthStatus])

--
-- /See:/ 'autoscalersScopedList' smart constructor.
data AutoscalersScopedList = AutoscalersScopedList'
    { _aAutoscalers :: !(Maybe [Autoscaler])
    , _aWarning     :: !(Maybe AutoscalersScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalersScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aAutoscalers'
--
-- * 'aWarning'
autoscalersScopedList
    :: AutoscalersScopedList
autoscalersScopedList =
    AutoscalersScopedList'
    { _aAutoscalers = Nothing
    , _aWarning = Nothing
    }

-- | [Output Only] A list of autoscalers contained in this scope.
aAutoscalers :: Lens' AutoscalersScopedList [Autoscaler]
aAutoscalers
  = lens _aAutoscalers (\ s a -> s{_aAutoscalers = a})
      . _Default
      . _Coerce

-- | [Output Only] Informational warning which replaces the list of
-- autoscalers when the list is empty.
aWarning :: Lens' AutoscalersScopedList (Maybe AutoscalersScopedListWarning)
aWarning = lens _aWarning (\ s a -> s{_aWarning = a})

instance FromJSON AutoscalersScopedList where
        parseJSON
          = withObject "AutoscalersScopedList"
              (\ o ->
                 AutoscalersScopedList' <$>
                   (o .:? "autoscalers" .!= mempty) <*>
                     (o .:? "warning"))

instance ToJSON AutoscalersScopedList where
        toJSON AutoscalersScopedList'{..}
          = object
              (catMaybes
                 [("autoscalers" .=) <$> _aAutoscalers,
                  ("warning" .=) <$> _aWarning])

-- | Write a Data Access (Gin) log
--
-- /See:/ 'logConfigDataAccessOptions' smart constructor.
newtype LogConfigDataAccessOptions = LogConfigDataAccessOptions'
    { _lcdaoLogMode :: Maybe LogConfigDataAccessOptionsLogMode
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LogConfigDataAccessOptions' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcdaoLogMode'
logConfigDataAccessOptions
    :: LogConfigDataAccessOptions
logConfigDataAccessOptions =
    LogConfigDataAccessOptions'
    { _lcdaoLogMode = Nothing
    }

-- | Whether Gin logging should happen in a fail-closed manner at the caller.
-- This is relevant only in the LocalIAM implementation, for now. NOTE:
-- Logging to Gin in a fail-closed manner is currently unsupported while
-- work is being done to satisfy the requirements of go\/345. Currently,
-- setting LOG_FAIL_CLOSED mode will have no effect, but still exists
-- because there is active work being done to support it (b\/115874152).
lcdaoLogMode :: Lens' LogConfigDataAccessOptions (Maybe LogConfigDataAccessOptionsLogMode)
lcdaoLogMode
  = lens _lcdaoLogMode (\ s a -> s{_lcdaoLogMode = a})

instance FromJSON LogConfigDataAccessOptions where
        parseJSON
          = withObject "LogConfigDataAccessOptions"
              (\ o ->
                 LogConfigDataAccessOptions' <$> (o .:? "logMode"))

instance ToJSON LogConfigDataAccessOptions where
        toJSON LogConfigDataAccessOptions'{..}
          = object
              (catMaybes [("logMode" .=) <$> _lcdaoLogMode])

--
-- /See:/ 'autoscalerAggregatedList' smart constructor.
data AutoscalerAggregatedList = AutoscalerAggregatedList'
    { _aalNextPageToken :: !(Maybe Text)
    , _aalKind          :: !Text
    , _aalItems         :: !(Maybe AutoscalerAggregatedListItems)
    , _aalSelfLink      :: !(Maybe Text)
    , _aalWarning       :: !(Maybe AutoscalerAggregatedListWarning)
    , _aalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalerAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aalNextPageToken'
--
-- * 'aalKind'
--
-- * 'aalItems'
--
-- * 'aalSelfLink'
--
-- * 'aalWarning'
--
-- * 'aalId'
autoscalerAggregatedList
    :: AutoscalerAggregatedList
autoscalerAggregatedList =
    AutoscalerAggregatedList'
    { _aalNextPageToken = Nothing
    , _aalKind = "compute#autoscalerAggregatedList"
    , _aalItems = Nothing
    , _aalSelfLink = Nothing
    , _aalWarning = Nothing
    , _aalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
aalNextPageToken :: Lens' AutoscalerAggregatedList (Maybe Text)
aalNextPageToken
  = lens _aalNextPageToken
      (\ s a -> s{_aalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#autoscalerAggregatedList
-- for aggregated lists of autoscalers.
aalKind :: Lens' AutoscalerAggregatedList Text
aalKind = lens _aalKind (\ s a -> s{_aalKind = a})

-- | A list of AutoscalersScopedList resources.
aalItems :: Lens' AutoscalerAggregatedList (Maybe AutoscalerAggregatedListItems)
aalItems = lens _aalItems (\ s a -> s{_aalItems = a})

-- | [Output Only] Server-defined URL for this resource.
aalSelfLink :: Lens' AutoscalerAggregatedList (Maybe Text)
aalSelfLink
  = lens _aalSelfLink (\ s a -> s{_aalSelfLink = a})

-- | [Output Only] Informational warning message.
aalWarning :: Lens' AutoscalerAggregatedList (Maybe AutoscalerAggregatedListWarning)
aalWarning
  = lens _aalWarning (\ s a -> s{_aalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
aalId :: Lens' AutoscalerAggregatedList (Maybe Text)
aalId = lens _aalId (\ s a -> s{_aalId = a})

instance FromJSON AutoscalerAggregatedList where
        parseJSON
          = withObject "AutoscalerAggregatedList"
              (\ o ->
                 AutoscalerAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#autoscalerAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON AutoscalerAggregatedList where
        toJSON AutoscalerAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _aalNextPageToken,
                  Just ("kind" .= _aalKind),
                  ("items" .=) <$> _aalItems,
                  ("selfLink" .=) <$> _aalSelfLink,
                  ("warning" .=) <$> _aalWarning,
                  ("id" .=) <$> _aalId])

-- | A list of Router resources.
--
-- /See:/ 'routerAggregatedListItems' smart constructor.
newtype RouterAggregatedListItems = RouterAggregatedListItems'
    { _raliAddtional :: HashMap Text RoutersScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'raliAddtional'
routerAggregatedListItems
    :: HashMap Text RoutersScopedList -- ^ 'raliAddtional'
    -> RouterAggregatedListItems
routerAggregatedListItems pRaliAddtional_ =
    RouterAggregatedListItems'
    { _raliAddtional = _Coerce # pRaliAddtional_
    }

-- | Name of the scope containing this set of routers.
raliAddtional :: Lens' RouterAggregatedListItems (HashMap Text RoutersScopedList)
raliAddtional
  = lens _raliAddtional
      (\ s a -> s{_raliAddtional = a})
      . _Coerce

instance FromJSON RouterAggregatedListItems where
        parseJSON
          = withObject "RouterAggregatedListItems"
              (\ o ->
                 RouterAggregatedListItems' <$> (parseJSONObject o))

instance ToJSON RouterAggregatedListItems where
        toJSON = toJSON . _raliAddtional

-- | [Output Only] An informational warning that appears when the accelerator
-- types list is empty.
--
-- /See:/ 'acceleratorTypesScopedListWarning' smart constructor.
data AcceleratorTypesScopedListWarning = AcceleratorTypesScopedListWarning'
    { _atslwData    :: !(Maybe [AcceleratorTypesScopedListWarningDataItem])
    , _atslwCode    :: !(Maybe AcceleratorTypesScopedListWarningCode)
    , _atslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atslwData'
--
-- * 'atslwCode'
--
-- * 'atslwMessage'
acceleratorTypesScopedListWarning
    :: AcceleratorTypesScopedListWarning
acceleratorTypesScopedListWarning =
    AcceleratorTypesScopedListWarning'
    { _atslwData = Nothing
    , _atslwCode = Nothing
    , _atslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
atslwData :: Lens' AcceleratorTypesScopedListWarning [AcceleratorTypesScopedListWarningDataItem]
atslwData
  = lens _atslwData (\ s a -> s{_atslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
atslwCode :: Lens' AcceleratorTypesScopedListWarning (Maybe AcceleratorTypesScopedListWarningCode)
atslwCode
  = lens _atslwCode (\ s a -> s{_atslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
atslwMessage :: Lens' AcceleratorTypesScopedListWarning (Maybe Text)
atslwMessage
  = lens _atslwMessage (\ s a -> s{_atslwMessage = a})

instance FromJSON AcceleratorTypesScopedListWarning
         where
        parseJSON
          = withObject "AcceleratorTypesScopedListWarning"
              (\ o ->
                 AcceleratorTypesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AcceleratorTypesScopedListWarning
         where
        toJSON AcceleratorTypesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _atslwData,
                  ("code" .=) <$> _atslwCode,
                  ("message" .=) <$> _atslwMessage])

-- | A TargetTcpProxy resource. This resource defines a TCP proxy. (==
-- resource_for beta.targetTcpProxies ==) (== resource_for
-- v1.targetTcpProxies ==)
--
-- /See:/ 'targetTCPProxy' smart constructor.
data TargetTCPProxy = TargetTCPProxy'
    { _ttpService           :: !(Maybe Text)
    , _ttpKind              :: !Text
    , _ttpSelfLink          :: !(Maybe Text)
    , _ttpName              :: !(Maybe Text)
    , _ttpCreationTimestamp :: !(Maybe Text)
    , _ttpId                :: !(Maybe (Textual Word64))
    , _ttpProxyHeader       :: !(Maybe TargetTCPProxyProxyHeader)
    , _ttpDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetTCPProxy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ttpService'
--
-- * 'ttpKind'
--
-- * 'ttpSelfLink'
--
-- * 'ttpName'
--
-- * 'ttpCreationTimestamp'
--
-- * 'ttpId'
--
-- * 'ttpProxyHeader'
--
-- * 'ttpDescription'
targetTCPProxy
    :: TargetTCPProxy
targetTCPProxy =
    TargetTCPProxy'
    { _ttpService = Nothing
    , _ttpKind = "compute#targetTcpProxy"
    , _ttpSelfLink = Nothing
    , _ttpName = Nothing
    , _ttpCreationTimestamp = Nothing
    , _ttpId = Nothing
    , _ttpProxyHeader = Nothing
    , _ttpDescription = Nothing
    }

-- | URL to the BackendService resource.
ttpService :: Lens' TargetTCPProxy (Maybe Text)
ttpService
  = lens _ttpService (\ s a -> s{_ttpService = a})

-- | [Output Only] Type of the resource. Always compute#targetTcpProxy for
-- target TCP proxies.
ttpKind :: Lens' TargetTCPProxy Text
ttpKind = lens _ttpKind (\ s a -> s{_ttpKind = a})

-- | [Output Only] Server-defined URL for the resource.
ttpSelfLink :: Lens' TargetTCPProxy (Maybe Text)
ttpSelfLink
  = lens _ttpSelfLink (\ s a -> s{_ttpSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
ttpName :: Lens' TargetTCPProxy (Maybe Text)
ttpName = lens _ttpName (\ s a -> s{_ttpName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
ttpCreationTimestamp :: Lens' TargetTCPProxy (Maybe Text)
ttpCreationTimestamp
  = lens _ttpCreationTimestamp
      (\ s a -> s{_ttpCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
ttpId :: Lens' TargetTCPProxy (Maybe Word64)
ttpId
  = lens _ttpId (\ s a -> s{_ttpId = a}) .
      mapping _Coerce

-- | Specifies the type of proxy header to append before sending data to the
-- backend, either NONE or PROXY_V1. The default is NONE.
ttpProxyHeader :: Lens' TargetTCPProxy (Maybe TargetTCPProxyProxyHeader)
ttpProxyHeader
  = lens _ttpProxyHeader
      (\ s a -> s{_ttpProxyHeader = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
ttpDescription :: Lens' TargetTCPProxy (Maybe Text)
ttpDescription
  = lens _ttpDescription
      (\ s a -> s{_ttpDescription = a})

instance FromJSON TargetTCPProxy where
        parseJSON
          = withObject "TargetTCPProxy"
              (\ o ->
                 TargetTCPProxy' <$>
                   (o .:? "service") <*>
                     (o .:? "kind" .!= "compute#targetTcpProxy")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "proxyHeader")
                     <*> (o .:? "description"))

instance ToJSON TargetTCPProxy where
        toJSON TargetTCPProxy'{..}
          = object
              (catMaybes
                 [("service" .=) <$> _ttpService,
                  Just ("kind" .= _ttpKind),
                  ("selfLink" .=) <$> _ttpSelfLink,
                  ("name" .=) <$> _ttpName,
                  ("creationTimestamp" .=) <$> _ttpCreationTimestamp,
                  ("id" .=) <$> _ttpId,
                  ("proxyHeader" .=) <$> _ttpProxyHeader,
                  ("description" .=) <$> _ttpDescription])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'backendBucketListWarning' smart constructor.
data BackendBucketListWarning = BackendBucketListWarning'
    { _bblwData    :: !(Maybe [BackendBucketListWarningDataItem])
    , _bblwCode    :: !(Maybe BackendBucketListWarningCode)
    , _bblwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendBucketListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bblwData'
--
-- * 'bblwCode'
--
-- * 'bblwMessage'
backendBucketListWarning
    :: BackendBucketListWarning
backendBucketListWarning =
    BackendBucketListWarning'
    { _bblwData = Nothing
    , _bblwCode = Nothing
    , _bblwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
bblwData :: Lens' BackendBucketListWarning [BackendBucketListWarningDataItem]
bblwData
  = lens _bblwData (\ s a -> s{_bblwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
bblwCode :: Lens' BackendBucketListWarning (Maybe BackendBucketListWarningCode)
bblwCode = lens _bblwCode (\ s a -> s{_bblwCode = a})

-- | [Output Only] A human-readable description of the warning code.
bblwMessage :: Lens' BackendBucketListWarning (Maybe Text)
bblwMessage
  = lens _bblwMessage (\ s a -> s{_bblwMessage = a})

instance FromJSON BackendBucketListWarning where
        parseJSON
          = withObject "BackendBucketListWarning"
              (\ o ->
                 BackendBucketListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON BackendBucketListWarning where
        toJSON BackendBucketListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _bblwData,
                  ("code" .=) <$> _bblwCode,
                  ("message" .=) <$> _bblwMessage])

-- | Labels to apply to this image. These can be later modified by the
-- setLabels method.
--
-- /See:/ 'imageLabels' smart constructor.
newtype ImageLabels = ImageLabels'
    { _iAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ImageLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iAddtional'
imageLabels
    :: HashMap Text Text -- ^ 'iAddtional'
    -> ImageLabels
imageLabels pIAddtional_ =
    ImageLabels'
    { _iAddtional = _Coerce # pIAddtional_
    }

iAddtional :: Lens' ImageLabels (HashMap Text Text)
iAddtional
  = lens _iAddtional (\ s a -> s{_iAddtional = a}) .
      _Coerce

instance FromJSON ImageLabels where
        parseJSON
          = withObject "ImageLabels"
              (\ o -> ImageLabels' <$> (parseJSONObject o))

instance ToJSON ImageLabels where
        toJSON = toJSON . _iAddtional

--
-- /See:/ 'distributionPolicy' smart constructor.
newtype DistributionPolicy = DistributionPolicy'
    { _dpZones :: Maybe [DistributionPolicyZoneConfiguration]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DistributionPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dpZones'
distributionPolicy
    :: DistributionPolicy
distributionPolicy =
    DistributionPolicy'
    { _dpZones = Nothing
    }

-- | Zones where the regional managed instance group will create and manage
-- instances.
dpZones :: Lens' DistributionPolicy [DistributionPolicyZoneConfiguration]
dpZones
  = lens _dpZones (\ s a -> s{_dpZones = a}) . _Default
      . _Coerce

instance FromJSON DistributionPolicy where
        parseJSON
          = withObject "DistributionPolicy"
              (\ o ->
                 DistributionPolicy' <$> (o .:? "zones" .!= mempty))

instance ToJSON DistributionPolicy where
        toJSON DistributionPolicy'{..}
          = object (catMaybes [("zones" .=) <$> _dpZones])

--
-- /See:/ 'nodeGroupListWarningDataItem' smart constructor.
data NodeGroupListWarningDataItem = NodeGroupListWarningDataItem'
    { _nglwdiValue :: !(Maybe Text)
    , _nglwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nglwdiValue'
--
-- * 'nglwdiKey'
nodeGroupListWarningDataItem
    :: NodeGroupListWarningDataItem
nodeGroupListWarningDataItem =
    NodeGroupListWarningDataItem'
    { _nglwdiValue = Nothing
    , _nglwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
nglwdiValue :: Lens' NodeGroupListWarningDataItem (Maybe Text)
nglwdiValue
  = lens _nglwdiValue (\ s a -> s{_nglwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
nglwdiKey :: Lens' NodeGroupListWarningDataItem (Maybe Text)
nglwdiKey
  = lens _nglwdiKey (\ s a -> s{_nglwdiKey = a})

instance FromJSON NodeGroupListWarningDataItem where
        parseJSON
          = withObject "NodeGroupListWarningDataItem"
              (\ o ->
                 NodeGroupListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON NodeGroupListWarningDataItem where
        toJSON NodeGroupListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _nglwdiValue,
                  ("key" .=) <$> _nglwdiKey])

-- | Cloud Autoscaler policy.
--
-- /See:/ 'autoscalingPolicy' smart constructor.
data AutoscalingPolicy = AutoscalingPolicy'
    { _apCustomMetricUtilizations :: !(Maybe [AutoscalingPolicyCustomMetricUtilization])
    , _apMaxNumReplicas           :: !(Maybe (Textual Int32))
    , _apCPUUtilization           :: !(Maybe AutoscalingPolicyCPUUtilization)
    , _apLoadBalancingUtilization :: !(Maybe AutoscalingPolicyLoadBalancingUtilization)
    , _apMinNumReplicas           :: !(Maybe (Textual Int32))
    , _apCoolDownPeriodSec        :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalingPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'apCustomMetricUtilizations'
--
-- * 'apMaxNumReplicas'
--
-- * 'apCPUUtilization'
--
-- * 'apLoadBalancingUtilization'
--
-- * 'apMinNumReplicas'
--
-- * 'apCoolDownPeriodSec'
autoscalingPolicy
    :: AutoscalingPolicy
autoscalingPolicy =
    AutoscalingPolicy'
    { _apCustomMetricUtilizations = Nothing
    , _apMaxNumReplicas = Nothing
    , _apCPUUtilization = Nothing
    , _apLoadBalancingUtilization = Nothing
    , _apMinNumReplicas = Nothing
    , _apCoolDownPeriodSec = Nothing
    }

-- | Configuration parameters of autoscaling based on a custom metric.
apCustomMetricUtilizations :: Lens' AutoscalingPolicy [AutoscalingPolicyCustomMetricUtilization]
apCustomMetricUtilizations
  = lens _apCustomMetricUtilizations
      (\ s a -> s{_apCustomMetricUtilizations = a})
      . _Default
      . _Coerce

-- | The maximum number of instances that the autoscaler can scale up to.
-- This is required when creating or updating an autoscaler. The maximum
-- number of replicas should not be lower than minimal number of replicas.
apMaxNumReplicas :: Lens' AutoscalingPolicy (Maybe Int32)
apMaxNumReplicas
  = lens _apMaxNumReplicas
      (\ s a -> s{_apMaxNumReplicas = a})
      . mapping _Coerce

-- | Defines the CPU utilization policy that allows the autoscaler to scale
-- based on the average CPU utilization of a managed instance group.
apCPUUtilization :: Lens' AutoscalingPolicy (Maybe AutoscalingPolicyCPUUtilization)
apCPUUtilization
  = lens _apCPUUtilization
      (\ s a -> s{_apCPUUtilization = a})

-- | Configuration parameters of autoscaling based on load balancer.
apLoadBalancingUtilization :: Lens' AutoscalingPolicy (Maybe AutoscalingPolicyLoadBalancingUtilization)
apLoadBalancingUtilization
  = lens _apLoadBalancingUtilization
      (\ s a -> s{_apLoadBalancingUtilization = a})

-- | The minimum number of replicas that the autoscaler can scale down to.
-- This cannot be less than 0. If not provided, autoscaler will choose a
-- default value depending on maximum number of instances allowed.
apMinNumReplicas :: Lens' AutoscalingPolicy (Maybe Int32)
apMinNumReplicas
  = lens _apMinNumReplicas
      (\ s a -> s{_apMinNumReplicas = a})
      . mapping _Coerce

-- | The number of seconds that the autoscaler should wait before it starts
-- collecting information from a new instance. This prevents the autoscaler
-- from collecting information when the instance is initializing, during
-- which the collected usage would not be reliable. The default time
-- autoscaler waits is 60 seconds. Virtual machine initialization times
-- might vary because of numerous factors. We recommend that you test how
-- long an instance may take to initialize. To do this, create an instance
-- and time the startup process.
apCoolDownPeriodSec :: Lens' AutoscalingPolicy (Maybe Int32)
apCoolDownPeriodSec
  = lens _apCoolDownPeriodSec
      (\ s a -> s{_apCoolDownPeriodSec = a})
      . mapping _Coerce

instance FromJSON AutoscalingPolicy where
        parseJSON
          = withObject "AutoscalingPolicy"
              (\ o ->
                 AutoscalingPolicy' <$>
                   (o .:? "customMetricUtilizations" .!= mempty) <*>
                     (o .:? "maxNumReplicas")
                     <*> (o .:? "cpuUtilization")
                     <*> (o .:? "loadBalancingUtilization")
                     <*> (o .:? "minNumReplicas")
                     <*> (o .:? "coolDownPeriodSec"))

instance ToJSON AutoscalingPolicy where
        toJSON AutoscalingPolicy'{..}
          = object
              (catMaybes
                 [("customMetricUtilizations" .=) <$>
                    _apCustomMetricUtilizations,
                  ("maxNumReplicas" .=) <$> _apMaxNumReplicas,
                  ("cpuUtilization" .=) <$> _apCPUUtilization,
                  ("loadBalancingUtilization" .=) <$>
                    _apLoadBalancingUtilization,
                  ("minNumReplicas" .=) <$> _apMinNumReplicas,
                  ("coolDownPeriodSec" .=) <$> _apCoolDownPeriodSec])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'nodeGroupAggregatedListWarning' smart constructor.
data NodeGroupAggregatedListWarning = NodeGroupAggregatedListWarning'
    { _ngalwData    :: !(Maybe [NodeGroupAggregatedListWarningDataItem])
    , _ngalwCode    :: !(Maybe NodeGroupAggregatedListWarningCode)
    , _ngalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngalwData'
--
-- * 'ngalwCode'
--
-- * 'ngalwMessage'
nodeGroupAggregatedListWarning
    :: NodeGroupAggregatedListWarning
nodeGroupAggregatedListWarning =
    NodeGroupAggregatedListWarning'
    { _ngalwData = Nothing
    , _ngalwCode = Nothing
    , _ngalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ngalwData :: Lens' NodeGroupAggregatedListWarning [NodeGroupAggregatedListWarningDataItem]
ngalwData
  = lens _ngalwData (\ s a -> s{_ngalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ngalwCode :: Lens' NodeGroupAggregatedListWarning (Maybe NodeGroupAggregatedListWarningCode)
ngalwCode
  = lens _ngalwCode (\ s a -> s{_ngalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ngalwMessage :: Lens' NodeGroupAggregatedListWarning (Maybe Text)
ngalwMessage
  = lens _ngalwMessage (\ s a -> s{_ngalwMessage = a})

instance FromJSON NodeGroupAggregatedListWarning
         where
        parseJSON
          = withObject "NodeGroupAggregatedListWarning"
              (\ o ->
                 NodeGroupAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeGroupAggregatedListWarning where
        toJSON NodeGroupAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ngalwData,
                  ("code" .=) <$> _ngalwCode,
                  ("message" .=) <$> _ngalwMessage])

-- | Contains a list of region resources.
--
-- /See:/ 'regionList' smart constructor.
data RegionList = RegionList'
    { _regNextPageToken :: !(Maybe Text)
    , _regKind          :: !Text
    , _regItems         :: !(Maybe [Region])
    , _regSelfLink      :: !(Maybe Text)
    , _regWarning       :: !(Maybe RegionListWarning)
    , _regId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'regNextPageToken'
--
-- * 'regKind'
--
-- * 'regItems'
--
-- * 'regSelfLink'
--
-- * 'regWarning'
--
-- * 'regId'
regionList
    :: RegionList
regionList =
    RegionList'
    { _regNextPageToken = Nothing
    , _regKind = "compute#regionList"
    , _regItems = Nothing
    , _regSelfLink = Nothing
    , _regWarning = Nothing
    , _regId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
regNextPageToken :: Lens' RegionList (Maybe Text)
regNextPageToken
  = lens _regNextPageToken
      (\ s a -> s{_regNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#regionList for lists of
-- regions.
regKind :: Lens' RegionList Text
regKind = lens _regKind (\ s a -> s{_regKind = a})

-- | A list of Region resources.
regItems :: Lens' RegionList [Region]
regItems
  = lens _regItems (\ s a -> s{_regItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
regSelfLink :: Lens' RegionList (Maybe Text)
regSelfLink
  = lens _regSelfLink (\ s a -> s{_regSelfLink = a})

-- | [Output Only] Informational warning message.
regWarning :: Lens' RegionList (Maybe RegionListWarning)
regWarning
  = lens _regWarning (\ s a -> s{_regWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
regId :: Lens' RegionList (Maybe Text)
regId = lens _regId (\ s a -> s{_regId = a})

instance FromJSON RegionList where
        parseJSON
          = withObject "RegionList"
              (\ o ->
                 RegionList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#regionList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON RegionList where
        toJSON RegionList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _regNextPageToken,
                  Just ("kind" .= _regKind),
                  ("items" .=) <$> _regItems,
                  ("selfLink" .=) <$> _regSelfLink,
                  ("warning" .=) <$> _regWarning,
                  ("id" .=) <$> _regId])

-- | Node Affinity: the configuration of desired nodes onto which this
-- Instance could be scheduled.
--
-- /See:/ 'schedulingNodeAffinity' smart constructor.
data SchedulingNodeAffinity = SchedulingNodeAffinity'
    { _snaOperator :: !(Maybe SchedulingNodeAffinityOperator)
    , _snaValues   :: !(Maybe [Text])
    , _snaKey      :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SchedulingNodeAffinity' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'snaOperator'
--
-- * 'snaValues'
--
-- * 'snaKey'
schedulingNodeAffinity
    :: SchedulingNodeAffinity
schedulingNodeAffinity =
    SchedulingNodeAffinity'
    { _snaOperator = Nothing
    , _snaValues = Nothing
    , _snaKey = Nothing
    }

-- | Defines the operation of node selection.
snaOperator :: Lens' SchedulingNodeAffinity (Maybe SchedulingNodeAffinityOperator)
snaOperator
  = lens _snaOperator (\ s a -> s{_snaOperator = a})

-- | Corresponds to the label values of Node resource.
snaValues :: Lens' SchedulingNodeAffinity [Text]
snaValues
  = lens _snaValues (\ s a -> s{_snaValues = a}) .
      _Default
      . _Coerce

-- | Corresponds to the label key of Node resource.
snaKey :: Lens' SchedulingNodeAffinity (Maybe Text)
snaKey = lens _snaKey (\ s a -> s{_snaKey = a})

instance FromJSON SchedulingNodeAffinity where
        parseJSON
          = withObject "SchedulingNodeAffinity"
              (\ o ->
                 SchedulingNodeAffinity' <$>
                   (o .:? "operator") <*> (o .:? "values" .!= mempty)
                     <*> (o .:? "key"))

instance ToJSON SchedulingNodeAffinity where
        toJSON SchedulingNodeAffinity'{..}
          = object
              (catMaybes
                 [("operator" .=) <$> _snaOperator,
                  ("values" .=) <$> _snaValues,
                  ("key" .=) <$> _snaKey])

-- | Contains a list of VpnTunnel resources.
--
-- /See:/ 'vpnTunnelList' smart constructor.
data VPNTunnelList = VPNTunnelList'
    { _vtlNextPageToken :: !(Maybe Text)
    , _vtlKind          :: !Text
    , _vtlItems         :: !(Maybe [VPNTunnel])
    , _vtlSelfLink      :: !(Maybe Text)
    , _vtlWarning       :: !(Maybe VPNTunnelListWarning)
    , _vtlId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtlNextPageToken'
--
-- * 'vtlKind'
--
-- * 'vtlItems'
--
-- * 'vtlSelfLink'
--
-- * 'vtlWarning'
--
-- * 'vtlId'
vpnTunnelList
    :: VPNTunnelList
vpnTunnelList =
    VPNTunnelList'
    { _vtlNextPageToken = Nothing
    , _vtlKind = "compute#vpnTunnelList"
    , _vtlItems = Nothing
    , _vtlSelfLink = Nothing
    , _vtlWarning = Nothing
    , _vtlId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
vtlNextPageToken :: Lens' VPNTunnelList (Maybe Text)
vtlNextPageToken
  = lens _vtlNextPageToken
      (\ s a -> s{_vtlNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#vpnTunnel for VPN
-- tunnels.
vtlKind :: Lens' VPNTunnelList Text
vtlKind = lens _vtlKind (\ s a -> s{_vtlKind = a})

-- | A list of VpnTunnel resources.
vtlItems :: Lens' VPNTunnelList [VPNTunnel]
vtlItems
  = lens _vtlItems (\ s a -> s{_vtlItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
vtlSelfLink :: Lens' VPNTunnelList (Maybe Text)
vtlSelfLink
  = lens _vtlSelfLink (\ s a -> s{_vtlSelfLink = a})

-- | [Output Only] Informational warning message.
vtlWarning :: Lens' VPNTunnelList (Maybe VPNTunnelListWarning)
vtlWarning
  = lens _vtlWarning (\ s a -> s{_vtlWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
vtlId :: Lens' VPNTunnelList (Maybe Text)
vtlId = lens _vtlId (\ s a -> s{_vtlId = a})

instance FromJSON VPNTunnelList where
        parseJSON
          = withObject "VPNTunnelList"
              (\ o ->
                 VPNTunnelList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#vpnTunnelList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON VPNTunnelList where
        toJSON VPNTunnelList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _vtlNextPageToken,
                  Just ("kind" .= _vtlKind),
                  ("items" .=) <$> _vtlItems,
                  ("selfLink" .=) <$> _vtlSelfLink,
                  ("warning" .=) <$> _vtlWarning,
                  ("id" .=) <$> _vtlId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'acceleratorTypeAggregatedListWarning' smart constructor.
data AcceleratorTypeAggregatedListWarning = AcceleratorTypeAggregatedListWarning'
    { _atalwData    :: !(Maybe [AcceleratorTypeAggregatedListWarningDataItem])
    , _atalwCode    :: !(Maybe AcceleratorTypeAggregatedListWarningCode)
    , _atalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorTypeAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'atalwData'
--
-- * 'atalwCode'
--
-- * 'atalwMessage'
acceleratorTypeAggregatedListWarning
    :: AcceleratorTypeAggregatedListWarning
acceleratorTypeAggregatedListWarning =
    AcceleratorTypeAggregatedListWarning'
    { _atalwData = Nothing
    , _atalwCode = Nothing
    , _atalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
atalwData :: Lens' AcceleratorTypeAggregatedListWarning [AcceleratorTypeAggregatedListWarningDataItem]
atalwData
  = lens _atalwData (\ s a -> s{_atalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
atalwCode :: Lens' AcceleratorTypeAggregatedListWarning (Maybe AcceleratorTypeAggregatedListWarningCode)
atalwCode
  = lens _atalwCode (\ s a -> s{_atalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
atalwMessage :: Lens' AcceleratorTypeAggregatedListWarning (Maybe Text)
atalwMessage
  = lens _atalwMessage (\ s a -> s{_atalwMessage = a})

instance FromJSON
         AcceleratorTypeAggregatedListWarning where
        parseJSON
          = withObject "AcceleratorTypeAggregatedListWarning"
              (\ o ->
                 AcceleratorTypeAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AcceleratorTypeAggregatedListWarning
         where
        toJSON AcceleratorTypeAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _atalwData,
                  ("code" .=) <$> _atalwCode,
                  ("message" .=) <$> _atalwMessage])

--
-- /See:/ 'regionInstanceGroupsListInstancesWarningDataItem' smart constructor.
data RegionInstanceGroupsListInstancesWarningDataItem = RegionInstanceGroupsListInstancesWarningDataItem'
    { _rigliwdiValue :: !(Maybe Text)
    , _rigliwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupsListInstancesWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigliwdiValue'
--
-- * 'rigliwdiKey'
regionInstanceGroupsListInstancesWarningDataItem
    :: RegionInstanceGroupsListInstancesWarningDataItem
regionInstanceGroupsListInstancesWarningDataItem =
    RegionInstanceGroupsListInstancesWarningDataItem'
    { _rigliwdiValue = Nothing
    , _rigliwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
rigliwdiValue :: Lens' RegionInstanceGroupsListInstancesWarningDataItem (Maybe Text)
rigliwdiValue
  = lens _rigliwdiValue
      (\ s a -> s{_rigliwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
rigliwdiKey :: Lens' RegionInstanceGroupsListInstancesWarningDataItem (Maybe Text)
rigliwdiKey
  = lens _rigliwdiKey (\ s a -> s{_rigliwdiKey = a})

instance FromJSON
         RegionInstanceGroupsListInstancesWarningDataItem
         where
        parseJSON
          = withObject
              "RegionInstanceGroupsListInstancesWarningDataItem"
              (\ o ->
                 RegionInstanceGroupsListInstancesWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         RegionInstanceGroupsListInstancesWarningDataItem
         where
        toJSON
          RegionInstanceGroupsListInstancesWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _rigliwdiValue,
                  ("key" .=) <$> _rigliwdiKey])

-- | Represents an Interconnects resource. The Interconnects resource is a
-- dedicated connection between Google\'s network and your on-premises
-- network. For more information, see the Dedicated overview page. (==
-- resource_for v1.interconnects ==) (== resource_for beta.interconnects
-- ==)
--
-- /See:/ 'interconnect' smart constructor.
data Interconnect = Interconnect'
    { _iiState                   :: !(Maybe InterconnectState)
    , _iiInterconnectType        :: !(Maybe InterconnectInterconnectType)
    , _iiLocation                :: !(Maybe Text)
    , _iiPeerIPAddress           :: !(Maybe Text)
    , _iiKind                    :: !Text
    , _iiExpectedOutages         :: !(Maybe [InterconnectOutageNotification])
    , _iiProvisionedLinkCount    :: !(Maybe (Textual Int32))
    , _iiCustomerName            :: !(Maybe Text)
    , _iiRequestedLinkCount      :: !(Maybe (Textual Int32))
    , _iiOperationalStatus       :: !(Maybe InterconnectOperationalStatus)
    , _iiSelfLink                :: !(Maybe Text)
    , _iiName                    :: !(Maybe Text)
    , _iiGoogleReferenceId       :: !(Maybe Text)
    , _iiCreationTimestamp       :: !(Maybe Text)
    , _iiAdminEnabled            :: !(Maybe Bool)
    , _iiId                      :: !(Maybe (Textual Word64))
    , _iiInterconnectAttachments :: !(Maybe [Text])
    , _iiLinkType                :: !(Maybe InterconnectLinkType)
    , _iiGoogleIPAddress         :: !(Maybe Text)
    , _iiDescription             :: !(Maybe Text)
    , _iiNocContactEmail         :: !(Maybe Text)
    , _iiCircuitInfos            :: !(Maybe [InterconnectCircuitInfo])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Interconnect' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iiState'
--
-- * 'iiInterconnectType'
--
-- * 'iiLocation'
--
-- * 'iiPeerIPAddress'
--
-- * 'iiKind'
--
-- * 'iiExpectedOutages'
--
-- * 'iiProvisionedLinkCount'
--
-- * 'iiCustomerName'
--
-- * 'iiRequestedLinkCount'
--
-- * 'iiOperationalStatus'
--
-- * 'iiSelfLink'
--
-- * 'iiName'
--
-- * 'iiGoogleReferenceId'
--
-- * 'iiCreationTimestamp'
--
-- * 'iiAdminEnabled'
--
-- * 'iiId'
--
-- * 'iiInterconnectAttachments'
--
-- * 'iiLinkType'
--
-- * 'iiGoogleIPAddress'
--
-- * 'iiDescription'
--
-- * 'iiNocContactEmail'
--
-- * 'iiCircuitInfos'
interconnect
    :: Interconnect
interconnect =
    Interconnect'
    { _iiState = Nothing
    , _iiInterconnectType = Nothing
    , _iiLocation = Nothing
    , _iiPeerIPAddress = Nothing
    , _iiKind = "compute#interconnect"
    , _iiExpectedOutages = Nothing
    , _iiProvisionedLinkCount = Nothing
    , _iiCustomerName = Nothing
    , _iiRequestedLinkCount = Nothing
    , _iiOperationalStatus = Nothing
    , _iiSelfLink = Nothing
    , _iiName = Nothing
    , _iiGoogleReferenceId = Nothing
    , _iiCreationTimestamp = Nothing
    , _iiAdminEnabled = Nothing
    , _iiId = Nothing
    , _iiInterconnectAttachments = Nothing
    , _iiLinkType = Nothing
    , _iiGoogleIPAddress = Nothing
    , _iiDescription = Nothing
    , _iiNocContactEmail = Nothing
    , _iiCircuitInfos = Nothing
    }

-- | [Output Only] The current state of whether or not this Interconnect is
-- functional.
iiState :: Lens' Interconnect (Maybe InterconnectState)
iiState = lens _iiState (\ s a -> s{_iiState = a})

-- | Type of interconnect. Note that \"IT_PRIVATE\" has been deprecated in
-- favor of \"DEDICATED\"
iiInterconnectType :: Lens' Interconnect (Maybe InterconnectInterconnectType)
iiInterconnectType
  = lens _iiInterconnectType
      (\ s a -> s{_iiInterconnectType = a})

-- | URL of the InterconnectLocation object that represents where this
-- connection is to be provisioned.
iiLocation :: Lens' Interconnect (Maybe Text)
iiLocation
  = lens _iiLocation (\ s a -> s{_iiLocation = a})

-- | [Output Only] IP address configured on the customer side of the
-- Interconnect link. The customer should configure this IP address during
-- turnup when prompted by Google NOC. This can be used only for ping
-- tests.
iiPeerIPAddress :: Lens' Interconnect (Maybe Text)
iiPeerIPAddress
  = lens _iiPeerIPAddress
      (\ s a -> s{_iiPeerIPAddress = a})

-- | [Output Only] Type of the resource. Always compute#interconnect for
-- interconnects.
iiKind :: Lens' Interconnect Text
iiKind = lens _iiKind (\ s a -> s{_iiKind = a})

-- | [Output Only] A list of outages expected for this Interconnect.
iiExpectedOutages :: Lens' Interconnect [InterconnectOutageNotification]
iiExpectedOutages
  = lens _iiExpectedOutages
      (\ s a -> s{_iiExpectedOutages = a})
      . _Default
      . _Coerce

-- | [Output Only] Number of links actually provisioned in this interconnect.
iiProvisionedLinkCount :: Lens' Interconnect (Maybe Int32)
iiProvisionedLinkCount
  = lens _iiProvisionedLinkCount
      (\ s a -> s{_iiProvisionedLinkCount = a})
      . mapping _Coerce

-- | Customer name, to put in the Letter of Authorization as the party
-- authorized to request a crossconnect.
iiCustomerName :: Lens' Interconnect (Maybe Text)
iiCustomerName
  = lens _iiCustomerName
      (\ s a -> s{_iiCustomerName = a})

-- | Target number of physical links in the link bundle, as requested by the
-- customer.
iiRequestedLinkCount :: Lens' Interconnect (Maybe Int32)
iiRequestedLinkCount
  = lens _iiRequestedLinkCount
      (\ s a -> s{_iiRequestedLinkCount = a})
      . mapping _Coerce

-- | [Output Only] The current status of whether or not this Interconnect is
-- functional.
iiOperationalStatus :: Lens' Interconnect (Maybe InterconnectOperationalStatus)
iiOperationalStatus
  = lens _iiOperationalStatus
      (\ s a -> s{_iiOperationalStatus = a})

-- | [Output Only] Server-defined URL for the resource.
iiSelfLink :: Lens' Interconnect (Maybe Text)
iiSelfLink
  = lens _iiSelfLink (\ s a -> s{_iiSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
iiName :: Lens' Interconnect (Maybe Text)
iiName = lens _iiName (\ s a -> s{_iiName = a})

-- | [Output Only] Google reference ID; to be used when raising support
-- tickets with Google or otherwise to debug backend connectivity issues.
iiGoogleReferenceId :: Lens' Interconnect (Maybe Text)
iiGoogleReferenceId
  = lens _iiGoogleReferenceId
      (\ s a -> s{_iiGoogleReferenceId = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
iiCreationTimestamp :: Lens' Interconnect (Maybe Text)
iiCreationTimestamp
  = lens _iiCreationTimestamp
      (\ s a -> s{_iiCreationTimestamp = a})

-- | Administrative status of the interconnect. When this is set to true, the
-- Interconnect is functional and can carry traffic. When set to false, no
-- packets can be carried over the interconnect and no BGP routes are
-- exchanged over it. By default, the status is set to true.
iiAdminEnabled :: Lens' Interconnect (Maybe Bool)
iiAdminEnabled
  = lens _iiAdminEnabled
      (\ s a -> s{_iiAdminEnabled = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
iiId :: Lens' Interconnect (Maybe Word64)
iiId
  = lens _iiId (\ s a -> s{_iiId = a}) .
      mapping _Coerce

-- | [Output Only] A list of the URLs of all InterconnectAttachments
-- configured to use this Interconnect.
iiInterconnectAttachments :: Lens' Interconnect [Text]
iiInterconnectAttachments
  = lens _iiInterconnectAttachments
      (\ s a -> s{_iiInterconnectAttachments = a})
      . _Default
      . _Coerce

-- | Type of link requested. This field indicates speed of each of the links
-- in the bundle, not the entire bundle. Only 10G per link is allowed for a
-- dedicated interconnect. Options: Ethernet_10G_LR
iiLinkType :: Lens' Interconnect (Maybe InterconnectLinkType)
iiLinkType
  = lens _iiLinkType (\ s a -> s{_iiLinkType = a})

-- | [Output Only] IP address configured on the Google side of the
-- Interconnect link. This can be used only for ping tests.
iiGoogleIPAddress :: Lens' Interconnect (Maybe Text)
iiGoogleIPAddress
  = lens _iiGoogleIPAddress
      (\ s a -> s{_iiGoogleIPAddress = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
iiDescription :: Lens' Interconnect (Maybe Text)
iiDescription
  = lens _iiDescription
      (\ s a -> s{_iiDescription = a})

-- | Email address to contact the customer NOC for operations and maintenance
-- notifications regarding this Interconnect. If specified, this will be
-- used for notifications in addition to all other forms described, such as
-- Stackdriver logs alerting and Cloud Notifications.
iiNocContactEmail :: Lens' Interconnect (Maybe Text)
iiNocContactEmail
  = lens _iiNocContactEmail
      (\ s a -> s{_iiNocContactEmail = a})

-- | [Output Only] A list of CircuitInfo objects, that describe the
-- individual circuits in this LAG.
iiCircuitInfos :: Lens' Interconnect [InterconnectCircuitInfo]
iiCircuitInfos
  = lens _iiCircuitInfos
      (\ s a -> s{_iiCircuitInfos = a})
      . _Default
      . _Coerce

instance FromJSON Interconnect where
        parseJSON
          = withObject "Interconnect"
              (\ o ->
                 Interconnect' <$>
                   (o .:? "state") <*> (o .:? "interconnectType") <*>
                     (o .:? "location")
                     <*> (o .:? "peerIpAddress")
                     <*> (o .:? "kind" .!= "compute#interconnect")
                     <*> (o .:? "expectedOutages" .!= mempty)
                     <*> (o .:? "provisionedLinkCount")
                     <*> (o .:? "customerName")
                     <*> (o .:? "requestedLinkCount")
                     <*> (o .:? "operationalStatus")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "googleReferenceId")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "adminEnabled")
                     <*> (o .:? "id")
                     <*> (o .:? "interconnectAttachments" .!= mempty)
                     <*> (o .:? "linkType")
                     <*> (o .:? "googleIpAddress")
                     <*> (o .:? "description")
                     <*> (o .:? "nocContactEmail")
                     <*> (o .:? "circuitInfos" .!= mempty))

instance ToJSON Interconnect where
        toJSON Interconnect'{..}
          = object
              (catMaybes
                 [("state" .=) <$> _iiState,
                  ("interconnectType" .=) <$> _iiInterconnectType,
                  ("location" .=) <$> _iiLocation,
                  ("peerIpAddress" .=) <$> _iiPeerIPAddress,
                  Just ("kind" .= _iiKind),
                  ("expectedOutages" .=) <$> _iiExpectedOutages,
                  ("provisionedLinkCount" .=) <$>
                    _iiProvisionedLinkCount,
                  ("customerName" .=) <$> _iiCustomerName,
                  ("requestedLinkCount" .=) <$> _iiRequestedLinkCount,
                  ("operationalStatus" .=) <$> _iiOperationalStatus,
                  ("selfLink" .=) <$> _iiSelfLink,
                  ("name" .=) <$> _iiName,
                  ("googleReferenceId" .=) <$> _iiGoogleReferenceId,
                  ("creationTimestamp" .=) <$> _iiCreationTimestamp,
                  ("adminEnabled" .=) <$> _iiAdminEnabled,
                  ("id" .=) <$> _iiId,
                  ("interconnectAttachments" .=) <$>
                    _iiInterconnectAttachments,
                  ("linkType" .=) <$> _iiLinkType,
                  ("googleIpAddress" .=) <$> _iiGoogleIPAddress,
                  ("description" .=) <$> _iiDescription,
                  ("nocContactEmail" .=) <$> _iiNocContactEmail,
                  ("circuitInfos" .=) <$> _iiCircuitInfos])

--
-- /See:/ 'machineTypeScratchDisksItem' smart constructor.
newtype MachineTypeScratchDisksItem = MachineTypeScratchDisksItem'
    { _mtsdiDiskGb :: Maybe (Textual Int32)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypeScratchDisksItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtsdiDiskGb'
machineTypeScratchDisksItem
    :: MachineTypeScratchDisksItem
machineTypeScratchDisksItem =
    MachineTypeScratchDisksItem'
    { _mtsdiDiskGb = Nothing
    }

-- | Size of the scratch disk, defined in GB.
mtsdiDiskGb :: Lens' MachineTypeScratchDisksItem (Maybe Int32)
mtsdiDiskGb
  = lens _mtsdiDiskGb (\ s a -> s{_mtsdiDiskGb = a}) .
      mapping _Coerce

instance FromJSON MachineTypeScratchDisksItem where
        parseJSON
          = withObject "MachineTypeScratchDisksItem"
              (\ o ->
                 MachineTypeScratchDisksItem' <$> (o .:? "diskGb"))

instance ToJSON MachineTypeScratchDisksItem where
        toJSON MachineTypeScratchDisksItem'{..}
          = object (catMaybes [("diskGb" .=) <$> _mtsdiDiskGb])

--
-- /See:/ 'subnetworksScopedListWarningDataItem' smart constructor.
data SubnetworksScopedListWarningDataItem = SubnetworksScopedListWarningDataItem'
    { _sslwdiValue :: !(Maybe Text)
    , _sslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworksScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sslwdiValue'
--
-- * 'sslwdiKey'
subnetworksScopedListWarningDataItem
    :: SubnetworksScopedListWarningDataItem
subnetworksScopedListWarningDataItem =
    SubnetworksScopedListWarningDataItem'
    { _sslwdiValue = Nothing
    , _sslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
sslwdiValue :: Lens' SubnetworksScopedListWarningDataItem (Maybe Text)
sslwdiValue
  = lens _sslwdiValue (\ s a -> s{_sslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
sslwdiKey :: Lens' SubnetworksScopedListWarningDataItem (Maybe Text)
sslwdiKey
  = lens _sslwdiKey (\ s a -> s{_sslwdiKey = a})

instance FromJSON
         SubnetworksScopedListWarningDataItem where
        parseJSON
          = withObject "SubnetworksScopedListWarningDataItem"
              (\ o ->
                 SubnetworksScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON SubnetworksScopedListWarningDataItem
         where
        toJSON SubnetworksScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _sslwdiValue,
                  ("key" .=) <$> _sslwdiKey])

--
-- /See:/ 'machineTypesScopedList' smart constructor.
data MachineTypesScopedList = MachineTypesScopedList'
    { _mtslMachineTypes :: !(Maybe [MachineType])
    , _mtslWarning      :: !(Maybe MachineTypesScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypesScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtslMachineTypes'
--
-- * 'mtslWarning'
machineTypesScopedList
    :: MachineTypesScopedList
machineTypesScopedList =
    MachineTypesScopedList'
    { _mtslMachineTypes = Nothing
    , _mtslWarning = Nothing
    }

-- | [Output Only] A list of machine types contained in this scope.
mtslMachineTypes :: Lens' MachineTypesScopedList [MachineType]
mtslMachineTypes
  = lens _mtslMachineTypes
      (\ s a -> s{_mtslMachineTypes = a})
      . _Default
      . _Coerce

-- | [Output Only] An informational warning that appears when the machine
-- types list is empty.
mtslWarning :: Lens' MachineTypesScopedList (Maybe MachineTypesScopedListWarning)
mtslWarning
  = lens _mtslWarning (\ s a -> s{_mtslWarning = a})

instance FromJSON MachineTypesScopedList where
        parseJSON
          = withObject "MachineTypesScopedList"
              (\ o ->
                 MachineTypesScopedList' <$>
                   (o .:? "machineTypes" .!= mempty) <*>
                     (o .:? "warning"))

instance ToJSON MachineTypesScopedList where
        toJSON MachineTypesScopedList'{..}
          = object
              (catMaybes
                 [("machineTypes" .=) <$> _mtslMachineTypes,
                  ("warning" .=) <$> _mtslWarning])

-- | A Subnetwork resource. (== resource_for beta.subnetworks ==) (==
-- resource_for v1.subnetworks ==)
--
-- /See:/ 'subnetwork' smart constructor.
data Subnetwork = Subnetwork'
    { _subKind                  :: !Text
    , _subFingerprint           :: !(Maybe Bytes)
    , _subNetwork               :: !(Maybe Text)
    , _subGatewayAddress        :: !(Maybe Text)
    , _subSelfLink              :: !(Maybe Text)
    , _subEnableFlowLogs        :: !(Maybe Bool)
    , _subName                  :: !(Maybe Text)
    , _subSecondaryIPRanges     :: !(Maybe [SubnetworkSecondaryRange])
    , _subCreationTimestamp     :: !(Maybe Text)
    , _subIPCIdRRange           :: !(Maybe Text)
    , _subId                    :: !(Maybe (Textual Word64))
    , _subRegion                :: !(Maybe Text)
    , _subDescription           :: !(Maybe Text)
    , _subPrivateIPGoogleAccess :: !(Maybe Bool)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Subnetwork' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'subKind'
--
-- * 'subFingerprint'
--
-- * 'subNetwork'
--
-- * 'subGatewayAddress'
--
-- * 'subSelfLink'
--
-- * 'subEnableFlowLogs'
--
-- * 'subName'
--
-- * 'subSecondaryIPRanges'
--
-- * 'subCreationTimestamp'
--
-- * 'subIPCIdRRange'
--
-- * 'subId'
--
-- * 'subRegion'
--
-- * 'subDescription'
--
-- * 'subPrivateIPGoogleAccess'
subnetwork
    :: Subnetwork
subnetwork =
    Subnetwork'
    { _subKind = "compute#subnetwork"
    , _subFingerprint = Nothing
    , _subNetwork = Nothing
    , _subGatewayAddress = Nothing
    , _subSelfLink = Nothing
    , _subEnableFlowLogs = Nothing
    , _subName = Nothing
    , _subSecondaryIPRanges = Nothing
    , _subCreationTimestamp = Nothing
    , _subIPCIdRRange = Nothing
    , _subId = Nothing
    , _subRegion = Nothing
    , _subDescription = Nothing
    , _subPrivateIPGoogleAccess = Nothing
    }

-- | [Output Only] Type of the resource. Always compute#subnetwork for
-- Subnetwork resources.
subKind :: Lens' Subnetwork Text
subKind = lens _subKind (\ s a -> s{_subKind = a})

-- | Fingerprint of this resource. A hash of the contents stored in this
-- object. This field is used in optimistic locking. This field will be
-- ignored when inserting a Subnetwork. An up-to-date fingerprint must be
-- provided in order to update the Subnetwork, otherwise the request will
-- fail with error 412 conditionNotMet. To see the latest fingerprint, make
-- a get() request to retrieve a Subnetwork.
subFingerprint :: Lens' Subnetwork (Maybe ByteString)
subFingerprint
  = lens _subFingerprint
      (\ s a -> s{_subFingerprint = a})
      . mapping _Bytes

-- | The URL of the network to which this subnetwork belongs, provided by the
-- client when initially creating the subnetwork. Only networks that are in
-- the distributed mode can have subnetworks. This field can be set only at
-- resource creation time.
subNetwork :: Lens' Subnetwork (Maybe Text)
subNetwork
  = lens _subNetwork (\ s a -> s{_subNetwork = a})

-- | [Output Only] The gateway address for default routes to reach
-- destination addresses outside this subnetwork.
subGatewayAddress :: Lens' Subnetwork (Maybe Text)
subGatewayAddress
  = lens _subGatewayAddress
      (\ s a -> s{_subGatewayAddress = a})

-- | [Output Only] Server-defined URL for the resource.
subSelfLink :: Lens' Subnetwork (Maybe Text)
subSelfLink
  = lens _subSelfLink (\ s a -> s{_subSelfLink = a})

-- | Whether to enable flow logging for this subnetwork. If this field is not
-- explicitly set, it will not appear in get listings. If not set the
-- default behavior is to disable flow logging.
subEnableFlowLogs :: Lens' Subnetwork (Maybe Bool)
subEnableFlowLogs
  = lens _subEnableFlowLogs
      (\ s a -> s{_subEnableFlowLogs = a})

-- | The name of the resource, provided by the client when initially creating
-- the resource. The name must be 1-63 characters long, and comply with
-- RFC1035. Specifically, the name must be 1-63 characters long and match
-- the regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the
-- first character must be a lowercase letter, and all following characters
-- must be a dash, lowercase letter, or digit, except the last character,
-- which cannot be a dash.
subName :: Lens' Subnetwork (Maybe Text)
subName = lens _subName (\ s a -> s{_subName = a})

-- | An array of configurations for secondary IP ranges for VM instances
-- contained in this subnetwork. The primary IP of such VM must belong to
-- the primary ipCidrRange of the subnetwork. The alias IPs may belong to
-- either primary or secondary ranges. This field can be updated with a
-- patch request.
subSecondaryIPRanges :: Lens' Subnetwork [SubnetworkSecondaryRange]
subSecondaryIPRanges
  = lens _subSecondaryIPRanges
      (\ s a -> s{_subSecondaryIPRanges = a})
      . _Default
      . _Coerce

-- | [Output Only] Creation timestamp in RFC3339 text format.
subCreationTimestamp :: Lens' Subnetwork (Maybe Text)
subCreationTimestamp
  = lens _subCreationTimestamp
      (\ s a -> s{_subCreationTimestamp = a})

-- | The range of internal addresses that are owned by this subnetwork.
-- Provide this property when you create the subnetwork. For example,
-- 10.0.0.0\/8 or 192.168.0.0\/16. Ranges must be unique and
-- non-overlapping within a network. Only IPv4 is supported. This field can
-- be set only at resource creation time.
subIPCIdRRange :: Lens' Subnetwork (Maybe Text)
subIPCIdRRange
  = lens _subIPCIdRRange
      (\ s a -> s{_subIPCIdRRange = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
subId :: Lens' Subnetwork (Maybe Word64)
subId
  = lens _subId (\ s a -> s{_subId = a}) .
      mapping _Coerce

-- | URL of the region where the Subnetwork resides. This field can be set
-- only at resource creation time.
subRegion :: Lens' Subnetwork (Maybe Text)
subRegion
  = lens _subRegion (\ s a -> s{_subRegion = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource. This field can be set only at resource creation
-- time.
subDescription :: Lens' Subnetwork (Maybe Text)
subDescription
  = lens _subDescription
      (\ s a -> s{_subDescription = a})

-- | Whether the VMs in this subnet can access Google services without
-- assigned external IP addresses. This field can be both set at resource
-- creation time and updated using setPrivateIpGoogleAccess.
subPrivateIPGoogleAccess :: Lens' Subnetwork (Maybe Bool)
subPrivateIPGoogleAccess
  = lens _subPrivateIPGoogleAccess
      (\ s a -> s{_subPrivateIPGoogleAccess = a})

instance FromJSON Subnetwork where
        parseJSON
          = withObject "Subnetwork"
              (\ o ->
                 Subnetwork' <$>
                   (o .:? "kind" .!= "compute#subnetwork") <*>
                     (o .:? "fingerprint")
                     <*> (o .:? "network")
                     <*> (o .:? "gatewayAddress")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "enableFlowLogs")
                     <*> (o .:? "name")
                     <*> (o .:? "secondaryIpRanges" .!= mempty)
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "ipCidrRange")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "description")
                     <*> (o .:? "privateIpGoogleAccess"))

instance ToJSON Subnetwork where
        toJSON Subnetwork'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _subKind),
                  ("fingerprint" .=) <$> _subFingerprint,
                  ("network" .=) <$> _subNetwork,
                  ("gatewayAddress" .=) <$> _subGatewayAddress,
                  ("selfLink" .=) <$> _subSelfLink,
                  ("enableFlowLogs" .=) <$> _subEnableFlowLogs,
                  ("name" .=) <$> _subName,
                  ("secondaryIpRanges" .=) <$> _subSecondaryIPRanges,
                  ("creationTimestamp" .=) <$> _subCreationTimestamp,
                  ("ipCidrRange" .=) <$> _subIPCIdRRange,
                  ("id" .=) <$> _subId, ("region" .=) <$> _subRegion,
                  ("description" .=) <$> _subDescription,
                  ("privateIpGoogleAccess" .=) <$>
                    _subPrivateIPGoogleAccess])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'healthCheckListWarning' smart constructor.
data HealthCheckListWarning = HealthCheckListWarning'
    { _hclwData    :: !(Maybe [HealthCheckListWarningDataItem])
    , _hclwCode    :: !(Maybe HealthCheckListWarningCode)
    , _hclwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HealthCheckListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hclwData'
--
-- * 'hclwCode'
--
-- * 'hclwMessage'
healthCheckListWarning
    :: HealthCheckListWarning
healthCheckListWarning =
    HealthCheckListWarning'
    { _hclwData = Nothing
    , _hclwCode = Nothing
    , _hclwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
hclwData :: Lens' HealthCheckListWarning [HealthCheckListWarningDataItem]
hclwData
  = lens _hclwData (\ s a -> s{_hclwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
hclwCode :: Lens' HealthCheckListWarning (Maybe HealthCheckListWarningCode)
hclwCode = lens _hclwCode (\ s a -> s{_hclwCode = a})

-- | [Output Only] A human-readable description of the warning code.
hclwMessage :: Lens' HealthCheckListWarning (Maybe Text)
hclwMessage
  = lens _hclwMessage (\ s a -> s{_hclwMessage = a})

instance FromJSON HealthCheckListWarning where
        parseJSON
          = withObject "HealthCheckListWarning"
              (\ o ->
                 HealthCheckListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON HealthCheckListWarning where
        toJSON HealthCheckListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _hclwData,
                  ("code" .=) <$> _hclwCode,
                  ("message" .=) <$> _hclwMessage])

--
-- /See:/ 'machineTypeAggregatedList' smart constructor.
data MachineTypeAggregatedList = MachineTypeAggregatedList'
    { _mtalNextPageToken :: !(Maybe Text)
    , _mtalKind          :: !Text
    , _mtalItems         :: !(Maybe MachineTypeAggregatedListItems)
    , _mtalSelfLink      :: !(Maybe Text)
    , _mtalWarning       :: !(Maybe MachineTypeAggregatedListWarning)
    , _mtalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypeAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtalNextPageToken'
--
-- * 'mtalKind'
--
-- * 'mtalItems'
--
-- * 'mtalSelfLink'
--
-- * 'mtalWarning'
--
-- * 'mtalId'
machineTypeAggregatedList
    :: MachineTypeAggregatedList
machineTypeAggregatedList =
    MachineTypeAggregatedList'
    { _mtalNextPageToken = Nothing
    , _mtalKind = "compute#machineTypeAggregatedList"
    , _mtalItems = Nothing
    , _mtalSelfLink = Nothing
    , _mtalWarning = Nothing
    , _mtalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
mtalNextPageToken :: Lens' MachineTypeAggregatedList (Maybe Text)
mtalNextPageToken
  = lens _mtalNextPageToken
      (\ s a -> s{_mtalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#machineTypeAggregatedList
-- for aggregated lists of machine types.
mtalKind :: Lens' MachineTypeAggregatedList Text
mtalKind = lens _mtalKind (\ s a -> s{_mtalKind = a})

-- | A list of MachineTypesScopedList resources.
mtalItems :: Lens' MachineTypeAggregatedList (Maybe MachineTypeAggregatedListItems)
mtalItems
  = lens _mtalItems (\ s a -> s{_mtalItems = a})

-- | [Output Only] Server-defined URL for this resource.
mtalSelfLink :: Lens' MachineTypeAggregatedList (Maybe Text)
mtalSelfLink
  = lens _mtalSelfLink (\ s a -> s{_mtalSelfLink = a})

-- | [Output Only] Informational warning message.
mtalWarning :: Lens' MachineTypeAggregatedList (Maybe MachineTypeAggregatedListWarning)
mtalWarning
  = lens _mtalWarning (\ s a -> s{_mtalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
mtalId :: Lens' MachineTypeAggregatedList (Maybe Text)
mtalId = lens _mtalId (\ s a -> s{_mtalId = a})

instance FromJSON MachineTypeAggregatedList where
        parseJSON
          = withObject "MachineTypeAggregatedList"
              (\ o ->
                 MachineTypeAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#machineTypeAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON MachineTypeAggregatedList where
        toJSON MachineTypeAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _mtalNextPageToken,
                  Just ("kind" .= _mtalKind),
                  ("items" .=) <$> _mtalItems,
                  ("selfLink" .=) <$> _mtalSelfLink,
                  ("warning" .=) <$> _mtalWarning,
                  ("id" .=) <$> _mtalId])

-- | [Output Only] An informational warning that appears when the nodeGroup
-- list is empty.
--
-- /See:/ 'nodeGroupsScopedListWarning' smart constructor.
data NodeGroupsScopedListWarning = NodeGroupsScopedListWarning'
    { _ngslwData    :: !(Maybe [NodeGroupsScopedListWarningDataItem])
    , _ngslwCode    :: !(Maybe NodeGroupsScopedListWarningCode)
    , _ngslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ngslwData'
--
-- * 'ngslwCode'
--
-- * 'ngslwMessage'
nodeGroupsScopedListWarning
    :: NodeGroupsScopedListWarning
nodeGroupsScopedListWarning =
    NodeGroupsScopedListWarning'
    { _ngslwData = Nothing
    , _ngslwCode = Nothing
    , _ngslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ngslwData :: Lens' NodeGroupsScopedListWarning [NodeGroupsScopedListWarningDataItem]
ngslwData
  = lens _ngslwData (\ s a -> s{_ngslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ngslwCode :: Lens' NodeGroupsScopedListWarning (Maybe NodeGroupsScopedListWarningCode)
ngslwCode
  = lens _ngslwCode (\ s a -> s{_ngslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ngslwMessage :: Lens' NodeGroupsScopedListWarning (Maybe Text)
ngslwMessage
  = lens _ngslwMessage (\ s a -> s{_ngslwMessage = a})

instance FromJSON NodeGroupsScopedListWarning where
        parseJSON
          = withObject "NodeGroupsScopedListWarning"
              (\ o ->
                 NodeGroupsScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeGroupsScopedListWarning where
        toJSON NodeGroupsScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ngslwData,
                  ("code" .=) <$> _ngslwCode,
                  ("message" .=) <$> _ngslwMessage])

-- | Contains a list of node types.
--
-- /See:/ 'nodeTypeList' smart constructor.
data NodeTypeList = NodeTypeList'
    { _ntltNextPageToken :: !(Maybe Text)
    , _ntltKind          :: !Text
    , _ntltItems         :: !(Maybe [NodeType])
    , _ntltSelfLink      :: !(Maybe Text)
    , _ntltWarning       :: !(Maybe NodeTypeListWarning)
    , _ntltId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypeList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntltNextPageToken'
--
-- * 'ntltKind'
--
-- * 'ntltItems'
--
-- * 'ntltSelfLink'
--
-- * 'ntltWarning'
--
-- * 'ntltId'
nodeTypeList
    :: NodeTypeList
nodeTypeList =
    NodeTypeList'
    { _ntltNextPageToken = Nothing
    , _ntltKind = "compute#nodeTypeList"
    , _ntltItems = Nothing
    , _ntltSelfLink = Nothing
    , _ntltWarning = Nothing
    , _ntltId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ntltNextPageToken :: Lens' NodeTypeList (Maybe Text)
ntltNextPageToken
  = lens _ntltNextPageToken
      (\ s a -> s{_ntltNextPageToken = a})

-- | [Output Only] Type of resource.Always compute#nodeTypeList for lists of
-- node types.
ntltKind :: Lens' NodeTypeList Text
ntltKind = lens _ntltKind (\ s a -> s{_ntltKind = a})

-- | A list of NodeType resources.
ntltItems :: Lens' NodeTypeList [NodeType]
ntltItems
  = lens _ntltItems (\ s a -> s{_ntltItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
ntltSelfLink :: Lens' NodeTypeList (Maybe Text)
ntltSelfLink
  = lens _ntltSelfLink (\ s a -> s{_ntltSelfLink = a})

-- | [Output Only] Informational warning message.
ntltWarning :: Lens' NodeTypeList (Maybe NodeTypeListWarning)
ntltWarning
  = lens _ntltWarning (\ s a -> s{_ntltWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ntltId :: Lens' NodeTypeList (Maybe Text)
ntltId = lens _ntltId (\ s a -> s{_ntltId = a})

instance FromJSON NodeTypeList where
        parseJSON
          = withObject "NodeTypeList"
              (\ o ->
                 NodeTypeList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#nodeTypeList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON NodeTypeList where
        toJSON NodeTypeList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ntltNextPageToken,
                  Just ("kind" .= _ntltKind),
                  ("items" .=) <$> _ntltItems,
                  ("selfLink" .=) <$> _ntltSelfLink,
                  ("warning" .=) <$> _ntltWarning,
                  ("id" .=) <$> _ntltId])

-- | A DiskType resource. (== resource_for beta.diskTypes ==) (==
-- resource_for v1.diskTypes ==)
--
-- /See:/ 'diskType' smart constructor.
data DiskType = DiskType'
    { _dtKind              :: !Text
    , _dtZone              :: !(Maybe Text)
    , _dtSelfLink          :: !(Maybe Text)
    , _dtName              :: !(Maybe Text)
    , _dtCreationTimestamp :: !(Maybe Text)
    , _dtId                :: !(Maybe (Textual Word64))
    , _dtRegion            :: !(Maybe Text)
    , _dtValidDiskSize     :: !(Maybe Text)
    , _dtDescription       :: !(Maybe Text)
    , _dtDefaultDiskSizeGb :: !(Maybe (Textual Int64))
    , _dtDeprecated        :: !(Maybe DeprecationStatus)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskType' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtKind'
--
-- * 'dtZone'
--
-- * 'dtSelfLink'
--
-- * 'dtName'
--
-- * 'dtCreationTimestamp'
--
-- * 'dtId'
--
-- * 'dtRegion'
--
-- * 'dtValidDiskSize'
--
-- * 'dtDescription'
--
-- * 'dtDefaultDiskSizeGb'
--
-- * 'dtDeprecated'
diskType
    :: DiskType
diskType =
    DiskType'
    { _dtKind = "compute#diskType"
    , _dtZone = Nothing
    , _dtSelfLink = Nothing
    , _dtName = Nothing
    , _dtCreationTimestamp = Nothing
    , _dtId = Nothing
    , _dtRegion = Nothing
    , _dtValidDiskSize = Nothing
    , _dtDescription = Nothing
    , _dtDefaultDiskSizeGb = Nothing
    , _dtDeprecated = Nothing
    }

-- | [Output Only] Type of the resource. Always compute#diskType for disk
-- types.
dtKind :: Lens' DiskType Text
dtKind = lens _dtKind (\ s a -> s{_dtKind = a})

-- | [Output Only] URL of the zone where the disk type resides. You must
-- specify this field as part of the HTTP request URL. It is not settable
-- as a field in the request body.
dtZone :: Lens' DiskType (Maybe Text)
dtZone = lens _dtZone (\ s a -> s{_dtZone = a})

-- | [Output Only] Server-defined URL for the resource.
dtSelfLink :: Lens' DiskType (Maybe Text)
dtSelfLink
  = lens _dtSelfLink (\ s a -> s{_dtSelfLink = a})

-- | [Output Only] Name of the resource.
dtName :: Lens' DiskType (Maybe Text)
dtName = lens _dtName (\ s a -> s{_dtName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
dtCreationTimestamp :: Lens' DiskType (Maybe Text)
dtCreationTimestamp
  = lens _dtCreationTimestamp
      (\ s a -> s{_dtCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
dtId :: Lens' DiskType (Maybe Word64)
dtId
  = lens _dtId (\ s a -> s{_dtId = a}) .
      mapping _Coerce

-- | [Output Only] URL of the region where the disk type resides. Only
-- applicable for regional resources. You must specify this field as part
-- of the HTTP request URL. It is not settable as a field in the request
-- body.
dtRegion :: Lens' DiskType (Maybe Text)
dtRegion = lens _dtRegion (\ s a -> s{_dtRegion = a})

-- | [Output Only] An optional textual description of the valid disk size,
-- such as \"10GB-10TB\".
dtValidDiskSize :: Lens' DiskType (Maybe Text)
dtValidDiskSize
  = lens _dtValidDiskSize
      (\ s a -> s{_dtValidDiskSize = a})

-- | [Output Only] An optional description of this resource.
dtDescription :: Lens' DiskType (Maybe Text)
dtDescription
  = lens _dtDescription
      (\ s a -> s{_dtDescription = a})

-- | [Output Only] Server-defined default disk size in GB.
dtDefaultDiskSizeGb :: Lens' DiskType (Maybe Int64)
dtDefaultDiskSizeGb
  = lens _dtDefaultDiskSizeGb
      (\ s a -> s{_dtDefaultDiskSizeGb = a})
      . mapping _Coerce

-- | [Output Only] The deprecation status associated with this disk type.
dtDeprecated :: Lens' DiskType (Maybe DeprecationStatus)
dtDeprecated
  = lens _dtDeprecated (\ s a -> s{_dtDeprecated = a})

instance FromJSON DiskType where
        parseJSON
          = withObject "DiskType"
              (\ o ->
                 DiskType' <$>
                   (o .:? "kind" .!= "compute#diskType") <*>
                     (o .:? "zone")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "validDiskSize")
                     <*> (o .:? "description")
                     <*> (o .:? "defaultDiskSizeGb")
                     <*> (o .:? "deprecated"))

instance ToJSON DiskType where
        toJSON DiskType'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _dtKind), ("zone" .=) <$> _dtZone,
                  ("selfLink" .=) <$> _dtSelfLink,
                  ("name" .=) <$> _dtName,
                  ("creationTimestamp" .=) <$> _dtCreationTimestamp,
                  ("id" .=) <$> _dtId, ("region" .=) <$> _dtRegion,
                  ("validDiskSize" .=) <$> _dtValidDiskSize,
                  ("description" .=) <$> _dtDescription,
                  ("defaultDiskSizeGb" .=) <$> _dtDefaultDiskSizeGb,
                  ("deprecated" .=) <$> _dtDeprecated])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'nodeTemplateAggregatedListWarning' smart constructor.
data NodeTemplateAggregatedListWarning = NodeTemplateAggregatedListWarning'
    { _ntalwData    :: !(Maybe [NodeTemplateAggregatedListWarningDataItem])
    , _ntalwCode    :: !(Maybe NodeTemplateAggregatedListWarningCode)
    , _ntalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntalwData'
--
-- * 'ntalwCode'
--
-- * 'ntalwMessage'
nodeTemplateAggregatedListWarning
    :: NodeTemplateAggregatedListWarning
nodeTemplateAggregatedListWarning =
    NodeTemplateAggregatedListWarning'
    { _ntalwData = Nothing
    , _ntalwCode = Nothing
    , _ntalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ntalwData :: Lens' NodeTemplateAggregatedListWarning [NodeTemplateAggregatedListWarningDataItem]
ntalwData
  = lens _ntalwData (\ s a -> s{_ntalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ntalwCode :: Lens' NodeTemplateAggregatedListWarning (Maybe NodeTemplateAggregatedListWarningCode)
ntalwCode
  = lens _ntalwCode (\ s a -> s{_ntalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
ntalwMessage :: Lens' NodeTemplateAggregatedListWarning (Maybe Text)
ntalwMessage
  = lens _ntalwMessage (\ s a -> s{_ntalwMessage = a})

instance FromJSON NodeTemplateAggregatedListWarning
         where
        parseJSON
          = withObject "NodeTemplateAggregatedListWarning"
              (\ o ->
                 NodeTemplateAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeTemplateAggregatedListWarning
         where
        toJSON NodeTemplateAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ntalwData,
                  ("code" .=) <$> _ntalwCode,
                  ("message" .=) <$> _ntalwMessage])

--
-- /See:/ 'autoscalerAggregatedListWarningDataItem' smart constructor.
data AutoscalerAggregatedListWarningDataItem = AutoscalerAggregatedListWarningDataItem'
    { _aalwdiValue :: !(Maybe Text)
    , _aalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalerAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aalwdiValue'
--
-- * 'aalwdiKey'
autoscalerAggregatedListWarningDataItem
    :: AutoscalerAggregatedListWarningDataItem
autoscalerAggregatedListWarningDataItem =
    AutoscalerAggregatedListWarningDataItem'
    { _aalwdiValue = Nothing
    , _aalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
aalwdiValue :: Lens' AutoscalerAggregatedListWarningDataItem (Maybe Text)
aalwdiValue
  = lens _aalwdiValue (\ s a -> s{_aalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
aalwdiKey :: Lens' AutoscalerAggregatedListWarningDataItem (Maybe Text)
aalwdiKey
  = lens _aalwdiKey (\ s a -> s{_aalwdiKey = a})

instance FromJSON
         AutoscalerAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "AutoscalerAggregatedListWarningDataItem"
              (\ o ->
                 AutoscalerAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         AutoscalerAggregatedListWarningDataItem where
        toJSON AutoscalerAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _aalwdiValue,
                  ("key" .=) <$> _aalwdiKey])

-- | The labels to set for this resource.
--
-- /See:/ 'zoneSetLabelsRequestLabels' smart constructor.
newtype ZoneSetLabelsRequestLabels = ZoneSetLabelsRequestLabels'
    { _zslrlAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ZoneSetLabelsRequestLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zslrlAddtional'
zoneSetLabelsRequestLabels
    :: HashMap Text Text -- ^ 'zslrlAddtional'
    -> ZoneSetLabelsRequestLabels
zoneSetLabelsRequestLabels pZslrlAddtional_ =
    ZoneSetLabelsRequestLabels'
    { _zslrlAddtional = _Coerce # pZslrlAddtional_
    }

zslrlAddtional :: Lens' ZoneSetLabelsRequestLabels (HashMap Text Text)
zslrlAddtional
  = lens _zslrlAddtional
      (\ s a -> s{_zslrlAddtional = a})
      . _Coerce

instance FromJSON ZoneSetLabelsRequestLabels where
        parseJSON
          = withObject "ZoneSetLabelsRequestLabels"
              (\ o ->
                 ZoneSetLabelsRequestLabels' <$> (parseJSONObject o))

instance ToJSON ZoneSetLabelsRequestLabels where
        toJSON = toJSON . _zslrlAddtional

--
-- /See:/ 'nodeTypeListWarningDataItem' smart constructor.
data NodeTypeListWarningDataItem = NodeTypeListWarningDataItem'
    { _ntlwdiValue :: !(Maybe Text)
    , _ntlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypeListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntlwdiValue'
--
-- * 'ntlwdiKey'
nodeTypeListWarningDataItem
    :: NodeTypeListWarningDataItem
nodeTypeListWarningDataItem =
    NodeTypeListWarningDataItem'
    { _ntlwdiValue = Nothing
    , _ntlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ntlwdiValue :: Lens' NodeTypeListWarningDataItem (Maybe Text)
ntlwdiValue
  = lens _ntlwdiValue (\ s a -> s{_ntlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ntlwdiKey :: Lens' NodeTypeListWarningDataItem (Maybe Text)
ntlwdiKey
  = lens _ntlwdiKey (\ s a -> s{_ntlwdiKey = a})

instance FromJSON NodeTypeListWarningDataItem where
        parseJSON
          = withObject "NodeTypeListWarningDataItem"
              (\ o ->
                 NodeTypeListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON NodeTypeListWarningDataItem where
        toJSON NodeTypeListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ntlwdiValue,
                  ("key" .=) <$> _ntlwdiKey])

-- | Message representing the validation result for a UrlMap.
--
-- /See:/ 'urlMapValidationResult' smart constructor.
data URLMapValidationResult = URLMapValidationResult'
    { _umvrLoadErrors    :: !(Maybe [Text])
    , _umvrLoadSucceeded :: !(Maybe Bool)
    , _umvrTestPassed    :: !(Maybe Bool)
    , _umvrTestFailures  :: !(Maybe [TestFailure])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMapValidationResult' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umvrLoadErrors'
--
-- * 'umvrLoadSucceeded'
--
-- * 'umvrTestPassed'
--
-- * 'umvrTestFailures'
urlMapValidationResult
    :: URLMapValidationResult
urlMapValidationResult =
    URLMapValidationResult'
    { _umvrLoadErrors = Nothing
    , _umvrLoadSucceeded = Nothing
    , _umvrTestPassed = Nothing
    , _umvrTestFailures = Nothing
    }

umvrLoadErrors :: Lens' URLMapValidationResult [Text]
umvrLoadErrors
  = lens _umvrLoadErrors
      (\ s a -> s{_umvrLoadErrors = a})
      . _Default
      . _Coerce

-- | Whether the given UrlMap can be successfully loaded. If false,
-- \'loadErrors\' indicates the reasons.
umvrLoadSucceeded :: Lens' URLMapValidationResult (Maybe Bool)
umvrLoadSucceeded
  = lens _umvrLoadSucceeded
      (\ s a -> s{_umvrLoadSucceeded = a})

-- | If successfully loaded, this field indicates whether the test passed. If
-- false, \'testFailures\'s indicate the reason of failure.
umvrTestPassed :: Lens' URLMapValidationResult (Maybe Bool)
umvrTestPassed
  = lens _umvrTestPassed
      (\ s a -> s{_umvrTestPassed = a})

umvrTestFailures :: Lens' URLMapValidationResult [TestFailure]
umvrTestFailures
  = lens _umvrTestFailures
      (\ s a -> s{_umvrTestFailures = a})
      . _Default
      . _Coerce

instance FromJSON URLMapValidationResult where
        parseJSON
          = withObject "URLMapValidationResult"
              (\ o ->
                 URLMapValidationResult' <$>
                   (o .:? "loadErrors" .!= mempty) <*>
                     (o .:? "loadSucceeded")
                     <*> (o .:? "testPassed")
                     <*> (o .:? "testFailures" .!= mempty))

instance ToJSON URLMapValidationResult where
        toJSON URLMapValidationResult'{..}
          = object
              (catMaybes
                 [("loadErrors" .=) <$> _umvrLoadErrors,
                  ("loadSucceeded" .=) <$> _umvrLoadSucceeded,
                  ("testPassed" .=) <$> _umvrTestPassed,
                  ("testFailures" .=) <$> _umvrTestFailures])

-- | A metadata key\/value entry.
--
-- /See:/ 'metadata' smart constructor.
data Metadata = Metadata'
    { _mKind        :: !Text
    , _mFingerprint :: !(Maybe Bytes)
    , _mItems       :: !(Maybe [MetadataItemsItem])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Metadata' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mKind'
--
-- * 'mFingerprint'
--
-- * 'mItems'
metadata
    :: Metadata
metadata =
    Metadata'
    { _mKind = "compute#metadata"
    , _mFingerprint = Nothing
    , _mItems = Nothing
    }

-- | [Output Only] Type of the resource. Always compute#metadata for
-- metadata.
mKind :: Lens' Metadata Text
mKind = lens _mKind (\ s a -> s{_mKind = a})

-- | Specifies a fingerprint for this request, which is essentially a hash of
-- the metadata\'s contents and used for optimistic locking. The
-- fingerprint is initially generated by Compute Engine and changes after
-- every request to modify or update metadata. You must always provide an
-- up-to-date fingerprint hash in order to update or change metadata,
-- otherwise the request will fail with error 412 conditionNotMet. To see
-- the latest fingerprint, make a get() request to retrieve the resource.
mFingerprint :: Lens' Metadata (Maybe ByteString)
mFingerprint
  = lens _mFingerprint (\ s a -> s{_mFingerprint = a})
      . mapping _Bytes

-- | Array of key\/value pairs. The total size of all keys and values must be
-- less than 512 KB.
mItems :: Lens' Metadata [MetadataItemsItem]
mItems
  = lens _mItems (\ s a -> s{_mItems = a}) . _Default .
      _Coerce

instance FromJSON Metadata where
        parseJSON
          = withObject "Metadata"
              (\ o ->
                 Metadata' <$>
                   (o .:? "kind" .!= "compute#metadata") <*>
                     (o .:? "fingerprint")
                     <*> (o .:? "items" .!= mempty))

instance ToJSON Metadata where
        toJSON Metadata'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _mKind),
                  ("fingerprint" .=) <$> _mFingerprint,
                  ("items" .=) <$> _mItems])

--
-- /See:/ 'routeWarningsItem' smart constructor.
data RouteWarningsItem = RouteWarningsItem'
    { _rwiData    :: !(Maybe [RouteWarningsItemDataItem])
    , _rwiCode    :: !(Maybe RouteWarningsItemCode)
    , _rwiMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouteWarningsItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rwiData'
--
-- * 'rwiCode'
--
-- * 'rwiMessage'
routeWarningsItem
    :: RouteWarningsItem
routeWarningsItem =
    RouteWarningsItem'
    { _rwiData = Nothing
    , _rwiCode = Nothing
    , _rwiMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rwiData :: Lens' RouteWarningsItem [RouteWarningsItemDataItem]
rwiData
  = lens _rwiData (\ s a -> s{_rwiData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rwiCode :: Lens' RouteWarningsItem (Maybe RouteWarningsItemCode)
rwiCode = lens _rwiCode (\ s a -> s{_rwiCode = a})

-- | [Output Only] A human-readable description of the warning code.
rwiMessage :: Lens' RouteWarningsItem (Maybe Text)
rwiMessage
  = lens _rwiMessage (\ s a -> s{_rwiMessage = a})

instance FromJSON RouteWarningsItem where
        parseJSON
          = withObject "RouteWarningsItem"
              (\ o ->
                 RouteWarningsItem' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RouteWarningsItem where
        toJSON RouteWarningsItem'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rwiData, ("code" .=) <$> _rwiCode,
                  ("message" .=) <$> _rwiMessage])

--
-- /See:/ 'nodeGroupsListNodes' smart constructor.
data NodeGroupsListNodes = NodeGroupsListNodes'
    { _nglnNextPageToken :: !(Maybe Text)
    , _nglnKind          :: !Text
    , _nglnItems         :: !(Maybe [NodeGroupNode])
    , _nglnSelfLink      :: !(Maybe Text)
    , _nglnWarning       :: !(Maybe NodeGroupsListNodesWarning)
    , _nglnId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeGroupsListNodes' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nglnNextPageToken'
--
-- * 'nglnKind'
--
-- * 'nglnItems'
--
-- * 'nglnSelfLink'
--
-- * 'nglnWarning'
--
-- * 'nglnId'
nodeGroupsListNodes
    :: NodeGroupsListNodes
nodeGroupsListNodes =
    NodeGroupsListNodes'
    { _nglnNextPageToken = Nothing
    , _nglnKind = "compute#nodeGroupsListNodes"
    , _nglnItems = Nothing
    , _nglnSelfLink = Nothing
    , _nglnWarning = Nothing
    , _nglnId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
nglnNextPageToken :: Lens' NodeGroupsListNodes (Maybe Text)
nglnNextPageToken
  = lens _nglnNextPageToken
      (\ s a -> s{_nglnNextPageToken = a})

-- | [Output Only] The resource type, which is always
-- compute.nodeGroupsListNodes for the list of nodes in the specified node
-- group.
nglnKind :: Lens' NodeGroupsListNodes Text
nglnKind = lens _nglnKind (\ s a -> s{_nglnKind = a})

-- | A list of Node resources.
nglnItems :: Lens' NodeGroupsListNodes [NodeGroupNode]
nglnItems
  = lens _nglnItems (\ s a -> s{_nglnItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
nglnSelfLink :: Lens' NodeGroupsListNodes (Maybe Text)
nglnSelfLink
  = lens _nglnSelfLink (\ s a -> s{_nglnSelfLink = a})

-- | [Output Only] Informational warning message.
nglnWarning :: Lens' NodeGroupsListNodes (Maybe NodeGroupsListNodesWarning)
nglnWarning
  = lens _nglnWarning (\ s a -> s{_nglnWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
nglnId :: Lens' NodeGroupsListNodes (Maybe Text)
nglnId = lens _nglnId (\ s a -> s{_nglnId = a})

instance FromJSON NodeGroupsListNodes where
        parseJSON
          = withObject "NodeGroupsListNodes"
              (\ o ->
                 NodeGroupsListNodes' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#nodeGroupsListNodes")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON NodeGroupsListNodes where
        toJSON NodeGroupsListNodes'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _nglnNextPageToken,
                  Just ("kind" .= _nglnKind),
                  ("items" .=) <$> _nglnItems,
                  ("selfLink" .=) <$> _nglnSelfLink,
                  ("warning" .=) <$> _nglnWarning,
                  ("id" .=) <$> _nglnId])

-- | Response to the list request, and contains a list of interconnect
-- locations.
--
-- /See:/ 'interconnectLocationList' smart constructor.
data InterconnectLocationList = InterconnectLocationList'
    { _illNextPageToken :: !(Maybe Text)
    , _illKind          :: !Text
    , _illItems         :: !(Maybe [InterconnectLocation])
    , _illSelfLink      :: !(Maybe Text)
    , _illWarning       :: !(Maybe InterconnectLocationListWarning)
    , _illId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectLocationList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'illNextPageToken'
--
-- * 'illKind'
--
-- * 'illItems'
--
-- * 'illSelfLink'
--
-- * 'illWarning'
--
-- * 'illId'
interconnectLocationList
    :: InterconnectLocationList
interconnectLocationList =
    InterconnectLocationList'
    { _illNextPageToken = Nothing
    , _illKind = "compute#interconnectLocationList"
    , _illItems = Nothing
    , _illSelfLink = Nothing
    , _illWarning = Nothing
    , _illId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
illNextPageToken :: Lens' InterconnectLocationList (Maybe Text)
illNextPageToken
  = lens _illNextPageToken
      (\ s a -> s{_illNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#interconnectLocationList
-- for lists of interconnect locations.
illKind :: Lens' InterconnectLocationList Text
illKind = lens _illKind (\ s a -> s{_illKind = a})

-- | A list of InterconnectLocation resources.
illItems :: Lens' InterconnectLocationList [InterconnectLocation]
illItems
  = lens _illItems (\ s a -> s{_illItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
illSelfLink :: Lens' InterconnectLocationList (Maybe Text)
illSelfLink
  = lens _illSelfLink (\ s a -> s{_illSelfLink = a})

-- | [Output Only] Informational warning message.
illWarning :: Lens' InterconnectLocationList (Maybe InterconnectLocationListWarning)
illWarning
  = lens _illWarning (\ s a -> s{_illWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
illId :: Lens' InterconnectLocationList (Maybe Text)
illId = lens _illId (\ s a -> s{_illId = a})

instance FromJSON InterconnectLocationList where
        parseJSON
          = withObject "InterconnectLocationList"
              (\ o ->
                 InterconnectLocationList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#interconnectLocationList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InterconnectLocationList where
        toJSON InterconnectLocationList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _illNextPageToken,
                  Just ("kind" .= _illKind),
                  ("items" .=) <$> _illItems,
                  ("selfLink" .=) <$> _illSelfLink,
                  ("warning" .=) <$> _illWarning,
                  ("id" .=) <$> _illId])

--
-- /See:/ 'sslPoliciesListAvailableFeaturesResponse' smart constructor.
newtype SSLPoliciesListAvailableFeaturesResponse = SSLPoliciesListAvailableFeaturesResponse'
    { _splafrFeatures :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLPoliciesListAvailableFeaturesResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'splafrFeatures'
sslPoliciesListAvailableFeaturesResponse
    :: SSLPoliciesListAvailableFeaturesResponse
sslPoliciesListAvailableFeaturesResponse =
    SSLPoliciesListAvailableFeaturesResponse'
    { _splafrFeatures = Nothing
    }

splafrFeatures :: Lens' SSLPoliciesListAvailableFeaturesResponse [Text]
splafrFeatures
  = lens _splafrFeatures
      (\ s a -> s{_splafrFeatures = a})
      . _Default
      . _Coerce

instance FromJSON
         SSLPoliciesListAvailableFeaturesResponse where
        parseJSON
          = withObject
              "SSLPoliciesListAvailableFeaturesResponse"
              (\ o ->
                 SSLPoliciesListAvailableFeaturesResponse' <$>
                   (o .:? "features" .!= mempty))

instance ToJSON
         SSLPoliciesListAvailableFeaturesResponse where
        toJSON SSLPoliciesListAvailableFeaturesResponse'{..}
          = object
              (catMaybes [("features" .=) <$> _splafrFeatures])

-- | Labels to apply to instances that are created from this template.
--
-- /See:/ 'instancePropertiesLabels' smart constructor.
newtype InstancePropertiesLabels = InstancePropertiesLabels'
    { _iplAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancePropertiesLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iplAddtional'
instancePropertiesLabels
    :: HashMap Text Text -- ^ 'iplAddtional'
    -> InstancePropertiesLabels
instancePropertiesLabels pIplAddtional_ =
    InstancePropertiesLabels'
    { _iplAddtional = _Coerce # pIplAddtional_
    }

iplAddtional :: Lens' InstancePropertiesLabels (HashMap Text Text)
iplAddtional
  = lens _iplAddtional (\ s a -> s{_iplAddtional = a})
      . _Coerce

instance FromJSON InstancePropertiesLabels where
        parseJSON
          = withObject "InstancePropertiesLabels"
              (\ o ->
                 InstancePropertiesLabels' <$> (parseJSONObject o))

instance ToJSON InstancePropertiesLabels where
        toJSON = toJSON . _iplAddtional

--
-- /See:/ 'machineTypesScopedListWarningDataItem' smart constructor.
data MachineTypesScopedListWarningDataItem = MachineTypesScopedListWarningDataItem'
    { _mtslwdiValue :: !(Maybe Text)
    , _mtslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtslwdiValue'
--
-- * 'mtslwdiKey'
machineTypesScopedListWarningDataItem
    :: MachineTypesScopedListWarningDataItem
machineTypesScopedListWarningDataItem =
    MachineTypesScopedListWarningDataItem'
    { _mtslwdiValue = Nothing
    , _mtslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
mtslwdiValue :: Lens' MachineTypesScopedListWarningDataItem (Maybe Text)
mtslwdiValue
  = lens _mtslwdiValue (\ s a -> s{_mtslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
mtslwdiKey :: Lens' MachineTypesScopedListWarningDataItem (Maybe Text)
mtslwdiKey
  = lens _mtslwdiKey (\ s a -> s{_mtslwdiKey = a})

instance FromJSON
         MachineTypesScopedListWarningDataItem where
        parseJSON
          = withObject "MachineTypesScopedListWarningDataItem"
              (\ o ->
                 MachineTypesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON MachineTypesScopedListWarningDataItem
         where
        toJSON MachineTypesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _mtslwdiValue,
                  ("key" .=) <$> _mtslwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'diskTypeListWarning' smart constructor.
data DiskTypeListWarning = DiskTypeListWarning'
    { _dtlwData    :: !(Maybe [DiskTypeListWarningDataItem])
    , _dtlwCode    :: !(Maybe DiskTypeListWarningCode)
    , _dtlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypeListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtlwData'
--
-- * 'dtlwCode'
--
-- * 'dtlwMessage'
diskTypeListWarning
    :: DiskTypeListWarning
diskTypeListWarning =
    DiskTypeListWarning'
    { _dtlwData = Nothing
    , _dtlwCode = Nothing
    , _dtlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
dtlwData :: Lens' DiskTypeListWarning [DiskTypeListWarningDataItem]
dtlwData
  = lens _dtlwData (\ s a -> s{_dtlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
dtlwCode :: Lens' DiskTypeListWarning (Maybe DiskTypeListWarningCode)
dtlwCode = lens _dtlwCode (\ s a -> s{_dtlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
dtlwMessage :: Lens' DiskTypeListWarning (Maybe Text)
dtlwMessage
  = lens _dtlwMessage (\ s a -> s{_dtlwMessage = a})

instance FromJSON DiskTypeListWarning where
        parseJSON
          = withObject "DiskTypeListWarning"
              (\ o ->
                 DiskTypeListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON DiskTypeListWarning where
        toJSON DiskTypeListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _dtlwData,
                  ("code" .=) <$> _dtlwCode,
                  ("message" .=) <$> _dtlwMessage])

--
-- /See:/ 'nodeTemplateListWarningDataItem' smart constructor.
data NodeTemplateListWarningDataItem = NodeTemplateListWarningDataItem'
    { _nodValue :: !(Maybe Text)
    , _nodKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nodValue'
--
-- * 'nodKey'
nodeTemplateListWarningDataItem
    :: NodeTemplateListWarningDataItem
nodeTemplateListWarningDataItem =
    NodeTemplateListWarningDataItem'
    { _nodValue = Nothing
    , _nodKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
nodValue :: Lens' NodeTemplateListWarningDataItem (Maybe Text)
nodValue = lens _nodValue (\ s a -> s{_nodValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
nodKey :: Lens' NodeTemplateListWarningDataItem (Maybe Text)
nodKey = lens _nodKey (\ s a -> s{_nodKey = a})

instance FromJSON NodeTemplateListWarningDataItem
         where
        parseJSON
          = withObject "NodeTemplateListWarningDataItem"
              (\ o ->
                 NodeTemplateListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON NodeTemplateListWarningDataItem where
        toJSON NodeTemplateListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _nodValue, ("key" .=) <$> _nodKey])

--
-- /See:/ 'regionListWarningDataItem' smart constructor.
data RegionListWarningDataItem = RegionListWarningDataItem'
    { _regValue :: !(Maybe Text)
    , _regKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'regValue'
--
-- * 'regKey'
regionListWarningDataItem
    :: RegionListWarningDataItem
regionListWarningDataItem =
    RegionListWarningDataItem'
    { _regValue = Nothing
    , _regKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
regValue :: Lens' RegionListWarningDataItem (Maybe Text)
regValue = lens _regValue (\ s a -> s{_regValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
regKey :: Lens' RegionListWarningDataItem (Maybe Text)
regKey = lens _regKey (\ s a -> s{_regKey = a})

instance FromJSON RegionListWarningDataItem where
        parseJSON
          = withObject "RegionListWarningDataItem"
              (\ o ->
                 RegionListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON RegionListWarningDataItem where
        toJSON RegionListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _regValue, ("key" .=) <$> _regKey])

--
-- /See:/ 'instancesSetMachineResourcesRequest' smart constructor.
newtype InstancesSetMachineResourcesRequest = InstancesSetMachineResourcesRequest'
    { _ismrrGuestAccelerators :: Maybe [AcceleratorConfig]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesSetMachineResourcesRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ismrrGuestAccelerators'
instancesSetMachineResourcesRequest
    :: InstancesSetMachineResourcesRequest
instancesSetMachineResourcesRequest =
    InstancesSetMachineResourcesRequest'
    { _ismrrGuestAccelerators = Nothing
    }

-- | A list of the type and count of accelerator cards attached to the
-- instance.
ismrrGuestAccelerators :: Lens' InstancesSetMachineResourcesRequest [AcceleratorConfig]
ismrrGuestAccelerators
  = lens _ismrrGuestAccelerators
      (\ s a -> s{_ismrrGuestAccelerators = a})
      . _Default
      . _Coerce

instance FromJSON InstancesSetMachineResourcesRequest
         where
        parseJSON
          = withObject "InstancesSetMachineResourcesRequest"
              (\ o ->
                 InstancesSetMachineResourcesRequest' <$>
                   (o .:? "guestAccelerators" .!= mempty))

instance ToJSON InstancesSetMachineResourcesRequest
         where
        toJSON InstancesSetMachineResourcesRequest'{..}
          = object
              (catMaybes
                 [("guestAccelerators" .=) <$>
                    _ismrrGuestAccelerators])

--
-- /See:/ 'instancesSetServiceAccountRequest' smart constructor.
data InstancesSetServiceAccountRequest = InstancesSetServiceAccountRequest'
    { _issarEmail  :: !(Maybe Text)
    , _issarScopes :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesSetServiceAccountRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'issarEmail'
--
-- * 'issarScopes'
instancesSetServiceAccountRequest
    :: InstancesSetServiceAccountRequest
instancesSetServiceAccountRequest =
    InstancesSetServiceAccountRequest'
    { _issarEmail = Nothing
    , _issarScopes = Nothing
    }

-- | Email address of the service account.
issarEmail :: Lens' InstancesSetServiceAccountRequest (Maybe Text)
issarEmail
  = lens _issarEmail (\ s a -> s{_issarEmail = a})

-- | The list of scopes to be made available for this service account.
issarScopes :: Lens' InstancesSetServiceAccountRequest [Text]
issarScopes
  = lens _issarScopes (\ s a -> s{_issarScopes = a}) .
      _Default
      . _Coerce

instance FromJSON InstancesSetServiceAccountRequest
         where
        parseJSON
          = withObject "InstancesSetServiceAccountRequest"
              (\ o ->
                 InstancesSetServiceAccountRequest' <$>
                   (o .:? "email") <*> (o .:? "scopes" .!= mempty))

instance ToJSON InstancesSetServiceAccountRequest
         where
        toJSON InstancesSetServiceAccountRequest'{..}
          = object
              (catMaybes
                 [("email" .=) <$> _issarEmail,
                  ("scopes" .=) <$> _issarScopes])

--
-- /See:/ 'securityPolicyReference' smart constructor.
newtype SecurityPolicyReference = SecurityPolicyReference'
    { _sprSecurityPolicy :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SecurityPolicyReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sprSecurityPolicy'
securityPolicyReference
    :: SecurityPolicyReference
securityPolicyReference =
    SecurityPolicyReference'
    { _sprSecurityPolicy = Nothing
    }

sprSecurityPolicy :: Lens' SecurityPolicyReference (Maybe Text)
sprSecurityPolicy
  = lens _sprSecurityPolicy
      (\ s a -> s{_sprSecurityPolicy = a})

instance FromJSON SecurityPolicyReference where
        parseJSON
          = withObject "SecurityPolicyReference"
              (\ o ->
                 SecurityPolicyReference' <$>
                   (o .:? "securityPolicy"))

instance ToJSON SecurityPolicyReference where
        toJSON SecurityPolicyReference'{..}
          = object
              (catMaybes
                 [("securityPolicy" .=) <$> _sprSecurityPolicy])

--
-- /See:/ 'diskTypesScopedListWarningDataItem' smart constructor.
data DiskTypesScopedListWarningDataItem = DiskTypesScopedListWarningDataItem'
    { _dtslwdiValue :: !(Maybe Text)
    , _dtslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtslwdiValue'
--
-- * 'dtslwdiKey'
diskTypesScopedListWarningDataItem
    :: DiskTypesScopedListWarningDataItem
diskTypesScopedListWarningDataItem =
    DiskTypesScopedListWarningDataItem'
    { _dtslwdiValue = Nothing
    , _dtslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
dtslwdiValue :: Lens' DiskTypesScopedListWarningDataItem (Maybe Text)
dtslwdiValue
  = lens _dtslwdiValue (\ s a -> s{_dtslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
dtslwdiKey :: Lens' DiskTypesScopedListWarningDataItem (Maybe Text)
dtslwdiKey
  = lens _dtslwdiKey (\ s a -> s{_dtslwdiKey = a})

instance FromJSON DiskTypesScopedListWarningDataItem
         where
        parseJSON
          = withObject "DiskTypesScopedListWarningDataItem"
              (\ o ->
                 DiskTypesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON DiskTypesScopedListWarningDataItem
         where
        toJSON DiskTypesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _dtslwdiValue,
                  ("key" .=) <$> _dtslwdiKey])

-- | Contain information of Nat mapping for an interface of this endpoint.
--
-- /See:/ 'vMEndpointNATMAppingsInterfaceNATMAppings' smart constructor.
data VMEndpointNATMAppingsInterfaceNATMAppings = VMEndpointNATMAppingsInterfaceNATMAppings'
    { _vmenatmainatmaSourceAliasIPRange :: !(Maybe Text)
    , _vmenatmainatmaSourceVirtualIP    :: !(Maybe Text)
    , _vmenatmainatmaNATIPPortRanges    :: !(Maybe [Text])
    , _vmenatmainatmaNumTotalNATPorts   :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VMEndpointNATMAppingsInterfaceNATMAppings' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vmenatmainatmaSourceAliasIPRange'
--
-- * 'vmenatmainatmaSourceVirtualIP'
--
-- * 'vmenatmainatmaNATIPPortRanges'
--
-- * 'vmenatmainatmaNumTotalNATPorts'
vMEndpointNATMAppingsInterfaceNATMAppings
    :: VMEndpointNATMAppingsInterfaceNATMAppings
vMEndpointNATMAppingsInterfaceNATMAppings =
    VMEndpointNATMAppingsInterfaceNATMAppings'
    { _vmenatmainatmaSourceAliasIPRange = Nothing
    , _vmenatmainatmaSourceVirtualIP = Nothing
    , _vmenatmainatmaNATIPPortRanges = Nothing
    , _vmenatmainatmaNumTotalNATPorts = Nothing
    }

-- | Alias IP range for this interface endpoint. It will be a private (RFC
-- 1918) IP range. Examples: \"10.33.4.55\/32\", or \"192.168.5.0\/24\".
vmenatmainatmaSourceAliasIPRange :: Lens' VMEndpointNATMAppingsInterfaceNATMAppings (Maybe Text)
vmenatmainatmaSourceAliasIPRange
  = lens _vmenatmainatmaSourceAliasIPRange
      (\ s a -> s{_vmenatmainatmaSourceAliasIPRange = a})

-- | Primary IP of the VM for this NIC.
vmenatmainatmaSourceVirtualIP :: Lens' VMEndpointNATMAppingsInterfaceNATMAppings (Maybe Text)
vmenatmainatmaSourceVirtualIP
  = lens _vmenatmainatmaSourceVirtualIP
      (\ s a -> s{_vmenatmainatmaSourceVirtualIP = a})

-- | A list of all IP:port-range mappings assigned to this interface. These
-- ranges are inclusive, that is, both the first and the last ports can be
-- used for NAT. Example: [\"2.2.2.2:12345-12355\", \"1.1.1.1:2234-2234\"].
vmenatmainatmaNATIPPortRanges :: Lens' VMEndpointNATMAppingsInterfaceNATMAppings [Text]
vmenatmainatmaNATIPPortRanges
  = lens _vmenatmainatmaNATIPPortRanges
      (\ s a -> s{_vmenatmainatmaNATIPPortRanges = a})
      . _Default
      . _Coerce

-- | Total number of ports across all NAT IPs allocated to this interface. It
-- equals to the aggregated port number in the field nat_ip_port_ranges.
vmenatmainatmaNumTotalNATPorts :: Lens' VMEndpointNATMAppingsInterfaceNATMAppings (Maybe Int32)
vmenatmainatmaNumTotalNATPorts
  = lens _vmenatmainatmaNumTotalNATPorts
      (\ s a -> s{_vmenatmainatmaNumTotalNATPorts = a})
      . mapping _Coerce

instance FromJSON
         VMEndpointNATMAppingsInterfaceNATMAppings where
        parseJSON
          = withObject
              "VMEndpointNATMAppingsInterfaceNATMAppings"
              (\ o ->
                 VMEndpointNATMAppingsInterfaceNATMAppings' <$>
                   (o .:? "sourceAliasIpRange") <*>
                     (o .:? "sourceVirtualIp")
                     <*> (o .:? "natIpPortRanges" .!= mempty)
                     <*> (o .:? "numTotalNatPorts"))

instance ToJSON
         VMEndpointNATMAppingsInterfaceNATMAppings where
        toJSON VMEndpointNATMAppingsInterfaceNATMAppings'{..}
          = object
              (catMaybes
                 [("sourceAliasIpRange" .=) <$>
                    _vmenatmainatmaSourceAliasIPRange,
                  ("sourceVirtualIp" .=) <$>
                    _vmenatmainatmaSourceVirtualIP,
                  ("natIpPortRanges" .=) <$>
                    _vmenatmainatmaNATIPPortRanges,
                  ("numTotalNatPorts" .=) <$>
                    _vmenatmainatmaNumTotalNATPorts])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'vpnTunnelAggregatedListWarning' smart constructor.
data VPNTunnelAggregatedListWarning = VPNTunnelAggregatedListWarning'
    { _vtalwData    :: !(Maybe [VPNTunnelAggregatedListWarningDataItem])
    , _vtalwCode    :: !(Maybe VPNTunnelAggregatedListWarningCode)
    , _vtalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtalwData'
--
-- * 'vtalwCode'
--
-- * 'vtalwMessage'
vpnTunnelAggregatedListWarning
    :: VPNTunnelAggregatedListWarning
vpnTunnelAggregatedListWarning =
    VPNTunnelAggregatedListWarning'
    { _vtalwData = Nothing
    , _vtalwCode = Nothing
    , _vtalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
vtalwData :: Lens' VPNTunnelAggregatedListWarning [VPNTunnelAggregatedListWarningDataItem]
vtalwData
  = lens _vtalwData (\ s a -> s{_vtalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
vtalwCode :: Lens' VPNTunnelAggregatedListWarning (Maybe VPNTunnelAggregatedListWarningCode)
vtalwCode
  = lens _vtalwCode (\ s a -> s{_vtalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
vtalwMessage :: Lens' VPNTunnelAggregatedListWarning (Maybe Text)
vtalwMessage
  = lens _vtalwMessage (\ s a -> s{_vtalwMessage = a})

instance FromJSON VPNTunnelAggregatedListWarning
         where
        parseJSON
          = withObject "VPNTunnelAggregatedListWarning"
              (\ o ->
                 VPNTunnelAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON VPNTunnelAggregatedListWarning where
        toJSON VPNTunnelAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _vtalwData,
                  ("code" .=) <$> _vtalwCode,
                  ("message" .=) <$> _vtalwMessage])

-- | A TargetHttpProxy resource. This resource defines an HTTP proxy. (==
-- resource_for beta.targetHttpProxies ==) (== resource_for
-- v1.targetHttpProxies ==)
--
-- /See:/ 'targetHTTPProxy' smart constructor.
data TargetHTTPProxy = TargetHTTPProxy'
    { _thttppURLMap            :: !(Maybe Text)
    , _thttppKind              :: !Text
    , _thttppSelfLink          :: !(Maybe Text)
    , _thttppName              :: !(Maybe Text)
    , _thttppCreationTimestamp :: !(Maybe Text)
    , _thttppId                :: !(Maybe (Textual Word64))
    , _thttppDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPProxy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thttppURLMap'
--
-- * 'thttppKind'
--
-- * 'thttppSelfLink'
--
-- * 'thttppName'
--
-- * 'thttppCreationTimestamp'
--
-- * 'thttppId'
--
-- * 'thttppDescription'
targetHTTPProxy
    :: TargetHTTPProxy
targetHTTPProxy =
    TargetHTTPProxy'
    { _thttppURLMap = Nothing
    , _thttppKind = "compute#targetHttpProxy"
    , _thttppSelfLink = Nothing
    , _thttppName = Nothing
    , _thttppCreationTimestamp = Nothing
    , _thttppId = Nothing
    , _thttppDescription = Nothing
    }

-- | URL to the UrlMap resource that defines the mapping from URL to the
-- BackendService.
thttppURLMap :: Lens' TargetHTTPProxy (Maybe Text)
thttppURLMap
  = lens _thttppURLMap (\ s a -> s{_thttppURLMap = a})

-- | [Output Only] Type of resource. Always compute#targetHttpProxy for
-- target HTTP proxies.
thttppKind :: Lens' TargetHTTPProxy Text
thttppKind
  = lens _thttppKind (\ s a -> s{_thttppKind = a})

-- | [Output Only] Server-defined URL for the resource.
thttppSelfLink :: Lens' TargetHTTPProxy (Maybe Text)
thttppSelfLink
  = lens _thttppSelfLink
      (\ s a -> s{_thttppSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
thttppName :: Lens' TargetHTTPProxy (Maybe Text)
thttppName
  = lens _thttppName (\ s a -> s{_thttppName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
thttppCreationTimestamp :: Lens' TargetHTTPProxy (Maybe Text)
thttppCreationTimestamp
  = lens _thttppCreationTimestamp
      (\ s a -> s{_thttppCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
thttppId :: Lens' TargetHTTPProxy (Maybe Word64)
thttppId
  = lens _thttppId (\ s a -> s{_thttppId = a}) .
      mapping _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
thttppDescription :: Lens' TargetHTTPProxy (Maybe Text)
thttppDescription
  = lens _thttppDescription
      (\ s a -> s{_thttppDescription = a})

instance FromJSON TargetHTTPProxy where
        parseJSON
          = withObject "TargetHTTPProxy"
              (\ o ->
                 TargetHTTPProxy' <$>
                   (o .:? "urlMap") <*>
                     (o .:? "kind" .!= "compute#targetHttpProxy")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "description"))

instance ToJSON TargetHTTPProxy where
        toJSON TargetHTTPProxy'{..}
          = object
              (catMaybes
                 [("urlMap" .=) <$> _thttppURLMap,
                  Just ("kind" .= _thttppKind),
                  ("selfLink" .=) <$> _thttppSelfLink,
                  ("name" .=) <$> _thttppName,
                  ("creationTimestamp" .=) <$>
                    _thttppCreationTimestamp,
                  ("id" .=) <$> _thttppId,
                  ("description" .=) <$> _thttppDescription])

-- | A Machine Type resource. (== resource_for v1.machineTypes ==) (==
-- resource_for beta.machineTypes ==)
--
-- /See:/ 'machineType' smart constructor.
data MachineType = MachineType'
    { _mtIsSharedCPU                  :: !(Maybe Bool)
    , _mtKind                         :: !Text
    , _mtImageSpaceGb                 :: !(Maybe (Textual Int32))
    , _mtZone                         :: !(Maybe Text)
    , _mtSelfLink                     :: !(Maybe Text)
    , _mtName                         :: !(Maybe Text)
    , _mtCreationTimestamp            :: !(Maybe Text)
    , _mtScratchDisks                 :: !(Maybe [MachineTypeScratchDisksItem])
    , _mtId                           :: !(Maybe (Textual Word64))
    , _mtGuestCPUs                    :: !(Maybe (Textual Int32))
    , _mtMaximumPersistentDisksSizeGb :: !(Maybe (Textual Int64))
    , _mtMaximumPersistentDisks       :: !(Maybe (Textual Int32))
    , _mtMemoryMb                     :: !(Maybe (Textual Int32))
    , _mtDescription                  :: !(Maybe Text)
    , _mtDeprecated                   :: !(Maybe DeprecationStatus)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineType' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtIsSharedCPU'
--
-- * 'mtKind'
--
-- * 'mtImageSpaceGb'
--
-- * 'mtZone'
--
-- * 'mtSelfLink'
--
-- * 'mtName'
--
-- * 'mtCreationTimestamp'
--
-- * 'mtScratchDisks'
--
-- * 'mtId'
--
-- * 'mtGuestCPUs'
--
-- * 'mtMaximumPersistentDisksSizeGb'
--
-- * 'mtMaximumPersistentDisks'
--
-- * 'mtMemoryMb'
--
-- * 'mtDescription'
--
-- * 'mtDeprecated'
machineType
    :: MachineType
machineType =
    MachineType'
    { _mtIsSharedCPU = Nothing
    , _mtKind = "compute#machineType"
    , _mtImageSpaceGb = Nothing
    , _mtZone = Nothing
    , _mtSelfLink = Nothing
    , _mtName = Nothing
    , _mtCreationTimestamp = Nothing
    , _mtScratchDisks = Nothing
    , _mtId = Nothing
    , _mtGuestCPUs = Nothing
    , _mtMaximumPersistentDisksSizeGb = Nothing
    , _mtMaximumPersistentDisks = Nothing
    , _mtMemoryMb = Nothing
    , _mtDescription = Nothing
    , _mtDeprecated = Nothing
    }

-- | [Output Only] Whether this machine type has a shared CPU. See
-- Shared-core machine types for more information.
mtIsSharedCPU :: Lens' MachineType (Maybe Bool)
mtIsSharedCPU
  = lens _mtIsSharedCPU
      (\ s a -> s{_mtIsSharedCPU = a})

-- | [Output Only] The type of the resource. Always compute#machineType for
-- machine types.
mtKind :: Lens' MachineType Text
mtKind = lens _mtKind (\ s a -> s{_mtKind = a})

-- | [Deprecated] This property is deprecated and will never be populated
-- with any relevant values.
mtImageSpaceGb :: Lens' MachineType (Maybe Int32)
mtImageSpaceGb
  = lens _mtImageSpaceGb
      (\ s a -> s{_mtImageSpaceGb = a})
      . mapping _Coerce

-- | [Output Only] The name of the zone where the machine type resides, such
-- as us-central1-a.
mtZone :: Lens' MachineType (Maybe Text)
mtZone = lens _mtZone (\ s a -> s{_mtZone = a})

-- | [Output Only] Server-defined URL for the resource.
mtSelfLink :: Lens' MachineType (Maybe Text)
mtSelfLink
  = lens _mtSelfLink (\ s a -> s{_mtSelfLink = a})

-- | [Output Only] Name of the resource.
mtName :: Lens' MachineType (Maybe Text)
mtName = lens _mtName (\ s a -> s{_mtName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
mtCreationTimestamp :: Lens' MachineType (Maybe Text)
mtCreationTimestamp
  = lens _mtCreationTimestamp
      (\ s a -> s{_mtCreationTimestamp = a})

-- | [Output Only] A list of extended scratch disks assigned to the instance.
mtScratchDisks :: Lens' MachineType [MachineTypeScratchDisksItem]
mtScratchDisks
  = lens _mtScratchDisks
      (\ s a -> s{_mtScratchDisks = a})
      . _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
mtId :: Lens' MachineType (Maybe Word64)
mtId
  = lens _mtId (\ s a -> s{_mtId = a}) .
      mapping _Coerce

-- | [Output Only] The number of virtual CPUs that are available to the
-- instance.
mtGuestCPUs :: Lens' MachineType (Maybe Int32)
mtGuestCPUs
  = lens _mtGuestCPUs (\ s a -> s{_mtGuestCPUs = a}) .
      mapping _Coerce

-- | [Output Only] Maximum total persistent disks size (GB) allowed.
mtMaximumPersistentDisksSizeGb :: Lens' MachineType (Maybe Int64)
mtMaximumPersistentDisksSizeGb
  = lens _mtMaximumPersistentDisksSizeGb
      (\ s a -> s{_mtMaximumPersistentDisksSizeGb = a})
      . mapping _Coerce

-- | [Output Only] Maximum persistent disks allowed.
mtMaximumPersistentDisks :: Lens' MachineType (Maybe Int32)
mtMaximumPersistentDisks
  = lens _mtMaximumPersistentDisks
      (\ s a -> s{_mtMaximumPersistentDisks = a})
      . mapping _Coerce

-- | [Output Only] The amount of physical memory available to the instance,
-- defined in MB.
mtMemoryMb :: Lens' MachineType (Maybe Int32)
mtMemoryMb
  = lens _mtMemoryMb (\ s a -> s{_mtMemoryMb = a}) .
      mapping _Coerce

-- | [Output Only] An optional textual description of the resource.
mtDescription :: Lens' MachineType (Maybe Text)
mtDescription
  = lens _mtDescription
      (\ s a -> s{_mtDescription = a})

-- | [Output Only] The deprecation status associated with this machine type.
mtDeprecated :: Lens' MachineType (Maybe DeprecationStatus)
mtDeprecated
  = lens _mtDeprecated (\ s a -> s{_mtDeprecated = a})

instance FromJSON MachineType where
        parseJSON
          = withObject "MachineType"
              (\ o ->
                 MachineType' <$>
                   (o .:? "isSharedCpu") <*>
                     (o .:? "kind" .!= "compute#machineType")
                     <*> (o .:? "imageSpaceGb")
                     <*> (o .:? "zone")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "scratchDisks" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "guestCpus")
                     <*> (o .:? "maximumPersistentDisksSizeGb")
                     <*> (o .:? "maximumPersistentDisks")
                     <*> (o .:? "memoryMb")
                     <*> (o .:? "description")
                     <*> (o .:? "deprecated"))

instance ToJSON MachineType where
        toJSON MachineType'{..}
          = object
              (catMaybes
                 [("isSharedCpu" .=) <$> _mtIsSharedCPU,
                  Just ("kind" .= _mtKind),
                  ("imageSpaceGb" .=) <$> _mtImageSpaceGb,
                  ("zone" .=) <$> _mtZone,
                  ("selfLink" .=) <$> _mtSelfLink,
                  ("name" .=) <$> _mtName,
                  ("creationTimestamp" .=) <$> _mtCreationTimestamp,
                  ("scratchDisks" .=) <$> _mtScratchDisks,
                  ("id" .=) <$> _mtId,
                  ("guestCpus" .=) <$> _mtGuestCPUs,
                  ("maximumPersistentDisksSizeGb" .=) <$>
                    _mtMaximumPersistentDisksSizeGb,
                  ("maximumPersistentDisks" .=) <$>
                    _mtMaximumPersistentDisks,
                  ("memoryMb" .=) <$> _mtMemoryMb,
                  ("description" .=) <$> _mtDescription,
                  ("deprecated" .=) <$> _mtDeprecated])

-- | A specification of the type and number of accelerator cards attached to
-- the instance.
--
-- /See:/ 'acceleratorConfig' smart constructor.
data AcceleratorConfig = AcceleratorConfig'
    { _acAcceleratorCount :: !(Maybe (Textual Int32))
    , _acAcceleratorType  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AcceleratorConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acAcceleratorCount'
--
-- * 'acAcceleratorType'
acceleratorConfig
    :: AcceleratorConfig
acceleratorConfig =
    AcceleratorConfig'
    { _acAcceleratorCount = Nothing
    , _acAcceleratorType = Nothing
    }

-- | The number of the guest accelerator cards exposed to this instance.
acAcceleratorCount :: Lens' AcceleratorConfig (Maybe Int32)
acAcceleratorCount
  = lens _acAcceleratorCount
      (\ s a -> s{_acAcceleratorCount = a})
      . mapping _Coerce

-- | Full or partial URL of the accelerator type resource to attach to this
-- instance. If you are creating an instance template, specify only the
-- accelerator name.
acAcceleratorType :: Lens' AcceleratorConfig (Maybe Text)
acAcceleratorType
  = lens _acAcceleratorType
      (\ s a -> s{_acAcceleratorType = a})

instance FromJSON AcceleratorConfig where
        parseJSON
          = withObject "AcceleratorConfig"
              (\ o ->
                 AcceleratorConfig' <$>
                   (o .:? "acceleratorCount") <*>
                     (o .:? "acceleratorType"))

instance ToJSON AcceleratorConfig where
        toJSON AcceleratorConfig'{..}
          = object
              (catMaybes
                 [("acceleratorCount" .=) <$> _acAcceleratorCount,
                  ("acceleratorType" .=) <$> _acAcceleratorType])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'autoscalerListWarning' smart constructor.
data AutoscalerListWarning = AutoscalerListWarning'
    { _alwData    :: !(Maybe [AutoscalerListWarningDataItem])
    , _alwCode    :: !(Maybe AutoscalerListWarningCode)
    , _alwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalerListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'alwData'
--
-- * 'alwCode'
--
-- * 'alwMessage'
autoscalerListWarning
    :: AutoscalerListWarning
autoscalerListWarning =
    AutoscalerListWarning'
    { _alwData = Nothing
    , _alwCode = Nothing
    , _alwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
alwData :: Lens' AutoscalerListWarning [AutoscalerListWarningDataItem]
alwData
  = lens _alwData (\ s a -> s{_alwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
alwCode :: Lens' AutoscalerListWarning (Maybe AutoscalerListWarningCode)
alwCode = lens _alwCode (\ s a -> s{_alwCode = a})

-- | [Output Only] A human-readable description of the warning code.
alwMessage :: Lens' AutoscalerListWarning (Maybe Text)
alwMessage
  = lens _alwMessage (\ s a -> s{_alwMessage = a})

instance FromJSON AutoscalerListWarning where
        parseJSON
          = withObject "AutoscalerListWarning"
              (\ o ->
                 AutoscalerListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AutoscalerListWarning where
        toJSON AutoscalerListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _alwData, ("code" .=) <$> _alwCode,
                  ("message" .=) <$> _alwMessage])

--
-- /See:/ 'machineTypeAggregatedListWarningDataItem' smart constructor.
data MachineTypeAggregatedListWarningDataItem = MachineTypeAggregatedListWarningDataItem'
    { _mtalwdiValue :: !(Maybe Text)
    , _mtalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypeAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtalwdiValue'
--
-- * 'mtalwdiKey'
machineTypeAggregatedListWarningDataItem
    :: MachineTypeAggregatedListWarningDataItem
machineTypeAggregatedListWarningDataItem =
    MachineTypeAggregatedListWarningDataItem'
    { _mtalwdiValue = Nothing
    , _mtalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
mtalwdiValue :: Lens' MachineTypeAggregatedListWarningDataItem (Maybe Text)
mtalwdiValue
  = lens _mtalwdiValue (\ s a -> s{_mtalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
mtalwdiKey :: Lens' MachineTypeAggregatedListWarningDataItem (Maybe Text)
mtalwdiKey
  = lens _mtalwdiKey (\ s a -> s{_mtalwdiKey = a})

instance FromJSON
         MachineTypeAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "MachineTypeAggregatedListWarningDataItem"
              (\ o ->
                 MachineTypeAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         MachineTypeAggregatedListWarningDataItem where
        toJSON MachineTypeAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _mtalwdiValue,
                  ("key" .=) <$> _mtalwdiKey])

-- | [Output Only] If errors are generated during processing of the
-- operation, this field will be populated.
--
-- /See:/ 'operationError' smart constructor.
newtype OperationError = OperationError'
    { _oeErrors :: Maybe [OperationErrorErrorsItem]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationError' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oeErrors'
operationError
    :: OperationError
operationError =
    OperationError'
    { _oeErrors = Nothing
    }

-- | [Output Only] The array of errors encountered while processing this
-- operation.
oeErrors :: Lens' OperationError [OperationErrorErrorsItem]
oeErrors
  = lens _oeErrors (\ s a -> s{_oeErrors = a}) .
      _Default
      . _Coerce

instance FromJSON OperationError where
        parseJSON
          = withObject "OperationError"
              (\ o ->
                 OperationError' <$> (o .:? "errors" .!= mempty))

instance ToJSON OperationError where
        toJSON OperationError'{..}
          = object (catMaybes [("errors" .=) <$> _oeErrors])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'nodeTypeAggregatedListWarning' smart constructor.
data NodeTypeAggregatedListWarning = NodeTypeAggregatedListWarning'
    { _ntalwtData    :: !(Maybe [NodeTypeAggregatedListWarningDataItem])
    , _ntalwtCode    :: !(Maybe NodeTypeAggregatedListWarningCode)
    , _ntalwtMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypeAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntalwtData'
--
-- * 'ntalwtCode'
--
-- * 'ntalwtMessage'
nodeTypeAggregatedListWarning
    :: NodeTypeAggregatedListWarning
nodeTypeAggregatedListWarning =
    NodeTypeAggregatedListWarning'
    { _ntalwtData = Nothing
    , _ntalwtCode = Nothing
    , _ntalwtMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
ntalwtData :: Lens' NodeTypeAggregatedListWarning [NodeTypeAggregatedListWarningDataItem]
ntalwtData
  = lens _ntalwtData (\ s a -> s{_ntalwtData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
ntalwtCode :: Lens' NodeTypeAggregatedListWarning (Maybe NodeTypeAggregatedListWarningCode)
ntalwtCode
  = lens _ntalwtCode (\ s a -> s{_ntalwtCode = a})

-- | [Output Only] A human-readable description of the warning code.
ntalwtMessage :: Lens' NodeTypeAggregatedListWarning (Maybe Text)
ntalwtMessage
  = lens _ntalwtMessage
      (\ s a -> s{_ntalwtMessage = a})

instance FromJSON NodeTypeAggregatedListWarning where
        parseJSON
          = withObject "NodeTypeAggregatedListWarning"
              (\ o ->
                 NodeTypeAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NodeTypeAggregatedListWarning where
        toJSON NodeTypeAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _ntalwtData,
                  ("code" .=) <$> _ntalwtCode,
                  ("message" .=) <$> _ntalwtMessage])

-- | Informational warning which replaces the list of addresses when the list
-- is empty.
--
-- /See:/ 'targetInstancesScopedListWarning' smart constructor.
data TargetInstancesScopedListWarning = TargetInstancesScopedListWarning'
    { _tislwData    :: !(Maybe [TargetInstancesScopedListWarningDataItem])
    , _tislwCode    :: !(Maybe TargetInstancesScopedListWarningCode)
    , _tislwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstancesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tislwData'
--
-- * 'tislwCode'
--
-- * 'tislwMessage'
targetInstancesScopedListWarning
    :: TargetInstancesScopedListWarning
targetInstancesScopedListWarning =
    TargetInstancesScopedListWarning'
    { _tislwData = Nothing
    , _tislwCode = Nothing
    , _tislwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tislwData :: Lens' TargetInstancesScopedListWarning [TargetInstancesScopedListWarningDataItem]
tislwData
  = lens _tislwData (\ s a -> s{_tislwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tislwCode :: Lens' TargetInstancesScopedListWarning (Maybe TargetInstancesScopedListWarningCode)
tislwCode
  = lens _tislwCode (\ s a -> s{_tislwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tislwMessage :: Lens' TargetInstancesScopedListWarning (Maybe Text)
tislwMessage
  = lens _tislwMessage (\ s a -> s{_tislwMessage = a})

instance FromJSON TargetInstancesScopedListWarning
         where
        parseJSON
          = withObject "TargetInstancesScopedListWarning"
              (\ o ->
                 TargetInstancesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetInstancesScopedListWarning
         where
        toJSON TargetInstancesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tislwData,
                  ("code" .=) <$> _tislwCode,
                  ("message" .=) <$> _tislwMessage])

--
-- /See:/ 'subnetworkAggregatedList' smart constructor.
data SubnetworkAggregatedList = SubnetworkAggregatedList'
    { _salNextPageToken :: !(Maybe Text)
    , _salKind          :: !Text
    , _salItems         :: !(Maybe SubnetworkAggregatedListItems)
    , _salSelfLink      :: !(Maybe Text)
    , _salWarning       :: !(Maybe SubnetworkAggregatedListWarning)
    , _salId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworkAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'salNextPageToken'
--
-- * 'salKind'
--
-- * 'salItems'
--
-- * 'salSelfLink'
--
-- * 'salWarning'
--
-- * 'salId'
subnetworkAggregatedList
    :: SubnetworkAggregatedList
subnetworkAggregatedList =
    SubnetworkAggregatedList'
    { _salNextPageToken = Nothing
    , _salKind = "compute#subnetworkAggregatedList"
    , _salItems = Nothing
    , _salSelfLink = Nothing
    , _salWarning = Nothing
    , _salId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
salNextPageToken :: Lens' SubnetworkAggregatedList (Maybe Text)
salNextPageToken
  = lens _salNextPageToken
      (\ s a -> s{_salNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#subnetworkAggregatedList
-- for aggregated lists of subnetworks.
salKind :: Lens' SubnetworkAggregatedList Text
salKind = lens _salKind (\ s a -> s{_salKind = a})

-- | A list of SubnetworksScopedList resources.
salItems :: Lens' SubnetworkAggregatedList (Maybe SubnetworkAggregatedListItems)
salItems = lens _salItems (\ s a -> s{_salItems = a})

-- | [Output Only] Server-defined URL for this resource.
salSelfLink :: Lens' SubnetworkAggregatedList (Maybe Text)
salSelfLink
  = lens _salSelfLink (\ s a -> s{_salSelfLink = a})

-- | [Output Only] Informational warning message.
salWarning :: Lens' SubnetworkAggregatedList (Maybe SubnetworkAggregatedListWarning)
salWarning
  = lens _salWarning (\ s a -> s{_salWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
salId :: Lens' SubnetworkAggregatedList (Maybe Text)
salId = lens _salId (\ s a -> s{_salId = a})

instance FromJSON SubnetworkAggregatedList where
        parseJSON
          = withObject "SubnetworkAggregatedList"
              (\ o ->
                 SubnetworkAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#subnetworkAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON SubnetworkAggregatedList where
        toJSON SubnetworkAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _salNextPageToken,
                  Just ("kind" .= _salKind),
                  ("items" .=) <$> _salItems,
                  ("selfLink" .=) <$> _salSelfLink,
                  ("warning" .=) <$> _salWarning,
                  ("id" .=) <$> _salId])

--
-- /See:/ 'vpnTunnelListWarningDataItem' smart constructor.
data VPNTunnelListWarningDataItem = VPNTunnelListWarningDataItem'
    { _vtlwdiValue :: !(Maybe Text)
    , _vtlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtlwdiValue'
--
-- * 'vtlwdiKey'
vpnTunnelListWarningDataItem
    :: VPNTunnelListWarningDataItem
vpnTunnelListWarningDataItem =
    VPNTunnelListWarningDataItem'
    { _vtlwdiValue = Nothing
    , _vtlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
vtlwdiValue :: Lens' VPNTunnelListWarningDataItem (Maybe Text)
vtlwdiValue
  = lens _vtlwdiValue (\ s a -> s{_vtlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
vtlwdiKey :: Lens' VPNTunnelListWarningDataItem (Maybe Text)
vtlwdiKey
  = lens _vtlwdiKey (\ s a -> s{_vtlwdiKey = a})

instance FromJSON VPNTunnelListWarningDataItem where
        parseJSON
          = withObject "VPNTunnelListWarningDataItem"
              (\ o ->
                 VPNTunnelListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON VPNTunnelListWarningDataItem where
        toJSON VPNTunnelListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _vtlwdiValue,
                  ("key" .=) <$> _vtlwdiKey])

--
-- /See:/ 'interconnectDiagnosticsLinkOpticalPower' smart constructor.
data InterconnectDiagnosticsLinkOpticalPower = InterconnectDiagnosticsLinkOpticalPower'
    { _idlopState :: !(Maybe InterconnectDiagnosticsLinkOpticalPowerState)
    , _idlopValue :: !(Maybe (Textual Double))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectDiagnosticsLinkOpticalPower' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'idlopState'
--
-- * 'idlopValue'
interconnectDiagnosticsLinkOpticalPower
    :: InterconnectDiagnosticsLinkOpticalPower
interconnectDiagnosticsLinkOpticalPower =
    InterconnectDiagnosticsLinkOpticalPower'
    { _idlopState = Nothing
    , _idlopValue = Nothing
    }

idlopState :: Lens' InterconnectDiagnosticsLinkOpticalPower (Maybe InterconnectDiagnosticsLinkOpticalPowerState)
idlopState
  = lens _idlopState (\ s a -> s{_idlopState = a})

-- | Value of the current optical power, read in dBm. Take a known good
-- optical value, give it a 10% margin and trigger warnings relative to
-- that value. In general, a -7dBm warning and a -11dBm alarm are good
-- optical value estimates for most links.
idlopValue :: Lens' InterconnectDiagnosticsLinkOpticalPower (Maybe Double)
idlopValue
  = lens _idlopValue (\ s a -> s{_idlopValue = a}) .
      mapping _Coerce

instance FromJSON
         InterconnectDiagnosticsLinkOpticalPower where
        parseJSON
          = withObject
              "InterconnectDiagnosticsLinkOpticalPower"
              (\ o ->
                 InterconnectDiagnosticsLinkOpticalPower' <$>
                   (o .:? "state") <*> (o .:? "value"))

instance ToJSON
         InterconnectDiagnosticsLinkOpticalPower where
        toJSON InterconnectDiagnosticsLinkOpticalPower'{..}
          = object
              (catMaybes
                 [("state" .=) <$> _idlopState,
                  ("value" .=) <$> _idlopValue])

--
-- /See:/ 'disksResizeRequest' smart constructor.
newtype DisksResizeRequest = DisksResizeRequest'
    { _drrSizeGb :: Maybe (Textual Int64)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DisksResizeRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'drrSizeGb'
disksResizeRequest
    :: DisksResizeRequest
disksResizeRequest =
    DisksResizeRequest'
    { _drrSizeGb = Nothing
    }

-- | The new size of the persistent disk, which is specified in GB.
drrSizeGb :: Lens' DisksResizeRequest (Maybe Int64)
drrSizeGb
  = lens _drrSizeGb (\ s a -> s{_drrSizeGb = a}) .
      mapping _Coerce

instance FromJSON DisksResizeRequest where
        parseJSON
          = withObject "DisksResizeRequest"
              (\ o -> DisksResizeRequest' <$> (o .:? "sizeGb"))

instance ToJSON DisksResizeRequest where
        toJSON DisksResizeRequest'{..}
          = object (catMaybes [("sizeGb" .=) <$> _drrSizeGb])

--
-- /See:/ 'autoscalersScopedListWarningDataItem' smart constructor.
data AutoscalersScopedListWarningDataItem = AutoscalersScopedListWarningDataItem'
    { _aValue :: !(Maybe Text)
    , _aKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalersScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aValue'
--
-- * 'aKey'
autoscalersScopedListWarningDataItem
    :: AutoscalersScopedListWarningDataItem
autoscalersScopedListWarningDataItem =
    AutoscalersScopedListWarningDataItem'
    { _aValue = Nothing
    , _aKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
aValue :: Lens' AutoscalersScopedListWarningDataItem (Maybe Text)
aValue = lens _aValue (\ s a -> s{_aValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
aKey :: Lens' AutoscalersScopedListWarningDataItem (Maybe Text)
aKey = lens _aKey (\ s a -> s{_aKey = a})

instance FromJSON
         AutoscalersScopedListWarningDataItem where
        parseJSON
          = withObject "AutoscalersScopedListWarningDataItem"
              (\ o ->
                 AutoscalersScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON AutoscalersScopedListWarningDataItem
         where
        toJSON AutoscalersScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _aValue, ("key" .=) <$> _aKey])

--
-- /See:/ 'zoneSetPolicyRequest' smart constructor.
data ZoneSetPolicyRequest = ZoneSetPolicyRequest'
    { _zsprEtag     :: !(Maybe Bytes)
    , _zsprBindings :: !(Maybe [Binding])
    , _zsprPolicy   :: !(Maybe Policy)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ZoneSetPolicyRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zsprEtag'
--
-- * 'zsprBindings'
--
-- * 'zsprPolicy'
zoneSetPolicyRequest
    :: ZoneSetPolicyRequest
zoneSetPolicyRequest =
    ZoneSetPolicyRequest'
    { _zsprEtag = Nothing
    , _zsprBindings = Nothing
    , _zsprPolicy = Nothing
    }

-- | Flatten Policy to create a backward compatible wire-format. Deprecated.
-- Use \'policy\' to specify the etag.
zsprEtag :: Lens' ZoneSetPolicyRequest (Maybe ByteString)
zsprEtag
  = lens _zsprEtag (\ s a -> s{_zsprEtag = a}) .
      mapping _Bytes

-- | Flatten Policy to create a backwacd compatible wire-format. Deprecated.
-- Use \'policy\' to specify bindings.
zsprBindings :: Lens' ZoneSetPolicyRequest [Binding]
zsprBindings
  = lens _zsprBindings (\ s a -> s{_zsprBindings = a})
      . _Default
      . _Coerce

-- | REQUIRED: The complete policy to be applied to the \'resource\'. The
-- size of the policy is limited to a few 10s of KB. An empty policy is in
-- general a valid policy but certain services (like Projects) might reject
-- them.
zsprPolicy :: Lens' ZoneSetPolicyRequest (Maybe Policy)
zsprPolicy
  = lens _zsprPolicy (\ s a -> s{_zsprPolicy = a})

instance FromJSON ZoneSetPolicyRequest where
        parseJSON
          = withObject "ZoneSetPolicyRequest"
              (\ o ->
                 ZoneSetPolicyRequest' <$>
                   (o .:? "etag") <*> (o .:? "bindings" .!= mempty) <*>
                     (o .:? "policy"))

instance ToJSON ZoneSetPolicyRequest where
        toJSON ZoneSetPolicyRequest'{..}
          = object
              (catMaybes
                 [("etag" .=) <$> _zsprEtag,
                  ("bindings" .=) <$> _zsprBindings,
                  ("policy" .=) <$> _zsprPolicy])

--
-- /See:/ 'diskTypeAggregatedListWarningDataItem' smart constructor.
data DiskTypeAggregatedListWarningDataItem = DiskTypeAggregatedListWarningDataItem'
    { _dtalwdiValue :: !(Maybe Text)
    , _dtalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskTypeAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dtalwdiValue'
--
-- * 'dtalwdiKey'
diskTypeAggregatedListWarningDataItem
    :: DiskTypeAggregatedListWarningDataItem
diskTypeAggregatedListWarningDataItem =
    DiskTypeAggregatedListWarningDataItem'
    { _dtalwdiValue = Nothing
    , _dtalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
dtalwdiValue :: Lens' DiskTypeAggregatedListWarningDataItem (Maybe Text)
dtalwdiValue
  = lens _dtalwdiValue (\ s a -> s{_dtalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
dtalwdiKey :: Lens' DiskTypeAggregatedListWarningDataItem (Maybe Text)
dtalwdiKey
  = lens _dtalwdiKey (\ s a -> s{_dtalwdiKey = a})

instance FromJSON
         DiskTypeAggregatedListWarningDataItem where
        parseJSON
          = withObject "DiskTypeAggregatedListWarningDataItem"
              (\ o ->
                 DiskTypeAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON DiskTypeAggregatedListWarningDataItem
         where
        toJSON DiskTypeAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _dtalwdiValue,
                  ("key" .=) <$> _dtalwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'regionInstanceGroupManagerListWarning' smart constructor.
data RegionInstanceGroupManagerListWarning = RegionInstanceGroupManagerListWarning'
    { _rigmlwData    :: !(Maybe [RegionInstanceGroupManagerListWarningDataItem])
    , _rigmlwCode    :: !(Maybe RegionInstanceGroupManagerListWarningCode)
    , _rigmlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagerListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmlwData'
--
-- * 'rigmlwCode'
--
-- * 'rigmlwMessage'
regionInstanceGroupManagerListWarning
    :: RegionInstanceGroupManagerListWarning
regionInstanceGroupManagerListWarning =
    RegionInstanceGroupManagerListWarning'
    { _rigmlwData = Nothing
    , _rigmlwCode = Nothing
    , _rigmlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
rigmlwData :: Lens' RegionInstanceGroupManagerListWarning [RegionInstanceGroupManagerListWarningDataItem]
rigmlwData
  = lens _rigmlwData (\ s a -> s{_rigmlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
rigmlwCode :: Lens' RegionInstanceGroupManagerListWarning (Maybe RegionInstanceGroupManagerListWarningCode)
rigmlwCode
  = lens _rigmlwCode (\ s a -> s{_rigmlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
rigmlwMessage :: Lens' RegionInstanceGroupManagerListWarning (Maybe Text)
rigmlwMessage
  = lens _rigmlwMessage
      (\ s a -> s{_rigmlwMessage = a})

instance FromJSON
         RegionInstanceGroupManagerListWarning where
        parseJSON
          = withObject "RegionInstanceGroupManagerListWarning"
              (\ o ->
                 RegionInstanceGroupManagerListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RegionInstanceGroupManagerListWarning
         where
        toJSON RegionInstanceGroupManagerListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _rigmlwData,
                  ("code" .=) <$> _rigmlwCode,
                  ("message" .=) <$> _rigmlwMessage])

--
-- /See:/ 'regionInstanceGroupManagersSetTemplateRequest' smart constructor.
newtype RegionInstanceGroupManagersSetTemplateRequest = RegionInstanceGroupManagersSetTemplateRequest'
    { _rigmstrInstanceTemplate :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupManagersSetTemplateRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rigmstrInstanceTemplate'
regionInstanceGroupManagersSetTemplateRequest
    :: RegionInstanceGroupManagersSetTemplateRequest
regionInstanceGroupManagersSetTemplateRequest =
    RegionInstanceGroupManagersSetTemplateRequest'
    { _rigmstrInstanceTemplate = Nothing
    }

-- | URL of the InstanceTemplate resource from which all new instances will
-- be created.
rigmstrInstanceTemplate :: Lens' RegionInstanceGroupManagersSetTemplateRequest (Maybe Text)
rigmstrInstanceTemplate
  = lens _rigmstrInstanceTemplate
      (\ s a -> s{_rigmstrInstanceTemplate = a})

instance FromJSON
         RegionInstanceGroupManagersSetTemplateRequest where
        parseJSON
          = withObject
              "RegionInstanceGroupManagersSetTemplateRequest"
              (\ o ->
                 RegionInstanceGroupManagersSetTemplateRequest' <$>
                   (o .:? "instanceTemplate"))

instance ToJSON
         RegionInstanceGroupManagersSetTemplateRequest where
        toJSON
          RegionInstanceGroupManagersSetTemplateRequest'{..}
          = object
              (catMaybes
                 [("instanceTemplate" .=) <$>
                    _rigmstrInstanceTemplate])

--
-- /See:/ 'instanceGroupsListInstances' smart constructor.
data InstanceGroupsListInstances = InstanceGroupsListInstances'
    { _igliNextPageToken :: !(Maybe Text)
    , _igliKind          :: !Text
    , _igliItems         :: !(Maybe [InstanceWithNamedPorts])
    , _igliSelfLink      :: !(Maybe Text)
    , _igliWarning       :: !(Maybe InstanceGroupsListInstancesWarning)
    , _igliId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsListInstances' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igliNextPageToken'
--
-- * 'igliKind'
--
-- * 'igliItems'
--
-- * 'igliSelfLink'
--
-- * 'igliWarning'
--
-- * 'igliId'
instanceGroupsListInstances
    :: InstanceGroupsListInstances
instanceGroupsListInstances =
    InstanceGroupsListInstances'
    { _igliNextPageToken = Nothing
    , _igliKind = "compute#instanceGroupsListInstances"
    , _igliItems = Nothing
    , _igliSelfLink = Nothing
    , _igliWarning = Nothing
    , _igliId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
igliNextPageToken :: Lens' InstanceGroupsListInstances (Maybe Text)
igliNextPageToken
  = lens _igliNextPageToken
      (\ s a -> s{_igliNextPageToken = a})

-- | [Output Only] The resource type, which is always
-- compute#instanceGroupsListInstances for the list of instances in the
-- specified instance group.
igliKind :: Lens' InstanceGroupsListInstances Text
igliKind = lens _igliKind (\ s a -> s{_igliKind = a})

-- | A list of InstanceWithNamedPorts resources.
igliItems :: Lens' InstanceGroupsListInstances [InstanceWithNamedPorts]
igliItems
  = lens _igliItems (\ s a -> s{_igliItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
igliSelfLink :: Lens' InstanceGroupsListInstances (Maybe Text)
igliSelfLink
  = lens _igliSelfLink (\ s a -> s{_igliSelfLink = a})

-- | [Output Only] Informational warning message.
igliWarning :: Lens' InstanceGroupsListInstances (Maybe InstanceGroupsListInstancesWarning)
igliWarning
  = lens _igliWarning (\ s a -> s{_igliWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
igliId :: Lens' InstanceGroupsListInstances (Maybe Text)
igliId = lens _igliId (\ s a -> s{_igliId = a})

instance FromJSON InstanceGroupsListInstances where
        parseJSON
          = withObject "InstanceGroupsListInstances"
              (\ o ->
                 InstanceGroupsListInstances' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#instanceGroupsListInstances")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceGroupsListInstances where
        toJSON InstanceGroupsListInstances'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _igliNextPageToken,
                  Just ("kind" .= _igliKind),
                  ("items" .=) <$> _igliItems,
                  ("selfLink" .=) <$> _igliSelfLink,
                  ("warning" .=) <$> _igliWarning,
                  ("id" .=) <$> _igliId])

-- | Represents an Autoscaler resource. Autoscalers allow you to
-- automatically scale virtual machine instances in managed instance groups
-- according to an autoscaling policy that you define. For more
-- information, read Autoscaling Groups of Instances. (== resource_for
-- beta.autoscalers ==) (== resource_for v1.autoscalers ==) (==
-- resource_for beta.regionAutoscalers ==) (== resource_for
-- v1.regionAutoscalers ==)
--
-- /See:/ 'autoscaler' smart constructor.
data Autoscaler = Autoscaler'
    { _aaStatus            :: !(Maybe AutoscalerStatus)
    , _aaKind              :: !Text
    , _aaZone              :: !(Maybe Text)
    , _aaStatusDetails     :: !(Maybe [AutoscalerStatusDetails])
    , _aaSelfLink          :: !(Maybe Text)
    , _aaName              :: !(Maybe Text)
    , _aaCreationTimestamp :: !(Maybe Text)
    , _aaAutoscalingPolicy :: !(Maybe AutoscalingPolicy)
    , _aaId                :: !(Maybe (Textual Word64))
    , _aaRegion            :: !(Maybe Text)
    , _aaDescription       :: !(Maybe Text)
    , _aaTarget            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Autoscaler' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aaStatus'
--
-- * 'aaKind'
--
-- * 'aaZone'
--
-- * 'aaStatusDetails'
--
-- * 'aaSelfLink'
--
-- * 'aaName'
--
-- * 'aaCreationTimestamp'
--
-- * 'aaAutoscalingPolicy'
--
-- * 'aaId'
--
-- * 'aaRegion'
--
-- * 'aaDescription'
--
-- * 'aaTarget'
autoscaler
    :: Autoscaler
autoscaler =
    Autoscaler'
    { _aaStatus = Nothing
    , _aaKind = "compute#autoscaler"
    , _aaZone = Nothing
    , _aaStatusDetails = Nothing
    , _aaSelfLink = Nothing
    , _aaName = Nothing
    , _aaCreationTimestamp = Nothing
    , _aaAutoscalingPolicy = Nothing
    , _aaId = Nothing
    , _aaRegion = Nothing
    , _aaDescription = Nothing
    , _aaTarget = Nothing
    }

-- | [Output Only] The status of the autoscaler configuration.
aaStatus :: Lens' Autoscaler (Maybe AutoscalerStatus)
aaStatus = lens _aaStatus (\ s a -> s{_aaStatus = a})

-- | [Output Only] Type of the resource. Always compute#autoscaler for
-- autoscalers.
aaKind :: Lens' Autoscaler Text
aaKind = lens _aaKind (\ s a -> s{_aaKind = a})

-- | [Output Only] URL of the zone where the instance group resides (for
-- autoscalers living in zonal scope).
aaZone :: Lens' Autoscaler (Maybe Text)
aaZone = lens _aaZone (\ s a -> s{_aaZone = a})

-- | [Output Only] Human-readable details about the current state of the
-- autoscaler. Read the documentation for Commonly returned status messages
-- for examples of status messages you might encounter.
aaStatusDetails :: Lens' Autoscaler [AutoscalerStatusDetails]
aaStatusDetails
  = lens _aaStatusDetails
      (\ s a -> s{_aaStatusDetails = a})
      . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for the resource.
aaSelfLink :: Lens' Autoscaler (Maybe Text)
aaSelfLink
  = lens _aaSelfLink (\ s a -> s{_aaSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
aaName :: Lens' Autoscaler (Maybe Text)
aaName = lens _aaName (\ s a -> s{_aaName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
aaCreationTimestamp :: Lens' Autoscaler (Maybe Text)
aaCreationTimestamp
  = lens _aaCreationTimestamp
      (\ s a -> s{_aaCreationTimestamp = a})

-- | The configuration parameters for the autoscaling algorithm. You can
-- define one or more of the policies for an autoscaler: cpuUtilization,
-- customMetricUtilizations, and loadBalancingUtilization. If none of these
-- are specified, the default will be to autoscale based on cpuUtilization
-- to 0.6 or 60%.
aaAutoscalingPolicy :: Lens' Autoscaler (Maybe AutoscalingPolicy)
aaAutoscalingPolicy
  = lens _aaAutoscalingPolicy
      (\ s a -> s{_aaAutoscalingPolicy = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
aaId :: Lens' Autoscaler (Maybe Word64)
aaId
  = lens _aaId (\ s a -> s{_aaId = a}) .
      mapping _Coerce

-- | [Output Only] URL of the region where the instance group resides (for
-- autoscalers living in regional scope).
aaRegion :: Lens' Autoscaler (Maybe Text)
aaRegion = lens _aaRegion (\ s a -> s{_aaRegion = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
aaDescription :: Lens' Autoscaler (Maybe Text)
aaDescription
  = lens _aaDescription
      (\ s a -> s{_aaDescription = a})

-- | URL of the managed instance group that this autoscaler will scale.
aaTarget :: Lens' Autoscaler (Maybe Text)
aaTarget = lens _aaTarget (\ s a -> s{_aaTarget = a})

instance FromJSON Autoscaler where
        parseJSON
          = withObject "Autoscaler"
              (\ o ->
                 Autoscaler' <$>
                   (o .:? "status") <*>
                     (o .:? "kind" .!= "compute#autoscaler")
                     <*> (o .:? "zone")
                     <*> (o .:? "statusDetails" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "autoscalingPolicy")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "description")
                     <*> (o .:? "target"))

instance ToJSON Autoscaler where
        toJSON Autoscaler'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _aaStatus,
                  Just ("kind" .= _aaKind), ("zone" .=) <$> _aaZone,
                  ("statusDetails" .=) <$> _aaStatusDetails,
                  ("selfLink" .=) <$> _aaSelfLink,
                  ("name" .=) <$> _aaName,
                  ("creationTimestamp" .=) <$> _aaCreationTimestamp,
                  ("autoscalingPolicy" .=) <$> _aaAutoscalingPolicy,
                  ("id" .=) <$> _aaId, ("region" .=) <$> _aaRegion,
                  ("description" .=) <$> _aaDescription,
                  ("target" .=) <$> _aaTarget])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'machineTypeListWarning' smart constructor.
data MachineTypeListWarning = MachineTypeListWarning'
    { _mtlwData    :: !(Maybe [MachineTypeListWarningDataItem])
    , _mtlwCode    :: !(Maybe MachineTypeListWarningCode)
    , _mtlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MachineTypeListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mtlwData'
--
-- * 'mtlwCode'
--
-- * 'mtlwMessage'
machineTypeListWarning
    :: MachineTypeListWarning
machineTypeListWarning =
    MachineTypeListWarning'
    { _mtlwData = Nothing
    , _mtlwCode = Nothing
    , _mtlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
mtlwData :: Lens' MachineTypeListWarning [MachineTypeListWarningDataItem]
mtlwData
  = lens _mtlwData (\ s a -> s{_mtlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
mtlwCode :: Lens' MachineTypeListWarning (Maybe MachineTypeListWarningCode)
mtlwCode = lens _mtlwCode (\ s a -> s{_mtlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
mtlwMessage :: Lens' MachineTypeListWarning (Maybe Text)
mtlwMessage
  = lens _mtlwMessage (\ s a -> s{_mtlwMessage = a})

instance FromJSON MachineTypeListWarning where
        parseJSON
          = withObject "MachineTypeListWarning"
              (\ o ->
                 MachineTypeListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON MachineTypeListWarning where
        toJSON MachineTypeListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _mtlwData,
                  ("code" .=) <$> _mtlwCode,
                  ("message" .=) <$> _mtlwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetHTTPProxyListWarning' smart constructor.
data TargetHTTPProxyListWarning = TargetHTTPProxyListWarning'
    { _thttpplwData    :: !(Maybe [TargetHTTPProxyListWarningDataItem])
    , _thttpplwCode    :: !(Maybe TargetHTTPProxyListWarningCode)
    , _thttpplwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPProxyListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thttpplwData'
--
-- * 'thttpplwCode'
--
-- * 'thttpplwMessage'
targetHTTPProxyListWarning
    :: TargetHTTPProxyListWarning
targetHTTPProxyListWarning =
    TargetHTTPProxyListWarning'
    { _thttpplwData = Nothing
    , _thttpplwCode = Nothing
    , _thttpplwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
thttpplwData :: Lens' TargetHTTPProxyListWarning [TargetHTTPProxyListWarningDataItem]
thttpplwData
  = lens _thttpplwData (\ s a -> s{_thttpplwData = a})
      . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
thttpplwCode :: Lens' TargetHTTPProxyListWarning (Maybe TargetHTTPProxyListWarningCode)
thttpplwCode
  = lens _thttpplwCode (\ s a -> s{_thttpplwCode = a})

-- | [Output Only] A human-readable description of the warning code.
thttpplwMessage :: Lens' TargetHTTPProxyListWarning (Maybe Text)
thttpplwMessage
  = lens _thttpplwMessage
      (\ s a -> s{_thttpplwMessage = a})

instance FromJSON TargetHTTPProxyListWarning where
        parseJSON
          = withObject "TargetHTTPProxyListWarning"
              (\ o ->
                 TargetHTTPProxyListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetHTTPProxyListWarning where
        toJSON TargetHTTPProxyListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _thttpplwData,
                  ("code" .=) <$> _thttpplwCode,
                  ("message" .=) <$> _thttpplwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'diskAggregatedListWarning' smart constructor.
data DiskAggregatedListWarning = DiskAggregatedListWarning'
    { _dalwData    :: !(Maybe [DiskAggregatedListWarningDataItem])
    , _dalwCode    :: !(Maybe DiskAggregatedListWarningCode)
    , _dalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dalwData'
--
-- * 'dalwCode'
--
-- * 'dalwMessage'
diskAggregatedListWarning
    :: DiskAggregatedListWarning
diskAggregatedListWarning =
    DiskAggregatedListWarning'
    { _dalwData = Nothing
    , _dalwCode = Nothing
    , _dalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
dalwData :: Lens' DiskAggregatedListWarning [DiskAggregatedListWarningDataItem]
dalwData
  = lens _dalwData (\ s a -> s{_dalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
dalwCode :: Lens' DiskAggregatedListWarning (Maybe DiskAggregatedListWarningCode)
dalwCode = lens _dalwCode (\ s a -> s{_dalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
dalwMessage :: Lens' DiskAggregatedListWarning (Maybe Text)
dalwMessage
  = lens _dalwMessage (\ s a -> s{_dalwMessage = a})

instance FromJSON DiskAggregatedListWarning where
        parseJSON
          = withObject "DiskAggregatedListWarning"
              (\ o ->
                 DiskAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON DiskAggregatedListWarning where
        toJSON DiskAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _dalwData,
                  ("code" .=) <$> _dalwCode,
                  ("message" .=) <$> _dalwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetPoolAggregatedListWarning' smart constructor.
data TargetPoolAggregatedListWarning = TargetPoolAggregatedListWarning'
    { _tpalwData    :: !(Maybe [TargetPoolAggregatedListWarningDataItem])
    , _tpalwCode    :: !(Maybe TargetPoolAggregatedListWarningCode)
    , _tpalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpalwData'
--
-- * 'tpalwCode'
--
-- * 'tpalwMessage'
targetPoolAggregatedListWarning
    :: TargetPoolAggregatedListWarning
targetPoolAggregatedListWarning =
    TargetPoolAggregatedListWarning'
    { _tpalwData = Nothing
    , _tpalwCode = Nothing
    , _tpalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tpalwData :: Lens' TargetPoolAggregatedListWarning [TargetPoolAggregatedListWarningDataItem]
tpalwData
  = lens _tpalwData (\ s a -> s{_tpalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tpalwCode :: Lens' TargetPoolAggregatedListWarning (Maybe TargetPoolAggregatedListWarningCode)
tpalwCode
  = lens _tpalwCode (\ s a -> s{_tpalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tpalwMessage :: Lens' TargetPoolAggregatedListWarning (Maybe Text)
tpalwMessage
  = lens _tpalwMessage (\ s a -> s{_tpalwMessage = a})

instance FromJSON TargetPoolAggregatedListWarning
         where
        parseJSON
          = withObject "TargetPoolAggregatedListWarning"
              (\ o ->
                 TargetPoolAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetPoolAggregatedListWarning where
        toJSON TargetPoolAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tpalwData,
                  ("code" .=) <$> _tpalwCode,
                  ("message" .=) <$> _tpalwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'usableSubnetworksAggregatedListWarning' smart constructor.
data UsableSubnetworksAggregatedListWarning = UsableSubnetworksAggregatedListWarning'
    { _usalwData    :: !(Maybe [UsableSubnetworksAggregatedListWarningDataItem])
    , _usalwCode    :: !(Maybe UsableSubnetworksAggregatedListWarningCode)
    , _usalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'UsableSubnetworksAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'usalwData'
--
-- * 'usalwCode'
--
-- * 'usalwMessage'
usableSubnetworksAggregatedListWarning
    :: UsableSubnetworksAggregatedListWarning
usableSubnetworksAggregatedListWarning =
    UsableSubnetworksAggregatedListWarning'
    { _usalwData = Nothing
    , _usalwCode = Nothing
    , _usalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
usalwData :: Lens' UsableSubnetworksAggregatedListWarning [UsableSubnetworksAggregatedListWarningDataItem]
usalwData
  = lens _usalwData (\ s a -> s{_usalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
usalwCode :: Lens' UsableSubnetworksAggregatedListWarning (Maybe UsableSubnetworksAggregatedListWarningCode)
usalwCode
  = lens _usalwCode (\ s a -> s{_usalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
usalwMessage :: Lens' UsableSubnetworksAggregatedListWarning (Maybe Text)
usalwMessage
  = lens _usalwMessage (\ s a -> s{_usalwMessage = a})

instance FromJSON
         UsableSubnetworksAggregatedListWarning where
        parseJSON
          = withObject "UsableSubnetworksAggregatedListWarning"
              (\ o ->
                 UsableSubnetworksAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON
         UsableSubnetworksAggregatedListWarning where
        toJSON UsableSubnetworksAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _usalwData,
                  ("code" .=) <$> _usalwCode,
                  ("message" .=) <$> _usalwMessage])

-- | [Output Only] Informational warning which replaces the list of disks
-- when the list is empty.
--
-- /See:/ 'disksScopedListWarning' smart constructor.
data DisksScopedListWarning = DisksScopedListWarning'
    { _dslwData    :: !(Maybe [DisksScopedListWarningDataItem])
    , _dslwCode    :: !(Maybe DisksScopedListWarningCode)
    , _dslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DisksScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dslwData'
--
-- * 'dslwCode'
--
-- * 'dslwMessage'
disksScopedListWarning
    :: DisksScopedListWarning
disksScopedListWarning =
    DisksScopedListWarning'
    { _dslwData = Nothing
    , _dslwCode = Nothing
    , _dslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
dslwData :: Lens' DisksScopedListWarning [DisksScopedListWarningDataItem]
dslwData
  = lens _dslwData (\ s a -> s{_dslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
dslwCode :: Lens' DisksScopedListWarning (Maybe DisksScopedListWarningCode)
dslwCode = lens _dslwCode (\ s a -> s{_dslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
dslwMessage :: Lens' DisksScopedListWarning (Maybe Text)
dslwMessage
  = lens _dslwMessage (\ s a -> s{_dslwMessage = a})

instance FromJSON DisksScopedListWarning where
        parseJSON
          = withObject "DisksScopedListWarning"
              (\ o ->
                 DisksScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON DisksScopedListWarning where
        toJSON DisksScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _dslwData,
                  ("code" .=) <$> _dslwCode,
                  ("message" .=) <$> _dslwMessage])

--
-- /See:/ 'nodeTemplatesScopedListWarningDataItem' smart constructor.
data NodeTemplatesScopedListWarningDataItem = NodeTemplatesScopedListWarningDataItem'
    { _ntslwdiValue :: !(Maybe Text)
    , _ntslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplatesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntslwdiValue'
--
-- * 'ntslwdiKey'
nodeTemplatesScopedListWarningDataItem
    :: NodeTemplatesScopedListWarningDataItem
nodeTemplatesScopedListWarningDataItem =
    NodeTemplatesScopedListWarningDataItem'
    { _ntslwdiValue = Nothing
    , _ntslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ntslwdiValue :: Lens' NodeTemplatesScopedListWarningDataItem (Maybe Text)
ntslwdiValue
  = lens _ntslwdiValue (\ s a -> s{_ntslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ntslwdiKey :: Lens' NodeTemplatesScopedListWarningDataItem (Maybe Text)
ntslwdiKey
  = lens _ntslwdiKey (\ s a -> s{_ntslwdiKey = a})

instance FromJSON
         NodeTemplatesScopedListWarningDataItem where
        parseJSON
          = withObject "NodeTemplatesScopedListWarningDataItem"
              (\ o ->
                 NodeTemplatesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         NodeTemplatesScopedListWarningDataItem where
        toJSON NodeTemplatesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ntslwdiValue,
                  ("key" .=) <$> _ntslwdiKey])

-- | A list of TargetVpnGateway resources.
--
-- /See:/ 'targetVPNGatewayAggregatedListItems' smart constructor.
newtype TargetVPNGatewayAggregatedListItems = TargetVPNGatewayAggregatedListItems'
    { _tvgaliAddtional :: HashMap Text TargetVPNGatewaysScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewayAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvgaliAddtional'
targetVPNGatewayAggregatedListItems
    :: HashMap Text TargetVPNGatewaysScopedList -- ^ 'tvgaliAddtional'
    -> TargetVPNGatewayAggregatedListItems
targetVPNGatewayAggregatedListItems pTvgaliAddtional_ =
    TargetVPNGatewayAggregatedListItems'
    { _tvgaliAddtional = _Coerce # pTvgaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of target VPN
-- gateways.
tvgaliAddtional :: Lens' TargetVPNGatewayAggregatedListItems (HashMap Text TargetVPNGatewaysScopedList)
tvgaliAddtional
  = lens _tvgaliAddtional
      (\ s a -> s{_tvgaliAddtional = a})
      . _Coerce

instance FromJSON TargetVPNGatewayAggregatedListItems
         where
        parseJSON
          = withObject "TargetVPNGatewayAggregatedListItems"
              (\ o ->
                 TargetVPNGatewayAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON TargetVPNGatewayAggregatedListItems
         where
        toJSON = toJSON . _tvgaliAddtional

-- | Labels to apply to this disk. These can be later modified by the
-- setLabels method.
--
-- /See:/ 'diskLabels' smart constructor.
newtype DiskLabels = DiskLabels'
    { _dlAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dlAddtional'
diskLabels
    :: HashMap Text Text -- ^ 'dlAddtional'
    -> DiskLabels
diskLabels pDlAddtional_ =
    DiskLabels'
    { _dlAddtional = _Coerce # pDlAddtional_
    }

dlAddtional :: Lens' DiskLabels (HashMap Text Text)
dlAddtional
  = lens _dlAddtional (\ s a -> s{_dlAddtional = a}) .
      _Coerce

instance FromJSON DiskLabels where
        parseJSON
          = withObject "DiskLabels"
              (\ o -> DiskLabels' <$> (parseJSONObject o))

instance ToJSON DiskLabels where
        toJSON = toJSON . _dlAddtional

--
-- /See:/ 'instanceGroupManagerListWarningDataItem' smart constructor.
data InstanceGroupManagerListWarningDataItem = InstanceGroupManagerListWarningDataItem'
    { _igmlwdiValue :: !(Maybe Text)
    , _igmlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagerListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmlwdiValue'
--
-- * 'igmlwdiKey'
instanceGroupManagerListWarningDataItem
    :: InstanceGroupManagerListWarningDataItem
instanceGroupManagerListWarningDataItem =
    InstanceGroupManagerListWarningDataItem'
    { _igmlwdiValue = Nothing
    , _igmlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
igmlwdiValue :: Lens' InstanceGroupManagerListWarningDataItem (Maybe Text)
igmlwdiValue
  = lens _igmlwdiValue (\ s a -> s{_igmlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
igmlwdiKey :: Lens' InstanceGroupManagerListWarningDataItem (Maybe Text)
igmlwdiKey
  = lens _igmlwdiKey (\ s a -> s{_igmlwdiKey = a})

instance FromJSON
         InstanceGroupManagerListWarningDataItem where
        parseJSON
          = withObject
              "InstanceGroupManagerListWarningDataItem"
              (\ o ->
                 InstanceGroupManagerListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InstanceGroupManagerListWarningDataItem where
        toJSON InstanceGroupManagerListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _igmlwdiValue,
                  ("key" .=) <$> _igmlwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'forwardingRuleAggregatedListWarning' smart constructor.
data ForwardingRuleAggregatedListWarning = ForwardingRuleAggregatedListWarning'
    { _fralwData    :: !(Maybe [ForwardingRuleAggregatedListWarningDataItem])
    , _fralwCode    :: !(Maybe ForwardingRuleAggregatedListWarningCode)
    , _fralwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRuleAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fralwData'
--
-- * 'fralwCode'
--
-- * 'fralwMessage'
forwardingRuleAggregatedListWarning
    :: ForwardingRuleAggregatedListWarning
forwardingRuleAggregatedListWarning =
    ForwardingRuleAggregatedListWarning'
    { _fralwData = Nothing
    , _fralwCode = Nothing
    , _fralwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
fralwData :: Lens' ForwardingRuleAggregatedListWarning [ForwardingRuleAggregatedListWarningDataItem]
fralwData
  = lens _fralwData (\ s a -> s{_fralwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
fralwCode :: Lens' ForwardingRuleAggregatedListWarning (Maybe ForwardingRuleAggregatedListWarningCode)
fralwCode
  = lens _fralwCode (\ s a -> s{_fralwCode = a})

-- | [Output Only] A human-readable description of the warning code.
fralwMessage :: Lens' ForwardingRuleAggregatedListWarning (Maybe Text)
fralwMessage
  = lens _fralwMessage (\ s a -> s{_fralwMessage = a})

instance FromJSON ForwardingRuleAggregatedListWarning
         where
        parseJSON
          = withObject "ForwardingRuleAggregatedListWarning"
              (\ o ->
                 ForwardingRuleAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON ForwardingRuleAggregatedListWarning
         where
        toJSON ForwardingRuleAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _fralwData,
                  ("code" .=) <$> _fralwCode,
                  ("message" .=) <$> _fralwMessage])

--
-- /See:/ 'sslPolicyWarningsItem' smart constructor.
data SSLPolicyWarningsItem = SSLPolicyWarningsItem'
    { _spwiData    :: !(Maybe [SSLPolicyWarningsItemDataItem])
    , _spwiCode    :: !(Maybe SSLPolicyWarningsItemCode)
    , _spwiMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLPolicyWarningsItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spwiData'
--
-- * 'spwiCode'
--
-- * 'spwiMessage'
sslPolicyWarningsItem
    :: SSLPolicyWarningsItem
sslPolicyWarningsItem =
    SSLPolicyWarningsItem'
    { _spwiData = Nothing
    , _spwiCode = Nothing
    , _spwiMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
spwiData :: Lens' SSLPolicyWarningsItem [SSLPolicyWarningsItemDataItem]
spwiData
  = lens _spwiData (\ s a -> s{_spwiData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
spwiCode :: Lens' SSLPolicyWarningsItem (Maybe SSLPolicyWarningsItemCode)
spwiCode = lens _spwiCode (\ s a -> s{_spwiCode = a})

-- | [Output Only] A human-readable description of the warning code.
spwiMessage :: Lens' SSLPolicyWarningsItem (Maybe Text)
spwiMessage
  = lens _spwiMessage (\ s a -> s{_spwiMessage = a})

instance FromJSON SSLPolicyWarningsItem where
        parseJSON
          = withObject "SSLPolicyWarningsItem"
              (\ o ->
                 SSLPolicyWarningsItem' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON SSLPolicyWarningsItem where
        toJSON SSLPolicyWarningsItem'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _spwiData,
                  ("code" .=) <$> _spwiCode,
                  ("message" .=) <$> _spwiMessage])

--
-- /See:/ 'globalSetPolicyRequest' smart constructor.
data GlobalSetPolicyRequest = GlobalSetPolicyRequest'
    { _gsprEtag     :: !(Maybe Bytes)
    , _gsprBindings :: !(Maybe [Binding])
    , _gsprPolicy   :: !(Maybe Policy)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'GlobalSetPolicyRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gsprEtag'
--
-- * 'gsprBindings'
--
-- * 'gsprPolicy'
globalSetPolicyRequest
    :: GlobalSetPolicyRequest
globalSetPolicyRequest =
    GlobalSetPolicyRequest'
    { _gsprEtag = Nothing
    , _gsprBindings = Nothing
    , _gsprPolicy = Nothing
    }

-- | Flatten Policy to create a backward compatible wire-format. Deprecated.
-- Use \'policy\' to specify the etag.
gsprEtag :: Lens' GlobalSetPolicyRequest (Maybe ByteString)
gsprEtag
  = lens _gsprEtag (\ s a -> s{_gsprEtag = a}) .
      mapping _Bytes

-- | Flatten Policy to create a backward compatible wire-format. Deprecated.
-- Use \'policy\' to specify bindings.
gsprBindings :: Lens' GlobalSetPolicyRequest [Binding]
gsprBindings
  = lens _gsprBindings (\ s a -> s{_gsprBindings = a})
      . _Default
      . _Coerce

-- | REQUIRED: The complete policy to be applied to the \'resource\'. The
-- size of the policy is limited to a few 10s of KB. An empty policy is in
-- general a valid policy but certain services (like Projects) might reject
-- them.
gsprPolicy :: Lens' GlobalSetPolicyRequest (Maybe Policy)
gsprPolicy
  = lens _gsprPolicy (\ s a -> s{_gsprPolicy = a})

instance FromJSON GlobalSetPolicyRequest where
        parseJSON
          = withObject "GlobalSetPolicyRequest"
              (\ o ->
                 GlobalSetPolicyRequest' <$>
                   (o .:? "etag") <*> (o .:? "bindings" .!= mempty) <*>
                     (o .:? "policy"))

instance ToJSON GlobalSetPolicyRequest where
        toJSON GlobalSetPolicyRequest'{..}
          = object
              (catMaybes
                 [("etag" .=) <$> _gsprEtag,
                  ("bindings" .=) <$> _gsprBindings,
                  ("policy" .=) <$> _gsprPolicy])

--
-- /See:/ 'regionAutoscalerListWarningDataItem' smart constructor.
data RegionAutoscalerListWarningDataItem = RegionAutoscalerListWarningDataItem'
    { _ralwdiaValue :: !(Maybe Text)
    , _ralwdiaKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionAutoscalerListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ralwdiaValue'
--
-- * 'ralwdiaKey'
regionAutoscalerListWarningDataItem
    :: RegionAutoscalerListWarningDataItem
regionAutoscalerListWarningDataItem =
    RegionAutoscalerListWarningDataItem'
    { _ralwdiaValue = Nothing
    , _ralwdiaKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ralwdiaValue :: Lens' RegionAutoscalerListWarningDataItem (Maybe Text)
ralwdiaValue
  = lens _ralwdiaValue (\ s a -> s{_ralwdiaValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ralwdiaKey :: Lens' RegionAutoscalerListWarningDataItem (Maybe Text)
ralwdiaKey
  = lens _ralwdiaKey (\ s a -> s{_ralwdiaKey = a})

instance FromJSON RegionAutoscalerListWarningDataItem
         where
        parseJSON
          = withObject "RegionAutoscalerListWarningDataItem"
              (\ o ->
                 RegionAutoscalerListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON RegionAutoscalerListWarningDataItem
         where
        toJSON RegionAutoscalerListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ralwdiaValue,
                  ("key" .=) <$> _ralwdiaKey])

-- | A list of labels to apply for this resource. Each label key & value must
-- comply with RFC1035. Specifically, the name must be 1-63 characters long
-- and match the regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which
-- means the first character must be a lowercase letter, and all following
-- characters must be a dash, lowercase letter, or digit, except the last
-- character, which cannot be a dash. For example, \"webserver-frontend\":
-- \"images\". A label value can also be empty (e.g. \"my-label\": \"\").
--
-- /See:/ 'globalSetLabelsRequestLabels' smart constructor.
newtype GlobalSetLabelsRequestLabels = GlobalSetLabelsRequestLabels'
    { _gslrlAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'GlobalSetLabelsRequestLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gslrlAddtional'
globalSetLabelsRequestLabels
    :: HashMap Text Text -- ^ 'gslrlAddtional'
    -> GlobalSetLabelsRequestLabels
globalSetLabelsRequestLabels pGslrlAddtional_ =
    GlobalSetLabelsRequestLabels'
    { _gslrlAddtional = _Coerce # pGslrlAddtional_
    }

gslrlAddtional :: Lens' GlobalSetLabelsRequestLabels (HashMap Text Text)
gslrlAddtional
  = lens _gslrlAddtional
      (\ s a -> s{_gslrlAddtional = a})
      . _Coerce

instance FromJSON GlobalSetLabelsRequestLabels where
        parseJSON
          = withObject "GlobalSetLabelsRequestLabels"
              (\ o ->
                 GlobalSetLabelsRequestLabels' <$>
                   (parseJSONObject o))

instance ToJSON GlobalSetLabelsRequestLabels where
        toJSON = toJSON . _gslrlAddtional

-- | Informational warning which replaces the list of addresses when the list
-- is empty.
--
-- /See:/ 'targetPoolsScopedListWarning' smart constructor.
data TargetPoolsScopedListWarning = TargetPoolsScopedListWarning'
    { _tpslwData    :: !(Maybe [TargetPoolsScopedListWarningDataItem])
    , _tpslwCode    :: !(Maybe TargetPoolsScopedListWarningCode)
    , _tpslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolsScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tpslwData'
--
-- * 'tpslwCode'
--
-- * 'tpslwMessage'
targetPoolsScopedListWarning
    :: TargetPoolsScopedListWarning
targetPoolsScopedListWarning =
    TargetPoolsScopedListWarning'
    { _tpslwData = Nothing
    , _tpslwCode = Nothing
    , _tpslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tpslwData :: Lens' TargetPoolsScopedListWarning [TargetPoolsScopedListWarningDataItem]
tpslwData
  = lens _tpslwData (\ s a -> s{_tpslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tpslwCode :: Lens' TargetPoolsScopedListWarning (Maybe TargetPoolsScopedListWarningCode)
tpslwCode
  = lens _tpslwCode (\ s a -> s{_tpslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tpslwMessage :: Lens' TargetPoolsScopedListWarning (Maybe Text)
tpslwMessage
  = lens _tpslwMessage (\ s a -> s{_tpslwMessage = a})

instance FromJSON TargetPoolsScopedListWarning where
        parseJSON
          = withObject "TargetPoolsScopedListWarning"
              (\ o ->
                 TargetPoolsScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetPoolsScopedListWarning where
        toJSON TargetPoolsScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tpslwData,
                  ("code" .=) <$> _tpslwCode,
                  ("message" .=) <$> _tpslwMessage])

--
-- /See:/ 'healthStatus' smart constructor.
data HealthStatus = HealthStatus'
    { _hsIPAddress   :: !(Maybe Text)
    , _hsHealthState :: !(Maybe HealthStatusHealthState)
    , _hsPort        :: !(Maybe (Textual Int32))
    , _hsInstance    :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HealthStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hsIPAddress'
--
-- * 'hsHealthState'
--
-- * 'hsPort'
--
-- * 'hsInstance'
healthStatus
    :: HealthStatus
healthStatus =
    HealthStatus'
    { _hsIPAddress = Nothing
    , _hsHealthState = Nothing
    , _hsPort = Nothing
    , _hsInstance = Nothing
    }

-- | The IP address represented by this resource.
hsIPAddress :: Lens' HealthStatus (Maybe Text)
hsIPAddress
  = lens _hsIPAddress (\ s a -> s{_hsIPAddress = a})

-- | Health state of the instance.
hsHealthState :: Lens' HealthStatus (Maybe HealthStatusHealthState)
hsHealthState
  = lens _hsHealthState
      (\ s a -> s{_hsHealthState = a})

-- | The port on the instance.
hsPort :: Lens' HealthStatus (Maybe Int32)
hsPort
  = lens _hsPort (\ s a -> s{_hsPort = a}) .
      mapping _Coerce

-- | URL of the instance resource.
hsInstance :: Lens' HealthStatus (Maybe Text)
hsInstance
  = lens _hsInstance (\ s a -> s{_hsInstance = a})

instance FromJSON HealthStatus where
        parseJSON
          = withObject "HealthStatus"
              (\ o ->
                 HealthStatus' <$>
                   (o .:? "ipAddress") <*> (o .:? "healthState") <*>
                     (o .:? "port")
                     <*> (o .:? "instance"))

instance ToJSON HealthStatus where
        toJSON HealthStatus'{..}
          = object
              (catMaybes
                 [("ipAddress" .=) <$> _hsIPAddress,
                  ("healthState" .=) <$> _hsHealthState,
                  ("port" .=) <$> _hsPort,
                  ("instance" .=) <$> _hsInstance])

-- | Contains a list of TargetTcpProxy resources.
--
-- /See:/ 'targetTCPProxyList' smart constructor.
data TargetTCPProxyList = TargetTCPProxyList'
    { _ttplNextPageToken :: !(Maybe Text)
    , _ttplKind          :: !Text
    , _ttplItems         :: !(Maybe [TargetTCPProxy])
    , _ttplSelfLink      :: !(Maybe Text)
    , _ttplWarning       :: !(Maybe TargetTCPProxyListWarning)
    , _ttplId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetTCPProxyList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ttplNextPageToken'
--
-- * 'ttplKind'
--
-- * 'ttplItems'
--
-- * 'ttplSelfLink'
--
-- * 'ttplWarning'
--
-- * 'ttplId'
targetTCPProxyList
    :: TargetTCPProxyList
targetTCPProxyList =
    TargetTCPProxyList'
    { _ttplNextPageToken = Nothing
    , _ttplKind = "compute#targetTcpProxyList"
    , _ttplItems = Nothing
    , _ttplSelfLink = Nothing
    , _ttplWarning = Nothing
    , _ttplId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ttplNextPageToken :: Lens' TargetTCPProxyList (Maybe Text)
ttplNextPageToken
  = lens _ttplNextPageToken
      (\ s a -> s{_ttplNextPageToken = a})

-- | Type of resource.
ttplKind :: Lens' TargetTCPProxyList Text
ttplKind = lens _ttplKind (\ s a -> s{_ttplKind = a})

-- | A list of TargetTcpProxy resources.
ttplItems :: Lens' TargetTCPProxyList [TargetTCPProxy]
ttplItems
  = lens _ttplItems (\ s a -> s{_ttplItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
ttplSelfLink :: Lens' TargetTCPProxyList (Maybe Text)
ttplSelfLink
  = lens _ttplSelfLink (\ s a -> s{_ttplSelfLink = a})

-- | [Output Only] Informational warning message.
ttplWarning :: Lens' TargetTCPProxyList (Maybe TargetTCPProxyListWarning)
ttplWarning
  = lens _ttplWarning (\ s a -> s{_ttplWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ttplId :: Lens' TargetTCPProxyList (Maybe Text)
ttplId = lens _ttplId (\ s a -> s{_ttplId = a})

instance FromJSON TargetTCPProxyList where
        parseJSON
          = withObject "TargetTCPProxyList"
              (\ o ->
                 TargetTCPProxyList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#targetTcpProxyList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetTCPProxyList where
        toJSON TargetTCPProxyList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ttplNextPageToken,
                  Just ("kind" .= _ttplKind),
                  ("items" .=) <$> _ttplItems,
                  ("selfLink" .=) <$> _ttplSelfLink,
                  ("warning" .=) <$> _ttplWarning,
                  ("id" .=) <$> _ttplId])

-- | Region resource. (== resource_for beta.regions ==) (== resource_for
-- v1.regions ==)
--
-- /See:/ 'region' smart constructor.
data Region = Region'
    { _regeStatus            :: !(Maybe RegionStatus)
    , _regeZones             :: !(Maybe [Text])
    , _regeKind              :: !Text
    , _regeSelfLink          :: !(Maybe Text)
    , _regeName              :: !(Maybe Text)
    , _regeCreationTimestamp :: !(Maybe Text)
    , _regeQuotas            :: !(Maybe [Quota])
    , _regeId                :: !(Maybe (Textual Word64))
    , _regeDescription       :: !(Maybe Text)
    , _regeDeprecated        :: !(Maybe DeprecationStatus)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Region' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'regeStatus'
--
-- * 'regeZones'
--
-- * 'regeKind'
--
-- * 'regeSelfLink'
--
-- * 'regeName'
--
-- * 'regeCreationTimestamp'
--
-- * 'regeQuotas'
--
-- * 'regeId'
--
-- * 'regeDescription'
--
-- * 'regeDeprecated'
region
    :: Region
region =
    Region'
    { _regeStatus = Nothing
    , _regeZones = Nothing
    , _regeKind = "compute#region"
    , _regeSelfLink = Nothing
    , _regeName = Nothing
    , _regeCreationTimestamp = Nothing
    , _regeQuotas = Nothing
    , _regeId = Nothing
    , _regeDescription = Nothing
    , _regeDeprecated = Nothing
    }

-- | [Output Only] Status of the region, either UP or DOWN.
regeStatus :: Lens' Region (Maybe RegionStatus)
regeStatus
  = lens _regeStatus (\ s a -> s{_regeStatus = a})

-- | [Output Only] A list of zones available in this region, in the form of
-- resource URLs.
regeZones :: Lens' Region [Text]
regeZones
  = lens _regeZones (\ s a -> s{_regeZones = a}) .
      _Default
      . _Coerce

-- | [Output Only] Type of the resource. Always compute#region for regions.
regeKind :: Lens' Region Text
regeKind = lens _regeKind (\ s a -> s{_regeKind = a})

-- | [Output Only] Server-defined URL for the resource.
regeSelfLink :: Lens' Region (Maybe Text)
regeSelfLink
  = lens _regeSelfLink (\ s a -> s{_regeSelfLink = a})

-- | [Output Only] Name of the resource.
regeName :: Lens' Region (Maybe Text)
regeName = lens _regeName (\ s a -> s{_regeName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
regeCreationTimestamp :: Lens' Region (Maybe Text)
regeCreationTimestamp
  = lens _regeCreationTimestamp
      (\ s a -> s{_regeCreationTimestamp = a})

-- | [Output Only] Quotas assigned to this region.
regeQuotas :: Lens' Region [Quota]
regeQuotas
  = lens _regeQuotas (\ s a -> s{_regeQuotas = a}) .
      _Default
      . _Coerce

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
regeId :: Lens' Region (Maybe Word64)
regeId
  = lens _regeId (\ s a -> s{_regeId = a}) .
      mapping _Coerce

-- | [Output Only] Textual description of the resource.
regeDescription :: Lens' Region (Maybe Text)
regeDescription
  = lens _regeDescription
      (\ s a -> s{_regeDescription = a})

-- | [Output Only] The deprecation status associated with this region.
regeDeprecated :: Lens' Region (Maybe DeprecationStatus)
regeDeprecated
  = lens _regeDeprecated
      (\ s a -> s{_regeDeprecated = a})

instance FromJSON Region where
        parseJSON
          = withObject "Region"
              (\ o ->
                 Region' <$>
                   (o .:? "status") <*> (o .:? "zones" .!= mempty) <*>
                     (o .:? "kind" .!= "compute#region")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "quotas" .!= mempty)
                     <*> (o .:? "id")
                     <*> (o .:? "description")
                     <*> (o .:? "deprecated"))

instance ToJSON Region where
        toJSON Region'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _regeStatus,
                  ("zones" .=) <$> _regeZones,
                  Just ("kind" .= _regeKind),
                  ("selfLink" .=) <$> _regeSelfLink,
                  ("name" .=) <$> _regeName,
                  ("creationTimestamp" .=) <$> _regeCreationTimestamp,
                  ("quotas" .=) <$> _regeQuotas, ("id" .=) <$> _regeId,
                  ("description" .=) <$> _regeDescription,
                  ("deprecated" .=) <$> _regeDeprecated])

--
-- /See:/ 'operationListWarningDataItem' smart constructor.
data OperationListWarningDataItem = OperationListWarningDataItem'
    { _olwdiValue :: !(Maybe Text)
    , _olwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'olwdiValue'
--
-- * 'olwdiKey'
operationListWarningDataItem
    :: OperationListWarningDataItem
operationListWarningDataItem =
    OperationListWarningDataItem'
    { _olwdiValue = Nothing
    , _olwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
olwdiValue :: Lens' OperationListWarningDataItem (Maybe Text)
olwdiValue
  = lens _olwdiValue (\ s a -> s{_olwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
olwdiKey :: Lens' OperationListWarningDataItem (Maybe Text)
olwdiKey = lens _olwdiKey (\ s a -> s{_olwdiKey = a})

instance FromJSON OperationListWarningDataItem where
        parseJSON
          = withObject "OperationListWarningDataItem"
              (\ o ->
                 OperationListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON OperationListWarningDataItem where
        toJSON OperationListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _olwdiValue,
                  ("key" .=) <$> _olwdiKey])

-- | Guest OS features.
--
-- /See:/ 'guestOSFeature' smart constructor.
newtype GuestOSFeature = GuestOSFeature'
    { _gofType :: Maybe GuestOSFeatureType
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'GuestOSFeature' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'gofType'
guestOSFeature
    :: GuestOSFeature
guestOSFeature =
    GuestOSFeature'
    { _gofType = Nothing
    }

-- | The ID of a supported feature. Read Enabling guest operating system
-- features to see a list of available options.
gofType :: Lens' GuestOSFeature (Maybe GuestOSFeatureType)
gofType = lens _gofType (\ s a -> s{_gofType = a})

instance FromJSON GuestOSFeature where
        parseJSON
          = withObject "GuestOSFeature"
              (\ o -> GuestOSFeature' <$> (o .:? "type"))

instance ToJSON GuestOSFeature where
        toJSON GuestOSFeature'{..}
          = object (catMaybes [("type" .=) <$> _gofType])

-- | VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (==
-- resource_for v1.vpnTunnels ==)
--
-- /See:/ 'vpnTunnel' smart constructor.
data VPNTunnel = VPNTunnel'
    { _vtDetailedStatus        :: !(Maybe Text)
    , _vtStatus                :: !(Maybe VPNTunnelStatus)
    , _vtLocalTrafficSelector  :: !(Maybe [Text])
    , _vtKind                  :: !Text
    , _vtPeerIP                :: !(Maybe Text)
    , _vtRouter                :: !(Maybe Text)
    , _vtTargetVPNGateway      :: !(Maybe Text)
    , _vtRemoteTrafficSelector :: !(Maybe [Text])
    , _vtSelfLink              :: !(Maybe Text)
    , _vtSharedSecret          :: !(Maybe Text)
    , _vtName                  :: !(Maybe Text)
    , _vtCreationTimestamp     :: !(Maybe Text)
    , _vtSharedSecretHash      :: !(Maybe Text)
    , _vtId                    :: !(Maybe (Textual Word64))
    , _vtIkeVersion            :: !(Maybe (Textual Int32))
    , _vtRegion                :: !(Maybe Text)
    , _vtDescription           :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnel' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtDetailedStatus'
--
-- * 'vtStatus'
--
-- * 'vtLocalTrafficSelector'
--
-- * 'vtKind'
--
-- * 'vtPeerIP'
--
-- * 'vtRouter'
--
-- * 'vtTargetVPNGateway'
--
-- * 'vtRemoteTrafficSelector'
--
-- * 'vtSelfLink'
--
-- * 'vtSharedSecret'
--
-- * 'vtName'
--
-- * 'vtCreationTimestamp'
--
-- * 'vtSharedSecretHash'
--
-- * 'vtId'
--
-- * 'vtIkeVersion'
--
-- * 'vtRegion'
--
-- * 'vtDescription'
vpnTunnel
    :: VPNTunnel
vpnTunnel =
    VPNTunnel'
    { _vtDetailedStatus = Nothing
    , _vtStatus = Nothing
    , _vtLocalTrafficSelector = Nothing
    , _vtKind = "compute#vpnTunnel"
    , _vtPeerIP = Nothing
    , _vtRouter = Nothing
    , _vtTargetVPNGateway = Nothing
    , _vtRemoteTrafficSelector = Nothing
    , _vtSelfLink = Nothing
    , _vtSharedSecret = Nothing
    , _vtName = Nothing
    , _vtCreationTimestamp = Nothing
    , _vtSharedSecretHash = Nothing
    , _vtId = Nothing
    , _vtIkeVersion = Nothing
    , _vtRegion = Nothing
    , _vtDescription = Nothing
    }

-- | [Output Only] Detailed status message for the VPN tunnel.
vtDetailedStatus :: Lens' VPNTunnel (Maybe Text)
vtDetailedStatus
  = lens _vtDetailedStatus
      (\ s a -> s{_vtDetailedStatus = a})

-- | [Output Only] The status of the VPN tunnel.
vtStatus :: Lens' VPNTunnel (Maybe VPNTunnelStatus)
vtStatus = lens _vtStatus (\ s a -> s{_vtStatus = a})

-- | Local traffic selector to use when establishing the VPN tunnel with peer
-- VPN gateway. The value should be a CIDR formatted string, for example:
-- 192.168.0.0\/16. The ranges should be disjoint. Only IPv4 is supported.
vtLocalTrafficSelector :: Lens' VPNTunnel [Text]
vtLocalTrafficSelector
  = lens _vtLocalTrafficSelector
      (\ s a -> s{_vtLocalTrafficSelector = a})
      . _Default
      . _Coerce

-- | [Output Only] Type of resource. Always compute#vpnTunnel for VPN
-- tunnels.
vtKind :: Lens' VPNTunnel Text
vtKind = lens _vtKind (\ s a -> s{_vtKind = a})

-- | IP address of the peer VPN gateway. Only IPv4 is supported.
vtPeerIP :: Lens' VPNTunnel (Maybe Text)
vtPeerIP = lens _vtPeerIP (\ s a -> s{_vtPeerIP = a})

-- | URL of router resource to be used for dynamic routing.
vtRouter :: Lens' VPNTunnel (Maybe Text)
vtRouter = lens _vtRouter (\ s a -> s{_vtRouter = a})

-- | URL of the Target VPN gateway with which this VPN tunnel is associated.
-- Provided by the client when the VPN tunnel is created.
vtTargetVPNGateway :: Lens' VPNTunnel (Maybe Text)
vtTargetVPNGateway
  = lens _vtTargetVPNGateway
      (\ s a -> s{_vtTargetVPNGateway = a})

-- | Remote traffic selectors to use when establishing the VPN tunnel with
-- peer VPN gateway. The value should be a CIDR formatted string, for
-- example: 192.168.0.0\/16. The ranges should be disjoint. Only IPv4 is
-- supported.
vtRemoteTrafficSelector :: Lens' VPNTunnel [Text]
vtRemoteTrafficSelector
  = lens _vtRemoteTrafficSelector
      (\ s a -> s{_vtRemoteTrafficSelector = a})
      . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for the resource.
vtSelfLink :: Lens' VPNTunnel (Maybe Text)
vtSelfLink
  = lens _vtSelfLink (\ s a -> s{_vtSelfLink = a})

-- | Shared secret used to set the secure session between the Cloud VPN
-- gateway and the peer VPN gateway.
vtSharedSecret :: Lens' VPNTunnel (Maybe Text)
vtSharedSecret
  = lens _vtSharedSecret
      (\ s a -> s{_vtSharedSecret = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
vtName :: Lens' VPNTunnel (Maybe Text)
vtName = lens _vtName (\ s a -> s{_vtName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
vtCreationTimestamp :: Lens' VPNTunnel (Maybe Text)
vtCreationTimestamp
  = lens _vtCreationTimestamp
      (\ s a -> s{_vtCreationTimestamp = a})

-- | Hash of the shared secret.
vtSharedSecretHash :: Lens' VPNTunnel (Maybe Text)
vtSharedSecretHash
  = lens _vtSharedSecretHash
      (\ s a -> s{_vtSharedSecretHash = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
vtId :: Lens' VPNTunnel (Maybe Word64)
vtId
  = lens _vtId (\ s a -> s{_vtId = a}) .
      mapping _Coerce

-- | IKE protocol version to use when establishing the VPN tunnel with peer
-- VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.
vtIkeVersion :: Lens' VPNTunnel (Maybe Int32)
vtIkeVersion
  = lens _vtIkeVersion (\ s a -> s{_vtIkeVersion = a})
      . mapping _Coerce

-- | [Output Only] URL of the region where the VPN tunnel resides. You must
-- specify this field as part of the HTTP request URL. It is not settable
-- as a field in the request body.
vtRegion :: Lens' VPNTunnel (Maybe Text)
vtRegion = lens _vtRegion (\ s a -> s{_vtRegion = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
vtDescription :: Lens' VPNTunnel (Maybe Text)
vtDescription
  = lens _vtDescription
      (\ s a -> s{_vtDescription = a})

instance FromJSON VPNTunnel where
        parseJSON
          = withObject "VPNTunnel"
              (\ o ->
                 VPNTunnel' <$>
                   (o .:? "detailedStatus") <*> (o .:? "status") <*>
                     (o .:? "localTrafficSelector" .!= mempty)
                     <*> (o .:? "kind" .!= "compute#vpnTunnel")
                     <*> (o .:? "peerIp")
                     <*> (o .:? "router")
                     <*> (o .:? "targetVpnGateway")
                     <*> (o .:? "remoteTrafficSelector" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "sharedSecret")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "sharedSecretHash")
                     <*> (o .:? "id")
                     <*> (o .:? "ikeVersion")
                     <*> (o .:? "region")
                     <*> (o .:? "description"))

instance ToJSON VPNTunnel where
        toJSON VPNTunnel'{..}
          = object
              (catMaybes
                 [("detailedStatus" .=) <$> _vtDetailedStatus,
                  ("status" .=) <$> _vtStatus,
                  ("localTrafficSelector" .=) <$>
                    _vtLocalTrafficSelector,
                  Just ("kind" .= _vtKind),
                  ("peerIp" .=) <$> _vtPeerIP,
                  ("router" .=) <$> _vtRouter,
                  ("targetVpnGateway" .=) <$> _vtTargetVPNGateway,
                  ("remoteTrafficSelector" .=) <$>
                    _vtRemoteTrafficSelector,
                  ("selfLink" .=) <$> _vtSelfLink,
                  ("sharedSecret" .=) <$> _vtSharedSecret,
                  ("name" .=) <$> _vtName,
                  ("creationTimestamp" .=) <$> _vtCreationTimestamp,
                  ("sharedSecretHash" .=) <$> _vtSharedSecretHash,
                  ("id" .=) <$> _vtId,
                  ("ikeVersion" .=) <$> _vtIkeVersion,
                  ("region" .=) <$> _vtRegion,
                  ("description" .=) <$> _vtDescription])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceGroupManagerAggregatedListWarning' smart constructor.
data InstanceGroupManagerAggregatedListWarning = InstanceGroupManagerAggregatedListWarning'
    { _igmalwData    :: !(Maybe [InstanceGroupManagerAggregatedListWarningDataItem])
    , _igmalwCode    :: !(Maybe InstanceGroupManagerAggregatedListWarningCode)
    , _igmalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagerAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmalwData'
--
-- * 'igmalwCode'
--
-- * 'igmalwMessage'
instanceGroupManagerAggregatedListWarning
    :: InstanceGroupManagerAggregatedListWarning
instanceGroupManagerAggregatedListWarning =
    InstanceGroupManagerAggregatedListWarning'
    { _igmalwData = Nothing
    , _igmalwCode = Nothing
    , _igmalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
igmalwData :: Lens' InstanceGroupManagerAggregatedListWarning [InstanceGroupManagerAggregatedListWarningDataItem]
igmalwData
  = lens _igmalwData (\ s a -> s{_igmalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
igmalwCode :: Lens' InstanceGroupManagerAggregatedListWarning (Maybe InstanceGroupManagerAggregatedListWarningCode)
igmalwCode
  = lens _igmalwCode (\ s a -> s{_igmalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
igmalwMessage :: Lens' InstanceGroupManagerAggregatedListWarning (Maybe Text)
igmalwMessage
  = lens _igmalwMessage
      (\ s a -> s{_igmalwMessage = a})

instance FromJSON
         InstanceGroupManagerAggregatedListWarning where
        parseJSON
          = withObject
              "InstanceGroupManagerAggregatedListWarning"
              (\ o ->
                 InstanceGroupManagerAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON
         InstanceGroupManagerAggregatedListWarning where
        toJSON InstanceGroupManagerAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _igmalwData,
                  ("code" .=) <$> _igmalwCode,
                  ("message" .=) <$> _igmalwMessage])

--
-- /See:/ 'diskListWarningDataItem' smart constructor.
data DiskListWarningDataItem = DiskListWarningDataItem'
    { _dlwdiValue :: !(Maybe Text)
    , _dlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'DiskListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'dlwdiValue'
--
-- * 'dlwdiKey'
diskListWarningDataItem
    :: DiskListWarningDataItem
diskListWarningDataItem =
    DiskListWarningDataItem'
    { _dlwdiValue = Nothing
    , _dlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
dlwdiValue :: Lens' DiskListWarningDataItem (Maybe Text)
dlwdiValue
  = lens _dlwdiValue (\ s a -> s{_dlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
dlwdiKey :: Lens' DiskListWarningDataItem (Maybe Text)
dlwdiKey = lens _dlwdiKey (\ s a -> s{_dlwdiKey = a})

instance FromJSON DiskListWarningDataItem where
        parseJSON
          = withObject "DiskListWarningDataItem"
              (\ o ->
                 DiskListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON DiskListWarningDataItem where
        toJSON DiskListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _dlwdiValue,
                  ("key" .=) <$> _dlwdiKey])

-- | A specification of the parameters to use when creating the instance
-- template from a source instance.
--
-- /See:/ 'sourceInstanceParams' smart constructor.
newtype SourceInstanceParams = SourceInstanceParams'
    { _sipDiskConfigs :: Maybe [DiskInstantiationConfig]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SourceInstanceParams' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sipDiskConfigs'
sourceInstanceParams
    :: SourceInstanceParams
sourceInstanceParams =
    SourceInstanceParams'
    { _sipDiskConfigs = Nothing
    }

-- | Attached disks configuration. If not provided, defaults are applied: For
-- boot disk and any other R\/W disks, new custom images will be created
-- from each disk. For read-only disks, they will be attached in read-only
-- mode. Local SSD disks will be created as blank volumes.
sipDiskConfigs :: Lens' SourceInstanceParams [DiskInstantiationConfig]
sipDiskConfigs
  = lens _sipDiskConfigs
      (\ s a -> s{_sipDiskConfigs = a})
      . _Default
      . _Coerce

instance FromJSON SourceInstanceParams where
        parseJSON
          = withObject "SourceInstanceParams"
              (\ o ->
                 SourceInstanceParams' <$>
                   (o .:? "diskConfigs" .!= mempty))

instance ToJSON SourceInstanceParams where
        toJSON SourceInstanceParams'{..}
          = object
              (catMaybes [("diskConfigs" .=) <$> _sipDiskConfigs])

-- | An alias IP range attached to an instance\'s network interface.
--
-- /See:/ 'aliasIPRange' smart constructor.
data AliasIPRange = AliasIPRange'
    { _airIPCIdRRange         :: !(Maybe Text)
    , _airSubnetworkRangeName :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AliasIPRange' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'airIPCIdRRange'
--
-- * 'airSubnetworkRangeName'
aliasIPRange
    :: AliasIPRange
aliasIPRange =
    AliasIPRange'
    { _airIPCIdRRange = Nothing
    , _airSubnetworkRangeName = Nothing
    }

-- | The IP CIDR range represented by this alias IP range. This IP CIDR range
-- must belong to the specified subnetwork and cannot contain IP addresses
-- reserved by system or used by other network interfaces. This range may
-- be a single IP address (e.g. 10.2.3.4), a netmask (e.g. \/24) or a CIDR
-- format string (e.g. 10.1.2.0\/24).
airIPCIdRRange :: Lens' AliasIPRange (Maybe Text)
airIPCIdRRange
  = lens _airIPCIdRRange
      (\ s a -> s{_airIPCIdRRange = a})

-- | Optional subnetwork secondary range name specifying the secondary range
-- from which to allocate the IP CIDR range for this alias IP range. If
-- left unspecified, the primary range of the subnetwork will be used.
airSubnetworkRangeName :: Lens' AliasIPRange (Maybe Text)
airSubnetworkRangeName
  = lens _airSubnetworkRangeName
      (\ s a -> s{_airSubnetworkRangeName = a})

instance FromJSON AliasIPRange where
        parseJSON
          = withObject "AliasIPRange"
              (\ o ->
                 AliasIPRange' <$>
                   (o .:? "ipCidrRange") <*>
                     (o .:? "subnetworkRangeName"))

instance ToJSON AliasIPRange where
        toJSON AliasIPRange'{..}
          = object
              (catMaybes
                 [("ipCidrRange" .=) <$> _airIPCIdRRange,
                  ("subnetworkRangeName" .=) <$>
                    _airSubnetworkRangeName])

--
-- /See:/ 'nodeTypesScopedListWarningDataItem' smart constructor.
data NodeTypesScopedListWarningDataItem = NodeTypesScopedListWarningDataItem'
    { _ntslwditValue :: !(Maybe Text)
    , _ntslwditKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntslwditValue'
--
-- * 'ntslwditKey'
nodeTypesScopedListWarningDataItem
    :: NodeTypesScopedListWarningDataItem
nodeTypesScopedListWarningDataItem =
    NodeTypesScopedListWarningDataItem'
    { _ntslwditValue = Nothing
    , _ntslwditKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ntslwditValue :: Lens' NodeTypesScopedListWarningDataItem (Maybe Text)
ntslwditValue
  = lens _ntslwditValue
      (\ s a -> s{_ntslwditValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ntslwditKey :: Lens' NodeTypesScopedListWarningDataItem (Maybe Text)
ntslwditKey
  = lens _ntslwditKey (\ s a -> s{_ntslwditKey = a})

instance FromJSON NodeTypesScopedListWarningDataItem
         where
        parseJSON
          = withObject "NodeTypesScopedListWarningDataItem"
              (\ o ->
                 NodeTypesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON NodeTypesScopedListWarningDataItem
         where
        toJSON NodeTypesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ntslwditValue,
                  ("key" .=) <$> _ntslwditKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'targetInstanceListWarning' smart constructor.
data TargetInstanceListWarning = TargetInstanceListWarning'
    { _tilwData    :: !(Maybe [TargetInstanceListWarningDataItem])
    , _tilwCode    :: !(Maybe TargetInstanceListWarningCode)
    , _tilwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstanceListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tilwData'
--
-- * 'tilwCode'
--
-- * 'tilwMessage'
targetInstanceListWarning
    :: TargetInstanceListWarning
targetInstanceListWarning =
    TargetInstanceListWarning'
    { _tilwData = Nothing
    , _tilwCode = Nothing
    , _tilwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
tilwData :: Lens' TargetInstanceListWarning [TargetInstanceListWarningDataItem]
tilwData
  = lens _tilwData (\ s a -> s{_tilwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
tilwCode :: Lens' TargetInstanceListWarning (Maybe TargetInstanceListWarningCode)
tilwCode = lens _tilwCode (\ s a -> s{_tilwCode = a})

-- | [Output Only] A human-readable description of the warning code.
tilwMessage :: Lens' TargetInstanceListWarning (Maybe Text)
tilwMessage
  = lens _tilwMessage (\ s a -> s{_tilwMessage = a})

instance FromJSON TargetInstanceListWarning where
        parseJSON
          = withObject "TargetInstanceListWarning"
              (\ o ->
                 TargetInstanceListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON TargetInstanceListWarning where
        toJSON TargetInstanceListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _tilwData,
                  ("code" .=) <$> _tilwCode,
                  ("message" .=) <$> _tilwMessage])

-- | A Node Type resource.
--
-- /See:/ 'nodeType' smart constructor.
data NodeType = NodeType'
    { _ntKind              :: !Text
    , _ntZone              :: !(Maybe Text)
    , _ntCPUPlatform       :: !(Maybe Text)
    , _ntLocalSsdGb        :: !(Maybe (Textual Int32))
    , _ntSelfLink          :: !(Maybe Text)
    , _ntName              :: !(Maybe Text)
    , _ntCreationTimestamp :: !(Maybe Text)
    , _ntId                :: !(Maybe (Textual Word64))
    , _ntGuestCPUs         :: !(Maybe (Textual Int32))
    , _ntMemoryMb          :: !(Maybe (Textual Int32))
    , _ntDescription       :: !(Maybe Text)
    , _ntDeprecated        :: !(Maybe DeprecationStatus)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeType' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntKind'
--
-- * 'ntZone'
--
-- * 'ntCPUPlatform'
--
-- * 'ntLocalSsdGb'
--
-- * 'ntSelfLink'
--
-- * 'ntName'
--
-- * 'ntCreationTimestamp'
--
-- * 'ntId'
--
-- * 'ntGuestCPUs'
--
-- * 'ntMemoryMb'
--
-- * 'ntDescription'
--
-- * 'ntDeprecated'
nodeType
    :: NodeType
nodeType =
    NodeType'
    { _ntKind = "compute#nodeType"
    , _ntZone = Nothing
    , _ntCPUPlatform = Nothing
    , _ntLocalSsdGb = Nothing
    , _ntSelfLink = Nothing
    , _ntName = Nothing
    , _ntCreationTimestamp = Nothing
    , _ntId = Nothing
    , _ntGuestCPUs = Nothing
    , _ntMemoryMb = Nothing
    , _ntDescription = Nothing
    , _ntDeprecated = Nothing
    }

-- | [Output Only] The type of the resource. Always compute#nodeType for node
-- types.
ntKind :: Lens' NodeType Text
ntKind = lens _ntKind (\ s a -> s{_ntKind = a})

-- | [Output Only] The name of the zone where the node type resides, such as
-- us-central1-a.
ntZone :: Lens' NodeType (Maybe Text)
ntZone = lens _ntZone (\ s a -> s{_ntZone = a})

-- | [Output Only] The CPU platform used by this node type.
ntCPUPlatform :: Lens' NodeType (Maybe Text)
ntCPUPlatform
  = lens _ntCPUPlatform
      (\ s a -> s{_ntCPUPlatform = a})

-- | [Output Only] Local SSD available to the node type, defined in GB.
ntLocalSsdGb :: Lens' NodeType (Maybe Int32)
ntLocalSsdGb
  = lens _ntLocalSsdGb (\ s a -> s{_ntLocalSsdGb = a})
      . mapping _Coerce

-- | [Output Only] Server-defined URL for the resource.
ntSelfLink :: Lens' NodeType (Maybe Text)
ntSelfLink
  = lens _ntSelfLink (\ s a -> s{_ntSelfLink = a})

-- | [Output Only] Name of the resource.
ntName :: Lens' NodeType (Maybe Text)
ntName = lens _ntName (\ s a -> s{_ntName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
ntCreationTimestamp :: Lens' NodeType (Maybe Text)
ntCreationTimestamp
  = lens _ntCreationTimestamp
      (\ s a -> s{_ntCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
ntId :: Lens' NodeType (Maybe Word64)
ntId
  = lens _ntId (\ s a -> s{_ntId = a}) .
      mapping _Coerce

-- | [Output Only] The number of virtual CPUs that are available to the node
-- type.
ntGuestCPUs :: Lens' NodeType (Maybe Int32)
ntGuestCPUs
  = lens _ntGuestCPUs (\ s a -> s{_ntGuestCPUs = a}) .
      mapping _Coerce

-- | [Output Only] The amount of physical memory available to the node type,
-- defined in MB.
ntMemoryMb :: Lens' NodeType (Maybe Int32)
ntMemoryMb
  = lens _ntMemoryMb (\ s a -> s{_ntMemoryMb = a}) .
      mapping _Coerce

-- | [Output Only] An optional textual description of the resource.
ntDescription :: Lens' NodeType (Maybe Text)
ntDescription
  = lens _ntDescription
      (\ s a -> s{_ntDescription = a})

-- | [Output Only] The deprecation status associated with this node type.
ntDeprecated :: Lens' NodeType (Maybe DeprecationStatus)
ntDeprecated
  = lens _ntDeprecated (\ s a -> s{_ntDeprecated = a})

instance FromJSON NodeType where
        parseJSON
          = withObject "NodeType"
              (\ o ->
                 NodeType' <$>
                   (o .:? "kind" .!= "compute#nodeType") <*>
                     (o .:? "zone")
                     <*> (o .:? "cpuPlatform")
                     <*> (o .:? "localSsdGb")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "guestCpus")
                     <*> (o .:? "memoryMb")
                     <*> (o .:? "description")
                     <*> (o .:? "deprecated"))

instance ToJSON NodeType where
        toJSON NodeType'{..}
          = object
              (catMaybes
                 [Just ("kind" .= _ntKind), ("zone" .=) <$> _ntZone,
                  ("cpuPlatform" .=) <$> _ntCPUPlatform,
                  ("localSsdGb" .=) <$> _ntLocalSsdGb,
                  ("selfLink" .=) <$> _ntSelfLink,
                  ("name" .=) <$> _ntName,
                  ("creationTimestamp" .=) <$> _ntCreationTimestamp,
                  ("id" .=) <$> _ntId,
                  ("guestCpus" .=) <$> _ntGuestCPUs,
                  ("memoryMb" .=) <$> _ntMemoryMb,
                  ("description" .=) <$> _ntDescription,
                  ("deprecated" .=) <$> _ntDeprecated])

-- | Authorization-related information used by Cloud Audit Logging.
--
-- /See:/ 'authorizationLoggingOptions' smart constructor.
newtype AuthorizationLoggingOptions = AuthorizationLoggingOptions'
    { _aloPermissionType :: Maybe AuthorizationLoggingOptionsPermissionType
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AuthorizationLoggingOptions' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aloPermissionType'
authorizationLoggingOptions
    :: AuthorizationLoggingOptions
authorizationLoggingOptions =
    AuthorizationLoggingOptions'
    { _aloPermissionType = Nothing
    }

-- | The type of the permission that was checked.
aloPermissionType :: Lens' AuthorizationLoggingOptions (Maybe AuthorizationLoggingOptionsPermissionType)
aloPermissionType
  = lens _aloPermissionType
      (\ s a -> s{_aloPermissionType = a})

instance FromJSON AuthorizationLoggingOptions where
        parseJSON
          = withObject "AuthorizationLoggingOptions"
              (\ o ->
                 AuthorizationLoggingOptions' <$>
                   (o .:? "permissionType"))

instance ToJSON AuthorizationLoggingOptions where
        toJSON AuthorizationLoggingOptions'{..}
          = object
              (catMaybes
                 [("permissionType" .=) <$> _aloPermissionType])

-- | Defines an Identity and Access Management (IAM) policy. It is used to
-- specify access control policies for Cloud Platform resources. A
-- \`Policy\` consists of a list of \`bindings\`. A \`binding\` binds a
-- list of \`members\` to a \`role\`, where the members can be user
-- accounts, Google groups, Google domains, and service accounts. A
-- \`role\` is a named list of permissions defined by IAM. **JSON Example**
-- { \"bindings\": [ { \"role\": \"roles\/owner\", \"members\": [
-- \"user:mike\'example.com\", \"group:admins\'example.com\",
-- \"domain:google.com\",
-- \"serviceAccount:my-other-app\'appspot.gserviceaccount.com\" ] }, {
-- \"role\": \"roles\/viewer\", \"members\": [\"user:sean\'example.com\"] }
-- ] } **YAML Example** bindings: - members: - user:mike\'example.com -
-- group:admins\'example.com - domain:google.com -
-- serviceAccount:my-other-app\'appspot.gserviceaccount.com role:
-- roles\/owner - members: - user:sean\'example.com role: roles\/viewer For
-- a description of IAM and its features, see the [IAM developer\'s
-- guide](https:\/\/cloud.google.com\/iam\/docs).
--
-- /See:/ 'policy' smart constructor.
data Policy = Policy'
    { _pAuditConfigs :: !(Maybe [AuditConfig])
    , _pEtag         :: !(Maybe Bytes)
    , _pRules        :: !(Maybe [Rule])
    , _pVersion      :: !(Maybe (Textual Int32))
    , _pBindings     :: !(Maybe [Binding])
    , _pIAMOwned     :: !(Maybe Bool)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Policy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pAuditConfigs'
--
-- * 'pEtag'
--
-- * 'pRules'
--
-- * 'pVersion'
--
-- * 'pBindings'
--
-- * 'pIAMOwned'
policy
    :: Policy
policy =
    Policy'
    { _pAuditConfigs = Nothing
    , _pEtag = Nothing
    , _pRules = Nothing
    , _pVersion = Nothing
    , _pBindings = Nothing
    , _pIAMOwned = Nothing
    }

-- | Specifies cloud audit logging configuration for this policy.
pAuditConfigs :: Lens' Policy [AuditConfig]
pAuditConfigs
  = lens _pAuditConfigs
      (\ s a -> s{_pAuditConfigs = a})
      . _Default
      . _Coerce

-- | \`etag\` is used for optimistic concurrency control as a way to help
-- prevent simultaneous updates of a policy from overwriting each other. It
-- is strongly suggested that systems make use of the \`etag\` in the
-- read-modify-write cycle to perform policy updates in order to avoid race
-- conditions: An \`etag\` is returned in the response to \`getIamPolicy\`,
-- and systems are expected to put that etag in the request to
-- \`setIamPolicy\` to ensure that their change will be applied to the same
-- version of the policy. If no \`etag\` is provided in the call to
-- \`setIamPolicy\`, then the existing policy is overwritten blindly.
pEtag :: Lens' Policy (Maybe ByteString)
pEtag
  = lens _pEtag (\ s a -> s{_pEtag = a}) .
      mapping _Bytes

-- | If more than one rule is specified, the rules are applied in the
-- following manner: - All matching LOG rules are always applied. - If any
-- DENY\/DENY_WITH_LOG rule matches, permission is denied. Logging will be
-- applied if one or more matching rule requires logging. - Otherwise, if
-- any ALLOW\/ALLOW_WITH_LOG rule matches, permission is granted. Logging
-- will be applied if one or more matching rule requires logging. -
-- Otherwise, if no rule applies, permission is denied.
pRules :: Lens' Policy [Rule]
pRules
  = lens _pRules (\ s a -> s{_pRules = a}) . _Default .
      _Coerce

-- | Deprecated.
pVersion :: Lens' Policy (Maybe Int32)
pVersion
  = lens _pVersion (\ s a -> s{_pVersion = a}) .
      mapping _Coerce

-- | Associates a list of \`members\` to a \`role\`. \`bindings\` with no
-- members will result in an error.
pBindings :: Lens' Policy [Binding]
pBindings
  = lens _pBindings (\ s a -> s{_pBindings = a}) .
      _Default
      . _Coerce

-- |
pIAMOwned :: Lens' Policy (Maybe Bool)
pIAMOwned
  = lens _pIAMOwned (\ s a -> s{_pIAMOwned = a})

instance FromJSON Policy where
        parseJSON
          = withObject "Policy"
              (\ o ->
                 Policy' <$>
                   (o .:? "auditConfigs" .!= mempty) <*> (o .:? "etag")
                     <*> (o .:? "rules" .!= mempty)
                     <*> (o .:? "version")
                     <*> (o .:? "bindings" .!= mempty)
                     <*> (o .:? "iamOwned"))

instance ToJSON Policy where
        toJSON Policy'{..}
          = object
              (catMaybes
                 [("auditConfigs" .=) <$> _pAuditConfigs,
                  ("etag" .=) <$> _pEtag, ("rules" .=) <$> _pRules,
                  ("version" .=) <$> _pVersion,
                  ("bindings" .=) <$> _pBindings,
                  ("iamOwned" .=) <$> _pIAMOwned])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'operationAggregatedListWarning' smart constructor.
data OperationAggregatedListWarning = OperationAggregatedListWarning'
    { _oalwData    :: !(Maybe [OperationAggregatedListWarningDataItem])
    , _oalwCode    :: !(Maybe OperationAggregatedListWarningCode)
    , _oalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oalwData'
--
-- * 'oalwCode'
--
-- * 'oalwMessage'
operationAggregatedListWarning
    :: OperationAggregatedListWarning
operationAggregatedListWarning =
    OperationAggregatedListWarning'
    { _oalwData = Nothing
    , _oalwCode = Nothing
    , _oalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
oalwData :: Lens' OperationAggregatedListWarning [OperationAggregatedListWarningDataItem]
oalwData
  = lens _oalwData (\ s a -> s{_oalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
oalwCode :: Lens' OperationAggregatedListWarning (Maybe OperationAggregatedListWarningCode)
oalwCode = lens _oalwCode (\ s a -> s{_oalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
oalwMessage :: Lens' OperationAggregatedListWarning (Maybe Text)
oalwMessage
  = lens _oalwMessage (\ s a -> s{_oalwMessage = a})

instance FromJSON OperationAggregatedListWarning
         where
        parseJSON
          = withObject "OperationAggregatedListWarning"
              (\ o ->
                 OperationAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON OperationAggregatedListWarning where
        toJSON OperationAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _oalwData,
                  ("code" .=) <$> _oalwCode,
                  ("message" .=) <$> _oalwMessage])

--
-- /See:/ 'targetInstanceAggregatedListWarningDataItem' smart constructor.
data TargetInstanceAggregatedListWarningDataItem = TargetInstanceAggregatedListWarningDataItem'
    { _tialwdiValue :: !(Maybe Text)
    , _tialwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetInstanceAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tialwdiValue'
--
-- * 'tialwdiKey'
targetInstanceAggregatedListWarningDataItem
    :: TargetInstanceAggregatedListWarningDataItem
targetInstanceAggregatedListWarningDataItem =
    TargetInstanceAggregatedListWarningDataItem'
    { _tialwdiValue = Nothing
    , _tialwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tialwdiValue :: Lens' TargetInstanceAggregatedListWarningDataItem (Maybe Text)
tialwdiValue
  = lens _tialwdiValue (\ s a -> s{_tialwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tialwdiKey :: Lens' TargetInstanceAggregatedListWarningDataItem (Maybe Text)
tialwdiKey
  = lens _tialwdiKey (\ s a -> s{_tialwdiKey = a})

instance FromJSON
         TargetInstanceAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "TargetInstanceAggregatedListWarningDataItem"
              (\ o ->
                 TargetInstanceAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         TargetInstanceAggregatedListWarningDataItem where
        toJSON
          TargetInstanceAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tialwdiValue,
                  ("key" .=) <$> _tialwdiKey])

-- | [Output Only] Informational warning which replaces the list of
-- operations when the list is empty.
--
-- /See:/ 'operationsScopedListWarning' smart constructor.
data OperationsScopedListWarning = OperationsScopedListWarning'
    { _oslwData    :: !(Maybe [OperationsScopedListWarningDataItem])
    , _oslwCode    :: !(Maybe OperationsScopedListWarningCode)
    , _oslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationsScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oslwData'
--
-- * 'oslwCode'
--
-- * 'oslwMessage'
operationsScopedListWarning
    :: OperationsScopedListWarning
operationsScopedListWarning =
    OperationsScopedListWarning'
    { _oslwData = Nothing
    , _oslwCode = Nothing
    , _oslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
oslwData :: Lens' OperationsScopedListWarning [OperationsScopedListWarningDataItem]
oslwData
  = lens _oslwData (\ s a -> s{_oslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
oslwCode :: Lens' OperationsScopedListWarning (Maybe OperationsScopedListWarningCode)
oslwCode = lens _oslwCode (\ s a -> s{_oslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
oslwMessage :: Lens' OperationsScopedListWarning (Maybe Text)
oslwMessage
  = lens _oslwMessage (\ s a -> s{_oslwMessage = a})

instance FromJSON OperationsScopedListWarning where
        parseJSON
          = withObject "OperationsScopedListWarning"
              (\ o ->
                 OperationsScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON OperationsScopedListWarning where
        toJSON OperationsScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _oslwData,
                  ("code" .=) <$> _oslwCode,
                  ("message" .=) <$> _oslwMessage])

--
-- /See:/ 'regionDiskTypeListWarningDataItem' smart constructor.
data RegionDiskTypeListWarningDataItem = RegionDiskTypeListWarningDataItem'
    { _rdtlwdiValue :: !(Maybe Text)
    , _rdtlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionDiskTypeListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rdtlwdiValue'
--
-- * 'rdtlwdiKey'
regionDiskTypeListWarningDataItem
    :: RegionDiskTypeListWarningDataItem
regionDiskTypeListWarningDataItem =
    RegionDiskTypeListWarningDataItem'
    { _rdtlwdiValue = Nothing
    , _rdtlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
rdtlwdiValue :: Lens' RegionDiskTypeListWarningDataItem (Maybe Text)
rdtlwdiValue
  = lens _rdtlwdiValue (\ s a -> s{_rdtlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
rdtlwdiKey :: Lens' RegionDiskTypeListWarningDataItem (Maybe Text)
rdtlwdiKey
  = lens _rdtlwdiKey (\ s a -> s{_rdtlwdiKey = a})

instance FromJSON RegionDiskTypeListWarningDataItem
         where
        parseJSON
          = withObject "RegionDiskTypeListWarningDataItem"
              (\ o ->
                 RegionDiskTypeListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON RegionDiskTypeListWarningDataItem
         where
        toJSON RegionDiskTypeListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _rdtlwdiValue,
                  ("key" .=) <$> _rdtlwdiKey])

--
-- /See:/ 'forwardingRuleListWarningDataItem' smart constructor.
data ForwardingRuleListWarningDataItem = ForwardingRuleListWarningDataItem'
    { _frlwdiValue :: !(Maybe Text)
    , _frlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRuleListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'frlwdiValue'
--
-- * 'frlwdiKey'
forwardingRuleListWarningDataItem
    :: ForwardingRuleListWarningDataItem
forwardingRuleListWarningDataItem =
    ForwardingRuleListWarningDataItem'
    { _frlwdiValue = Nothing
    , _frlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
frlwdiValue :: Lens' ForwardingRuleListWarningDataItem (Maybe Text)
frlwdiValue
  = lens _frlwdiValue (\ s a -> s{_frlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
frlwdiKey :: Lens' ForwardingRuleListWarningDataItem (Maybe Text)
frlwdiKey
  = lens _frlwdiKey (\ s a -> s{_frlwdiKey = a})

instance FromJSON ForwardingRuleListWarningDataItem
         where
        parseJSON
          = withObject "ForwardingRuleListWarningDataItem"
              (\ o ->
                 ForwardingRuleListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON ForwardingRuleListWarningDataItem
         where
        toJSON ForwardingRuleListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _frlwdiValue,
                  ("key" .=) <$> _frlwdiKey])

-- | Sets the scheduling options for an Instance.
--
-- /See:/ 'scheduling' smart constructor.
data Scheduling = Scheduling'
    { _sAutomaticRestart  :: !(Maybe Bool)
    , _sNodeAffinities    :: !(Maybe [SchedulingNodeAffinity])
    , _sOnHostMaintenance :: !(Maybe SchedulingOnHostMaintenance)
    , _sPreemptible       :: !(Maybe Bool)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Scheduling' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sAutomaticRestart'
--
-- * 'sNodeAffinities'
--
-- * 'sOnHostMaintenance'
--
-- * 'sPreemptible'
scheduling
    :: Scheduling
scheduling =
    Scheduling'
    { _sAutomaticRestart = Nothing
    , _sNodeAffinities = Nothing
    , _sOnHostMaintenance = Nothing
    , _sPreemptible = Nothing
    }

-- | Specifies whether the instance should be automatically restarted if it
-- is terminated by Compute Engine (not terminated by a user). You can only
-- set the automatic restart option for standard instances. Preemptible
-- instances cannot be automatically restarted. By default, this is set to
-- true so an instance is automatically restarted if it is terminated by
-- Compute Engine.
sAutomaticRestart :: Lens' Scheduling (Maybe Bool)
sAutomaticRestart
  = lens _sAutomaticRestart
      (\ s a -> s{_sAutomaticRestart = a})

-- | A set of node affinity and anti-affinity.
sNodeAffinities :: Lens' Scheduling [SchedulingNodeAffinity]
sNodeAffinities
  = lens _sNodeAffinities
      (\ s a -> s{_sNodeAffinities = a})
      . _Default
      . _Coerce

-- | Defines the maintenance behavior for this instance. For standard
-- instances, the default behavior is MIGRATE. For preemptible instances,
-- the default and only possible behavior is TERMINATE. For more
-- information, see Setting Instance Scheduling Options.
sOnHostMaintenance :: Lens' Scheduling (Maybe SchedulingOnHostMaintenance)
sOnHostMaintenance
  = lens _sOnHostMaintenance
      (\ s a -> s{_sOnHostMaintenance = a})

-- | Defines whether the instance is preemptible. This can only be set during
-- instance creation, it cannot be set or changed after the instance has
-- been created.
sPreemptible :: Lens' Scheduling (Maybe Bool)
sPreemptible
  = lens _sPreemptible (\ s a -> s{_sPreemptible = a})

instance FromJSON Scheduling where
        parseJSON
          = withObject "Scheduling"
              (\ o ->
                 Scheduling' <$>
                   (o .:? "automaticRestart") <*>
                     (o .:? "nodeAffinities" .!= mempty)
                     <*> (o .:? "onHostMaintenance")
                     <*> (o .:? "preemptible"))

instance ToJSON Scheduling where
        toJSON Scheduling'{..}
          = object
              (catMaybes
                 [("automaticRestart" .=) <$> _sAutomaticRestart,
                  ("nodeAffinities" .=) <$> _sNodeAffinities,
                  ("onHostMaintenance" .=) <$> _sOnHostMaintenance,
                  ("preemptible" .=) <$> _sPreemptible])

--
-- /See:/ 'vpnTunnelsScopedListWarningDataItem' smart constructor.
data VPNTunnelsScopedListWarningDataItem = VPNTunnelsScopedListWarningDataItem'
    { _vtslwdiValue :: !(Maybe Text)
    , _vtslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelsScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtslwdiValue'
--
-- * 'vtslwdiKey'
vpnTunnelsScopedListWarningDataItem
    :: VPNTunnelsScopedListWarningDataItem
vpnTunnelsScopedListWarningDataItem =
    VPNTunnelsScopedListWarningDataItem'
    { _vtslwdiValue = Nothing
    , _vtslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
vtslwdiValue :: Lens' VPNTunnelsScopedListWarningDataItem (Maybe Text)
vtslwdiValue
  = lens _vtslwdiValue (\ s a -> s{_vtslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
vtslwdiKey :: Lens' VPNTunnelsScopedListWarningDataItem (Maybe Text)
vtslwdiKey
  = lens _vtslwdiKey (\ s a -> s{_vtslwdiKey = a})

instance FromJSON VPNTunnelsScopedListWarningDataItem
         where
        parseJSON
          = withObject "VPNTunnelsScopedListWarningDataItem"
              (\ o ->
                 VPNTunnelsScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON VPNTunnelsScopedListWarningDataItem
         where
        toJSON VPNTunnelsScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _vtslwdiValue,
                  ("key" .=) <$> _vtslwdiKey])

-- | Response to the list request, and contains a list of interconnects.
--
-- /See:/ 'interconnectList' smart constructor.
data InterconnectList = InterconnectList'
    { _intnNextPageToken :: !(Maybe Text)
    , _intnKind          :: !Text
    , _intnItems         :: !(Maybe [Interconnect])
    , _intnSelfLink      :: !(Maybe Text)
    , _intnWarning       :: !(Maybe InterconnectListWarning)
    , _intnId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'intnNextPageToken'
--
-- * 'intnKind'
--
-- * 'intnItems'
--
-- * 'intnSelfLink'
--
-- * 'intnWarning'
--
-- * 'intnId'
interconnectList
    :: InterconnectList
interconnectList =
    InterconnectList'
    { _intnNextPageToken = Nothing
    , _intnKind = "compute#interconnectList"
    , _intnItems = Nothing
    , _intnSelfLink = Nothing
    , _intnWarning = Nothing
    , _intnId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
intnNextPageToken :: Lens' InterconnectList (Maybe Text)
intnNextPageToken
  = lens _intnNextPageToken
      (\ s a -> s{_intnNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#interconnectList for
-- lists of interconnects.
intnKind :: Lens' InterconnectList Text
intnKind = lens _intnKind (\ s a -> s{_intnKind = a})

-- | A list of Interconnect resources.
intnItems :: Lens' InterconnectList [Interconnect]
intnItems
  = lens _intnItems (\ s a -> s{_intnItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
intnSelfLink :: Lens' InterconnectList (Maybe Text)
intnSelfLink
  = lens _intnSelfLink (\ s a -> s{_intnSelfLink = a})

-- | [Output Only] Informational warning message.
intnWarning :: Lens' InterconnectList (Maybe InterconnectListWarning)
intnWarning
  = lens _intnWarning (\ s a -> s{_intnWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
intnId :: Lens' InterconnectList (Maybe Text)
intnId = lens _intnId (\ s a -> s{_intnId = a})

instance FromJSON InterconnectList where
        parseJSON
          = withObject "InterconnectList"
              (\ o ->
                 InterconnectList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#interconnectList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InterconnectList where
        toJSON InterconnectList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _intnNextPageToken,
                  Just ("kind" .= _intnKind),
                  ("items" .=) <$> _intnItems,
                  ("selfLink" .=) <$> _intnSelfLink,
                  ("warning" .=) <$> _intnWarning,
                  ("id" .=) <$> _intnId])

--
-- /See:/ 'targetPoolListWarningDataItem' smart constructor.
data TargetPoolListWarningDataItem = TargetPoolListWarningDataItem'
    { _tplwdiValue :: !(Maybe Text)
    , _tplwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetPoolListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tplwdiValue'
--
-- * 'tplwdiKey'
targetPoolListWarningDataItem
    :: TargetPoolListWarningDataItem
targetPoolListWarningDataItem =
    TargetPoolListWarningDataItem'
    { _tplwdiValue = Nothing
    , _tplwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
tplwdiValue :: Lens' TargetPoolListWarningDataItem (Maybe Text)
tplwdiValue
  = lens _tplwdiValue (\ s a -> s{_tplwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
tplwdiKey :: Lens' TargetPoolListWarningDataItem (Maybe Text)
tplwdiKey
  = lens _tplwdiKey (\ s a -> s{_tplwdiKey = a})

instance FromJSON TargetPoolListWarningDataItem where
        parseJSON
          = withObject "TargetPoolListWarningDataItem"
              (\ o ->
                 TargetPoolListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON TargetPoolListWarningDataItem where
        toJSON TargetPoolListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _tplwdiValue,
                  ("key" .=) <$> _tplwdiKey])

-- | A Node Template resource.
--
-- /See:/ 'nodeTemplate' smart constructor.
data NodeTemplate = NodeTemplate'
    { _nttStatus              :: !(Maybe NodeTemplateStatus)
    , _nttKind                :: !Text
    , _nttSelfLink            :: !(Maybe Text)
    , _nttName                :: !(Maybe Text)
    , _nttStatusMessage       :: !(Maybe Text)
    , _nttCreationTimestamp   :: !(Maybe Text)
    , _nttNodeAffinityLabels  :: !(Maybe NodeTemplateNodeAffinityLabels)
    , _nttId                  :: !(Maybe (Textual Word64))
    , _nttNodeTypeFlexibility :: !(Maybe NodeTemplateNodeTypeFlexibility)
    , _nttNodeType            :: !(Maybe Text)
    , _nttRegion              :: !(Maybe Text)
    , _nttDescription         :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplate' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nttStatus'
--
-- * 'nttKind'
--
-- * 'nttSelfLink'
--
-- * 'nttName'
--
-- * 'nttStatusMessage'
--
-- * 'nttCreationTimestamp'
--
-- * 'nttNodeAffinityLabels'
--
-- * 'nttId'
--
-- * 'nttNodeTypeFlexibility'
--
-- * 'nttNodeType'
--
-- * 'nttRegion'
--
-- * 'nttDescription'
nodeTemplate
    :: NodeTemplate
nodeTemplate =
    NodeTemplate'
    { _nttStatus = Nothing
    , _nttKind = "compute#nodeTemplate"
    , _nttSelfLink = Nothing
    , _nttName = Nothing
    , _nttStatusMessage = Nothing
    , _nttCreationTimestamp = Nothing
    , _nttNodeAffinityLabels = Nothing
    , _nttId = Nothing
    , _nttNodeTypeFlexibility = Nothing
    , _nttNodeType = Nothing
    , _nttRegion = Nothing
    , _nttDescription = Nothing
    }

-- | [Output Only] The status of the node template. One of the following
-- values: CREATING, READY, and DELETING.
nttStatus :: Lens' NodeTemplate (Maybe NodeTemplateStatus)
nttStatus
  = lens _nttStatus (\ s a -> s{_nttStatus = a})

-- | [Output Only] The type of the resource. Always compute#nodeTemplate for
-- node templates.
nttKind :: Lens' NodeTemplate Text
nttKind = lens _nttKind (\ s a -> s{_nttKind = a})

-- | [Output Only] Server-defined URL for the resource.
nttSelfLink :: Lens' NodeTemplate (Maybe Text)
nttSelfLink
  = lens _nttSelfLink (\ s a -> s{_nttSelfLink = a})

-- | The name of the resource, provided by the client when initially creating
-- the resource. The resource name must be 1-63 characters long, and comply
-- with RFC1035. Specifically, the name must be 1-63 characters long and
-- match the regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means
-- the first character must be a lowercase letter, and all following
-- characters must be a dash, lowercase letter, or digit, except the last
-- character, which cannot be a dash.
nttName :: Lens' NodeTemplate (Maybe Text)
nttName = lens _nttName (\ s a -> s{_nttName = a})

-- | [Output Only] An optional, human-readable explanation of the status.
nttStatusMessage :: Lens' NodeTemplate (Maybe Text)
nttStatusMessage
  = lens _nttStatusMessage
      (\ s a -> s{_nttStatusMessage = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
nttCreationTimestamp :: Lens' NodeTemplate (Maybe Text)
nttCreationTimestamp
  = lens _nttCreationTimestamp
      (\ s a -> s{_nttCreationTimestamp = a})

-- | Labels to use for node affinity, which will be used in instance
-- scheduling.
nttNodeAffinityLabels :: Lens' NodeTemplate (Maybe NodeTemplateNodeAffinityLabels)
nttNodeAffinityLabels
  = lens _nttNodeAffinityLabels
      (\ s a -> s{_nttNodeAffinityLabels = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
nttId :: Lens' NodeTemplate (Maybe Word64)
nttId
  = lens _nttId (\ s a -> s{_nttId = a}) .
      mapping _Coerce

-- | The flexible properties of the desired node type. Node groups that use
-- this node template will create nodes of a type that matches these
-- properties. This field is mutually exclusive with the node_type
-- property; you can only define one or the other, but not both.
nttNodeTypeFlexibility :: Lens' NodeTemplate (Maybe NodeTemplateNodeTypeFlexibility)
nttNodeTypeFlexibility
  = lens _nttNodeTypeFlexibility
      (\ s a -> s{_nttNodeTypeFlexibility = a})

-- | The node type to use for nodes group that are created from this
-- template.
nttNodeType :: Lens' NodeTemplate (Maybe Text)
nttNodeType
  = lens _nttNodeType (\ s a -> s{_nttNodeType = a})

-- | [Output Only] The name of the region where the node template resides,
-- such as us-central1.
nttRegion :: Lens' NodeTemplate (Maybe Text)
nttRegion
  = lens _nttRegion (\ s a -> s{_nttRegion = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
nttDescription :: Lens' NodeTemplate (Maybe Text)
nttDescription
  = lens _nttDescription
      (\ s a -> s{_nttDescription = a})

instance FromJSON NodeTemplate where
        parseJSON
          = withObject "NodeTemplate"
              (\ o ->
                 NodeTemplate' <$>
                   (o .:? "status") <*>
                     (o .:? "kind" .!= "compute#nodeTemplate")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "statusMessage")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "nodeAffinityLabels")
                     <*> (o .:? "id")
                     <*> (o .:? "nodeTypeFlexibility")
                     <*> (o .:? "nodeType")
                     <*> (o .:? "region")
                     <*> (o .:? "description"))

instance ToJSON NodeTemplate where
        toJSON NodeTemplate'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _nttStatus,
                  Just ("kind" .= _nttKind),
                  ("selfLink" .=) <$> _nttSelfLink,
                  ("name" .=) <$> _nttName,
                  ("statusMessage" .=) <$> _nttStatusMessage,
                  ("creationTimestamp" .=) <$> _nttCreationTimestamp,
                  ("nodeAffinityLabels" .=) <$> _nttNodeAffinityLabels,
                  ("id" .=) <$> _nttId,
                  ("nodeTypeFlexibility" .=) <$>
                    _nttNodeTypeFlexibility,
                  ("nodeType" .=) <$> _nttNodeType,
                  ("region" .=) <$> _nttRegion,
                  ("description" .=) <$> _nttDescription])

-- | Contains a list of Subnetwork resources.
--
-- /See:/ 'subnetworkList' smart constructor.
data SubnetworkList = SubnetworkList'
    { _slNextPageToken :: !(Maybe Text)
    , _slKind          :: !Text
    , _slItems         :: !(Maybe [Subnetwork])
    , _slSelfLink      :: !(Maybe Text)
    , _slWarning       :: !(Maybe SubnetworkListWarning)
    , _slId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworkList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'slNextPageToken'
--
-- * 'slKind'
--
-- * 'slItems'
--
-- * 'slSelfLink'
--
-- * 'slWarning'
--
-- * 'slId'
subnetworkList
    :: SubnetworkList
subnetworkList =
    SubnetworkList'
    { _slNextPageToken = Nothing
    , _slKind = "compute#subnetworkList"
    , _slItems = Nothing
    , _slSelfLink = Nothing
    , _slWarning = Nothing
    , _slId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
slNextPageToken :: Lens' SubnetworkList (Maybe Text)
slNextPageToken
  = lens _slNextPageToken
      (\ s a -> s{_slNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#subnetworkList for lists
-- of subnetworks.
slKind :: Lens' SubnetworkList Text
slKind = lens _slKind (\ s a -> s{_slKind = a})

-- | A list of Subnetwork resources.
slItems :: Lens' SubnetworkList [Subnetwork]
slItems
  = lens _slItems (\ s a -> s{_slItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
slSelfLink :: Lens' SubnetworkList (Maybe Text)
slSelfLink
  = lens _slSelfLink (\ s a -> s{_slSelfLink = a})

-- | [Output Only] Informational warning message.
slWarning :: Lens' SubnetworkList (Maybe SubnetworkListWarning)
slWarning
  = lens _slWarning (\ s a -> s{_slWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
slId :: Lens' SubnetworkList (Maybe Text)
slId = lens _slId (\ s a -> s{_slId = a})

instance FromJSON SubnetworkList where
        parseJSON
          = withObject "SubnetworkList"
              (\ o ->
                 SubnetworkList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#subnetworkList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON SubnetworkList where
        toJSON SubnetworkList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _slNextPageToken,
                  Just ("kind" .= _slKind), ("items" .=) <$> _slItems,
                  ("selfLink" .=) <$> _slSelfLink,
                  ("warning" .=) <$> _slWarning, ("id" .=) <$> _slId])

-- | Informational warning which replaces the list of forwarding rules when
-- the list is empty.
--
-- /See:/ 'forwardingRulesScopedListWarning' smart constructor.
data ForwardingRulesScopedListWarning = ForwardingRulesScopedListWarning'
    { _frslwData    :: !(Maybe [ForwardingRulesScopedListWarningDataItem])
    , _frslwCode    :: !(Maybe ForwardingRulesScopedListWarningCode)
    , _frslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ForwardingRulesScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'frslwData'
--
-- * 'frslwCode'
--
-- * 'frslwMessage'
forwardingRulesScopedListWarning
    :: ForwardingRulesScopedListWarning
forwardingRulesScopedListWarning =
    ForwardingRulesScopedListWarning'
    { _frslwData = Nothing
    , _frslwCode = Nothing
    , _frslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
frslwData :: Lens' ForwardingRulesScopedListWarning [ForwardingRulesScopedListWarningDataItem]
frslwData
  = lens _frslwData (\ s a -> s{_frslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
frslwCode :: Lens' ForwardingRulesScopedListWarning (Maybe ForwardingRulesScopedListWarningCode)
frslwCode
  = lens _frslwCode (\ s a -> s{_frslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
frslwMessage :: Lens' ForwardingRulesScopedListWarning (Maybe Text)
frslwMessage
  = lens _frslwMessage (\ s a -> s{_frslwMessage = a})

instance FromJSON ForwardingRulesScopedListWarning
         where
        parseJSON
          = withObject "ForwardingRulesScopedListWarning"
              (\ o ->
                 ForwardingRulesScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON ForwardingRulesScopedListWarning
         where
        toJSON ForwardingRulesScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _frslwData,
                  ("code" .=) <$> _frslwCode,
                  ("message" .=) <$> _frslwMessage])

-- | Contains a list of HttpHealthCheck resources.
--
-- /See:/ 'hTTPHealthCheckList' smart constructor.
data HTTPHealthCheckList = HTTPHealthCheckList'
    { _httphclNextPageToken :: !(Maybe Text)
    , _httphclKind          :: !Text
    , _httphclItems         :: !(Maybe [HTTPHealthCheck])
    , _httphclSelfLink      :: !(Maybe Text)
    , _httphclWarning       :: !(Maybe HTTPHealthCheckListWarning)
    , _httphclId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HTTPHealthCheckList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'httphclNextPageToken'
--
-- * 'httphclKind'
--
-- * 'httphclItems'
--
-- * 'httphclSelfLink'
--
-- * 'httphclWarning'
--
-- * 'httphclId'
hTTPHealthCheckList
    :: HTTPHealthCheckList
hTTPHealthCheckList =
    HTTPHealthCheckList'
    { _httphclNextPageToken = Nothing
    , _httphclKind = "compute#httpHealthCheckList"
    , _httphclItems = Nothing
    , _httphclSelfLink = Nothing
    , _httphclWarning = Nothing
    , _httphclId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
httphclNextPageToken :: Lens' HTTPHealthCheckList (Maybe Text)
httphclNextPageToken
  = lens _httphclNextPageToken
      (\ s a -> s{_httphclNextPageToken = a})

-- | Type of resource.
httphclKind :: Lens' HTTPHealthCheckList Text
httphclKind
  = lens _httphclKind (\ s a -> s{_httphclKind = a})

-- | A list of HttpHealthCheck resources.
httphclItems :: Lens' HTTPHealthCheckList [HTTPHealthCheck]
httphclItems
  = lens _httphclItems (\ s a -> s{_httphclItems = a})
      . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
httphclSelfLink :: Lens' HTTPHealthCheckList (Maybe Text)
httphclSelfLink
  = lens _httphclSelfLink
      (\ s a -> s{_httphclSelfLink = a})

-- | [Output Only] Informational warning message.
httphclWarning :: Lens' HTTPHealthCheckList (Maybe HTTPHealthCheckListWarning)
httphclWarning
  = lens _httphclWarning
      (\ s a -> s{_httphclWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
httphclId :: Lens' HTTPHealthCheckList (Maybe Text)
httphclId
  = lens _httphclId (\ s a -> s{_httphclId = a})

instance FromJSON HTTPHealthCheckList where
        parseJSON
          = withObject "HTTPHealthCheckList"
              (\ o ->
                 HTTPHealthCheckList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#httpHealthCheckList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON HTTPHealthCheckList where
        toJSON HTTPHealthCheckList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _httphclNextPageToken,
                  Just ("kind" .= _httphclKind),
                  ("items" .=) <$> _httphclItems,
                  ("selfLink" .=) <$> _httphclSelfLink,
                  ("warning" .=) <$> _httphclWarning,
                  ("id" .=) <$> _httphclId])

-- | [Output Only] The warning that replaces the list of managed instance
-- groups when the list is empty.
--
-- /See:/ 'instanceGroupManagersScopedListWarning' smart constructor.
data InstanceGroupManagersScopedListWarning = InstanceGroupManagersScopedListWarning'
    { _igmslwData    :: !(Maybe [InstanceGroupManagersScopedListWarningDataItem])
    , _igmslwCode    :: !(Maybe InstanceGroupManagersScopedListWarningCode)
    , _igmslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmslwData'
--
-- * 'igmslwCode'
--
-- * 'igmslwMessage'
instanceGroupManagersScopedListWarning
    :: InstanceGroupManagersScopedListWarning
instanceGroupManagersScopedListWarning =
    InstanceGroupManagersScopedListWarning'
    { _igmslwData = Nothing
    , _igmslwCode = Nothing
    , _igmslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
igmslwData :: Lens' InstanceGroupManagersScopedListWarning [InstanceGroupManagersScopedListWarningDataItem]
igmslwData
  = lens _igmslwData (\ s a -> s{_igmslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
igmslwCode :: Lens' InstanceGroupManagersScopedListWarning (Maybe InstanceGroupManagersScopedListWarningCode)
igmslwCode
  = lens _igmslwCode (\ s a -> s{_igmslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
igmslwMessage :: Lens' InstanceGroupManagersScopedListWarning (Maybe Text)
igmslwMessage
  = lens _igmslwMessage
      (\ s a -> s{_igmslwMessage = a})

instance FromJSON
         InstanceGroupManagersScopedListWarning where
        parseJSON
          = withObject "InstanceGroupManagersScopedListWarning"
              (\ o ->
                 InstanceGroupManagersScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON
         InstanceGroupManagersScopedListWarning where
        toJSON InstanceGroupManagersScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _igmslwData,
                  ("code" .=) <$> _igmslwCode,
                  ("message" .=) <$> _igmslwMessage])

--
-- /See:/ 'sslPoliciesList' smart constructor.
data SSLPoliciesList = SSLPoliciesList'
    { _sslplNextPageToken :: !(Maybe Text)
    , _sslplKind          :: !Text
    , _sslplItems         :: !(Maybe [SSLPolicy])
    , _sslplSelfLink      :: !(Maybe Text)
    , _sslplWarning       :: !(Maybe SSLPoliciesListWarning)
    , _sslplId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SSLPoliciesList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sslplNextPageToken'
--
-- * 'sslplKind'
--
-- * 'sslplItems'
--
-- * 'sslplSelfLink'
--
-- * 'sslplWarning'
--
-- * 'sslplId'
sslPoliciesList
    :: SSLPoliciesList
sslPoliciesList =
    SSLPoliciesList'
    { _sslplNextPageToken = Nothing
    , _sslplKind = "compute#sslPoliciesList"
    , _sslplItems = Nothing
    , _sslplSelfLink = Nothing
    , _sslplWarning = Nothing
    , _sslplId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
sslplNextPageToken :: Lens' SSLPoliciesList (Maybe Text)
sslplNextPageToken
  = lens _sslplNextPageToken
      (\ s a -> s{_sslplNextPageToken = a})

-- | [Output Only] Type of the resource. Always compute#sslPoliciesList for
-- lists of sslPolicies.
sslplKind :: Lens' SSLPoliciesList Text
sslplKind
  = lens _sslplKind (\ s a -> s{_sslplKind = a})

-- | A list of SslPolicy resources.
sslplItems :: Lens' SSLPoliciesList [SSLPolicy]
sslplItems
  = lens _sslplItems (\ s a -> s{_sslplItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
sslplSelfLink :: Lens' SSLPoliciesList (Maybe Text)
sslplSelfLink
  = lens _sslplSelfLink
      (\ s a -> s{_sslplSelfLink = a})

-- | [Output Only] Informational warning message.
sslplWarning :: Lens' SSLPoliciesList (Maybe SSLPoliciesListWarning)
sslplWarning
  = lens _sslplWarning (\ s a -> s{_sslplWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
sslplId :: Lens' SSLPoliciesList (Maybe Text)
sslplId = lens _sslplId (\ s a -> s{_sslplId = a})

instance FromJSON SSLPoliciesList where
        parseJSON
          = withObject "SSLPoliciesList"
              (\ o ->
                 SSLPoliciesList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#sslPoliciesList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON SSLPoliciesList where
        toJSON SSLPoliciesList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _sslplNextPageToken,
                  Just ("kind" .= _sslplKind),
                  ("items" .=) <$> _sslplItems,
                  ("selfLink" .=) <$> _sslplSelfLink,
                  ("warning" .=) <$> _sslplWarning,
                  ("id" .=) <$> _sslplId])

--
-- /See:/ 'urlMapsValidateRequest' smart constructor.
newtype URLMapsValidateRequest = URLMapsValidateRequest'
    { _umvrResource :: Maybe URLMap
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMapsValidateRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umvrResource'
urlMapsValidateRequest
    :: URLMapsValidateRequest
urlMapsValidateRequest =
    URLMapsValidateRequest'
    { _umvrResource = Nothing
    }

-- | Content of the UrlMap to be validated.
umvrResource :: Lens' URLMapsValidateRequest (Maybe URLMap)
umvrResource
  = lens _umvrResource (\ s a -> s{_umvrResource = a})

instance FromJSON URLMapsValidateRequest where
        parseJSON
          = withObject "URLMapsValidateRequest"
              (\ o ->
                 URLMapsValidateRequest' <$> (o .:? "resource"))

instance ToJSON URLMapsValidateRequest where
        toJSON URLMapsValidateRequest'{..}
          = object
              (catMaybes [("resource" .=) <$> _umvrResource])

--
-- /See:/ 'instanceGroupManagersSetTargetPoolsRequest' smart constructor.
data InstanceGroupManagersSetTargetPoolsRequest = InstanceGroupManagersSetTargetPoolsRequest'
    { _igmstprFingerprint :: !(Maybe Bytes)
    , _igmstprTargetPools :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupManagersSetTargetPoolsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igmstprFingerprint'
--
-- * 'igmstprTargetPools'
instanceGroupManagersSetTargetPoolsRequest
    :: InstanceGroupManagersSetTargetPoolsRequest
instanceGroupManagersSetTargetPoolsRequest =
    InstanceGroupManagersSetTargetPoolsRequest'
    { _igmstprFingerprint = Nothing
    , _igmstprTargetPools = Nothing
    }

-- | The fingerprint of the target pools information. Use this optional
-- property to prevent conflicts when multiple users change the target
-- pools settings concurrently. Obtain the fingerprint with the
-- instanceGroupManagers.get method. Then, include the fingerprint in your
-- request to ensure that you do not overwrite changes that were applied
-- from another concurrent request.
igmstprFingerprint :: Lens' InstanceGroupManagersSetTargetPoolsRequest (Maybe ByteString)
igmstprFingerprint
  = lens _igmstprFingerprint
      (\ s a -> s{_igmstprFingerprint = a})
      . mapping _Bytes

-- | The list of target pool URLs that instances in this managed instance
-- group belong to. The managed instance group applies these target pools
-- to all of the instances in the group. Existing instances and new
-- instances in the group all receive these target pool settings.
igmstprTargetPools :: Lens' InstanceGroupManagersSetTargetPoolsRequest [Text]
igmstprTargetPools
  = lens _igmstprTargetPools
      (\ s a -> s{_igmstprTargetPools = a})
      . _Default
      . _Coerce

instance FromJSON
         InstanceGroupManagersSetTargetPoolsRequest where
        parseJSON
          = withObject
              "InstanceGroupManagersSetTargetPoolsRequest"
              (\ o ->
                 InstanceGroupManagersSetTargetPoolsRequest' <$>
                   (o .:? "fingerprint") <*>
                     (o .:? "targetPools" .!= mempty))

instance ToJSON
         InstanceGroupManagersSetTargetPoolsRequest where
        toJSON
          InstanceGroupManagersSetTargetPoolsRequest'{..}
          = object
              (catMaybes
                 [("fingerprint" .=) <$> _igmstprFingerprint,
                  ("targetPools" .=) <$> _igmstprTargetPools])

-- | Represents a Commitment resource. Creating a Commitment resource means
-- that you are purchasing a committed use contract with an explicit start
-- and end time. You can create commitments based on vCPUs and memory usage
-- and receive discounted rates. For full details, read Signing Up for
-- Committed Use Discounts. Committed use discounts are subject to Google
-- Cloud Platform\'s Service Specific Terms. By purchasing a committed use
-- discount, you agree to these terms. Committed use discounts will not
-- renew, so you must purchase a new commitment to continue receiving
-- discounts. (== resource_for beta.commitments ==) (== resource_for
-- v1.commitments ==)
--
-- /See:/ 'commitment' smart constructor.
data Commitment = Commitment'
    { _cStatus            :: !(Maybe CommitmentStatus)
    , _cKind              :: !Text
    , _cPlan              :: !(Maybe CommitmentPlan)
    , _cResources         :: !(Maybe [ResourceCommitment])
    , _cEndTimestamp      :: !(Maybe Text)
    , _cSelfLink          :: !(Maybe Text)
    , _cName              :: !(Maybe Text)
    , _cStatusMessage     :: !(Maybe Text)
    , _cCreationTimestamp :: !(Maybe Text)
    , _cId                :: !(Maybe (Textual Word64))
    , _cRegion            :: !(Maybe Text)
    , _cStartTimestamp    :: !(Maybe Text)
    , _cDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Commitment' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cStatus'
--
-- * 'cKind'
--
-- * 'cPlan'
--
-- * 'cResources'
--
-- * 'cEndTimestamp'
--
-- * 'cSelfLink'
--
-- * 'cName'
--
-- * 'cStatusMessage'
--
-- * 'cCreationTimestamp'
--
-- * 'cId'
--
-- * 'cRegion'
--
-- * 'cStartTimestamp'
--
-- * 'cDescription'
commitment
    :: Commitment
commitment =
    Commitment'
    { _cStatus = Nothing
    , _cKind = "compute#commitment"
    , _cPlan = Nothing
    , _cResources = Nothing
    , _cEndTimestamp = Nothing
    , _cSelfLink = Nothing
    , _cName = Nothing
    , _cStatusMessage = Nothing
    , _cCreationTimestamp = Nothing
    , _cId = Nothing
    , _cRegion = Nothing
    , _cStartTimestamp = Nothing
    , _cDescription = Nothing
    }

-- | [Output Only] Status of the commitment with regards to eventual
-- expiration (each commitment has an end date defined). One of the
-- following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
cStatus :: Lens' Commitment (Maybe CommitmentStatus)
cStatus = lens _cStatus (\ s a -> s{_cStatus = a})

-- | [Output Only] Type of the resource. Always compute#commitment for
-- commitments.
cKind :: Lens' Commitment Text
cKind = lens _cKind (\ s a -> s{_cKind = a})

-- | The plan for this commitment, which determines duration and discount
-- rate. The currently supported plans are TWELVE_MONTH (1 year), and
-- THIRTY_SIX_MONTH (3 years).
cPlan :: Lens' Commitment (Maybe CommitmentPlan)
cPlan = lens _cPlan (\ s a -> s{_cPlan = a})

-- | A list of commitment amounts for particular resources. Note that VCPU
-- and MEMORY resource commitments must occur together.
cResources :: Lens' Commitment [ResourceCommitment]
cResources
  = lens _cResources (\ s a -> s{_cResources = a}) .
      _Default
      . _Coerce

-- | [Output Only] Commitment end time in RFC3339 text format.
cEndTimestamp :: Lens' Commitment (Maybe Text)
cEndTimestamp
  = lens _cEndTimestamp
      (\ s a -> s{_cEndTimestamp = a})

-- | [Output Only] Server-defined URL for the resource.
cSelfLink :: Lens' Commitment (Maybe Text)
cSelfLink
  = lens _cSelfLink (\ s a -> s{_cSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
cName :: Lens' Commitment (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})

-- | [Output Only] An optional, human-readable explanation of the status.
cStatusMessage :: Lens' Commitment (Maybe Text)
cStatusMessage
  = lens _cStatusMessage
      (\ s a -> s{_cStatusMessage = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
cCreationTimestamp :: Lens' Commitment (Maybe Text)
cCreationTimestamp
  = lens _cCreationTimestamp
      (\ s a -> s{_cCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
cId :: Lens' Commitment (Maybe Word64)
cId
  = lens _cId (\ s a -> s{_cId = a}) . mapping _Coerce

-- | [Output Only] URL of the region where this commitment may be used.
cRegion :: Lens' Commitment (Maybe Text)
cRegion = lens _cRegion (\ s a -> s{_cRegion = a})

-- | [Output Only] Commitment start time in RFC3339 text format.
cStartTimestamp :: Lens' Commitment (Maybe Text)
cStartTimestamp
  = lens _cStartTimestamp
      (\ s a -> s{_cStartTimestamp = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
cDescription :: Lens' Commitment (Maybe Text)
cDescription
  = lens _cDescription (\ s a -> s{_cDescription = a})

instance FromJSON Commitment where
        parseJSON
          = withObject "Commitment"
              (\ o ->
                 Commitment' <$>
                   (o .:? "status") <*>
                     (o .:? "kind" .!= "compute#commitment")
                     <*> (o .:? "plan")
                     <*> (o .:? "resources" .!= mempty)
                     <*> (o .:? "endTimestamp")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "statusMessage")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "startTimestamp")
                     <*> (o .:? "description"))

instance ToJSON Commitment where
        toJSON Commitment'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _cStatus, Just ("kind" .= _cKind),
                  ("plan" .=) <$> _cPlan,
                  ("resources" .=) <$> _cResources,
                  ("endTimestamp" .=) <$> _cEndTimestamp,
                  ("selfLink" .=) <$> _cSelfLink,
                  ("name" .=) <$> _cName,
                  ("statusMessage" .=) <$> _cStatusMessage,
                  ("creationTimestamp" .=) <$> _cCreationTimestamp,
                  ("id" .=) <$> _cId, ("region" .=) <$> _cRegion,
                  ("startTimestamp" .=) <$> _cStartTimestamp,
                  ("description" .=) <$> _cDescription])

-- | Contains a list of HttpsHealthCheck resources.
--
-- /See:/ 'httpsHealthCheckList' smart constructor.
data HTTPSHealthCheckList = HTTPSHealthCheckList'
    { _hhclNextPageToken :: !(Maybe Text)
    , _hhclKind          :: !Text
    , _hhclItems         :: !(Maybe [HTTPSHealthCheck])
    , _hhclSelfLink      :: !(Maybe Text)
    , _hhclWarning       :: !(Maybe HTTPSHealthCheckListWarning)
    , _hhclId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HTTPSHealthCheckList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hhclNextPageToken'
--
-- * 'hhclKind'
--
-- * 'hhclItems'
--
-- * 'hhclSelfLink'
--
-- * 'hhclWarning'
--
-- * 'hhclId'
httpsHealthCheckList
    :: HTTPSHealthCheckList
httpsHealthCheckList =
    HTTPSHealthCheckList'
    { _hhclNextPageToken = Nothing
    , _hhclKind = "compute#httpsHealthCheckList"
    , _hhclItems = Nothing
    , _hhclSelfLink = Nothing
    , _hhclWarning = Nothing
    , _hhclId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
hhclNextPageToken :: Lens' HTTPSHealthCheckList (Maybe Text)
hhclNextPageToken
  = lens _hhclNextPageToken
      (\ s a -> s{_hhclNextPageToken = a})

-- | Type of resource.
hhclKind :: Lens' HTTPSHealthCheckList Text
hhclKind = lens _hhclKind (\ s a -> s{_hhclKind = a})

-- | A list of HttpsHealthCheck resources.
hhclItems :: Lens' HTTPSHealthCheckList [HTTPSHealthCheck]
hhclItems
  = lens _hhclItems (\ s a -> s{_hhclItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
hhclSelfLink :: Lens' HTTPSHealthCheckList (Maybe Text)
hhclSelfLink
  = lens _hhclSelfLink (\ s a -> s{_hhclSelfLink = a})

-- | [Output Only] Informational warning message.
hhclWarning :: Lens' HTTPSHealthCheckList (Maybe HTTPSHealthCheckListWarning)
hhclWarning
  = lens _hhclWarning (\ s a -> s{_hhclWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
hhclId :: Lens' HTTPSHealthCheckList (Maybe Text)
hhclId = lens _hhclId (\ s a -> s{_hhclId = a})

instance FromJSON HTTPSHealthCheckList where
        parseJSON
          = withObject "HTTPSHealthCheckList"
              (\ o ->
                 HTTPSHealthCheckList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#httpsHealthCheckList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON HTTPSHealthCheckList where
        toJSON HTTPSHealthCheckList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _hhclNextPageToken,
                  Just ("kind" .= _hhclKind),
                  ("items" .=) <$> _hhclItems,
                  ("selfLink" .=) <$> _hhclSelfLink,
                  ("warning" .=) <$> _hhclWarning,
                  ("id" .=) <$> _hhclId])

--
-- /See:/ 'addressListWarningDataItem' smart constructor.
data AddressListWarningDataItem = AddressListWarningDataItem'
    { _addValue :: !(Maybe Text)
    , _addKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'addValue'
--
-- * 'addKey'
addressListWarningDataItem
    :: AddressListWarningDataItem
addressListWarningDataItem =
    AddressListWarningDataItem'
    { _addValue = Nothing
    , _addKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
addValue :: Lens' AddressListWarningDataItem (Maybe Text)
addValue = lens _addValue (\ s a -> s{_addValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
addKey :: Lens' AddressListWarningDataItem (Maybe Text)
addKey = lens _addKey (\ s a -> s{_addKey = a})

instance FromJSON AddressListWarningDataItem where
        parseJSON
          = withObject "AddressListWarningDataItem"
              (\ o ->
                 AddressListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON AddressListWarningDataItem where
        toJSON AddressListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _addValue, ("key" .=) <$> _addKey])

--
-- /See:/ 'operationErrorErrorsItem' smart constructor.
data OperationErrorErrorsItem = OperationErrorErrorsItem'
    { _oeeiLocation :: !(Maybe Text)
    , _oeeiCode     :: !(Maybe Text)
    , _oeeiMessage  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationErrorErrorsItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'oeeiLocation'
--
-- * 'oeeiCode'
--
-- * 'oeeiMessage'
operationErrorErrorsItem
    :: OperationErrorErrorsItem
operationErrorErrorsItem =
    OperationErrorErrorsItem'
    { _oeeiLocation = Nothing
    , _oeeiCode = Nothing
    , _oeeiMessage = Nothing
    }

-- | [Output Only] Indicates the field in the request that caused the error.
-- This property is optional.
oeeiLocation :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiLocation
  = lens _oeeiLocation (\ s a -> s{_oeeiLocation = a})

-- | [Output Only] The error type identifier for this error.
oeeiCode :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiCode = lens _oeeiCode (\ s a -> s{_oeeiCode = a})

-- | [Output Only] An optional, human-readable error message.
oeeiMessage :: Lens' OperationErrorErrorsItem (Maybe Text)
oeeiMessage
  = lens _oeeiMessage (\ s a -> s{_oeeiMessage = a})

instance FromJSON OperationErrorErrorsItem where
        parseJSON
          = withObject "OperationErrorErrorsItem"
              (\ o ->
                 OperationErrorErrorsItem' <$>
                   (o .:? "location") <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON OperationErrorErrorsItem where
        toJSON OperationErrorErrorsItem'{..}
          = object
              (catMaybes
                 [("location" .=) <$> _oeeiLocation,
                  ("code" .=) <$> _oeeiCode,
                  ("message" .=) <$> _oeeiMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'commitmentListWarning' smart constructor.
data CommitmentListWarning = CommitmentListWarning'
    { _clwData    :: !(Maybe [CommitmentListWarningDataItem])
    , _clwCode    :: !(Maybe CommitmentListWarningCode)
    , _clwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'clwData'
--
-- * 'clwCode'
--
-- * 'clwMessage'
commitmentListWarning
    :: CommitmentListWarning
commitmentListWarning =
    CommitmentListWarning'
    { _clwData = Nothing
    , _clwCode = Nothing
    , _clwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
clwData :: Lens' CommitmentListWarning [CommitmentListWarningDataItem]
clwData
  = lens _clwData (\ s a -> s{_clwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
clwCode :: Lens' CommitmentListWarning (Maybe CommitmentListWarningCode)
clwCode = lens _clwCode (\ s a -> s{_clwCode = a})

-- | [Output Only] A human-readable description of the warning code.
clwMessage :: Lens' CommitmentListWarning (Maybe Text)
clwMessage
  = lens _clwMessage (\ s a -> s{_clwMessage = a})

instance FromJSON CommitmentListWarning where
        parseJSON
          = withObject "CommitmentListWarning"
              (\ o ->
                 CommitmentListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON CommitmentListWarning where
        toJSON CommitmentListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _clwData, ("code" .=) <$> _clwCode,
                  ("message" .=) <$> _clwMessage])

-- | A license resource.
--
-- /See:/ 'license' smart constructor.
data License = License'
    { _lChargesUseFee        :: !(Maybe Bool)
    , _lKind                 :: !Text
    , _lResourceRequirements :: !(Maybe LicenseResourceRequirements)
    , _lTransferable         :: !(Maybe Bool)
    , _lSelfLink             :: !(Maybe Text)
    , _lName                 :: !(Maybe Text)
    , _lCreationTimestamp    :: !(Maybe Text)
    , _lId                   :: !(Maybe (Textual Word64))
    , _lDescription          :: !(Maybe Text)
    , _lLicenseCode          :: !(Maybe (Textual Word64))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'License' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lChargesUseFee'
--
-- * 'lKind'
--
-- * 'lResourceRequirements'
--
-- * 'lTransferable'
--
-- * 'lSelfLink'
--
-- * 'lName'
--
-- * 'lCreationTimestamp'
--
-- * 'lId'
--
-- * 'lDescription'
--
-- * 'lLicenseCode'
license
    :: License
license =
    License'
    { _lChargesUseFee = Nothing
    , _lKind = "compute#license"
    , _lResourceRequirements = Nothing
    , _lTransferable = Nothing
    , _lSelfLink = Nothing
    , _lName = Nothing
    , _lCreationTimestamp = Nothing
    , _lId = Nothing
    , _lDescription = Nothing
    , _lLicenseCode = Nothing
    }

-- | [Output Only] Deprecated. This field no longer reflects whether a
-- license charges a usage fee.
lChargesUseFee :: Lens' License (Maybe Bool)
lChargesUseFee
  = lens _lChargesUseFee
      (\ s a -> s{_lChargesUseFee = a})

-- | [Output Only] Type of resource. Always compute#license for licenses.
lKind :: Lens' License Text
lKind = lens _lKind (\ s a -> s{_lKind = a})

lResourceRequirements :: Lens' License (Maybe LicenseResourceRequirements)
lResourceRequirements
  = lens _lResourceRequirements
      (\ s a -> s{_lResourceRequirements = a})

-- | If false, licenses will not be copied from the source resource when
-- creating an image from a disk, disk from snapshot, or snapshot from
-- disk.
lTransferable :: Lens' License (Maybe Bool)
lTransferable
  = lens _lTransferable
      (\ s a -> s{_lTransferable = a})

-- | [Output Only] Server-defined URL for the resource.
lSelfLink :: Lens' License (Maybe Text)
lSelfLink
  = lens _lSelfLink (\ s a -> s{_lSelfLink = a})

-- | Name of the resource. The name must be 1-63 characters long and comply
-- with RFC1035.
lName :: Lens' License (Maybe Text)
lName = lens _lName (\ s a -> s{_lName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
lCreationTimestamp :: Lens' License (Maybe Text)
lCreationTimestamp
  = lens _lCreationTimestamp
      (\ s a -> s{_lCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
lId :: Lens' License (Maybe Word64)
lId
  = lens _lId (\ s a -> s{_lId = a}) . mapping _Coerce

-- | An optional textual description of the resource; provided by the client
-- when the resource is created.
lDescription :: Lens' License (Maybe Text)
lDescription
  = lens _lDescription (\ s a -> s{_lDescription = a})

-- | [Output Only] The unique code used to attach this license to images,
-- snapshots, and disks.
lLicenseCode :: Lens' License (Maybe Word64)
lLicenseCode
  = lens _lLicenseCode (\ s a -> s{_lLicenseCode = a})
      . mapping _Coerce

instance FromJSON License where
        parseJSON
          = withObject "License"
              (\ o ->
                 License' <$>
                   (o .:? "chargesUseFee") <*>
                     (o .:? "kind" .!= "compute#license")
                     <*> (o .:? "resourceRequirements")
                     <*> (o .:? "transferable")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "description")
                     <*> (o .:? "licenseCode"))

instance ToJSON License where
        toJSON License'{..}
          = object
              (catMaybes
                 [("chargesUseFee" .=) <$> _lChargesUseFee,
                  Just ("kind" .= _lKind),
                  ("resourceRequirements" .=) <$>
                    _lResourceRequirements,
                  ("transferable" .=) <$> _lTransferable,
                  ("selfLink" .=) <$> _lSelfLink,
                  ("name" .=) <$> _lName,
                  ("creationTimestamp" .=) <$> _lCreationTimestamp,
                  ("id" .=) <$> _lId,
                  ("description" .=) <$> _lDescription,
                  ("licenseCode" .=) <$> _lLicenseCode])

-- | A path-matching rule for a URL. If matched, will use the specified
-- BackendService to handle the traffic arriving at this URL.
--
-- /See:/ 'pathRule' smart constructor.
data PathRule = PathRule'
    { _prService :: !(Maybe Text)
    , _prPaths   :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'PathRule' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'prService'
--
-- * 'prPaths'
pathRule
    :: PathRule
pathRule =
    PathRule'
    { _prService = Nothing
    , _prPaths = Nothing
    }

-- | The URL of the backend service resource if this rule is matched. Use
-- service instead of routeAction when simple routing to a backend service
-- is desired and other advanced capabilities like traffic splitting and
-- rewrites are not required. Only one of service, routeAction or
-- urlRedirect should must be set.
prService :: Lens' PathRule (Maybe Text)
prService
  = lens _prService (\ s a -> s{_prService = a})

-- | The list of path patterns to match. Each must start with \/ and the only
-- place a * is allowed is at the end following a \/. The string fed to the
-- path matcher does not include any text after the first ? or #, and those
-- chars are not allowed here.
prPaths :: Lens' PathRule [Text]
prPaths
  = lens _prPaths (\ s a -> s{_prPaths = a}) . _Default
      . _Coerce

instance FromJSON PathRule where
        parseJSON
          = withObject "PathRule"
              (\ o ->
                 PathRule' <$>
                   (o .:? "service") <*> (o .:? "paths" .!= mempty))

instance ToJSON PathRule where
        toJSON PathRule'{..}
          = object
              (catMaybes
                 [("service" .=) <$> _prService,
                  ("paths" .=) <$> _prPaths])

--
-- /See:/ 'licenseCodeLicenseAlias' smart constructor.
data LicenseCodeLicenseAlias = LicenseCodeLicenseAlias'
    { _lclaSelfLink    :: !(Maybe Text)
    , _lclaDescription :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LicenseCodeLicenseAlias' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lclaSelfLink'
--
-- * 'lclaDescription'
licenseCodeLicenseAlias
    :: LicenseCodeLicenseAlias
licenseCodeLicenseAlias =
    LicenseCodeLicenseAlias'
    { _lclaSelfLink = Nothing
    , _lclaDescription = Nothing
    }

-- | [Output Only] URL of license corresponding to this License Code.
lclaSelfLink :: Lens' LicenseCodeLicenseAlias (Maybe Text)
lclaSelfLink
  = lens _lclaSelfLink (\ s a -> s{_lclaSelfLink = a})

-- | [Output Only] Description of this License Code.
lclaDescription :: Lens' LicenseCodeLicenseAlias (Maybe Text)
lclaDescription
  = lens _lclaDescription
      (\ s a -> s{_lclaDescription = a})

instance FromJSON LicenseCodeLicenseAlias where
        parseJSON
          = withObject "LicenseCodeLicenseAlias"
              (\ o ->
                 LicenseCodeLicenseAlias' <$>
                   (o .:? "selfLink") <*> (o .:? "description"))

instance ToJSON LicenseCodeLicenseAlias where
        toJSON LicenseCodeLicenseAlias'{..}
          = object
              (catMaybes
                 [("selfLink" .=) <$> _lclaSelfLink,
                  ("description" .=) <$> _lclaDescription])

--
-- /See:/ 'interconnectAttachmentsScopedListWarningDataItem' smart constructor.
data InterconnectAttachmentsScopedListWarningDataItem = InterconnectAttachmentsScopedListWarningDataItem'
    { _iaslwdiValue :: !(Maybe Text)
    , _iaslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentsScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iaslwdiValue'
--
-- * 'iaslwdiKey'
interconnectAttachmentsScopedListWarningDataItem
    :: InterconnectAttachmentsScopedListWarningDataItem
interconnectAttachmentsScopedListWarningDataItem =
    InterconnectAttachmentsScopedListWarningDataItem'
    { _iaslwdiValue = Nothing
    , _iaslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
iaslwdiValue :: Lens' InterconnectAttachmentsScopedListWarningDataItem (Maybe Text)
iaslwdiValue
  = lens _iaslwdiValue (\ s a -> s{_iaslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
iaslwdiKey :: Lens' InterconnectAttachmentsScopedListWarningDataItem (Maybe Text)
iaslwdiKey
  = lens _iaslwdiKey (\ s a -> s{_iaslwdiKey = a})

instance FromJSON
         InterconnectAttachmentsScopedListWarningDataItem
         where
        parseJSON
          = withObject
              "InterconnectAttachmentsScopedListWarningDataItem"
              (\ o ->
                 InterconnectAttachmentsScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InterconnectAttachmentsScopedListWarningDataItem
         where
        toJSON
          InterconnectAttachmentsScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _iaslwdiValue,
                  ("key" .=) <$> _iaslwdiKey])

--
-- /See:/ 'securityPolicyListWarningDataItem' smart constructor.
data SecurityPolicyListWarningDataItem = SecurityPolicyListWarningDataItem'
    { _secValue :: !(Maybe Text)
    , _secKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SecurityPolicyListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'secValue'
--
-- * 'secKey'
securityPolicyListWarningDataItem
    :: SecurityPolicyListWarningDataItem
securityPolicyListWarningDataItem =
    SecurityPolicyListWarningDataItem'
    { _secValue = Nothing
    , _secKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
secValue :: Lens' SecurityPolicyListWarningDataItem (Maybe Text)
secValue = lens _secValue (\ s a -> s{_secValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
secKey :: Lens' SecurityPolicyListWarningDataItem (Maybe Text)
secKey = lens _secKey (\ s a -> s{_secKey = a})

instance FromJSON SecurityPolicyListWarningDataItem
         where
        parseJSON
          = withObject "SecurityPolicyListWarningDataItem"
              (\ o ->
                 SecurityPolicyListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON SecurityPolicyListWarningDataItem
         where
        toJSON SecurityPolicyListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _secValue, ("key" .=) <$> _secKey])

-- | Provides the configuration for logging a type of permissions. Example: {
-- \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\",
-- \"exempted_members\": [ \"user:foo\'gmail.com\" ] }, { \"log_type\":
-- \"DATA_WRITE\", } ] } This enables \'DATA_READ\' and \'DATA_WRITE\'
-- logging, while exempting foo\'gmail.com from DATA_READ logging.
--
-- /See:/ 'auditLogConfig' smart constructor.
data AuditLogConfig = AuditLogConfig'
    { _alcLogType         :: !(Maybe AuditLogConfigLogType)
    , _alcExemptedMembers :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AuditLogConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'alcLogType'
--
-- * 'alcExemptedMembers'
auditLogConfig
    :: AuditLogConfig
auditLogConfig =
    AuditLogConfig'
    { _alcLogType = Nothing
    , _alcExemptedMembers = Nothing
    }

-- | The log type that this config enables.
alcLogType :: Lens' AuditLogConfig (Maybe AuditLogConfigLogType)
alcLogType
  = lens _alcLogType (\ s a -> s{_alcLogType = a})

-- | Specifies the identities that do not cause logging for this type of
-- permission. Follows the same format of [Binding.members][].
alcExemptedMembers :: Lens' AuditLogConfig [Text]
alcExemptedMembers
  = lens _alcExemptedMembers
      (\ s a -> s{_alcExemptedMembers = a})
      . _Default
      . _Coerce

instance FromJSON AuditLogConfig where
        parseJSON
          = withObject "AuditLogConfig"
              (\ o ->
                 AuditLogConfig' <$>
                   (o .:? "logType") <*>
                     (o .:? "exemptedMembers" .!= mempty))

instance ToJSON AuditLogConfig where
        toJSON AuditLogConfig'{..}
          = object
              (catMaybes
                 [("logType" .=) <$> _alcLogType,
                  ("exemptedMembers" .=) <$> _alcExemptedMembers])

--
-- /See:/ 'commitmentsScopedListWarningDataItem' smart constructor.
data CommitmentsScopedListWarningDataItem = CommitmentsScopedListWarningDataItem'
    { _cslwdiValue :: !(Maybe Text)
    , _cslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentsScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cslwdiValue'
--
-- * 'cslwdiKey'
commitmentsScopedListWarningDataItem
    :: CommitmentsScopedListWarningDataItem
commitmentsScopedListWarningDataItem =
    CommitmentsScopedListWarningDataItem'
    { _cslwdiValue = Nothing
    , _cslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
cslwdiValue :: Lens' CommitmentsScopedListWarningDataItem (Maybe Text)
cslwdiValue
  = lens _cslwdiValue (\ s a -> s{_cslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
cslwdiKey :: Lens' CommitmentsScopedListWarningDataItem (Maybe Text)
cslwdiKey
  = lens _cslwdiKey (\ s a -> s{_cslwdiKey = a})

instance FromJSON
         CommitmentsScopedListWarningDataItem where
        parseJSON
          = withObject "CommitmentsScopedListWarningDataItem"
              (\ o ->
                 CommitmentsScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON CommitmentsScopedListWarningDataItem
         where
        toJSON CommitmentsScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _cslwdiValue,
                  ("key" .=) <$> _cslwdiKey])

-- | Represents an InterconnectAttachment (VLAN attachment) resource. For
-- more information, see Creating VLAN Attachments. (== resource_for
-- beta.interconnectAttachments ==) (== resource_for
-- v1.interconnectAttachments ==)
--
-- /See:/ 'interconnectAttachment' smart constructor.
data InterconnectAttachment = InterconnectAttachment'
    { _iaState                   :: !(Maybe InterconnectAttachmentState)
    , _iaPartnerASN              :: !(Maybe (Textual Int64))
    , _iaPairingKey              :: !(Maybe Text)
    , _iaKind                    :: !Text
    , _iaCustomerRouterIPAddress :: !(Maybe Text)
    , _iaPartnerMetadata         :: !(Maybe InterconnectAttachmentPartnerMetadata)
    , _iaRouter                  :: !(Maybe Text)
    , _iaOperationalStatus       :: !(Maybe InterconnectAttachmentOperationalStatus)
    , _iaSelfLink                :: !(Maybe Text)
    , _iaName                    :: !(Maybe Text)
    , _iaBandwidth               :: !(Maybe InterconnectAttachmentBandwidth)
    , _iaGoogleReferenceId       :: !(Maybe Text)
    , _iaCreationTimestamp       :: !(Maybe Text)
    , _iaEdgeAvailabilityDomain  :: !(Maybe InterconnectAttachmentEdgeAvailabilityDomain)
    , _iaInterconnect            :: !(Maybe Text)
    , _iaAdminEnabled            :: !(Maybe Bool)
    , _iaVLANTag8021q            :: !(Maybe (Textual Int32))
    , _iaCloudRouterIPAddress    :: !(Maybe Text)
    , _iaId                      :: !(Maybe (Textual Word64))
    , _iaCandidateSubnets        :: !(Maybe [Text])
    , _iaRegion                  :: !(Maybe Text)
    , _iaType                    :: !(Maybe InterconnectAttachmentType)
    , _iaDescription             :: !(Maybe Text)
    , _iaPrivateInterconnectInfo :: !(Maybe InterconnectAttachmentPrivateInfo)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachment' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iaState'
--
-- * 'iaPartnerASN'
--
-- * 'iaPairingKey'
--
-- * 'iaKind'
--
-- * 'iaCustomerRouterIPAddress'
--
-- * 'iaPartnerMetadata'
--
-- * 'iaRouter'
--
-- * 'iaOperationalStatus'
--
-- * 'iaSelfLink'
--
-- * 'iaName'
--
-- * 'iaBandwidth'
--
-- * 'iaGoogleReferenceId'
--
-- * 'iaCreationTimestamp'
--
-- * 'iaEdgeAvailabilityDomain'
--
-- * 'iaInterconnect'
--
-- * 'iaAdminEnabled'
--
-- * 'iaVLANTag8021q'
--
-- * 'iaCloudRouterIPAddress'
--
-- * 'iaId'
--
-- * 'iaCandidateSubnets'
--
-- * 'iaRegion'
--
-- * 'iaType'
--
-- * 'iaDescription'
--
-- * 'iaPrivateInterconnectInfo'
interconnectAttachment
    :: InterconnectAttachment
interconnectAttachment =
    InterconnectAttachment'
    { _iaState = Nothing
    , _iaPartnerASN = Nothing
    , _iaPairingKey = Nothing
    , _iaKind = "compute#interconnectAttachment"
    , _iaCustomerRouterIPAddress = Nothing
    , _iaPartnerMetadata = Nothing
    , _iaRouter = Nothing
    , _iaOperationalStatus = Nothing
    , _iaSelfLink = Nothing
    , _iaName = Nothing
    , _iaBandwidth = Nothing
    , _iaGoogleReferenceId = Nothing
    , _iaCreationTimestamp = Nothing
    , _iaEdgeAvailabilityDomain = Nothing
    , _iaInterconnect = Nothing
    , _iaAdminEnabled = Nothing
    , _iaVLANTag8021q = Nothing
    , _iaCloudRouterIPAddress = Nothing
    , _iaId = Nothing
    , _iaCandidateSubnets = Nothing
    , _iaRegion = Nothing
    , _iaType = Nothing
    , _iaDescription = Nothing
    , _iaPrivateInterconnectInfo = Nothing
    }

-- | [Output Only] The current state of this attachment\'s functionality.
iaState :: Lens' InterconnectAttachment (Maybe InterconnectAttachmentState)
iaState = lens _iaState (\ s a -> s{_iaState = a})

-- | Optional BGP ASN for the router that should be supplied by a layer 3
-- Partner if they configured BGP on behalf of the customer. Output only
-- for PARTNER type, input only for PARTNER_PROVIDER, not available for
-- DEDICATED.
iaPartnerASN :: Lens' InterconnectAttachment (Maybe Int64)
iaPartnerASN
  = lens _iaPartnerASN (\ s a -> s{_iaPartnerASN = a})
      . mapping _Coerce

-- | [Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not
-- present for DEDICATED]. The opaque identifier of an PARTNER attachment
-- used to initiate provisioning with a selected partner. Of the form
-- \"XXXXX\/region\/domain\"
iaPairingKey :: Lens' InterconnectAttachment (Maybe Text)
iaPairingKey
  = lens _iaPairingKey (\ s a -> s{_iaPairingKey = a})

-- | [Output Only] Type of the resource. Always
-- compute#interconnectAttachment for interconnect attachments.
iaKind :: Lens' InterconnectAttachment Text
iaKind = lens _iaKind (\ s a -> s{_iaKind = a})

-- | [Output Only] IPv4 address + prefix length to be configured on the
-- customer router subinterface for this interconnect attachment.
iaCustomerRouterIPAddress :: Lens' InterconnectAttachment (Maybe Text)
iaCustomerRouterIPAddress
  = lens _iaCustomerRouterIPAddress
      (\ s a -> s{_iaCustomerRouterIPAddress = a})

-- | Informational metadata about Partner attachments from Partners to
-- display to customers. Output only for for PARTNER type, mutable for
-- PARTNER_PROVIDER, not available for DEDICATED.
iaPartnerMetadata :: Lens' InterconnectAttachment (Maybe InterconnectAttachmentPartnerMetadata)
iaPartnerMetadata
  = lens _iaPartnerMetadata
      (\ s a -> s{_iaPartnerMetadata = a})

-- | URL of the Cloud Router to be used for dynamic routing. This router must
-- be in the same region as this InterconnectAttachment. The
-- InterconnectAttachment will automatically connect the Interconnect to
-- the network & region within which the Cloud Router is configured.
iaRouter :: Lens' InterconnectAttachment (Maybe Text)
iaRouter = lens _iaRouter (\ s a -> s{_iaRouter = a})

-- | [Output Only] The current status of whether or not this interconnect
-- attachment is functional.
iaOperationalStatus :: Lens' InterconnectAttachment (Maybe InterconnectAttachmentOperationalStatus)
iaOperationalStatus
  = lens _iaOperationalStatus
      (\ s a -> s{_iaOperationalStatus = a})

-- | [Output Only] Server-defined URL for the resource.
iaSelfLink :: Lens' InterconnectAttachment (Maybe Text)
iaSelfLink
  = lens _iaSelfLink (\ s a -> s{_iaSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
iaName :: Lens' InterconnectAttachment (Maybe Text)
iaName = lens _iaName (\ s a -> s{_iaName = a})

-- | Provisioned bandwidth capacity for the interconnectAttachment. Can be
-- set by the partner to update the customer\'s provisioned bandwidth.
-- Output only for PARTNER type, mutable for PARTNER_PROVIDER and
-- DEDICATED.
iaBandwidth :: Lens' InterconnectAttachment (Maybe InterconnectAttachmentBandwidth)
iaBandwidth
  = lens _iaBandwidth (\ s a -> s{_iaBandwidth = a})

-- | [Output Only] Google reference ID, to be used when raising support
-- tickets with Google or otherwise to debug backend connectivity issues.
iaGoogleReferenceId :: Lens' InterconnectAttachment (Maybe Text)
iaGoogleReferenceId
  = lens _iaGoogleReferenceId
      (\ s a -> s{_iaGoogleReferenceId = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
iaCreationTimestamp :: Lens' InterconnectAttachment (Maybe Text)
iaCreationTimestamp
  = lens _iaCreationTimestamp
      (\ s a -> s{_iaCreationTimestamp = a})

-- | Desired availability domain for the attachment. Only available for type
-- PARTNER, at creation time. For improved reliability, customers should
-- configure a pair of attachments with one per availability domain. The
-- selected availability domain will be provided to the Partner via the
-- pairing key so that the provisioned circuit will lie in the specified
-- domain. If not specified, the value will default to
-- AVAILABILITY_DOMAIN_ANY.
iaEdgeAvailabilityDomain :: Lens' InterconnectAttachment (Maybe InterconnectAttachmentEdgeAvailabilityDomain)
iaEdgeAvailabilityDomain
  = lens _iaEdgeAvailabilityDomain
      (\ s a -> s{_iaEdgeAvailabilityDomain = a})

-- | URL of the underlying Interconnect object that this attachment\'s
-- traffic will traverse through.
iaInterconnect :: Lens' InterconnectAttachment (Maybe Text)
iaInterconnect
  = lens _iaInterconnect
      (\ s a -> s{_iaInterconnect = a})

-- | Determines whether this Attachment will carry packets. Not present for
-- PARTNER_PROVIDER.
iaAdminEnabled :: Lens' InterconnectAttachment (Maybe Bool)
iaAdminEnabled
  = lens _iaAdminEnabled
      (\ s a -> s{_iaAdminEnabled = a})

-- | The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. Only
-- specified at creation time.
iaVLANTag8021q :: Lens' InterconnectAttachment (Maybe Int32)
iaVLANTag8021q
  = lens _iaVLANTag8021q
      (\ s a -> s{_iaVLANTag8021q = a})
      . mapping _Coerce

-- | [Output Only] IPv4 address + prefix length to be configured on Cloud
-- Router Interface for this interconnect attachment.
iaCloudRouterIPAddress :: Lens' InterconnectAttachment (Maybe Text)
iaCloudRouterIPAddress
  = lens _iaCloudRouterIPAddress
      (\ s a -> s{_iaCloudRouterIPAddress = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
iaId :: Lens' InterconnectAttachment (Maybe Word64)
iaId
  = lens _iaId (\ s a -> s{_iaId = a}) .
      mapping _Coerce

-- | Up to 16 candidate prefixes that can be used to restrict the allocation
-- of cloudRouterIpAddress and customerRouterIpAddress for this attachment.
-- All prefixes must be within link-local address space (169.254.0.0\/16)
-- and must be \/29 or shorter (\/28, \/27, etc). Google will attempt to
-- select an unused \/29 from the supplied candidate prefix(es). The
-- request will fail if all possible \/29s are in use on Google?s edge. If
-- not supplied, Google will randomly select an unused \/29 from all of
-- link-local space.
iaCandidateSubnets :: Lens' InterconnectAttachment [Text]
iaCandidateSubnets
  = lens _iaCandidateSubnets
      (\ s a -> s{_iaCandidateSubnets = a})
      . _Default
      . _Coerce

-- | [Output Only] URL of the region where the regional interconnect
-- attachment resides. You must specify this field as part of the HTTP
-- request URL. It is not settable as a field in the request body.
iaRegion :: Lens' InterconnectAttachment (Maybe Text)
iaRegion = lens _iaRegion (\ s a -> s{_iaRegion = a})

iaType :: Lens' InterconnectAttachment (Maybe InterconnectAttachmentType)
iaType = lens _iaType (\ s a -> s{_iaType = a})

-- | An optional description of this resource.
iaDescription :: Lens' InterconnectAttachment (Maybe Text)
iaDescription
  = lens _iaDescription
      (\ s a -> s{_iaDescription = a})

-- | [Output Only] Information specific to an InterconnectAttachment. This
-- property is populated if the interconnect that this is attached to is of
-- type DEDICATED.
iaPrivateInterconnectInfo :: Lens' InterconnectAttachment (Maybe InterconnectAttachmentPrivateInfo)
iaPrivateInterconnectInfo
  = lens _iaPrivateInterconnectInfo
      (\ s a -> s{_iaPrivateInterconnectInfo = a})

instance FromJSON InterconnectAttachment where
        parseJSON
          = withObject "InterconnectAttachment"
              (\ o ->
                 InterconnectAttachment' <$>
                   (o .:? "state") <*> (o .:? "partnerAsn") <*>
                     (o .:? "pairingKey")
                     <*>
                     (o .:? "kind" .!= "compute#interconnectAttachment")
                     <*> (o .:? "customerRouterIpAddress")
                     <*> (o .:? "partnerMetadata")
                     <*> (o .:? "router")
                     <*> (o .:? "operationalStatus")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "bandwidth")
                     <*> (o .:? "googleReferenceId")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "edgeAvailabilityDomain")
                     <*> (o .:? "interconnect")
                     <*> (o .:? "adminEnabled")
                     <*> (o .:? "vlanTag8021q")
                     <*> (o .:? "cloudRouterIpAddress")
                     <*> (o .:? "id")
                     <*> (o .:? "candidateSubnets" .!= mempty)
                     <*> (o .:? "region")
                     <*> (o .:? "type")
                     <*> (o .:? "description")
                     <*> (o .:? "privateInterconnectInfo"))

instance ToJSON InterconnectAttachment where
        toJSON InterconnectAttachment'{..}
          = object
              (catMaybes
                 [("state" .=) <$> _iaState,
                  ("partnerAsn" .=) <$> _iaPartnerASN,
                  ("pairingKey" .=) <$> _iaPairingKey,
                  Just ("kind" .= _iaKind),
                  ("customerRouterIpAddress" .=) <$>
                    _iaCustomerRouterIPAddress,
                  ("partnerMetadata" .=) <$> _iaPartnerMetadata,
                  ("router" .=) <$> _iaRouter,
                  ("operationalStatus" .=) <$> _iaOperationalStatus,
                  ("selfLink" .=) <$> _iaSelfLink,
                  ("name" .=) <$> _iaName,
                  ("bandwidth" .=) <$> _iaBandwidth,
                  ("googleReferenceId" .=) <$> _iaGoogleReferenceId,
                  ("creationTimestamp" .=) <$> _iaCreationTimestamp,
                  ("edgeAvailabilityDomain" .=) <$>
                    _iaEdgeAvailabilityDomain,
                  ("interconnect" .=) <$> _iaInterconnect,
                  ("adminEnabled" .=) <$> _iaAdminEnabled,
                  ("vlanTag8021q" .=) <$> _iaVLANTag8021q,
                  ("cloudRouterIpAddress" .=) <$>
                    _iaCloudRouterIPAddress,
                  ("id" .=) <$> _iaId,
                  ("candidateSubnets" .=) <$> _iaCandidateSubnets,
                  ("region" .=) <$> _iaRegion, ("type" .=) <$> _iaType,
                  ("description" .=) <$> _iaDescription,
                  ("privateInterconnectInfo" .=) <$>
                    _iaPrivateInterconnectInfo])

-- | Contains a list of instances.
--
-- /See:/ 'instanceList' smart constructor.
data InstanceList = InstanceList'
    { _insNextPageToken :: !(Maybe Text)
    , _insKind          :: !Text
    , _insItems         :: !(Maybe [Instance])
    , _insSelfLink      :: !(Maybe Text)
    , _insWarning       :: !(Maybe InstanceListWarning)
    , _insId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'insNextPageToken'
--
-- * 'insKind'
--
-- * 'insItems'
--
-- * 'insSelfLink'
--
-- * 'insWarning'
--
-- * 'insId'
instanceList
    :: InstanceList
instanceList =
    InstanceList'
    { _insNextPageToken = Nothing
    , _insKind = "compute#instanceList"
    , _insItems = Nothing
    , _insSelfLink = Nothing
    , _insWarning = Nothing
    , _insId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
insNextPageToken :: Lens' InstanceList (Maybe Text)
insNextPageToken
  = lens _insNextPageToken
      (\ s a -> s{_insNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#instanceList for lists of
-- Instance resources.
insKind :: Lens' InstanceList Text
insKind = lens _insKind (\ s a -> s{_insKind = a})

-- | A list of Instance resources.
insItems :: Lens' InstanceList [Instance]
insItems
  = lens _insItems (\ s a -> s{_insItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
insSelfLink :: Lens' InstanceList (Maybe Text)
insSelfLink
  = lens _insSelfLink (\ s a -> s{_insSelfLink = a})

-- | [Output Only] Informational warning message.
insWarning :: Lens' InstanceList (Maybe InstanceListWarning)
insWarning
  = lens _insWarning (\ s a -> s{_insWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
insId :: Lens' InstanceList (Maybe Text)
insId = lens _insId (\ s a -> s{_insId = a})

instance FromJSON InstanceList where
        parseJSON
          = withObject "InstanceList"
              (\ o ->
                 InstanceList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#instanceList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InstanceList where
        toJSON InstanceList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _insNextPageToken,
                  Just ("kind" .= _insKind),
                  ("items" .=) <$> _insItems,
                  ("selfLink" .=) <$> _insSelfLink,
                  ("warning" .=) <$> _insWarning,
                  ("id" .=) <$> _insId])

-- | The labels to set for this resource.
--
-- /See:/ 'regionSetLabelsRequestLabels' smart constructor.
newtype RegionSetLabelsRequestLabels = RegionSetLabelsRequestLabels'
    { _rslrlAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionSetLabelsRequestLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rslrlAddtional'
regionSetLabelsRequestLabels
    :: HashMap Text Text -- ^ 'rslrlAddtional'
    -> RegionSetLabelsRequestLabels
regionSetLabelsRequestLabels pRslrlAddtional_ =
    RegionSetLabelsRequestLabels'
    { _rslrlAddtional = _Coerce # pRslrlAddtional_
    }

rslrlAddtional :: Lens' RegionSetLabelsRequestLabels (HashMap Text Text)
rslrlAddtional
  = lens _rslrlAddtional
      (\ s a -> s{_rslrlAddtional = a})
      . _Coerce

instance FromJSON RegionSetLabelsRequestLabels where
        parseJSON
          = withObject "RegionSetLabelsRequestLabels"
              (\ o ->
                 RegionSetLabelsRequestLabels' <$>
                   (parseJSONObject o))

instance ToJSON RegionSetLabelsRequestLabels where
        toJSON = toJSON . _rslrlAddtional

--
-- /See:/ 'networkListWarningDataItem' smart constructor.
data NetworkListWarningDataItem = NetworkListWarningDataItem'
    { _nlwdiValue :: !(Maybe Text)
    , _nlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NetworkListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nlwdiValue'
--
-- * 'nlwdiKey'
networkListWarningDataItem
    :: NetworkListWarningDataItem
networkListWarningDataItem =
    NetworkListWarningDataItem'
    { _nlwdiValue = Nothing
    , _nlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
nlwdiValue :: Lens' NetworkListWarningDataItem (Maybe Text)
nlwdiValue
  = lens _nlwdiValue (\ s a -> s{_nlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
nlwdiKey :: Lens' NetworkListWarningDataItem (Maybe Text)
nlwdiKey = lens _nlwdiKey (\ s a -> s{_nlwdiKey = a})

instance FromJSON NetworkListWarningDataItem where
        parseJSON
          = withObject "NetworkListWarningDataItem"
              (\ o ->
                 NetworkListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON NetworkListWarningDataItem where
        toJSON NetworkListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _nlwdiValue,
                  ("key" .=) <$> _nlwdiKey])

-- | Message containing what to include in the cache key for a request for
-- Cloud CDN.
--
-- /See:/ 'cacheKeyPolicy' smart constructor.
data CacheKeyPolicy = CacheKeyPolicy'
    { _ckpQueryStringWhiteList :: !(Maybe [Text])
    , _ckpIncludeHost          :: !(Maybe Bool)
    , _ckpIncludeProtocol      :: !(Maybe Bool)
    , _ckpQueryStringBlackList :: !(Maybe [Text])
    , _ckpIncludeQueryString   :: !(Maybe Bool)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CacheKeyPolicy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ckpQueryStringWhiteList'
--
-- * 'ckpIncludeHost'
--
-- * 'ckpIncludeProtocol'
--
-- * 'ckpQueryStringBlackList'
--
-- * 'ckpIncludeQueryString'
cacheKeyPolicy
    :: CacheKeyPolicy
cacheKeyPolicy =
    CacheKeyPolicy'
    { _ckpQueryStringWhiteList = Nothing
    , _ckpIncludeHost = Nothing
    , _ckpIncludeProtocol = Nothing
    , _ckpQueryStringBlackList = Nothing
    , _ckpIncludeQueryString = Nothing
    }

-- | Names of query string parameters to include in cache keys. All other
-- parameters will be excluded. Either specify query_string_whitelist or
-- query_string_blacklist, not both. \'&\' and \'=\' will be percent
-- encoded and not treated as delimiters.
ckpQueryStringWhiteList :: Lens' CacheKeyPolicy [Text]
ckpQueryStringWhiteList
  = lens _ckpQueryStringWhiteList
      (\ s a -> s{_ckpQueryStringWhiteList = a})
      . _Default
      . _Coerce

-- | If true, requests to different hosts will be cached separately.
ckpIncludeHost :: Lens' CacheKeyPolicy (Maybe Bool)
ckpIncludeHost
  = lens _ckpIncludeHost
      (\ s a -> s{_ckpIncludeHost = a})

-- | If true, http and https requests will be cached separately.
ckpIncludeProtocol :: Lens' CacheKeyPolicy (Maybe Bool)
ckpIncludeProtocol
  = lens _ckpIncludeProtocol
      (\ s a -> s{_ckpIncludeProtocol = a})

-- | Names of query string parameters to exclude in cache keys. All other
-- parameters will be included. Either specify query_string_whitelist or
-- query_string_blacklist, not both. \'&\' and \'=\' will be percent
-- encoded and not treated as delimiters.
ckpQueryStringBlackList :: Lens' CacheKeyPolicy [Text]
ckpQueryStringBlackList
  = lens _ckpQueryStringBlackList
      (\ s a -> s{_ckpQueryStringBlackList = a})
      . _Default
      . _Coerce

-- | If true, include query string parameters in the cache key according to
-- query_string_whitelist and query_string_blacklist. If neither is set,
-- the entire query string will be included. If false, the query string
-- will be excluded from the cache key entirely.
ckpIncludeQueryString :: Lens' CacheKeyPolicy (Maybe Bool)
ckpIncludeQueryString
  = lens _ckpIncludeQueryString
      (\ s a -> s{_ckpIncludeQueryString = a})

instance FromJSON CacheKeyPolicy where
        parseJSON
          = withObject "CacheKeyPolicy"
              (\ o ->
                 CacheKeyPolicy' <$>
                   (o .:? "queryStringWhitelist" .!= mempty) <*>
                     (o .:? "includeHost")
                     <*> (o .:? "includeProtocol")
                     <*> (o .:? "queryStringBlacklist" .!= mempty)
                     <*> (o .:? "includeQueryString"))

instance ToJSON CacheKeyPolicy where
        toJSON CacheKeyPolicy'{..}
          = object
              (catMaybes
                 [("queryStringWhitelist" .=) <$>
                    _ckpQueryStringWhiteList,
                  ("includeHost" .=) <$> _ckpIncludeHost,
                  ("includeProtocol" .=) <$> _ckpIncludeProtocol,
                  ("queryStringBlacklist" .=) <$>
                    _ckpQueryStringBlackList,
                  ("includeQueryString" .=) <$>
                    _ckpIncludeQueryString])

--
-- /See:/ 'commitmentAggregatedListWarningDataItem' smart constructor.
data CommitmentAggregatedListWarningDataItem = CommitmentAggregatedListWarningDataItem'
    { _calwdiValue :: !(Maybe Text)
    , _calwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'calwdiValue'
--
-- * 'calwdiKey'
commitmentAggregatedListWarningDataItem
    :: CommitmentAggregatedListWarningDataItem
commitmentAggregatedListWarningDataItem =
    CommitmentAggregatedListWarningDataItem'
    { _calwdiValue = Nothing
    , _calwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
calwdiValue :: Lens' CommitmentAggregatedListWarningDataItem (Maybe Text)
calwdiValue
  = lens _calwdiValue (\ s a -> s{_calwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
calwdiKey :: Lens' CommitmentAggregatedListWarningDataItem (Maybe Text)
calwdiKey
  = lens _calwdiKey (\ s a -> s{_calwdiKey = a})

instance FromJSON
         CommitmentAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "CommitmentAggregatedListWarningDataItem"
              (\ o ->
                 CommitmentAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         CommitmentAggregatedListWarningDataItem where
        toJSON CommitmentAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _calwdiValue,
                  ("key" .=) <$> _calwdiKey])

--
-- /See:/ 'regionInstanceGroupListWarningDataItem' smart constructor.
data RegionInstanceGroupListWarningDataItem = RegionInstanceGroupListWarningDataItem'
    { _riglwdiValue :: !(Maybe Text)
    , _riglwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'riglwdiValue'
--
-- * 'riglwdiKey'
regionInstanceGroupListWarningDataItem
    :: RegionInstanceGroupListWarningDataItem
regionInstanceGroupListWarningDataItem =
    RegionInstanceGroupListWarningDataItem'
    { _riglwdiValue = Nothing
    , _riglwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
riglwdiValue :: Lens' RegionInstanceGroupListWarningDataItem (Maybe Text)
riglwdiValue
  = lens _riglwdiValue (\ s a -> s{_riglwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
riglwdiKey :: Lens' RegionInstanceGroupListWarningDataItem (Maybe Text)
riglwdiKey
  = lens _riglwdiKey (\ s a -> s{_riglwdiKey = a})

instance FromJSON
         RegionInstanceGroupListWarningDataItem where
        parseJSON
          = withObject "RegionInstanceGroupListWarningDataItem"
              (\ o ->
                 RegionInstanceGroupListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         RegionInstanceGroupListWarningDataItem where
        toJSON RegionInstanceGroupListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _riglwdiValue,
                  ("key" .=) <$> _riglwdiKey])

-- | A list of SubnetworksScopedList resources.
--
-- /See:/ 'subnetworkAggregatedListItems' smart constructor.
newtype SubnetworkAggregatedListItems = SubnetworkAggregatedListItems'
    { _saliAddtional :: HashMap Text SubnetworksScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SubnetworkAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'saliAddtional'
subnetworkAggregatedListItems
    :: HashMap Text SubnetworksScopedList -- ^ 'saliAddtional'
    -> SubnetworkAggregatedListItems
subnetworkAggregatedListItems pSaliAddtional_ =
    SubnetworkAggregatedListItems'
    { _saliAddtional = _Coerce # pSaliAddtional_
    }

-- | Name of the scope containing this set of Subnetworks.
saliAddtional :: Lens' SubnetworkAggregatedListItems (HashMap Text SubnetworksScopedList)
saliAddtional
  = lens _saliAddtional
      (\ s a -> s{_saliAddtional = a})
      . _Coerce

instance FromJSON SubnetworkAggregatedListItems where
        parseJSON
          = withObject "SubnetworkAggregatedListItems"
              (\ o ->
                 SubnetworkAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON SubnetworkAggregatedListItems where
        toJSON = toJSON . _saliAddtional

--
-- /See:/ 'interconnectAttachmentAggregatedListWarningDataItem' smart constructor.
data InterconnectAttachmentAggregatedListWarningDataItem = InterconnectAttachmentAggregatedListWarningDataItem'
    { _iaalwdiValue :: !(Maybe Text)
    , _iaalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iaalwdiValue'
--
-- * 'iaalwdiKey'
interconnectAttachmentAggregatedListWarningDataItem
    :: InterconnectAttachmentAggregatedListWarningDataItem
interconnectAttachmentAggregatedListWarningDataItem =
    InterconnectAttachmentAggregatedListWarningDataItem'
    { _iaalwdiValue = Nothing
    , _iaalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
iaalwdiValue :: Lens' InterconnectAttachmentAggregatedListWarningDataItem (Maybe Text)
iaalwdiValue
  = lens _iaalwdiValue (\ s a -> s{_iaalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
iaalwdiKey :: Lens' InterconnectAttachmentAggregatedListWarningDataItem (Maybe Text)
iaalwdiKey
  = lens _iaalwdiKey (\ s a -> s{_iaalwdiKey = a})

instance FromJSON
         InterconnectAttachmentAggregatedListWarningDataItem
         where
        parseJSON
          = withObject
              "InterconnectAttachmentAggregatedListWarningDataItem"
              (\ o ->
                 InterconnectAttachmentAggregatedListWarningDataItem'
                   <$> (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InterconnectAttachmentAggregatedListWarningDataItem
         where
        toJSON
          InterconnectAttachmentAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _iaalwdiValue,
                  ("key" .=) <$> _iaalwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'interconnectAttachmentListWarning' smart constructor.
data InterconnectAttachmentListWarning = InterconnectAttachmentListWarning'
    { _intData    :: !(Maybe [InterconnectAttachmentListWarningDataItem])
    , _intCode    :: !(Maybe InterconnectAttachmentListWarningCode)
    , _intMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'intData'
--
-- * 'intCode'
--
-- * 'intMessage'
interconnectAttachmentListWarning
    :: InterconnectAttachmentListWarning
interconnectAttachmentListWarning =
    InterconnectAttachmentListWarning'
    { _intData = Nothing
    , _intCode = Nothing
    , _intMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
intData :: Lens' InterconnectAttachmentListWarning [InterconnectAttachmentListWarningDataItem]
intData
  = lens _intData (\ s a -> s{_intData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
intCode :: Lens' InterconnectAttachmentListWarning (Maybe InterconnectAttachmentListWarningCode)
intCode = lens _intCode (\ s a -> s{_intCode = a})

-- | [Output Only] A human-readable description of the warning code.
intMessage :: Lens' InterconnectAttachmentListWarning (Maybe Text)
intMessage
  = lens _intMessage (\ s a -> s{_intMessage = a})

instance FromJSON InterconnectAttachmentListWarning
         where
        parseJSON
          = withObject "InterconnectAttachmentListWarning"
              (\ o ->
                 InterconnectAttachmentListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InterconnectAttachmentListWarning
         where
        toJSON InterconnectAttachmentListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _intData, ("code" .=) <$> _intCode,
                  ("message" .=) <$> _intMessage])

-- | A condition to be met.
--
-- /See:/ 'condition' smart constructor.
data Condition = Condition'
    { _cOp     :: !(Maybe ConditionOp)
    , _cIAM    :: !(Maybe ConditionIAM)
    , _cValues :: !(Maybe [Text])
    , _cValue  :: !(Maybe Text)
    , _cSys    :: !(Maybe ConditionSys)
    , _cSvc    :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Condition' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cOp'
--
-- * 'cIAM'
--
-- * 'cValues'
--
-- * 'cValue'
--
-- * 'cSys'
--
-- * 'cSvc'
condition
    :: Condition
condition =
    Condition'
    { _cOp = Nothing
    , _cIAM = Nothing
    , _cValues = Nothing
    , _cValue = Nothing
    , _cSys = Nothing
    , _cSvc = Nothing
    }

-- | An operator to apply the subject with.
cOp :: Lens' Condition (Maybe ConditionOp)
cOp = lens _cOp (\ s a -> s{_cOp = a})

-- | Trusted attributes supplied by the IAM system.
cIAM :: Lens' Condition (Maybe ConditionIAM)
cIAM = lens _cIAM (\ s a -> s{_cIAM = a})

-- | The objects of the condition. This is mutually exclusive with \'value\'.
cValues :: Lens' Condition [Text]
cValues
  = lens _cValues (\ s a -> s{_cValues = a}) . _Default
      . _Coerce

-- | DEPRECATED. Use \'values\' instead.
cValue :: Lens' Condition (Maybe Text)
cValue = lens _cValue (\ s a -> s{_cValue = a})

-- | Trusted attributes supplied by any service that owns resources and uses
-- the IAM system for access control.
cSys :: Lens' Condition (Maybe ConditionSys)
cSys = lens _cSys (\ s a -> s{_cSys = a})

-- | Trusted attributes discharged by the service.
cSvc :: Lens' Condition (Maybe Text)
cSvc = lens _cSvc (\ s a -> s{_cSvc = a})

instance FromJSON Condition where
        parseJSON
          = withObject "Condition"
              (\ o ->
                 Condition' <$>
                   (o .:? "op") <*> (o .:? "iam") <*>
                     (o .:? "values" .!= mempty)
                     <*> (o .:? "value")
                     <*> (o .:? "sys")
                     <*> (o .:? "svc"))

instance ToJSON Condition where
        toJSON Condition'{..}
          = object
              (catMaybes
                 [("op" .=) <$> _cOp, ("iam" .=) <$> _cIAM,
                  ("values" .=) <$> _cValues, ("value" .=) <$> _cValue,
                  ("sys" .=) <$> _cSys, ("svc" .=) <$> _cSvc])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'addressAggregatedListWarning' smart constructor.
data AddressAggregatedListWarning = AddressAggregatedListWarning'
    { _addData    :: !(Maybe [AddressAggregatedListWarningDataItem])
    , _addCode    :: !(Maybe AddressAggregatedListWarningCode)
    , _addMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'addData'
--
-- * 'addCode'
--
-- * 'addMessage'
addressAggregatedListWarning
    :: AddressAggregatedListWarning
addressAggregatedListWarning =
    AddressAggregatedListWarning'
    { _addData = Nothing
    , _addCode = Nothing
    , _addMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
addData :: Lens' AddressAggregatedListWarning [AddressAggregatedListWarningDataItem]
addData
  = lens _addData (\ s a -> s{_addData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
addCode :: Lens' AddressAggregatedListWarning (Maybe AddressAggregatedListWarningCode)
addCode = lens _addCode (\ s a -> s{_addCode = a})

-- | [Output Only] A human-readable description of the warning code.
addMessage :: Lens' AddressAggregatedListWarning (Maybe Text)
addMessage
  = lens _addMessage (\ s a -> s{_addMessage = a})

instance FromJSON AddressAggregatedListWarning where
        parseJSON
          = withObject "AddressAggregatedListWarning"
              (\ o ->
                 AddressAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AddressAggregatedListWarning where
        toJSON AddressAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _addData, ("code" .=) <$> _addCode,
                  ("message" .=) <$> _addMessage])

--
-- /See:/ 'managedInstanceLastAttempt' smart constructor.
newtype ManagedInstanceLastAttempt = ManagedInstanceLastAttempt'
    { _milaErrors :: Maybe ManagedInstanceLastAttemptErrors
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ManagedInstanceLastAttempt' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'milaErrors'
managedInstanceLastAttempt
    :: ManagedInstanceLastAttempt
managedInstanceLastAttempt =
    ManagedInstanceLastAttempt'
    { _milaErrors = Nothing
    }

-- | [Output Only] Encountered errors during the last attempt to create or
-- delete the instance.
milaErrors :: Lens' ManagedInstanceLastAttempt (Maybe ManagedInstanceLastAttemptErrors)
milaErrors
  = lens _milaErrors (\ s a -> s{_milaErrors = a})

instance FromJSON ManagedInstanceLastAttempt where
        parseJSON
          = withObject "ManagedInstanceLastAttempt"
              (\ o ->
                 ManagedInstanceLastAttempt' <$> (o .:? "errors"))

instance ToJSON ManagedInstanceLastAttempt where
        toJSON ManagedInstanceLastAttempt'{..}
          = object (catMaybes [("errors" .=) <$> _milaErrors])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'licensesListResponseWarning' smart constructor.
data LicensesListResponseWarning = LicensesListResponseWarning'
    { _llrwData    :: !(Maybe [LicensesListResponseWarningDataItem])
    , _llrwCode    :: !(Maybe LicensesListResponseWarningCode)
    , _llrwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LicensesListResponseWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'llrwData'
--
-- * 'llrwCode'
--
-- * 'llrwMessage'
licensesListResponseWarning
    :: LicensesListResponseWarning
licensesListResponseWarning =
    LicensesListResponseWarning'
    { _llrwData = Nothing
    , _llrwCode = Nothing
    , _llrwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
llrwData :: Lens' LicensesListResponseWarning [LicensesListResponseWarningDataItem]
llrwData
  = lens _llrwData (\ s a -> s{_llrwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
llrwCode :: Lens' LicensesListResponseWarning (Maybe LicensesListResponseWarningCode)
llrwCode = lens _llrwCode (\ s a -> s{_llrwCode = a})

-- | [Output Only] A human-readable description of the warning code.
llrwMessage :: Lens' LicensesListResponseWarning (Maybe Text)
llrwMessage
  = lens _llrwMessage (\ s a -> s{_llrwMessage = a})

instance FromJSON LicensesListResponseWarning where
        parseJSON
          = withObject "LicensesListResponseWarning"
              (\ o ->
                 LicensesListResponseWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON LicensesListResponseWarning where
        toJSON LicensesListResponseWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _llrwData,
                  ("code" .=) <$> _llrwCode,
                  ("message" .=) <$> _llrwMessage])

--
-- /See:/ 'autoscalerStatusDetails' smart constructor.
data AutoscalerStatusDetails = AutoscalerStatusDetails'
    { _asdType    :: !(Maybe AutoscalerStatusDetailsType)
    , _asdMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalerStatusDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'asdType'
--
-- * 'asdMessage'
autoscalerStatusDetails
    :: AutoscalerStatusDetails
autoscalerStatusDetails =
    AutoscalerStatusDetails'
    { _asdType = Nothing
    , _asdMessage = Nothing
    }

-- | The type of error returned.
asdType :: Lens' AutoscalerStatusDetails (Maybe AutoscalerStatusDetailsType)
asdType = lens _asdType (\ s a -> s{_asdType = a})

-- | The status message.
asdMessage :: Lens' AutoscalerStatusDetails (Maybe Text)
asdMessage
  = lens _asdMessage (\ s a -> s{_asdMessage = a})

instance FromJSON AutoscalerStatusDetails where
        parseJSON
          = withObject "AutoscalerStatusDetails"
              (\ o ->
                 AutoscalerStatusDetails' <$>
                   (o .:? "type") <*> (o .:? "message"))

instance ToJSON AutoscalerStatusDetails where
        toJSON AutoscalerStatusDetails'{..}
          = object
              (catMaybes
                 [("type" .=) <$> _asdType,
                  ("message" .=) <$> _asdMessage])

-- | Contains a list of BackendService resources.
--
-- /See:/ 'backendServiceList' smart constructor.
data BackendServiceList = BackendServiceList'
    { _bslNextPageToken :: !(Maybe Text)
    , _bslKind          :: !Text
    , _bslItems         :: !(Maybe [BackendService])
    , _bslSelfLink      :: !(Maybe Text)
    , _bslWarning       :: !(Maybe BackendServiceListWarning)
    , _bslId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bslNextPageToken'
--
-- * 'bslKind'
--
-- * 'bslItems'
--
-- * 'bslSelfLink'
--
-- * 'bslWarning'
--
-- * 'bslId'
backendServiceList
    :: BackendServiceList
backendServiceList =
    BackendServiceList'
    { _bslNextPageToken = Nothing
    , _bslKind = "compute#backendServiceList"
    , _bslItems = Nothing
    , _bslSelfLink = Nothing
    , _bslWarning = Nothing
    , _bslId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
bslNextPageToken :: Lens' BackendServiceList (Maybe Text)
bslNextPageToken
  = lens _bslNextPageToken
      (\ s a -> s{_bslNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#backendServiceList for
-- lists of backend services.
bslKind :: Lens' BackendServiceList Text
bslKind = lens _bslKind (\ s a -> s{_bslKind = a})

-- | A list of BackendService resources.
bslItems :: Lens' BackendServiceList [BackendService]
bslItems
  = lens _bslItems (\ s a -> s{_bslItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
bslSelfLink :: Lens' BackendServiceList (Maybe Text)
bslSelfLink
  = lens _bslSelfLink (\ s a -> s{_bslSelfLink = a})

-- | [Output Only] Informational warning message.
bslWarning :: Lens' BackendServiceList (Maybe BackendServiceListWarning)
bslWarning
  = lens _bslWarning (\ s a -> s{_bslWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
bslId :: Lens' BackendServiceList (Maybe Text)
bslId = lens _bslId (\ s a -> s{_bslId = a})

instance FromJSON BackendServiceList where
        parseJSON
          = withObject "BackendServiceList"
              (\ o ->
                 BackendServiceList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#backendServiceList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON BackendServiceList where
        toJSON BackendServiceList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _bslNextPageToken,
                  Just ("kind" .= _bslKind),
                  ("items" .=) <$> _bslItems,
                  ("selfLink" .=) <$> _bslSelfLink,
                  ("warning" .=) <$> _bslWarning,
                  ("id" .=) <$> _bslId])

--
-- /See:/ 'xpnHostListWarningDataItem' smart constructor.
data XpnHostListWarningDataItem = XpnHostListWarningDataItem'
    { _xhlwdiValue :: !(Maybe Text)
    , _xhlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'XpnHostListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'xhlwdiValue'
--
-- * 'xhlwdiKey'
xpnHostListWarningDataItem
    :: XpnHostListWarningDataItem
xpnHostListWarningDataItem =
    XpnHostListWarningDataItem'
    { _xhlwdiValue = Nothing
    , _xhlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
xhlwdiValue :: Lens' XpnHostListWarningDataItem (Maybe Text)
xhlwdiValue
  = lens _xhlwdiValue (\ s a -> s{_xhlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
xhlwdiKey :: Lens' XpnHostListWarningDataItem (Maybe Text)
xhlwdiKey
  = lens _xhlwdiKey (\ s a -> s{_xhlwdiKey = a})

instance FromJSON XpnHostListWarningDataItem where
        parseJSON
          = withObject "XpnHostListWarningDataItem"
              (\ o ->
                 XpnHostListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON XpnHostListWarningDataItem where
        toJSON XpnHostListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _xhlwdiValue,
                  ("key" .=) <$> _xhlwdiKey])

--
-- /See:/ 'zoneListWarningDataItem' smart constructor.
data ZoneListWarningDataItem = ZoneListWarningDataItem'
    { _zlwdiValue :: !(Maybe Text)
    , _zlwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ZoneListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zlwdiValue'
--
-- * 'zlwdiKey'
zoneListWarningDataItem
    :: ZoneListWarningDataItem
zoneListWarningDataItem =
    ZoneListWarningDataItem'
    { _zlwdiValue = Nothing
    , _zlwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
zlwdiValue :: Lens' ZoneListWarningDataItem (Maybe Text)
zlwdiValue
  = lens _zlwdiValue (\ s a -> s{_zlwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
zlwdiKey :: Lens' ZoneListWarningDataItem (Maybe Text)
zlwdiKey = lens _zlwdiKey (\ s a -> s{_zlwdiKey = a})

instance FromJSON ZoneListWarningDataItem where
        parseJSON
          = withObject "ZoneListWarningDataItem"
              (\ o ->
                 ZoneListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON ZoneListWarningDataItem where
        toJSON ZoneListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _zlwdiValue,
                  ("key" .=) <$> _zlwdiKey])

--
-- /See:/ 'regionSetPolicyRequest' smart constructor.
data RegionSetPolicyRequest = RegionSetPolicyRequest'
    { _rsprEtag     :: !(Maybe Bytes)
    , _rsprBindings :: !(Maybe [Binding])
    , _rsprPolicy   :: !(Maybe Policy)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionSetPolicyRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rsprEtag'
--
-- * 'rsprBindings'
--
-- * 'rsprPolicy'
regionSetPolicyRequest
    :: RegionSetPolicyRequest
regionSetPolicyRequest =
    RegionSetPolicyRequest'
    { _rsprEtag = Nothing
    , _rsprBindings = Nothing
    , _rsprPolicy = Nothing
    }

-- | Flatten Policy to create a backward compatible wire-format. Deprecated.
-- Use \'policy\' to specify the etag.
rsprEtag :: Lens' RegionSetPolicyRequest (Maybe ByteString)
rsprEtag
  = lens _rsprEtag (\ s a -> s{_rsprEtag = a}) .
      mapping _Bytes

-- | Flatten Policy to create a backwacd compatible wire-format. Deprecated.
-- Use \'policy\' to specify bindings.
rsprBindings :: Lens' RegionSetPolicyRequest [Binding]
rsprBindings
  = lens _rsprBindings (\ s a -> s{_rsprBindings = a})
      . _Default
      . _Coerce

-- | REQUIRED: The complete policy to be applied to the \'resource\'. The
-- size of the policy is limited to a few 10s of KB. An empty policy is in
-- general a valid policy but certain services (like Projects) might reject
-- them.
rsprPolicy :: Lens' RegionSetPolicyRequest (Maybe Policy)
rsprPolicy
  = lens _rsprPolicy (\ s a -> s{_rsprPolicy = a})

instance FromJSON RegionSetPolicyRequest where
        parseJSON
          = withObject "RegionSetPolicyRequest"
              (\ o ->
                 RegionSetPolicyRequest' <$>
                   (o .:? "etag") <*> (o .:? "bindings" .!= mempty) <*>
                     (o .:? "policy"))

instance ToJSON RegionSetPolicyRequest where
        toJSON RegionSetPolicyRequest'{..}
          = object
              (catMaybes
                 [("etag" .=) <$> _rsprEtag,
                  ("bindings" .=) <$> _rsprBindings,
                  ("policy" .=) <$> _rsprPolicy])

-- | [Output Only] An informational warning that replaces the list of
-- instance groups when the list is empty.
--
-- /See:/ 'instanceGroupsScopedListWarning' smart constructor.
data InstanceGroupsScopedListWarning = InstanceGroupsScopedListWarning'
    { _igslwData    :: !(Maybe [InstanceGroupsScopedListWarningDataItem])
    , _igslwCode    :: !(Maybe InstanceGroupsScopedListWarningCode)
    , _igslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igslwData'
--
-- * 'igslwCode'
--
-- * 'igslwMessage'
instanceGroupsScopedListWarning
    :: InstanceGroupsScopedListWarning
instanceGroupsScopedListWarning =
    InstanceGroupsScopedListWarning'
    { _igslwData = Nothing
    , _igslwCode = Nothing
    , _igslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
igslwData :: Lens' InstanceGroupsScopedListWarning [InstanceGroupsScopedListWarningDataItem]
igslwData
  = lens _igslwData (\ s a -> s{_igslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
igslwCode :: Lens' InstanceGroupsScopedListWarning (Maybe InstanceGroupsScopedListWarningCode)
igslwCode
  = lens _igslwCode (\ s a -> s{_igslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
igslwMessage :: Lens' InstanceGroupsScopedListWarning (Maybe Text)
igslwMessage
  = lens _igslwMessage (\ s a -> s{_igslwMessage = a})

instance FromJSON InstanceGroupsScopedListWarning
         where
        parseJSON
          = withObject "InstanceGroupsScopedListWarning"
              (\ o ->
                 InstanceGroupsScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceGroupsScopedListWarning where
        toJSON InstanceGroupsScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _igslwData,
                  ("code" .=) <$> _igslwCode,
                  ("message" .=) <$> _igslwMessage])

-- | CPU utilization policy.
--
-- /See:/ 'autoscalingPolicyCPUUtilization' smart constructor.
newtype AutoscalingPolicyCPUUtilization = AutoscalingPolicyCPUUtilization'
    { _apcuUtilizationTarget :: Maybe (Textual Double)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AutoscalingPolicyCPUUtilization' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'apcuUtilizationTarget'
autoscalingPolicyCPUUtilization
    :: AutoscalingPolicyCPUUtilization
autoscalingPolicyCPUUtilization =
    AutoscalingPolicyCPUUtilization'
    { _apcuUtilizationTarget = Nothing
    }

-- | The target CPU utilization that the autoscaler should maintain. Must be
-- a float value in the range (0, 1]. If not specified, the default is 0.6.
-- If the CPU level is below the target utilization, the autoscaler scales
-- down the number of instances until it reaches the minimum number of
-- instances you specified or until the average CPU of your instances
-- reaches the target utilization. If the average CPU is above the target
-- utilization, the autoscaler scales up until it reaches the maximum
-- number of instances you specified or until the average utilization
-- reaches the target utilization.
apcuUtilizationTarget :: Lens' AutoscalingPolicyCPUUtilization (Maybe Double)
apcuUtilizationTarget
  = lens _apcuUtilizationTarget
      (\ s a -> s{_apcuUtilizationTarget = a})
      . mapping _Coerce

instance FromJSON AutoscalingPolicyCPUUtilization
         where
        parseJSON
          = withObject "AutoscalingPolicyCPUUtilization"
              (\ o ->
                 AutoscalingPolicyCPUUtilization' <$>
                   (o .:? "utilizationTarget"))

instance ToJSON AutoscalingPolicyCPUUtilization where
        toJSON AutoscalingPolicyCPUUtilization'{..}
          = object
              (catMaybes
                 [("utilizationTarget" .=) <$>
                    _apcuUtilizationTarget])

--
-- /See:/ 'instanceGroupsScopedListWarningDataItem' smart constructor.
data InstanceGroupsScopedListWarningDataItem = InstanceGroupsScopedListWarningDataItem'
    { _igslwdiValue :: !(Maybe Text)
    , _igslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igslwdiValue'
--
-- * 'igslwdiKey'
instanceGroupsScopedListWarningDataItem
    :: InstanceGroupsScopedListWarningDataItem
instanceGroupsScopedListWarningDataItem =
    InstanceGroupsScopedListWarningDataItem'
    { _igslwdiValue = Nothing
    , _igslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
igslwdiValue :: Lens' InstanceGroupsScopedListWarningDataItem (Maybe Text)
igslwdiValue
  = lens _igslwdiValue (\ s a -> s{_igslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
igslwdiKey :: Lens' InstanceGroupsScopedListWarningDataItem (Maybe Text)
igslwdiKey
  = lens _igslwdiKey (\ s a -> s{_igslwdiKey = a})

instance FromJSON
         InstanceGroupsScopedListWarningDataItem where
        parseJSON
          = withObject
              "InstanceGroupsScopedListWarningDataItem"
              (\ o ->
                 InstanceGroupsScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InstanceGroupsScopedListWarningDataItem where
        toJSON InstanceGroupsScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _igslwdiValue,
                  ("key" .=) <$> _igslwdiKey])

--
-- /See:/ 'securityPolicyRuleMatcherConfig' smart constructor.
newtype SecurityPolicyRuleMatcherConfig = SecurityPolicyRuleMatcherConfig'
    { _sprmcSrcIPRanges :: Maybe [Text]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SecurityPolicyRuleMatcherConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sprmcSrcIPRanges'
securityPolicyRuleMatcherConfig
    :: SecurityPolicyRuleMatcherConfig
securityPolicyRuleMatcherConfig =
    SecurityPolicyRuleMatcherConfig'
    { _sprmcSrcIPRanges = Nothing
    }

-- | CIDR IP address range.
sprmcSrcIPRanges :: Lens' SecurityPolicyRuleMatcherConfig [Text]
sprmcSrcIPRanges
  = lens _sprmcSrcIPRanges
      (\ s a -> s{_sprmcSrcIPRanges = a})
      . _Default
      . _Coerce

instance FromJSON SecurityPolicyRuleMatcherConfig
         where
        parseJSON
          = withObject "SecurityPolicyRuleMatcherConfig"
              (\ o ->
                 SecurityPolicyRuleMatcherConfig' <$>
                   (o .:? "srcIpRanges" .!= mempty))

instance ToJSON SecurityPolicyRuleMatcherConfig where
        toJSON SecurityPolicyRuleMatcherConfig'{..}
          = object
              (catMaybes
                 [("srcIpRanges" .=) <$> _sprmcSrcIPRanges])

--
-- /See:/ 'licensesListResponseWarningDataItem' smart constructor.
data LicensesListResponseWarningDataItem = LicensesListResponseWarningDataItem'
    { _llrwdiValue :: !(Maybe Text)
    , _llrwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LicensesListResponseWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'llrwdiValue'
--
-- * 'llrwdiKey'
licensesListResponseWarningDataItem
    :: LicensesListResponseWarningDataItem
licensesListResponseWarningDataItem =
    LicensesListResponseWarningDataItem'
    { _llrwdiValue = Nothing
    , _llrwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
llrwdiValue :: Lens' LicensesListResponseWarningDataItem (Maybe Text)
llrwdiValue
  = lens _llrwdiValue (\ s a -> s{_llrwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
llrwdiKey :: Lens' LicensesListResponseWarningDataItem (Maybe Text)
llrwdiKey
  = lens _llrwdiKey (\ s a -> s{_llrwdiKey = a})

instance FromJSON LicensesListResponseWarningDataItem
         where
        parseJSON
          = withObject "LicensesListResponseWarningDataItem"
              (\ o ->
                 LicensesListResponseWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON LicensesListResponseWarningDataItem
         where
        toJSON LicensesListResponseWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _llrwdiValue,
                  ("key" .=) <$> _llrwdiKey])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'xpnHostListWarning' smart constructor.
data XpnHostListWarning = XpnHostListWarning'
    { _xhlwData    :: !(Maybe [XpnHostListWarningDataItem])
    , _xhlwCode    :: !(Maybe XpnHostListWarningCode)
    , _xhlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'XpnHostListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'xhlwData'
--
-- * 'xhlwCode'
--
-- * 'xhlwMessage'
xpnHostListWarning
    :: XpnHostListWarning
xpnHostListWarning =
    XpnHostListWarning'
    { _xhlwData = Nothing
    , _xhlwCode = Nothing
    , _xhlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
xhlwData :: Lens' XpnHostListWarning [XpnHostListWarningDataItem]
xhlwData
  = lens _xhlwData (\ s a -> s{_xhlwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
xhlwCode :: Lens' XpnHostListWarning (Maybe XpnHostListWarningCode)
xhlwCode = lens _xhlwCode (\ s a -> s{_xhlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
xhlwMessage :: Lens' XpnHostListWarning (Maybe Text)
xhlwMessage
  = lens _xhlwMessage (\ s a -> s{_xhlwMessage = a})

instance FromJSON XpnHostListWarning where
        parseJSON
          = withObject "XpnHostListWarning"
              (\ o ->
                 XpnHostListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON XpnHostListWarning where
        toJSON XpnHostListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _xhlwData,
                  ("code" .=) <$> _xhlwCode,
                  ("message" .=) <$> _xhlwMessage])

--
-- /See:/ 'resourceGroupReference' smart constructor.
newtype ResourceGroupReference = ResourceGroupReference'
    { _rgrGroup :: Maybe Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ResourceGroupReference' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rgrGroup'
resourceGroupReference
    :: ResourceGroupReference
resourceGroupReference =
    ResourceGroupReference'
    { _rgrGroup = Nothing
    }

-- | A URI referencing one of the instance groups or network endpoint groups
-- listed in the backend service.
rgrGroup :: Lens' ResourceGroupReference (Maybe Text)
rgrGroup = lens _rgrGroup (\ s a -> s{_rgrGroup = a})

instance FromJSON ResourceGroupReference where
        parseJSON
          = withObject "ResourceGroupReference"
              (\ o -> ResourceGroupReference' <$> (o .:? "group"))

instance ToJSON ResourceGroupReference where
        toJSON ResourceGroupReference'{..}
          = object (catMaybes [("group" .=) <$> _rgrGroup])

-- | Contains a list of VmEndpointNatMappings.
--
-- /See:/ 'vMEndpointNATMAppingsList' smart constructor.
data VMEndpointNATMAppingsList = VMEndpointNATMAppingsList'
    { _vmenatmalNextPageToken :: !(Maybe Text)
    , _vmenatmalKind          :: !Text
    , _vmenatmalResult        :: !(Maybe [VMEndpointNATMAppings])
    , _vmenatmalSelfLink      :: !(Maybe Text)
    , _vmenatmalWarning       :: !(Maybe VMEndpointNATMAppingsListWarning)
    , _vmenatmalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VMEndpointNATMAppingsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vmenatmalNextPageToken'
--
-- * 'vmenatmalKind'
--
-- * 'vmenatmalResult'
--
-- * 'vmenatmalSelfLink'
--
-- * 'vmenatmalWarning'
--
-- * 'vmenatmalId'
vMEndpointNATMAppingsList
    :: VMEndpointNATMAppingsList
vMEndpointNATMAppingsList =
    VMEndpointNATMAppingsList'
    { _vmenatmalNextPageToken = Nothing
    , _vmenatmalKind = "compute#vmEndpointNatMappingsList"
    , _vmenatmalResult = Nothing
    , _vmenatmalSelfLink = Nothing
    , _vmenatmalWarning = Nothing
    , _vmenatmalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
vmenatmalNextPageToken :: Lens' VMEndpointNATMAppingsList (Maybe Text)
vmenatmalNextPageToken
  = lens _vmenatmalNextPageToken
      (\ s a -> s{_vmenatmalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#vmEndpointNatMappingsList
-- for lists of Nat mappings of VM endpoints.
vmenatmalKind :: Lens' VMEndpointNATMAppingsList Text
vmenatmalKind
  = lens _vmenatmalKind
      (\ s a -> s{_vmenatmalKind = a})

-- | [Output Only] A list of Nat mapping information of VM endpoints.
vmenatmalResult :: Lens' VMEndpointNATMAppingsList [VMEndpointNATMAppings]
vmenatmalResult
  = lens _vmenatmalResult
      (\ s a -> s{_vmenatmalResult = a})
      . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
vmenatmalSelfLink :: Lens' VMEndpointNATMAppingsList (Maybe Text)
vmenatmalSelfLink
  = lens _vmenatmalSelfLink
      (\ s a -> s{_vmenatmalSelfLink = a})

-- | [Output Only] Informational warning message.
vmenatmalWarning :: Lens' VMEndpointNATMAppingsList (Maybe VMEndpointNATMAppingsListWarning)
vmenatmalWarning
  = lens _vmenatmalWarning
      (\ s a -> s{_vmenatmalWarning = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
vmenatmalId :: Lens' VMEndpointNATMAppingsList (Maybe Text)
vmenatmalId
  = lens _vmenatmalId (\ s a -> s{_vmenatmalId = a})

instance FromJSON VMEndpointNATMAppingsList where
        parseJSON
          = withObject "VMEndpointNATMAppingsList"
              (\ o ->
                 VMEndpointNATMAppingsList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#vmEndpointNatMappingsList")
                     <*> (o .:? "result" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON VMEndpointNATMAppingsList where
        toJSON VMEndpointNATMAppingsList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _vmenatmalNextPageToken,
                  Just ("kind" .= _vmenatmalKind),
                  ("result" .=) <$> _vmenatmalResult,
                  ("selfLink" .=) <$> _vmenatmalSelfLink,
                  ("warning" .=) <$> _vmenatmalWarning,
                  ("id" .=) <$> _vmenatmalId])

-- | Represents a Firewall resource.
--
-- /See:/ 'firewall' smart constructor.
data Firewall = Firewall'
    { _fSourceTags            :: !(Maybe [Text])
    , _fSourceServiceAccounts :: !(Maybe [Text])
    , _fPriority              :: !(Maybe (Textual Int32))
    , _fDirection             :: !(Maybe FirewallDirection)
    , _fKind                  :: !Text
    , _fDisabled              :: !(Maybe Bool)
    , _fTargetTags            :: !(Maybe [Text])
    , _fNetwork               :: !(Maybe Text)
    , _fSourceRanges          :: !(Maybe [Text])
    , _fSelfLink              :: !(Maybe Text)
    , _fName                  :: !(Maybe Text)
    , _fDenied                :: !(Maybe [FirewallDeniedItem])
    , _fCreationTimestamp     :: !(Maybe Text)
    , _fId                    :: !(Maybe (Textual Word64))
    , _fAllowed               :: !(Maybe [FirewallAllowedItem])
    , _fDestinationRanges     :: !(Maybe [Text])
    , _fLogConfig             :: !(Maybe FirewallLogConfig)
    , _fTargetServiceAccounts :: !(Maybe [Text])
    , _fDescription           :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Firewall' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'fSourceTags'
--
-- * 'fSourceServiceAccounts'
--
-- * 'fPriority'
--
-- * 'fDirection'
--
-- * 'fKind'
--
-- * 'fDisabled'
--
-- * 'fTargetTags'
--
-- * 'fNetwork'
--
-- * 'fSourceRanges'
--
-- * 'fSelfLink'
--
-- * 'fName'
--
-- * 'fDenied'
--
-- * 'fCreationTimestamp'
--
-- * 'fId'
--
-- * 'fAllowed'
--
-- * 'fDestinationRanges'
--
-- * 'fLogConfig'
--
-- * 'fTargetServiceAccounts'
--
-- * 'fDescription'
firewall
    :: Firewall
firewall =
    Firewall'
    { _fSourceTags = Nothing
    , _fSourceServiceAccounts = Nothing
    , _fPriority = Nothing
    , _fDirection = Nothing
    , _fKind = "compute#firewall"
    , _fDisabled = Nothing
    , _fTargetTags = Nothing
    , _fNetwork = Nothing
    , _fSourceRanges = Nothing
    , _fSelfLink = Nothing
    , _fName = Nothing
    , _fDenied = Nothing
    , _fCreationTimestamp = Nothing
    , _fId = Nothing
    , _fAllowed = Nothing
    , _fDestinationRanges = Nothing
    , _fLogConfig = Nothing
    , _fTargetServiceAccounts = Nothing
    , _fDescription = Nothing
    }

-- | If source tags are specified, the firewall rule applies only to traffic
-- with source IPs that match the primary network interfaces of VM
-- instances that have the tag and are in the same VPC network. Source tags
-- cannot be used to control traffic to an instance\'s external IP address,
-- it only applies to traffic between instances in the same virtual
-- network. Because tags are associated with instances, not IP addresses.
-- One or both of sourceRanges and sourceTags may be set. If both
-- properties are set, the firewall will apply to traffic that has source
-- IP address within sourceRanges OR the source IP that belongs to a tag
-- listed in the sourceTags property. The connection does not need to match
-- both properties for the firewall to apply.
fSourceTags :: Lens' Firewall [Text]
fSourceTags
  = lens _fSourceTags (\ s a -> s{_fSourceTags = a}) .
      _Default
      . _Coerce

-- | If source service accounts are specified, the firewall will apply only
-- to traffic originating from an instance with a service account in this
-- list. Source service accounts cannot be used to control traffic to an
-- instance\'s external IP address because service accounts are associated
-- with an instance, not an IP address. sourceRanges can be set at the same
-- time as sourceServiceAccounts. If both are set, the firewall will apply
-- to traffic that has source IP address within sourceRanges OR the source
-- IP belongs to an instance with service account listed in
-- sourceServiceAccount. The connection does not need to match both
-- properties for the firewall to apply. sourceServiceAccounts cannot be
-- used at the same time as sourceTags or targetTags.
fSourceServiceAccounts :: Lens' Firewall [Text]
fSourceServiceAccounts
  = lens _fSourceServiceAccounts
      (\ s a -> s{_fSourceServiceAccounts = a})
      . _Default
      . _Coerce

-- | Priority for this rule. This is an integer between 0 and 65535, both
-- inclusive. When not specified, the value assumed is 1000. Relative
-- priorities determine precedence of conflicting rules. Lower value of
-- priority implies higher precedence (eg, a rule with priority 0 has
-- higher precedence than a rule with priority 1). DENY rules take
-- precedence over ALLOW rules having equal priority.
fPriority :: Lens' Firewall (Maybe Int32)
fPriority
  = lens _fPriority (\ s a -> s{_fPriority = a}) .
      mapping _Coerce

-- | Direction of traffic to which this firewall applies; default is INGRESS.
-- Note: For INGRESS traffic, it is NOT supported to specify
-- destinationRanges; For EGRESS traffic, it is NOT supported to specify
-- sourceRanges OR sourceTags.
fDirection :: Lens' Firewall (Maybe FirewallDirection)
fDirection
  = lens _fDirection (\ s a -> s{_fDirection = a})

-- | [Output Only] Type of the resource. Always compute#firewall for firewall
-- rules.
fKind :: Lens' Firewall Text
fKind = lens _fKind (\ s a -> s{_fKind = a})

-- | Denotes whether the firewall rule is disabled, i.e not applied to the
-- network it is associated with. When set to true, the firewall rule is
-- not enforced and the network behaves as if it did not exist. If this is
-- unspecified, the firewall rule will be enabled.
fDisabled :: Lens' Firewall (Maybe Bool)
fDisabled
  = lens _fDisabled (\ s a -> s{_fDisabled = a})

-- | A list of tags that controls which instances the firewall rule applies
-- to. If targetTags are specified, then the firewall rule applies only to
-- instances in the VPC network that have one of those tags. If no
-- targetTags are specified, the firewall rule applies to all instances on
-- the specified network.
fTargetTags :: Lens' Firewall [Text]
fTargetTags
  = lens _fTargetTags (\ s a -> s{_fTargetTags = a}) .
      _Default
      . _Coerce

-- | URL of the network resource for this firewall rule. If not specified
-- when creating a firewall rule, the default network is used:
-- global\/networks\/default If you choose to specify this property, you
-- can specify the network as a full or partial URL. For example, the
-- following are all valid URLs: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/myproject\/global\/networks\/my-network
-- - projects\/myproject\/global\/networks\/my-network -
-- global\/networks\/default
fNetwork :: Lens' Firewall (Maybe Text)
fNetwork = lens _fNetwork (\ s a -> s{_fNetwork = a})

-- | If source ranges are specified, the firewall will apply only to traffic
-- that has source IP address in these ranges. These ranges must be
-- expressed in CIDR format. One or both of sourceRanges and sourceTags may
-- be set. If both properties are set, the firewall will apply to traffic
-- that has source IP address within sourceRanges OR the source IP that
-- belongs to a tag listed in the sourceTags property. The connection does
-- not need to match both properties for the firewall to apply. Only IPv4
-- is supported.
fSourceRanges :: Lens' Firewall [Text]
fSourceRanges
  = lens _fSourceRanges
      (\ s a -> s{_fSourceRanges = a})
      . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for the resource.
fSelfLink :: Lens' Firewall (Maybe Text)
fSelfLink
  = lens _fSelfLink (\ s a -> s{_fSelfLink = a})

-- | Name of the resource; provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
fName :: Lens' Firewall (Maybe Text)
fName = lens _fName (\ s a -> s{_fName = a})

-- | The list of DENY rules specified by this firewall. Each rule specifies a
-- protocol and port-range tuple that describes a denied connection.
fDenied :: Lens' Firewall [FirewallDeniedItem]
fDenied
  = lens _fDenied (\ s a -> s{_fDenied = a}) . _Default
      . _Coerce

-- | [Output Only] Creation timestamp in RFC3339 text format.
fCreationTimestamp :: Lens' Firewall (Maybe Text)
fCreationTimestamp
  = lens _fCreationTimestamp
      (\ s a -> s{_fCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
fId :: Lens' Firewall (Maybe Word64)
fId
  = lens _fId (\ s a -> s{_fId = a}) . mapping _Coerce

-- | The list of ALLOW rules specified by this firewall. Each rule specifies
-- a protocol and port-range tuple that describes a permitted connection.
fAllowed :: Lens' Firewall [FirewallAllowedItem]
fAllowed
  = lens _fAllowed (\ s a -> s{_fAllowed = a}) .
      _Default
      . _Coerce

-- | If destination ranges are specified, the firewall will apply only to
-- traffic that has destination IP address in these ranges. These ranges
-- must be expressed in CIDR format. Only IPv4 is supported.
fDestinationRanges :: Lens' Firewall [Text]
fDestinationRanges
  = lens _fDestinationRanges
      (\ s a -> s{_fDestinationRanges = a})
      . _Default
      . _Coerce

-- | This field denotes the logging options for a particular firewall rule.
-- If logging is enabled, logs will be exported to Stackdriver.
fLogConfig :: Lens' Firewall (Maybe FirewallLogConfig)
fLogConfig
  = lens _fLogConfig (\ s a -> s{_fLogConfig = a})

-- | A list of service accounts indicating sets of instances located in the
-- network that may make network connections as specified in allowed[].
-- targetServiceAccounts cannot be used at the same time as targetTags or
-- sourceTags. If neither targetServiceAccounts nor targetTags are
-- specified, the firewall rule applies to all instances on the specified
-- network.
fTargetServiceAccounts :: Lens' Firewall [Text]
fTargetServiceAccounts
  = lens _fTargetServiceAccounts
      (\ s a -> s{_fTargetServiceAccounts = a})
      . _Default
      . _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
fDescription :: Lens' Firewall (Maybe Text)
fDescription
  = lens _fDescription (\ s a -> s{_fDescription = a})

instance FromJSON Firewall where
        parseJSON
          = withObject "Firewall"
              (\ o ->
                 Firewall' <$>
                   (o .:? "sourceTags" .!= mempty) <*>
                     (o .:? "sourceServiceAccounts" .!= mempty)
                     <*> (o .:? "priority")
                     <*> (o .:? "direction")
                     <*> (o .:? "kind" .!= "compute#firewall")
                     <*> (o .:? "disabled")
                     <*> (o .:? "targetTags" .!= mempty)
                     <*> (o .:? "network")
                     <*> (o .:? "sourceRanges" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "denied" .!= mempty)
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "allowed" .!= mempty)
                     <*> (o .:? "destinationRanges" .!= mempty)
                     <*> (o .:? "logConfig")
                     <*> (o .:? "targetServiceAccounts" .!= mempty)
                     <*> (o .:? "description"))

instance ToJSON Firewall where
        toJSON Firewall'{..}
          = object
              (catMaybes
                 [("sourceTags" .=) <$> _fSourceTags,
                  ("sourceServiceAccounts" .=) <$>
                    _fSourceServiceAccounts,
                  ("priority" .=) <$> _fPriority,
                  ("direction" .=) <$> _fDirection,
                  Just ("kind" .= _fKind),
                  ("disabled" .=) <$> _fDisabled,
                  ("targetTags" .=) <$> _fTargetTags,
                  ("network" .=) <$> _fNetwork,
                  ("sourceRanges" .=) <$> _fSourceRanges,
                  ("selfLink" .=) <$> _fSelfLink,
                  ("name" .=) <$> _fName, ("denied" .=) <$> _fDenied,
                  ("creationTimestamp" .=) <$> _fCreationTimestamp,
                  ("id" .=) <$> _fId, ("allowed" .=) <$> _fAllowed,
                  ("destinationRanges" .=) <$> _fDestinationRanges,
                  ("logConfig" .=) <$> _fLogConfig,
                  ("targetServiceAccounts" .=) <$>
                    _fTargetServiceAccounts,
                  ("description" .=) <$> _fDescription])

-- | Informational warning which replaces the list of addresses when the list
-- is empty.
--
-- /See:/ 'interconnectAttachmentsScopedListWarning' smart constructor.
data InterconnectAttachmentsScopedListWarning = InterconnectAttachmentsScopedListWarning'
    { _iaslwData    :: !(Maybe [InterconnectAttachmentsScopedListWarningDataItem])
    , _iaslwCode    :: !(Maybe InterconnectAttachmentsScopedListWarningCode)
    , _iaslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentsScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iaslwData'
--
-- * 'iaslwCode'
--
-- * 'iaslwMessage'
interconnectAttachmentsScopedListWarning
    :: InterconnectAttachmentsScopedListWarning
interconnectAttachmentsScopedListWarning =
    InterconnectAttachmentsScopedListWarning'
    { _iaslwData = Nothing
    , _iaslwCode = Nothing
    , _iaslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
iaslwData :: Lens' InterconnectAttachmentsScopedListWarning [InterconnectAttachmentsScopedListWarningDataItem]
iaslwData
  = lens _iaslwData (\ s a -> s{_iaslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
iaslwCode :: Lens' InterconnectAttachmentsScopedListWarning (Maybe InterconnectAttachmentsScopedListWarningCode)
iaslwCode
  = lens _iaslwCode (\ s a -> s{_iaslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
iaslwMessage :: Lens' InterconnectAttachmentsScopedListWarning (Maybe Text)
iaslwMessage
  = lens _iaslwMessage (\ s a -> s{_iaslwMessage = a})

instance FromJSON
         InterconnectAttachmentsScopedListWarning where
        parseJSON
          = withObject
              "InterconnectAttachmentsScopedListWarning"
              (\ o ->
                 InterconnectAttachmentsScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON
         InterconnectAttachmentsScopedListWarning where
        toJSON InterconnectAttachmentsScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _iaslwData,
                  ("code" .=) <$> _iaslwCode,
                  ("message" .=) <$> _iaslwMessage])

-- | UrlMaps A host-matching rule for a URL. If matched, will use the named
-- PathMatcher to select the BackendService.
--
-- /See:/ 'hostRule' smart constructor.
data HostRule = HostRule'
    { _hrHosts       :: !(Maybe [Text])
    , _hrDescription :: !(Maybe Text)
    , _hrPathMatcher :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HostRule' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hrHosts'
--
-- * 'hrDescription'
--
-- * 'hrPathMatcher'
hostRule
    :: HostRule
hostRule =
    HostRule'
    { _hrHosts = Nothing
    , _hrDescription = Nothing
    , _hrPathMatcher = Nothing
    }

-- | The list of host patterns to match. They must be valid hostnames, except
-- * will match any string of ([a-z0-9-.]*). In that case, * must be the
-- first character and must be followed in the pattern by either - or ..
hrHosts :: Lens' HostRule [Text]
hrHosts
  = lens _hrHosts (\ s a -> s{_hrHosts = a}) . _Default
      . _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
hrDescription :: Lens' HostRule (Maybe Text)
hrDescription
  = lens _hrDescription
      (\ s a -> s{_hrDescription = a})

-- | The name of the PathMatcher to use to match the path portion of the URL
-- if the hostRule matches the URL\'s host portion.
hrPathMatcher :: Lens' HostRule (Maybe Text)
hrPathMatcher
  = lens _hrPathMatcher
      (\ s a -> s{_hrPathMatcher = a})

instance FromJSON HostRule where
        parseJSON
          = withObject "HostRule"
              (\ o ->
                 HostRule' <$>
                   (o .:? "hosts" .!= mempty) <*> (o .:? "description")
                     <*> (o .:? "pathMatcher"))

instance ToJSON HostRule where
        toJSON HostRule'{..}
          = object
              (catMaybes
                 [("hosts" .=) <$> _hrHosts,
                  ("description" .=) <$> _hrDescription,
                  ("pathMatcher" .=) <$> _hrPathMatcher])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'securityPolicyListWarning' smart constructor.
data SecurityPolicyListWarning = SecurityPolicyListWarning'
    { _secData    :: !(Maybe [SecurityPolicyListWarningDataItem])
    , _secCode    :: !(Maybe SecurityPolicyListWarningCode)
    , _secMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SecurityPolicyListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'secData'
--
-- * 'secCode'
--
-- * 'secMessage'
securityPolicyListWarning
    :: SecurityPolicyListWarning
securityPolicyListWarning =
    SecurityPolicyListWarning'
    { _secData = Nothing
    , _secCode = Nothing
    , _secMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
secData :: Lens' SecurityPolicyListWarning [SecurityPolicyListWarningDataItem]
secData
  = lens _secData (\ s a -> s{_secData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
secCode :: Lens' SecurityPolicyListWarning (Maybe SecurityPolicyListWarningCode)
secCode = lens _secCode (\ s a -> s{_secCode = a})

-- | [Output Only] A human-readable description of the warning code.
secMessage :: Lens' SecurityPolicyListWarning (Maybe Text)
secMessage
  = lens _secMessage (\ s a -> s{_secMessage = a})

instance FromJSON SecurityPolicyListWarning where
        parseJSON
          = withObject "SecurityPolicyListWarning"
              (\ o ->
                 SecurityPolicyListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON SecurityPolicyListWarning where
        toJSON SecurityPolicyListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _secData, ("code" .=) <$> _secCode,
                  ("message" .=) <$> _secMessage])

-- | A quotas entry.
--
-- /See:/ 'quota' smart constructor.
data Quota = Quota'
    { _qMetric :: !(Maybe QuotaMetric)
    , _qLimit  :: !(Maybe (Textual Double))
    , _qUsage  :: !(Maybe (Textual Double))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Quota' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'qMetric'
--
-- * 'qLimit'
--
-- * 'qUsage'
quota
    :: Quota
quota =
    Quota'
    { _qMetric = Nothing
    , _qLimit = Nothing
    , _qUsage = Nothing
    }

-- | [Output Only] Name of the quota metric.
qMetric :: Lens' Quota (Maybe QuotaMetric)
qMetric = lens _qMetric (\ s a -> s{_qMetric = a})

-- | [Output Only] Quota limit for this metric.
qLimit :: Lens' Quota (Maybe Double)
qLimit
  = lens _qLimit (\ s a -> s{_qLimit = a}) .
      mapping _Coerce

-- | [Output Only] Current usage of this metric.
qUsage :: Lens' Quota (Maybe Double)
qUsage
  = lens _qUsage (\ s a -> s{_qUsage = a}) .
      mapping _Coerce

instance FromJSON Quota where
        parseJSON
          = withObject "Quota"
              (\ o ->
                 Quota' <$>
                   (o .:? "metric") <*> (o .:? "limit") <*>
                     (o .:? "usage"))

instance ToJSON Quota where
        toJSON Quota'{..}
          = object
              (catMaybes
                 [("metric" .=) <$> _qMetric,
                  ("limit" .=) <$> _qLimit, ("usage" .=) <$> _qUsage])

-- | InstanceGroups (== resource_for beta.instanceGroups ==) (== resource_for
-- v1.instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (==
-- resource_for v1.regionInstanceGroups ==)
--
-- /See:/ 'instanceGroup' smart constructor.
data InstanceGroup = InstanceGroup'
    { _ig1Size              :: !(Maybe (Textual Int32))
    , _ig1Kind              :: !Text
    , _ig1Fingerprint       :: !(Maybe Bytes)
    , _ig1Network           :: !(Maybe Text)
    , _ig1Zone              :: !(Maybe Text)
    , _ig1SelfLink          :: !(Maybe Text)
    , _ig1Name              :: !(Maybe Text)
    , _ig1CreationTimestamp :: !(Maybe Text)
    , _ig1Subnetwork        :: !(Maybe Text)
    , _ig1Id                :: !(Maybe (Textual Word64))
    , _ig1Region            :: !(Maybe Text)
    , _ig1Description       :: !(Maybe Text)
    , _ig1NamedPorts        :: !(Maybe [NamedPort])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroup' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ig1Size'
--
-- * 'ig1Kind'
--
-- * 'ig1Fingerprint'
--
-- * 'ig1Network'
--
-- * 'ig1Zone'
--
-- * 'ig1SelfLink'
--
-- * 'ig1Name'
--
-- * 'ig1CreationTimestamp'
--
-- * 'ig1Subnetwork'
--
-- * 'ig1Id'
--
-- * 'ig1Region'
--
-- * 'ig1Description'
--
-- * 'ig1NamedPorts'
instanceGroup
    :: InstanceGroup
instanceGroup =
    InstanceGroup'
    { _ig1Size = Nothing
    , _ig1Kind = "compute#instanceGroup"
    , _ig1Fingerprint = Nothing
    , _ig1Network = Nothing
    , _ig1Zone = Nothing
    , _ig1SelfLink = Nothing
    , _ig1Name = Nothing
    , _ig1CreationTimestamp = Nothing
    , _ig1Subnetwork = Nothing
    , _ig1Id = Nothing
    , _ig1Region = Nothing
    , _ig1Description = Nothing
    , _ig1NamedPorts = Nothing
    }

-- | [Output Only] The total number of instances in the instance group.
ig1Size :: Lens' InstanceGroup (Maybe Int32)
ig1Size
  = lens _ig1Size (\ s a -> s{_ig1Size = a}) .
      mapping _Coerce

-- | [Output Only] The resource type, which is always compute#instanceGroup
-- for instance groups.
ig1Kind :: Lens' InstanceGroup Text
ig1Kind = lens _ig1Kind (\ s a -> s{_ig1Kind = a})

-- | [Output Only] The fingerprint of the named ports. The system uses this
-- fingerprint to detect conflicts when multiple users change the named
-- ports concurrently.
ig1Fingerprint :: Lens' InstanceGroup (Maybe ByteString)
ig1Fingerprint
  = lens _ig1Fingerprint
      (\ s a -> s{_ig1Fingerprint = a})
      . mapping _Bytes

-- | The URL of the network to which all instances in the instance group
-- belong.
ig1Network :: Lens' InstanceGroup (Maybe Text)
ig1Network
  = lens _ig1Network (\ s a -> s{_ig1Network = a})

-- | [Output Only] The URL of the zone where the instance group is located
-- (for zonal resources).
ig1Zone :: Lens' InstanceGroup (Maybe Text)
ig1Zone = lens _ig1Zone (\ s a -> s{_ig1Zone = a})

-- | [Output Only] The URL for this instance group. The server generates this
-- URL.
ig1SelfLink :: Lens' InstanceGroup (Maybe Text)
ig1SelfLink
  = lens _ig1SelfLink (\ s a -> s{_ig1SelfLink = a})

-- | The name of the instance group. The name must be 1-63 characters long,
-- and comply with RFC1035.
ig1Name :: Lens' InstanceGroup (Maybe Text)
ig1Name = lens _ig1Name (\ s a -> s{_ig1Name = a})

-- | [Output Only] The creation timestamp for this instance group in RFC3339
-- text format.
ig1CreationTimestamp :: Lens' InstanceGroup (Maybe Text)
ig1CreationTimestamp
  = lens _ig1CreationTimestamp
      (\ s a -> s{_ig1CreationTimestamp = a})

-- | [Output Only] The URL of the subnetwork to which all instances in the
-- instance group belong.
ig1Subnetwork :: Lens' InstanceGroup (Maybe Text)
ig1Subnetwork
  = lens _ig1Subnetwork
      (\ s a -> s{_ig1Subnetwork = a})

-- | [Output Only] A unique identifier for this instance group, generated by
-- the server.
ig1Id :: Lens' InstanceGroup (Maybe Word64)
ig1Id
  = lens _ig1Id (\ s a -> s{_ig1Id = a}) .
      mapping _Coerce

-- | [Output Only] The URL of the region where the instance group is located
-- (for regional resources).
ig1Region :: Lens' InstanceGroup (Maybe Text)
ig1Region
  = lens _ig1Region (\ s a -> s{_ig1Region = a})

-- | An optional description of this resource. Provide this property when you
-- create the resource.
ig1Description :: Lens' InstanceGroup (Maybe Text)
ig1Description
  = lens _ig1Description
      (\ s a -> s{_ig1Description = a})

-- | Assigns a name to a port number. For example: {name: \"http\", port: 80}
-- This allows the system to reference ports by the assigned name instead
-- of a port number. Named ports can also contain multiple ports. For
-- example: [{name: \"http\", port: 80},{name: \"http\", port: 8080}] Named
-- ports apply to all instances in this instance group.
ig1NamedPorts :: Lens' InstanceGroup [NamedPort]
ig1NamedPorts
  = lens _ig1NamedPorts
      (\ s a -> s{_ig1NamedPorts = a})
      . _Default
      . _Coerce

instance FromJSON InstanceGroup where
        parseJSON
          = withObject "InstanceGroup"
              (\ o ->
                 InstanceGroup' <$>
                   (o .:? "size") <*>
                     (o .:? "kind" .!= "compute#instanceGroup")
                     <*> (o .:? "fingerprint")
                     <*> (o .:? "network")
                     <*> (o .:? "zone")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "subnetwork")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "description")
                     <*> (o .:? "namedPorts" .!= mempty))

instance ToJSON InstanceGroup where
        toJSON InstanceGroup'{..}
          = object
              (catMaybes
                 [("size" .=) <$> _ig1Size, Just ("kind" .= _ig1Kind),
                  ("fingerprint" .=) <$> _ig1Fingerprint,
                  ("network" .=) <$> _ig1Network,
                  ("zone" .=) <$> _ig1Zone,
                  ("selfLink" .=) <$> _ig1SelfLink,
                  ("name" .=) <$> _ig1Name,
                  ("creationTimestamp" .=) <$> _ig1CreationTimestamp,
                  ("subnetwork" .=) <$> _ig1Subnetwork,
                  ("id" .=) <$> _ig1Id, ("region" .=) <$> _ig1Region,
                  ("description" .=) <$> _ig1Description,
                  ("namedPorts" .=) <$> _ig1NamedPorts])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'addressListWarning' smart constructor.
data AddressListWarning = AddressListWarning'
    { _alwlData    :: !(Maybe [AddressListWarningDataItem])
    , _alwlCode    :: !(Maybe AddressListWarningCode)
    , _alwlMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'alwlData'
--
-- * 'alwlCode'
--
-- * 'alwlMessage'
addressListWarning
    :: AddressListWarning
addressListWarning =
    AddressListWarning'
    { _alwlData = Nothing
    , _alwlCode = Nothing
    , _alwlMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
alwlData :: Lens' AddressListWarning [AddressListWarningDataItem]
alwlData
  = lens _alwlData (\ s a -> s{_alwlData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
alwlCode :: Lens' AddressListWarning (Maybe AddressListWarningCode)
alwlCode = lens _alwlCode (\ s a -> s{_alwlCode = a})

-- | [Output Only] A human-readable description of the warning code.
alwlMessage :: Lens' AddressListWarning (Maybe Text)
alwlMessage
  = lens _alwlMessage (\ s a -> s{_alwlMessage = a})

instance FromJSON AddressListWarning where
        parseJSON
          = withObject "AddressListWarning"
              (\ o ->
                 AddressListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON AddressListWarning where
        toJSON AddressListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _alwlData,
                  ("code" .=) <$> _alwlCode,
                  ("message" .=) <$> _alwlMessage])

--
-- /See:/ 'regionSetLabelsRequest' smart constructor.
data RegionSetLabelsRequest = RegionSetLabelsRequest'
    { _rslrLabels           :: !(Maybe RegionSetLabelsRequestLabels)
    , _rslrLabelFingerprint :: !(Maybe Bytes)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionSetLabelsRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rslrLabels'
--
-- * 'rslrLabelFingerprint'
regionSetLabelsRequest
    :: RegionSetLabelsRequest
regionSetLabelsRequest =
    RegionSetLabelsRequest'
    { _rslrLabels = Nothing
    , _rslrLabelFingerprint = Nothing
    }

-- | The labels to set for this resource.
rslrLabels :: Lens' RegionSetLabelsRequest (Maybe RegionSetLabelsRequestLabels)
rslrLabels
  = lens _rslrLabels (\ s a -> s{_rslrLabels = a})

-- | The fingerprint of the previous set of labels for this resource, used to
-- detect conflicts. The fingerprint is initially generated by Compute
-- Engine and changes after every request to modify or update labels. You
-- must always provide an up-to-date fingerprint hash in order to update or
-- change labels. Make a get() request to the resource to get the latest
-- fingerprint.
rslrLabelFingerprint :: Lens' RegionSetLabelsRequest (Maybe ByteString)
rslrLabelFingerprint
  = lens _rslrLabelFingerprint
      (\ s a -> s{_rslrLabelFingerprint = a})
      . mapping _Bytes

instance FromJSON RegionSetLabelsRequest where
        parseJSON
          = withObject "RegionSetLabelsRequest"
              (\ o ->
                 RegionSetLabelsRequest' <$>
                   (o .:? "labels") <*> (o .:? "labelFingerprint"))

instance ToJSON RegionSetLabelsRequest where
        toJSON RegionSetLabelsRequest'{..}
          = object
              (catMaybes
                 [("labels" .=) <$> _rslrLabels,
                  ("labelFingerprint" .=) <$> _rslrLabelFingerprint])

--
-- /See:/ 'routerInterface' smart constructor.
data RouterInterface = RouterInterface'
    { _riLinkedInterconnectAttachment :: !(Maybe Text)
    , _riName                         :: !(Maybe Text)
    , _riManagementType               :: !(Maybe RouterInterfaceManagementType)
    , _riIPRange                      :: !(Maybe Text)
    , _riLinkedVPNTunnel              :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RouterInterface' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'riLinkedInterconnectAttachment'
--
-- * 'riName'
--
-- * 'riManagementType'
--
-- * 'riIPRange'
--
-- * 'riLinkedVPNTunnel'
routerInterface
    :: RouterInterface
routerInterface =
    RouterInterface'
    { _riLinkedInterconnectAttachment = Nothing
    , _riName = Nothing
    , _riManagementType = Nothing
    , _riIPRange = Nothing
    , _riLinkedVPNTunnel = Nothing
    }

-- | URI of the linked interconnect attachment. It must be in the same region
-- as the router. Each interface can have at most one linked resource and
-- it could either be a VPN Tunnel or an interconnect attachment.
riLinkedInterconnectAttachment :: Lens' RouterInterface (Maybe Text)
riLinkedInterconnectAttachment
  = lens _riLinkedInterconnectAttachment
      (\ s a -> s{_riLinkedInterconnectAttachment = a})

-- | Name of this interface entry. The name must be 1-63 characters long and
-- comply with RFC1035.
riName :: Lens' RouterInterface (Maybe Text)
riName = lens _riName (\ s a -> s{_riName = a})

-- | [Output Only] The resource that configures and manages this interface.
-- MANAGED_BY_USER is the default value and can be managed by you or other
-- users; MANAGED_BY_ATTACHMENT is an interface that is configured and
-- managed by Cloud Interconnect, specifically by an InterconnectAttachment
-- of type PARTNER. Google will automatically create, update, and delete
-- this type of interface when the PARTNER InterconnectAttachment is
-- created, updated, or deleted.
riManagementType :: Lens' RouterInterface (Maybe RouterInterfaceManagementType)
riManagementType
  = lens _riManagementType
      (\ s a -> s{_riManagementType = a})

-- | IP address and range of the interface. The IP range must be in the
-- RFC3927 link-local IP space. The value must be a CIDR-formatted string,
-- for example: 169.254.0.1\/30. NOTE: Do not truncate the address as it
-- represents the IP address of the interface.
riIPRange :: Lens' RouterInterface (Maybe Text)
riIPRange
  = lens _riIPRange (\ s a -> s{_riIPRange = a})

-- | URI of the linked VPN tunnel. It must be in the same region as the
-- router. Each interface can have at most one linked resource and it could
-- either be a VPN Tunnel or an interconnect attachment.
riLinkedVPNTunnel :: Lens' RouterInterface (Maybe Text)
riLinkedVPNTunnel
  = lens _riLinkedVPNTunnel
      (\ s a -> s{_riLinkedVPNTunnel = a})

instance FromJSON RouterInterface where
        parseJSON
          = withObject "RouterInterface"
              (\ o ->
                 RouterInterface' <$>
                   (o .:? "linkedInterconnectAttachment") <*>
                     (o .:? "name")
                     <*> (o .:? "managementType")
                     <*> (o .:? "ipRange")
                     <*> (o .:? "linkedVpnTunnel"))

instance ToJSON RouterInterface where
        toJSON RouterInterface'{..}
          = object
              (catMaybes
                 [("linkedInterconnectAttachment" .=) <$>
                    _riLinkedInterconnectAttachment,
                  ("name" .=) <$> _riName,
                  ("managementType" .=) <$> _riManagementType,
                  ("ipRange" .=) <$> _riIPRange,
                  ("linkedVpnTunnel" .=) <$> _riLinkedVPNTunnel])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'networkListWarning' smart constructor.
data NetworkListWarning = NetworkListWarning'
    { _nlwData    :: !(Maybe [NetworkListWarningDataItem])
    , _nlwCode    :: !(Maybe NetworkListWarningCode)
    , _nlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NetworkListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nlwData'
--
-- * 'nlwCode'
--
-- * 'nlwMessage'
networkListWarning
    :: NetworkListWarning
networkListWarning =
    NetworkListWarning'
    { _nlwData = Nothing
    , _nlwCode = Nothing
    , _nlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
nlwData :: Lens' NetworkListWarning [NetworkListWarningDataItem]
nlwData
  = lens _nlwData (\ s a -> s{_nlwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
nlwCode :: Lens' NetworkListWarning (Maybe NetworkListWarningCode)
nlwCode = lens _nlwCode (\ s a -> s{_nlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
nlwMessage :: Lens' NetworkListWarning (Maybe Text)
nlwMessage
  = lens _nlwMessage (\ s a -> s{_nlwMessage = a})

instance FromJSON NetworkListWarning where
        parseJSON
          = withObject "NetworkListWarning"
              (\ o ->
                 NetworkListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON NetworkListWarning where
        toJSON NetworkListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _nlwData, ("code" .=) <$> _nlwCode,
                  ("message" .=) <$> _nlwMessage])

-- | Contains a list of Snapshot resources.
--
-- /See:/ 'snapshotList' smart constructor.
data SnapshotList = SnapshotList'
    { _snaNextPageToken :: !(Maybe Text)
    , _snaKind          :: !Text
    , _snaItems         :: !(Maybe [Snapshot])
    , _snaSelfLink      :: !(Maybe Text)
    , _snaWarning       :: !(Maybe SnapshotListWarning)
    , _snaId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SnapshotList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'snaNextPageToken'
--
-- * 'snaKind'
--
-- * 'snaItems'
--
-- * 'snaSelfLink'
--
-- * 'snaWarning'
--
-- * 'snaId'
snapshotList
    :: SnapshotList
snapshotList =
    SnapshotList'
    { _snaNextPageToken = Nothing
    , _snaKind = "compute#snapshotList"
    , _snaItems = Nothing
    , _snaSelfLink = Nothing
    , _snaWarning = Nothing
    , _snaId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
snaNextPageToken :: Lens' SnapshotList (Maybe Text)
snaNextPageToken
  = lens _snaNextPageToken
      (\ s a -> s{_snaNextPageToken = a})

-- | Type of resource.
snaKind :: Lens' SnapshotList Text
snaKind = lens _snaKind (\ s a -> s{_snaKind = a})

-- | A list of Snapshot resources.
snaItems :: Lens' SnapshotList [Snapshot]
snaItems
  = lens _snaItems (\ s a -> s{_snaItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
snaSelfLink :: Lens' SnapshotList (Maybe Text)
snaSelfLink
  = lens _snaSelfLink (\ s a -> s{_snaSelfLink = a})

-- | [Output Only] Informational warning message.
snaWarning :: Lens' SnapshotList (Maybe SnapshotListWarning)
snaWarning
  = lens _snaWarning (\ s a -> s{_snaWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
snaId :: Lens' SnapshotList (Maybe Text)
snaId = lens _snaId (\ s a -> s{_snaId = a})

instance FromJSON SnapshotList where
        parseJSON
          = withObject "SnapshotList"
              (\ o ->
                 SnapshotList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#snapshotList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON SnapshotList where
        toJSON SnapshotList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _snaNextPageToken,
                  Just ("kind" .= _snaKind),
                  ("items" .=) <$> _snaItems,
                  ("selfLink" .=) <$> _snaSelfLink,
                  ("warning" .=) <$> _snaWarning,
                  ("id" .=) <$> _snaId])

-- | Diagnostics information about interconnect, contains detailed and
-- current technical information about Google?s side of the connection.
--
-- /See:/ 'interconnectDiagnostics' smart constructor.
data InterconnectDiagnostics = InterconnectDiagnostics'
    { _idMACAddress :: !(Maybe Text)
    , _idArpCaches  :: !(Maybe [InterconnectDiagnosticsARPEntry])
    , _idLinks      :: !(Maybe [InterconnectDiagnosticsLinkStatus])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectDiagnostics' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'idMACAddress'
--
-- * 'idArpCaches'
--
-- * 'idLinks'
interconnectDiagnostics
    :: InterconnectDiagnostics
interconnectDiagnostics =
    InterconnectDiagnostics'
    { _idMACAddress = Nothing
    , _idArpCaches = Nothing
    , _idLinks = Nothing
    }

-- | The MAC address of the Interconnect\'s bundle interface.
idMACAddress :: Lens' InterconnectDiagnostics (Maybe Text)
idMACAddress
  = lens _idMACAddress (\ s a -> s{_idMACAddress = a})

-- | A list of InterconnectDiagnostics.ARPEntry objects, describing
-- individual neighbors currently seen by the Google router in the ARP
-- cache for the Interconnect. This will be empty when the Interconnect is
-- not bundled.
idArpCaches :: Lens' InterconnectDiagnostics [InterconnectDiagnosticsARPEntry]
idArpCaches
  = lens _idArpCaches (\ s a -> s{_idArpCaches = a}) .
      _Default
      . _Coerce

-- | A list of InterconnectDiagnostics.LinkStatus objects, describing the
-- status for each link on the Interconnect.
idLinks :: Lens' InterconnectDiagnostics [InterconnectDiagnosticsLinkStatus]
idLinks
  = lens _idLinks (\ s a -> s{_idLinks = a}) . _Default
      . _Coerce

instance FromJSON InterconnectDiagnostics where
        parseJSON
          = withObject "InterconnectDiagnostics"
              (\ o ->
                 InterconnectDiagnostics' <$>
                   (o .:? "macAddress") <*>
                     (o .:? "arpCaches" .!= mempty)
                     <*> (o .:? "links" .!= mempty))

instance ToJSON InterconnectDiagnostics where
        toJSON InterconnectDiagnostics'{..}
          = object
              (catMaybes
                 [("macAddress" .=) <$> _idMACAddress,
                  ("arpCaches" .=) <$> _idArpCaches,
                  ("links" .=) <$> _idLinks])

--
-- /See:/ 'licenseCode' smart constructor.
data LicenseCode = LicenseCode'
    { _lcState             :: !(Maybe LicenseCodeState)
    , _lcKind              :: !Text
    , _lcTransferable      :: !(Maybe Bool)
    , _lcSelfLink          :: !(Maybe Text)
    , _lcName              :: !(Maybe Text)
    , _lcCreationTimestamp :: !(Maybe Text)
    , _lcId                :: !(Maybe (Textual Word64))
    , _lcLicenseAlias      :: !(Maybe [LicenseCodeLicenseAlias])
    , _lcDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LicenseCode' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcState'
--
-- * 'lcKind'
--
-- * 'lcTransferable'
--
-- * 'lcSelfLink'
--
-- * 'lcName'
--
-- * 'lcCreationTimestamp'
--
-- * 'lcId'
--
-- * 'lcLicenseAlias'
--
-- * 'lcDescription'
licenseCode
    :: LicenseCode
licenseCode =
    LicenseCode'
    { _lcState = Nothing
    , _lcKind = "compute#licenseCode"
    , _lcTransferable = Nothing
    , _lcSelfLink = Nothing
    , _lcName = Nothing
    , _lcCreationTimestamp = Nothing
    , _lcId = Nothing
    , _lcLicenseAlias = Nothing
    , _lcDescription = Nothing
    }

-- | [Output Only] Current state of this License Code.
lcState :: Lens' LicenseCode (Maybe LicenseCodeState)
lcState = lens _lcState (\ s a -> s{_lcState = a})

-- | [Output Only] Type of resource. Always compute#licenseCode for licenses.
lcKind :: Lens' LicenseCode Text
lcKind = lens _lcKind (\ s a -> s{_lcKind = a})

-- | [Output Only] If true, the license will remain attached when creating
-- images or snapshots from disks. Otherwise, the license is not
-- transferred.
lcTransferable :: Lens' LicenseCode (Maybe Bool)
lcTransferable
  = lens _lcTransferable
      (\ s a -> s{_lcTransferable = a})

-- | [Output Only] Server-defined URL for the resource.
lcSelfLink :: Lens' LicenseCode (Maybe Text)
lcSelfLink
  = lens _lcSelfLink (\ s a -> s{_lcSelfLink = a})

-- | [Output Only] Name of the resource. The name is 1-20 characters long and
-- must be a valid 64 bit integer.
lcName :: Lens' LicenseCode (Maybe Text)
lcName = lens _lcName (\ s a -> s{_lcName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
lcCreationTimestamp :: Lens' LicenseCode (Maybe Text)
lcCreationTimestamp
  = lens _lcCreationTimestamp
      (\ s a -> s{_lcCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
lcId :: Lens' LicenseCode (Maybe Word64)
lcId
  = lens _lcId (\ s a -> s{_lcId = a}) .
      mapping _Coerce

-- | [Output Only] URL and description aliases of Licenses with the same
-- License Code.
lcLicenseAlias :: Lens' LicenseCode [LicenseCodeLicenseAlias]
lcLicenseAlias
  = lens _lcLicenseAlias
      (\ s a -> s{_lcLicenseAlias = a})
      . _Default
      . _Coerce

-- | [Output Only] Description of this License Code.
lcDescription :: Lens' LicenseCode (Maybe Text)
lcDescription
  = lens _lcDescription
      (\ s a -> s{_lcDescription = a})

instance FromJSON LicenseCode where
        parseJSON
          = withObject "LicenseCode"
              (\ o ->
                 LicenseCode' <$>
                   (o .:? "state") <*>
                     (o .:? "kind" .!= "compute#licenseCode")
                     <*> (o .:? "transferable")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "licenseAlias" .!= mempty)
                     <*> (o .:? "description"))

instance ToJSON LicenseCode where
        toJSON LicenseCode'{..}
          = object
              (catMaybes
                 [("state" .=) <$> _lcState, Just ("kind" .= _lcKind),
                  ("transferable" .=) <$> _lcTransferable,
                  ("selfLink" .=) <$> _lcSelfLink,
                  ("name" .=) <$> _lcName,
                  ("creationTimestamp" .=) <$> _lcCreationTimestamp,
                  ("id" .=) <$> _lcId,
                  ("licenseAlias" .=) <$> _lcLicenseAlias,
                  ("description" .=) <$> _lcDescription])

--
-- /See:/ 'testFailure' smart constructor.
data TestFailure = TestFailure'
    { _tfPath            :: !(Maybe Text)
    , _tfExpectedService :: !(Maybe Text)
    , _tfHost            :: !(Maybe Text)
    , _tfActualService   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TestFailure' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tfPath'
--
-- * 'tfExpectedService'
--
-- * 'tfHost'
--
-- * 'tfActualService'
testFailure
    :: TestFailure
testFailure =
    TestFailure'
    { _tfPath = Nothing
    , _tfExpectedService = Nothing
    , _tfHost = Nothing
    , _tfActualService = Nothing
    }

tfPath :: Lens' TestFailure (Maybe Text)
tfPath = lens _tfPath (\ s a -> s{_tfPath = a})

tfExpectedService :: Lens' TestFailure (Maybe Text)
tfExpectedService
  = lens _tfExpectedService
      (\ s a -> s{_tfExpectedService = a})

tfHost :: Lens' TestFailure (Maybe Text)
tfHost = lens _tfHost (\ s a -> s{_tfHost = a})

tfActualService :: Lens' TestFailure (Maybe Text)
tfActualService
  = lens _tfActualService
      (\ s a -> s{_tfActualService = a})

instance FromJSON TestFailure where
        parseJSON
          = withObject "TestFailure"
              (\ o ->
                 TestFailure' <$>
                   (o .:? "path") <*> (o .:? "expectedService") <*>
                     (o .:? "host")
                     <*> (o .:? "actualService"))

instance ToJSON TestFailure where
        toJSON TestFailure'{..}
          = object
              (catMaybes
                 [("path" .=) <$> _tfPath,
                  ("expectedService" .=) <$> _tfExpectedService,
                  ("host" .=) <$> _tfHost,
                  ("actualService" .=) <$> _tfActualService])

--
-- /See:/ 'commitmentListWarningDataItem' smart constructor.
data CommitmentListWarningDataItem = CommitmentListWarningDataItem'
    { _clwdiValue :: !(Maybe Text)
    , _clwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'clwdiValue'
--
-- * 'clwdiKey'
commitmentListWarningDataItem
    :: CommitmentListWarningDataItem
commitmentListWarningDataItem =
    CommitmentListWarningDataItem'
    { _clwdiValue = Nothing
    , _clwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
clwdiValue :: Lens' CommitmentListWarningDataItem (Maybe Text)
clwdiValue
  = lens _clwdiValue (\ s a -> s{_clwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
clwdiKey :: Lens' CommitmentListWarningDataItem (Maybe Text)
clwdiKey = lens _clwdiKey (\ s a -> s{_clwdiKey = a})

instance FromJSON CommitmentListWarningDataItem where
        parseJSON
          = withObject "CommitmentListWarningDataItem"
              (\ o ->
                 CommitmentListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON CommitmentListWarningDataItem where
        toJSON CommitmentListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _clwdiValue,
                  ("key" .=) <$> _clwdiKey])

-- | [Output Only] Informational warning which replaces the list of
-- commitments when the list is empty.
--
-- /See:/ 'commitmentsScopedListWarning' smart constructor.
data CommitmentsScopedListWarning = CommitmentsScopedListWarning'
    { _cslwData    :: !(Maybe [CommitmentsScopedListWarningDataItem])
    , _cslwCode    :: !(Maybe CommitmentsScopedListWarningCode)
    , _cslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentsScopedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cslwData'
--
-- * 'cslwCode'
--
-- * 'cslwMessage'
commitmentsScopedListWarning
    :: CommitmentsScopedListWarning
commitmentsScopedListWarning =
    CommitmentsScopedListWarning'
    { _cslwData = Nothing
    , _cslwCode = Nothing
    , _cslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
cslwData :: Lens' CommitmentsScopedListWarning [CommitmentsScopedListWarningDataItem]
cslwData
  = lens _cslwData (\ s a -> s{_cslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
cslwCode :: Lens' CommitmentsScopedListWarning (Maybe CommitmentsScopedListWarningCode)
cslwCode = lens _cslwCode (\ s a -> s{_cslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
cslwMessage :: Lens' CommitmentsScopedListWarning (Maybe Text)
cslwMessage
  = lens _cslwMessage (\ s a -> s{_cslwMessage = a})

instance FromJSON CommitmentsScopedListWarning where
        parseJSON
          = withObject "CommitmentsScopedListWarning"
              (\ o ->
                 CommitmentsScopedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON CommitmentsScopedListWarning where
        toJSON CommitmentsScopedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _cslwData,
                  ("code" .=) <$> _cslwCode,
                  ("message" .=) <$> _cslwMessage])

-- | An instance\'s serial console output.
--
-- /See:/ 'serialPortOutput' smart constructor.
data SerialPortOutput = SerialPortOutput'
    { _spoNext     :: !(Maybe (Textual Int64))
    , _spoContents :: !(Maybe Text)
    , _spoKind     :: !Text
    , _spoStart    :: !(Maybe (Textual Int64))
    , _spoSelfLink :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SerialPortOutput' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'spoNext'
--
-- * 'spoContents'
--
-- * 'spoKind'
--
-- * 'spoStart'
--
-- * 'spoSelfLink'
serialPortOutput
    :: SerialPortOutput
serialPortOutput =
    SerialPortOutput'
    { _spoNext = Nothing
    , _spoContents = Nothing
    , _spoKind = "compute#serialPortOutput"
    , _spoStart = Nothing
    , _spoSelfLink = Nothing
    }

-- | [Output Only] The position of the next byte of content from the serial
-- console output. Use this value in the next request as the start
-- parameter.
spoNext :: Lens' SerialPortOutput (Maybe Int64)
spoNext
  = lens _spoNext (\ s a -> s{_spoNext = a}) .
      mapping _Coerce

-- | [Output Only] The contents of the console output.
spoContents :: Lens' SerialPortOutput (Maybe Text)
spoContents
  = lens _spoContents (\ s a -> s{_spoContents = a})

-- | [Output Only] Type of the resource. Always compute#serialPortOutput for
-- serial port output.
spoKind :: Lens' SerialPortOutput Text
spoKind = lens _spoKind (\ s a -> s{_spoKind = a})

-- | The starting byte position of the output that was returned. This should
-- match the start parameter sent with the request. If the serial console
-- output exceeds the size of the buffer, older output will be overwritten
-- by newer content and the start values will be mismatched.
spoStart :: Lens' SerialPortOutput (Maybe Int64)
spoStart
  = lens _spoStart (\ s a -> s{_spoStart = a}) .
      mapping _Coerce

-- | [Output Only] Server-defined URL for this resource.
spoSelfLink :: Lens' SerialPortOutput (Maybe Text)
spoSelfLink
  = lens _spoSelfLink (\ s a -> s{_spoSelfLink = a})

instance FromJSON SerialPortOutput where
        parseJSON
          = withObject "SerialPortOutput"
              (\ o ->
                 SerialPortOutput' <$>
                   (o .:? "next") <*> (o .:? "contents") <*>
                     (o .:? "kind" .!= "compute#serialPortOutput")
                     <*> (o .:? "start")
                     <*> (o .:? "selfLink"))

instance ToJSON SerialPortOutput where
        toJSON SerialPortOutput'{..}
          = object
              (catMaybes
                 [("next" .=) <$> _spoNext,
                  ("contents" .=) <$> _spoContents,
                  Just ("kind" .= _spoKind),
                  ("start" .=) <$> _spoStart,
                  ("selfLink" .=) <$> _spoSelfLink])

--
-- /See:/ 'targetVPNGatewayAggregatedList' smart constructor.
data TargetVPNGatewayAggregatedList = TargetVPNGatewayAggregatedList'
    { _tvgalNextPageToken :: !(Maybe Text)
    , _tvgalKind          :: !Text
    , _tvgalItems         :: !(Maybe TargetVPNGatewayAggregatedListItems)
    , _tvgalSelfLink      :: !(Maybe Text)
    , _tvgalWarning       :: !(Maybe TargetVPNGatewayAggregatedListWarning)
    , _tvgalId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewayAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvgalNextPageToken'
--
-- * 'tvgalKind'
--
-- * 'tvgalItems'
--
-- * 'tvgalSelfLink'
--
-- * 'tvgalWarning'
--
-- * 'tvgalId'
targetVPNGatewayAggregatedList
    :: TargetVPNGatewayAggregatedList
targetVPNGatewayAggregatedList =
    TargetVPNGatewayAggregatedList'
    { _tvgalNextPageToken = Nothing
    , _tvgalKind = "compute#targetVpnGatewayAggregatedList"
    , _tvgalItems = Nothing
    , _tvgalSelfLink = Nothing
    , _tvgalWarning = Nothing
    , _tvgalId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
tvgalNextPageToken :: Lens' TargetVPNGatewayAggregatedList (Maybe Text)
tvgalNextPageToken
  = lens _tvgalNextPageToken
      (\ s a -> s{_tvgalNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#targetVpnGateway for
-- target VPN gateways.
tvgalKind :: Lens' TargetVPNGatewayAggregatedList Text
tvgalKind
  = lens _tvgalKind (\ s a -> s{_tvgalKind = a})

-- | A list of TargetVpnGateway resources.
tvgalItems :: Lens' TargetVPNGatewayAggregatedList (Maybe TargetVPNGatewayAggregatedListItems)
tvgalItems
  = lens _tvgalItems (\ s a -> s{_tvgalItems = a})

-- | [Output Only] Server-defined URL for this resource.
tvgalSelfLink :: Lens' TargetVPNGatewayAggregatedList (Maybe Text)
tvgalSelfLink
  = lens _tvgalSelfLink
      (\ s a -> s{_tvgalSelfLink = a})

-- | [Output Only] Informational warning message.
tvgalWarning :: Lens' TargetVPNGatewayAggregatedList (Maybe TargetVPNGatewayAggregatedListWarning)
tvgalWarning
  = lens _tvgalWarning (\ s a -> s{_tvgalWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
tvgalId :: Lens' TargetVPNGatewayAggregatedList (Maybe Text)
tvgalId = lens _tvgalId (\ s a -> s{_tvgalId = a})

instance FromJSON TargetVPNGatewayAggregatedList
         where
        parseJSON
          = withObject "TargetVPNGatewayAggregatedList"
              (\ o ->
                 TargetVPNGatewayAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#targetVpnGatewayAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON TargetVPNGatewayAggregatedList where
        toJSON TargetVPNGatewayAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _tvgalNextPageToken,
                  Just ("kind" .= _tvgalKind),
                  ("items" .=) <$> _tvgalItems,
                  ("selfLink" .=) <$> _tvgalSelfLink,
                  ("warning" .=) <$> _tvgalWarning,
                  ("id" .=) <$> _tvgalId])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'interconnectAttachmentAggregatedListWarning' smart constructor.
data InterconnectAttachmentAggregatedListWarning = InterconnectAttachmentAggregatedListWarning'
    { _iaalwData    :: !(Maybe [InterconnectAttachmentAggregatedListWarningDataItem])
    , _iaalwCode    :: !(Maybe InterconnectAttachmentAggregatedListWarningCode)
    , _iaalwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iaalwData'
--
-- * 'iaalwCode'
--
-- * 'iaalwMessage'
interconnectAttachmentAggregatedListWarning
    :: InterconnectAttachmentAggregatedListWarning
interconnectAttachmentAggregatedListWarning =
    InterconnectAttachmentAggregatedListWarning'
    { _iaalwData = Nothing
    , _iaalwCode = Nothing
    , _iaalwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
iaalwData :: Lens' InterconnectAttachmentAggregatedListWarning [InterconnectAttachmentAggregatedListWarningDataItem]
iaalwData
  = lens _iaalwData (\ s a -> s{_iaalwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
iaalwCode :: Lens' InterconnectAttachmentAggregatedListWarning (Maybe InterconnectAttachmentAggregatedListWarningCode)
iaalwCode
  = lens _iaalwCode (\ s a -> s{_iaalwCode = a})

-- | [Output Only] A human-readable description of the warning code.
iaalwMessage :: Lens' InterconnectAttachmentAggregatedListWarning (Maybe Text)
iaalwMessage
  = lens _iaalwMessage (\ s a -> s{_iaalwMessage = a})

instance FromJSON
         InterconnectAttachmentAggregatedListWarning where
        parseJSON
          = withObject
              "InterconnectAttachmentAggregatedListWarning"
              (\ o ->
                 InterconnectAttachmentAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON
         InterconnectAttachmentAggregatedListWarning where
        toJSON
          InterconnectAttachmentAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _iaalwData,
                  ("code" .=) <$> _iaalwCode,
                  ("message" .=) <$> _iaalwMessage])

--
-- /See:/ 'metadataItemsItem' smart constructor.
data MetadataItemsItem = MetadataItemsItem'
    { _miiValue :: !(Maybe Text)
    , _miiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'MetadataItemsItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'miiValue'
--
-- * 'miiKey'
metadataItemsItem
    :: MetadataItemsItem
metadataItemsItem =
    MetadataItemsItem'
    { _miiValue = Nothing
    , _miiKey = Nothing
    }

-- | Value for the metadata entry. These are free-form strings, and only have
-- meaning as interpreted by the image running in the instance. The only
-- restriction placed on values is that their size must be less than or
-- equal to 262144 bytes (256 KiB).
miiValue :: Lens' MetadataItemsItem (Maybe Text)
miiValue = lens _miiValue (\ s a -> s{_miiValue = a})

-- | Key for the metadata entry. Keys must conform to the following regexp:
-- [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected
-- as part of a URL in the metadata server. Additionally, to avoid
-- ambiguity, keys must not conflict with any other metadata keys for the
-- project.
miiKey :: Lens' MetadataItemsItem (Maybe Text)
miiKey = lens _miiKey (\ s a -> s{_miiKey = a})

instance FromJSON MetadataItemsItem where
        parseJSON
          = withObject "MetadataItemsItem"
              (\ o ->
                 MetadataItemsItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON MetadataItemsItem where
        toJSON MetadataItemsItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _miiValue, ("key" .=) <$> _miiKey])

-- | Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs
--
-- /See:/ 'signedURLKey' smart constructor.
data SignedURLKey = SignedURLKey'
    { _sukKeyValue :: !(Maybe Text)
    , _sukKeyName  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SignedURLKey' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sukKeyValue'
--
-- * 'sukKeyName'
signedURLKey
    :: SignedURLKey
signedURLKey =
    SignedURLKey'
    { _sukKeyValue = Nothing
    , _sukKeyName = Nothing
    }

-- | 128-bit key value used for signing the URL. The key value must be a
-- valid RFC 4648 Section 5 base64url encoded string.
sukKeyValue :: Lens' SignedURLKey (Maybe Text)
sukKeyValue
  = lens _sukKeyValue (\ s a -> s{_sukKeyValue = a})

-- | Name of the key. The name must be 1-63 characters long, and comply with
-- RFC1035. Specifically, the name must be 1-63 characters long and match
-- the regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the
-- first character must be a lowercase letter, and all following characters
-- must be a dash, lowercase letter, or digit, except the last character,
-- which cannot be a dash.
sukKeyName :: Lens' SignedURLKey (Maybe Text)
sukKeyName
  = lens _sukKeyName (\ s a -> s{_sukKeyName = a})

instance FromJSON SignedURLKey where
        parseJSON
          = withObject "SignedURLKey"
              (\ o ->
                 SignedURLKey' <$>
                   (o .:? "keyValue") <*> (o .:? "keyName"))

instance ToJSON SignedURLKey where
        toJSON SignedURLKey'{..}
          = object
              (catMaybes
                 [("keyValue" .=) <$> _sukKeyValue,
                  ("keyName" .=) <$> _sukKeyName])

-- | A TargetHttpsProxy resource. This resource defines an HTTPS proxy. (==
-- resource_for beta.targetHttpsProxies ==) (== resource_for
-- v1.targetHttpsProxies ==)
--
-- /See:/ 'targetHTTPSProxy' smart constructor.
data TargetHTTPSProxy = TargetHTTPSProxy'
    { _thpSSLPolicy         :: !(Maybe Text)
    , _thpURLMap            :: !(Maybe Text)
    , _thpSSLCertificates   :: !(Maybe [Text])
    , _thpQuicOverride      :: !(Maybe TargetHTTPSProxyQuicOverride)
    , _thpKind              :: !Text
    , _thpSelfLink          :: !(Maybe Text)
    , _thpName              :: !(Maybe Text)
    , _thpCreationTimestamp :: !(Maybe Text)
    , _thpId                :: !(Maybe (Textual Word64))
    , _thpDescription       :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetHTTPSProxy' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'thpSSLPolicy'
--
-- * 'thpURLMap'
--
-- * 'thpSSLCertificates'
--
-- * 'thpQuicOverride'
--
-- * 'thpKind'
--
-- * 'thpSelfLink'
--
-- * 'thpName'
--
-- * 'thpCreationTimestamp'
--
-- * 'thpId'
--
-- * 'thpDescription'
targetHTTPSProxy
    :: TargetHTTPSProxy
targetHTTPSProxy =
    TargetHTTPSProxy'
    { _thpSSLPolicy = Nothing
    , _thpURLMap = Nothing
    , _thpSSLCertificates = Nothing
    , _thpQuicOverride = Nothing
    , _thpKind = "compute#targetHttpsProxy"
    , _thpSelfLink = Nothing
    , _thpName = Nothing
    , _thpCreationTimestamp = Nothing
    , _thpId = Nothing
    , _thpDescription = Nothing
    }

-- | URL of SslPolicy resource that will be associated with the
-- TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource
-- will not have any SSL policy configured.
thpSSLPolicy :: Lens' TargetHTTPSProxy (Maybe Text)
thpSSLPolicy
  = lens _thpSSLPolicy (\ s a -> s{_thpSSLPolicy = a})

-- | A fully-qualified or valid partial URL to the UrlMap resource that
-- defines the mapping from URL to the BackendService. For example, the
-- following are all valid URLs for specifying a URL map: -
-- https:\/\/www.googleapis.compute\/v1\/projects\/project\/global\/urlMaps\/url-map
-- - projects\/project\/global\/urlMaps\/url-map - global\/urlMaps\/url-map
thpURLMap :: Lens' TargetHTTPSProxy (Maybe Text)
thpURLMap
  = lens _thpURLMap (\ s a -> s{_thpURLMap = a})

-- | URLs to SslCertificate resources that are used to authenticate
-- connections between users and the load balancer. At least one SSL
-- certificate must be specified. Currently, you may specify up to 15 SSL
-- certificates.
thpSSLCertificates :: Lens' TargetHTTPSProxy [Text]
thpSSLCertificates
  = lens _thpSSLCertificates
      (\ s a -> s{_thpSSLCertificates = a})
      . _Default
      . _Coerce

-- | Specifies the QUIC override policy for this TargetHttpsProxy resource.
-- This determines whether the load balancer will attempt to negotiate QUIC
-- with clients or not. Can specify one of NONE, ENABLE, or DISABLE.
-- Specify ENABLE to always enable QUIC, Enables QUIC when set to ENABLE,
-- and disables QUIC when set to DISABLE. If NONE is specified, uses the
-- QUIC policy with no user overrides, which is equivalent to DISABLE. Not
-- specifying this field is equivalent to specifying NONE.
thpQuicOverride :: Lens' TargetHTTPSProxy (Maybe TargetHTTPSProxyQuicOverride)
thpQuicOverride
  = lens _thpQuicOverride
      (\ s a -> s{_thpQuicOverride = a})

-- | [Output Only] Type of resource. Always compute#targetHttpsProxy for
-- target HTTPS proxies.
thpKind :: Lens' TargetHTTPSProxy Text
thpKind = lens _thpKind (\ s a -> s{_thpKind = a})

-- | [Output Only] Server-defined URL for the resource.
thpSelfLink :: Lens' TargetHTTPSProxy (Maybe Text)
thpSelfLink
  = lens _thpSelfLink (\ s a -> s{_thpSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
thpName :: Lens' TargetHTTPSProxy (Maybe Text)
thpName = lens _thpName (\ s a -> s{_thpName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
thpCreationTimestamp :: Lens' TargetHTTPSProxy (Maybe Text)
thpCreationTimestamp
  = lens _thpCreationTimestamp
      (\ s a -> s{_thpCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
thpId :: Lens' TargetHTTPSProxy (Maybe Word64)
thpId
  = lens _thpId (\ s a -> s{_thpId = a}) .
      mapping _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
thpDescription :: Lens' TargetHTTPSProxy (Maybe Text)
thpDescription
  = lens _thpDescription
      (\ s a -> s{_thpDescription = a})

instance FromJSON TargetHTTPSProxy where
        parseJSON
          = withObject "TargetHTTPSProxy"
              (\ o ->
                 TargetHTTPSProxy' <$>
                   (o .:? "sslPolicy") <*> (o .:? "urlMap") <*>
                     (o .:? "sslCertificates" .!= mempty)
                     <*> (o .:? "quicOverride")
                     <*> (o .:? "kind" .!= "compute#targetHttpsProxy")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "description"))

instance ToJSON TargetHTTPSProxy where
        toJSON TargetHTTPSProxy'{..}
          = object
              (catMaybes
                 [("sslPolicy" .=) <$> _thpSSLPolicy,
                  ("urlMap" .=) <$> _thpURLMap,
                  ("sslCertificates" .=) <$> _thpSSLCertificates,
                  ("quicOverride" .=) <$> _thpQuicOverride,
                  Just ("kind" .= _thpKind),
                  ("selfLink" .=) <$> _thpSelfLink,
                  ("name" .=) <$> _thpName,
                  ("creationTimestamp" .=) <$> _thpCreationTimestamp,
                  ("id" .=) <$> _thpId,
                  ("description" .=) <$> _thpDescription])

-- | Message containing connection draining configuration.
--
-- /See:/ 'connectionDraining' smart constructor.
newtype ConnectionDraining = ConnectionDraining'
    { _cdDrainingTimeoutSec :: Maybe (Textual Int32)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ConnectionDraining' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cdDrainingTimeoutSec'
connectionDraining
    :: ConnectionDraining
connectionDraining =
    ConnectionDraining'
    { _cdDrainingTimeoutSec = Nothing
    }

-- | Time for which instance will be drained (not accept new connections, but
-- still work to finish started).
cdDrainingTimeoutSec :: Lens' ConnectionDraining (Maybe Int32)
cdDrainingTimeoutSec
  = lens _cdDrainingTimeoutSec
      (\ s a -> s{_cdDrainingTimeoutSec = a})
      . mapping _Coerce

instance FromJSON ConnectionDraining where
        parseJSON
          = withObject "ConnectionDraining"
              (\ o ->
                 ConnectionDraining' <$> (o .:? "drainingTimeoutSec"))

instance ToJSON ConnectionDraining where
        toJSON ConnectionDraining'{..}
          = object
              (catMaybes
                 [("drainingTimeoutSec" .=) <$>
                    _cdDrainingTimeoutSec])

--
-- /See:/ 'interconnectAttachmentListWarningDataItem' smart constructor.
data InterconnectAttachmentListWarningDataItem = InterconnectAttachmentListWarningDataItem'
    { _ialwdiValue :: !(Maybe Text)
    , _ialwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ialwdiValue'
--
-- * 'ialwdiKey'
interconnectAttachmentListWarningDataItem
    :: InterconnectAttachmentListWarningDataItem
interconnectAttachmentListWarningDataItem =
    InterconnectAttachmentListWarningDataItem'
    { _ialwdiValue = Nothing
    , _ialwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
ialwdiValue :: Lens' InterconnectAttachmentListWarningDataItem (Maybe Text)
ialwdiValue
  = lens _ialwdiValue (\ s a -> s{_ialwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
ialwdiKey :: Lens' InterconnectAttachmentListWarningDataItem (Maybe Text)
ialwdiKey
  = lens _ialwdiKey (\ s a -> s{_ialwdiKey = a})

instance FromJSON
         InterconnectAttachmentListWarningDataItem where
        parseJSON
          = withObject
              "InterconnectAttachmentListWarningDataItem"
              (\ o ->
                 InterconnectAttachmentListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         InterconnectAttachmentListWarningDataItem where
        toJSON InterconnectAttachmentListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _ialwdiValue,
                  ("key" .=) <$> _ialwdiKey])

--
-- /See:/ 'cacheInvalidationRule' smart constructor.
data CacheInvalidationRule = CacheInvalidationRule'
    { _cirPath :: !(Maybe Text)
    , _cirHost :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CacheInvalidationRule' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cirPath'
--
-- * 'cirHost'
cacheInvalidationRule
    :: CacheInvalidationRule
cacheInvalidationRule =
    CacheInvalidationRule'
    { _cirPath = Nothing
    , _cirHost = Nothing
    }

cirPath :: Lens' CacheInvalidationRule (Maybe Text)
cirPath = lens _cirPath (\ s a -> s{_cirPath = a})

-- | If set, this invalidation rule will only apply to requests with a Host
-- header matching host.
cirHost :: Lens' CacheInvalidationRule (Maybe Text)
cirHost = lens _cirHost (\ s a -> s{_cirHost = a})

instance FromJSON CacheInvalidationRule where
        parseJSON
          = withObject "CacheInvalidationRule"
              (\ o ->
                 CacheInvalidationRule' <$>
                   (o .:? "path") <*> (o .:? "host"))

instance ToJSON CacheInvalidationRule where
        toJSON CacheInvalidationRule'{..}
          = object
              (catMaybes
                 [("path" .=) <$> _cirPath, ("host" .=) <$> _cirHost])

--
-- /See:/ 'addressAggregatedListWarningDataItem' smart constructor.
data AddressAggregatedListWarningDataItem = AddressAggregatedListWarningDataItem'
    { _aalwdiaValue :: !(Maybe Text)
    , _aalwdiaKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aalwdiaValue'
--
-- * 'aalwdiaKey'
addressAggregatedListWarningDataItem
    :: AddressAggregatedListWarningDataItem
addressAggregatedListWarningDataItem =
    AddressAggregatedListWarningDataItem'
    { _aalwdiaValue = Nothing
    , _aalwdiaKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
aalwdiaValue :: Lens' AddressAggregatedListWarningDataItem (Maybe Text)
aalwdiaValue
  = lens _aalwdiaValue (\ s a -> s{_aalwdiaValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
aalwdiaKey :: Lens' AddressAggregatedListWarningDataItem (Maybe Text)
aalwdiaKey
  = lens _aalwdiaKey (\ s a -> s{_aalwdiaKey = a})

instance FromJSON
         AddressAggregatedListWarningDataItem where
        parseJSON
          = withObject "AddressAggregatedListWarningDataItem"
              (\ o ->
                 AddressAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON AddressAggregatedListWarningDataItem
         where
        toJSON AddressAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _aalwdiaValue,
                  ("key" .=) <$> _aalwdiaKey])

--
-- /See:/ 'targetVPNGatewaysScopedList' smart constructor.
data TargetVPNGatewaysScopedList = TargetVPNGatewaysScopedList'
    { _tvgslTargetVPNGateways :: !(Maybe [TargetVPNGateway])
    , _tvgslWarning           :: !(Maybe TargetVPNGatewaysScopedListWarning)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'TargetVPNGatewaysScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tvgslTargetVPNGateways'
--
-- * 'tvgslWarning'
targetVPNGatewaysScopedList
    :: TargetVPNGatewaysScopedList
targetVPNGatewaysScopedList =
    TargetVPNGatewaysScopedList'
    { _tvgslTargetVPNGateways = Nothing
    , _tvgslWarning = Nothing
    }

-- | [Output Only] A list of target vpn gateways contained in this scope.
tvgslTargetVPNGateways :: Lens' TargetVPNGatewaysScopedList [TargetVPNGateway]
tvgslTargetVPNGateways
  = lens _tvgslTargetVPNGateways
      (\ s a -> s{_tvgslTargetVPNGateways = a})
      . _Default
      . _Coerce

-- | [Output Only] Informational warning which replaces the list of addresses
-- when the list is empty.
tvgslWarning :: Lens' TargetVPNGatewaysScopedList (Maybe TargetVPNGatewaysScopedListWarning)
tvgslWarning
  = lens _tvgslWarning (\ s a -> s{_tvgslWarning = a})

instance FromJSON TargetVPNGatewaysScopedList where
        parseJSON
          = withObject "TargetVPNGatewaysScopedList"
              (\ o ->
                 TargetVPNGatewaysScopedList' <$>
                   (o .:? "targetVpnGateways" .!= mempty) <*>
                     (o .:? "warning"))

instance ToJSON TargetVPNGatewaysScopedList where
        toJSON TargetVPNGatewaysScopedList'{..}
          = object
              (catMaybes
                 [("targetVpnGateways" .=) <$>
                    _tvgslTargetVPNGateways,
                  ("warning" .=) <$> _tvgslWarning])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'commitmentAggregatedListWarning' smart constructor.
data CommitmentAggregatedListWarning = CommitmentAggregatedListWarning'
    { _calwData    :: !(Maybe [CommitmentAggregatedListWarningDataItem])
    , _calwCode    :: !(Maybe CommitmentAggregatedListWarningCode)
    , _calwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentAggregatedListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'calwData'
--
-- * 'calwCode'
--
-- * 'calwMessage'
commitmentAggregatedListWarning
    :: CommitmentAggregatedListWarning
commitmentAggregatedListWarning =
    CommitmentAggregatedListWarning'
    { _calwData = Nothing
    , _calwCode = Nothing
    , _calwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
calwData :: Lens' CommitmentAggregatedListWarning [CommitmentAggregatedListWarningDataItem]
calwData
  = lens _calwData (\ s a -> s{_calwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
calwCode :: Lens' CommitmentAggregatedListWarning (Maybe CommitmentAggregatedListWarningCode)
calwCode = lens _calwCode (\ s a -> s{_calwCode = a})

-- | [Output Only] A human-readable description of the warning code.
calwMessage :: Lens' CommitmentAggregatedListWarning (Maybe Text)
calwMessage
  = lens _calwMessage (\ s a -> s{_calwMessage = a})

instance FromJSON CommitmentAggregatedListWarning
         where
        parseJSON
          = withObject "CommitmentAggregatedListWarning"
              (\ o ->
                 CommitmentAggregatedListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON CommitmentAggregatedListWarning where
        toJSON CommitmentAggregatedListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _calwData,
                  ("code" .=) <$> _calwCode,
                  ("message" .=) <$> _calwMessage])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'regionInstanceGroupListWarning' smart constructor.
data RegionInstanceGroupListWarning = RegionInstanceGroupListWarning'
    { _riglwData    :: !(Maybe [RegionInstanceGroupListWarningDataItem])
    , _riglwCode    :: !(Maybe RegionInstanceGroupListWarningCode)
    , _riglwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RegionInstanceGroupListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'riglwData'
--
-- * 'riglwCode'
--
-- * 'riglwMessage'
regionInstanceGroupListWarning
    :: RegionInstanceGroupListWarning
regionInstanceGroupListWarning =
    RegionInstanceGroupListWarning'
    { _riglwData = Nothing
    , _riglwCode = Nothing
    , _riglwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
riglwData :: Lens' RegionInstanceGroupListWarning [RegionInstanceGroupListWarningDataItem]
riglwData
  = lens _riglwData (\ s a -> s{_riglwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
riglwCode :: Lens' RegionInstanceGroupListWarning (Maybe RegionInstanceGroupListWarningCode)
riglwCode
  = lens _riglwCode (\ s a -> s{_riglwCode = a})

-- | [Output Only] A human-readable description of the warning code.
riglwMessage :: Lens' RegionInstanceGroupListWarning (Maybe Text)
riglwMessage
  = lens _riglwMessage (\ s a -> s{_riglwMessage = a})

instance FromJSON RegionInstanceGroupListWarning
         where
        parseJSON
          = withObject "RegionInstanceGroupListWarning"
              (\ o ->
                 RegionInstanceGroupListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON RegionInstanceGroupListWarning where
        toJSON RegionInstanceGroupListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _riglwData,
                  ("code" .=) <$> _riglwCode,
                  ("message" .=) <$> _riglwMessage])

-- | An access configuration attached to an instance\'s network interface.
-- Only one access config per instance is supported.
--
-- /See:/ 'accessConfig' smart constructor.
data AccessConfig = AccessConfig'
    { _acNetworkTier         :: !(Maybe AccessConfigNetworkTier)
    , _acSetPublicPtr        :: !(Maybe Bool)
    , _acKind                :: !Text
    , _acName                :: !(Maybe Text)
    , _acNATIP               :: !(Maybe Text)
    , _acPublicPtrDomainName :: !(Maybe Text)
    , _acType                :: !AccessConfigType
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AccessConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acNetworkTier'
--
-- * 'acSetPublicPtr'
--
-- * 'acKind'
--
-- * 'acName'
--
-- * 'acNATIP'
--
-- * 'acPublicPtrDomainName'
--
-- * 'acType'
accessConfig
    :: AccessConfig
accessConfig =
    AccessConfig'
    { _acNetworkTier = Nothing
    , _acSetPublicPtr = Nothing
    , _acKind = "compute#accessConfig"
    , _acName = Nothing
    , _acNATIP = Nothing
    , _acPublicPtrDomainName = Nothing
    , _acType = OneToOneNAT
    }

-- | This signifies the networking tier used for configuring this access
-- configuration and can only take the following values: PREMIUM, STANDARD.
-- If an AccessConfig is specified without a valid external IP address, an
-- ephemeral IP will be created with this networkTier. If an AccessConfig
-- with a valid external IP address is specified, it must match that of the
-- networkTier associated with the Address resource owning that IP.
acNetworkTier :: Lens' AccessConfig (Maybe AccessConfigNetworkTier)
acNetworkTier
  = lens _acNetworkTier
      (\ s a -> s{_acNetworkTier = a})

-- | Specifies whether a public DNS ?PTR? record should be created to map the
-- external IP address of the instance to a DNS domain name.
acSetPublicPtr :: Lens' AccessConfig (Maybe Bool)
acSetPublicPtr
  = lens _acSetPublicPtr
      (\ s a -> s{_acSetPublicPtr = a})

-- | [Output Only] Type of the resource. Always compute#accessConfig for
-- access configs.
acKind :: Lens' AccessConfig Text
acKind = lens _acKind (\ s a -> s{_acKind = a})

-- | The name of this access configuration. The default and recommended name
-- is External NAT but you can use any arbitrary string you would like. For
-- example, My external IP or Network Access.
acName :: Lens' AccessConfig (Maybe Text)
acName = lens _acName (\ s a -> s{_acName = a})

-- | An external IP address associated with this instance. Specify an unused
-- static external IP address available to the project or leave this field
-- undefined to use an IP from a shared ephemeral IP address pool. If you
-- specify a static external IP address, it must live in the same region as
-- the zone of the instance.
acNATIP :: Lens' AccessConfig (Maybe Text)
acNATIP = lens _acNATIP (\ s a -> s{_acNATIP = a})

-- | The DNS domain name for the public PTR record. This field can only be
-- set when the set_public_ptr field is enabled.
acPublicPtrDomainName :: Lens' AccessConfig (Maybe Text)
acPublicPtrDomainName
  = lens _acPublicPtrDomainName
      (\ s a -> s{_acPublicPtrDomainName = a})

-- | The type of configuration. The default and only option is
-- ONE_TO_ONE_NAT.
acType :: Lens' AccessConfig AccessConfigType
acType = lens _acType (\ s a -> s{_acType = a})

instance FromJSON AccessConfig where
        parseJSON
          = withObject "AccessConfig"
              (\ o ->
                 AccessConfig' <$>
                   (o .:? "networkTier") <*> (o .:? "setPublicPtr") <*>
                     (o .:? "kind" .!= "compute#accessConfig")
                     <*> (o .:? "name")
                     <*> (o .:? "natIP")
                     <*> (o .:? "publicPtrDomainName")
                     <*> (o .:? "type" .!= OneToOneNAT))

instance ToJSON AccessConfig where
        toJSON AccessConfig'{..}
          = object
              (catMaybes
                 [("networkTier" .=) <$> _acNetworkTier,
                  ("setPublicPtr" .=) <$> _acSetPublicPtr,
                  Just ("kind" .= _acKind), ("name" .=) <$> _acName,
                  ("natIP" .=) <$> _acNATIP,
                  ("publicPtrDomainName" .=) <$>
                    _acPublicPtrDomainName,
                  Just ("type" .= _acType)])

-- | Specifies what kind of log the caller must write
--
-- /See:/ 'logConfig' smart constructor.
data LogConfig = LogConfig'
    { _lcCloudAudit :: !(Maybe LogConfigCloudAuditOptions)
    , _lcDataAccess :: !(Maybe LogConfigDataAccessOptions)
    , _lcCounter    :: !(Maybe LogConfigCounterOptions)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LogConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcCloudAudit'
--
-- * 'lcDataAccess'
--
-- * 'lcCounter'
logConfig
    :: LogConfig
logConfig =
    LogConfig'
    { _lcCloudAudit = Nothing
    , _lcDataAccess = Nothing
    , _lcCounter = Nothing
    }

-- | Cloud audit options.
lcCloudAudit :: Lens' LogConfig (Maybe LogConfigCloudAuditOptions)
lcCloudAudit
  = lens _lcCloudAudit (\ s a -> s{_lcCloudAudit = a})

-- | Data access options.
lcDataAccess :: Lens' LogConfig (Maybe LogConfigDataAccessOptions)
lcDataAccess
  = lens _lcDataAccess (\ s a -> s{_lcDataAccess = a})

-- | Counter options.
lcCounter :: Lens' LogConfig (Maybe LogConfigCounterOptions)
lcCounter
  = lens _lcCounter (\ s a -> s{_lcCounter = a})

instance FromJSON LogConfig where
        parseJSON
          = withObject "LogConfig"
              (\ o ->
                 LogConfig' <$>
                   (o .:? "cloudAudit") <*> (o .:? "dataAccess") <*>
                     (o .:? "counter"))

instance ToJSON LogConfig where
        toJSON LogConfig'{..}
          = object
              (catMaybes
                 [("cloudAudit" .=) <$> _lcCloudAudit,
                  ("dataAccess" .=) <$> _lcDataAccess,
                  ("counter" .=) <$> _lcCounter])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'zoneListWarning' smart constructor.
data ZoneListWarning = ZoneListWarning'
    { _zlwData    :: !(Maybe [ZoneListWarningDataItem])
    , _zlwCode    :: !(Maybe ZoneListWarningCode)
    , _zlwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ZoneListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'zlwData'
--
-- * 'zlwCode'
--
-- * 'zlwMessage'
zoneListWarning
    :: ZoneListWarning
zoneListWarning =
    ZoneListWarning'
    { _zlwData = Nothing
    , _zlwCode = Nothing
    , _zlwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
zlwData :: Lens' ZoneListWarning [ZoneListWarningDataItem]
zlwData
  = lens _zlwData (\ s a -> s{_zlwData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
zlwCode :: Lens' ZoneListWarning (Maybe ZoneListWarningCode)
zlwCode = lens _zlwCode (\ s a -> s{_zlwCode = a})

-- | [Output Only] A human-readable description of the warning code.
zlwMessage :: Lens' ZoneListWarning (Maybe Text)
zlwMessage
  = lens _zlwMessage (\ s a -> s{_zlwMessage = a})

instance FromJSON ZoneListWarning where
        parseJSON
          = withObject "ZoneListWarning"
              (\ o ->
                 ZoneListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON ZoneListWarning where
        toJSON ZoneListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _zlwData, ("code" .=) <$> _zlwCode,
                  ("message" .=) <$> _zlwMessage])

--
-- /See:/ 'managedInstanceLastAttemptErrorsErrorsItem' smart constructor.
data ManagedInstanceLastAttemptErrorsErrorsItem = ManagedInstanceLastAttemptErrorsErrorsItem'
    { _milaeeiLocation :: !(Maybe Text)
    , _milaeeiCode     :: !(Maybe Text)
    , _milaeeiMessage  :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'ManagedInstanceLastAttemptErrorsErrorsItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'milaeeiLocation'
--
-- * 'milaeeiCode'
--
-- * 'milaeeiMessage'
managedInstanceLastAttemptErrorsErrorsItem
    :: ManagedInstanceLastAttemptErrorsErrorsItem
managedInstanceLastAttemptErrorsErrorsItem =
    ManagedInstanceLastAttemptErrorsErrorsItem'
    { _milaeeiLocation = Nothing
    , _milaeeiCode = Nothing
    , _milaeeiMessage = Nothing
    }

-- | [Output Only] Indicates the field in the request that caused the error.
-- This property is optional.
milaeeiLocation :: Lens' ManagedInstanceLastAttemptErrorsErrorsItem (Maybe Text)
milaeeiLocation
  = lens _milaeeiLocation
      (\ s a -> s{_milaeeiLocation = a})

-- | [Output Only] The error type identifier for this error.
milaeeiCode :: Lens' ManagedInstanceLastAttemptErrorsErrorsItem (Maybe Text)
milaeeiCode
  = lens _milaeeiCode (\ s a -> s{_milaeeiCode = a})

-- | [Output Only] An optional, human-readable error message.
milaeeiMessage :: Lens' ManagedInstanceLastAttemptErrorsErrorsItem (Maybe Text)
milaeeiMessage
  = lens _milaeeiMessage
      (\ s a -> s{_milaeeiMessage = a})

instance FromJSON
         ManagedInstanceLastAttemptErrorsErrorsItem where
        parseJSON
          = withObject
              "ManagedInstanceLastAttemptErrorsErrorsItem"
              (\ o ->
                 ManagedInstanceLastAttemptErrorsErrorsItem' <$>
                   (o .:? "location") <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON
         ManagedInstanceLastAttemptErrorsErrorsItem where
        toJSON
          ManagedInstanceLastAttemptErrorsErrorsItem'{..}
          = object
              (catMaybes
                 [("location" .=) <$> _milaeeiLocation,
                  ("code" .=) <$> _milaeeiCode,
                  ("message" .=) <$> _milaeeiMessage])

--
-- /See:/ 'instancesScopedListWarningDataItem' smart constructor.
data InstancesScopedListWarningDataItem = InstancesScopedListWarningDataItem'
    { _islwdiValue :: !(Maybe Text)
    , _islwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'islwdiValue'
--
-- * 'islwdiKey'
instancesScopedListWarningDataItem
    :: InstancesScopedListWarningDataItem
instancesScopedListWarningDataItem =
    InstancesScopedListWarningDataItem'
    { _islwdiValue = Nothing
    , _islwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
islwdiValue :: Lens' InstancesScopedListWarningDataItem (Maybe Text)
islwdiValue
  = lens _islwdiValue (\ s a -> s{_islwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
islwdiKey :: Lens' InstancesScopedListWarningDataItem (Maybe Text)
islwdiKey
  = lens _islwdiKey (\ s a -> s{_islwdiKey = a})

instance FromJSON InstancesScopedListWarningDataItem
         where
        parseJSON
          = withObject "InstancesScopedListWarningDataItem"
              (\ o ->
                 InstancesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON InstancesScopedListWarningDataItem
         where
        toJSON InstancesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _islwdiValue,
                  ("key" .=) <$> _islwdiKey])

-- | Labels to apply to this snapshot. These can be later modified by the
-- setLabels method. Label values may be empty.
--
-- /See:/ 'snapshotLabels' smart constructor.
newtype SnapshotLabels = SnapshotLabels'
    { _slAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'SnapshotLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'slAddtional'
snapshotLabels
    :: HashMap Text Text -- ^ 'slAddtional'
    -> SnapshotLabels
snapshotLabels pSlAddtional_ =
    SnapshotLabels'
    { _slAddtional = _Coerce # pSlAddtional_
    }

slAddtional :: Lens' SnapshotLabels (HashMap Text Text)
slAddtional
  = lens _slAddtional (\ s a -> s{_slAddtional = a}) .
      _Coerce

instance FromJSON SnapshotLabels where
        parseJSON
          = withObject "SnapshotLabels"
              (\ o -> SnapshotLabels' <$> (parseJSONObject o))

instance ToJSON SnapshotLabels where
        toJSON = toJSON . _slAddtional

--
-- /See:/ 'backendServicesScopedListWarningDataItem' smart constructor.
data BackendServicesScopedListWarningDataItem = BackendServicesScopedListWarningDataItem'
    { _bsslwdiValue :: !(Maybe Text)
    , _bsslwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServicesScopedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsslwdiValue'
--
-- * 'bsslwdiKey'
backendServicesScopedListWarningDataItem
    :: BackendServicesScopedListWarningDataItem
backendServicesScopedListWarningDataItem =
    BackendServicesScopedListWarningDataItem'
    { _bsslwdiValue = Nothing
    , _bsslwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
bsslwdiValue :: Lens' BackendServicesScopedListWarningDataItem (Maybe Text)
bsslwdiValue
  = lens _bsslwdiValue (\ s a -> s{_bsslwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
bsslwdiKey :: Lens' BackendServicesScopedListWarningDataItem (Maybe Text)
bsslwdiKey
  = lens _bsslwdiKey (\ s a -> s{_bsslwdiKey = a})

instance FromJSON
         BackendServicesScopedListWarningDataItem where
        parseJSON
          = withObject
              "BackendServicesScopedListWarningDataItem"
              (\ o ->
                 BackendServicesScopedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         BackendServicesScopedListWarningDataItem where
        toJSON BackendServicesScopedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _bsslwdiValue,
                  ("key" .=) <$> _bsslwdiKey])

-- | A list of NodeTemplatesScopedList resources.
--
-- /See:/ 'nodeTemplateAggregatedListItems' smart constructor.
newtype NodeTemplateAggregatedListItems = NodeTemplateAggregatedListItems'
    { _ntaliAddtional :: HashMap Text NodeTemplatesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTemplateAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ntaliAddtional'
nodeTemplateAggregatedListItems
    :: HashMap Text NodeTemplatesScopedList -- ^ 'ntaliAddtional'
    -> NodeTemplateAggregatedListItems
nodeTemplateAggregatedListItems pNtaliAddtional_ =
    NodeTemplateAggregatedListItems'
    { _ntaliAddtional = _Coerce # pNtaliAddtional_
    }

-- | [Output Only] Name of the scope containing this set of node templates.
ntaliAddtional :: Lens' NodeTemplateAggregatedListItems (HashMap Text NodeTemplatesScopedList)
ntaliAddtional
  = lens _ntaliAddtional
      (\ s a -> s{_ntaliAddtional = a})
      . _Coerce

instance FromJSON NodeTemplateAggregatedListItems
         where
        parseJSON
          = withObject "NodeTemplateAggregatedListItems"
              (\ o ->
                 NodeTemplateAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON NodeTemplateAggregatedListItems where
        toJSON = toJSON . _ntaliAddtional

-- | A BackendService resource. This resource defines a group of backend
-- virtual machines and their serving capacity. (== resource_for
-- v1.backendService ==) (== resource_for beta.backendService ==)
--
-- /See:/ 'backendService' smart constructor.
data BackendService = BackendService'
    { _bsSessionAffinity      :: !(Maybe BackendServiceSessionAffinity)
    , _bsBackends             :: !(Maybe [Backend])
    , _bsAffinityCookieTtlSec :: !(Maybe (Textual Int32))
    , _bsIap                  :: !(Maybe BackendServiceIAP)
    , _bsLoadBalancingScheme  :: !(Maybe BackendServiceLoadBalancingScheme)
    , _bsKind                 :: !Text
    , _bsEnableCDN            :: !(Maybe Bool)
    , _bsFingerprint          :: !(Maybe Bytes)
    , _bsProtocol             :: !(Maybe BackendServiceProtocol)
    , _bsSecurityPolicy       :: !(Maybe Text)
    , _bsCdnPolicy            :: !(Maybe BackendServiceCdnPolicy)
    , _bsSelfLink             :: !(Maybe Text)
    , _bsName                 :: !(Maybe Text)
    , _bsCreationTimestamp    :: !(Maybe Text)
    , _bsId                   :: !(Maybe (Textual Word64))
    , _bsRegion               :: !(Maybe Text)
    , _bsConnectionDraining   :: !(Maybe ConnectionDraining)
    , _bsTimeoutSec           :: !(Maybe (Textual Int32))
    , _bsDescription          :: !(Maybe Text)
    , _bsPortName             :: !(Maybe Text)
    , _bsHealthChecks         :: !(Maybe [Text])
    , _bsPort                 :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendService' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsSessionAffinity'
--
-- * 'bsBackends'
--
-- * 'bsAffinityCookieTtlSec'
--
-- * 'bsIap'
--
-- * 'bsLoadBalancingScheme'
--
-- * 'bsKind'
--
-- * 'bsEnableCDN'
--
-- * 'bsFingerprint'
--
-- * 'bsProtocol'
--
-- * 'bsSecurityPolicy'
--
-- * 'bsCdnPolicy'
--
-- * 'bsSelfLink'
--
-- * 'bsName'
--
-- * 'bsCreationTimestamp'
--
-- * 'bsId'
--
-- * 'bsRegion'
--
-- * 'bsConnectionDraining'
--
-- * 'bsTimeoutSec'
--
-- * 'bsDescription'
--
-- * 'bsPortName'
--
-- * 'bsHealthChecks'
--
-- * 'bsPort'
backendService
    :: BackendService
backendService =
    BackendService'
    { _bsSessionAffinity = Nothing
    , _bsBackends = Nothing
    , _bsAffinityCookieTtlSec = Nothing
    , _bsIap = Nothing
    , _bsLoadBalancingScheme = Nothing
    , _bsKind = "compute#backendService"
    , _bsEnableCDN = Nothing
    , _bsFingerprint = Nothing
    , _bsProtocol = Nothing
    , _bsSecurityPolicy = Nothing
    , _bsCdnPolicy = Nothing
    , _bsSelfLink = Nothing
    , _bsName = Nothing
    , _bsCreationTimestamp = Nothing
    , _bsId = Nothing
    , _bsRegion = Nothing
    , _bsConnectionDraining = Nothing
    , _bsTimeoutSec = Nothing
    , _bsDescription = Nothing
    , _bsPortName = Nothing
    , _bsHealthChecks = Nothing
    , _bsPort = Nothing
    }

-- | Type of session affinity to use. The default is NONE. When the load
-- balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or
-- GENERATED_COOKIE. When the load balancing scheme is INTERNAL, can be
-- NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO. When the
-- protocol is UDP, this field is not used.
bsSessionAffinity :: Lens' BackendService (Maybe BackendServiceSessionAffinity)
bsSessionAffinity
  = lens _bsSessionAffinity
      (\ s a -> s{_bsSessionAffinity = a})

-- | The list of backends that serve this BackendService.
bsBackends :: Lens' BackendService [Backend]
bsBackends
  = lens _bsBackends (\ s a -> s{_bsBackends = a}) .
      _Default
      . _Coerce

-- | Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE.
-- If set to 0, the cookie is non-persistent and lasts only until the end
-- of the browser session (or equivalent). The maximum allowed value for
-- TTL is one day. When the load balancing scheme is INTERNAL, this field
-- is not used.
bsAffinityCookieTtlSec :: Lens' BackendService (Maybe Int32)
bsAffinityCookieTtlSec
  = lens _bsAffinityCookieTtlSec
      (\ s a -> s{_bsAffinityCookieTtlSec = a})
      . mapping _Coerce

bsIap :: Lens' BackendService (Maybe BackendServiceIAP)
bsIap = lens _bsIap (\ s a -> s{_bsIap = a})

-- | Indicates whether the backend service will be used with internal or
-- external load balancing. A backend service created for one type of load
-- balancing cannot be used with the other. Possible values are INTERNAL
-- and EXTERNAL.
bsLoadBalancingScheme :: Lens' BackendService (Maybe BackendServiceLoadBalancingScheme)
bsLoadBalancingScheme
  = lens _bsLoadBalancingScheme
      (\ s a -> s{_bsLoadBalancingScheme = a})

-- | [Output Only] Type of resource. Always compute#backendService for
-- backend services.
bsKind :: Lens' BackendService Text
bsKind = lens _bsKind (\ s a -> s{_bsKind = a})

-- | If true, enable Cloud CDN for this BackendService. When the load
-- balancing scheme is INTERNAL, this field is not used.
bsEnableCDN :: Lens' BackendService (Maybe Bool)
bsEnableCDN
  = lens _bsEnableCDN (\ s a -> s{_bsEnableCDN = a})

-- | Fingerprint of this resource. A hash of the contents stored in this
-- object. This field is used in optimistic locking. This field will be
-- ignored when inserting a BackendService. An up-to-date fingerprint must
-- be provided in order to update the BackendService, otherwise the request
-- will fail with error 412 conditionNotMet. To see the latest fingerprint,
-- make a get() request to retrieve a BackendService.
bsFingerprint :: Lens' BackendService (Maybe ByteString)
bsFingerprint
  = lens _bsFingerprint
      (\ s a -> s{_bsFingerprint = a})
      . mapping _Bytes

-- | The protocol this BackendService uses to communicate with backends.
-- Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP. For
-- internal load balancing, the possible values are TCP and UDP, and the
-- default is TCP.
bsProtocol :: Lens' BackendService (Maybe BackendServiceProtocol)
bsProtocol
  = lens _bsProtocol (\ s a -> s{_bsProtocol = a})

-- | [Output Only] The resource URL for the security policy associated with
-- this backend service.
bsSecurityPolicy :: Lens' BackendService (Maybe Text)
bsSecurityPolicy
  = lens _bsSecurityPolicy
      (\ s a -> s{_bsSecurityPolicy = a})

-- | Cloud CDN configuration for this BackendService.
bsCdnPolicy :: Lens' BackendService (Maybe BackendServiceCdnPolicy)
bsCdnPolicy
  = lens _bsCdnPolicy (\ s a -> s{_bsCdnPolicy = a})

-- | [Output Only] Server-defined URL for the resource.
bsSelfLink :: Lens' BackendService (Maybe Text)
bsSelfLink
  = lens _bsSelfLink (\ s a -> s{_bsSelfLink = a})

-- | Name of the resource. Provided by the client when the resource is
-- created. The name must be 1-63 characters long, and comply with RFC1035.
-- Specifically, the name must be 1-63 characters long and match the
-- regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means the first
-- character must be a lowercase letter, and all following characters must
-- be a dash, lowercase letter, or digit, except the last character, which
-- cannot be a dash.
bsName :: Lens' BackendService (Maybe Text)
bsName = lens _bsName (\ s a -> s{_bsName = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
bsCreationTimestamp :: Lens' BackendService (Maybe Text)
bsCreationTimestamp
  = lens _bsCreationTimestamp
      (\ s a -> s{_bsCreationTimestamp = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
bsId :: Lens' BackendService (Maybe Word64)
bsId
  = lens _bsId (\ s a -> s{_bsId = a}) .
      mapping _Coerce

-- | [Output Only] URL of the region where the regional backend service
-- resides. This field is not applicable to global backend services. You
-- must specify this field as part of the HTTP request URL. It is not
-- settable as a field in the request body.
bsRegion :: Lens' BackendService (Maybe Text)
bsRegion = lens _bsRegion (\ s a -> s{_bsRegion = a})

bsConnectionDraining :: Lens' BackendService (Maybe ConnectionDraining)
bsConnectionDraining
  = lens _bsConnectionDraining
      (\ s a -> s{_bsConnectionDraining = a})

-- | How many seconds to wait for the backend before considering it a failed
-- request. Default is 30 seconds.
bsTimeoutSec :: Lens' BackendService (Maybe Int32)
bsTimeoutSec
  = lens _bsTimeoutSec (\ s a -> s{_bsTimeoutSec = a})
      . mapping _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
bsDescription :: Lens' BackendService (Maybe Text)
bsDescription
  = lens _bsDescription
      (\ s a -> s{_bsDescription = a})

-- | Name of backend port. The same name should appear in the instance groups
-- referenced by this service. Required when the load balancing scheme is
-- EXTERNAL. When the load balancing scheme is INTERNAL, this field is not
-- used.
bsPortName :: Lens' BackendService (Maybe Text)
bsPortName
  = lens _bsPortName (\ s a -> s{_bsPortName = a})

-- | The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for
-- health checking this BackendService. Currently at most one health check
-- can be specified, and a health check is required for Compute Engine
-- backend services. A health check must not be specified for App Engine
-- backend and Cloud Function backend. For internal load balancing, a URL
-- to a HealthCheck resource must be specified instead.
bsHealthChecks :: Lens' BackendService [Text]
bsHealthChecks
  = lens _bsHealthChecks
      (\ s a -> s{_bsHealthChecks = a})
      . _Default
      . _Coerce

-- | Deprecated in favor of portName. The TCP port to connect on the backend.
-- The default value is 80. This cannot be used for internal load
-- balancing.
bsPort :: Lens' BackendService (Maybe Int32)
bsPort
  = lens _bsPort (\ s a -> s{_bsPort = a}) .
      mapping _Coerce

instance FromJSON BackendService where
        parseJSON
          = withObject "BackendService"
              (\ o ->
                 BackendService' <$>
                   (o .:? "sessionAffinity") <*>
                     (o .:? "backends" .!= mempty)
                     <*> (o .:? "affinityCookieTtlSec")
                     <*> (o .:? "iap")
                     <*> (o .:? "loadBalancingScheme")
                     <*> (o .:? "kind" .!= "compute#backendService")
                     <*> (o .:? "enableCDN")
                     <*> (o .:? "fingerprint")
                     <*> (o .:? "protocol")
                     <*> (o .:? "securityPolicy")
                     <*> (o .:? "cdnPolicy")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "name")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "id")
                     <*> (o .:? "region")
                     <*> (o .:? "connectionDraining")
                     <*> (o .:? "timeoutSec")
                     <*> (o .:? "description")
                     <*> (o .:? "portName")
                     <*> (o .:? "healthChecks" .!= mempty)
                     <*> (o .:? "port"))

instance ToJSON BackendService where
        toJSON BackendService'{..}
          = object
              (catMaybes
                 [("sessionAffinity" .=) <$> _bsSessionAffinity,
                  ("backends" .=) <$> _bsBackends,
                  ("affinityCookieTtlSec" .=) <$>
                    _bsAffinityCookieTtlSec,
                  ("iap" .=) <$> _bsIap,
                  ("loadBalancingScheme" .=) <$>
                    _bsLoadBalancingScheme,
                  Just ("kind" .= _bsKind),
                  ("enableCDN" .=) <$> _bsEnableCDN,
                  ("fingerprint" .=) <$> _bsFingerprint,
                  ("protocol" .=) <$> _bsProtocol,
                  ("securityPolicy" .=) <$> _bsSecurityPolicy,
                  ("cdnPolicy" .=) <$> _bsCdnPolicy,
                  ("selfLink" .=) <$> _bsSelfLink,
                  ("name" .=) <$> _bsName,
                  ("creationTimestamp" .=) <$> _bsCreationTimestamp,
                  ("id" .=) <$> _bsId, ("region" .=) <$> _bsRegion,
                  ("connectionDraining" .=) <$> _bsConnectionDraining,
                  ("timeoutSec" .=) <$> _bsTimeoutSec,
                  ("description" .=) <$> _bsDescription,
                  ("portName" .=) <$> _bsPortName,
                  ("healthChecks" .=) <$> _bsHealthChecks,
                  ("port" .=) <$> _bsPort])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'instanceListWarning' smart constructor.
data InstanceListWarning = InstanceListWarning'
    { _insData    :: !(Maybe [InstanceListWarningDataItem])
    , _insCode    :: !(Maybe InstanceListWarningCode)
    , _insMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'insData'
--
-- * 'insCode'
--
-- * 'insMessage'
instanceListWarning
    :: InstanceListWarning
instanceListWarning =
    InstanceListWarning'
    { _insData = Nothing
    , _insCode = Nothing
    , _insMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
insData :: Lens' InstanceListWarning [InstanceListWarningDataItem]
insData
  = lens _insData (\ s a -> s{_insData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
insCode :: Lens' InstanceListWarning (Maybe InstanceListWarningCode)
insCode = lens _insCode (\ s a -> s{_insCode = a})

-- | [Output Only] A human-readable description of the warning code.
insMessage :: Lens' InstanceListWarning (Maybe Text)
insMessage
  = lens _insMessage (\ s a -> s{_insMessage = a})

instance FromJSON InstanceListWarning where
        parseJSON
          = withObject "InstanceListWarning"
              (\ o ->
                 InstanceListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON InstanceListWarning where
        toJSON InstanceListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _insData, ("code" .=) <$> _insCode,
                  ("message" .=) <$> _insMessage])

--
-- /See:/ 'instanceMoveRequest' smart constructor.
data InstanceMoveRequest = InstanceMoveRequest'
    { _imrTargetInstance  :: !(Maybe Text)
    , _imrDestinationZone :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceMoveRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'imrTargetInstance'
--
-- * 'imrDestinationZone'
instanceMoveRequest
    :: InstanceMoveRequest
instanceMoveRequest =
    InstanceMoveRequest'
    { _imrTargetInstance = Nothing
    , _imrDestinationZone = Nothing
    }

-- | The URL of the target instance to move. This can be a full or partial
-- URL. For example, the following are all valid URLs to an instance: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone\/instances\/instance
-- - projects\/project\/zones\/zone\/instances\/instance -
-- zones\/zone\/instances\/instance
imrTargetInstance :: Lens' InstanceMoveRequest (Maybe Text)
imrTargetInstance
  = lens _imrTargetInstance
      (\ s a -> s{_imrTargetInstance = a})

-- | The URL of the destination zone to move the instance. This can be a full
-- or partial URL. For example, the following are all valid URLs to a zone:
-- -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/zones\/zone
-- - projects\/project\/zones\/zone - zones\/zone
imrDestinationZone :: Lens' InstanceMoveRequest (Maybe Text)
imrDestinationZone
  = lens _imrDestinationZone
      (\ s a -> s{_imrDestinationZone = a})

instance FromJSON InstanceMoveRequest where
        parseJSON
          = withObject "InstanceMoveRequest"
              (\ o ->
                 InstanceMoveRequest' <$>
                   (o .:? "targetInstance") <*>
                     (o .:? "destinationZone"))

instance ToJSON InstanceMoveRequest where
        toJSON InstanceMoveRequest'{..}
          = object
              (catMaybes
                 [("targetInstance" .=) <$> _imrTargetInstance,
                  ("destinationZone" .=) <$> _imrDestinationZone])

-- | Describing the ARP neighbor entries seen on this link
--
-- /See:/ 'interconnectDiagnosticsARPEntry' smart constructor.
data InterconnectDiagnosticsARPEntry = InterconnectDiagnosticsARPEntry'
    { _idarpeIPAddress  :: !(Maybe Text)
    , _idarpeMACAddress :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectDiagnosticsARPEntry' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'idarpeIPAddress'
--
-- * 'idarpeMACAddress'
interconnectDiagnosticsARPEntry
    :: InterconnectDiagnosticsARPEntry
interconnectDiagnosticsARPEntry =
    InterconnectDiagnosticsARPEntry'
    { _idarpeIPAddress = Nothing
    , _idarpeMACAddress = Nothing
    }

-- | The IP address of this ARP neighbor.
idarpeIPAddress :: Lens' InterconnectDiagnosticsARPEntry (Maybe Text)
idarpeIPAddress
  = lens _idarpeIPAddress
      (\ s a -> s{_idarpeIPAddress = a})

-- | The MAC address of this ARP neighbor.
idarpeMACAddress :: Lens' InterconnectDiagnosticsARPEntry (Maybe Text)
idarpeMACAddress
  = lens _idarpeMACAddress
      (\ s a -> s{_idarpeMACAddress = a})

instance FromJSON InterconnectDiagnosticsARPEntry
         where
        parseJSON
          = withObject "InterconnectDiagnosticsARPEntry"
              (\ o ->
                 InterconnectDiagnosticsARPEntry' <$>
                   (o .:? "ipAddress") <*> (o .:? "macAddress"))

instance ToJSON InterconnectDiagnosticsARPEntry where
        toJSON InterconnectDiagnosticsARPEntry'{..}
          = object
              (catMaybes
                 [("ipAddress" .=) <$> _idarpeIPAddress,
                  ("macAddress" .=) <$> _idarpeMACAddress])

-- | Contains a list of Commitment resources.
--
-- /See:/ 'commitmentList' smart constructor.
data CommitmentList = CommitmentList'
    { _clNextPageToken :: !(Maybe Text)
    , _clKind          :: !Text
    , _clItems         :: !(Maybe [Commitment])
    , _clSelfLink      :: !(Maybe Text)
    , _clWarning       :: !(Maybe CommitmentListWarning)
    , _clId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'CommitmentList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'clNextPageToken'
--
-- * 'clKind'
--
-- * 'clItems'
--
-- * 'clSelfLink'
--
-- * 'clWarning'
--
-- * 'clId'
commitmentList
    :: CommitmentList
commitmentList =
    CommitmentList'
    { _clNextPageToken = Nothing
    , _clKind = "compute#commitmentList"
    , _clItems = Nothing
    , _clSelfLink = Nothing
    , _clWarning = Nothing
    , _clId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
clNextPageToken :: Lens' CommitmentList (Maybe Text)
clNextPageToken
  = lens _clNextPageToken
      (\ s a -> s{_clNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#commitmentList for lists
-- of commitments.
clKind :: Lens' CommitmentList Text
clKind = lens _clKind (\ s a -> s{_clKind = a})

-- | A list of Commitment resources.
clItems :: Lens' CommitmentList [Commitment]
clItems
  = lens _clItems (\ s a -> s{_clItems = a}) . _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
clSelfLink :: Lens' CommitmentList (Maybe Text)
clSelfLink
  = lens _clSelfLink (\ s a -> s{_clSelfLink = a})

-- | [Output Only] Informational warning message.
clWarning :: Lens' CommitmentList (Maybe CommitmentListWarning)
clWarning
  = lens _clWarning (\ s a -> s{_clWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
clId :: Lens' CommitmentList (Maybe Text)
clId = lens _clId (\ s a -> s{_clId = a})

instance FromJSON CommitmentList where
        parseJSON
          = withObject "CommitmentList"
              (\ o ->
                 CommitmentList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#commitmentList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON CommitmentList where
        toJSON CommitmentList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _clNextPageToken,
                  Just ("kind" .= _clKind), ("items" .=) <$> _clItems,
                  ("selfLink" .=) <$> _clSelfLink,
                  ("warning" .=) <$> _clWarning, ("id" .=) <$> _clId])

--
-- /See:/ 'instancesSetLabelsRequestLabels' smart constructor.
newtype InstancesSetLabelsRequestLabels = InstancesSetLabelsRequestLabels'
    { _islrlAddtional :: HashMap Text Text
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesSetLabelsRequestLabels' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'islrlAddtional'
instancesSetLabelsRequestLabels
    :: HashMap Text Text -- ^ 'islrlAddtional'
    -> InstancesSetLabelsRequestLabels
instancesSetLabelsRequestLabels pIslrlAddtional_ =
    InstancesSetLabelsRequestLabels'
    { _islrlAddtional = _Coerce # pIslrlAddtional_
    }

islrlAddtional :: Lens' InstancesSetLabelsRequestLabels (HashMap Text Text)
islrlAddtional
  = lens _islrlAddtional
      (\ s a -> s{_islrlAddtional = a})
      . _Coerce

instance FromJSON InstancesSetLabelsRequestLabels
         where
        parseJSON
          = withObject "InstancesSetLabelsRequestLabels"
              (\ o ->
                 InstancesSetLabelsRequestLabels' <$>
                   (parseJSONObject o))

instance ToJSON InstancesSetLabelsRequestLabels where
        toJSON = toJSON . _islrlAddtional

--
-- /See:/ 'instanceGroupsScopedList' smart constructor.
data InstanceGroupsScopedList = InstanceGroupsScopedList'
    { _igslWarning        :: !(Maybe InstanceGroupsScopedListWarning)
    , _igslInstanceGroups :: !(Maybe [InstanceGroup])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceGroupsScopedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'igslWarning'
--
-- * 'igslInstanceGroups'
instanceGroupsScopedList
    :: InstanceGroupsScopedList
instanceGroupsScopedList =
    InstanceGroupsScopedList'
    { _igslWarning = Nothing
    , _igslInstanceGroups = Nothing
    }

-- | [Output Only] An informational warning that replaces the list of
-- instance groups when the list is empty.
igslWarning :: Lens' InstanceGroupsScopedList (Maybe InstanceGroupsScopedListWarning)
igslWarning
  = lens _igslWarning (\ s a -> s{_igslWarning = a})

-- | [Output Only] The list of instance groups that are contained in this
-- scope.
igslInstanceGroups :: Lens' InstanceGroupsScopedList [InstanceGroup]
igslInstanceGroups
  = lens _igslInstanceGroups
      (\ s a -> s{_igslInstanceGroups = a})
      . _Default
      . _Coerce

instance FromJSON InstanceGroupsScopedList where
        parseJSON
          = withObject "InstanceGroupsScopedList"
              (\ o ->
                 InstanceGroupsScopedList' <$>
                   (o .:? "warning") <*>
                     (o .:? "instanceGroups" .!= mempty))

instance ToJSON InstanceGroupsScopedList where
        toJSON InstanceGroupsScopedList'{..}
          = object
              (catMaybes
                 [("warning" .=) <$> _igslWarning,
                  ("instanceGroups" .=) <$> _igslInstanceGroups])

--
-- /See:/ 'instancesStartWithEncryptionKeyRequest' smart constructor.
newtype InstancesStartWithEncryptionKeyRequest = InstancesStartWithEncryptionKeyRequest'
    { _iswekrDisks :: Maybe [CustomerEncryptionKeyProtectedDisk]
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstancesStartWithEncryptionKeyRequest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iswekrDisks'
instancesStartWithEncryptionKeyRequest
    :: InstancesStartWithEncryptionKeyRequest
instancesStartWithEncryptionKeyRequest =
    InstancesStartWithEncryptionKeyRequest'
    { _iswekrDisks = Nothing
    }

-- | Array of disks associated with this instance that are protected with a
-- customer-supplied encryption key. In order to start the instance, the
-- disk url and its corresponding key must be provided. If the disk is not
-- protected with a customer-supplied encryption key it should not be
-- specified.
iswekrDisks :: Lens' InstancesStartWithEncryptionKeyRequest [CustomerEncryptionKeyProtectedDisk]
iswekrDisks
  = lens _iswekrDisks (\ s a -> s{_iswekrDisks = a}) .
      _Default
      . _Coerce

instance FromJSON
         InstancesStartWithEncryptionKeyRequest where
        parseJSON
          = withObject "InstancesStartWithEncryptionKeyRequest"
              (\ o ->
                 InstancesStartWithEncryptionKeyRequest' <$>
                   (o .:? "disks" .!= mempty))

instance ToJSON
         InstancesStartWithEncryptionKeyRequest where
        toJSON InstancesStartWithEncryptionKeyRequest'{..}
          = object (catMaybes [("disks" .=) <$> _iswekrDisks])

--
-- /See:/ 'httpsHealthCheck' smart constructor.
data HTTPSHealthCheck = HTTPSHealthCheck'
    { _hhcResponse    :: !(Maybe Text)
    , _hhcRequestPath :: !(Maybe Text)
    , _hhcHost        :: !(Maybe Text)
    , _hhcProxyHeader :: !(Maybe HTTPSHealthCheckProxyHeader)
    , _hhcPortName    :: !(Maybe Text)
    , _hhcPort        :: !(Maybe (Textual Int32))
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HTTPSHealthCheck' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hhcResponse'
--
-- * 'hhcRequestPath'
--
-- * 'hhcHost'
--
-- * 'hhcProxyHeader'
--
-- * 'hhcPortName'
--
-- * 'hhcPort'
httpsHealthCheck
    :: HTTPSHealthCheck
httpsHealthCheck =
    HTTPSHealthCheck'
    { _hhcResponse = Nothing
    , _hhcRequestPath = Nothing
    , _hhcHost = Nothing
    , _hhcProxyHeader = Nothing
    , _hhcPortName = Nothing
    , _hhcPort = Nothing
    }

-- | The string to match anywhere in the first 1024 bytes of the response
-- body. If left empty (the default value), the status code determines
-- health. The response data can only be ASCII.
hhcResponse :: Lens' HTTPSHealthCheck (Maybe Text)
hhcResponse
  = lens _hhcResponse (\ s a -> s{_hhcResponse = a})

-- | The request path of the HTTPS health check request. The default value is
-- \/.
hhcRequestPath :: Lens' HTTPSHealthCheck (Maybe Text)
hhcRequestPath
  = lens _hhcRequestPath
      (\ s a -> s{_hhcRequestPath = a})

-- | The value of the host header in the HTTPS health check request. If left
-- empty (default value), the IP on behalf of which this health check is
-- performed will be used.
hhcHost :: Lens' HTTPSHealthCheck (Maybe Text)
hhcHost = lens _hhcHost (\ s a -> s{_hhcHost = a})

-- | Specifies the type of proxy header to append before sending data to the
-- backend, either NONE or PROXY_V1. The default is NONE.
hhcProxyHeader :: Lens' HTTPSHealthCheck (Maybe HTTPSHealthCheckProxyHeader)
hhcProxyHeader
  = lens _hhcProxyHeader
      (\ s a -> s{_hhcProxyHeader = a})

-- | Port name as defined in InstanceGroup#NamedPort#name. If both port and
-- port_name are defined, port takes precedence.
hhcPortName :: Lens' HTTPSHealthCheck (Maybe Text)
hhcPortName
  = lens _hhcPortName (\ s a -> s{_hhcPortName = a})

-- | The TCP port number for the health check request. The default value is
-- 443. Valid values are 1 through 65535.
hhcPort :: Lens' HTTPSHealthCheck (Maybe Int32)
hhcPort
  = lens _hhcPort (\ s a -> s{_hhcPort = a}) .
      mapping _Coerce

instance FromJSON HTTPSHealthCheck where
        parseJSON
          = withObject "HTTPSHealthCheck"
              (\ o ->
                 HTTPSHealthCheck' <$>
                   (o .:? "response") <*> (o .:? "requestPath") <*>
                     (o .:? "host")
                     <*> (o .:? "proxyHeader")
                     <*> (o .:? "portName")
                     <*> (o .:? "port"))

instance ToJSON HTTPSHealthCheck where
        toJSON HTTPSHealthCheck'{..}
          = object
              (catMaybes
                 [("response" .=) <$> _hhcResponse,
                  ("requestPath" .=) <$> _hhcRequestPath,
                  ("host" .=) <$> _hhcHost,
                  ("proxyHeader" .=) <$> _hhcProxyHeader,
                  ("portName" .=) <$> _hhcPortName,
                  ("port" .=) <$> _hhcPort])

-- | A list of VpnTunnelsScopedList resources.
--
-- /See:/ 'vpnTunnelAggregatedListItems' smart constructor.
newtype VPNTunnelAggregatedListItems = VPNTunnelAggregatedListItems'
    { _vtaliAddtional :: HashMap Text VPNTunnelsScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'VPNTunnelAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtaliAddtional'
vpnTunnelAggregatedListItems
    :: HashMap Text VPNTunnelsScopedList -- ^ 'vtaliAddtional'
    -> VPNTunnelAggregatedListItems
vpnTunnelAggregatedListItems pVtaliAddtional_ =
    VPNTunnelAggregatedListItems'
    { _vtaliAddtional = _Coerce # pVtaliAddtional_
    }

-- | Name of the scope containing this set of vpn tunnels.
vtaliAddtional :: Lens' VPNTunnelAggregatedListItems (HashMap Text VPNTunnelsScopedList)
vtaliAddtional
  = lens _vtaliAddtional
      (\ s a -> s{_vtaliAddtional = a})
      . _Coerce

instance FromJSON VPNTunnelAggregatedListItems where
        parseJSON
          = withObject "VPNTunnelAggregatedListItems"
              (\ o ->
                 VPNTunnelAggregatedListItems' <$>
                   (parseJSONObject o))

instance ToJSON VPNTunnelAggregatedListItems where
        toJSON = toJSON . _vtaliAddtional

--
-- /See:/ 'instanceAggregatedListWarningDataItem' smart constructor.
data InstanceAggregatedListWarningDataItem = InstanceAggregatedListWarningDataItem'
    { _insValue :: !(Maybe Text)
    , _insKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InstanceAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'insValue'
--
-- * 'insKey'
instanceAggregatedListWarningDataItem
    :: InstanceAggregatedListWarningDataItem
instanceAggregatedListWarningDataItem =
    InstanceAggregatedListWarningDataItem'
    { _insValue = Nothing
    , _insKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
insValue :: Lens' InstanceAggregatedListWarningDataItem (Maybe Text)
insValue = lens _insValue (\ s a -> s{_insValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
insKey :: Lens' InstanceAggregatedListWarningDataItem (Maybe Text)
insKey = lens _insKey (\ s a -> s{_insKey = a})

instance FromJSON
         InstanceAggregatedListWarningDataItem where
        parseJSON
          = withObject "InstanceAggregatedListWarningDataItem"
              (\ o ->
                 InstanceAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON InstanceAggregatedListWarningDataItem
         where
        toJSON InstanceAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _insValue, ("key" .=) <$> _insKey])

-- | A set of instance tags.
--
-- /See:/ 'tags' smart constructor.
data Tags = Tags'
    { _tFingerprint :: !(Maybe Bytes)
    , _tItems       :: !(Maybe [Text])
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Tags' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tFingerprint'
--
-- * 'tItems'
tags
    :: Tags
tags =
    Tags'
    { _tFingerprint = Nothing
    , _tItems = Nothing
    }

-- | Specifies a fingerprint for this request, which is essentially a hash of
-- the tags\' contents and used for optimistic locking. The fingerprint is
-- initially generated by Compute Engine and changes after every request to
-- modify or update tags. You must always provide an up-to-date fingerprint
-- hash in order to update or change tags. To see the latest fingerprint,
-- make get() request to the instance.
tFingerprint :: Lens' Tags (Maybe ByteString)
tFingerprint
  = lens _tFingerprint (\ s a -> s{_tFingerprint = a})
      . mapping _Bytes

-- | An array of tags. Each tag must be 1-63 characters long, and comply with
-- RFC1035.
tItems :: Lens' Tags [Text]
tItems
  = lens _tItems (\ s a -> s{_tItems = a}) . _Default .
      _Coerce

instance FromJSON Tags where
        parseJSON
          = withObject "Tags"
              (\ o ->
                 Tags' <$>
                   (o .:? "fingerprint") <*> (o .:? "items" .!= mempty))

instance ToJSON Tags where
        toJSON Tags'{..}
          = object
              (catMaybes
                 [("fingerprint" .=) <$> _tFingerprint,
                  ("items" .=) <$> _tItems])

--
-- /See:/ 'addressAggregatedList' smart constructor.
data AddressAggregatedList = AddressAggregatedList'
    { _addNextPageToken :: !(Maybe Text)
    , _addKind          :: !Text
    , _addItems         :: !(Maybe AddressAggregatedListItems)
    , _addSelfLink      :: !(Maybe Text)
    , _addWarning       :: !(Maybe AddressAggregatedListWarning)
    , _addId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'AddressAggregatedList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'addNextPageToken'
--
-- * 'addKind'
--
-- * 'addItems'
--
-- * 'addSelfLink'
--
-- * 'addWarning'
--
-- * 'addId'
addressAggregatedList
    :: AddressAggregatedList
addressAggregatedList =
    AddressAggregatedList'
    { _addNextPageToken = Nothing
    , _addKind = "compute#addressAggregatedList"
    , _addItems = Nothing
    , _addSelfLink = Nothing
    , _addWarning = Nothing
    , _addId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
addNextPageToken :: Lens' AddressAggregatedList (Maybe Text)
addNextPageToken
  = lens _addNextPageToken
      (\ s a -> s{_addNextPageToken = a})

-- | [Output Only] Type of resource. Always compute#addressAggregatedList for
-- aggregated lists of addresses.
addKind :: Lens' AddressAggregatedList Text
addKind = lens _addKind (\ s a -> s{_addKind = a})

-- | A list of AddressesScopedList resources.
addItems :: Lens' AddressAggregatedList (Maybe AddressAggregatedListItems)
addItems = lens _addItems (\ s a -> s{_addItems = a})

-- | [Output Only] Server-defined URL for this resource.
addSelfLink :: Lens' AddressAggregatedList (Maybe Text)
addSelfLink
  = lens _addSelfLink (\ s a -> s{_addSelfLink = a})

-- | [Output Only] Informational warning message.
addWarning :: Lens' AddressAggregatedList (Maybe AddressAggregatedListWarning)
addWarning
  = lens _addWarning (\ s a -> s{_addWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
addId :: Lens' AddressAggregatedList (Maybe Text)
addId = lens _addId (\ s a -> s{_addId = a})

instance FromJSON AddressAggregatedList where
        parseJSON
          = withObject "AddressAggregatedList"
              (\ o ->
                 AddressAggregatedList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!= "compute#addressAggregatedList")
                     <*> (o .:? "items")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON AddressAggregatedList where
        toJSON AddressAggregatedList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _addNextPageToken,
                  Just ("kind" .= _addKind),
                  ("items" .=) <$> _addItems,
                  ("selfLink" .=) <$> _addSelfLink,
                  ("warning" .=) <$> _addWarning,
                  ("id" .=) <$> _addId])

-- | Response to the list request, and contains a list of interconnect
-- attachments.
--
-- /See:/ 'interconnectAttachmentList' smart constructor.
data InterconnectAttachmentList = InterconnectAttachmentList'
    { _ialaNextPageToken :: !(Maybe Text)
    , _ialaKind          :: !Text
    , _ialaItems         :: !(Maybe [InterconnectAttachment])
    , _ialaSelfLink      :: !(Maybe Text)
    , _ialaWarning       :: !(Maybe InterconnectAttachmentListWarning)
    , _ialaId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'InterconnectAttachmentList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ialaNextPageToken'
--
-- * 'ialaKind'
--
-- * 'ialaItems'
--
-- * 'ialaSelfLink'
--
-- * 'ialaWarning'
--
-- * 'ialaId'
interconnectAttachmentList
    :: InterconnectAttachmentList
interconnectAttachmentList =
    InterconnectAttachmentList'
    { _ialaNextPageToken = Nothing
    , _ialaKind = "compute#interconnectAttachmentList"
    , _ialaItems = Nothing
    , _ialaSelfLink = Nothing
    , _ialaWarning = Nothing
    , _ialaId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
ialaNextPageToken :: Lens' InterconnectAttachmentList (Maybe Text)
ialaNextPageToken
  = lens _ialaNextPageToken
      (\ s a -> s{_ialaNextPageToken = a})

-- | [Output Only] Type of resource. Always
-- compute#interconnectAttachmentList for lists of interconnect
-- attachments.
ialaKind :: Lens' InterconnectAttachmentList Text
ialaKind = lens _ialaKind (\ s a -> s{_ialaKind = a})

-- | A list of InterconnectAttachment resources.
ialaItems :: Lens' InterconnectAttachmentList [InterconnectAttachment]
ialaItems
  = lens _ialaItems (\ s a -> s{_ialaItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
ialaSelfLink :: Lens' InterconnectAttachmentList (Maybe Text)
ialaSelfLink
  = lens _ialaSelfLink (\ s a -> s{_ialaSelfLink = a})

-- | [Output Only] Informational warning message.
ialaWarning :: Lens' InterconnectAttachmentList (Maybe InterconnectAttachmentListWarning)
ialaWarning
  = lens _ialaWarning (\ s a -> s{_ialaWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
ialaId :: Lens' InterconnectAttachmentList (Maybe Text)
ialaId = lens _ialaId (\ s a -> s{_ialaId = a})

instance FromJSON InterconnectAttachmentList where
        parseJSON
          = withObject "InterconnectAttachmentList"
              (\ o ->
                 InterconnectAttachmentList' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "kind" .!=
                        "compute#interconnectAttachmentList")
                     <*> (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON InterconnectAttachmentList where
        toJSON InterconnectAttachmentList'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _ialaNextPageToken,
                  Just ("kind" .= _ialaKind),
                  ("items" .=) <$> _ialaItems,
                  ("selfLink" .=) <$> _ialaSelfLink,
                  ("warning" .=) <$> _ialaWarning,
                  ("id" .=) <$> _ialaId])

--
-- /See:/ 'operationWarningsItem' smart constructor.
data OperationWarningsItem = OperationWarningsItem'
    { _owiData    :: !(Maybe [OperationWarningsItemDataItem])
    , _owiCode    :: !(Maybe OperationWarningsItemCode)
    , _owiMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'OperationWarningsItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'owiData'
--
-- * 'owiCode'
--
-- * 'owiMessage'
operationWarningsItem
    :: OperationWarningsItem
operationWarningsItem =
    OperationWarningsItem'
    { _owiData = Nothing
    , _owiCode = Nothing
    , _owiMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
owiData :: Lens' OperationWarningsItem [OperationWarningsItemDataItem]
owiData
  = lens _owiData (\ s a -> s{_owiData = a}) . _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
owiCode :: Lens' OperationWarningsItem (Maybe OperationWarningsItemCode)
owiCode = lens _owiCode (\ s a -> s{_owiCode = a})

-- | [Output Only] A human-readable description of the warning code.
owiMessage :: Lens' OperationWarningsItem (Maybe Text)
owiMessage
  = lens _owiMessage (\ s a -> s{_owiMessage = a})

instance FromJSON OperationWarningsItem where
        parseJSON
          = withObject "OperationWarningsItem"
              (\ o ->
                 OperationWarningsItem' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON OperationWarningsItem where
        toJSON OperationWarningsItem'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _owiData, ("code" .=) <$> _owiCode,
                  ("message" .=) <$> _owiMessage])

-- | Associates \`members\` with a \`role\`.
--
-- /See:/ 'binding' smart constructor.
data Binding = Binding'
    { _bMembers   :: !(Maybe [Text])
    , _bRole      :: !(Maybe Text)
    , _bCondition :: !(Maybe Expr)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Binding' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bMembers'
--
-- * 'bRole'
--
-- * 'bCondition'
binding
    :: Binding
binding =
    Binding'
    { _bMembers = Nothing
    , _bRole = Nothing
    , _bCondition = Nothing
    }

-- | Specifies the identities requesting access for a Cloud Platform
-- resource. \`members\` can have the following values: * \`allUsers\`: A
-- special identifier that represents anyone who is on the internet; with
-- or without a Google account. * \`allAuthenticatedUsers\`: A special
-- identifier that represents anyone who is authenticated with a Google
-- account or a service account. * \`user:{emailid}\`: An email address
-- that represents a specific Google account. For example,
-- \`alice\'gmail.com\` . * \`serviceAccount:{emailid}\`: An email address
-- that represents a service account. For example,
-- \`my-other-app\'appspot.gserviceaccount.com\`. * \`group:{emailid}\`: An
-- email address that represents a Google group. For example,
-- \`admins\'example.com\`. * \`domain:{domain}\`: A Google Apps domain
-- name that represents all the users of that domain. For example,
-- \`google.com\` or \`example.com\`.
bMembers :: Lens' Binding [Text]
bMembers
  = lens _bMembers (\ s a -> s{_bMembers = a}) .
      _Default
      . _Coerce

-- | Role that is assigned to \`members\`. For example, \`roles\/viewer\`,
-- \`roles\/editor\`, or \`roles\/owner\`.
bRole :: Lens' Binding (Maybe Text)
bRole = lens _bRole (\ s a -> s{_bRole = a})

-- | Unimplemented. The condition that is associated with this binding. NOTE:
-- an unsatisfied condition will not allow user access via current binding.
-- Different bindings, including their conditions, are examined
-- independently.
bCondition :: Lens' Binding (Maybe Expr)
bCondition
  = lens _bCondition (\ s a -> s{_bCondition = a})

instance FromJSON Binding where
        parseJSON
          = withObject "Binding"
              (\ o ->
                 Binding' <$>
                   (o .:? "members" .!= mempty) <*> (o .:? "role") <*>
                     (o .:? "condition"))

instance ToJSON Binding where
        toJSON Binding'{..}
          = object
              (catMaybes
                 [("members" .=) <$> _bMembers,
                  ("role" .=) <$> _bRole,
                  ("condition" .=) <$> _bCondition])

-- | Message for the expected URL mappings.
--
-- /See:/ 'urlMapTest' smart constructor.
data URLMapTest = URLMapTest'
    { _umtPath        :: !(Maybe Text)
    , _umtService     :: !(Maybe Text)
    , _umtHost        :: !(Maybe Text)
    , _umtDescription :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'URLMapTest' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'umtPath'
--
-- * 'umtService'
--
-- * 'umtHost'
--
-- * 'umtDescription'
urlMapTest
    :: URLMapTest
urlMapTest =
    URLMapTest'
    { _umtPath = Nothing
    , _umtService = Nothing
    , _umtHost = Nothing
    , _umtDescription = Nothing
    }

-- | Path portion of the URL.
umtPath :: Lens' URLMapTest (Maybe Text)
umtPath = lens _umtPath (\ s a -> s{_umtPath = a})

-- | Expected BackendService resource the given URL should be mapped to.
umtService :: Lens' URLMapTest (Maybe Text)
umtService
  = lens _umtService (\ s a -> s{_umtService = a})

-- | Host portion of the URL.
umtHost :: Lens' URLMapTest (Maybe Text)
umtHost = lens _umtHost (\ s a -> s{_umtHost = a})

-- | Description of this test case.
umtDescription :: Lens' URLMapTest (Maybe Text)
umtDescription
  = lens _umtDescription
      (\ s a -> s{_umtDescription = a})

instance FromJSON URLMapTest where
        parseJSON
          = withObject "URLMapTest"
              (\ o ->
                 URLMapTest' <$>
                   (o .:? "path") <*> (o .:? "service") <*>
                     (o .:? "host")
                     <*> (o .:? "description"))

instance ToJSON URLMapTest where
        toJSON URLMapTest'{..}
          = object
              (catMaybes
                 [("path" .=) <$> _umtPath,
                  ("service" .=) <$> _umtService,
                  ("host" .=) <$> _umtHost,
                  ("description" .=) <$> _umtDescription])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'httpsHealthCheckListWarning' smart constructor.
data HTTPSHealthCheckListWarning = HTTPSHealthCheckListWarning'
    { _hhclwData    :: !(Maybe [HTTPSHealthCheckListWarningDataItem])
    , _hhclwCode    :: !(Maybe HTTPSHealthCheckListWarningCode)
    , _hhclwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'HTTPSHealthCheckListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'hhclwData'
--
-- * 'hhclwCode'
--
-- * 'hhclwMessage'
httpsHealthCheckListWarning
    :: HTTPSHealthCheckListWarning
httpsHealthCheckListWarning =
    HTTPSHealthCheckListWarning'
    { _hhclwData = Nothing
    , _hhclwCode = Nothing
    , _hhclwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
hhclwData :: Lens' HTTPSHealthCheckListWarning [HTTPSHealthCheckListWarningDataItem]
hhclwData
  = lens _hhclwData (\ s a -> s{_hhclwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
hhclwCode :: Lens' HTTPSHealthCheckListWarning (Maybe HTTPSHealthCheckListWarningCode)
hhclwCode
  = lens _hhclwCode (\ s a -> s{_hhclwCode = a})

-- | [Output Only] A human-readable description of the warning code.
hhclwMessage :: Lens' HTTPSHealthCheckListWarning (Maybe Text)
hhclwMessage
  = lens _hhclwMessage (\ s a -> s{_hhclwMessage = a})

instance FromJSON HTTPSHealthCheckListWarning where
        parseJSON
          = withObject "HTTPSHealthCheckListWarning"
              (\ o ->
                 HTTPSHealthCheckListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON HTTPSHealthCheckListWarning where
        toJSON HTTPSHealthCheckListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _hhclwData,
                  ("code" .=) <$> _hhclwCode,
                  ("message" .=) <$> _hhclwMessage])

-- | A list of NodeTypesScopedList resources.
--
-- /See:/ 'nodeTypeAggregatedListItems' smart constructor.
newtype NodeTypeAggregatedListItems = NodeTypeAggregatedListItems'
    { _nAddtional :: HashMap Text NodeTypesScopedList
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'NodeTypeAggregatedListItems' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'nAddtional'
nodeTypeAggregatedListItems
    :: HashMap Text NodeTypesScopedList -- ^ 'nAddtional'
    -> NodeTypeAggregatedListItems
nodeTypeAggregatedListItems pNAddtional_ =
    NodeTypeAggregatedListItems'
    { _nAddtional = _Coerce # pNAddtional_
    }

-- | [Output Only] Name of the scope containing this set of node types.
nAddtional :: Lens' NodeTypeAggregatedListItems (HashMap Text NodeTypesScopedList)
nAddtional
  = lens _nAddtional (\ s a -> s{_nAddtional = a}) .
      _Coerce

instance FromJSON NodeTypeAggregatedListItems where
        parseJSON
          = withObject "NodeTypeAggregatedListItems"
              (\ o ->
                 NodeTypeAggregatedListItems' <$> (parseJSONObject o))

instance ToJSON NodeTypeAggregatedListItems where
        toJSON = toJSON . _nAddtional

--
-- /See:/ 'routersPreviewResponse' smart constructor.
newtype RoutersPreviewResponse = RoutersPreviewResponse'
    { _rprResource :: Maybe Router
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'RoutersPreviewResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rprResource'
routersPreviewResponse
    :: RoutersPreviewResponse
routersPreviewResponse =
    RoutersPreviewResponse'
    { _rprResource = Nothing
    }

-- | Preview of given router.
rprResource :: Lens' RoutersPreviewResponse (Maybe Router)
rprResource
  = lens _rprResource (\ s a -> s{_rprResource = a})

instance FromJSON RoutersPreviewResponse where
        parseJSON
          = withObject "RoutersPreviewResponse"
              (\ o ->
                 RoutersPreviewResponse' <$> (o .:? "resource"))

instance ToJSON RoutersPreviewResponse where
        toJSON RoutersPreviewResponse'{..}
          = object
              (catMaybes [("resource" .=) <$> _rprResource])

--
-- /See:/ 'licensesListResponse' smart constructor.
data LicensesListResponse = LicensesListResponse'
    { _llrNextPageToken :: !(Maybe Text)
    , _llrItems         :: !(Maybe [License])
    , _llrSelfLink      :: !(Maybe Text)
    , _llrWarning       :: !(Maybe LicensesListResponseWarning)
    , _llrId            :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'LicensesListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'llrNextPageToken'
--
-- * 'llrItems'
--
-- * 'llrSelfLink'
--
-- * 'llrWarning'
--
-- * 'llrId'
licensesListResponse
    :: LicensesListResponse
licensesListResponse =
    LicensesListResponse'
    { _llrNextPageToken = Nothing
    , _llrItems = Nothing
    , _llrSelfLink = Nothing
    , _llrWarning = Nothing
    , _llrId = Nothing
    }

-- | [Output Only] This token allows you to get the next page of results for
-- list requests. If the number of results is larger than maxResults, use
-- the nextPageToken as a value for the query parameter pageToken in the
-- next list request. Subsequent list requests will have their own
-- nextPageToken to continue paging through the results.
llrNextPageToken :: Lens' LicensesListResponse (Maybe Text)
llrNextPageToken
  = lens _llrNextPageToken
      (\ s a -> s{_llrNextPageToken = a})

-- | A list of License resources.
llrItems :: Lens' LicensesListResponse [License]
llrItems
  = lens _llrItems (\ s a -> s{_llrItems = a}) .
      _Default
      . _Coerce

-- | [Output Only] Server-defined URL for this resource.
llrSelfLink :: Lens' LicensesListResponse (Maybe Text)
llrSelfLink
  = lens _llrSelfLink (\ s a -> s{_llrSelfLink = a})

-- | [Output Only] Informational warning message.
llrWarning :: Lens' LicensesListResponse (Maybe LicensesListResponseWarning)
llrWarning
  = lens _llrWarning (\ s a -> s{_llrWarning = a})

-- | [Output Only] Unique identifier for the resource; defined by the server.
llrId :: Lens' LicensesListResponse (Maybe Text)
llrId = lens _llrId (\ s a -> s{_llrId = a})

instance FromJSON LicensesListResponse where
        parseJSON
          = withObject "LicensesListResponse"
              (\ o ->
                 LicensesListResponse' <$>
                   (o .:? "nextPageToken") <*>
                     (o .:? "items" .!= mempty)
                     <*> (o .:? "selfLink")
                     <*> (o .:? "warning")
                     <*> (o .:? "id"))

instance ToJSON LicensesListResponse where
        toJSON LicensesListResponse'{..}
          = object
              (catMaybes
                 [("nextPageToken" .=) <$> _llrNextPageToken,
                  ("items" .=) <$> _llrItems,
                  ("selfLink" .=) <$> _llrSelfLink,
                  ("warning" .=) <$> _llrWarning,
                  ("id" .=) <$> _llrId])

--
-- /See:/ 'backendServiceAggregatedListWarningDataItem' smart constructor.
data BackendServiceAggregatedListWarningDataItem = BackendServiceAggregatedListWarningDataItem'
    { _bsalwdiValue :: !(Maybe Text)
    , _bsalwdiKey   :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceAggregatedListWarningDataItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bsalwdiValue'
--
-- * 'bsalwdiKey'
backendServiceAggregatedListWarningDataItem
    :: BackendServiceAggregatedListWarningDataItem
backendServiceAggregatedListWarningDataItem =
    BackendServiceAggregatedListWarningDataItem'
    { _bsalwdiValue = Nothing
    , _bsalwdiKey = Nothing
    }

-- | [Output Only] A warning data value corresponding to the key.
bsalwdiValue :: Lens' BackendServiceAggregatedListWarningDataItem (Maybe Text)
bsalwdiValue
  = lens _bsalwdiValue (\ s a -> s{_bsalwdiValue = a})

-- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and a suggested replacement, or a warning about
-- invalid network settings (for example, if an instance attempts to
-- perform IP forwarding but is not enabled for IP forwarding).
bsalwdiKey :: Lens' BackendServiceAggregatedListWarningDataItem (Maybe Text)
bsalwdiKey
  = lens _bsalwdiKey (\ s a -> s{_bsalwdiKey = a})

instance FromJSON
         BackendServiceAggregatedListWarningDataItem where
        parseJSON
          = withObject
              "BackendServiceAggregatedListWarningDataItem"
              (\ o ->
                 BackendServiceAggregatedListWarningDataItem' <$>
                   (o .:? "value") <*> (o .:? "key"))

instance ToJSON
         BackendServiceAggregatedListWarningDataItem where
        toJSON
          BackendServiceAggregatedListWarningDataItem'{..}
          = object
              (catMaybes
                 [("value" .=) <$> _bsalwdiValue,
                  ("key" .=) <$> _bsalwdiKey])

-- | An Instance resource. (== resource_for beta.instances ==) (==
-- resource_for v1.instances ==)
--
-- /See:/ 'instance'' smart constructor.
data Instance = Instance'
    { _i1Status             :: !(Maybe InstanceStatus)
    , _i1ServiceAccounts    :: !(Maybe [ServiceAccount])
    , _i1DeletionProtection :: !(Maybe Bool)
    , _i1NetworkInterfaces  :: !(Maybe [NetworkInterface])
    , _i1Kind               :: !Text
    , _i1Zone               :: !(Maybe Text)
    , _i1CPUPlatform        :: !(Maybe Text)
    , _i1SelfLink           :: !(Maybe Text)
    , _i1GuestAccelerators  :: !(Maybe [AcceleratorConfig])
    , _i1Name               :: !(Maybe Text)
    , _i1StatusMessage      :: !(Maybe Text)
    , _i1CreationTimestamp  :: !(Maybe Text)
    , _i1MachineType        :: !(Maybe Text)
    , _i1Metadata           :: !(Maybe Metadata)
    , _i1Id                 :: !(Maybe (Textual Word64))
    , _i1Labels             :: !(Maybe InstanceLabels)
    , _i1StartRestricted    :: !(Maybe Bool)
    , _i1Scheduling         :: !(Maybe Scheduling)
    , _i1MinCPUPlatform     :: !(Maybe Text)
    , _i1Disks              :: !(Maybe [AttachedDisk])
    , _i1CanIPForward       :: !(Maybe Bool)
    , _i1LabelFingerprint   :: !(Maybe Bytes)
    , _i1Description        :: !(Maybe Text)
    , _i1Tags               :: !(Maybe Tags)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'Instance' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'i1Status'
--
-- * 'i1ServiceAccounts'
--
-- * 'i1DeletionProtection'
--
-- * 'i1NetworkInterfaces'
--
-- * 'i1Kind'
--
-- * 'i1Zone'
--
-- * 'i1CPUPlatform'
--
-- * 'i1SelfLink'
--
-- * 'i1GuestAccelerators'
--
-- * 'i1Name'
--
-- * 'i1StatusMessage'
--
-- * 'i1CreationTimestamp'
--
-- * 'i1MachineType'
--
-- * 'i1Metadata'
--
-- * 'i1Id'
--
-- * 'i1Labels'
--
-- * 'i1StartRestricted'
--
-- * 'i1Scheduling'
--
-- * 'i1MinCPUPlatform'
--
-- * 'i1Disks'
--
-- * 'i1CanIPForward'
--
-- * 'i1LabelFingerprint'
--
-- * 'i1Description'
--
-- * 'i1Tags'
instance'
    :: Instance
instance' =
    Instance'
    { _i1Status = Nothing
    , _i1ServiceAccounts = Nothing
    , _i1DeletionProtection = Nothing
    , _i1NetworkInterfaces = Nothing
    , _i1Kind = "compute#instance"
    , _i1Zone = Nothing
    , _i1CPUPlatform = Nothing
    , _i1SelfLink = Nothing
    , _i1GuestAccelerators = Nothing
    , _i1Name = Nothing
    , _i1StatusMessage = Nothing
    , _i1CreationTimestamp = Nothing
    , _i1MachineType = Nothing
    , _i1Metadata = Nothing
    , _i1Id = Nothing
    , _i1Labels = Nothing
    , _i1StartRestricted = Nothing
    , _i1Scheduling = Nothing
    , _i1MinCPUPlatform = Nothing
    , _i1Disks = Nothing
    , _i1CanIPForward = Nothing
    , _i1LabelFingerprint = Nothing
    , _i1Description = Nothing
    , _i1Tags = Nothing
    }

-- | [Output Only] The status of the instance. One of the following values:
-- PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING,
-- SUSPENDED, and TERMINATED.
i1Status :: Lens' Instance (Maybe InstanceStatus)
i1Status = lens _i1Status (\ s a -> s{_i1Status = a})

-- | A list of service accounts, with their specified scopes, authorized for
-- this instance. Only one service account per VM instance is supported.
-- Service accounts generate access tokens that can be accessed through the
-- metadata server and used to authenticate applications on the instance.
-- See Service Accounts for more information.
i1ServiceAccounts :: Lens' Instance [ServiceAccount]
i1ServiceAccounts
  = lens _i1ServiceAccounts
      (\ s a -> s{_i1ServiceAccounts = a})
      . _Default
      . _Coerce

-- | Whether the resource should be protected against deletion.
i1DeletionProtection :: Lens' Instance (Maybe Bool)
i1DeletionProtection
  = lens _i1DeletionProtection
      (\ s a -> s{_i1DeletionProtection = a})

-- | An array of network configurations for this instance. These specify how
-- interfaces are configured to interact with other network services, such
-- as connecting to the internet. Multiple interfaces are supported per
-- instance.
i1NetworkInterfaces :: Lens' Instance [NetworkInterface]
i1NetworkInterfaces
  = lens _i1NetworkInterfaces
      (\ s a -> s{_i1NetworkInterfaces = a})
      . _Default
      . _Coerce

-- | [Output Only] Type of the resource. Always compute#instance for
-- instances.
i1Kind :: Lens' Instance Text
i1Kind = lens _i1Kind (\ s a -> s{_i1Kind = a})

-- | [Output Only] URL of the zone where the instance resides. You must
-- specify this field as part of the HTTP request URL. It is not settable
-- as a field in the request body.
i1Zone :: Lens' Instance (Maybe Text)
i1Zone = lens _i1Zone (\ s a -> s{_i1Zone = a})

-- | [Output Only] The CPU platform used by this instance.
i1CPUPlatform :: Lens' Instance (Maybe Text)
i1CPUPlatform
  = lens _i1CPUPlatform
      (\ s a -> s{_i1CPUPlatform = a})

-- | [Output Only] Server-defined URL for this resource.
i1SelfLink :: Lens' Instance (Maybe Text)
i1SelfLink
  = lens _i1SelfLink (\ s a -> s{_i1SelfLink = a})

-- | A list of the type and count of accelerator cards attached to the
-- instance.
i1GuestAccelerators :: Lens' Instance [AcceleratorConfig]
i1GuestAccelerators
  = lens _i1GuestAccelerators
      (\ s a -> s{_i1GuestAccelerators = a})
      . _Default
      . _Coerce

-- | The name of the resource, provided by the client when initially creating
-- the resource. The resource name must be 1-63 characters long, and comply
-- with RFC1035. Specifically, the name must be 1-63 characters long and
-- match the regular expression \`[a-z]([-a-z0-9]*[a-z0-9])?\` which means
-- the first character must be a lowercase letter, and all following
-- characters must be a dash, lowercase letter, or digit, except the last
-- character, which cannot be a dash.
i1Name :: Lens' Instance (Maybe Text)
i1Name = lens _i1Name (\ s a -> s{_i1Name = a})

-- | [Output Only] An optional, human-readable explanation of the status.
i1StatusMessage :: Lens' Instance (Maybe Text)
i1StatusMessage
  = lens _i1StatusMessage
      (\ s a -> s{_i1StatusMessage = a})

-- | [Output Only] Creation timestamp in RFC3339 text format.
i1CreationTimestamp :: Lens' Instance (Maybe Text)
i1CreationTimestamp
  = lens _i1CreationTimestamp
      (\ s a -> s{_i1CreationTimestamp = a})

-- | Full or partial URL of the machine type resource to use for this
-- instance, in the format: zones\/zone\/machineTypes\/machine-type. This
-- is provided by the client when the instance is created. For example, the
-- following is a valid partial url to a predefined machine type:
-- zones\/us-central1-f\/machineTypes\/n1-standard-1 To create a custom
-- machine type, provide a URL to a machine type in the following format,
-- where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and
-- MEMORY is the total memory for this instance. Memory must be a multiple
-- of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
-- zones\/zone\/machineTypes\/custom-CPUS-MEMORY For example:
-- zones\/us-central1-f\/machineTypes\/custom-4-5120 For a full list of
-- restrictions, read the Specifications for custom machine types.
i1MachineType :: Lens' Instance (Maybe Text)
i1MachineType
  = lens _i1MachineType
      (\ s a -> s{_i1MachineType = a})

-- | The metadata key\/value pairs assigned to this instance. This includes
-- custom metadata and predefined keys.
i1Metadata :: Lens' Instance (Maybe Metadata)
i1Metadata
  = lens _i1Metadata (\ s a -> s{_i1Metadata = a})

-- | [Output Only] The unique identifier for the resource. This identifier is
-- defined by the server.
i1Id :: Lens' Instance (Maybe Word64)
i1Id
  = lens _i1Id (\ s a -> s{_i1Id = a}) .
      mapping _Coerce

-- | Labels to apply to this instance. These can be later modified by the
-- setLabels method.
i1Labels :: Lens' Instance (Maybe InstanceLabels)
i1Labels = lens _i1Labels (\ s a -> s{_i1Labels = a})

-- | [Output Only] Whether a VM has been restricted for start because Compute
-- Engine has detected suspicious activity.
i1StartRestricted :: Lens' Instance (Maybe Bool)
i1StartRestricted
  = lens _i1StartRestricted
      (\ s a -> s{_i1StartRestricted = a})

-- | Sets the scheduling options for this instance.
i1Scheduling :: Lens' Instance (Maybe Scheduling)
i1Scheduling
  = lens _i1Scheduling (\ s a -> s{_i1Scheduling = a})

-- | Specifies a minimum CPU platform for the VM instance. Applicable values
-- are the friendly names of CPU platforms, such as minCpuPlatform: \"Intel
-- Haswell\" or minCpuPlatform: \"Intel Sandy Bridge\".
i1MinCPUPlatform :: Lens' Instance (Maybe Text)
i1MinCPUPlatform
  = lens _i1MinCPUPlatform
      (\ s a -> s{_i1MinCPUPlatform = a})

-- | Array of disks associated with this instance. Persistent disks must be
-- created before you can assign them.
i1Disks :: Lens' Instance [AttachedDisk]
i1Disks
  = lens _i1Disks (\ s a -> s{_i1Disks = a}) . _Default
      . _Coerce

-- | Allows this instance to send and receive packets with non-matching
-- destination or source IPs. This is required if you plan to use this
-- instance to forward routes. For more information, see Enabling IP
-- Forwarding.
i1CanIPForward :: Lens' Instance (Maybe Bool)
i1CanIPForward
  = lens _i1CanIPForward
      (\ s a -> s{_i1CanIPForward = a})

-- | A fingerprint for this request, which is essentially a hash of the
-- label\'s contents and used for optimistic locking. The fingerprint is
-- initially generated by Compute Engine and changes after every request to
-- modify or update labels. You must always provide an up-to-date
-- fingerprint hash in order to update or change labels. To see the latest
-- fingerprint, make get() request to the instance.
i1LabelFingerprint :: Lens' Instance (Maybe ByteString)
i1LabelFingerprint
  = lens _i1LabelFingerprint
      (\ s a -> s{_i1LabelFingerprint = a})
      . mapping _Bytes

-- | An optional description of this resource. Provide this property when you
-- create the resource.
i1Description :: Lens' Instance (Maybe Text)
i1Description
  = lens _i1Description
      (\ s a -> s{_i1Description = a})

-- | Tags to apply to this instance. Tags are used to identify valid sources
-- or targets for network firewalls and are specified by the client during
-- instance creation. The tags can be later modified by the setTags method.
-- Each tag within the list must comply with RFC1035. Multiple tags can be
-- specified via the \'tags.items\' field.
i1Tags :: Lens' Instance (Maybe Tags)
i1Tags = lens _i1Tags (\ s a -> s{_i1Tags = a})

instance FromJSON Instance where
        parseJSON
          = withObject "Instance"
              (\ o ->
                 Instance' <$>
                   (o .:? "status") <*>
                     (o .:? "serviceAccounts" .!= mempty)
                     <*> (o .:? "deletionProtection")
                     <*> (o .:? "networkInterfaces" .!= mempty)
                     <*> (o .:? "kind" .!= "compute#instance")
                     <*> (o .:? "zone")
                     <*> (o .:? "cpuPlatform")
                     <*> (o .:? "selfLink")
                     <*> (o .:? "guestAccelerators" .!= mempty)
                     <*> (o .:? "name")
                     <*> (o .:? "statusMessage")
                     <*> (o .:? "creationTimestamp")
                     <*> (o .:? "machineType")
                     <*> (o .:? "metadata")
                     <*> (o .:? "id")
                     <*> (o .:? "labels")
                     <*> (o .:? "startRestricted")
                     <*> (o .:? "scheduling")
                     <*> (o .:? "minCpuPlatform")
                     <*> (o .:? "disks" .!= mempty)
                     <*> (o .:? "canIpForward")
                     <*> (o .:? "labelFingerprint")
                     <*> (o .:? "description")
                     <*> (o .:? "tags"))

instance ToJSON Instance where
        toJSON Instance'{..}
          = object
              (catMaybes
                 [("status" .=) <$> _i1Status,
                  ("serviceAccounts" .=) <$> _i1ServiceAccounts,
                  ("deletionProtection" .=) <$> _i1DeletionProtection,
                  ("networkInterfaces" .=) <$> _i1NetworkInterfaces,
                  Just ("kind" .= _i1Kind), ("zone" .=) <$> _i1Zone,
                  ("cpuPlatform" .=) <$> _i1CPUPlatform,
                  ("selfLink" .=) <$> _i1SelfLink,
                  ("guestAccelerators" .=) <$> _i1GuestAccelerators,
                  ("name" .=) <$> _i1Name,
                  ("statusMessage" .=) <$> _i1StatusMessage,
                  ("creationTimestamp" .=) <$> _i1CreationTimestamp,
                  ("machineType" .=) <$> _i1MachineType,
                  ("metadata" .=) <$> _i1Metadata, ("id" .=) <$> _i1Id,
                  ("labels" .=) <$> _i1Labels,
                  ("startRestricted" .=) <$> _i1StartRestricted,
                  ("scheduling" .=) <$> _i1Scheduling,
                  ("minCpuPlatform" .=) <$> _i1MinCPUPlatform,
                  ("disks" .=) <$> _i1Disks,
                  ("canIpForward" .=) <$> _i1CanIPForward,
                  ("labelFingerprint" .=) <$> _i1LabelFingerprint,
                  ("description" .=) <$> _i1Description,
                  ("tags" .=) <$> _i1Tags])

-- | A matcher for the path portion of the URL. The BackendService from the
-- longest-matched rule will serve the URL. If no rule was matched, the
-- default service will be used.
--
-- /See:/ 'pathMatcher' smart constructor.
data PathMatcher = PathMatcher'
    { _pmDefaultService :: !(Maybe Text)
    , _pmName           :: !(Maybe Text)
    , _pmPathRules      :: !(Maybe [PathRule])
    , _pmDescription    :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'PathMatcher' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pmDefaultService'
--
-- * 'pmName'
--
-- * 'pmPathRules'
--
-- * 'pmDescription'
pathMatcher
    :: PathMatcher
pathMatcher =
    PathMatcher'
    { _pmDefaultService = Nothing
    , _pmName = Nothing
    , _pmPathRules = Nothing
    , _pmDescription = Nothing
    }

-- | The full or partial URL to the BackendService resource. This will be
-- used if none of the pathRules or routeRules defined by this PathMatcher
-- are matched. For example, the following are all valid URLs to a
-- BackendService resource: -
-- https:\/\/www.googleapis.com\/compute\/v1\/projects\/project\/global\/backendServices\/backendService
-- -
-- compute\/v1\/projects\/project\/global\/backendServices\/backendService
-- - global\/backendServices\/backendService Use defaultService instead of
-- defaultRouteAction when simple routing to a backend service is desired
-- and other advanced capabilities like traffic splitting and URL rewrites
-- are not required. Only one of defaultService, defaultRouteAction or
-- defaultUrlRedirect must be set. Authorization requires one or more of
-- the following Google IAM permissions on the specified resource
-- default_service: - compute.backendBuckets.use -
-- compute.backendServices.use
pmDefaultService :: Lens' PathMatcher (Maybe Text)
pmDefaultService
  = lens _pmDefaultService
      (\ s a -> s{_pmDefaultService = a})

-- | The name to which this PathMatcher is referred by the HostRule.
pmName :: Lens' PathMatcher (Maybe Text)
pmName = lens _pmName (\ s a -> s{_pmName = a})

-- | The list of path rules. Use this list instead of routeRules when routing
-- based on simple path matching is all that\'s required. The order by
-- which path rules are specified does not matter. Matches are always done
-- on the longest-path-first basis. For example: a pathRule with a path
-- \/a\/b\/c\/* will match before \/a\/b\/* irrespective of the order in
-- which those paths appear in this list. Only one of pathRules or
-- routeRules must be set.
pmPathRules :: Lens' PathMatcher [PathRule]
pmPathRules
  = lens _pmPathRules (\ s a -> s{_pmPathRules = a}) .
      _Default
      . _Coerce

-- | An optional description of this resource. Provide this property when you
-- create the resource.
pmDescription :: Lens' PathMatcher (Maybe Text)
pmDescription
  = lens _pmDescription
      (\ s a -> s{_pmDescription = a})

instance FromJSON PathMatcher where
        parseJSON
          = withObject "PathMatcher"
              (\ o ->
                 PathMatcher' <$>
                   (o .:? "defaultService") <*> (o .:? "name") <*>
                     (o .:? "pathRules" .!= mempty)
                     <*> (o .:? "description"))

instance ToJSON PathMatcher where
        toJSON PathMatcher'{..}
          = object
              (catMaybes
                 [("defaultService" .=) <$> _pmDefaultService,
                  ("name" .=) <$> _pmName,
                  ("pathRules" .=) <$> _pmPathRules,
                  ("description" .=) <$> _pmDescription])

-- | [Output Only] Informational warning message.
--
-- /See:/ 'backendServiceListWarning' smart constructor.
data BackendServiceListWarning = BackendServiceListWarning'
    { _bslwData    :: !(Maybe [BackendServiceListWarningDataItem])
    , _bslwCode    :: !(Maybe BackendServiceListWarningCode)
    , _bslwMessage :: !(Maybe Text)
    } deriving (Eq,Show,Data,Typeable,Generic)

-- | Creates a value of 'BackendServiceListWarning' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'bslwData'
--
-- * 'bslwCode'
--
-- * 'bslwMessage'
backendServiceListWarning
    :: BackendServiceListWarning
backendServiceListWarning =
    BackendServiceListWarning'
    { _bslwData = Nothing
    , _bslwCode = Nothing
    , _bslwMessage = Nothing
    }

-- | [Output Only] Metadata about this warning in key: value format. For
-- example: \"data\": [ { \"key\": \"scope\", \"value\":
-- \"zones\/us-east1-d\" }
bslwData :: Lens' BackendServiceListWarning [BackendServiceListWarningDataItem]
bslwData
  = lens _bslwData (\ s a -> s{_bslwData = a}) .
      _Default
      . _Coerce

-- | [Output Only] A warning code, if applicable. For example, Compute Engine
-- returns NO_RESULTS_ON_PAGE if there are no results in the response.
bslwCode :: Lens' BackendServiceListWarning (Maybe BackendServiceListWarningCode)
bslwCode = lens _bslwCode (\ s a -> s{_bslwCode = a})

-- | [Output Only] A human-readable description of the warning code.
bslwMessage :: Lens' BackendServiceListWarning (Maybe Text)
bslwMessage
  = lens _bslwMessage (\ s a -> s{_bslwMessage = a})

instance FromJSON BackendServiceListWarning where
        parseJSON
          = withObject "BackendServiceListWarning"
              (\ o ->
                 BackendServiceListWarning' <$>
                   (o .:? "data" .!= mempty) <*> (o .:? "code") <*>
                     (o .:? "message"))

instance ToJSON BackendServiceListWarning where
        toJSON BackendServiceListWarning'{..}
          = object
              (catMaybes
                 [("data" .=) <$> _bslwData,
                  ("code" .=) <$> _bslwCode,
                  ("message" .=) <$> _bslwMessage])