Grafeas v1 API - Class GrafeasClientImpl (3.7.0)

public sealed class GrafeasClientImpl : GrafeasClient

Reference documentation and code samples for the Grafeas v1 API class GrafeasClientImpl.

Grafeas client wrapper implementation, for convenient use.

Inheritance

object > GrafeasClient > GrafeasClientImpl

Namespace

Grafeas.V1

Assembly

Grafeas.V1.dll

Remarks

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.

Constructors

GrafeasClientImpl(GrafeasClient, GrafeasSettings, ILogger)

public GrafeasClientImpl(Grafeas.GrafeasClient grpcClient, GrafeasSettings settings, ILogger logger)

Constructs a client wrapper for the Grafeas service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient GrafeasGrafeasClient

The underlying gRPC client.

settings GrafeasSettings

The base GrafeasSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override Grafeas.GrafeasClient GrpcClient { get; }

The underlying gRPC Grafeas client

Property Value
Type Description
GrafeasGrafeasClient
Overrides

Methods

BatchCreateNotes(BatchCreateNotesRequest, CallSettings)

public override BatchCreateNotesResponse BatchCreateNotes(BatchCreateNotesRequest request, CallSettings callSettings = null)

Creates new notes in batch.

Parameters
Name Description
request BatchCreateNotesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchCreateNotesResponse

The RPC response.

Overrides

BatchCreateNotesAsync(BatchCreateNotesRequest, CallSettings)

public override Task<BatchCreateNotesResponse> BatchCreateNotesAsync(BatchCreateNotesRequest request, CallSettings callSettings = null)

Creates new notes in batch.

Parameters
Name Description
request BatchCreateNotesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBatchCreateNotesResponse

A Task containing the RPC response.

Overrides

BatchCreateOccurrences(BatchCreateOccurrencesRequest, CallSettings)

public override BatchCreateOccurrencesResponse BatchCreateOccurrences(BatchCreateOccurrencesRequest request, CallSettings callSettings = null)

Creates new occurrences in batch.

Parameters
Name Description
request BatchCreateOccurrencesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchCreateOccurrencesResponse

The RPC response.

Overrides

BatchCreateOccurrencesAsync(BatchCreateOccurrencesRequest, CallSettings)

public override Task<BatchCreateOccurrencesResponse> BatchCreateOccurrencesAsync(BatchCreateOccurrencesRequest request, CallSettings callSettings = null)

Creates new occurrences in batch.

Parameters
Name Description
request BatchCreateOccurrencesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBatchCreateOccurrencesResponse

A Task containing the RPC response.

Overrides

CreateNote(CreateNoteRequest, CallSettings)

public override Note CreateNote(CreateNoteRequest request, CallSettings callSettings = null)

Creates a new note.

Parameters
Name Description
request CreateNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Note

The RPC response.

Overrides

CreateNoteAsync(CreateNoteRequest, CallSettings)

public override Task<Note> CreateNoteAsync(CreateNoteRequest request, CallSettings callSettings = null)

Creates a new note.

Parameters
Name Description
request CreateNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNote

A Task containing the RPC response.

Overrides

CreateOccurrence(CreateOccurrenceRequest, CallSettings)

public override Occurrence CreateOccurrence(CreateOccurrenceRequest request, CallSettings callSettings = null)

Creates a new occurrence.

Parameters
Name Description
request CreateOccurrenceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Occurrence

The RPC response.

Overrides

CreateOccurrenceAsync(CreateOccurrenceRequest, CallSettings)

public override Task<Occurrence> CreateOccurrenceAsync(CreateOccurrenceRequest request, CallSettings callSettings = null)

Creates a new occurrence.

Parameters
Name Description
request CreateOccurrenceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOccurrence

A Task containing the RPC response.

Overrides

DeleteNote(DeleteNoteRequest, CallSettings)

public override void DeleteNote(DeleteNoteRequest request, CallSettings callSettings = null)

Deletes the specified note.

Parameters
Name Description
request DeleteNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteNoteAsync(DeleteNoteRequest, CallSettings)

public override Task DeleteNoteAsync(DeleteNoteRequest request, CallSettings callSettings = null)

Deletes the specified note.

Parameters
Name Description
request DeleteNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

DeleteOccurrence(DeleteOccurrenceRequest, CallSettings)

public override void DeleteOccurrence(DeleteOccurrenceRequest request, CallSettings callSettings = null)

Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.

Parameters
Name Description
request DeleteOccurrenceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteOccurrenceAsync(DeleteOccurrenceRequest, CallSettings)

public override Task DeleteOccurrenceAsync(DeleteOccurrenceRequest request, CallSettings callSettings = null)

Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.

Parameters
Name Description
request DeleteOccurrenceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

GetNote(GetNoteRequest, CallSettings)

public override Note GetNote(GetNoteRequest request, CallSettings callSettings = null)

Gets the specified note.

Parameters
Name Description
request GetNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Note

The RPC response.

Overrides

GetNoteAsync(GetNoteRequest, CallSettings)

public override Task<Note> GetNoteAsync(GetNoteRequest request, CallSettings callSettings = null)

Gets the specified note.

Parameters
Name Description
request GetNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNote

A Task containing the RPC response.

Overrides

GetOccurrence(GetOccurrenceRequest, CallSettings)

public override Occurrence GetOccurrence(GetOccurrenceRequest request, CallSettings callSettings = null)

Gets the specified occurrence.

Parameters
Name Description
request GetOccurrenceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Occurrence

The RPC response.

Overrides

GetOccurrenceAsync(GetOccurrenceRequest, CallSettings)

public override Task<Occurrence> GetOccurrenceAsync(GetOccurrenceRequest request, CallSettings callSettings = null)

Gets the specified occurrence.

Parameters
Name Description
request GetOccurrenceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOccurrence

A Task containing the RPC response.

Overrides

GetOccurrenceNote(GetOccurrenceNoteRequest, CallSettings)

public override Note GetOccurrenceNote(GetOccurrenceNoteRequest request, CallSettings callSettings = null)

Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.

Parameters
Name Description
request GetOccurrenceNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Note

The RPC response.

Overrides

GetOccurrenceNoteAsync(GetOccurrenceNoteRequest, CallSettings)

public override Task<Note> GetOccurrenceNoteAsync(GetOccurrenceNoteRequest request, CallSettings callSettings = null)

Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.

Parameters
Name Description
request GetOccurrenceNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNote

A Task containing the RPC response.

Overrides

ListNoteOccurrences(ListNoteOccurrencesRequest, CallSettings)

public override PagedEnumerable<ListNoteOccurrencesResponse, Occurrence> ListNoteOccurrences(ListNoteOccurrencesRequest request, CallSettings callSettings = null)

Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.

Parameters
Name Description
request ListNoteOccurrencesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNoteOccurrencesResponseOccurrence

A pageable sequence of Occurrence resources.

Overrides

ListNoteOccurrencesAsync(ListNoteOccurrencesRequest, CallSettings)

public override PagedAsyncEnumerable<ListNoteOccurrencesResponse, Occurrence> ListNoteOccurrencesAsync(ListNoteOccurrencesRequest request, CallSettings callSettings = null)

Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.

Parameters
Name Description
request ListNoteOccurrencesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNoteOccurrencesResponseOccurrence

A pageable asynchronous sequence of Occurrence resources.

Overrides

ListNotes(ListNotesRequest, CallSettings)

public override PagedEnumerable<ListNotesResponse, Note> ListNotes(ListNotesRequest request, CallSettings callSettings = null)

Lists notes for the specified project.

Parameters
Name Description
request ListNotesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListNotesResponseNote

A pageable sequence of Note resources.

Overrides

ListNotesAsync(ListNotesRequest, CallSettings)

public override PagedAsyncEnumerable<ListNotesResponse, Note> ListNotesAsync(ListNotesRequest request, CallSettings callSettings = null)

Lists notes for the specified project.

Parameters
Name Description
request ListNotesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListNotesResponseNote

A pageable asynchronous sequence of Note resources.

Overrides

ListOccurrences(ListOccurrencesRequest, CallSettings)

public override PagedEnumerable<ListOccurrencesResponse, Occurrence> ListOccurrences(ListOccurrencesRequest request, CallSettings callSettings = null)

Lists occurrences for the specified project.

Parameters
Name Description
request ListOccurrencesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListOccurrencesResponseOccurrence

A pageable sequence of Occurrence resources.

Overrides

ListOccurrencesAsync(ListOccurrencesRequest, CallSettings)

public override PagedAsyncEnumerable<ListOccurrencesResponse, Occurrence> ListOccurrencesAsync(ListOccurrencesRequest request, CallSettings callSettings = null)

Lists occurrences for the specified project.

Parameters
Name Description
request ListOccurrencesRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListOccurrencesResponseOccurrence

A pageable asynchronous sequence of Occurrence resources.

Overrides

UpdateNote(UpdateNoteRequest, CallSettings)

public override Note UpdateNote(UpdateNoteRequest request, CallSettings callSettings = null)

Updates the specified note.

Parameters
Name Description
request UpdateNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Note

The RPC response.

Overrides

UpdateNoteAsync(UpdateNoteRequest, CallSettings)

public override Task<Note> UpdateNoteAsync(UpdateNoteRequest request, CallSettings callSettings = null)

Updates the specified note.

Parameters
Name Description
request UpdateNoteRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskNote

A Task containing the RPC response.

Overrides

UpdateOccurrence(UpdateOccurrenceRequest, CallSettings)

public override Occurrence UpdateOccurrence(UpdateOccurrenceRequest request, CallSettings callSettings = null)

Updates the specified occurrence.

Parameters
Name Description
request UpdateOccurrenceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Occurrence

The RPC response.

Overrides

UpdateOccurrenceAsync(UpdateOccurrenceRequest, CallSettings)

public override Task<Occurrence> UpdateOccurrenceAsync(UpdateOccurrenceRequest request, CallSettings callSettings = null)

Updates the specified occurrence.

Parameters
Name Description
request UpdateOccurrenceRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOccurrence

A Task containing the RPC response.

Overrides