# Cloud Profiler V2 API - Class Google::Cloud::Profiler::V2::ExportService::Rest::Client (v1.7.0)

1.7.0 (latest) 1.6.1 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.10.1 0.9.2 0.8.0 0.7.0 0.6.1 0.5.0 0.4.0 0.3.0 0.2.5 Reference documentation and code samples for the Cloud Profiler V2 API class Google::Cloud::Profiler::V2::ExportService::Rest::Client.

REST client for the ExportService service.


<br />

Service allows existing Cloud Profiler customers to export their profile data
out of Google Cloud.

## Inherits

- Object

## Includes

- [Google::Cloud::Profiler::V2::ExportService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Paths)

## Methods

### .configure

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

Configure the ExportService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client-Configuration "Google::Cloud::Profiler::V2::ExportService::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-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all ExportService clients
::Google::Cloud::Profiler::V2::ExportService::Rest::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

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

Configure the ExportService 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-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client#Google__Cloud__Profiler__V2__ExportService__Rest__Client_configure_class_ "Google::Cloud::Profiler::V2::ExportService::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client-Configuration "Google::Cloud::Profiler::V2::ExportService::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-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client-Configuration))

### #initialize

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

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

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ExportService-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Profiler::V2::ExportService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Profiler::V2::ExportService::Rest::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_profiles

    def list_profiles(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Profiler::V2::Profile>
    def list_profiles(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Profiler::V2::Profile>

Lists profiles which have been collected so far and for which the caller
has permission to view.
**Overloads**

    def list_profiles(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Profiler::V2::Profile>

Pass arguments to `list_profiles` via a request object, either of type [ListProfilesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ListProfilesRequest "Google::Cloud::Profiler::V2::ListProfilesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Profiler::V2::ListProfilesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-ListProfilesRequest), ::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_profiles(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Profiler::V2::Profile>

Pass arguments to `list_profiles` 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, which owns this collection of profiles. Format: projects/{user_project_id}
- **page_size** (::Integer) --- The maximum number of items to return. Default page_size is 1000. Max limit is 1000.
- **page_token** (::String) --- The token to continue pagination and get profiles from a particular page. When paginating, all other parameters provided to `ListProfiles` must match the call that provided the page token.
**Yields**

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

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Profiler::V2::Profile](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-Profile)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Profiler::V2::Profile](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-profiler-v2/latest/Google-Cloud-Profiler-V2-Profile)\>)
**Raises**

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

Basic example

```ruby
require "google/cloud/profiler/v2"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Profiler::V2::ExportService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Profiler::V2::ListProfilesRequest.new

# Call the list_profiles method.
result = client.list_profiles 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::Profiler::V2::Profile.
  p item
end
```

### #logger

    def logger() -> Logger

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

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)