Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
fix: migrate grafeas/v1 to grpc_service_config (#119)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/2e45955d-4978-4bbf-b28a-41cdec188631/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 317385359
Source-Link: googleapis/googleapis@79a17b8
  • Loading branch information
yoshi-automation committed Jun 22, 2020
1 parent 9ef32fe commit b325e56
Show file tree
Hide file tree
Showing 8 changed files with 443 additions and 431 deletions.
366 changes: 183 additions & 183 deletions src/main/java/io/grafeas/v1/GrafeasClient.java
Expand Up @@ -58,7 +58,7 @@
* <code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* grafeasClient.deleteOccurrence(name);
* Occurrence response = grafeasClient.getOccurrence(name);
* }
* </code>
* </pre>
Expand Down Expand Up @@ -165,188 +165,6 @@ public GrafeasStub getStub() {
return stub;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified occurrence. For example, use this method to delete an occurrence when the
* occurrence is no longer applicable for the given resource.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* grafeasClient.deleteOccurrence(name);
* }
* </code></pre>
*
* @param name The name of the occurrence in the form of
* `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteOccurrence(OccurrenceName name) {
DeleteOccurrenceRequest request =
DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteOccurrence(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified occurrence. For example, use this method to delete an occurrence when the
* occurrence is no longer applicable for the given resource.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* grafeasClient.deleteOccurrence(name.toString());
* }
* </code></pre>
*
* @param name The name of the occurrence in the form of
* `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteOccurrence(String name) {
DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder().setName(name).build();
deleteOccurrence(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified occurrence. For example, use this method to delete an occurrence when the
* occurrence is no longer applicable for the given resource.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder()
* .setName(name.toString())
* .build();
* grafeasClient.deleteOccurrence(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteOccurrence(DeleteOccurrenceRequest request) {
deleteOccurrenceCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified occurrence. For example, use this method to delete an occurrence when the
* occurrence is no longer applicable for the given resource.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = grafeasClient.deleteOccurrenceCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteOccurrenceRequest, Empty> deleteOccurrenceCallable() {
return stub.deleteOccurrenceCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified note.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
* grafeasClient.deleteNote(name);
* }
* </code></pre>
*
* @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteNote(NoteName name) {
DeleteNoteRequest request =
DeleteNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteNote(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified note.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
* grafeasClient.deleteNote(name.toString());
* }
* </code></pre>
*
* @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteNote(String name) {
DeleteNoteRequest request = DeleteNoteRequest.newBuilder().setName(name).build();
deleteNote(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified note.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
* DeleteNoteRequest request = DeleteNoteRequest.newBuilder()
* .setName(name.toString())
* .build();
* grafeasClient.deleteNote(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteNote(DeleteNoteRequest request) {
deleteNoteCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified note.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
* DeleteNoteRequest request = DeleteNoteRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = grafeasClient.deleteNoteCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteNoteRequest, Empty> deleteNoteCallable() {
return stub.deleteNoteCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Gets the specified occurrence.
Expand Down Expand Up @@ -576,6 +394,100 @@ public final ListOccurrencesPagedResponse listOccurrences(ListOccurrencesRequest
return stub.listOccurrencesCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified occurrence. For example, use this method to delete an occurrence when the
* occurrence is no longer applicable for the given resource.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* grafeasClient.deleteOccurrence(name);
* }
* </code></pre>
*
* @param name The name of the occurrence in the form of
* `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteOccurrence(OccurrenceName name) {
DeleteOccurrenceRequest request =
DeleteOccurrenceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteOccurrence(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified occurrence. For example, use this method to delete an occurrence when the
* occurrence is no longer applicable for the given resource.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* grafeasClient.deleteOccurrence(name.toString());
* }
* </code></pre>
*
* @param name The name of the occurrence in the form of
* `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteOccurrence(String name) {
DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder().setName(name).build();
deleteOccurrence(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified occurrence. For example, use this method to delete an occurrence when the
* occurrence is no longer applicable for the given resource.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder()
* .setName(name.toString())
* .build();
* grafeasClient.deleteOccurrence(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteOccurrence(DeleteOccurrenceRequest request) {
deleteOccurrenceCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified occurrence. For example, use this method to delete an occurrence when the
* occurrence is no longer applicable for the given resource.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
* DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = grafeasClient.deleteOccurrenceCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteOccurrenceRequest, Empty> deleteOccurrenceCallable() {
return stub.deleteOccurrenceCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates a new occurrence.
Expand Down Expand Up @@ -1219,6 +1131,94 @@ public final UnaryCallable<ListNotesRequest, ListNotesResponse> listNotesCallabl
return stub.listNotesCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified note.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
* grafeasClient.deleteNote(name);
* }
* </code></pre>
*
* @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteNote(NoteName name) {
DeleteNoteRequest request =
DeleteNoteRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteNote(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified note.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
* grafeasClient.deleteNote(name.toString());
* }
* </code></pre>
*
* @param name The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteNote(String name) {
DeleteNoteRequest request = DeleteNoteRequest.newBuilder().setName(name).build();
deleteNote(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified note.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
* DeleteNoteRequest request = DeleteNoteRequest.newBuilder()
* .setName(name.toString())
* .build();
* grafeasClient.deleteNote(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteNote(DeleteNoteRequest request) {
deleteNoteCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified note.
*
* <p>Sample code:
*
* <pre><code>
* try (GrafeasClient grafeasClient = GrafeasClient.create()) {
* NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
* DeleteNoteRequest request = DeleteNoteRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = grafeasClient.deleteNoteCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteNoteRequest, Empty> deleteNoteCallable() {
return stub.deleteNoteCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates a new note.
Expand Down

0 comments on commit b325e56

Please sign in to comment.