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.
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. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
await grafeasClient.DeleteOccurrenceAsync(name);
DeleteOccurrenceAsync(OccurrenceName, CancellationToken)
public virtual Task DeleteOccurrenceAsync(OccurrenceName name, 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 |
name |
OccurrenceName The name of the occurrence 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)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
await grafeasClient.DeleteOccurrenceAsync(name);
DeleteOccurrenceAsync(string, CallSettings)
public virtual Task DeleteOccurrenceAsync(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. |
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]/occurrences/[OCCURRENCE]";
// Make the request
await grafeasClient.DeleteOccurrenceAsync(name);
DeleteOccurrenceAsync(string, CancellationToken)
public virtual Task DeleteOccurrenceAsync(string name, 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 |
name |
string The name of the occurrence 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]/occurrences/[OCCURRENCE]";
// Make the request
await grafeasClient.DeleteOccurrenceAsync(name);
GetNote(GetNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
GetNoteRequest request = new GetNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
};
// Make the request
Note response = grafeasClient.GetNote(request);
GetNote(NoteName, CallSettings)
public virtual Note GetNote(NoteName name, CallSettings callSettings = null)
Gets 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 |
Note |
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
Note response = grafeasClient.GetNote(name);
GetNote(string, CallSettings)
public virtual Note GetNote(string name, CallSettings callSettings = null)
Gets 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 |
Note |
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
Note response = grafeasClient.GetNote(name);
GetNoteAsync(GetNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
GetNoteRequest request = new GetNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
};
// Make the request
Note response = await grafeasClient.GetNoteAsync(request);
GetNoteAsync(GetNoteRequest, CancellationToken)
public virtual Task<Note> GetNoteAsync(GetNoteRequest request, CancellationToken cancellationToken)
Gets the specified note.
Parameters | |
---|---|
Name | Description |
request |
GetNoteRequest 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)
GetNoteRequest request = new GetNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
};
// Make the request
Note response = await grafeasClient.GetNoteAsync(request);
GetNoteAsync(NoteName, CallSettings)
public virtual Task<Note> GetNoteAsync(NoteName name, CallSettings callSettings = null)
Gets 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 |
TaskNote |
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
Note response = await grafeasClient.GetNoteAsync(name);
GetNoteAsync(NoteName, CancellationToken)
public virtual Task<Note> GetNoteAsync(NoteName name, CancellationToken cancellationToken)
Gets 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 |
TaskNote |
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
Note response = await grafeasClient.GetNoteAsync(name);
GetNoteAsync(string, CallSettings)
public virtual Task<Note> GetNoteAsync(string name, CallSettings callSettings = null)
Gets 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 |
TaskNote |
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
Note response = await grafeasClient.GetNoteAsync(name);
GetNoteAsync(string, CancellationToken)
public virtual Task<Note> GetNoteAsync(string name, CancellationToken cancellationToken)
Gets 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 |
TaskNote |
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
Note response = await grafeasClient.GetNoteAsync(name);
GetOccurrence(GetOccurrenceRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
GetOccurrenceRequest request = new GetOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
Occurrence response = grafeasClient.GetOccurrence(request);
GetOccurrence(OccurrenceName, CallSettings)
public virtual Occurrence GetOccurrence(OccurrenceName name, CallSettings callSettings = null)
Gets the specified occurrence.
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. |
Returns | |
---|---|
Type | Description |
Occurrence |
The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
Occurrence response = grafeasClient.GetOccurrence(name);
GetOccurrence(string, CallSettings)
public virtual Occurrence GetOccurrence(string name, CallSettings callSettings = null)
Gets the specified occurrence.
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. |
Returns | |
---|---|
Type | Description |
Occurrence |
The RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
// Make the request
Occurrence response = grafeasClient.GetOccurrence(name);
GetOccurrenceAsync(GetOccurrenceRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
GetOccurrenceRequest request = new GetOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
Occurrence response = await grafeasClient.GetOccurrenceAsync(request);
GetOccurrenceAsync(GetOccurrenceRequest, CancellationToken)
public virtual Task<Occurrence> GetOccurrenceAsync(GetOccurrenceRequest request, CancellationToken cancellationToken)
Gets the specified occurrence.
Parameters | |
---|---|
Name | Description |
request |
GetOccurrenceRequest 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)
GetOccurrenceRequest request = new GetOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
Occurrence response = await grafeasClient.GetOccurrenceAsync(request);
GetOccurrenceAsync(OccurrenceName, CallSettings)
public virtual Task<Occurrence> GetOccurrenceAsync(OccurrenceName name, CallSettings callSettings = null)
Gets the specified occurrence.
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. |
Returns | |
---|---|
Type | Description |
TaskOccurrence |
A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
Occurrence response = await grafeasClient.GetOccurrenceAsync(name);
GetOccurrenceAsync(OccurrenceName, CancellationToken)
public virtual Task<Occurrence> GetOccurrenceAsync(OccurrenceName name, CancellationToken cancellationToken)
Gets the specified occurrence.
Parameters | |
---|---|
Name | Description |
name |
OccurrenceName The name of the occurrence in the form of
|
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)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
Occurrence response = await grafeasClient.GetOccurrenceAsync(name);
GetOccurrenceAsync(string, CallSettings)
public virtual Task<Occurrence> GetOccurrenceAsync(string name, CallSettings callSettings = null)
Gets the specified occurrence.
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. |
Returns | |
---|---|
Type | Description |
TaskOccurrence |
A Task containing the RPC response. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
// Make the request
Occurrence response = await grafeasClient.GetOccurrenceAsync(name);
GetOccurrenceAsync(string, CancellationToken)
public virtual Task<Occurrence> GetOccurrenceAsync(string name, CancellationToken cancellationToken)
Gets the specified occurrence.
Parameters | |
---|---|
Name | Description |
name |
string The name of the occurrence in the form of
|
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 name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
// Make the request
Occurrence response = await grafeasClient.GetOccurrenceAsync(name);
GetOccurrenceNote(GetOccurrenceNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
GetOccurrenceNoteRequest request = new GetOccurrenceNoteRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
Note response = grafeasClient.GetOccurrenceNote(request);
GetOccurrenceNote(OccurrenceName, CallSettings)
public virtual Note GetOccurrenceNote(OccurrenceName name, 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 |
name |
OccurrenceName The name of the occurrence in the form of
|
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)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
Note response = grafeasClient.GetOccurrenceNote(name);
GetOccurrenceNote(string, CallSettings)
public virtual Note GetOccurrenceNote(string name, 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 |
name |
string The name of the occurrence in the form of
|
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 name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
// Make the request
Note response = grafeasClient.GetOccurrenceNote(name);
GetOccurrenceNoteAsync(GetOccurrenceNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
GetOccurrenceNoteRequest request = new GetOccurrenceNoteRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
Note response = await grafeasClient.GetOccurrenceNoteAsync(request);
GetOccurrenceNoteAsync(GetOccurrenceNoteRequest, CancellationToken)
public virtual Task<Note> GetOccurrenceNoteAsync(GetOccurrenceNoteRequest request, CancellationToken cancellationToken)
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. |
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)
GetOccurrenceNoteRequest request = new GetOccurrenceNoteRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
};
// Make the request
Note response = await grafeasClient.GetOccurrenceNoteAsync(request);
GetOccurrenceNoteAsync(OccurrenceName, CallSettings)
public virtual Task<Note> GetOccurrenceNoteAsync(OccurrenceName name, 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 |
name |
OccurrenceName The name of the occurrence in the form of
|
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)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
Note response = await grafeasClient.GetOccurrenceNoteAsync(name);
GetOccurrenceNoteAsync(OccurrenceName, CancellationToken)
public virtual Task<Note> GetOccurrenceNoteAsync(OccurrenceName name, CancellationToken cancellationToken)
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 |
name |
OccurrenceName The name of the occurrence in the form of
|
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)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
// Make the request
Note response = await grafeasClient.GetOccurrenceNoteAsync(name);
GetOccurrenceNoteAsync(string, CallSettings)
public virtual Task<Note> GetOccurrenceNoteAsync(string name, 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 |
name |
string The name of the occurrence in the form of
|
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 name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
// Make the request
Note response = await grafeasClient.GetOccurrenceNoteAsync(name);
GetOccurrenceNoteAsync(string, CancellationToken)
public virtual Task<Note> GetOccurrenceNoteAsync(string name, CancellationToken cancellationToken)
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 |
name |
string The name of the occurrence in the form of
|
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 name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
// Make the request
Note response = await grafeasClient.GetOccurrenceNoteAsync(name);
ListNoteOccurrences(ListNoteOccurrencesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ListNoteOccurrencesRequest request = new ListNoteOccurrencesRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListNoteOccurrencesResponse, Occurrence> response = grafeasClient.ListNoteOccurrences(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Occurrence item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNoteOccurrencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNoteOccurrences(NoteName, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListNoteOccurrencesResponse, Occurrence> ListNoteOccurrences(NoteName name, string filter, string pageToken = null, int? pageSize = null, 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 |
name |
NoteName The name of the note to list occurrences for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListNoteOccurrencesResponseOccurrence |
A pageable sequence of Occurrence resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
NoteName name = NoteName.FromProjectNote("[PROJECT]", "[NOTE]");
string filter = "";
// Make the request
PagedEnumerable<ListNoteOccurrencesResponse, Occurrence> response = grafeasClient.ListNoteOccurrences(name, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Occurrence item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNoteOccurrencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNoteOccurrences(string, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListNoteOccurrencesResponse, Occurrence> ListNoteOccurrences(string name, string filter, string pageToken = null, int? pageSize = null, 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 |
name |
string The name of the note to list occurrences for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListNoteOccurrencesResponseOccurrence |
A pageable sequence of Occurrence resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notes/[NOTE]";
string filter = "";
// Make the request
PagedEnumerable<ListNoteOccurrencesResponse, Occurrence> response = grafeasClient.ListNoteOccurrences(name, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Occurrence item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNoteOccurrencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNoteOccurrencesAsync(ListNoteOccurrencesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ListNoteOccurrencesRequest request = new ListNoteOccurrencesRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListNoteOccurrencesResponse, Occurrence> response = grafeasClient.ListNoteOccurrencesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Occurrence item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNoteOccurrencesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNoteOccurrencesAsync(NoteName, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListNoteOccurrencesResponse, Occurrence> ListNoteOccurrencesAsync(NoteName name, string filter, string pageToken = null, int? pageSize = null, 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 |
name |
NoteName The name of the note to list occurrences for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListNoteOccurrencesResponseOccurrence |
A pageable asynchronous sequence of Occurrence resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
NoteName name = NoteName.FromProjectNote("[PROJECT]", "[NOTE]");
string filter = "";
// Make the request
PagedAsyncEnumerable<ListNoteOccurrencesResponse, Occurrence> response = grafeasClient.ListNoteOccurrencesAsync(name, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Occurrence item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNoteOccurrencesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNoteOccurrencesAsync(string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListNoteOccurrencesResponse, Occurrence> ListNoteOccurrencesAsync(string name, string filter, string pageToken = null, int? pageSize = null, 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 |
name |
string The name of the note to list occurrences for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListNoteOccurrencesResponseOccurrence |
A pageable asynchronous sequence of Occurrence resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string name = "projects/[PROJECT]/notes/[NOTE]";
string filter = "";
// Make the request
PagedAsyncEnumerable<ListNoteOccurrencesResponse, Occurrence> response = grafeasClient.ListNoteOccurrencesAsync(name, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Occurrence item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNoteOccurrencesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotes(ListNotesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ListNotesRequest request = new ListNotesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListNotesResponse, Note> response = grafeasClient.ListNotes(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Note item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Note item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Note> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Note item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotes(ProjectName, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListNotesResponse, Note> ListNotes(ProjectName parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists notes for the specified project.
Parameters | |
---|---|
Name | Description |
parent |
ProjectName The name of the project to list notes for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListNotesResponseNote |
A pageable sequence of Note resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string filter = "";
// Make the request
PagedEnumerable<ListNotesResponse, Note> response = grafeasClient.ListNotes(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Note item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Note item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Note> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Note item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotes(string, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListNotesResponse, Note> ListNotes(string parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists notes for the specified project.
Parameters | |
---|---|
Name | Description |
parent |
string The name of the project to list notes for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListNotesResponseNote |
A pageable sequence of Note resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string filter = "";
// Make the request
PagedEnumerable<ListNotesResponse, Note> response = grafeasClient.ListNotes(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Note item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListNotesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Note item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Note> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Note item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotesAsync(ListNotesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ListNotesRequest request = new ListNotesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListNotesResponse, Note> response = grafeasClient.ListNotesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Note item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Note item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Note> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Note item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotesAsync(ProjectName, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListNotesResponse, Note> ListNotesAsync(ProjectName parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists notes for the specified project.
Parameters | |
---|---|
Name | Description |
parent |
ProjectName The name of the project to list notes for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListNotesResponseNote |
A pageable asynchronous sequence of Note resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string filter = "";
// Make the request
PagedAsyncEnumerable<ListNotesResponse, Note> response = grafeasClient.ListNotesAsync(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Note item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Note item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Note> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Note item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListNotesAsync(string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListNotesResponse, Note> ListNotesAsync(string parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists notes for the specified project.
Parameters | |
---|---|
Name | Description |
parent |
string The name of the project to list notes for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListNotesResponseNote |
A pageable asynchronous sequence of Note resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string filter = "";
// Make the request
PagedAsyncEnumerable<ListNotesResponse, Note> response = grafeasClient.ListNotesAsync(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Note item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListNotesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Note item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Note> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Note item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListOccurrences(ListOccurrencesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ListOccurrencesRequest request = new ListOccurrencesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListOccurrencesResponse, Occurrence> response = grafeasClient.ListOccurrences(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Occurrence item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOccurrencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListOccurrences(ProjectName, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListOccurrencesResponse, Occurrence> ListOccurrences(ProjectName parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists occurrences for the specified project.
Parameters | |
---|---|
Name | Description |
parent |
ProjectName The name of the project to list occurrences for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListOccurrencesResponseOccurrence |
A pageable sequence of Occurrence resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string filter = "";
// Make the request
PagedEnumerable<ListOccurrencesResponse, Occurrence> response = grafeasClient.ListOccurrences(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Occurrence item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOccurrencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListOccurrences(string, string, string, int?, CallSettings)
public virtual PagedEnumerable<ListOccurrencesResponse, Occurrence> ListOccurrences(string parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists occurrences for the specified project.
Parameters | |
---|---|
Name | Description |
parent |
string The name of the project to list occurrences for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListOccurrencesResponseOccurrence |
A pageable sequence of Occurrence resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string filter = "";
// Make the request
PagedEnumerable<ListOccurrencesResponse, Occurrence> response = grafeasClient.ListOccurrences(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Occurrence item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOccurrencesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListOccurrencesAsync(ListOccurrencesRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ListOccurrencesRequest request = new ListOccurrencesRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListOccurrencesResponse, Occurrence> response = grafeasClient.ListOccurrencesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Occurrence item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOccurrencesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListOccurrencesAsync(ProjectName, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListOccurrencesResponse, Occurrence> ListOccurrencesAsync(ProjectName parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists occurrences for the specified project.
Parameters | |
---|---|
Name | Description |
parent |
ProjectName The name of the project to list occurrences for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListOccurrencesResponseOccurrence |
A pageable asynchronous sequence of Occurrence resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string filter = "";
// Make the request
PagedAsyncEnumerable<ListOccurrencesResponse, Occurrence> response = grafeasClient.ListOccurrencesAsync(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Occurrence item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOccurrencesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListOccurrencesAsync(string, string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListOccurrencesResponse, Occurrence> ListOccurrencesAsync(string parent, string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists occurrences for the specified project.
Parameters | |
---|---|
Name | Description |
parent |
string The name of the project to list occurrences for in the form of
|
filter |
string The filter expression. |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListOccurrencesResponseOccurrence |
A pageable asynchronous sequence of Occurrence resources. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string filter = "";
// Make the request
PagedAsyncEnumerable<ListOccurrencesResponse, Occurrence> response = grafeasClient.ListOccurrencesAsync(parent, filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Occurrence item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOccurrencesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Occurrence item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Occurrence> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Occurrence item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateNote(NoteName, Note, FieldMask, CallSettings)
public virtual Note UpdateNote(NoteName name, Note note, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified note.
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. |
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)
NoteName name = NoteName.FromProjectNote("[PROJECT]", "[NOTE]");
Note note = new Note();
FieldMask updateMask = new FieldMask();
// Make the request
Note response = grafeasClient.UpdateNote(name, note, updateMask);
UpdateNote(UpdateNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
UpdateNoteRequest request = new UpdateNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
Note = new Note(),
UpdateMask = new FieldMask(),
};
// Make the request
Note response = grafeasClient.UpdateNote(request);
UpdateNote(string, Note, FieldMask, CallSettings)
public virtual Note UpdateNote(string name, Note note, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified note.
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. |
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 name = "projects/[PROJECT]/notes/[NOTE]";
Note note = new Note();
FieldMask updateMask = new FieldMask();
// Make the request
Note response = grafeasClient.UpdateNote(name, note, updateMask);
UpdateNoteAsync(NoteName, Note, FieldMask, CallSettings)
public virtual Task<Note> UpdateNoteAsync(NoteName name, Note note, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified note.
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. |
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)
NoteName name = NoteName.FromProjectNote("[PROJECT]", "[NOTE]");
Note note = new Note();
FieldMask updateMask = new FieldMask();
// Make the request
Note response = await grafeasClient.UpdateNoteAsync(name, note, updateMask);
UpdateNoteAsync(NoteName, Note, FieldMask, CancellationToken)
public virtual Task<Note> UpdateNoteAsync(NoteName name, Note note, FieldMask updateMask, CancellationToken cancellationToken)
Updates the specified note.
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. |
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)
NoteName name = NoteName.FromProjectNote("[PROJECT]", "[NOTE]");
Note note = new Note();
FieldMask updateMask = new FieldMask();
// Make the request
Note response = await grafeasClient.UpdateNoteAsync(name, note, updateMask);
UpdateNoteAsync(UpdateNoteRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
UpdateNoteRequest request = new UpdateNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
Note = new Note(),
UpdateMask = new FieldMask(),
};
// Make the request
Note response = await grafeasClient.UpdateNoteAsync(request);
UpdateNoteAsync(UpdateNoteRequest, CancellationToken)
public virtual Task<Note> UpdateNoteAsync(UpdateNoteRequest request, CancellationToken cancellationToken)
Updates the specified note.
Parameters | |
---|---|
Name | Description |
request |
UpdateNoteRequest 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)
UpdateNoteRequest request = new UpdateNoteRequest
{
NoteName = NoteName.FromProjectNote("[PROJECT]", "[NOTE]"),
Note = new Note(),
UpdateMask = new FieldMask(),
};
// Make the request
Note response = await grafeasClient.UpdateNoteAsync(request);
UpdateNoteAsync(string, Note, FieldMask, CallSettings)
public virtual Task<Note> UpdateNoteAsync(string name, Note note, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified note.
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. |
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 name = "projects/[PROJECT]/notes/[NOTE]";
Note note = new Note();
FieldMask updateMask = new FieldMask();
// Make the request
Note response = await grafeasClient.UpdateNoteAsync(name, note, updateMask);
UpdateNoteAsync(string, Note, FieldMask, CancellationToken)
public virtual Task<Note> UpdateNoteAsync(string name, Note note, FieldMask updateMask, CancellationToken cancellationToken)
Updates the specified note.
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. |
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 name = "projects/[PROJECT]/notes/[NOTE]";
Note note = new Note();
FieldMask updateMask = new FieldMask();
// Make the request
Note response = await grafeasClient.UpdateNoteAsync(name, note, updateMask);
UpdateOccurrence(OccurrenceName, Occurrence, FieldMask, CallSettings)
public virtual Occurrence UpdateOccurrence(OccurrenceName name, Occurrence occurrence, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified occurrence.
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. |
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)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
Occurrence occurrence = new Occurrence();
FieldMask updateMask = new FieldMask();
// Make the request
Occurrence response = grafeasClient.UpdateOccurrence(name, occurrence, updateMask);
UpdateOccurrence(UpdateOccurrenceRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
UpdateOccurrenceRequest request = new UpdateOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
Occurrence = new Occurrence(),
UpdateMask = new FieldMask(),
};
// Make the request
Occurrence response = grafeasClient.UpdateOccurrence(request);
UpdateOccurrence(string, Occurrence, FieldMask, CallSettings)
public virtual Occurrence UpdateOccurrence(string name, Occurrence occurrence, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified occurrence.
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. |
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 name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
Occurrence occurrence = new Occurrence();
FieldMask updateMask = new FieldMask();
// Make the request
Occurrence response = grafeasClient.UpdateOccurrence(name, occurrence, updateMask);
UpdateOccurrenceAsync(OccurrenceName, Occurrence, FieldMask, CallSettings)
public virtual Task<Occurrence> UpdateOccurrenceAsync(OccurrenceName name, Occurrence occurrence, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified occurrence.
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. |
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)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
Occurrence occurrence = new Occurrence();
FieldMask updateMask = new FieldMask();
// Make the request
Occurrence response = await grafeasClient.UpdateOccurrenceAsync(name, occurrence, updateMask);
UpdateOccurrenceAsync(OccurrenceName, Occurrence, FieldMask, CancellationToken)
public virtual Task<Occurrence> UpdateOccurrenceAsync(OccurrenceName name, Occurrence occurrence, FieldMask updateMask, CancellationToken cancellationToken)
Updates the specified occurrence.
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. |
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)
OccurrenceName name = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]");
Occurrence occurrence = new Occurrence();
FieldMask updateMask = new FieldMask();
// Make the request
Occurrence response = await grafeasClient.UpdateOccurrenceAsync(name, occurrence, updateMask);
UpdateOccurrenceAsync(UpdateOccurrenceRequest, CallSettings)
public virtual 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. |
// Create client
GrafeasClient grafeasClient = new GrafeasClientBuilder { Endpoint = endpoint }.Build();
// Initialize request argument(s)
UpdateOccurrenceRequest request = new UpdateOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
Occurrence = new Occurrence(),
UpdateMask = new FieldMask(),
};
// Make the request
Occurrence response = await grafeasClient.UpdateOccurrenceAsync(request);
UpdateOccurrenceAsync(UpdateOccurrenceRequest, CancellationToken)
public virtual Task<Occurrence> UpdateOccurrenceAsync(UpdateOccurrenceRequest request, CancellationToken cancellationToken)
Updates the specified occurrence.
Parameters | |
---|---|
Name | Description |
request |
UpdateOccurrenceRequest 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)
UpdateOccurrenceRequest request = new UpdateOccurrenceRequest
{
OccurrenceName = OccurrenceName.FromProjectOccurrence("[PROJECT]", "[OCCURRENCE]"),
Occurrence = new Occurrence(),
UpdateMask = new FieldMask(),
};
// Make the request
Occurrence response = await grafeasClient.UpdateOccurrenceAsync(request);
UpdateOccurrenceAsync(string, Occurrence, FieldMask, CallSettings)
public virtual Task<Occurrence> UpdateOccurrenceAsync(string name, Occurrence occurrence, FieldMask updateMask, CallSettings callSettings = null)
Updates the specified occurrence.
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. |
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 name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
Occurrence occurrence = new Occurrence();
FieldMask updateMask = new FieldMask();
// Make the request
Occurrence response = await grafeasClient.UpdateOccurrenceAsync(name, occurrence, updateMask);
UpdateOccurrenceAsync(string, Occurrence, FieldMask, CancellationToken)
public virtual Task<Occurrence> UpdateOccurrenceAsync(string name, Occurrence occurrence, FieldMask updateMask, CancellationToken cancellationToken)
Updates the specified occurrence.
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. |
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 name = "projects/[PROJECT]/occurrences/[OCCURRENCE]";
Occurrence occurrence = new Occurrence();
FieldMask updateMask = new FieldMask();
// Make the request
Occurrence response = await grafeasClient.UpdateOccurrenceAsync(name, occurrence, updateMask);