Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySetService::Client.
Client for the SampleQuerySetService service.
Service for managing {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet SampleQuerySet}s,
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the SampleQuerySetService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SampleQuerySetService clients ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySetService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the SampleQuerySetService 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_sample_query_set
def create_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
def create_sample_query_set(parent: nil, sample_query_set: nil, sample_query_set_id: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
Creates a SampleQuerySet
def create_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
create_sample_query_set
via a request object, either of type
CreateSampleQuerySetRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::CreateSampleQuerySetRequest, ::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_sample_query_set(parent: nil, sample_query_set: nil, sample_query_set_id: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
create_sample_query_set
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 name, such as
projects/{project}/locations/{location}
. - sample_query_set (::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet, ::Hash) — Required. The SampleQuerySet to create.
-
sample_query_set_id (::String) — Required. The ID to use for the
SampleQuerySet, which
will become the final component of the
SampleQuerySet.name.
If the caller does not have permission to create the SampleQuerySet, regardless of whether or not it exists, a
PERMISSION_DENIED
error is returned.This field must be unique among all SampleQuerySets with the same parent. Otherwise, an
ALREADY_EXISTS
error is returned.This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an
INVALID_ARGUMENT
error is returned.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::SampleQuerySetService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::CreateSampleQuerySetRequest.new # Call the create_sample_query_set method. result = client.create_sample_query_set request # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet. p result
#delete_sample_query_set
def delete_sample_query_set(request, options = nil) -> ::Google::Protobuf::Empty
def delete_sample_query_set(name: nil) -> ::Google::Protobuf::Empty
Deletes a SampleQuerySet.
def delete_sample_query_set(request, options = nil) -> ::Google::Protobuf::Empty
delete_sample_query_set
via a request object, either of type
DeleteSampleQuerySetRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::DeleteSampleQuerySetRequest, ::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_sample_query_set(name: nil) -> ::Google::Protobuf::Empty
delete_sample_query_set
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
SampleQuerySet, such
as
projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}
.If the caller does not have permission to delete the SampleQuerySet, regardless of whether or not it exists, a
PERMISSION_DENIED
error is returned.If the SampleQuerySet to delete does not exist, a
NOT_FOUND
error is returned.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::SampleQuerySetService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::DeleteSampleQuerySetRequest.new # Call the delete_sample_query_set method. result = client.delete_sample_query_set request # The returned object is of type Google::Protobuf::Empty. p result
#get_sample_query_set
def get_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
def get_sample_query_set(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
Gets a SampleQuerySet.
def get_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
get_sample_query_set
via a request object, either of type
GetSampleQuerySetRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::GetSampleQuerySetRequest, ::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_sample_query_set(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
get_sample_query_set
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
SampleQuerySet, such
as
projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}
.If the caller does not have permission to access the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
If the requested SampleQuerySet does not exist, a NOT_FOUND error is returned.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::SampleQuerySetService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::GetSampleQuerySetRequest.new # Call the get_sample_query_set method. result = client.get_sample_query_set request # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new SampleQuerySetService client object.
- (config) — Configure the SampleQuerySetService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySetService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySetService::Client.new do |config| config.timeout = 10.0 end
#list_sample_query_sets
def list_sample_query_sets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet>
def list_sample_query_sets(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet>
Gets a list of {::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet SampleQuerySet}s.
def list_sample_query_sets(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet>
list_sample_query_sets
via a request object, either of type
ListSampleQuerySetsRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::ListSampleQuerySetsRequest, ::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_sample_query_sets(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet>
list_sample_query_sets
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 location resource name, such as
projects/{project}/locations/{location}
.If the caller does not have permission to list SampleQuerySets under this location, regardless of whether or not this location exists, a
PERMISSION_DENIED
error is returned. -
page_size (::Integer) — Maximum number of
SampleQuerySets to
return. If unspecified, defaults to 100. The maximum allowed 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
ListSampleQuerySetsResponse.next_page_token,
received from a previous
SampleQuerySetService.ListSampleQuerySets
call. Provide this to retrieve the subsequent page.
When paginating, all other parameters provided to SampleQuerySetService.ListSampleQuerySets must match the call that provided the page token. Otherwise, an
INVALID_ARGUMENT
error is returned.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet>)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::SampleQuerySetService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::ListSampleQuerySetsRequest.new # Call the list_sample_query_sets method. result = client.list_sample_query_sets 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::SampleQuerySet. 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)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_sample_query_set
def update_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
def update_sample_query_set(sample_query_set: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
Updates a SampleQuerySet.
def update_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
update_sample_query_set
via a request object, either of type
UpdateSampleQuerySetRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::UpdateSampleQuerySetRequest, ::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_sample_query_set(sample_query_set: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
update_sample_query_set
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).
-
sample_query_set (::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet, ::Hash) — Required. The sample query set to update.
If the caller does not have permission to update the SampleQuerySet, regardless of whether or not it exists, a
PERMISSION_DENIED
error is returned.If the SampleQuerySet to update does not exist a
NOT_FOUND
error is returned. - update_mask (::Google::Protobuf::FieldMask, ::Hash) — Indicates which fields in the provided imported 'sample query set' to update. If not set, will by default update all fields.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
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::SampleQuerySetService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::UpdateSampleQuerySetRequest.new # Call the update_sample_query_set method. result = client.update_sample_query_set request # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet. p result