# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::EngineService::Client (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.2 2.5.0 2.4.0 2.3.1 2.2.0 2.1.1 2.0.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.2 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::EngineService::Client.

Client for the EngineService service.


<br />

Service for managing [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)")
configuration.

## Inherits

- Object

## Includes

- [Google::Cloud::DiscoveryEngine::V1::EngineService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Paths)

## Methods

### .configure

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

Configure the EngineService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client-Configuration "Google::Cloud::DiscoveryEngine::V1::EngineService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all EngineService clients
::Google::Cloud::DiscoveryEngine::V1::EngineService::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

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

Configure the EngineService 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client#Google__Cloud__DiscoveryEngine__V1__EngineService__Client_configure_class_ "Google::Cloud::DiscoveryEngine::V1::EngineService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client-Configuration "Google::Cloud::DiscoveryEngine::V1::EngineService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client-Configuration))

### #create_engine

    def create_engine(request, options = nil) -> ::Gapic::Operation
    def create_engine(parent: nil, engine: nil, engine_id: nil) -> ::Gapic::Operation

Creates a [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)").
**Overloads**

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

Pass arguments to `create_engine` via a request object, either of type [CreateEngineRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CreateEngineRequest "Google::Cloud::DiscoveryEngine::V1::CreateEngineRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::DiscoveryEngine::V1::CreateEngineRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CreateEngineRequest), ::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_engine(parent: nil, engine: nil, engine_id: nil) -> ::Gapic::Operation

Pass arguments to `create_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). **Parameters**

- **parent** (::String) --- Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.
- **engine** ([::Google::Cloud::DiscoveryEngine::V1::Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine), ::Hash) --- Required. The [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)") to create.
- **engine_id** (::String) --- Required. The ID to use for the [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)"), which will become the final component of the [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)")'s resource name.


  This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
  standard with a length limit of 63 characters. Otherwise, an
  INVALID_ARGUMENT error is returned.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/discovery_engine/v1"

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

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

# Call the create_engine method.
result = client.create_engine 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_engine

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

Deletes a [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)").
**Overloads**

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

Pass arguments to `delete_engine` via a request object, either of type [DeleteEngineRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-DeleteEngineRequest "Google::Cloud::DiscoveryEngine::V1::DeleteEngineRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::DiscoveryEngine::V1::DeleteEngineRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-DeleteEngineRequest), ::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_engine(name: nil) -> ::Gapic::Operation

Pass arguments to `delete_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. Full resource name of [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)"), such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.


  If the caller does not have permission to delete the
  [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)"), regardless of whether or
  not it exists, a PERMISSION_DENIED error is returned.

  If the [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)") to delete does not
  exist, a NOT_FOUND error is returned.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/discovery_engine/v1"

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

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

# Call the delete_engine method.
result = client.delete_engine 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
```

### #get_engine

    def get_engine(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::Engine
    def get_engine(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1::Engine

Gets a [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)").
**Overloads**

    def get_engine(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::Engine

Pass arguments to `get_engine` via a request object, either of type [GetEngineRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GetEngineRequest "Google::Cloud::DiscoveryEngine::V1::GetEngineRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::DiscoveryEngine::V1::GetEngineRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-GetEngineRequest), ::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_engine(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1::Engine

Pass arguments to `get_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. Full resource name of [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)"), such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::DiscoveryEngine::V1::Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/discovery_engine/v1"

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

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

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1::Engine.
p result
```

### #initialize

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

Create a new EngineService client object.
**Yields**

- (config) --- Configure the EngineService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_engines

    def list_engines(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Engine>
    def list_engines(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Engine>

Lists all the {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}s associated
with the project.
**Overloads**

    def list_engines(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Engine>

Pass arguments to `list_engines` via a request object, either of type [ListEnginesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-ListEnginesRequest "Google::Cloud::DiscoveryEngine::V1::ListEnginesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::DiscoveryEngine::V1::ListEnginesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-ListEnginesRequest), ::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_engines(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Engine>

Pass arguments to `list_engines` 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}/collections/{collection_id}`.
- **page_size** (::Integer) --- Optional. Not supported.
- **page_token** (::String) --- Optional. Not supported.
- **filter** (::String) --- Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::DiscoveryEngine::V1::Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::DiscoveryEngine::V1::Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/discovery_engine/v1"

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

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

# Call the list_engines method.
result = client.list_engines 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::Engine.
  p item
end
```

### #location_client

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

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

- (Google::Cloud::Location::Locations::Client)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #operations_client

    def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1::EngineService::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::EngineService::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-EngineService-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_engine

    def update_engine(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::Engine
    def update_engine(engine: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1::Engine

Updates an [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)")
**Overloads**

    def update_engine(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::Engine

Pass arguments to `update_engine` via a request object, either of type [UpdateEngineRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UpdateEngineRequest "Google::Cloud::DiscoveryEngine::V1::UpdateEngineRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::DiscoveryEngine::V1::UpdateEngineRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UpdateEngineRequest), ::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_engine(engine: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1::Engine

Pass arguments to `update_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). **Parameters**

- **engine** ([::Google::Cloud::DiscoveryEngine::V1::Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine), ::Hash) --- Required. The [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)") to update.


  If the caller does not have permission to update the
  [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)"), regardless of whether or
  not it exists, a PERMISSION_DENIED error is returned.

  If the [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)") to update does not
  exist, a NOT_FOUND error is returned.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Indicates which fields in the provided [Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine "Google::Cloud::DiscoveryEngine::V1::Engine (class)") to update.


  If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
  is returned.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::DiscoveryEngine::V1::Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::Engine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-Engine))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/discovery_engine/v1"

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

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

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1::Engine.
p result
```