Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client (v0.14.0)

Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.

REST client for the SiteSearchEngineService service.

Service for managing site search related resources.

Inherits

  • Object

Methods

.configure

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

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

#batch_create_target_sites

def batch_create_target_sites(request, options = nil) -> ::Gapic::Operation
def batch_create_target_sites(parent: nil, requests: nil) -> ::Gapic::Operation

Creates TargetSite in a batch.

Overloads
def batch_create_target_sites(request, options = nil) -> ::Gapic::Operation
Pass arguments to batch_create_target_sites via a request object, either of type BatchCreateTargetSitesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::BatchCreateTargetSitesRequest, ::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_target_sites(parent: nil, requests: nil) -> ::Gapic::Operation
Pass arguments to batch_create_target_sites 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 shared by all TargetSites being created. projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine. The parent field in the CreateBookRequest messages must either be empty or match this field.
  • requests (::Array<::Google::Cloud::DiscoveryEngine::V1beta::CreateTargetSiteRequest, ::Hash>) — Required. The request message specifying the resources to create. A maximum of 20 TargetSites can be created in a batch.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::BatchCreateTargetSitesRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#batch_verify_target_sites

def batch_verify_target_sites(request, options = nil) -> ::Gapic::Operation
def batch_verify_target_sites(parent: nil) -> ::Gapic::Operation

Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.

Overloads
def batch_verify_target_sites(request, options = nil) -> ::Gapic::Operation
Pass arguments to batch_verify_target_sites via a request object, either of type BatchVerifyTargetSitesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::BatchVerifyTargetSitesRequest, ::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_verify_target_sites(parent: nil) -> ::Gapic::Operation
Pass arguments to batch_verify_target_sites 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
  • parent (::String) — Required. The parent resource shared by all TargetSites being verified. projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::BatchVerifyTargetSitesRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#configure

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

Configure the SiteSearchEngineService 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_target_site

def create_target_site(request, options = nil) -> ::Gapic::Operation
def create_target_site(parent: nil, target_site: nil) -> ::Gapic::Operation

Creates a TargetSite.

Overloads
def create_target_site(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_target_site via a request object, either of type CreateTargetSiteRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::CreateTargetSiteRequest, ::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_target_site(parent: nil, target_site: nil) -> ::Gapic::Operation
Pass arguments to create_target_site 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::CreateTargetSiteRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#delete_target_site

def delete_target_site(request, options = nil) -> ::Gapic::Operation
def delete_target_site(name: nil) -> ::Gapic::Operation

Deletes a TargetSite.

Overloads
def delete_target_site(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_target_site via a request object, either of type DeleteTargetSiteRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::DeleteTargetSiteRequest, ::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_target_site(name: nil) -> ::Gapic::Operation
Pass arguments to delete_target_site 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) — Required. Full resource name of TargetSite, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}.

    If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

    If the requested TargetSite does not exist, a NOT_FOUND error is returned.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::DeleteTargetSiteRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#disable_advanced_site_search

def disable_advanced_site_search(request, options = nil) -> ::Gapic::Operation
def disable_advanced_site_search(site_search_engine: nil) -> ::Gapic::Operation

Downgrade from advanced site search to basic site search.

Overloads
def disable_advanced_site_search(request, options = nil) -> ::Gapic::Operation
Pass arguments to disable_advanced_site_search via a request object, either of type DisableAdvancedSiteSearchRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::DisableAdvancedSiteSearchRequest, ::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 disable_advanced_site_search(site_search_engine: nil) -> ::Gapic::Operation
Pass arguments to disable_advanced_site_search 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
  • site_search_engine (::String) — Required. Full resource name of the SiteSearchEngine, such as projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::DisableAdvancedSiteSearchRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#enable_advanced_site_search

def enable_advanced_site_search(request, options = nil) -> ::Gapic::Operation
def enable_advanced_site_search(site_search_engine: nil) -> ::Gapic::Operation

Upgrade from basic site search to advanced site search.

Overloads
def enable_advanced_site_search(request, options = nil) -> ::Gapic::Operation
Pass arguments to enable_advanced_site_search via a request object, either of type EnableAdvancedSiteSearchRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::EnableAdvancedSiteSearchRequest, ::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 enable_advanced_site_search(site_search_engine: nil) -> ::Gapic::Operation
Pass arguments to enable_advanced_site_search 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
  • site_search_engine (::String) — Required. Full resource name of the SiteSearchEngine, such as projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::EnableAdvancedSiteSearchRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#fetch_domain_verification_status

def fetch_domain_verification_status(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>
def fetch_domain_verification_status(site_search_engine: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>

Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.

Overloads
def fetch_domain_verification_status(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>
Pass arguments to fetch_domain_verification_status via a request object, either of type FetchDomainVerificationStatusRequest or an equivalent Hash.
Parameters
def fetch_domain_verification_status(site_search_engine: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>
Pass arguments to fetch_domain_verification_status 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
  • site_search_engine (::String) — Required. The site search engine resource under which we fetch all the domain verification status. projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.
  • page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000.

    If this field is negative, an INVALID_ARGUMENT error is returned.

  • page_token (::String) — A page token, received from a previous FetchDomainVerificationStatus call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to FetchDomainVerificationStatus must match the call that provided the page token.

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/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::FetchDomainVerificationStatusRequest.new

# Call the fetch_domain_verification_status method.
result = client.fetch_domain_verification_status 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::DiscoveryEngine::V1beta::TargetSite.
  p item
end

#get_site_search_engine

def get_site_search_engine(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine
def get_site_search_engine(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine

Gets the SiteSearchEngine.

Overloads
def get_site_search_engine(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine
Pass arguments to get_site_search_engine via a request object, either of type GetSiteSearchEngineRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::GetSiteSearchEngineRequest, ::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_site_search_engine(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine
Pass arguments to get_site_search_engine 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) — Required. Resource name of SiteSearchEngine, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.

    If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

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/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::GetSiteSearchEngineRequest.new

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine.
p result

#get_target_site

def get_target_site(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::TargetSite
def get_target_site(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::TargetSite

Gets a TargetSite.

Overloads
def get_target_site(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::TargetSite
Pass arguments to get_target_site via a request object, either of type GetTargetSiteRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::GetTargetSiteRequest, ::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_target_site(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::TargetSite
Pass arguments to get_target_site 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) — Required. Full resource name of TargetSite, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}.

    If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

    If the requested TargetSite does not exist, a NOT_FOUND error is returned.

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/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::GetTargetSiteRequest.new

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::TargetSite.
p result

#initialize

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

Create a new SiteSearchEngineService REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_target_sites

def list_target_sites(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>
def list_target_sites(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>

Gets a list of {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}s.

Overloads
def list_target_sites(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>
Pass arguments to list_target_sites via a request object, either of type ListTargetSitesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::ListTargetSitesRequest, ::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_target_sites(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>
Pass arguments to list_target_sites 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 site search engine resource name, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine.

    If the caller does not have permission to list {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}s under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.

  • page_size (::Integer) — Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000.

    If this field is negative, an INVALID_ARGUMENT error is returned.

  • page_token (::String) — A page token, received from a previous ListTargetSites call. Provide this to retrieve the subsequent page.

    When paginating, all other parameters provided to ListTargetSites must match the call that provided the page token.

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/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::ListTargetSitesRequest.new

# Call the list_target_sites method.
result = client.list_target_sites 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::DiscoveryEngine::V1beta::TargetSite.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#operations_client

def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Operations

Get the associated client for long-running operations.

#recrawl_uris

def recrawl_uris(request, options = nil) -> ::Gapic::Operation
def recrawl_uris(site_search_engine: nil, uris: nil) -> ::Gapic::Operation

Request on-demand recrawl for a list of URIs.

Overloads
def recrawl_uris(request, options = nil) -> ::Gapic::Operation
Pass arguments to recrawl_uris via a request object, either of type RecrawlUrisRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::RecrawlUrisRequest, ::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 recrawl_uris(site_search_engine: nil, uris: nil) -> ::Gapic::Operation
Pass arguments to recrawl_uris 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
  • site_search_engine (::String) — Required. Full resource name of the SiteSearchEngine, such as projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine.
  • uris (::Array<::String>) — Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in site_search_engine.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::RecrawlUrisRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_target_site

def update_target_site(request, options = nil) -> ::Gapic::Operation
def update_target_site(target_site: nil) -> ::Gapic::Operation

Updates a TargetSite.

Overloads
def update_target_site(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_target_site via a request object, either of type UpdateTargetSiteRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::UpdateTargetSiteRequest, ::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_target_site(target_site: nil) -> ::Gapic::Operation
Pass arguments to update_target_site 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
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1beta::UpdateTargetSiteRequest.new

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end