@@ -2795,6 +2795,57 @@ instance ToJSON OperationMetadata where
2795 ("operationType" .=) <$> _omOperationType,
2795 ("operationType" .=) <$> _omOperationType,
2796 ("target" .=) <$> _omTarget])
2796 ("target" .=) <$> _omTarget])
2798+-- | Response message for \`Instances.ListInstances\`.
2800+-- /See:/ 'listInstancesResponse' smart constructor.
2801+data ListInstancesResponse = ListInstancesResponse'
2802+ { _lirNextPageToken :: !(Maybe Text)
2803+ , _lirInstances :: !(Maybe [Instance])
2804+ } deriving (Eq,Show,Data,Typeable,Generic)
2806+-- | Creates a value of 'ListInstancesResponse' with the minimum fields required to make a request.
2808+-- Use one of the following lenses to modify other fields as desired:
2810+-- * 'lirNextPageToken'
2813+listInstancesResponse
2814+ :: ListInstancesResponse
2815+listInstancesResponse =
2816+ ListInstancesResponse'
2817+ { _lirNextPageToken = Nothing
2818+ , _lirInstances = Nothing
2821+-- | Continuation token for fetching the next page of results.
2822+lirNextPageToken :: Lens' ListInstancesResponse (Maybe Text)
2824+ = lens _lirNextPageToken
2825+ (\ s a -> s{_lirNextPageToken = a})
2827+-- | The instances belonging to the requested version.
2828+lirInstances :: Lens' ListInstancesResponse [Instance]
2830+ = lens _lirInstances (\ s a -> s{_lirInstances = a})
2834+instance FromJSON ListInstancesResponse where
2836+ = withObject "ListInstancesResponse"
2838+ ListInstancesResponse' <$>
2839+ (o .:? "nextPageToken") <*>
2840+ (o .:? "instances" .!= mempty))
2842+instance ToJSON ListInstancesResponse where
2843+ toJSON ListInstancesResponse'{..}
2846+ [("nextPageToken" .=) <$> _lirNextPageToken,
2847+ ("instances" .=) <$> _lirInstances])
2798-- | Target scaling by request utilization (for VM runtimes only).
2849-- | Target scaling by request utilization (for VM runtimes only).
2800-- /See:/ 'requestUtilization' smart constructor.
2851-- /See:/ 'requestUtilization' smart constructor.
@@ -2976,6 +3027,206 @@ instance ToJSON ContainerInfo where
2976 toJSON ContainerInfo'{..}
3027 toJSON ContainerInfo'{..}
2977 = object (catMaybes [("image" .=) <$> _ciImage])
3028 = object (catMaybes [("image" .=) <$> _ciImage])
3030+-- | Instances are the computing units that App Engine uses to automatically
3031+-- scale an application.
3033+-- /See:/ 'instance'' smart constructor.
3034+data Instance = Instance'
3035+ { _iMemoryUsage :: !(Maybe (Textual Int64))
3036+ , _iVMStatus :: !(Maybe Text)
3037+ , _iVMZoneName :: !(Maybe Text)
3038+ , _iVMId :: !(Maybe Text)
3039+ , _iAvailability :: !(Maybe Text)
3040+ , _iVMName :: !(Maybe Text)
3041+ , _iName :: !(Maybe Text)
3042+ , _iVMUnlocked :: !(Maybe Bool)
3043+ , _iRequests :: !(Maybe (Textual Int32))
3044+ , _iQps :: !(Maybe (Textual Double))
3045+ , _iId :: !(Maybe Text)
3046+ , _iErrors :: !(Maybe (Textual Word32))
3047+ , _iAverageLatency :: !(Maybe (Textual Int32))
3048+ , _iStartTimestamp :: !(Maybe Text)
3049+ , _iAppEngineRelease :: !(Maybe Text)
3050+ } deriving (Eq,Show,Data,Typeable,Generic)
3052+-- | Creates a value of 'Instance' with the minimum fields required to make a request.
3054+-- Use one of the following lenses to modify other fields as desired:
3064+-- * 'iAvailability'
3080+-- * 'iAverageLatency'
3082+-- * 'iStartTimestamp'
3084+-- * 'iAppEngineRelease'
3089+ { _iMemoryUsage = Nothing
3090+ , _iVMStatus = Nothing
3091+ , _iVMZoneName = Nothing
3093+ , _iAvailability = Nothing
3094+ , _iVMName = Nothing
3096+ , _iVMUnlocked = Nothing
3097+ , _iRequests = Nothing
3100+ , _iErrors = Nothing
3101+ , _iAverageLatency = Nothing
3102+ , _iStartTimestamp = Nothing
3103+ , _iAppEngineRelease = Nothing
3106+-- | Memory usage (in bytes). \'OutputOnly
3107+iMemoryUsage :: Lens' Instance (Maybe Int64)
3109+ = lens _iMemoryUsage (\ s a -> s{_iMemoryUsage = a})
3112+-- | For VMEngines instances, the status of GCE VM where the instance lives.
3114+iVMStatus :: Lens' Instance (Maybe Text)
3116+ = lens _iVMStatus (\ s a -> s{_iVMStatus = a})
3118+-- | For VMEngines instances, the zone where the GCE VM is located.
3120+iVMZoneName :: Lens' Instance (Maybe Text)
3122+ = lens _iVMZoneName (\ s a -> s{_iVMZoneName = a})
3124+-- | For VMEngines instances, the GCE VM ID of the instance. \'OutputOnly
3125+iVMId :: Lens' Instance (Maybe Text)
3126+iVMId = lens _iVMId (\ s a -> s{_iVMId = a})
3128+-- | Availability of instance. \'OutputOnly
3129+iAvailability :: Lens' Instance (Maybe Text)
3131+ = lens _iAvailability
3132+ (\ s a -> s{_iAvailability = a})
3134+-- | For VMEngines instances, the name of GCE VM where the instance lives.
3136+iVMName :: Lens' Instance (Maybe Text)
3137+iVMName = lens _iVMName (\ s a -> s{_iVMName = a})
3139+-- | The full path to the Instance resource in the API. Example:
3140+-- \"apps\/myapp\/services\/default\/versions\/v1\/instances\/instance-1\"
3142+iName :: Lens' Instance (Maybe Text)
3143+iName = lens _iName (\ s a -> s{_iName = a})
3145+-- | For VMEngines instances, whether the instance has been unlocked.
3147+iVMUnlocked :: Lens' Instance (Maybe Bool)
3149+ = lens _iVMUnlocked (\ s a -> s{_iVMUnlocked = a})
3151+-- | Number of requests (since the clone was started). \'OutputOnly
3152+iRequests :: Lens' Instance (Maybe Int32)
3154+ = lens _iRequests (\ s a -> s{_iRequests = a}) .
3157+-- | QPS for this instance (averaged over the last minute). \'OutputOnly
3158+iQps :: Lens' Instance (Maybe Double)
3160+ = lens _iQps (\ s a -> s{_iQps = a}) .
3163+-- | The relative name\/path of the instance within the version. Example:
3164+-- \"instance-1\" \'OutputOnly
3165+iId :: Lens' Instance (Maybe Text)
3166+iId = lens _iId (\ s a -> s{_iId = a})
3168+-- | Number of errors since the instance was started. \'OutputOnly
3169+iErrors :: Lens' Instance (Maybe Word32)
3171+ = lens _iErrors (\ s a -> s{_iErrors = a}) .
3174+-- | Latency in milliseconds (averaged over the last minute). \'OutputOnly
3175+iAverageLatency :: Lens' Instance (Maybe Int32)
3177+ = lens _iAverageLatency
3178+ (\ s a -> s{_iAverageLatency = a})
3181+-- | Time when instance was started. \'OutputOnly
3182+iStartTimestamp :: Lens' Instance (Maybe Text)
3184+ = lens _iStartTimestamp
3185+ (\ s a -> s{_iStartTimestamp = a})
3187+-- | The App Engine release the instance is running on. \'OutputOnly
3188+iAppEngineRelease :: Lens' Instance (Maybe Text)
3190+ = lens _iAppEngineRelease
3191+ (\ s a -> s{_iAppEngineRelease = a})
3193+instance FromJSON Instance where
3195+ = withObject "Instance"
3198+ (o .:? "memoryUsage") <*> (o .:? "vmStatus") <*>
3199+ (o .:? "vmZoneName")
3201+ <*> (o .:? "availability")
3202+ <*> (o .:? "vmName")
3204+ <*> (o .:? "vmUnlocked")
3205+ <*> (o .:? "requests")
3208+ <*> (o .:? "errors")
3209+ <*> (o .:? "averageLatency")
3210+ <*> (o .:? "startTimestamp")
3211+ <*> (o .:? "appEngineRelease"))
3213+instance ToJSON Instance where
3214+ toJSON Instance'{..}
3217+ [("memoryUsage" .=) <$> _iMemoryUsage,
3218+ ("vmStatus" .=) <$> _iVMStatus,
3219+ ("vmZoneName" .=) <$> _iVMZoneName,
3220+ ("vmId" .=) <$> _iVMId,
3221+ ("availability" .=) <$> _iAvailability,
3222+ ("vmName" .=) <$> _iVMName, ("name" .=) <$> _iName,
3223+ ("vmUnlocked" .=) <$> _iVMUnlocked,
3224+ ("requests" .=) <$> _iRequests, ("qps" .=) <$> _iQps,
3225+ ("id" .=) <$> _iId, ("errors" .=) <$> _iErrors,
3226+ ("averageLatency" .=) <$> _iAverageLatency,
3227+ ("startTimestamp" .=) <$> _iStartTimestamp,
3228+ ("appEngineRelease" .=) <$> _iAppEngineRelease])
2979-- | Code and application artifacts used to deploy a version to App Engine.
3230-- | Code and application artifacts used to deploy a version to App Engine.
2981-- /See:/ 'deployment' smart constructor.
3232-- /See:/ 'deployment' smart constructor.