-
Notifications
You must be signed in to change notification settings - Fork 357
/
Copy pathDescribeImages.astub
35 lines (30 loc) · 1.6 KB
/
DescribeImages.astub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.amazonaws.services.ec2;
import org.checkerframework.checker.calledmethods.qual.*;
// Interface
class AmazonEC2 {
DescribeImagesResult describeImages(
// The receiver must have its owner, imageId, or executable user set, either via the "wither" or "setter" methods.
@CalledMethodsPredicate("(withOwners || setOwners) || (withImageIds || setImageIds) || (withExecutableUsers || setExecutableUsers)")
DescribeImagesRequest request);
}
// The main implementation class
class AmazonEC2Client {
DescribeImagesResult describeImages(
// any combination of withX/setX has to be permitted if an owner has been set or an imageId has been set
@CalledMethodsPredicate("(withOwners || setOwners) || (withImageIds || setImageIds) || (withExecutableUsers || setExecutableUsers)")
DescribeImagesRequest request);
}
// Async interface
class AmazonEC2Async {
Future<DescribeImagesResult> describeImagesAsync(
// The receiver must have its owner, imageId, or executable user set, either via the "wither" or "setter" methods.
@CalledMethodsPredicate("(withOwners || setOwners) || (withImageIds || setImageIds) || (withExecutableUsers || setExecutableUsers)")
DescribeImagesRequest request);
}
// The main async implementation class
class AmazonEC2AsyncClient {
Future<DescribeImagesResult> describeImagesAsync(
// any combination of withX/setX has to be permitted if an owner has been set or an imageId has been set
@CalledMethodsPredicate("(withOwners || setOwners) || (withImageIds || setImageIds) || (withExecutableUsers || setExecutableUsers)")
DescribeImagesRequest request);
}