@@ -2121,6 +2121,244 @@ public StopAirflowCommand set(String parameterName, Object value) {
2121
2121
}
2122
2122
}
2123
2123
2124
+ /**
2125
+ * An accessor for creating requests from the Workloads collection.
2126
+ *
2127
+ * <p>The typical use is:</p>
2128
+ * <pre>
2129
+ * {@code CloudComposer composer = new CloudComposer(...);}
2130
+ * {@code CloudComposer.Workloads.List request = composer.workloads().list(parameters ...)}
2131
+ * </pre>
2132
+ *
2133
+ * @return the resource collection
2134
+ */
2135
+ public Workloads workloads () {
2136
+ return new Workloads ();
2137
+ }
2138
+
2139
+ /**
2140
+ * The "workloads" collection of methods.
2141
+ */
2142
+ public class Workloads {
2143
+
2144
+ /**
2145
+ * Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer
2146
+ * component. This method is supported for Cloud Composer environments in versions
2147
+ * composer-3.*.*-airflow-*.*.* and newer.
2148
+ *
2149
+ * Create a request for the method "workloads.list".
2150
+ *
2151
+ * This request holds the parameters needed by the composer server. After setting any optional
2152
+ * parameters, call the {@link List#execute()} method to invoke the remote operation.
2153
+ *
2154
+ * @param parent Required. The environment name to get workloads for, in the form:
2155
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
2156
+ * @return the request
2157
+ */
2158
+ public List list (java .lang .String parent ) throws java .io .IOException {
2159
+ List result = new List (parent );
2160
+ initialize (result );
2161
+ return result ;
2162
+ }
2163
+
2164
+ public class List extends CloudComposerRequest <com .google .api .services .composer .v1 .model .ListWorkloadsResponse > {
2165
+
2166
+ private static final String REST_PATH = "v1/{+parent}/workloads" ;
2167
+
2168
+ private final java .util .regex .Pattern PARENT_PATTERN =
2169
+ java .util .regex .Pattern .compile ("^projects/[^/]+/locations/[^/]+/environments/[^/]+$" );
2170
+
2171
+ /**
2172
+ * Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer
2173
+ * component. This method is supported for Cloud Composer environments in versions
2174
+ * composer-3.*.*-airflow-*.*.* and newer.
2175
+ *
2176
+ * Create a request for the method "workloads.list".
2177
+ *
2178
+ * This request holds the parameters needed by the the composer server. After setting any
2179
+ * optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
2180
+ * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
2181
+ * must be called to initialize this instance immediately after invoking the constructor. </p>
2182
+ *
2183
+ * @param parent Required. The environment name to get workloads for, in the form:
2184
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
2185
+ * @since 1.13
2186
+ */
2187
+ protected List (java .lang .String parent ) {
2188
+ super (CloudComposer .this , "GET" , REST_PATH , null , com .google .api .services .composer .v1 .model .ListWorkloadsResponse .class );
2189
+ this .parent = com .google .api .client .util .Preconditions .checkNotNull (parent , "Required parameter parent must be specified." );
2190
+ if (!getSuppressPatternChecks ()) {
2191
+ com .google .api .client .util .Preconditions .checkArgument (PARENT_PATTERN .matcher (parent ).matches (),
2192
+ "Parameter parent must conform to the pattern " +
2193
+ "^projects/[^/]+/locations/[^/]+/environments/[^/]+$" );
2194
+ }
2195
+ }
2196
+
2197
+ @ Override
2198
+ public com .google .api .client .http .HttpResponse executeUsingHead () throws java .io .IOException {
2199
+ return super .executeUsingHead ();
2200
+ }
2201
+
2202
+ @ Override
2203
+ public com .google .api .client .http .HttpRequest buildHttpRequestUsingHead () throws java .io .IOException {
2204
+ return super .buildHttpRequestUsingHead ();
2205
+ }
2206
+
2207
+ @ Override
2208
+ public List set$Xgafv (java .lang .String $Xgafv ) {
2209
+ return (List ) super .set$Xgafv ($Xgafv );
2210
+ }
2211
+
2212
+ @ Override
2213
+ public List setAccessToken (java .lang .String accessToken ) {
2214
+ return (List ) super .setAccessToken (accessToken );
2215
+ }
2216
+
2217
+ @ Override
2218
+ public List setAlt (java .lang .String alt ) {
2219
+ return (List ) super .setAlt (alt );
2220
+ }
2221
+
2222
+ @ Override
2223
+ public List setCallback (java .lang .String callback ) {
2224
+ return (List ) super .setCallback (callback );
2225
+ }
2226
+
2227
+ @ Override
2228
+ public List setFields (java .lang .String fields ) {
2229
+ return (List ) super .setFields (fields );
2230
+ }
2231
+
2232
+ @ Override
2233
+ public List setKey (java .lang .String key ) {
2234
+ return (List ) super .setKey (key );
2235
+ }
2236
+
2237
+ @ Override
2238
+ public List setOauthToken (java .lang .String oauthToken ) {
2239
+ return (List ) super .setOauthToken (oauthToken );
2240
+ }
2241
+
2242
+ @ Override
2243
+ public List setPrettyPrint (java .lang .Boolean prettyPrint ) {
2244
+ return (List ) super .setPrettyPrint (prettyPrint );
2245
+ }
2246
+
2247
+ @ Override
2248
+ public List setQuotaUser (java .lang .String quotaUser ) {
2249
+ return (List ) super .setQuotaUser (quotaUser );
2250
+ }
2251
+
2252
+ @ Override
2253
+ public List setUploadType (java .lang .String uploadType ) {
2254
+ return (List ) super .setUploadType (uploadType );
2255
+ }
2256
+
2257
+ @ Override
2258
+ public List setUploadProtocol (java .lang .String uploadProtocol ) {
2259
+ return (List ) super .setUploadProtocol (uploadProtocol );
2260
+ }
2261
+
2262
+ /**
2263
+ * Required. The environment name to get workloads for, in the form:
2264
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
2265
+ */
2266
+ @ com .google .api .client .util .Key
2267
+ private java .lang .String parent ;
2268
+
2269
+ /** Required. The environment name to get workloads for, in the form:
2270
+ "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
2271
+ */
2272
+ public java .lang .String getParent () {
2273
+ return parent ;
2274
+ }
2275
+
2276
+ /**
2277
+ * Required. The environment name to get workloads for, in the form:
2278
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
2279
+ */
2280
+ public List setParent (java .lang .String parent ) {
2281
+ if (!getSuppressPatternChecks ()) {
2282
+ com .google .api .client .util .Preconditions .checkArgument (PARENT_PATTERN .matcher (parent ).matches (),
2283
+ "Parameter parent must conform to the pattern " +
2284
+ "^projects/[^/]+/locations/[^/]+/environments/[^/]+$" );
2285
+ }
2286
+ this .parent = parent ;
2287
+ return this ;
2288
+ }
2289
+
2290
+ /**
2291
+ * Optional. The list filter. Currently only supports equality on the type field. The
2292
+ * value of a field specified in the filter expression must be one ComposerWorkloadType
2293
+ * enum option. It's possible to get multiple types using "OR" operator, e.g.:
2294
+ * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are returned.
2295
+ */
2296
+ @ com .google .api .client .util .Key
2297
+ private java .lang .String filter ;
2298
+
2299
+ /** Optional. The list filter. Currently only supports equality on the type field. The value of a field
2300
+ specified in the filter expression must be one ComposerWorkloadType enum option. It's possible to
2301
+ get multiple types using "OR" operator, e.g.: "type=SCHEDULER OR type=CELERY_WORKER". If not
2302
+ specified, all items are returned.
2303
+ */
2304
+ public java .lang .String getFilter () {
2305
+ return filter ;
2306
+ }
2307
+
2308
+ /**
2309
+ * Optional. The list filter. Currently only supports equality on the type field. The
2310
+ * value of a field specified in the filter expression must be one ComposerWorkloadType
2311
+ * enum option. It's possible to get multiple types using "OR" operator, e.g.:
2312
+ * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are returned.
2313
+ */
2314
+ public List setFilter (java .lang .String filter ) {
2315
+ this .filter = filter ;
2316
+ return this ;
2317
+ }
2318
+
2319
+ /** Optional. The maximum number of environments to return. */
2320
+ @ com .google .api .client .util .Key
2321
+ private java .lang .Integer pageSize ;
2322
+
2323
+ /** Optional. The maximum number of environments to return.
2324
+ */
2325
+ public java .lang .Integer getPageSize () {
2326
+ return pageSize ;
2327
+ }
2328
+
2329
+ /** Optional. The maximum number of environments to return. */
2330
+ public List setPageSize (java .lang .Integer pageSize ) {
2331
+ this .pageSize = pageSize ;
2332
+ return this ;
2333
+ }
2334
+
2335
+ /**
2336
+ * Optional. The next_page_token value returned from a previous List request, if any.
2337
+ */
2338
+ @ com .google .api .client .util .Key
2339
+ private java .lang .String pageToken ;
2340
+
2341
+ /** Optional. The next_page_token value returned from a previous List request, if any.
2342
+ */
2343
+ public java .lang .String getPageToken () {
2344
+ return pageToken ;
2345
+ }
2346
+
2347
+ /**
2348
+ * Optional. The next_page_token value returned from a previous List request, if any.
2349
+ */
2350
+ public List setPageToken (java .lang .String pageToken ) {
2351
+ this .pageToken = pageToken ;
2352
+ return this ;
2353
+ }
2354
+
2355
+ @ Override
2356
+ public List set (String parameterName , Object value ) {
2357
+ return (List ) super .set (parameterName , value );
2358
+ }
2359
+ }
2360
+
2361
+ }
2124
2362
}
2125
2363
/**
2126
2364
* An accessor for creating requests from the ImageVersions collection.
0 commit comments