Chronicle V1 API - Class Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Rest::Client (v1.5.0)

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

REST client for the FeaturedContentRuleService service.

This service provides functionality for managing FeaturedContentRule.

Inherits

  • Object

Methods

.configure

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

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

#configure

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

Configure the FeaturedContentRuleService 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

#initialize

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

Create a new FeaturedContentRuleService REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::Chronicle::V1::FeaturedContentRuleService::Rest::Client.new do |config|
  config.timeout = 10.0
end
def list_featured_content_rules(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>
def list_featured_content_rules(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>

Lists FeaturedContentRules

Overloads
def list_featured_content_rules(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>
Pass arguments to list_featured_content_rules via a request object, either of type ListFeaturedContentRulesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::ListFeaturedContentRulesRequest, ::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_featured_content_rules(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentRule>
Pass arguments to list_featured_content_rules 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 FeaturedContentRules. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub
  • page_size (::Integer) — Optional. The maximum number of featured contents to return. The service may return fewer than this value. If unspecified, at most 100 featured contents will be returned. The maximum value is 1000; values above 1000 will be coerced to 100.
  • page_token (::String) — Optional. A page token, received from a previous ListFeaturedContentRules call. Provide this to retrieve the subsequent page.
  • filter (::String) — Optional. Only the following filters are allowed: Under HAS operator: Filtering through category names:

    • Singular: category_name:"<category_name>"
    • Multiple: category_name:"<category_name1>" OR category_name:"<category_name2>" -- You can only use OR operator between multiple category_name filters.

    Filtering through policy names:

    • Singular: policy_name:"<policy_name>"
    • Multiple: policy_name:"<policy_name1>" OR policy_name:"<policy_name2>" -- You can only use OR operator between multiple policy_name filters.

    Filtering through rule IDs:

    • Singular: rule_id:"ur_<id>"
    • Multiple: rule_id:"ur_<rule_id1>" OR rule_id:"ur_<rule_id2>" -- You can only use OR operator between multiple rule_id filters.

    Filtering through rule precision: rule_precision:"<rule_precision>" -- Rule precision values can be "Precise" or "Broad". If something else is passed, the rule precision will default to "Unknown". You can only filter by one rule precision value.

    Under MATCHES_REGEXP operator: Search through rule name or description (behaves like a string contains): This search is case-insensitive and filters through the rule metadata, specifically the rule_name and description keys. search_rule_name_or_description=~"<rule_name> or <rule_description>". You can only filter by one rule name or description value.

    Multiple filters can also be used together: Ex 1: category_name:"<category_name>" AND policy_name:"<policy_name>" Ex 2: Since category_name and policy_name are repeated fields, we can also use multiple values for each: (category_name:"<category_name1>" OR category_name:"<category_name2>") AND policy_name:"<policy_name>" -- Note that the AND operator has higher precedence than the OR operator. Additionally, parentheses must be used to create a valid filter.

    Requests using filter comparators other than HAS(:) or MATCHES_REGEXP(=~) will result in an InvalidArgument error.

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::FeaturedContentRuleService::Rest::Client.new

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

# Call the list_featured_content_rules method.
result = client.list_featured_content_rules 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::FeaturedContentRule.
  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)