# Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::VizierService::Rest::Client (v1.44.0)

1.43.0 (latest) 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.1 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.24.0 1.23.1 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.64.0 0.63.0 0.62.0 0.61.0 0.60.0 0.59.0 0.58.0 0.57.0 0.56.0 0.55.0 0.54.0 0.53.0 0.52.0 0.51.0 0.50.0 0.49.0 0.48.0 0.47.0 0.46.0 0.45.0 0.44.0 0.43.0 0.42.0 0.41.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.35.0 0.34.0 0.33.0 0.32.0 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::VizierService::Rest::Client.

REST client for the VizierService service.


Vertex AI Vizier API.

<br />

Vertex AI Vizier is a service to solve blackbox optimization problems,
such as tuning machine learning hyperparameters and searching over deep
learning architectures.

## Inherits

- Object

## Includes

- [Google::Cloud::AIPlatform::V1::VizierService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Paths)

## Methods

### .configure

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

Configure the VizierService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client-Configuration "Google::Cloud::AIPlatform::V1::VizierService::Rest::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-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client-Configuration))
**Example**

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

### #add_trial_measurement

    def add_trial_measurement(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
    def add_trial_measurement(trial_name: nil, measurement: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Adds a measurement of the objective metrics to a Trial. This measurement
is assumed to have been taken before the Trial is complete.
**Overloads**

    def add_trial_measurement(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial

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

- **request** ([::Google::Cloud::AIPlatform::V1::AddTrialMeasurementRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-AddTrialMeasurementRequest), ::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 add_trial_measurement(trial_name: nil, measurement: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Pass arguments to `add_trial_measurement` 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**

- **trial_name** (::String) --- Required. The name of the trial to add measurement. Format: `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
- **measurement** ([::Google::Cloud::AIPlatform::V1::Measurement](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Measurement), ::Hash) --- Required. The measurement to be added to a Trial.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
p result
```

### #check_trial_early_stopping_state

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

Checks whether a Trial should stop or not. Returns a
long-running operation. When the operation is successful,
it will contain a
[CheckTrialEarlyStoppingStateResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-CheckTrialEarlyStoppingStateResponse "Google::Cloud::AIPlatform::V1::CheckTrialEarlyStoppingStateResponse (class)").
**Overloads**

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

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

- **request** ([::Google::Cloud::AIPlatform::V1::CheckTrialEarlyStoppingStateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-CheckTrialEarlyStoppingStateRequest), ::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 check_trial_early_stopping_state(trial_name: nil) -> ::Gapic::Operation

Pass arguments to `check_trial_early_stopping_state` 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**

- **trial_name** (::String) --- Required. The Trial's name. Format: `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
**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

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

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

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

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

### #complete_trial

    def complete_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
    def complete_trial(name: nil, final_measurement: nil, trial_infeasible: nil, infeasible_reason: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Marks a Trial as complete.
**Overloads**

    def complete_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial

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

- **request** ([::Google::Cloud::AIPlatform::V1::CompleteTrialRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-CompleteTrialRequest), ::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 complete_trial(name: nil, final_measurement: nil, trial_infeasible: nil, infeasible_reason: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Pass arguments to `complete_trial` 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**

- **name** (::String) --- Required. The Trial's name. Format: `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
- **final_measurement** ([::Google::Cloud::AIPlatform::V1::Measurement](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Measurement), ::Hash) --- Optional. If provided, it will be used as the completed Trial's final_measurement; Otherwise, the service will auto-select a previously reported measurement as the final-measurement
- **trial_infeasible** (::Boolean) --- Optional. True if the Trial cannot be run with the given Parameter, and final_measurement will be ignored.
- **infeasible_reason** (::String) --- Optional. A human readable reason why the trial was infeasible. This should only be provided if `trial_infeasible` is true.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
p result
```

### #configure

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

Configure the VizierService 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-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client#Google__Cloud__AIPlatform__V1__VizierService__Rest__Client_configure_class_ "Google::Cloud::AIPlatform::V1::VizierService::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client-Configuration "Google::Cloud::AIPlatform::V1::VizierService::Rest::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-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client-Configuration))

### #create_study

    def create_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
    def create_study(parent: nil, study: nil) -> ::Google::Cloud::AIPlatform::V1::Study

Creates a Study. A resource name will be generated after creation of the
Study.
**Overloads**

    def create_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study

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

- **request** ([::Google::Cloud::AIPlatform::V1::CreateStudyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-CreateStudyRequest), ::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_study(parent: nil, study: nil) -> ::Google::Cloud::AIPlatform::V1::Study

Pass arguments to `create_study` 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 resource name of the Location to create the CustomJob in. Format: `projects/{project}/locations/{location}`
- **study** ([::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study), ::Hash) --- Required. The Study configuration used to create the Study.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::Study.
p result
```

### #create_trial

    def create_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
    def create_trial(parent: nil, trial: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Adds a user provided Trial to a Study.
**Overloads**

    def create_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial

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

- **request** ([::Google::Cloud::AIPlatform::V1::CreateTrialRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-CreateTrialRequest), ::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_trial(parent: nil, trial: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Pass arguments to `create_trial` 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 resource name of the Study to create the Trial in. Format: `projects/{project}/locations/{location}/studies/{study}`
- **trial** ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial), ::Hash) --- Required. The Trial to create.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
p result
```

### #delete_study

    def delete_study(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_study(name: nil) -> ::Google::Protobuf::Empty

Deletes a Study.
**Overloads**

    def delete_study(request, options = nil) -> ::Google::Protobuf::Empty

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

- **request** ([::Google::Cloud::AIPlatform::V1::DeleteStudyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-DeleteStudyRequest), ::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_study(name: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_study` 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. The name of the Study resource to be deleted. Format: `projects/{project}/locations/{location}/studies/{study}`
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-Empty))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-Empty))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #delete_trial

    def delete_trial(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_trial(name: nil) -> ::Google::Protobuf::Empty

Deletes a Trial.
**Overloads**

    def delete_trial(request, options = nil) -> ::Google::Protobuf::Empty

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

- **request** ([::Google::Cloud::AIPlatform::V1::DeleteTrialRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-DeleteTrialRequest), ::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_trial(name: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_trial` 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. The Trial's name. Format: `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-Empty))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Protobuf-Empty))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #get_study

    def get_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
    def get_study(name: nil) -> ::Google::Cloud::AIPlatform::V1::Study

Gets a Study by name.
**Overloads**

    def get_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study

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

- **request** ([::Google::Cloud::AIPlatform::V1::GetStudyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-GetStudyRequest), ::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_study(name: nil) -> ::Google::Cloud::AIPlatform::V1::Study

Pass arguments to `get_study` 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. The name of the Study resource. Format: `projects/{project}/locations/{location}/studies/{study}`
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::Study.
p result
```

### #get_trial

    def get_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
    def get_trial(name: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Gets a Trial.
**Overloads**

    def get_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial

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

- **request** ([::Google::Cloud::AIPlatform::V1::GetTrialRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-GetTrialRequest), ::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_trial(name: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Pass arguments to `get_trial` 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. The name of the Trial resource. Format: `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
p result
```

### #iam_policy_client

    def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client

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

- (Google::Iam::V1::IAMPolicy::Rest::Client)

### #initialize

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

Create a new VizierService REST client object.
**Yields**

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::AIPlatform::V1::VizierService::Rest::Client.new

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

### #list_optimal_trials

    def list_optimal_trials(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse
    def list_optimal_trials(parent: nil) -> ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse

Lists the pareto-optimal Trials for multi-objective Study or the
optimal Trials for single-objective Study. The definition of
pareto-optimal can be checked in wiki page.
<https://en.wikipedia.org/wiki/Pareto_efficiency>
**Overloads**

    def list_optimal_trials(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse

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

- **request** ([::Google::Cloud::AIPlatform::V1::ListOptimalTrialsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListOptimalTrialsRequest), ::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_optimal_trials(parent: nil) -> ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse

Pass arguments to `list_optimal_trials` 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 name of the Study that the optimal Trial belongs to.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListOptimalTrialsResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListOptimalTrialsResponse))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse.
p result
```

### #list_studies

    def list_studies(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>
    def list_studies(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>

Lists all the studies in a region for an associated project.
**Overloads**

    def list_studies(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>

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

- **request** ([::Google::Cloud::AIPlatform::V1::ListStudiesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListStudiesRequest), ::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_studies(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>

Pass arguments to `list_studies` 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 resource name of the Location to list the Study from. Format: `projects/{project}/locations/{location}`
- **page_token** (::String) --- Optional. A page token to request the next page of results. If unspecified, there are no subsequent pages.
- **page_size** (::Integer) --- Optional. The maximum number of studies to return per "page" of results. If unspecified, service will pick an appropriate default.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study)\>)
**Raises**

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

Basic example

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

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

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

# Call the list_studies method.
result = client.list_studies 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::AIPlatform::V1::Study.
  p item
end
```

### #list_trials

    def list_trials(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>
    def list_trials(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>

Lists the Trials associated with a Study.
**Overloads**

    def list_trials(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>

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

- **request** ([::Google::Cloud::AIPlatform::V1::ListTrialsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ListTrialsRequest), ::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_trials(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>

Pass arguments to `list_trials` 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 resource name of the Study to list the Trial from. Format: `projects/{project}/locations/{location}/studies/{study}`
- **page_token** (::String) --- Optional. A page token to request the next page of results. If unspecified, there are no subsequent pages.
- **page_size** (::Integer) --- Optional. The number of Trials to retrieve per "page" of results. If unspecified, the service will pick an appropriate default.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial)\>)
**Raises**

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

Basic example

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

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

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

# Call the list_trials method.
result = client.list_trials 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::AIPlatform::V1::Trial.
  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)

### #logger

    def logger() -> Logger

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

- (Logger)

### #lookup_study

    def lookup_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study
    def lookup_study(parent: nil, display_name: nil) -> ::Google::Cloud::AIPlatform::V1::Study

Looks a study up using the user-defined display_name field instead of the
fully qualified resource name.
**Overloads**

    def lookup_study(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Study

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

- **request** ([::Google::Cloud::AIPlatform::V1::LookupStudyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-LookupStudyRequest), ::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 lookup_study(parent: nil, display_name: nil) -> ::Google::Cloud::AIPlatform::V1::Study

Pass arguments to `lookup_study` 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 resource name of the Location to get the Study from. Format: `projects/{project}/locations/{location}`
- **display_name** (::String) --- Required. The user-defined display name of the Study
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Study](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Study))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::Study.
p result
```

### #operations_client

    def operations_client() -> ::Google::Cloud::AIPlatform::V1::VizierService::Rest::Operations

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

- ([::Google::Cloud::AIPlatform::V1::VizierService::Rest::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VizierService-Rest-Operations))

### #stop_trial

    def stop_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial
    def stop_trial(name: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Stops a Trial.
**Overloads**

    def stop_trial(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Trial

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

- **request** ([::Google::Cloud::AIPlatform::V1::StopTrialRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-StopTrialRequest), ::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 stop_trial(name: nil) -> ::Google::Cloud::AIPlatform::V1::Trial

Pass arguments to `stop_trial` 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. The Trial's name. Format: `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::AIPlatform::V1::Trial](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-Trial))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
p result
```

### #suggest_trials

    def suggest_trials(request, options = nil) -> ::Gapic::Operation
    def suggest_trials(parent: nil, suggestion_count: nil, client_id: nil, contexts: nil) -> ::Gapic::Operation

Adds one or more Trials to a Study, with parameter values
suggested by Vertex AI Vizier. Returns a long-running
operation associated with the generation of Trial suggestions.
When this long-running operation succeeds, it will contain
a
[SuggestTrialsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-SuggestTrialsResponse "Google::Cloud::AIPlatform::V1::SuggestTrialsResponse (class)").
**Overloads**

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

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

- **request** ([::Google::Cloud::AIPlatform::V1::SuggestTrialsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-SuggestTrialsRequest), ::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 suggest_trials(parent: nil, suggestion_count: nil, client_id: nil, contexts: nil) -> ::Gapic::Operation

Pass arguments to `suggest_trials` 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 project and location that the Study belongs to. Format: `projects/{project}/locations/{location}/studies/{study}`
- **suggestion_count** (::Integer) --- Required. The number of suggestions requested. It must be positive.
- **client_id** (::String) --- Required. The identifier of the client that is requesting the suggestion.


  If multiple SuggestTrialsRequests have the same `client_id`,
  the service will return the identical suggested Trial if the Trial is
  pending, and provide a new Trial if the last suggested Trial was completed.
- **contexts** (::Array\<[::Google::Cloud::AIPlatform::V1::TrialContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-TrialContext), ::Hash\>) --- Optional. This allows you to specify the "context" for a Trial; a context is a slice (a subspace) of the search space.


  Typical uses for contexts:
  1) You are using Vizier to tune a server for best performance, but there's
  a strong weekly cycle. The context specifies the day-of-week.
  This allows Tuesday to generalize from Wednesday without assuming that
  everything is identical.
  2) Imagine you're optimizing some medical treatment for people.
  As they walk in the door, you know certain facts about them
  (e.g. sex, weight, height, blood-pressure). Put that information in the
  context, and Vizier will adapt its suggestions to the patient.
  3) You want to do a fair A/B test efficiently. Specify the "A" and "B"
  conditions as contexts, and Vizier will generalize between "A" and "B"
  conditions. If they are similar, this will allow Vizier to converge
  to the optimum faster than if "A" and "B" were separate Studies.
  NOTE: You can also enter contexts as REQUESTED Trials, e.g. via the
  CreateTrial() RPC; that's the asynchronous option where you don't need a
  close association between contexts and suggestions.

  NOTE: All the Parameters you set in a context MUST be defined in the
  Study.
  NOTE: You must supply 0 or $suggestion_count contexts.
  If you don't supply any contexts, Vizier will make suggestions
  from the full search space specified in the StudySpec; if you supply
  a full set of context, each suggestion will match the corresponding
  context.
  NOTE: A Context with no features set matches anything, and allows
  suggestions from the full search space.
  NOTE: Contexts MUST lie within the search space specified in the
  StudySpec. It's an error if they don't.
  NOTE: Contexts preferentially match ACTIVE then REQUESTED trials before
  new suggestions are generated.
  NOTE: Generation of suggestions involves a match between a Context and
  (optionally) a REQUESTED trial; if that match is not fully specified, a
  suggestion will be geneated in the merged subspace.
**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

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

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

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

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