Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.
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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SiteSearchEngineService clients ::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::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.
def batch_create_target_sites(request, options = nil) -> ::Gapic::Operation
batch_create_target_sites
via a request object, either of type
BatchCreateTargetSitesRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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
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).
-
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::V1::CreateTargetSiteRequest, ::Hash>) — Required. The request message specifying the resources to create. A maximum of 20 TargetSites can be created in a batch.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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.
def batch_verify_target_sites(request, options = nil) -> ::Gapic::Operation
batch_verify_target_sites
via a request object, either of type
BatchVerifyTargetSitesRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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
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).
-
parent (::String) — Required. The parent resource shared by all TargetSites being verified.
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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.
def create_target_site(request, options = nil) -> ::Gapic::Operation
create_target_site
via a request object, either of type
CreateTargetSiteRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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
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).
-
parent (::String) — Required. Parent resource name of
TargetSite, such as
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine
. - target_site (::Google::Cloud::DiscoveryEngine::V1::TargetSite, ::Hash) — Required. The TargetSite to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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.
def delete_target_site(request, options = nil) -> ::Gapic::Operation
delete_target_site
via a request object, either of type
DeleteTargetSiteRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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.
def disable_advanced_site_search(request, options = nil) -> ::Gapic::Operation
disable_advanced_site_search
via a request object, either of type
DisableAdvancedSiteSearchRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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
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).
-
site_search_engine (::String) — Required. Full resource name of the
SiteSearchEngine, such
as
projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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.
def enable_advanced_site_search(request, options = nil) -> ::Gapic::Operation
enable_advanced_site_search
via a request object, either of type
EnableAdvancedSiteSearchRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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
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).
-
site_search_engine (::String) — Required. Full resource name of the
SiteSearchEngine, such
as
projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>
def fetch_domain_verification_status(site_search_engine: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::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.
def fetch_domain_verification_status(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>
fetch_domain_verification_status
via a request object, either of type
FetchDomainVerificationStatusRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::FetchDomainVerificationStatusRequest, ::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 fetch_domain_verification_status(site_search_engine: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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::V1::TargetSite. p item end
#get_site_search_engine
def get_site_search_engine(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngine
def get_site_search_engine(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngine
Gets the SiteSearchEngine.
def get_site_search_engine(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngine
get_site_search_engine
via a request object, either of type
GetSiteSearchEngineRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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::V1::SiteSearchEngine
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngine)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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::V1::SiteSearchEngine. p result
#get_target_site
def get_target_site(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::TargetSite
def get_target_site(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1::TargetSite
Gets a TargetSite.
def get_target_site(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::TargetSite
get_target_site
via a request object, either of type
GetTargetSiteRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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::V1::TargetSite
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DiscoveryEngine::V1::TargetSite)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::GetTargetSiteRequest.new # Call the get_target_site method. result = client.get_target_site request # The returned object is of type Google::Cloud::DiscoveryEngine::V1::TargetSite. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new SiteSearchEngineService client object.
- (config) — Configure the SiteSearchEngineService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new do |config| config.timeout = 10.0 end
#list_target_sites
def list_target_sites(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>
def list_target_sites(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>
Gets a list of {::Google::Cloud::DiscoveryEngine::V1::TargetSite TargetSite}s.
def list_target_sites(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>
list_target_sites
via a request object, either of type
ListTargetSitesRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>
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).
-
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::V1::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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::TargetSite>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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::V1::TargetSite. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::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, site_credential: nil) -> ::Gapic::Operation
Request on-demand recrawl for a list of URIs.
def recrawl_uris(request, options = nil) -> ::Gapic::Operation
recrawl_uris
via a request object, either of type
RecrawlUrisRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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, site_credential: nil) -> ::Gapic::Operation
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).
-
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
. -
site_credential (::String) — Optional. Full resource name of the [SiteCredential][], such as
projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*
. Only set to crawl private URIs.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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
- (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.
def update_target_site(request, options = nil) -> ::Gapic::Operation
update_target_site
via a request object, either of type
UpdateTargetSiteRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::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
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).
-
target_site (::Google::Cloud::DiscoveryEngine::V1::TargetSite, ::Hash) — Required. The target site to update.
If the caller does not have permission to update the
TargetSite, regardless of
whether or not it exists, a PERMISSION_DENIED error is returned.
If the TargetSite to update does not exist, a NOT_FOUND error is returned.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::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