google-apis-testing_v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,245 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module TestingV1
23
+ # Cloud Testing API
24
+ #
25
+ # Allows developers to run automated tests for their mobile applications on
26
+ # Google infrastructure.
27
+ #
28
+ # @example
29
+ # require 'google/apis/testing_v1'
30
+ #
31
+ # Testing = Google::Apis::TestingV1 # Alias the module
32
+ # service = Testing::TestingService.new
33
+ #
34
+ # @see https://developers.google.com/cloud-test-lab/
35
+ class TestingService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://testing.googleapis.com/', '',
48
+ client_name: 'google-apis-testing_v1',
49
+ client_version: Google::Apis::TestingV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets the details of an Android application APK.
54
+ # @param [Google::Apis::TestingV1::FileReference] file_reference_object
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::TestingV1::GetApkDetailsResponse] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::TestingV1::GetApkDetailsResponse]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_application_detail_service_apk_details(file_reference_object = nil, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:post, 'v1/applicationDetailService/getApkDetails', options)
74
+ command.request_representation = Google::Apis::TestingV1::FileReference::Representation
75
+ command.request_object = file_reference_object
76
+ command.response_representation = Google::Apis::TestingV1::GetApkDetailsResponse::Representation
77
+ command.response_class = Google::Apis::TestingV1::GetApkDetailsResponse
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Cancels unfinished test executions in a test matrix. This call returns
84
+ # immediately and cancellation proceeds asynchronously. If the matrix is already
85
+ # final, this operation will have no effect. May return any of the following
86
+ # canonical error codes: - PERMISSION_DENIED - if the user is not authorized to
87
+ # read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if
88
+ # the Test Matrix does not exist
89
+ # @param [String] project_id
90
+ # Cloud project that owns the test.
91
+ # @param [String] test_matrix_id
92
+ # Test matrix that will be canceled.
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
95
+ # @param [String] quota_user
96
+ # Available to use for quota purposes for server-side applications. Can be any
97
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
98
+ # @param [Google::Apis::RequestOptions] options
99
+ # Request-specific options
100
+ #
101
+ # @yield [result, err] Result & error if block supplied
102
+ # @yieldparam result [Google::Apis::TestingV1::CancelTestMatrixResponse] parsed result object
103
+ # @yieldparam err [StandardError] error object if request failed
104
+ #
105
+ # @return [Google::Apis::TestingV1::CancelTestMatrixResponse]
106
+ #
107
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
108
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
109
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
110
+ def cancel_project_test_matrix(project_id, test_matrix_id, fields: nil, quota_user: nil, options: nil, &block)
111
+ command = make_simple_command(:post, 'v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel', options)
112
+ command.response_representation = Google::Apis::TestingV1::CancelTestMatrixResponse::Representation
113
+ command.response_class = Google::Apis::TestingV1::CancelTestMatrixResponse
114
+ command.params['projectId'] = project_id unless project_id.nil?
115
+ command.params['testMatrixId'] = test_matrix_id unless test_matrix_id.nil?
116
+ command.query['fields'] = fields unless fields.nil?
117
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
118
+ execute_or_queue_command(command, &block)
119
+ end
120
+
121
+ # Creates and runs a matrix of tests according to the given specifications.
122
+ # Unsupported environments will be returned in the state UNSUPPORTED. A test
123
+ # matrix is limited to use at most 2000 devices in parallel. May return any of
124
+ # the following canonical error codes: - PERMISSION_DENIED - if the user is not
125
+ # authorized to write to project - INVALID_ARGUMENT - if the request is
126
+ # malformed or if the matrix tries to use too many simultaneous devices.
127
+ # @param [String] project_id
128
+ # The GCE project under which this job will run.
129
+ # @param [Google::Apis::TestingV1::TestMatrix] test_matrix_object
130
+ # @param [String] request_id
131
+ # A string id used to detect duplicated requests. Ids are automatically scoped
132
+ # to a project, so users should ensure the ID is unique per-project. A UUID is
133
+ # recommended. Optional, but strongly recommended.
134
+ # @param [String] fields
135
+ # Selector specifying which fields to include in a partial response.
136
+ # @param [String] quota_user
137
+ # Available to use for quota purposes for server-side applications. Can be any
138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
139
+ # @param [Google::Apis::RequestOptions] options
140
+ # Request-specific options
141
+ #
142
+ # @yield [result, err] Result & error if block supplied
143
+ # @yieldparam result [Google::Apis::TestingV1::TestMatrix] parsed result object
144
+ # @yieldparam err [StandardError] error object if request failed
145
+ #
146
+ # @return [Google::Apis::TestingV1::TestMatrix]
147
+ #
148
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
149
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
150
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
151
+ def create_project_test_matrix(project_id, test_matrix_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
152
+ command = make_simple_command(:post, 'v1/projects/{projectId}/testMatrices', options)
153
+ command.request_representation = Google::Apis::TestingV1::TestMatrix::Representation
154
+ command.request_object = test_matrix_object
155
+ command.response_representation = Google::Apis::TestingV1::TestMatrix::Representation
156
+ command.response_class = Google::Apis::TestingV1::TestMatrix
157
+ command.params['projectId'] = project_id unless project_id.nil?
158
+ command.query['requestId'] = request_id unless request_id.nil?
159
+ command.query['fields'] = fields unless fields.nil?
160
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
161
+ execute_or_queue_command(command, &block)
162
+ end
163
+
164
+ # Checks the status of a test matrix. May return any of the following canonical
165
+ # error codes: - PERMISSION_DENIED - if the user is not authorized to read
166
+ # project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
167
+ # Test Matrix does not exist
168
+ # @param [String] project_id
169
+ # Cloud project that owns the test matrix.
170
+ # @param [String] test_matrix_id
171
+ # Unique test matrix id which was assigned by the service.
172
+ # @param [String] fields
173
+ # Selector specifying which fields to include in a partial response.
174
+ # @param [String] quota_user
175
+ # Available to use for quota purposes for server-side applications. Can be any
176
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
177
+ # @param [Google::Apis::RequestOptions] options
178
+ # Request-specific options
179
+ #
180
+ # @yield [result, err] Result & error if block supplied
181
+ # @yieldparam result [Google::Apis::TestingV1::TestMatrix] parsed result object
182
+ # @yieldparam err [StandardError] error object if request failed
183
+ #
184
+ # @return [Google::Apis::TestingV1::TestMatrix]
185
+ #
186
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
187
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
188
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
189
+ def get_project_test_matrix(project_id, test_matrix_id, fields: nil, quota_user: nil, options: nil, &block)
190
+ command = make_simple_command(:get, 'v1/projects/{projectId}/testMatrices/{testMatrixId}', options)
191
+ command.response_representation = Google::Apis::TestingV1::TestMatrix::Representation
192
+ command.response_class = Google::Apis::TestingV1::TestMatrix
193
+ command.params['projectId'] = project_id unless project_id.nil?
194
+ command.params['testMatrixId'] = test_matrix_id unless test_matrix_id.nil?
195
+ command.query['fields'] = fields unless fields.nil?
196
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
197
+ execute_or_queue_command(command, &block)
198
+ end
199
+
200
+ # Gets the catalog of supported test environments. May return any of the
201
+ # following canonical error codes: - INVALID_ARGUMENT - if the request is
202
+ # malformed - NOT_FOUND - if the environment type does not exist - INTERNAL - if
203
+ # an internal error occurred
204
+ # @param [String] environment_type
205
+ # Required. The type of environment that should be listed.
206
+ # @param [String] project_id
207
+ # For authorization, the cloud project requesting the TestEnvironmentCatalog.
208
+ # @param [String] fields
209
+ # Selector specifying which fields to include in a partial response.
210
+ # @param [String] quota_user
211
+ # Available to use for quota purposes for server-side applications. Can be any
212
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
213
+ # @param [Google::Apis::RequestOptions] options
214
+ # Request-specific options
215
+ #
216
+ # @yield [result, err] Result & error if block supplied
217
+ # @yieldparam result [Google::Apis::TestingV1::TestEnvironmentCatalog] parsed result object
218
+ # @yieldparam err [StandardError] error object if request failed
219
+ #
220
+ # @return [Google::Apis::TestingV1::TestEnvironmentCatalog]
221
+ #
222
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
223
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
224
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
225
+ def get_test_environment_catalog(environment_type, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
226
+ command = make_simple_command(:get, 'v1/testEnvironmentCatalog/{environmentType}', options)
227
+ command.response_representation = Google::Apis::TestingV1::TestEnvironmentCatalog::Representation
228
+ command.response_class = Google::Apis::TestingV1::TestEnvironmentCatalog
229
+ command.params['environmentType'] = environment_type unless environment_type.nil?
230
+ command.query['projectId'] = project_id unless project_id.nil?
231
+ command.query['fields'] = fields unless fields.nil?
232
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
233
+ execute_or_queue_command(command, &block)
234
+ end
235
+
236
+ protected
237
+
238
+ def apply_command_defaults(command)
239
+ command.query['key'] = key unless key.nil?
240
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
241
+ end
242
+ end
243
+ end
244
+ end
245
+ end
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-testing_v1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.1'
27
+ description: This is the simple REST client for Cloud Testing API V1. Simple REST
28
+ clients are Ruby client libraries that provide access to Google services via their
29
+ HTTP REST API endpoints. These libraries are generated and updated automatically
30
+ based on the discovery documents published by the service, and they handle most
31
+ concerns such as authentication, pagination, retry, timeouts, and logging. You can
32
+ use this client to access the Cloud Testing API, but note that some services may
33
+ provide a separate modern client that is easier to use.
34
+ email: googleapis-packages@google.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - ".yardopts"
40
+ - CHANGELOG.md
41
+ - LICENSE.md
42
+ - OVERVIEW.md
43
+ - lib/google-apis-testing_v1.rb
44
+ - lib/google/apis/testing_v1.rb
45
+ - lib/google/apis/testing_v1/classes.rb
46
+ - lib/google/apis/testing_v1/gem_version.rb
47
+ - lib/google/apis/testing_v1/representations.rb
48
+ - lib/google/apis/testing_v1/service.rb
49
+ homepage: https://github.com/google/google-api-ruby-client
50
+ licenses:
51
+ - Apache-2.0
52
+ metadata:
53
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-testing_v1/CHANGELOG.md
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-testing_v1/v0.1.0
56
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-testing_v1
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '2.4'
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ requirements: []
72
+ rubygems_version: 3.1.4
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: Simple REST client for Cloud Testing API V1
76
+ test_files: []