Skip to content

Commit e9caf21

Browse files
feat: [batch] added StatusEvent.task_state (#9177)
- [ ] Regenerate this pull request now. docs: updated comments PiperOrigin-RevId: 513426000 Source-Link: https://togithub.com/googleapis/googleapis/commit/3f95ea2d86b8e826350897efac1674d6784b4030 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/b191b40b95e42eeea8d0bccf91dd1d1ba8a61fb1 Copy-Tag: eyJwIjoiamF2YS1iYXRjaC8uT3dsQm90LnlhbWwiLCJoIjoiYjE5MWI0MGI5NWU0MmVlZWE4ZDBiY2NmOTFkZDFkMWJhOGE2MWZiMSJ9 BEGIN_NESTED_COMMIT feat: [batch] resource usage docs: update comments PiperOrigin-RevId: 513425559 Source-Link: https://togithub.com/googleapis/googleapis/commit/2936faa73019cc9fa670eefc2776111457a7d798 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/5219e27baeeb63b209c4f0e9ca6c68e3b6698d66 Copy-Tag: eyJwIjoiamF2YS1iYXRjaC8uT3dsQm90LnlhbWwiLCJoIjoiNTIxOWUyN2JhZWViNjNiMjA5YzRmMGU5Y2E2YzY4ZTNiNjY5OGQ2NiJ9 END_NESTED_COMMIT
1 parent 64dc942 commit e9caf21

File tree

83 files changed

+3499
-3787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3499
-3787
lines changed

java-batch/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Java idiomatic client for [Cloud Batch][product-docs].
1717

1818
If you are using Maven, add this to your pom.xml file:
1919

20-
<!--- {x-version-update-start:google-cloud-batch:released} -->
2120

2221
```xml
2322
<dependency>
@@ -38,7 +37,6 @@ If you are using SBT, add this to your dependencies:
3837
```Scala
3938
libraryDependencies += "com.google.cloud" % "google-cloud-batch" % "0.12.0"
4039
```
41-
<!--- {x-version-update-end} -->
4240

4341
## Authentication
4442

java-batch/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceClient.java

-196
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@
3535
import com.google.cloud.location.ListLocationsResponse;
3636
import com.google.cloud.location.Location;
3737
import com.google.common.util.concurrent.MoreExecutors;
38-
import com.google.iam.v1.GetIamPolicyRequest;
39-
import com.google.iam.v1.Policy;
40-
import com.google.iam.v1.SetIamPolicyRequest;
41-
import com.google.iam.v1.TestIamPermissionsRequest;
42-
import com.google.iam.v1.TestIamPermissionsResponse;
4338
import com.google.longrunning.Operation;
4439
import com.google.protobuf.Empty;
4540
import java.io.IOException;
@@ -1142,197 +1137,6 @@ public final UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
11421137
return stub.getLocationCallable();
11431138
}
11441139

1145-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1146-
/**
1147-
* Sets the access control policy on the specified resource. Replacesany existing policy.
1148-
*
1149-
* <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
1150-
*
1151-
* <p>Sample code:
1152-
*
1153-
* <pre>{@code
1154-
* // This snippet has been automatically generated and should be regarded as a code template only.
1155-
* // It will require modifications to work:
1156-
* // - It may require correct/in-range values for request initialization.
1157-
* // - It may require specifying regional endpoints when creating the service client as shown in
1158-
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1159-
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
1160-
* SetIamPolicyRequest request =
1161-
* SetIamPolicyRequest.newBuilder()
1162-
* .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
1163-
* .setPolicy(Policy.newBuilder().build())
1164-
* .setUpdateMask(FieldMask.newBuilder().build())
1165-
* .build();
1166-
* Policy response = batchServiceClient.setIamPolicy(request);
1167-
* }
1168-
* }</pre>
1169-
*
1170-
* @param request The request object containing all of the parameters for the API call.
1171-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1172-
*/
1173-
public final Policy setIamPolicy(SetIamPolicyRequest request) {
1174-
return setIamPolicyCallable().call(request);
1175-
}
1176-
1177-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1178-
/**
1179-
* Sets the access control policy on the specified resource. Replacesany existing policy.
1180-
*
1181-
* <p>Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
1182-
*
1183-
* <p>Sample code:
1184-
*
1185-
* <pre>{@code
1186-
* // This snippet has been automatically generated and should be regarded as a code template only.
1187-
* // It will require modifications to work:
1188-
* // - It may require correct/in-range values for request initialization.
1189-
* // - It may require specifying regional endpoints when creating the service client as shown in
1190-
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1191-
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
1192-
* SetIamPolicyRequest request =
1193-
* SetIamPolicyRequest.newBuilder()
1194-
* .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
1195-
* .setPolicy(Policy.newBuilder().build())
1196-
* .setUpdateMask(FieldMask.newBuilder().build())
1197-
* .build();
1198-
* ApiFuture<Policy> future = batchServiceClient.setIamPolicyCallable().futureCall(request);
1199-
* // Do something.
1200-
* Policy response = future.get();
1201-
* }
1202-
* }</pre>
1203-
*/
1204-
public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
1205-
return stub.setIamPolicyCallable();
1206-
}
1207-
1208-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1209-
/**
1210-
* Gets the access control policy for a resource. Returns an empty policyif the resource exists
1211-
* and does not have a policy set.
1212-
*
1213-
* <p>Sample code:
1214-
*
1215-
* <pre>{@code
1216-
* // This snippet has been automatically generated and should be regarded as a code template only.
1217-
* // It will require modifications to work:
1218-
* // - It may require correct/in-range values for request initialization.
1219-
* // - It may require specifying regional endpoints when creating the service client as shown in
1220-
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1221-
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
1222-
* GetIamPolicyRequest request =
1223-
* GetIamPolicyRequest.newBuilder()
1224-
* .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
1225-
* .setOptions(GetPolicyOptions.newBuilder().build())
1226-
* .build();
1227-
* Policy response = batchServiceClient.getIamPolicy(request);
1228-
* }
1229-
* }</pre>
1230-
*
1231-
* @param request The request object containing all of the parameters for the API call.
1232-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1233-
*/
1234-
public final Policy getIamPolicy(GetIamPolicyRequest request) {
1235-
return getIamPolicyCallable().call(request);
1236-
}
1237-
1238-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1239-
/**
1240-
* Gets the access control policy for a resource. Returns an empty policyif the resource exists
1241-
* and does not have a policy set.
1242-
*
1243-
* <p>Sample code:
1244-
*
1245-
* <pre>{@code
1246-
* // This snippet has been automatically generated and should be regarded as a code template only.
1247-
* // It will require modifications to work:
1248-
* // - It may require correct/in-range values for request initialization.
1249-
* // - It may require specifying regional endpoints when creating the service client as shown in
1250-
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1251-
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
1252-
* GetIamPolicyRequest request =
1253-
* GetIamPolicyRequest.newBuilder()
1254-
* .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
1255-
* .setOptions(GetPolicyOptions.newBuilder().build())
1256-
* .build();
1257-
* ApiFuture<Policy> future = batchServiceClient.getIamPolicyCallable().futureCall(request);
1258-
* // Do something.
1259-
* Policy response = future.get();
1260-
* }
1261-
* }</pre>
1262-
*/
1263-
public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
1264-
return stub.getIamPolicyCallable();
1265-
}
1266-
1267-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1268-
/**
1269-
* Returns permissions that a caller has on the specified resource. If theresource does not exist,
1270-
* this will return an empty set ofpermissions, not a `NOT_FOUND` error.
1271-
*
1272-
* <p>Note: This operation is designed to be used for buildingpermission-aware UIs and
1273-
* command-line tools, not for authorizationchecking. This operation may "fail open" without
1274-
* warning.
1275-
*
1276-
* <p>Sample code:
1277-
*
1278-
* <pre>{@code
1279-
* // This snippet has been automatically generated and should be regarded as a code template only.
1280-
* // It will require modifications to work:
1281-
* // - It may require correct/in-range values for request initialization.
1282-
* // - It may require specifying regional endpoints when creating the service client as shown in
1283-
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1284-
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
1285-
* TestIamPermissionsRequest request =
1286-
* TestIamPermissionsRequest.newBuilder()
1287-
* .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
1288-
* .addAllPermissions(new ArrayList<String>())
1289-
* .build();
1290-
* TestIamPermissionsResponse response = batchServiceClient.testIamPermissions(request);
1291-
* }
1292-
* }</pre>
1293-
*
1294-
* @param request The request object containing all of the parameters for the API call.
1295-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1296-
*/
1297-
public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
1298-
return testIamPermissionsCallable().call(request);
1299-
}
1300-
1301-
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1302-
/**
1303-
* Returns permissions that a caller has on the specified resource. If theresource does not exist,
1304-
* this will return an empty set ofpermissions, not a `NOT_FOUND` error.
1305-
*
1306-
* <p>Note: This operation is designed to be used for buildingpermission-aware UIs and
1307-
* command-line tools, not for authorizationchecking. This operation may "fail open" without
1308-
* warning.
1309-
*
1310-
* <p>Sample code:
1311-
*
1312-
* <pre>{@code
1313-
* // This snippet has been automatically generated and should be regarded as a code template only.
1314-
* // It will require modifications to work:
1315-
* // - It may require correct/in-range values for request initialization.
1316-
* // - It may require specifying regional endpoints when creating the service client as shown in
1317-
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1318-
* try (BatchServiceClient batchServiceClient = BatchServiceClient.create()) {
1319-
* TestIamPermissionsRequest request =
1320-
* TestIamPermissionsRequest.newBuilder()
1321-
* .setResource(JobName.of("[PROJECT]", "[LOCATION]", "[JOB]").toString())
1322-
* .addAllPermissions(new ArrayList<String>())
1323-
* .build();
1324-
* ApiFuture<TestIamPermissionsResponse> future =
1325-
* batchServiceClient.testIamPermissionsCallable().futureCall(request);
1326-
* // Do something.
1327-
* TestIamPermissionsResponse response = future.get();
1328-
* }
1329-
* }</pre>
1330-
*/
1331-
public final UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
1332-
testIamPermissionsCallable() {
1333-
return stub.testIamPermissionsCallable();
1334-
}
1335-
13361140
@Override
13371141
public final void close() {
13381142
stub.close();

java-batch/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/BatchServiceSettings.java

-37
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
import com.google.cloud.location.ListLocationsRequest;
3939
import com.google.cloud.location.ListLocationsResponse;
4040
import com.google.cloud.location.Location;
41-
import com.google.iam.v1.GetIamPolicyRequest;
42-
import com.google.iam.v1.Policy;
43-
import com.google.iam.v1.SetIamPolicyRequest;
44-
import com.google.iam.v1.TestIamPermissionsRequest;
45-
import com.google.iam.v1.TestIamPermissionsResponse;
4641
import com.google.longrunning.Operation;
4742
import com.google.protobuf.Empty;
4843
import java.io.IOException;
@@ -137,22 +132,6 @@ public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() {
137132
return ((BatchServiceStubSettings) getStubSettings()).getLocationSettings();
138133
}
139134

140-
/** Returns the object with the settings used for calls to setIamPolicy. */
141-
public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() {
142-
return ((BatchServiceStubSettings) getStubSettings()).setIamPolicySettings();
143-
}
144-
145-
/** Returns the object with the settings used for calls to getIamPolicy. */
146-
public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
147-
return ((BatchServiceStubSettings) getStubSettings()).getIamPolicySettings();
148-
}
149-
150-
/** Returns the object with the settings used for calls to testIamPermissions. */
151-
public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>
152-
testIamPermissionsSettings() {
153-
return ((BatchServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
154-
}
155-
156135
public static final BatchServiceSettings create(BatchServiceStubSettings stub)
157136
throws IOException {
158137
return new BatchServiceSettings.Builder(stub.toBuilder()).build();
@@ -318,22 +297,6 @@ public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettin
318297
return getStubSettingsBuilder().getLocationSettings();
319298
}
320299

321-
/** Returns the builder for the settings used for calls to setIamPolicy. */
322-
public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() {
323-
return getStubSettingsBuilder().setIamPolicySettings();
324-
}
325-
326-
/** Returns the builder for the settings used for calls to getIamPolicy. */
327-
public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() {
328-
return getStubSettingsBuilder().getIamPolicySettings();
329-
}
330-
331-
/** Returns the builder for the settings used for calls to testIamPermissions. */
332-
public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse>
333-
testIamPermissionsSettings() {
334-
return getStubSettingsBuilder().testIamPermissionsSettings();
335-
}
336-
337300
@Override
338301
public BatchServiceSettings build() throws IOException {
339302
return new BatchServiceSettings(this);

java-batch/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/gapic_metadata.json

-9
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
"DeleteJob": {
1717
"methods": ["deleteJobAsync", "deleteJobAsync", "deleteJobOperationCallable", "deleteJobCallable"]
1818
},
19-
"GetIamPolicy": {
20-
"methods": ["getIamPolicy", "getIamPolicyCallable"]
21-
},
2219
"GetJob": {
2320
"methods": ["getJob", "getJob", "getJob", "getJobCallable"]
2421
},
@@ -36,12 +33,6 @@
3633
},
3734
"ListTasks": {
3835
"methods": ["listTasks", "listTasks", "listTasks", "listTasksPagedCallable", "listTasksCallable"]
39-
},
40-
"SetIamPolicy": {
41-
"methods": ["setIamPolicy", "setIamPolicyCallable"]
42-
},
43-
"TestIamPermissions": {
44-
"methods": ["testIamPermissions", "testIamPermissionsCallable"]
4536
}
4637
}
4738
}

java-batch/google-cloud-batch/src/main/java/com/google/cloud/batch/v1/stub/BatchServiceStub.java

-18
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
import com.google.cloud.location.ListLocationsRequest;
3939
import com.google.cloud.location.ListLocationsResponse;
4040
import com.google.cloud.location.Location;
41-
import com.google.iam.v1.GetIamPolicyRequest;
42-
import com.google.iam.v1.Policy;
43-
import com.google.iam.v1.SetIamPolicyRequest;
44-
import com.google.iam.v1.TestIamPermissionsRequest;
45-
import com.google.iam.v1.TestIamPermissionsResponse;
4641
import com.google.longrunning.Operation;
4742
import com.google.longrunning.stub.OperationsStub;
4843
import com.google.protobuf.Empty;
@@ -115,19 +110,6 @@ public UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
115110
throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
116111
}
117112

118-
public UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
119-
throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()");
120-
}
121-
122-
public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
123-
throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()");
124-
}
125-
126-
public UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
127-
testIamPermissionsCallable() {
128-
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
129-
}
130-
131113
@Override
132114
public abstract void close();
133115
}

0 commit comments

Comments
 (0)