Skip to content

Commit 089ce8e

Browse files
1 parent 447094d commit 089ce8e

File tree

5 files changed

+223
-6
lines changed

5 files changed

+223
-6
lines changed

clients/google-api-services-batch/v1/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-batch</artifactId>
25-
<version>v1-rev20241204-2.0.0</version>
25+
<version>v1-rev20250122-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-batch:v1-rev20241204-2.0.0'
38+
implementation 'com.google.apis:google-api-services-batch:v1-rev20250122-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-batch/v1/2.0.0/com/google/api/services/batch/v1/Batch.java

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,136 @@ public Jobs jobs() {
534534
*/
535535
public class Jobs {
536536

537+
/**
538+
* Cancel a Job.
539+
*
540+
* Create a request for the method "jobs.cancel".
541+
*
542+
* This request holds the parameters needed by the batch server. After setting any optional
543+
* parameters, call the {@link Cancel#execute()} method to invoke the remote operation.
544+
*
545+
* @param name Required. Job name.
546+
* @param content the {@link com.google.api.services.batch.v1.model.CancelJobRequest}
547+
* @return the request
548+
*/
549+
public Cancel cancel(java.lang.String name, com.google.api.services.batch.v1.model.CancelJobRequest content) throws java.io.IOException {
550+
Cancel result = new Cancel(name, content);
551+
initialize(result);
552+
return result;
553+
}
554+
555+
public class Cancel extends BatchRequest<com.google.api.services.batch.v1.model.Operation> {
556+
557+
private static final String REST_PATH = "v1/{+name}:cancel";
558+
559+
private final java.util.regex.Pattern NAME_PATTERN =
560+
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/jobs/[^/]+$");
561+
562+
/**
563+
* Cancel a Job.
564+
*
565+
* Create a request for the method "jobs.cancel".
566+
*
567+
* This request holds the parameters needed by the the batch server. After setting any optional
568+
* parameters, call the {@link Cancel#execute()} method to invoke the remote operation. <p> {@link
569+
* Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
570+
* be called to initialize this instance immediately after invoking the constructor. </p>
571+
*
572+
* @param name Required. Job name.
573+
* @param content the {@link com.google.api.services.batch.v1.model.CancelJobRequest}
574+
* @since 1.13
575+
*/
576+
protected Cancel(java.lang.String name, com.google.api.services.batch.v1.model.CancelJobRequest content) {
577+
super(Batch.this, "POST", REST_PATH, content, com.google.api.services.batch.v1.model.Operation.class);
578+
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
579+
if (!getSuppressPatternChecks()) {
580+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
581+
"Parameter name must conform to the pattern " +
582+
"^projects/[^/]+/locations/[^/]+/jobs/[^/]+$");
583+
}
584+
}
585+
586+
@Override
587+
public Cancel set$Xgafv(java.lang.String $Xgafv) {
588+
return (Cancel) super.set$Xgafv($Xgafv);
589+
}
590+
591+
@Override
592+
public Cancel setAccessToken(java.lang.String accessToken) {
593+
return (Cancel) super.setAccessToken(accessToken);
594+
}
595+
596+
@Override
597+
public Cancel setAlt(java.lang.String alt) {
598+
return (Cancel) super.setAlt(alt);
599+
}
600+
601+
@Override
602+
public Cancel setCallback(java.lang.String callback) {
603+
return (Cancel) super.setCallback(callback);
604+
}
605+
606+
@Override
607+
public Cancel setFields(java.lang.String fields) {
608+
return (Cancel) super.setFields(fields);
609+
}
610+
611+
@Override
612+
public Cancel setKey(java.lang.String key) {
613+
return (Cancel) super.setKey(key);
614+
}
615+
616+
@Override
617+
public Cancel setOauthToken(java.lang.String oauthToken) {
618+
return (Cancel) super.setOauthToken(oauthToken);
619+
}
620+
621+
@Override
622+
public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) {
623+
return (Cancel) super.setPrettyPrint(prettyPrint);
624+
}
625+
626+
@Override
627+
public Cancel setQuotaUser(java.lang.String quotaUser) {
628+
return (Cancel) super.setQuotaUser(quotaUser);
629+
}
630+
631+
@Override
632+
public Cancel setUploadType(java.lang.String uploadType) {
633+
return (Cancel) super.setUploadType(uploadType);
634+
}
635+
636+
@Override
637+
public Cancel setUploadProtocol(java.lang.String uploadProtocol) {
638+
return (Cancel) super.setUploadProtocol(uploadProtocol);
639+
}
640+
641+
/** Required. Job name. */
642+
@com.google.api.client.util.Key
643+
private java.lang.String name;
644+
645+
/** Required. Job name.
646+
*/
647+
public java.lang.String getName() {
648+
return name;
649+
}
650+
651+
/** Required. Job name. */
652+
public Cancel setName(java.lang.String name) {
653+
if (!getSuppressPatternChecks()) {
654+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
655+
"Parameter name must conform to the pattern " +
656+
"^projects/[^/]+/locations/[^/]+/jobs/[^/]+$");
657+
}
658+
this.name = name;
659+
return this;
660+
}
661+
662+
@Override
663+
public Cancel set(String parameterName, Object value) {
664+
return (Cancel) super.set(parameterName, value);
665+
}
666+
}
537667
/**
538668
* Create a Job.
539669
*
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.batch.v1.model;
18+
19+
/**
20+
* CancelJob Request.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Batch API. For a detailed explanation see:
24+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
25+
* </p>
26+
*
27+
* @author Google, Inc.
28+
*/
29+
@SuppressWarnings("javadoc")
30+
public final class CancelJobRequest extends com.google.api.client.json.GenericJson {
31+
32+
/**
33+
* Optional. An optional request ID to identify requests. Specify a unique request ID so that if
34+
* you must retry your request, the server will know to ignore the request if it has already been
35+
* completed. The server will guarantee that for at least 60 minutes after the first request. For
36+
* example, consider a situation where you make an initial request and the request times out. If
37+
* you make the request again with the same request ID, the server can check if original operation
38+
* with the same request ID was received, and if so, will ignore the second request. This prevents
39+
* clients from accidentally creating duplicate commitments. The request ID must be a valid UUID
40+
* with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
41+
* The value may be {@code null}.
42+
*/
43+
@com.google.api.client.util.Key
44+
private java.lang.String requestId;
45+
46+
/**
47+
* Optional. An optional request ID to identify requests. Specify a unique request ID so that if
48+
* you must retry your request, the server will know to ignore the request if it has already been
49+
* completed. The server will guarantee that for at least 60 minutes after the first request. For
50+
* example, consider a situation where you make an initial request and the request times out. If
51+
* you make the request again with the same request ID, the server can check if original operation
52+
* with the same request ID was received, and if so, will ignore the second request. This prevents
53+
* clients from accidentally creating duplicate commitments. The request ID must be a valid UUID
54+
* with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
55+
* @return value or {@code null} for none
56+
*/
57+
public java.lang.String getRequestId() {
58+
return requestId;
59+
}
60+
61+
/**
62+
* Optional. An optional request ID to identify requests. Specify a unique request ID so that if
63+
* you must retry your request, the server will know to ignore the request if it has already been
64+
* completed. The server will guarantee that for at least 60 minutes after the first request. For
65+
* example, consider a situation where you make an initial request and the request times out. If
66+
* you make the request again with the same request ID, the server can check if original operation
67+
* with the same request ID was received, and if so, will ignore the second request. This prevents
68+
* clients from accidentally creating duplicate commitments. The request ID must be a valid UUID
69+
* with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
70+
* @param requestId requestId or {@code null} for none
71+
*/
72+
public CancelJobRequest setRequestId(java.lang.String requestId) {
73+
this.requestId = requestId;
74+
return this;
75+
}
76+
77+
@Override
78+
public CancelJobRequest set(String fieldName, Object value) {
79+
return (CancelJobRequest) super.set(fieldName, value);
80+
}
81+
82+
@Override
83+
public CancelJobRequest clone() {
84+
return (CancelJobRequest) super.clone();
85+
}
86+
87+
}

clients/google-api-services-batch/v1/2.0.0/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<groupId>com.google.apis</groupId>
1010
<artifactId>google-api-services-batch</artifactId>
11-
<version>v1-rev20241204-2.0.0</version>
12-
<name>Batch API v1-rev20241204-2.0.0</name>
11+
<version>v1-rev20250122-2.0.0</version>
12+
<name>Batch API v1-rev20250122-2.0.0</name>
1313
<packaging>jar</packaging>
1414

1515
<inceptionYear>2011</inceptionYear>

clients/google-api-services-batch/v1/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-batch</artifactId>
25-
<version>v1-rev20241204-2.0.0</version>
25+
<version>v1-rev20250122-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-batch:v1-rev20241204-2.0.0'
38+
implementation 'com.google.apis:google-api-services-batch:v1-rev20250122-2.0.0'
3939
}
4040
```
4141

0 commit comments

Comments
 (0)