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

fix: migrate grafeas/v1 to grpc_service_config #119

Merged
merged 1 commit into from Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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