1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package devicefarm
4
5import (
6	"context"
7	awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
8	"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
9	"github.com/aws/aws-sdk-go-v2/service/devicefarm/types"
10	"github.com/aws/smithy-go/middleware"
11	smithyhttp "github.com/aws/smithy-go/transport/http"
12)
13
14// Gets information about compatibility with a device pool.
15func (c *Client) GetDevicePoolCompatibility(ctx context.Context, params *GetDevicePoolCompatibilityInput, optFns ...func(*Options)) (*GetDevicePoolCompatibilityOutput, error) {
16	if params == nil {
17		params = &GetDevicePoolCompatibilityInput{}
18	}
19
20	result, metadata, err := c.invokeOperation(ctx, "GetDevicePoolCompatibility", params, optFns, addOperationGetDevicePoolCompatibilityMiddlewares)
21	if err != nil {
22		return nil, err
23	}
24
25	out := result.(*GetDevicePoolCompatibilityOutput)
26	out.ResultMetadata = metadata
27	return out, nil
28}
29
30// Represents a request to the get device pool compatibility operation.
31type GetDevicePoolCompatibilityInput struct {
32
33	// The device pool's ARN.
34	//
35	// This member is required.
36	DevicePoolArn *string
37
38	// The ARN of the app that is associated with the specified device pool.
39	AppArn *string
40
41	// An object that contains information about the settings for a run.
42	Configuration *types.ScheduleRunConfiguration
43
44	// Information about the uploaded test to be run against the device pool.
45	Test *types.ScheduleRunTest
46
47	// The test type for the specified device pool. Allowed values include the
48	// following:
49	//
50	// * BUILTIN_FUZZ.
51	//
52	// * BUILTIN_EXPLORER. For Android, an app explorer
53	// that traverses an Android app, interacting with it and capturing screenshots at
54	// the same time.
55	//
56	// * APPIUM_JAVA_JUNIT.
57	//
58	// * APPIUM_JAVA_TESTNG.
59	//
60	// * APPIUM_PYTHON.
61	//
62	// *
63	// APPIUM_NODE.
64	//
65	// * APPIUM_RUBY.
66	//
67	// * APPIUM_WEB_JAVA_JUNIT.
68	//
69	// *
70	// APPIUM_WEB_JAVA_TESTNG.
71	//
72	// * APPIUM_WEB_PYTHON.
73	//
74	// * APPIUM_WEB_NODE.
75	//
76	// *
77	// APPIUM_WEB_RUBY.
78	//
79	// * CALABASH.
80	//
81	// * INSTRUMENTATION.
82	//
83	// * UIAUTOMATION.
84	//
85	// *
86	// UIAUTOMATOR.
87	//
88	// * XCTEST.
89	//
90	// * XCTEST_UI.
91	TestType types.TestType
92}
93
94// Represents the result of describe device pool compatibility request.
95type GetDevicePoolCompatibilityOutput struct {
96
97	// Information about compatible devices.
98	CompatibleDevices []types.DevicePoolCompatibilityResult
99
100	// Information about incompatible devices.
101	IncompatibleDevices []types.DevicePoolCompatibilityResult
102
103	// Metadata pertaining to the operation's result.
104	ResultMetadata middleware.Metadata
105}
106
107func addOperationGetDevicePoolCompatibilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
108	err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDevicePoolCompatibility{}, middleware.After)
109	if err != nil {
110		return err
111	}
112	err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDevicePoolCompatibility{}, middleware.After)
113	if err != nil {
114		return err
115	}
116	if err = addSetLoggerMiddleware(stack, options); err != nil {
117		return err
118	}
119	if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
120		return err
121	}
122	if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
123		return err
124	}
125	if err = addResolveEndpointMiddleware(stack, options); err != nil {
126		return err
127	}
128	if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
129		return err
130	}
131	if err = addRetryMiddlewares(stack, options); err != nil {
132		return err
133	}
134	if err = addHTTPSignerV4Middleware(stack, options); err != nil {
135		return err
136	}
137	if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
138		return err
139	}
140	if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
141		return err
142	}
143	if err = addClientUserAgent(stack); err != nil {
144		return err
145	}
146	if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
147		return err
148	}
149	if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
150		return err
151	}
152	if err = addOpGetDevicePoolCompatibilityValidationMiddleware(stack); err != nil {
153		return err
154	}
155	if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDevicePoolCompatibility(options.Region), middleware.Before); err != nil {
156		return err
157	}
158	if err = addRequestIDRetrieverMiddleware(stack); err != nil {
159		return err
160	}
161	if err = addResponseErrorMiddleware(stack); err != nil {
162		return err
163	}
164	if err = addRequestResponseLogging(stack, options); err != nil {
165		return err
166	}
167	return nil
168}
169
170func newServiceMetadataMiddleware_opGetDevicePoolCompatibility(region string) *awsmiddleware.RegisterServiceMetadata {
171	return &awsmiddleware.RegisterServiceMetadata{
172		Region:        region,
173		ServiceID:     ServiceID,
174		SigningName:   "devicefarm",
175		OperationName: "GetDevicePoolCompatibility",
176	}
177}
178