public abstract class GrafeasClient
Reference documentation and code samples for the Grafeas v1 API class GrafeasClient.
Grafeas client wrapper, for convenient use.
Derived Types
Namespace
Grafeas.V1Assembly
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.
Properties
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default Grafeas scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default Grafeas scopes are:
GrpcClient
public virtual Grafeas.GrafeasClient GrpcClient { get; }
The underlying gRPC Grafeas client
Property Value | |
---|---|
Type | Description |
GrafeasGrafeasClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
BatchCreateNotes(BatchCreateNotesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
BatchCreateNotesRequest request = new BatchCreateNotesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Notes = { { "", new Note() }, },
};
// Make the request
BatchCreateNotesResponse response = grafeasClient.BatchCreateNotes(request);
BatchCreateNotes(ProjectName, IDictionary<string, Note>, CallSettings)
public virtual BatchCreateNotesResponse BatchCreateNotes(ProjectName parent, IDictionary<string, Note> notes, CallSettings callSettings = null)
Creates new notes in batch.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
notes | IDictionarystringNote The notes to create. Max allowed length is 1000. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchCreateNotesResponse | The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
IDictionary<string, Note> notes = new Dictionary<string, Note> { { "", new Note() }, };
// Make the request
BatchCreateNotesResponse response = grafeasClient.BatchCreateNotes(parent, notes);
BatchCreateNotes(string, IDictionary<string, Note>, CallSettings)
public virtual BatchCreateNotesResponse BatchCreateNotes(string parent, IDictionary<string, Note> notes, CallSettings callSettings = null)
Creates new notes in batch.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
notes | IDictionarystringNote The notes to create. Max allowed length is 1000. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchCreateNotesResponse | The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
IDictionary<string, Note> notes = new Dictionary<string, Note> { { "", new Note() }, };
// Make the request
BatchCreateNotesResponse response = grafeasClient.BatchCreateNotes(parent, notes);
BatchCreateNotesAsync(BatchCreateNotesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
BatchCreateNotesRequest request = new BatchCreateNotesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Notes = { { "", new Note() }, },
};
// Make the request
BatchCreateNotesResponse response = await grafeasClient.BatchCreateNotesAsync(request);
BatchCreateNotesAsync(BatchCreateNotesRequest, CancellationToken)
public virtual Task<BatchCreateNotesResponse> BatchCreateNotesAsync(BatchCreateNotesRequest request, CancellationToken cancellationToken)
Creates new notes in batch.
Parameters | |
---|---|
Name | Description |
request | BatchCreateNotesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateNotesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
BatchCreateNotesRequest request = new BatchCreateNotesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Notes = { { "", new Note() }, },
};
// Make the request
BatchCreateNotesResponse response = await grafeasClient.BatchCreateNotesAsync(request);
BatchCreateNotesAsync(ProjectName, IDictionary<string, Note>, CallSettings)
public virtual Task<BatchCreateNotesResponse> BatchCreateNotesAsync(ProjectName parent, IDictionary<string, Note> notes, CallSettings callSettings = null)
Creates new notes in batch.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
notes | IDictionarystringNote The notes to create. Max allowed length is 1000. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateNotesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
IDictionary<string, Note> notes = new Dictionary<string, Note> { { "", new Note() }, };
// Make the request
BatchCreateNotesResponse response = await grafeasClient.BatchCreateNotesAsync(parent, notes);
BatchCreateNotesAsync(ProjectName, IDictionary<string, Note>, CancellationToken)
public virtual Task<BatchCreateNotesResponse> BatchCreateNotesAsync(ProjectName parent, IDictionary<string, Note> notes, CancellationToken cancellationToken)
Creates new notes in batch.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
notes | IDictionarystringNote The notes to create. Max allowed length is 1000. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateNotesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
IDictionary<string, Note> notes = new Dictionary<string, Note> { { "", new Note() }, };
// Make the request
BatchCreateNotesResponse response = await grafeasClient.BatchCreateNotesAsync(parent, notes);
BatchCreateNotesAsync(string, IDictionary<string, Note>, CallSettings)
public virtual Task<BatchCreateNotesResponse> BatchCreateNotesAsync(string parent, IDictionary<string, Note> notes, CallSettings callSettings = null)
Creates new notes in batch.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
notes | IDictionarystringNote The notes to create. Max allowed length is 1000. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateNotesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
IDictionary<string, Note> notes = new Dictionary<string, Note> { { "", new Note() }, };
// Make the request
BatchCreateNotesResponse response = await grafeasClient.BatchCreateNotesAsync(parent, notes);
BatchCreateNotesAsync(string, IDictionary<string, Note>, CancellationToken)
public virtual Task<BatchCreateNotesResponse> BatchCreateNotesAsync(string parent, IDictionary<string, Note> notes, CancellationToken cancellationToken)
Creates new notes in batch.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
notes | IDictionarystringNote The notes to create. Max allowed length is 1000. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateNotesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
IDictionary<string, Note> notes = new Dictionary<string, Note> { { "", new Note() }, };
// Make the request
BatchCreateNotesResponse response = await grafeasClient.BatchCreateNotesAsync(parent, notes);
BatchCreateOccurrences(BatchCreateOccurrencesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
BatchCreateOccurrencesRequest request = new BatchCreateOccurrencesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Occurrences = { new Occurrence(), },
};
// Make the request
BatchCreateOccurrencesResponse response = grafeasClient.BatchCreateOccurrences(request);
BatchCreateOccurrences(ProjectName, IEnumerable<Occurrence>, CallSettings)
public virtual BatchCreateOccurrencesResponse BatchCreateOccurrences(ProjectName parent, IEnumerable<Occurrence> occurrences, CallSettings callSettings = null)
Creates new occurrences in batch.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
occurrences | IEnumerableOccurrence The occurrences to create. Max allowed length is 1000. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchCreateOccurrencesResponse | The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
IEnumerable<Occurrence> occurrences = new Occurrence[] { new Occurrence(), };
// Make the request
BatchCreateOccurrencesResponse response = grafeasClient.BatchCreateOccurrences(parent, occurrences);
BatchCreateOccurrences(string, IEnumerable<Occurrence>, CallSettings)
public virtual BatchCreateOccurrencesResponse BatchCreateOccurrences(string parent, IEnumerable<Occurrence> occurrences, CallSettings callSettings = null)
Creates new occurrences in batch.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
occurrences | IEnumerableOccurrence The occurrences to create. Max allowed length is 1000. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchCreateOccurrencesResponse | The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
IEnumerable<Occurrence> occurrences = new Occurrence[] { new Occurrence(), };
// Make the request
BatchCreateOccurrencesResponse response = grafeasClient.BatchCreateOccurrences(parent, occurrences);
BatchCreateOccurrencesAsync(BatchCreateOccurrencesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
BatchCreateOccurrencesRequest request = new BatchCreateOccurrencesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Occurrences = { new Occurrence(), },
};
// Make the request
BatchCreateOccurrencesResponse response = await grafeasClient.BatchCreateOccurrencesAsync(request);
BatchCreateOccurrencesAsync(BatchCreateOccurrencesRequest, CancellationToken)
public virtual Task<BatchCreateOccurrencesResponse> BatchCreateOccurrencesAsync(BatchCreateOccurrencesRequest request, CancellationToken cancellationToken)
Creates new occurrences in batch.
Parameters | |
---|---|
Name | Description |
request | BatchCreateOccurrencesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateOccurrencesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
BatchCreateOccurrencesRequest request = new BatchCreateOccurrencesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Occurrences = { new Occurrence(), },
};
// Make the request
BatchCreateOccurrencesResponse response = await grafeasClient.BatchCreateOccurrencesAsync(request);
BatchCreateOccurrencesAsync(ProjectName, IEnumerable<Occurrence>, CallSettings)
public virtual Task<BatchCreateOccurrencesResponse> BatchCreateOccurrencesAsync(ProjectName parent, IEnumerable<Occurrence> occurrences, CallSettings callSettings = null)
Creates new occurrences in batch.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
occurrences | IEnumerableOccurrence The occurrences to create. Max allowed length is 1000. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateOccurrencesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
IEnumerable<Occurrence> occurrences = new Occurrence[] { new Occurrence(), };
// Make the request
BatchCreateOccurrencesResponse response = await grafeasClient.BatchCreateOccurrencesAsync(parent, occurrences);
BatchCreateOccurrencesAsync(ProjectName, IEnumerable<Occurrence>, CancellationToken)
public virtual Task<BatchCreateOccurrencesResponse> BatchCreateOccurrencesAsync(ProjectName parent, IEnumerable<Occurrence> occurrences, CancellationToken cancellationToken)
Creates new occurrences in batch.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
occurrences | IEnumerableOccurrence The occurrences to create. Max allowed length is 1000. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateOccurrencesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
IEnumerable<Occurrence> occurrences = new Occurrence[] { new Occurrence(), };
// Make the request
BatchCreateOccurrencesResponse response = await grafeasClient.BatchCreateOccurrencesAsync(parent, occurrences);
BatchCreateOccurrencesAsync(string, IEnumerable<Occurrence>, CallSettings)
public virtual Task<BatchCreateOccurrencesResponse> BatchCreateOccurrencesAsync(string parent, IEnumerable<Occurrence> occurrences, CallSettings callSettings = null)
Creates new occurrences in batch.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
occurrences | IEnumerableOccurrence The occurrences to create. Max allowed length is 1000. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateOccurrencesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
IEnumerable<Occurrence> occurrences = new Occurrence[] { new Occurrence(), };
// Make the request
BatchCreateOccurrencesResponse response = await grafeasClient.BatchCreateOccurrencesAsync(parent, occurrences);
BatchCreateOccurrencesAsync(string, IEnumerable<Occurrence>, CancellationToken)
public virtual Task<BatchCreateOccurrencesResponse> BatchCreateOccurrencesAsync(string parent, IEnumerable<Occurrence> occurrences, CancellationToken cancellationToken)
Creates new occurrences in batch.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
occurrences | IEnumerableOccurrence The occurrences to create. Max allowed length is 1000. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchCreateOccurrencesResponse | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
IEnumerable<Occurrence> occurrences = new Occurrence[] { new Occurrence(), };
// Make the request
BatchCreateOccurrencesResponse response = await grafeasClient.BatchCreateOccurrencesAsync(parent, occurrences);
Create()
public static GrafeasClient Create()
Synchronously creates a GrafeasClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GrafeasClientBuilder.
Returns | |
---|---|
Type | Description |
GrafeasClient | The created GrafeasClient. |
CreateAsync(CancellationToken)
public static Task<GrafeasClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a GrafeasClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GrafeasClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskGrafeasClient | The task representing the created GrafeasClient. |
CreateNote(CreateNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
CreateNoteRequest request = new CreateNoteRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
NoteId = "",
Note = new Note(),
};
// Make the request
Note response = grafeasClient.CreateNote(request);
CreateNote(ProjectName, string, Note, CallSettings)
public virtual Note CreateNote(ProjectName parent, string noteId, Note note, CallSettings callSettings = null)
Creates a new 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. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Note | The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string noteId = "";
Note note = new Note();
// Make the request
Note response = grafeasClient.CreateNote(parent, noteId, note);
CreateNote(string, string, Note, CallSettings)
public virtual Note CreateNote(string parent, string noteId, Note note, CallSettings callSettings = null)
Creates a new 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. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Note | The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string noteId = "";
Note note = new Note();
// Make the request
Note response = grafeasClient.CreateNote(parent, noteId, note);
CreateNoteAsync(CreateNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
CreateNoteRequest request = new CreateNoteRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
NoteId = "",
Note = new Note(),
};
// Make the request
Note response = await grafeasClient.CreateNoteAsync(request);
CreateNoteAsync(CreateNoteRequest, CancellationToken)
public virtual Task<Note> CreateNoteAsync(CreateNoteRequest request, CancellationToken cancellationToken)
Creates a new note.
Parameters | |
---|---|
Name | Description |
request | CreateNoteRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskNote | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
CreateNoteRequest request = new CreateNoteRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
NoteId = "",
Note = new Note(),
};
// Make the request
Note response = await grafeasClient.CreateNoteAsync(request);
CreateNoteAsync(ProjectName, string, Note, CallSettings)
public virtual Task<Note> CreateNoteAsync(ProjectName parent, string noteId, Note note, CallSettings callSettings = null)
Creates a new 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. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskNote | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string noteId = "";
Note note = new Note();
// Make the request
Note response = await grafeasClient.CreateNoteAsync(parent, noteId, note);
CreateNoteAsync(ProjectName, string, Note, CancellationToken)
public virtual Task<Note> CreateNoteAsync(ProjectName parent, string noteId, Note note, CancellationToken cancellationToken)
Creates a new 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. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskNote | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string noteId = "";
Note note = new Note();
// Make the request
Note response = await grafeasClient.CreateNoteAsync(parent, noteId, note);
CreateNoteAsync(string, string, Note, CallSettings)
public virtual Task<Note> CreateNoteAsync(string parent, string noteId, Note note, CallSettings callSettings = null)
Creates a new 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. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskNote | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string noteId = "";
Note note = new Note();
// Make the request
Note response = await grafeasClient.CreateNoteAsync(parent, noteId, note);
CreateNoteAsync(string, string, Note, CancellationToken)
public virtual Task<Note> CreateNoteAsync(string parent, string noteId, Note note, CancellationToken cancellationToken)
Creates a new 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. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskNote | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string noteId = "";
Note note = new Note();
// Make the request
Note response = await grafeasClient.CreateNoteAsync(parent, noteId, note);
CreateOccurrence(CreateOccurrenceRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
CreateOccurrenceRequest request = new CreateOccurrenceRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Occurrence = new Occurrence(),
};
// Make the request
Occurrence response = grafeasClient.CreateOccurrence(request);
CreateOccurrence(ProjectName, Occurrence, CallSettings)
public virtual Occurrence CreateOccurrence(ProjectName parent, Occurrence occurrence, CallSettings callSettings = null)
Creates a new occurrence.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
occurrence | Occurrence The occurrence to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Occurrence | The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Occurrence occurrence = new Occurrence();
// Make the request
Occurrence response = grafeasClient.CreateOccurrence(parent, occurrence);
CreateOccurrence(string, Occurrence, CallSettings)
public virtual Occurrence CreateOccurrence(string parent, Occurrence occurrence, CallSettings callSettings = null)
Creates a new occurrence.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
occurrence | Occurrence The occurrence to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Occurrence | The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Occurrence occurrence = new Occurrence();
// Make the request
Occurrence response = grafeasClient.CreateOccurrence(parent, occurrence);
CreateOccurrenceAsync(CreateOccurrenceRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
CreateOccurrenceRequest request = new CreateOccurrenceRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Occurrence = new Occurrence(),
};
// Make the request
Occurrence response = await grafeasClient.CreateOccurrenceAsync(request);
CreateOccurrenceAsync(CreateOccurrenceRequest, CancellationToken)
public virtual Task<Occurrence> CreateOccurrenceAsync(CreateOccurrenceRequest request, CancellationToken cancellationToken)
Creates a new occurrence.
Parameters | |
---|---|
Name | Description |
request | CreateOccurrenceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOccurrence | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
CreateOccurrenceRequest request = new CreateOccurrenceRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Occurrence = new Occurrence(),
};
// Make the request
Occurrence response = await grafeasClient.CreateOccurrenceAsync(request);
CreateOccurrenceAsync(ProjectName, Occurrence, CallSettings)
public virtual Task<Occurrence> CreateOccurrenceAsync(ProjectName parent, Occurrence occurrence, CallSettings callSettings = null)
Creates a new occurrence.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
occurrence | Occurrence The occurrence to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOccurrence | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Occurrence occurrence = new Occurrence();
// Make the request
Occurrence response = await grafeasClient.CreateOccurrenceAsync(parent, occurrence);
CreateOccurrenceAsync(ProjectName, Occurrence, CancellationToken)
public virtual Task<Occurrence> CreateOccurrenceAsync(ProjectName parent, Occurrence occurrence, CancellationToken cancellationToken)
Creates a new occurrence.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project in the form of |
occurrence | Occurrence The occurrence to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOccurrence | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Occurrence occurrence = new Occurrence();
// Make the request
Occurrence response = await grafeasClient.CreateOccurrenceAsync(parent, occurrence);
CreateOccurrenceAsync(string, Occurrence, CallSettings)
public virtual Task<Occurrence> CreateOccurrenceAsync(string parent, Occurrence occurrence, CallSettings callSettings = null)
Creates a new occurrence.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
occurrence | Occurrence The occurrence to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOccurrence | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Occurrence occurrence = new Occurrence();
// Make the request
Occurrence response = await grafeasClient.CreateOccurrenceAsync(parent, occurrence);
CreateOccurrenceAsync(string, Occurrence, CancellationToken)
public virtual Task<Occurrence> CreateOccurrenceAsync(string parent, Occurrence occurrence, CancellationToken cancellationToken)
Creates a new occurrence.
Parameters | |
---|---|
Name | Description |
parent | string The name of the project in the form of |
occurrence | Occurrence The occurrence to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOccurrence | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Occurrence occurrence = new Occurrence();
// Make the request
Occurrence response = await grafeasClient.CreateOccurrenceAsync(parent, occurrence);
DeleteNote(DeleteNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
DeleteNoteRequest request = new DeleteNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
};
// Make the request
grafeasClient.DeleteNote(request);
DeleteNote(NoteName, CallSettings)
public virtual void DeleteNote(NoteName name, CallSettings callSettings = null)
Deletes the specified note.
Parameters | |
---|---|
Name | Description |
name | NoteName The name of the note in the form of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
NoteName name = NoteName.FromProjectNote("[PROJECT]", "[NOTE]");
// Make the request
grafeasClient.DeleteNote(name);
DeleteNote(string, CallSettings)
public virtual void DeleteNote(string name, CallSettings callSettings = null)
Deletes the specified note.
Parameters | |
---|---|
Name | Description |
name | string The name of the note in the form of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notes/[NOTE]";
// Make the request
grafeasClient.DeleteNote(name);
DeleteNoteAsync(DeleteNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
DeleteNoteRequest request = new DeleteNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
};
// Make the request
await grafeasClient.DeleteNoteAsync(request);
DeleteNoteAsync(DeleteNoteRequest, CancellationToken)
public virtual Task DeleteNoteAsync(DeleteNoteRequest request, CancellationToken cancellationToken)
Deletes the specified note.
Parameters | |
---|---|
Name | Description |
request | DeleteNoteRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
DeleteNoteRequest request = new DeleteNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
};
// Make the request
await grafeasClient.DeleteNoteAsync(request);
DeleteNoteAsync(NoteName, CallSettings)
public virtual Task DeleteNoteAsync(NoteName name, CallSettings callSettings = null)
Deletes the specified note.
Parameters | |
---|---|
Name | Description |
name | NoteName The name of the note in the form of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
NoteName name = NoteName.FromProjectNote("[PROJECT]", "[NOTE]");
// Make the request
await grafeasClient.DeleteNoteAsync(name);
DeleteNoteAsync(NoteName, CancellationToken)
public virtual Task DeleteNoteAsync(NoteName name, CancellationToken cancellationToken)
Deletes the specified note.
Parameters | |
---|---|
Name | Description |
name | NoteName The name of the note in the form of
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
NoteName name = NoteName.FromProjectNote("[PROJECT]", "[NOTE]");
// Make the request
await grafeasClient.DeleteNoteAsync(name);
DeleteNoteAsync(string, CallSettings)
public virtual Task DeleteNoteAsync(string name, CallSettings callSettings = null)
Deletes the specified note.
Parameters | |
---|---|
Name | Description |
name | string The name of the note in the form of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notes/[NOTE]";
// Make the request
await grafeasClient.DeleteNoteAsync(name);
DeleteNoteAsync(string, CancellationToken)
public virtual Task DeleteNoteAsync(string name, CancellationToken cancellationToken)
Deletes the specified note.
Parameters | |
---|---|
Name | Description |
name | string The name of the note in the form of
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notes/[NOTE]";
// Make the request
await grafeasClient.DeleteNoteAsync(name);
DeleteOccurrence(DeleteOccurrenceRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
DeleteOccurrenceRequest request = new DeleteOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
grafeasClient.DeleteOccurrence(request);
DeleteOccurrence(OccurrenceName, CallSettings)
public virtual void DeleteOccurrence(OccurrenceName name, 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 |
name | OccurrenceName The name of the occurrence in the form of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
grafeasClient.DeleteOccurrence(name);
DeleteOccurrence(string, CallSettings)
public virtual void DeleteOccurrence(string name, 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 |
name | string The name of the occurrence in the form of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
// Make the request
grafeasClient.DeleteOccurrence(name);
DeleteOccurrenceAsync(DeleteOccurrenceRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
DeleteOccurrenceRequest request = new DeleteOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
await grafeasClient.DeleteOccurrenceAsync(request);
DeleteOccurrenceAsync(DeleteOccurrenceRequest, CancellationToken)
public virtual Task DeleteOccurrenceAsync(DeleteOccurrenceRequest request, CancellationToken cancellationToken)
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. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
DeleteOccurrenceRequest request = new DeleteOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
await grafeasClient.DeleteOccurrenceAsync(request);
DeleteOccurrenceAsync(OccurrenceName, CallSettings)
public virtual Task DeleteOccurrenceAsync(OccurrenceName name, 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.