Chronicle V1 API - Class Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client (v0.1.0)

Reference documentation and code samples for the Chronicle V1 API class Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.

REST client for the ReferenceListService service.

ReferenceListService provides an interface for managing reference lists.

Inherits

  • Object

Methods

.configure

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

Configure the ReferenceListService 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 ReferenceListService clients
::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the ReferenceListService 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_reference_list

def create_reference_list(request, options = nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
def create_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList

Creates a new reference list.

Overloads
def create_reference_list(request, options = nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
Pass arguments to create_reference_list via a request object, either of type CreateReferenceListRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
Pass arguments to create_reference_list 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) — Required. The parent resource where this reference list will be created. Format: projects/{project}/locations/{location}/instances/{instance}
  • reference_list (::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash) — Required. The reference list to create.
  • reference_list_id (::String) —

    Required. The ID to use for the reference list. This is also the display name for the reference list. It must satisfy the following requirements:

    • Starts with letter.
    • Contains only letters, numbers and underscore.
    • Has length less than 256.
    • Must be unique.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/chronicle/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new

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

# The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList.
p result

#get_reference_list

def get_reference_list(request, options = nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
def get_reference_list(name: nil, view: nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList

Gets a single reference list.

Overloads
def get_reference_list(request, options = nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
Pass arguments to get_reference_list via a request object, either of type GetReferenceListRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
Pass arguments to get_reference_list 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) — Required. The resource name of the reference list to retrieve. Format: projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}
  • view (::Google::Cloud::Chronicle::V1::ReferenceListView) — How much of the ReferenceList to view. Defaults to REFERENCE_LIST_VIEW_FULL.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/chronicle/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new

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

# The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList.
p result

#initialize

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

Create a new ReferenceListService REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_reference_lists

def list_reference_lists(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>
def list_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>

Lists a collection of reference lists.

Overloads
def list_reference_lists(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>
Pass arguments to list_reference_lists via a request object, either of type ListReferenceListsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>
Pass arguments to list_reference_lists 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) — Required. The parent, which owns this collection of reference lists. Format: projects/{project}/locations/{location}/instances/{instance}
  • page_size (::Integer) — The maximum number of reference lists to return. The service may return fewer than this value. If unspecified, at most 100 reference lists will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — A page token, received from a previous ListReferenceLists call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListReferenceLists must match the call that provided the page token.
  • view (::Google::Cloud::Chronicle::V1::ReferenceListView) — How much of each ReferenceList to view. Defaults to REFERENCE_LIST_VIEW_BASIC.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/chronicle/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new

# Call the list_reference_lists method.
result = client.list_reference_lists 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 ::Google::Cloud::Chronicle::V1::ReferenceList.
  p item
end

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_reference_list

def update_reference_list(request, options = nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
def update_reference_list(reference_list: nil, update_mask: nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList

Updates an existing reference list.

Overloads
def update_reference_list(request, options = nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
Pass arguments to update_reference_list via a request object, either of type UpdateReferenceListRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) -> ::Google::Cloud::Chronicle::V1::ReferenceList
Pass arguments to update_reference_list 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
  • reference_list (::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash) — Required. The reference list to update.

    The reference list's name field is used to identify the reference list to update. Format: projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to update. When no field mask is supplied, all non-empty fields will be updated. A field mask of "*" will update all fields, whether empty or not.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/chronicle/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new

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

# The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList.
p result