|
1 | 1 | /*
|
2 |
| - * Copyright 2024 Google LLC |
| 2 | + * Copyright 2025 Google LLC |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
160 | 160 | * </td>
|
161 | 161 | * </tr>
|
162 | 162 | * <tr>
|
| 163 | + * <td><p> UpdateEndpointLongRunning</td> |
| 164 | + * <td><p> Updates an Endpoint with a long running operation.</td> |
| 165 | + * <td> |
| 166 | + * <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p> |
| 167 | + * <ul> |
| 168 | + * <li><p> updateEndpointLongRunningAsync(UpdateEndpointLongRunningRequest request) |
| 169 | + * </ul> |
| 170 | + * <p>Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.</p> |
| 171 | + * <ul> |
| 172 | + * <li><p> updateEndpointLongRunningAsync(Endpoint endpoint) |
| 173 | + * </ul> |
| 174 | + * <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p> |
| 175 | + * <ul> |
| 176 | + * <li><p> updateEndpointLongRunningOperationCallable() |
| 177 | + * <li><p> updateEndpointLongRunningCallable() |
| 178 | + * </ul> |
| 179 | + * </td> |
| 180 | + * </tr> |
| 181 | + * <tr> |
163 | 182 | * <td><p> DeleteEndpoint</td>
|
164 | 183 | * <td><p> Deletes an Endpoint.</td>
|
165 | 184 | * <td>
|
@@ -1077,6 +1096,124 @@ public final UnaryCallable<UpdateEndpointRequest, Endpoint> updateEndpointCallab
|
1077 | 1096 | return stub.updateEndpointCallable();
|
1078 | 1097 | }
|
1079 | 1098 |
|
| 1099 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 1100 | + /** |
| 1101 | + * Updates an Endpoint with a long running operation. |
| 1102 | + * |
| 1103 | + * <p>Sample code: |
| 1104 | + * |
| 1105 | + * <pre>{@code |
| 1106 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 1107 | + * // It will require modifications to work: |
| 1108 | + * // - It may require correct/in-range values for request initialization. |
| 1109 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 1110 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 1111 | + * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) { |
| 1112 | + * Endpoint endpoint = Endpoint.newBuilder().build(); |
| 1113 | + * Endpoint response = endpointServiceClient.updateEndpointLongRunningAsync(endpoint).get(); |
| 1114 | + * } |
| 1115 | + * }</pre> |
| 1116 | + * |
| 1117 | + * @param endpoint Required. The Endpoint which replaces the resource on the server. Currently we |
| 1118 | + * only support updating the `client_connection_config` field, all the other fields' update |
| 1119 | + * will be blocked. |
| 1120 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 1121 | + */ |
| 1122 | + public final OperationFuture<Endpoint, UpdateEndpointOperationMetadata> |
| 1123 | + updateEndpointLongRunningAsync(Endpoint endpoint) { |
| 1124 | + UpdateEndpointLongRunningRequest request = |
| 1125 | + UpdateEndpointLongRunningRequest.newBuilder().setEndpoint(endpoint).build(); |
| 1126 | + return updateEndpointLongRunningAsync(request); |
| 1127 | + } |
| 1128 | + |
| 1129 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 1130 | + /** |
| 1131 | + * Updates an Endpoint with a long running operation. |
| 1132 | + * |
| 1133 | + * <p>Sample code: |
| 1134 | + * |
| 1135 | + * <pre>{@code |
| 1136 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 1137 | + * // It will require modifications to work: |
| 1138 | + * // - It may require correct/in-range values for request initialization. |
| 1139 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 1140 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 1141 | + * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) { |
| 1142 | + * UpdateEndpointLongRunningRequest request = |
| 1143 | + * UpdateEndpointLongRunningRequest.newBuilder() |
| 1144 | + * .setEndpoint(Endpoint.newBuilder().build()) |
| 1145 | + * .build(); |
| 1146 | + * Endpoint response = endpointServiceClient.updateEndpointLongRunningAsync(request).get(); |
| 1147 | + * } |
| 1148 | + * }</pre> |
| 1149 | + * |
| 1150 | + * @param request The request object containing all of the parameters for the API call. |
| 1151 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 1152 | + */ |
| 1153 | + public final OperationFuture<Endpoint, UpdateEndpointOperationMetadata> |
| 1154 | + updateEndpointLongRunningAsync(UpdateEndpointLongRunningRequest request) { |
| 1155 | + return updateEndpointLongRunningOperationCallable().futureCall(request); |
| 1156 | + } |
| 1157 | + |
| 1158 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 1159 | + /** |
| 1160 | + * Updates an Endpoint with a long running operation. |
| 1161 | + * |
| 1162 | + * <p>Sample code: |
| 1163 | + * |
| 1164 | + * <pre>{@code |
| 1165 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 1166 | + * // It will require modifications to work: |
| 1167 | + * // - It may require correct/in-range values for request initialization. |
| 1168 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 1169 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 1170 | + * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) { |
| 1171 | + * UpdateEndpointLongRunningRequest request = |
| 1172 | + * UpdateEndpointLongRunningRequest.newBuilder() |
| 1173 | + * .setEndpoint(Endpoint.newBuilder().build()) |
| 1174 | + * .build(); |
| 1175 | + * OperationFuture<Endpoint, UpdateEndpointOperationMetadata> future = |
| 1176 | + * endpointServiceClient.updateEndpointLongRunningOperationCallable().futureCall(request); |
| 1177 | + * // Do something. |
| 1178 | + * Endpoint response = future.get(); |
| 1179 | + * } |
| 1180 | + * }</pre> |
| 1181 | + */ |
| 1182 | + public final OperationCallable< |
| 1183 | + UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata> |
| 1184 | + updateEndpointLongRunningOperationCallable() { |
| 1185 | + return stub.updateEndpointLongRunningOperationCallable(); |
| 1186 | + } |
| 1187 | + |
| 1188 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 1189 | + /** |
| 1190 | + * Updates an Endpoint with a long running operation. |
| 1191 | + * |
| 1192 | + * <p>Sample code: |
| 1193 | + * |
| 1194 | + * <pre>{@code |
| 1195 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 1196 | + * // It will require modifications to work: |
| 1197 | + * // - It may require correct/in-range values for request initialization. |
| 1198 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 1199 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 1200 | + * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) { |
| 1201 | + * UpdateEndpointLongRunningRequest request = |
| 1202 | + * UpdateEndpointLongRunningRequest.newBuilder() |
| 1203 | + * .setEndpoint(Endpoint.newBuilder().build()) |
| 1204 | + * .build(); |
| 1205 | + * ApiFuture<Operation> future = |
| 1206 | + * endpointServiceClient.updateEndpointLongRunningCallable().futureCall(request); |
| 1207 | + * // Do something. |
| 1208 | + * Operation response = future.get(); |
| 1209 | + * } |
| 1210 | + * }</pre> |
| 1211 | + */ |
| 1212 | + public final UnaryCallable<UpdateEndpointLongRunningRequest, Operation> |
| 1213 | + updateEndpointLongRunningCallable() { |
| 1214 | + return stub.updateEndpointLongRunningCallable(); |
| 1215 | + } |
| 1216 | + |
1080 | 1217 | // AUTO-GENERATED DOCUMENTATION AND METHOD.
|
1081 | 1218 | /**
|
1082 | 1219 | * Deletes an Endpoint.
|
|
0 commit comments