Grafeas V1 API - Class Grafeas::V1::Grafeas::Client (v0.16.1)

Reference documentation and code samples for the Grafeas V1 API class Grafeas::V1::Grafeas::Client.

Client for the Grafeas service.

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.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the Grafeas Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all Grafeas clients
::Grafeas::V1::Grafeas::Client.configure do |config|
  config.timeout = 10.0
end

#batch_create_notes

def batch_create_notes(request, options = nil) -> ::Grafeas::V1::BatchCreateNotesResponse
def batch_create_notes(parent: nil, notes: nil) -> ::Grafeas::V1::BatchCreateNotesResponse

Creates new notes in batch.

Overloads
def batch_create_notes(request, options = nil) -> ::Grafeas::V1::BatchCreateNotesResponse
Pass arguments to batch_create_notes via a request object, either of type BatchCreateNotesRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::BatchCreateNotesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def batch_create_notes(parent: nil, notes: nil) -> ::Grafeas::V1::BatchCreateNotesResponse
Pass arguments to batch_create_notes via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — The name of the project in the form of projects/[PROJECT_ID], under which the notes are to be created.
  • notes (::Hash{::String => ::Grafeas::V1::Note, ::Hash}) — The notes to create. Max allowed length is 1000.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::BatchCreateNotesRequest.new

# Call the batch_create_notes method.
result = client.batch_create_notes request

# The returned object is of type Grafeas::V1::BatchCreateNotesResponse.
p result

#batch_create_occurrences

def batch_create_occurrences(request, options = nil) -> ::Grafeas::V1::BatchCreateOccurrencesResponse
def batch_create_occurrences(parent: nil, occurrences: nil) -> ::Grafeas::V1::BatchCreateOccurrencesResponse

Creates new occurrences in batch.

Overloads
def batch_create_occurrences(request, options = nil) -> ::Grafeas::V1::BatchCreateOccurrencesResponse
Pass arguments to batch_create_occurrences via a request object, either of type BatchCreateOccurrencesRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::BatchCreateOccurrencesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def batch_create_occurrences(parent: nil, occurrences: nil) -> ::Grafeas::V1::BatchCreateOccurrencesResponse
Pass arguments to batch_create_occurrences via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — The name of the project in the form of projects/[PROJECT_ID], under which the occurrences are to be created.
  • occurrences (::Array<::Grafeas::V1::Occurrence, ::Hash>) — The occurrences to create. Max allowed length is 1000.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::BatchCreateOccurrencesRequest.new

# Call the batch_create_occurrences method.
result = client.batch_create_occurrences request

# The returned object is of type Grafeas::V1::BatchCreateOccurrencesResponse.
p result

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the Grafeas Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_note

def create_note(request, options = nil) -> ::Grafeas::V1::Note
def create_note(parent: nil, note_id: nil, note: nil) -> ::Grafeas::V1::Note

Creates a new note.

Overloads
def create_note(request, options = nil) -> ::Grafeas::V1::Note
Pass arguments to create_note via a request object, either of type CreateNoteRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::CreateNoteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_note(parent: nil, note_id: nil, note: nil) -> ::Grafeas::V1::Note
Pass arguments to create_note via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — The name of the project in the form of projects/[PROJECT_ID], under which the note is to be created.
  • note_id (::String) — The ID to use for this note.
  • note (::Grafeas::V1::Note, ::Hash) — The note to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::CreateNoteRequest.new

# Call the create_note method.
result = client.create_note request

# The returned object is of type Grafeas::V1::Note.
p result

#create_occurrence

def create_occurrence(request, options = nil) -> ::Grafeas::V1::Occurrence
def create_occurrence(parent: nil, occurrence: nil) -> ::Grafeas::V1::Occurrence

Creates a new occurrence.

Overloads
def create_occurrence(request, options = nil) -> ::Grafeas::V1::Occurrence
Pass arguments to create_occurrence via a request object, either of type CreateOccurrenceRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::CreateOccurrenceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_occurrence(parent: nil, occurrence: nil) -> ::Grafeas::V1::Occurrence
Pass arguments to create_occurrence via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — The name of the project in the form of projects/[PROJECT_ID], under which the occurrence is to be created.
  • occurrence (::Grafeas::V1::Occurrence, ::Hash) — The occurrence to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::CreateOccurrenceRequest.new

# Call the create_occurrence method.
result = client.create_occurrence request

# The returned object is of type Grafeas::V1::Occurrence.
p result

#delete_note

def delete_note(request, options = nil) -> ::Google::Protobuf::Empty
def delete_note(name: nil) -> ::Google::Protobuf::Empty

Deletes the specified note.

Overloads
def delete_note(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_note via a request object, either of type DeleteNoteRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::DeleteNoteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_note(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_note via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::DeleteNoteRequest.new

# Call the delete_note method.
result = client.delete_note request

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_occurrence

def delete_occurrence(request, options = nil) -> ::Google::Protobuf::Empty
def delete_occurrence(name: nil) -> ::Google::Protobuf::Empty

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

Overloads
def delete_occurrence(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_occurrence via a request object, either of type DeleteOccurrenceRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::DeleteOccurrenceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_occurrence(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_occurrence via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::DeleteOccurrenceRequest.new

# Call the delete_occurrence method.
result = client.delete_occurrence request

# The returned object is of type Google::Protobuf::Empty.
p result

#get_note

def get_note(request, options = nil) -> ::Grafeas::V1::Note
def get_note(name: nil) -> ::Grafeas::V1::Note

Gets the specified note.

Overloads
def get_note(request, options = nil) -> ::Grafeas::V1::Note
Pass arguments to get_note via a request object, either of type Grafeas::V1::GetNoteRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::GetNoteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_note(name: nil) -> ::Grafeas::V1::Note
Pass arguments to get_note via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::GetNoteRequest.new

# Call the get_note method.
result = client.get_note request

# The returned object is of type Grafeas::V1::Note.
p result

#get_occurrence

def get_occurrence(request, options = nil) -> ::Grafeas::V1::Occurrence
def get_occurrence(name: nil) -> ::Grafeas::V1::Occurrence

Gets the specified occurrence.

Overloads
def get_occurrence(request, options = nil) -> ::Grafeas::V1::Occurrence
Pass arguments to get_occurrence via a request object, either of type Grafeas::V1::GetOccurrenceRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::GetOccurrenceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_occurrence(name: nil) -> ::Grafeas::V1::Occurrence
Pass arguments to get_occurrence via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::GetOccurrenceRequest.new

# Call the get_occurrence method.
result = client.get_occurrence request

# The returned object is of type Grafeas::V1::Occurrence.
p result

#get_occurrence_note

def get_occurrence_note(request, options = nil) -> ::Grafeas::V1::Note
def get_occurrence_note(name: nil) -> ::Grafeas::V1::Note

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

Overloads
def get_occurrence_note(request, options = nil) -> ::Grafeas::V1::Note
Pass arguments to get_occurrence_note via a request object, either of type Grafeas::V1::GetOccurrenceNoteRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::GetOccurrenceNoteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_occurrence_note(name: nil) -> ::Grafeas::V1::Note
Pass arguments to get_occurrence_note via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::GetOccurrenceNoteRequest.new

# Call the get_occurrence_note method.
result = client.get_occurrence_note request

# The returned object is of type Grafeas::V1::Note.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new Grafeas client object.

Yields
  • (config) — Configure the Grafeas client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Grafeas::V1::Grafeas::Client.new

# Create a client using a custom configuration
client = ::Grafeas::V1::Grafeas::Client.new do |config|
  config.timeout = 10.0
end

#list_note_occurrences

def list_note_occurrences(request, options = nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>
def list_note_occurrences(name: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>

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

Overloads
def list_note_occurrences(request, options = nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>
Pass arguments to list_note_occurrences via a request object, either of type ListNoteOccurrencesRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::ListNoteOccurrencesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_note_occurrences(name: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>
Pass arguments to list_note_occurrences via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — The name of the note to list occurrences for in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
  • filter (::String) — The filter expression.
  • page_size (::Integer) — Number of occurrences to return in the list.
  • page_token (::String) — Token to provide to skip to a particular spot in the list.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::ListNoteOccurrencesRequest.new

# Call the list_note_occurrences method.
result = client.list_note_occurrences request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Grafeas::V1::Occurrence.
  p item
end

#list_notes

def list_notes(request, options = nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Note>
def list_notes(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Note>

Lists notes for the specified project.

Overloads
def list_notes(request, options = nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Note>
Pass arguments to list_notes via a request object, either of type ListNotesRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::ListNotesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_notes(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Note>
Pass arguments to list_notes via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — The name of the project to list notes for in the form of projects/[PROJECT_ID].
  • filter (::String) — The filter expression.
  • page_size (::Integer) — Number of notes to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20.
  • page_token (::String) — Token to provide to skip to a particular spot in the list.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::PagedEnumerable<::Grafeas::V1::Note>)
  • operation (::GRPC::ActiveCall::Operation)
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::ListNotesRequest.new

# Call the list_notes method.
result = client.list_notes request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Grafeas::V1::Note.
  p item
end

#list_occurrences

def list_occurrences(request, options = nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>
def list_occurrences(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>

Lists occurrences for the specified project.

Overloads
def list_occurrences(request, options = nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>
Pass arguments to list_occurrences via a request object, either of type ListOccurrencesRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::ListOccurrencesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_occurrences(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Grafeas::V1::Occurrence>
Pass arguments to list_occurrences via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — The name of the project to list occurrences for in the form of projects/[PROJECT_ID].
  • filter (::String) — The filter expression.
  • page_size (::Integer) — Number of occurrences to return in the list. Must be positive. Max allowed page size is 1000. If not specified, page size defaults to 20.
  • page_token (::String) — Token to provide to skip to a particular spot in the list.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::ListOccurrencesRequest.new

# Call the list_occurrences method.
result = client.list_occurrences request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Grafeas::V1::Occurrence.
  p item
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_note

def update_note(request, options = nil) -> ::Grafeas::V1::Note
def update_note(name: nil, note: nil, update_mask: nil) -> ::Grafeas::V1::Note

Updates the specified note.

Overloads
def update_note(request, options = nil) -> ::Grafeas::V1::Note
Pass arguments to update_note via a request object, either of type UpdateNoteRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::UpdateNoteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_note(name: nil, note: nil, update_mask: nil) -> ::Grafeas::V1::Note
Pass arguments to update_note via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::UpdateNoteRequest.new

# Call the update_note method.
result = client.update_note request

# The returned object is of type Grafeas::V1::Note.
p result

#update_occurrence

def update_occurrence(request, options = nil) -> ::Grafeas::V1::Occurrence
def update_occurrence(name: nil, occurrence: nil, update_mask: nil) -> ::Grafeas::V1::Occurrence

Updates the specified occurrence.

Overloads
def update_occurrence(request, options = nil) -> ::Grafeas::V1::Occurrence
Pass arguments to update_occurrence via a request object, either of type UpdateOccurrenceRequest or an equivalent Hash.
Parameters
  • request (::Grafeas::V1::UpdateOccurrenceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_occurrence(name: nil, occurrence: nil, update_mask: nil) -> ::Grafeas::V1::Occurrence
Pass arguments to update_occurrence via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "grafeas/v1"

# Create a client object. The client can be reused for multiple calls.
client = Grafeas::V1::Grafeas::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Grafeas::V1::UpdateOccurrenceRequest.new

# Call the update_occurrence method.
result = client.update_occurrence request

# The returned object is of type Grafeas::V1::Occurrence.
p result