@@ -2795,6 +2795,57 @@ instance ToJSON OperationMetadata where
27952795 ("operationType" .=) <$> _omOperationType,
27962796 ("target" .=) <$> _omTarget])
27972797
2798+-- | Response message for \`Instances.ListInstances\`.
2799+--
2800+-- /See:/ 'listInstancesResponse' smart constructor.
2801+data ListInstancesResponse = ListInstancesResponse'
2802+ { _lirNextPageToken :: !(Maybe Text)
2803+ , _lirInstances :: !(Maybe [Instance])
2804+ } deriving (Eq,Show,Data,Typeable,Generic)
2805+
2806+-- | Creates a value of 'ListInstancesResponse' with the minimum fields required to make a request.
2807+--
2808+-- Use one of the following lenses to modify other fields as desired:
2809+--
2810+-- * 'lirNextPageToken'
2811+--
2812+-- * 'lirInstances'
2813+listInstancesResponse
2814+ :: ListInstancesResponse
2815+listInstancesResponse =
2816+ ListInstancesResponse'
2817+ { _lirNextPageToken = Nothing
2818+ , _lirInstances = Nothing
2819+ }
2820+
2821+-- | Continuation token for fetching the next page of results.
2822+lirNextPageToken :: Lens' ListInstancesResponse (Maybe Text)
2823+lirNextPageToken
2824+ = lens _lirNextPageToken
2825+ (\ s a -> s{_lirNextPageToken = a})
2826+
2827+-- | The instances belonging to the requested version.
2828+lirInstances :: Lens' ListInstancesResponse [Instance]
2829+lirInstances
2830+ = lens _lirInstances (\ s a -> s{_lirInstances = a})
2831+ . _Default
2832+ . _Coerce
2833+
2834+instance FromJSON ListInstancesResponse where
2835+ parseJSON
2836+ = withObject "ListInstancesResponse"
2837+ (\ o ->
2838+ ListInstancesResponse' <$>
2839+ (o .:? "nextPageToken") <*>
2840+ (o .:? "instances" .!= mempty))
2841+
2842+instance ToJSON ListInstancesResponse where
2843+ toJSON ListInstancesResponse'{..}
2844+ = object
2845+ (catMaybes
2846+ [("nextPageToken" .=) <$> _lirNextPageToken,
2847+ ("instances" .=) <$> _lirInstances])
2848+
27982849-- | Target scaling by request utilization (for VM runtimes only).
27992850--
28002851-- /See:/ 'requestUtilization' smart constructor.
@@ -2976,6 +3027,206 @@ instance ToJSON ContainerInfo where
29763027 toJSON ContainerInfo'{..}
29773028 = object (catMaybes [("image" .=) <$> _ciImage])
29783029
3030+-- | Instances are the computing units that App Engine uses to automatically
3031+-- scale an application.
3032+--
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)
3051+
3052+-- | Creates a value of 'Instance' with the minimum fields required to make a request.
3053+--
3054+-- Use one of the following lenses to modify other fields as desired:
3055+--
3056+-- * 'iMemoryUsage'
3057+--
3058+-- * 'iVMStatus'
3059+--
3060+-- * 'iVMZoneName'
3061+--
3062+-- * 'iVMId'
3063+--
3064+-- * 'iAvailability'
3065+--
3066+-- * 'iVMName'
3067+--
3068+-- * 'iName'
3069+--
3070+-- * 'iVMUnlocked'
3071+--
3072+-- * 'iRequests'
3073+--
3074+-- * 'iQps'
3075+--
3076+-- * 'iId'
3077+--
3078+-- * 'iErrors'
3079+--
3080+-- * 'iAverageLatency'
3081+--
3082+-- * 'iStartTimestamp'
3083+--
3084+-- * 'iAppEngineRelease'
3085+instance'
3086+ :: Instance
3087+instance' =
3088+ Instance'
3089+ { _iMemoryUsage = Nothing
3090+ , _iVMStatus = Nothing
3091+ , _iVMZoneName = Nothing
3092+ , _iVMId = Nothing
3093+ , _iAvailability = Nothing
3094+ , _iVMName = Nothing
3095+ , _iName = Nothing
3096+ , _iVMUnlocked = Nothing
3097+ , _iRequests = Nothing
3098+ , _iQps = Nothing
3099+ , _iId = Nothing
3100+ , _iErrors = Nothing
3101+ , _iAverageLatency = Nothing
3102+ , _iStartTimestamp = Nothing
3103+ , _iAppEngineRelease = Nothing
3104+ }
3105+
3106+-- | Memory usage (in bytes). \'OutputOnly
3107+iMemoryUsage :: Lens' Instance (Maybe Int64)
3108+iMemoryUsage
3109+ = lens _iMemoryUsage (\ s a -> s{_iMemoryUsage = a})
3110+ . mapping _Coerce
3111+
3112+-- | For VMEngines instances, the status of GCE VM where the instance lives.
3113+-- \'OutputOnly
3114+iVMStatus :: Lens' Instance (Maybe Text)
3115+iVMStatus
3116+ = lens _iVMStatus (\ s a -> s{_iVMStatus = a})
3117+
3118+-- | For VMEngines instances, the zone where the GCE VM is located.
3119+-- \'OutputOnly
3120+iVMZoneName :: Lens' Instance (Maybe Text)
3121+iVMZoneName
3122+ = lens _iVMZoneName (\ s a -> s{_iVMZoneName = a})
3123+
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})
3127+
3128+-- | Availability of instance. \'OutputOnly
3129+iAvailability :: Lens' Instance (Maybe Text)
3130+iAvailability
3131+ = lens _iAvailability
3132+ (\ s a -> s{_iAvailability = a})
3133+
3134+-- | For VMEngines instances, the name of GCE VM where the instance lives.
3135+-- \'OutputOnly
3136+iVMName :: Lens' Instance (Maybe Text)
3137+iVMName = lens _iVMName (\ s a -> s{_iVMName = a})
3138+
3139+-- | The full path to the Instance resource in the API. Example:
3140+-- \"apps\/myapp\/services\/default\/versions\/v1\/instances\/instance-1\"
3141+-- \'OutputOnly
3142+iName :: Lens' Instance (Maybe Text)
3143+iName = lens _iName (\ s a -> s{_iName = a})
3144+
3145+-- | For VMEngines instances, whether the instance has been unlocked.
3146+-- \'OutputOnly
3147+iVMUnlocked :: Lens' Instance (Maybe Bool)
3148+iVMUnlocked
3149+ = lens _iVMUnlocked (\ s a -> s{_iVMUnlocked = a})
3150+
3151+-- | Number of requests (since the clone was started). \'OutputOnly
3152+iRequests :: Lens' Instance (Maybe Int32)
3153+iRequests
3154+ = lens _iRequests (\ s a -> s{_iRequests = a}) .
3155+ mapping _Coerce
3156+
3157+-- | QPS for this instance (averaged over the last minute). \'OutputOnly
3158+iQps :: Lens' Instance (Maybe Double)
3159+iQps
3160+ = lens _iQps (\ s a -> s{_iQps = a}) .
3161+ mapping _Coerce
3162+
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})
3167+
3168+-- | Number of errors since the instance was started. \'OutputOnly
3169+iErrors :: Lens' Instance (Maybe Word32)
3170+iErrors
3171+ = lens _iErrors (\ s a -> s{_iErrors = a}) .
3172+ mapping _Coerce
3173+
3174+-- | Latency in milliseconds (averaged over the last minute). \'OutputOnly
3175+iAverageLatency :: Lens' Instance (Maybe Int32)
3176+iAverageLatency
3177+ = lens _iAverageLatency
3178+ (\ s a -> s{_iAverageLatency = a})
3179+ . mapping _Coerce
3180+
3181+-- | Time when instance was started. \'OutputOnly
3182+iStartTimestamp :: Lens' Instance (Maybe Text)
3183+iStartTimestamp
3184+ = lens _iStartTimestamp
3185+ (\ s a -> s{_iStartTimestamp = a})
3186+
3187+-- | The App Engine release the instance is running on. \'OutputOnly
3188+iAppEngineRelease :: Lens' Instance (Maybe Text)
3189+iAppEngineRelease
3190+ = lens _iAppEngineRelease
3191+ (\ s a -> s{_iAppEngineRelease = a})
3192+
3193+instance FromJSON Instance where
3194+ parseJSON
3195+ = withObject "Instance"
3196+ (\ o ->
3197+ Instance' <$>
3198+ (o .:? "memoryUsage") <*> (o .:? "vmStatus") <*>
3199+ (o .:? "vmZoneName")
3200+ <*> (o .:? "vmId")
3201+ <*> (o .:? "availability")
3202+ <*> (o .:? "vmName")
3203+ <*> (o .:? "name")
3204+ <*> (o .:? "vmUnlocked")
3205+ <*> (o .:? "requests")
3206+ <*> (o .:? "qps")
3207+ <*> (o .:? "id")
3208+ <*> (o .:? "errors")
3209+ <*> (o .:? "averageLatency")
3210+ <*> (o .:? "startTimestamp")
3211+ <*> (o .:? "appEngineRelease"))
3212+
3213+instance ToJSON Instance where
3214+ toJSON Instance'{..}
3215+ = object
3216+ (catMaybes
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])
3229+
29793230-- | Code and application artifacts used to deploy a version to App Engine.
29803231--
29813232-- /See:/ 'deployment' smart constructor.