|
58 | 58 | * <code>
|
59 | 59 | * try (GrafeasClient grafeasClient = GrafeasClient.create()) {
|
60 | 60 | * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
|
61 |
| - * grafeasClient.deleteOccurrence(name); |
| 61 | + * Occurrence response = grafeasClient.getOccurrence(name); |
62 | 62 | * }
|
63 | 63 | * </code>
|
64 | 64 | * </pre>
|
@@ -165,188 +165,6 @@ public GrafeasStub getStub() {
|
165 | 165 | return stub;
|
166 | 166 | }
|
167 | 167 |
|
168 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
169 |
| - /** |
170 |
| - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the |
171 |
| - * occurrence is no longer applicable for the given resource. |
172 |
| - * |
173 |
| - * <p>Sample code: |
174 |
| - * |
175 |
| - * <pre><code> |
176 |
| - * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
177 |
| - * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); |
178 |
| - * grafeasClient.deleteOccurrence(name); |
179 |
| - * } |
180 |
| - * </code></pre> |
181 |
| - * |
182 |
| - * @param name The name of the occurrence in the form of |
183 |
| - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. |
184 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
185 |
| - */ |
186 |
| - public final void deleteOccurrence(OccurrenceName name) { |
187 |
| - DeleteOccurrenceRequest request = |
188 |
| - DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); |
189 |
| - deleteOccurrence(request); |
190 |
| - } |
191 |
| - |
192 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
193 |
| - /** |
194 |
| - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the |
195 |
| - * occurrence is no longer applicable for the given resource. |
196 |
| - * |
197 |
| - * <p>Sample code: |
198 |
| - * |
199 |
| - * <pre><code> |
200 |
| - * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
201 |
| - * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); |
202 |
| - * grafeasClient.deleteOccurrence(name.toString()); |
203 |
| - * } |
204 |
| - * </code></pre> |
205 |
| - * |
206 |
| - * @param name The name of the occurrence in the form of |
207 |
| - * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. |
208 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
209 |
| - */ |
210 |
| - public final void deleteOccurrence(String name) { |
211 |
| - DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder().setName(name).build(); |
212 |
| - deleteOccurrence(request); |
213 |
| - } |
214 |
| - |
215 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
216 |
| - /** |
217 |
| - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the |
218 |
| - * occurrence is no longer applicable for the given resource. |
219 |
| - * |
220 |
| - * <p>Sample code: |
221 |
| - * |
222 |
| - * <pre><code> |
223 |
| - * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
224 |
| - * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); |
225 |
| - * DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder() |
226 |
| - * .setName(name.toString()) |
227 |
| - * .build(); |
228 |
| - * grafeasClient.deleteOccurrence(request); |
229 |
| - * } |
230 |
| - * </code></pre> |
231 |
| - * |
232 |
| - * @param request The request object containing all of the parameters for the API call. |
233 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
234 |
| - */ |
235 |
| - public final void deleteOccurrence(DeleteOccurrenceRequest request) { |
236 |
| - deleteOccurrenceCallable().call(request); |
237 |
| - } |
238 |
| - |
239 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
240 |
| - /** |
241 |
| - * Deletes the specified occurrence. For example, use this method to delete an occurrence when the |
242 |
| - * occurrence is no longer applicable for the given resource. |
243 |
| - * |
244 |
| - * <p>Sample code: |
245 |
| - * |
246 |
| - * <pre><code> |
247 |
| - * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
248 |
| - * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); |
249 |
| - * DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder() |
250 |
| - * .setName(name.toString()) |
251 |
| - * .build(); |
252 |
| - * ApiFuture<Void> future = grafeasClient.deleteOccurrenceCallable().futureCall(request); |
253 |
| - * // Do something |
254 |
| - * future.get(); |
255 |
| - * } |
256 |
| - * </code></pre> |
257 |
| - */ |
258 |
| - public final UnaryCallable<DeleteOccurrenceRequest, Empty> deleteOccurrenceCallable() { |
259 |
| - return stub.deleteOccurrenceCallable(); |
260 |
| - } |
261 |
| - |
262 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
263 |
| - /** |
264 |
| - * Deletes the specified note. |
265 |
| - * |
266 |
| - * <p>Sample code: |
267 |
| - * |
268 |
| - * <pre><code> |
269 |
| - * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
270 |
| - * NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); |
271 |
| - * grafeasClient.deleteNote(name); |
272 |
| - * } |
273 |
| - * </code></pre> |
274 |
| - * |
275 |
| - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. |
276 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
277 |
| - */ |
278 |
| - public final void deleteNote(NoteName name) { |
279 |
| - DeleteNoteRequest request = |
280 |
| - DeleteNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); |
281 |
| - deleteNote(request); |
282 |
| - } |
283 |
| - |
284 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
285 |
| - /** |
286 |
| - * Deletes the specified note. |
287 |
| - * |
288 |
| - * <p>Sample code: |
289 |
| - * |
290 |
| - * <pre><code> |
291 |
| - * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
292 |
| - * NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); |
293 |
| - * grafeasClient.deleteNote(name.toString()); |
294 |
| - * } |
295 |
| - * </code></pre> |
296 |
| - * |
297 |
| - * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. |
298 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
299 |
| - */ |
300 |
| - public final void deleteNote(String name) { |
301 |
| - DeleteNoteRequest request = DeleteNoteRequest.newBuilder().setName(name).build(); |
302 |
| - deleteNote(request); |
303 |
| - } |
304 |
| - |
305 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
306 |
| - /** |
307 |
| - * Deletes the specified note. |
308 |
| - * |
309 |
| - * <p>Sample code: |
310 |
| - * |
311 |
| - * <pre><code> |
312 |
| - * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
313 |
| - * NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); |
314 |
| - * DeleteNoteRequest request = DeleteNoteRequest.newBuilder() |
315 |
| - * .setName(name.toString()) |
316 |
| - * .build(); |
317 |
| - * grafeasClient.deleteNote(request); |
318 |
| - * } |
319 |
| - * </code></pre> |
320 |
| - * |
321 |
| - * @param request The request object containing all of the parameters for the API call. |
322 |
| - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
323 |
| - */ |
324 |
| - public final void deleteNote(DeleteNoteRequest request) { |
325 |
| - deleteNoteCallable().call(request); |
326 |
| - } |
327 |
| - |
328 |
| - // AUTO-GENERATED DOCUMENTATION AND METHOD |
329 |
| - /** |
330 |
| - * Deletes the specified note. |
331 |
| - * |
332 |
| - * <p>Sample code: |
333 |
| - * |
334 |
| - * <pre><code> |
335 |
| - * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
336 |
| - * NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); |
337 |
| - * DeleteNoteRequest request = DeleteNoteRequest.newBuilder() |
338 |
| - * .setName(name.toString()) |
339 |
| - * .build(); |
340 |
| - * ApiFuture<Void> future = grafeasClient.deleteNoteCallable().futureCall(request); |
341 |
| - * // Do something |
342 |
| - * future.get(); |
343 |
| - * } |
344 |
| - * </code></pre> |
345 |
| - */ |
346 |
| - public final UnaryCallable<DeleteNoteRequest, Empty> deleteNoteCallable() { |
347 |
| - return stub.deleteNoteCallable(); |
348 |
| - } |
349 |
| - |
350 | 168 | // AUTO-GENERATED DOCUMENTATION AND METHOD
|
351 | 169 | /**
|
352 | 170 | * Gets the specified occurrence.
|
@@ -576,6 +394,100 @@ public final ListOccurrencesPagedResponse listOccurrences(ListOccurrencesRequest
|
576 | 394 | return stub.listOccurrencesCallable();
|
577 | 395 | }
|
578 | 396 |
|
| 397 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 398 | + /** |
| 399 | + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the |
| 400 | + * occurrence is no longer applicable for the given resource. |
| 401 | + * |
| 402 | + * <p>Sample code: |
| 403 | + * |
| 404 | + * <pre><code> |
| 405 | + * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
| 406 | + * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); |
| 407 | + * grafeasClient.deleteOccurrence(name); |
| 408 | + * } |
| 409 | + * </code></pre> |
| 410 | + * |
| 411 | + * @param name The name of the occurrence in the form of |
| 412 | + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. |
| 413 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 414 | + */ |
| 415 | + public final void deleteOccurrence(OccurrenceName name) { |
| 416 | + DeleteOccurrenceRequest request = |
| 417 | + DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); |
| 418 | + deleteOccurrence(request); |
| 419 | + } |
| 420 | + |
| 421 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 422 | + /** |
| 423 | + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the |
| 424 | + * occurrence is no longer applicable for the given resource. |
| 425 | + * |
| 426 | + * <p>Sample code: |
| 427 | + * |
| 428 | + * <pre><code> |
| 429 | + * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
| 430 | + * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); |
| 431 | + * grafeasClient.deleteOccurrence(name.toString()); |
| 432 | + * } |
| 433 | + * </code></pre> |
| 434 | + * |
| 435 | + * @param name The name of the occurrence in the form of |
| 436 | + * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. |
| 437 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 438 | + */ |
| 439 | + public final void deleteOccurrence(String name) { |
| 440 | + DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder().setName(name).build(); |
| 441 | + deleteOccurrence(request); |
| 442 | + } |
| 443 | + |
| 444 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 445 | + /** |
| 446 | + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the |
| 447 | + * occurrence is no longer applicable for the given resource. |
| 448 | + * |
| 449 | + * <p>Sample code: |
| 450 | + * |
| 451 | + * <pre><code> |
| 452 | + * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
| 453 | + * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); |
| 454 | + * DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder() |
| 455 | + * .setName(name.toString()) |
| 456 | + * .build(); |
| 457 | + * grafeasClient.deleteOccurrence(request); |
| 458 | + * } |
| 459 | + * </code></pre> |
| 460 | + * |
| 461 | + * @param request The request object containing all of the parameters for the API call. |
| 462 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 463 | + */ |
| 464 | + public final void deleteOccurrence(DeleteOccurrenceRequest request) { |
| 465 | + deleteOccurrenceCallable().call(request); |
| 466 | + } |
| 467 | + |
| 468 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 469 | + /** |
| 470 | + * Deletes the specified occurrence. For example, use this method to delete an occurrence when the |
| 471 | + * occurrence is no longer applicable for the given resource. |
| 472 | + * |
| 473 | + * <p>Sample code: |
| 474 | + * |
| 475 | + * <pre><code> |
| 476 | + * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
| 477 | + * OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]"); |
| 478 | + * DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder() |
| 479 | + * .setName(name.toString()) |
| 480 | + * .build(); |
| 481 | + * ApiFuture<Void> future = grafeasClient.deleteOccurrenceCallable().futureCall(request); |
| 482 | + * // Do something |
| 483 | + * future.get(); |
| 484 | + * } |
| 485 | + * </code></pre> |
| 486 | + */ |
| 487 | + public final UnaryCallable<DeleteOccurrenceRequest, Empty> deleteOccurrenceCallable() { |
| 488 | + return stub.deleteOccurrenceCallable(); |
| 489 | + } |
| 490 | + |
579 | 491 | // AUTO-GENERATED DOCUMENTATION AND METHOD
|
580 | 492 | /**
|
581 | 493 | * Creates a new occurrence.
|
@@ -1219,6 +1131,94 @@ public final UnaryCallable<ListNotesRequest, ListNotesResponse> listNotesCallabl
|
1219 | 1131 | return stub.listNotesCallable();
|
1220 | 1132 | }
|
1221 | 1133 |
|
| 1134 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 1135 | + /** |
| 1136 | + * Deletes the specified note. |
| 1137 | + * |
| 1138 | + * <p>Sample code: |
| 1139 | + * |
| 1140 | + * <pre><code> |
| 1141 | + * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
| 1142 | + * NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); |
| 1143 | + * grafeasClient.deleteNote(name); |
| 1144 | + * } |
| 1145 | + * </code></pre> |
| 1146 | + * |
| 1147 | + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. |
| 1148 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 1149 | + */ |
| 1150 | + public final void deleteNote(NoteName name) { |
| 1151 | + DeleteNoteRequest request = |
| 1152 | + DeleteNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); |
| 1153 | + deleteNote(request); |
| 1154 | + } |
| 1155 | + |
| 1156 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 1157 | + /** |
| 1158 | + * Deletes the specified note. |
| 1159 | + * |
| 1160 | + * <p>Sample code: |
| 1161 | + * |
| 1162 | + * <pre><code> |
| 1163 | + * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
| 1164 | + * NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); |
| 1165 | + * grafeasClient.deleteNote(name.toString()); |
| 1166 | + * } |
| 1167 | + * </code></pre> |
| 1168 | + * |
| 1169 | + * @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. |
| 1170 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 1171 | + */ |
| 1172 | + public final void deleteNote(String name) { |
| 1173 | + DeleteNoteRequest request = DeleteNoteRequest.newBuilder().setName(name).build(); |
| 1174 | + deleteNote(request); |
| 1175 | + } |
| 1176 | + |
| 1177 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 1178 | + /** |
| 1179 | + * Deletes the specified note. |
| 1180 | + * |
| 1181 | + * <p>Sample code: |
| 1182 | + * |
| 1183 | + * <pre><code> |
| 1184 | + * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
| 1185 | + * NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); |
| 1186 | + * DeleteNoteRequest request = DeleteNoteRequest.newBuilder() |
| 1187 | + * .setName(name.toString()) |
| 1188 | + * .build(); |
| 1189 | + * grafeasClient.deleteNote(request); |
| 1190 | + * } |
| 1191 | + * </code></pre> |
| 1192 | + * |
| 1193 | + * @param request The request object containing all of the parameters for the API call. |
| 1194 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 1195 | + */ |
| 1196 | + public final void deleteNote(DeleteNoteRequest request) { |
| 1197 | + deleteNoteCallable().call(request); |
| 1198 | + } |
| 1199 | + |
| 1200 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 1201 | + /** |
| 1202 | + * Deletes the specified note. |
| 1203 | + * |
| 1204 | + * <p>Sample code: |
| 1205 | + * |
| 1206 | + * <pre><code> |
| 1207 | + * try (GrafeasClient grafeasClient = GrafeasClient.create()) { |
| 1208 | + * NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); |
| 1209 | + * DeleteNoteRequest request = DeleteNoteRequest.newBuilder() |
| 1210 | + * .setName(name.toString()) |
| 1211 | + * .build(); |
| 1212 | + * ApiFuture<Void> future = grafeasClient.deleteNoteCallable().futureCall(request); |
| 1213 | + * // Do something |
| 1214 | + * future.get(); |
| 1215 | + * } |
| 1216 | + * </code></pre> |
| 1217 | + */ |
| 1218 | + public final UnaryCallable<DeleteNoteRequest, Empty> deleteNoteCallable() { |
| 1219 | + return stub.deleteNoteCallable(); |
| 1220 | + } |
| 1221 | + |
1222 | 1222 | // AUTO-GENERATED DOCUMENTATION AND METHOD
|
1223 | 1223 | /**
|
1224 | 1224 | * Creates a new note.
|
|
0 commit comments