- 2.55.0 (latest)
- 2.54.0
- 2.53.0
- 2.52.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.10
- 2.3.1
- 2.2.16
public class GrafeasV1Beta1Client implements BackgroundResource
Service Description: Grafeas API.
Retrieves analysis results of Cloud components such as Docker container images.
Analysis results are stored as a series of occurrences. An Occurrence
contains information
about a specific analysis instance on a resource. An occurrence refers to a Note
. A note
contains details describing the analysis and is generally stored in a separate project, called a
Provider
. Multiple occurrences can refer to the same note.
For example, an SSL vulnerability could affect multiple images. In this case, there would be one note for the vulnerability and an occurrence for each image with the vulnerability referring to that note.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Occurrence response = grafeasV1Beta1Client.getOccurrence(name);
}
Note: close() needs to be called on the grafeasV1Beta1Client object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of GrafeasV1Beta1Settings to create(). For example:
To customize credentials:
GrafeasV1Beta1Settings grafeasV1Beta1Settings =
GrafeasV1Beta1Settings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
GrafeasV1Beta1Client grafeasV1Beta1Client =
GrafeasV1Beta1Client.create(grafeasV1Beta1Settings);
To customize the endpoint:
GrafeasV1Beta1Settings grafeasV1Beta1Settings =
GrafeasV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
GrafeasV1Beta1Client grafeasV1Beta1Client =
GrafeasV1Beta1Client.create(grafeasV1Beta1Settings);
Implements
BackgroundResourceStatic Methods
create()
public static final GrafeasV1Beta1Client create()
Constructs an instance of GrafeasV1Beta1Client with default settings.
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client |
Exceptions | |
---|---|
Type | Description |
IOException |
create(GrafeasV1Beta1Settings settings)
public static final GrafeasV1Beta1Client create(GrafeasV1Beta1Settings settings)
Constructs an instance of GrafeasV1Beta1Client, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Parameter | |
---|---|
Name | Description |
settings | GrafeasV1Beta1Settings |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client |
Exceptions | |
---|---|
Type | Description |
IOException |
create(GrafeasV1Beta1Stub stub)
public static final GrafeasV1Beta1Client create(GrafeasV1Beta1Stub stub)
Constructs an instance of GrafeasV1Beta1Client, using the given stub for making calls. This is for advanced usage - prefer to use GrafeasV1Beta1Settings}.
Parameter | |
---|---|
Name | Description |
stub | GrafeasV1Beta1Stub |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client |
Constructors
GrafeasV1Beta1Client(GrafeasV1Beta1Settings settings)
protected GrafeasV1Beta1Client(GrafeasV1Beta1Settings settings)
Constructs an instance of GrafeasV1Beta1Client, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Parameter | |
---|---|
Name | Description |
settings | GrafeasV1Beta1Settings |
GrafeasV1Beta1Client(GrafeasV1Beta1Stub stub)
protected GrafeasV1Beta1Client(GrafeasV1Beta1Stub stub)
Parameter | |
---|---|
Name | Description |
stub | GrafeasV1Beta1Stub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration | long |
unit | TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
batchCreateNotes(ProjectName parent, Map<String,Note> notes)
public final BatchCreateNotesResponse batchCreateNotes(ProjectName parent, Map<String,Note> notes)
Creates new notes in batch.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Map<String, Note> notes = new HashMap<>();
BatchCreateNotesResponse response = grafeasV1Beta1Client.batchCreateNotes(parent, notes);
}
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
notes | Map<String,Note> The notes to create. |
Returns | |
---|---|
Type | Description |
BatchCreateNotesResponse |
batchCreateNotes(BatchCreateNotesRequest request)
public final BatchCreateNotesResponse batchCreateNotes(BatchCreateNotesRequest request)
Creates new notes in batch.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Map<String, Note> notes = new HashMap<>();
BatchCreateNotesRequest request = BatchCreateNotesRequest.newBuilder()
.setParent(parent.toString())
.putAllNotes(notes)
.build();
BatchCreateNotesResponse response = grafeasV1Beta1Client.batchCreateNotes(request);
}
Parameter | |
---|---|
Name | Description |
request | BatchCreateNotesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
BatchCreateNotesResponse |
batchCreateNotes(String parent, Map<String,Note> notes)
public final BatchCreateNotesResponse batchCreateNotes(String parent, Map<String,Note> notes)
Creates new notes in batch.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Map<String, Note> notes = new HashMap<>();
BatchCreateNotesResponse response = grafeasV1Beta1Client.batchCreateNotes(parent.toString(), notes);
}
Parameters | |
---|---|
Name | Description |
parent | String The name of the project in the form of |
notes | Map<String,Note> The notes to create. |
Returns | |
---|---|
Type | Description |
BatchCreateNotesResponse |
batchCreateNotesCallable()
public final UnaryCallable<BatchCreateNotesRequest,BatchCreateNotesResponse> batchCreateNotesCallable()
Creates new notes in batch.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Map<String, Note> notes = new HashMap<>();
BatchCreateNotesRequest request = BatchCreateNotesRequest.newBuilder()
.setParent(parent.toString())
.putAllNotes(notes)
.build();
ApiFuture<BatchCreateNotesResponse> future = grafeasV1Beta1Client.batchCreateNotesCallable().futureCall(request);
// Do something
BatchCreateNotesResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<BatchCreateNotesRequest,BatchCreateNotesResponse> |
batchCreateOccurrences(ProjectName parent, List<Occurrence> occurrences)
public final BatchCreateOccurrencesResponse batchCreateOccurrences(ProjectName parent, List<Occurrence> occurrences)
Creates new occurrences in batch.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
List<Occurrence> occurrences = new ArrayList<>();
BatchCreateOccurrencesResponse response = grafeasV1Beta1Client.batchCreateOccurrences(parent, occurrences);
}
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
occurrences | List<Occurrence> The occurrences to create. |
Returns | |
---|---|
Type | Description |
BatchCreateOccurrencesResponse |
batchCreateOccurrences(BatchCreateOccurrencesRequest request)
public final BatchCreateOccurrencesResponse batchCreateOccurrences(BatchCreateOccurrencesRequest request)
Creates new occurrences in batch.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
List<Occurrence> occurrences = new ArrayList<>();
BatchCreateOccurrencesRequest request = BatchCreateOccurrencesRequest.newBuilder()
.setParent(parent.toString())
.addAllOccurrences(occurrences)
.build();
BatchCreateOccurrencesResponse response = grafeasV1Beta1Client.batchCreateOccurrences(request);
}
Parameter | |
---|---|
Name | Description |
request | BatchCreateOccurrencesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
BatchCreateOccurrencesResponse |
batchCreateOccurrences(String parent, List<Occurrence> occurrences)
public final BatchCreateOccurrencesResponse batchCreateOccurrences(String parent, List<Occurrence> occurrences)
Creates new occurrences in batch.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
List<Occurrence> occurrences = new ArrayList<>();
BatchCreateOccurrencesResponse response = grafeasV1Beta1Client.batchCreateOccurrences(parent.toString(), occurrences);
}
Parameters | |
---|---|
Name | Description |
parent | String The name of the project in the form of |
occurrences | List<Occurrence> The occurrences to create. |
Returns | |
---|---|
Type | Description |
BatchCreateOccurrencesResponse |
batchCreateOccurrencesCallable()
public final UnaryCallable<BatchCreateOccurrencesRequest,BatchCreateOccurrencesResponse> batchCreateOccurrencesCallable()
Creates new occurrences in batch.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
List<Occurrence> occurrences = new ArrayList<>();
BatchCreateOccurrencesRequest request = BatchCreateOccurrencesRequest.newBuilder()
.setParent(parent.toString())
.addAllOccurrences(occurrences)
.build();
ApiFuture<BatchCreateOccurrencesResponse> future = grafeasV1Beta1Client.batchCreateOccurrencesCallable().futureCall(request);
// Do something
BatchCreateOccurrencesResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<BatchCreateOccurrencesRequest,BatchCreateOccurrencesResponse> |
close()
public final void close()
createNote(ProjectName parent, String noteId, Note note)
public final Note createNote(ProjectName parent, String noteId, Note note)
Creates a new note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String noteId = "";
Note note = Note.newBuilder().build();
Note response = grafeasV1Beta1Client.createNote(parent, noteId, note);
}
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
noteId | String The ID to use for this note. |
note | Note The note to create. |
Returns | |
---|---|
Type | Description |
Note |
createNote(CreateNoteRequest request)
public final Note createNote(CreateNoteRequest request)
Creates a new note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String noteId = "";
Note note = Note.newBuilder().build();
CreateNoteRequest request = CreateNoteRequest.newBuilder()
.setParent(parent.toString())
.setNoteId(noteId)
.setNote(note)
.build();
Note response = grafeasV1Beta1Client.createNote(request);
}
Parameter | |
---|---|
Name | Description |
request | CreateNoteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Note |
createNote(String parent, String noteId, Note note)
public final Note createNote(String parent, String noteId, Note note)
Creates a new note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String noteId = "";
Note note = Note.newBuilder().build();
Note response = grafeasV1Beta1Client.createNote(parent.toString(), noteId, note);
}
Parameters | |
---|---|
Name | Description |
parent | String The name of the project in the form of |
noteId | String The ID to use for this note. |
note | Note The note to create. |
Returns | |
---|---|
Type | Description |
Note |
createNoteCallable()
public final UnaryCallable<CreateNoteRequest,Note> createNoteCallable()
Creates a new note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String noteId = "";
Note note = Note.newBuilder().build();
CreateNoteRequest request = CreateNoteRequest.newBuilder()
.setParent(parent.toString())
.setNoteId(noteId)
.setNote(note)
.build();
ApiFuture<Note> future = grafeasV1Beta1Client.createNoteCallable().futureCall(request);
// Do something
Note response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateNoteRequest,Note> |
createOccurrence(ProjectName parent, Occurrence occurrence)
public final Occurrence createOccurrence(ProjectName parent, Occurrence occurrence)
Creates a new occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Occurrence occurrence = Occurrence.newBuilder().build();
Occurrence response = grafeasV1Beta1Client.createOccurrence(parent, occurrence);
}
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
occurrence | Occurrence The occurrence to create. |
Returns | |
---|---|
Type | Description |
Occurrence |
createOccurrence(CreateOccurrenceRequest request)
public final Occurrence createOccurrence(CreateOccurrenceRequest request)
Creates a new occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Occurrence occurrence = Occurrence.newBuilder().build();
CreateOccurrenceRequest request = CreateOccurrenceRequest.newBuilder()
.setParent(parent.toString())
.setOccurrence(occurrence)
.build();
Occurrence response = grafeasV1Beta1Client.createOccurrence(request);
}
Parameter | |
---|---|
Name | Description |
request | CreateOccurrenceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Occurrence |
createOccurrence(String parent, Occurrence occurrence)
public final Occurrence createOccurrence(String parent, Occurrence occurrence)
Creates a new occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Occurrence occurrence = Occurrence.newBuilder().build();
Occurrence response = grafeasV1Beta1Client.createOccurrence(parent.toString(), occurrence);
}
Parameters | |
---|---|
Name | Description |
parent | String The name of the project in the form of |
occurrence | Occurrence The occurrence to create. |
Returns | |
---|---|
Type | Description |
Occurrence |
createOccurrenceCallable()
public final UnaryCallable<CreateOccurrenceRequest,Occurrence> createOccurrenceCallable()
Creates a new occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
Occurrence occurrence = Occurrence.newBuilder().build();
CreateOccurrenceRequest request = CreateOccurrenceRequest.newBuilder()
.setParent(parent.toString())
.setOccurrence(occurrence)
.build();
ApiFuture<Occurrence> future = grafeasV1Beta1Client.createOccurrenceCallable().futureCall(request);
// Do something
Occurrence response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateOccurrenceRequest,Occurrence> |
deleteNote(NoteName name)
public final void deleteNote(NoteName name)
Deletes the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
grafeasV1Beta1Client.deleteNote(name);
}
Parameter | |
---|---|
Name | Description |
name | NoteName The name of the note in the form of |
deleteNote(DeleteNoteRequest request)
public final void deleteNote(DeleteNoteRequest request)
Deletes the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
DeleteNoteRequest request = DeleteNoteRequest.newBuilder()
.setName(name.toString())
.build();
grafeasV1Beta1Client.deleteNote(request);
}
Parameter | |
---|---|
Name | Description |
request | DeleteNoteRequest The request object containing all of the parameters for the API call. |
deleteNote(String name)
public final void deleteNote(String name)
Deletes the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
grafeasV1Beta1Client.deleteNote(name.toString());
}
Parameter | |
---|---|
Name | Description |
name | String The name of the note in the form of |
deleteNoteCallable()
public final UnaryCallable<DeleteNoteRequest,Empty> deleteNoteCallable()
Deletes the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
DeleteNoteRequest request = DeleteNoteRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Void> future = grafeasV1Beta1Client.deleteNoteCallable().futureCall(request);
// Do something
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteNoteRequest,Empty> |
deleteOccurrence(OccurrenceName name)
public final void deleteOccurrence(OccurrenceName name)
Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
grafeasV1Beta1Client.deleteOccurrence(name);
}
Parameter | |
---|---|
Name | Description |
name | OccurrenceName The name of the occurrence in the form of
|
deleteOccurrence(DeleteOccurrenceRequest request)
public final void deleteOccurrence(DeleteOccurrenceRequest request)
Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder()
.setName(name.toString())
.build();
grafeasV1Beta1Client.deleteOccurrence(request);
}
Parameter | |
---|---|
Name | Description |
request | DeleteOccurrenceRequest The request object containing all of the parameters for the API call. |
deleteOccurrence(String name)
public final void deleteOccurrence(String name)
Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
grafeasV1Beta1Client.deleteOccurrence(name.toString());
}
Parameter | |
---|---|
Name | Description |
name | String The name of the occurrence in the form of
|
deleteOccurrenceCallable()
public final UnaryCallable<DeleteOccurrenceRequest,Empty> deleteOccurrenceCallable()
Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
DeleteOccurrenceRequest request = DeleteOccurrenceRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Void> future = grafeasV1Beta1Client.deleteOccurrenceCallable().futureCall(request);
// Do something
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteOccurrenceRequest,Empty> |
getNote(NoteName name)
public final Note getNote(NoteName name)
Gets the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
Note response = grafeasV1Beta1Client.getNote(name);
}
Parameter | |
---|---|
Name | Description |
name | NoteName The name of the note in the form of |
Returns | |
---|---|
Type | Description |
Note |
getNote(GetNoteRequest request)
public final Note getNote(GetNoteRequest request)
Gets the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
GetNoteRequest request = GetNoteRequest.newBuilder()
.setName(name.toString())
.build();
Note response = grafeasV1Beta1Client.getNote(request);
}
Parameter | |
---|---|
Name | Description |
request | GetNoteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Note |
getNote(String name)
public final Note getNote(String name)
Gets the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
Note response = grafeasV1Beta1Client.getNote(name.toString());
}
Parameter | |
---|---|
Name | Description |
name | String The name of the note in the form of |
Returns | |
---|---|
Type | Description |
Note |
getNoteCallable()
public final UnaryCallable<GetNoteRequest,Note> getNoteCallable()
Gets the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
GetNoteRequest request = GetNoteRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Note> future = grafeasV1Beta1Client.getNoteCallable().futureCall(request);
// Do something
Note response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetNoteRequest,Note> |
getOccurrence(OccurrenceName name)
public final Occurrence getOccurrence(OccurrenceName name)
Gets the specified occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Occurrence response = grafeasV1Beta1Client.getOccurrence(name);
}
Parameter | |
---|---|
Name | Description |
name | OccurrenceName The name of the occurrence in the form of
|
Returns | |
---|---|
Type | Description |
Occurrence |
getOccurrence(GetOccurrenceRequest request)
public final Occurrence getOccurrence(GetOccurrenceRequest request)
Gets the specified occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
GetOccurrenceRequest request = GetOccurrenceRequest.newBuilder()
.setName(name.toString())
.build();
Occurrence response = grafeasV1Beta1Client.getOccurrence(request);
}
Parameter | |
---|---|
Name | Description |
request | GetOccurrenceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Occurrence |
getOccurrence(String name)
public final Occurrence getOccurrence(String name)
Gets the specified occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Occurrence response = grafeasV1Beta1Client.getOccurrence(name.toString());
}
Parameter | |
---|---|
Name | Description |
name | String The name of the occurrence in the form of
|
Returns | |
---|---|
Type | Description |
Occurrence |
getOccurrenceCallable()
public final UnaryCallable<GetOccurrenceRequest,Occurrence> getOccurrenceCallable()
Gets the specified occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
GetOccurrenceRequest request = GetOccurrenceRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Occurrence> future = grafeasV1Beta1Client.getOccurrenceCallable().futureCall(request);
// Do something
Occurrence response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetOccurrenceRequest,Occurrence> |
getOccurrenceNote(OccurrenceName name)
public final Note getOccurrenceNote(OccurrenceName name)
Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Note response = grafeasV1Beta1Client.getOccurrenceNote(name);
}
Parameter | |
---|---|
Name | Description |
name | OccurrenceName The name of the occurrence in the form of
|
Returns | |
---|---|
Type | Description |
Note |
getOccurrenceNote(GetOccurrenceNoteRequest request)
public final Note getOccurrenceNote(GetOccurrenceNoteRequest request)
Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
GetOccurrenceNoteRequest request = GetOccurrenceNoteRequest.newBuilder()
.setName(name.toString())
.build();
Note response = grafeasV1Beta1Client.getOccurrenceNote(request);
}
Parameter | |
---|---|
Name | Description |
request | GetOccurrenceNoteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Note |
getOccurrenceNote(String name)
public final Note getOccurrenceNote(String name)
Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Note response = grafeasV1Beta1Client.getOccurrenceNote(name.toString());
}
Parameter | |
---|---|
Name | Description |
name | String The name of the occurrence in the form of
|
Returns | |
---|---|
Type | Description |
Note |
getOccurrenceNoteCallable()
public final UnaryCallable<GetOccurrenceNoteRequest,Note> getOccurrenceNoteCallable()
Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
GetOccurrenceNoteRequest request = GetOccurrenceNoteRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Note> future = grafeasV1Beta1Client.getOccurrenceNoteCallable().futureCall(request);
// Do something
Note response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetOccurrenceNoteRequest,Note> |
getSettings()
public final GrafeasV1Beta1Settings getSettings()
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Settings |
getStub()
public GrafeasV1Beta1Stub getStub()
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Stub |
getVulnerabilityOccurrencesSummary(ProjectName parent, String filter)
public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(ProjectName parent, String filter)
Gets a summary of the number and severity of occurrences.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String filter = "";
VulnerabilityOccurrencesSummary response = grafeasV1Beta1Client.getVulnerabilityOccurrencesSummary(parent, filter);
}
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project to get a vulnerability summary for in the form of
|
filter | String The filter expression. |
Returns | |
---|---|
Type | Description |
VulnerabilityOccurrencesSummary |
getVulnerabilityOccurrencesSummary(GetVulnerabilityOccurrencesSummaryRequest request)
public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(GetVulnerabilityOccurrencesSummaryRequest request)
Gets a summary of the number and severity of occurrences.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
GetVulnerabilityOccurrencesSummaryRequest request = GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
.setParent(parent.toString())
.build();
VulnerabilityOccurrencesSummary response = grafeasV1Beta1Client.getVulnerabilityOccurrencesSummary(request);
}
Parameter | |
---|---|
Name | Description |
request | GetVulnerabilityOccurrencesSummaryRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
VulnerabilityOccurrencesSummary |
getVulnerabilityOccurrencesSummary(String parent, String filter)
public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(String parent, String filter)
Gets a summary of the number and severity of occurrences.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String filter = "";
VulnerabilityOccurrencesSummary response = grafeasV1Beta1Client.getVulnerabilityOccurrencesSummary(parent.toString(), filter);
}
Parameters | |
---|---|
Name | Description |
parent | String The name of the project to get a vulnerability summary for in the form of
|
filter | String The filter expression. |
Returns | |
---|---|
Type | Description |
VulnerabilityOccurrencesSummary |
getVulnerabilityOccurrencesSummaryCallable()
public final UnaryCallable<GetVulnerabilityOccurrencesSummaryRequest,VulnerabilityOccurrencesSummary> getVulnerabilityOccurrencesSummaryCallable()
Gets a summary of the number and severity of occurrences.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
GetVulnerabilityOccurrencesSummaryRequest request = GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
.setParent(parent.toString())
.build();
ApiFuture<VulnerabilityOccurrencesSummary> future = grafeasV1Beta1Client.getVulnerabilityOccurrencesSummaryCallable().futureCall(request);
// Do something
VulnerabilityOccurrencesSummary response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetVulnerabilityOccurrencesSummaryRequest,VulnerabilityOccurrencesSummary> |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listNoteOccurrences(NoteName name, String filter)
public final GrafeasV1Beta1Client.ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter)
Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
String filter = "";
for (Occurrence element : grafeasV1Beta1Client.listNoteOccurrences(name, filter).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
name | NoteName The name of the note to list occurrences for in the form of
|
filter | String The filter expression. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListNoteOccurrencesPagedResponse |
listNoteOccurrences(ListNoteOccurrencesRequest request)
public final GrafeasV1Beta1Client.ListNoteOccurrencesPagedResponse listNoteOccurrences(ListNoteOccurrencesRequest request)
Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
ListNoteOccurrencesRequest request = ListNoteOccurrencesRequest.newBuilder()
.setName(name.toString())
.build();
for (Occurrence element : grafeasV1Beta1Client.listNoteOccurrences(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request | ListNoteOccurrencesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListNoteOccurrencesPagedResponse |
listNoteOccurrences(String name, String filter)
public final GrafeasV1Beta1Client.ListNoteOccurrencesPagedResponse listNoteOccurrences(String name, String filter)
Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
String filter = "";
for (Occurrence element : grafeasV1Beta1Client.listNoteOccurrences(name.toString(), filter).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
name | String The name of the note to list occurrences for in the form of
|
filter | String The filter expression. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListNoteOccurrencesPagedResponse |
listNoteOccurrencesCallable()
public final UnaryCallable<ListNoteOccurrencesRequest,ListNoteOccurrencesResponse> listNoteOccurrencesCallable()
Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
ListNoteOccurrencesRequest request = ListNoteOccurrencesRequest.newBuilder()
.setName(name.toString())
.build();
while (true) {
ListNoteOccurrencesResponse response = grafeasV1Beta1Client.listNoteOccurrencesCallable().call(request);
for (Occurrence element : response.getOccurrencesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListNoteOccurrencesRequest,ListNoteOccurrencesResponse> |
listNoteOccurrencesPagedCallable()
public final UnaryCallable<ListNoteOccurrencesRequest,GrafeasV1Beta1Client.ListNoteOccurrencesPagedResponse> listNoteOccurrencesPagedCallable()
Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
ListNoteOccurrencesRequest request = ListNoteOccurrencesRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<ListNoteOccurrencesPagedResponse> future = grafeasV1Beta1Client.listNoteOccurrencesPagedCallable().futureCall(request);
// Do something
for (Occurrence element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListNoteOccurrencesRequest,ListNoteOccurrencesPagedResponse> |
listNotes(ProjectName parent, String filter)
public final GrafeasV1Beta1Client.ListNotesPagedResponse listNotes(ProjectName parent, String filter)
Lists notes for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String filter = "";
for (Note element : grafeasV1Beta1Client.listNotes(parent, filter).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project to list notes for in the form of |
filter | String The filter expression. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListNotesPagedResponse |
listNotes(ListNotesRequest request)
public final GrafeasV1Beta1Client.ListNotesPagedResponse listNotes(ListNotesRequest request)
Lists notes for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListNotesRequest request = ListNotesRequest.newBuilder()
.setParent(parent.toString())
.build();
for (Note element : grafeasV1Beta1Client.listNotes(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request | ListNotesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListNotesPagedResponse |
listNotes(String parent, String filter)
public final GrafeasV1Beta1Client.ListNotesPagedResponse listNotes(String parent, String filter)
Lists notes for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String filter = "";
for (Note element : grafeasV1Beta1Client.listNotes(parent.toString(), filter).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
parent | String The name of the project to list notes for in the form of |
filter | String The filter expression. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListNotesPagedResponse |
listNotesCallable()
public final UnaryCallable<ListNotesRequest,ListNotesResponse> listNotesCallable()
Lists notes for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListNotesRequest request = ListNotesRequest.newBuilder()
.setParent(parent.toString())
.build();
while (true) {
ListNotesResponse response = grafeasV1Beta1Client.listNotesCallable().call(request);
for (Note element : response.getNotesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListNotesRequest,ListNotesResponse> |
listNotesPagedCallable()
public final UnaryCallable<ListNotesRequest,GrafeasV1Beta1Client.ListNotesPagedResponse> listNotesPagedCallable()
Lists notes for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListNotesRequest request = ListNotesRequest.newBuilder()
.setParent(parent.toString())
.build();
ApiFuture<ListNotesPagedResponse> future = grafeasV1Beta1Client.listNotesPagedCallable().futureCall(request);
// Do something
for (Note element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListNotesRequest,ListNotesPagedResponse> |
listOccurrences(ProjectName parent, String filter)
public final GrafeasV1Beta1Client.ListOccurrencesPagedResponse listOccurrences(ProjectName parent, String filter)
Lists occurrences for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String filter = "";
for (Occurrence element : grafeasV1Beta1Client.listOccurrences(parent, filter).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project to list occurrences for in the form of
|
filter | String The filter expression. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListOccurrencesPagedResponse |
listOccurrences(ListOccurrencesRequest request)
public final GrafeasV1Beta1Client.ListOccurrencesPagedResponse listOccurrences(ListOccurrencesRequest request)
Lists occurrences for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListOccurrencesRequest request = ListOccurrencesRequest.newBuilder()
.setParent(parent.toString())
.build();
for (Occurrence element : grafeasV1Beta1Client.listOccurrences(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request | ListOccurrencesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListOccurrencesPagedResponse |
listOccurrences(String parent, String filter)
public final GrafeasV1Beta1Client.ListOccurrencesPagedResponse listOccurrences(String parent, String filter)
Lists occurrences for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String filter = "";
for (Occurrence element : grafeasV1Beta1Client.listOccurrences(parent.toString(), filter).iterateAll()) {
// doThingsWith(element);
}
}
Parameters | |
---|---|
Name | Description |
parent | String The name of the project to list occurrences for in the form of
|
filter | String The filter expression. |
Returns | |
---|---|
Type | Description |
GrafeasV1Beta1Client.ListOccurrencesPagedResponse |
listOccurrencesCallable()
public final UnaryCallable<ListOccurrencesRequest,ListOccurrencesResponse> listOccurrencesCallable()
Lists occurrences for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListOccurrencesRequest request = ListOccurrencesRequest.newBuilder()
.setParent(parent.toString())
.build();
while (true) {
ListOccurrencesResponse response = grafeasV1Beta1Client.listOccurrencesCallable().call(request);
for (Occurrence element : response.getOccurrencesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListOccurrencesRequest,ListOccurrencesResponse> |
listOccurrencesPagedCallable()
public final UnaryCallable<ListOccurrencesRequest,GrafeasV1Beta1Client.ListOccurrencesPagedResponse> listOccurrencesPagedCallable()
Lists occurrences for the specified project.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListOccurrencesRequest request = ListOccurrencesRequest.newBuilder()
.setParent(parent.toString())
.build();
ApiFuture<ListOccurrencesPagedResponse> future = grafeasV1Beta1Client.listOccurrencesPagedCallable().futureCall(request);
// Do something
for (Occurrence element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListOccurrencesRequest,ListOccurrencesPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateNote(NoteName name, Note note, FieldMask updateMask)
public final Note updateNote(NoteName name, Note note, FieldMask updateMask)
Updates the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
Note note = Note.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Note response = grafeasV1Beta1Client.updateNote(name, note, updateMask);
}
Parameters | |
---|---|
Name | Description |
name | NoteName The name of the note in the form of |
note | Note The updated note. |
updateMask | FieldMask The fields to update. |
Returns | |
---|---|
Type | Description |
Note |
updateNote(UpdateNoteRequest request)
public final Note updateNote(UpdateNoteRequest request)
Updates the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
Note note = Note.newBuilder().build();
UpdateNoteRequest request = UpdateNoteRequest.newBuilder()
.setName(name.toString())
.setNote(note)
.build();
Note response = grafeasV1Beta1Client.updateNote(request);
}
Parameter | |
---|---|
Name | Description |
request | UpdateNoteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Note |
updateNote(String name, Note note, FieldMask updateMask)
public final Note updateNote(String name, Note note, FieldMask updateMask)
Updates the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
Note note = Note.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Note response = grafeasV1Beta1Client.updateNote(name.toString(), note, updateMask);
}
Parameters | |
---|---|
Name | Description |
name | String The name of the note in the form of |
note | Note The updated note. |
updateMask | FieldMask The fields to update. |
Returns | |
---|---|
Type | Description |
Note |
updateNoteCallable()
public final UnaryCallable<UpdateNoteRequest,Note> updateNoteCallable()
Updates the specified note.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]", "[NOTE]");
Note note = Note.newBuilder().build();
UpdateNoteRequest request = UpdateNoteRequest.newBuilder()
.setName(name.toString())
.setNote(note)
.build();
ApiFuture<Note> future = grafeasV1Beta1Client.updateNoteCallable().futureCall(request);
// Do something
Note response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateNoteRequest,Note> |
updateOccurrence(OccurrenceName name, Occurrence occurrence, FieldMask updateMask)
public final Occurrence updateOccurrence(OccurrenceName name, Occurrence occurrence, FieldMask updateMask)
Updates the specified occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Occurrence occurrence = Occurrence.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Occurrence response = grafeasV1Beta1Client.updateOccurrence(name, occurrence, updateMask);
}
Parameters | |
---|---|
Name | Description |
name | OccurrenceName The name of the occurrence in the form of
|
occurrence | Occurrence The updated occurrence. |
updateMask | FieldMask The fields to update. |
Returns | |
---|---|
Type | Description |
Occurrence |
updateOccurrence(UpdateOccurrenceRequest request)
public final Occurrence updateOccurrence(UpdateOccurrenceRequest request)
Updates the specified occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Occurrence occurrence = Occurrence.newBuilder().build();
UpdateOccurrenceRequest request = UpdateOccurrenceRequest.newBuilder()
.setName(name.toString())
.setOccurrence(occurrence)
.build();
Occurrence response = grafeasV1Beta1Client.updateOccurrence(request);
}
Parameter | |
---|---|
Name | Description |
request | UpdateOccurrenceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Occurrence |
updateOccurrence(String name, Occurrence occurrence, FieldMask updateMask)
public final Occurrence updateOccurrence(String name, Occurrence occurrence, FieldMask updateMask)
Updates the specified occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Occurrence occurrence = Occurrence.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Occurrence response = grafeasV1Beta1Client.updateOccurrence(name.toString(), occurrence, updateMask);
}
Parameters | |
---|---|
Name | Description |
name | String The name of the occurrence in the form of
|
occurrence | Occurrence The updated occurrence. |
updateMask | FieldMask The fields to update. |
Returns | |
---|---|
Type | Description |
Occurrence |
updateOccurrenceCallable()
public final UnaryCallable<UpdateOccurrenceRequest,Occurrence> updateOccurrenceCallable()
Updates the specified occurrence.
Sample code:
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
OccurrenceName name = OccurrenceName.of("[PROJECT]", "[OCCURRENCE]");
Occurrence occurrence = Occurrence.newBuilder().build();
UpdateOccurrenceRequest request = UpdateOccurrenceRequest.newBuilder()
.setName(name.toString())
.setOccurrence(occurrence)
.build();
ApiFuture<Occurrence> future = grafeasV1Beta1Client.updateOccurrenceCallable().futureCall(request);
// Do something
Occurrence response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateOccurrenceRequest,Occurrence> |