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

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

REST 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all SampleQuerySetService clients
::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySetService::Rest::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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#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

Overloads
def create_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
Pass arguments to create_sample_query_set via a request object, either of type CreateSampleQuerySetRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.

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::SampleQuerySetService::Rest::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.

Overloads
def delete_sample_query_set(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_sample_query_set via a request object, either of type DeleteSampleQuerySetRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameter
  • 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.

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::SampleQuerySetService::Rest::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
Overloads
def get_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
Pass arguments to get_sample_query_set via a request object, either of type GetSampleQuerySetRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameter
  • 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.

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::SampleQuerySetService::Rest::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 REST client object.

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

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

#list_sample_query_sets

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

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

Overloads
def list_sample_query_sets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet>
Pass arguments to list_sample_query_sets via a request object, either of type ListSampleQuerySetsRequest or an equivalent Hash.
Parameters
  • 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::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet>
Pass arguments to 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).
Parameters
  • 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.

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::SampleQuerySetService::Rest::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::Rest::Client

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

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

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (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.

Overloads
def update_sample_query_set(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::SampleQuerySet
Pass arguments to update_sample_query_set via a request object, either of type UpdateSampleQuerySetRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
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::SampleQuerySetService::Rest::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