# Private Catalog V1beta1 API - Class Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Rest::Client (v0.15.0)

0.15.0 (latest) 0.14.1 0.13.0 0.12.1 0.11.0 0.10.0 0.9.1 0.8.1 0.7.1 0.6.2 0.5.0 0.4.1 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Private Catalog V1beta1 API class Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Rest::Client.

REST client for the PrivateCatalog service.


`PrivateCatalog` allows catalog consumers to retrieve `Catalog`, `Product`
and `Version` resources under a target resource context.

`Catalog` is computed based on the \[Association\]\[\]s linked to the target
resource and its ancestors. Each association's
\[google.cloud.privatecatalogproducer.v1beta.Catalog\]\[\] is transformed into a
`Catalog`. If multiple associations have the same parent
\[google.cloud.privatecatalogproducer.v1beta.Catalog\]\[\], they are
de-duplicated into one `Catalog`. Users must have
`cloudprivatecatalog.catalogTargets.get` IAM permission on the resource
context in order to access catalogs. `Catalog` contains the resource name and
a subset of data of the original
\[google.cloud.privatecatalogproducer.v1beta.Catalog\]\[\].

`Product` is child resource of the catalog. A `Product` contains the resource
name and a subset of the data of the original
\[google.cloud.privatecatalogproducer.v1beta.Product\]\[\].

<br />

`Version` is child resource of the product. A `Version` contains the resource
name and a subset of the data of the original
\[google.cloud.privatecatalogproducer.v1beta.Version\]\[\].

## Inherits

- Object

## Methods

### .configure

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

Configure the PrivateCatalog Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client-Configuration "Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::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-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client-Configuration))
**Example**

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

### #configure

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

Configure the PrivateCatalog 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-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client#Google__Cloud__PrivateCatalog__V1beta1__PrivateCatalog__Rest__Client_configure_class_ "Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client-Configuration "Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::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-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client-Configuration))

### #initialize

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

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

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-PrivateCatalog-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::PrivateCatalog::V1beta1::PrivateCatalog::Rest::Client.new

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

### #logger

    def logger() -> Logger

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

- (Logger)

### #search_catalogs

    def search_catalogs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>
    def search_catalogs(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>

Search [Catalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Catalog "Google::Cloud::PrivateCatalog::V1beta1::Catalog (class)") resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.
**Overloads**

    def search_catalogs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>

Pass arguments to `search_catalogs` via a request object, either of type [SearchCatalogsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-SearchCatalogsRequest "Google::Cloud::PrivateCatalog::V1beta1::SearchCatalogsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PrivateCatalog::V1beta1::SearchCatalogsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-SearchCatalogsRequest), ::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 search_catalogs(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Catalog>

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

- **resource** (::String) ---

  Required. The name of the resource context. It can be in following formats:
  - `projects/{project}`
  - `folders/{folder}`
  - `organizations/{organization}`
- **query** (::String) ---

  The query to filter the catalogs. The supported queries are:
  - Get a single catalog: `name=catalogs/{catalog}`
- **page_size** (::Integer) --- The maximum number of entries that are requested.
- **page_token** (::String) --- A pagination token returned from a previous call to SearchCatalogs that indicates where this listing should continue from.
**Yields**

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

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::PrivateCatalog::V1beta1::Catalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Catalog)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::PrivateCatalog::V1beta1::Catalog](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Catalog)\>)
**Raises**

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

Basic example

```ruby
require "google/cloud/private_catalog/v1beta1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PrivateCatalog::V1beta1::SearchCatalogsRequest.new

# Call the search_catalogs method.
result = client.search_catalogs 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::PrivateCatalog::V1beta1::Catalog.
  p item
end
```

### #search_products

    def search_products(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>
    def search_products(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>

Search [Product](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Product "Google::Cloud::PrivateCatalog::V1beta1::Product (class)") resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.
**Overloads**

    def search_products(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>

Pass arguments to `search_products` via a request object, either of type [SearchProductsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-SearchProductsRequest "Google::Cloud::PrivateCatalog::V1beta1::SearchProductsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PrivateCatalog::V1beta1::SearchProductsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-SearchProductsRequest), ::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 search_products(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Product>

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

- **resource** (::String) --- Required. The name of the resource context. See [SearchCatalogsRequest.resource](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-SearchCatalogsRequest#Google__Cloud__PrivateCatalog__V1beta1__SearchCatalogsRequest_resource_instance_ "Google::Cloud::PrivateCatalog::V1beta1::SearchCatalogsRequest#resource (method)") for details.
- **query** (::String) ---

  The query to filter the products.

  The supported queries are:
  - List products of all catalogs: empty
  - List products under a catalog: `parent=catalogs/{catalog}`
  - Get a product by name: `name=catalogs/{catalog}/products/{product}`
- **page_size** (::Integer) --- The maximum number of entries that are requested.
- **page_token** (::String) --- A pagination token returned from a previous call to SearchProducts that indicates where this listing should continue from.
**Yields**

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

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::PrivateCatalog::V1beta1::Product](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Product)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::PrivateCatalog::V1beta1::Product](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Product)\>)
**Raises**

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

Basic example

```ruby
require "google/cloud/private_catalog/v1beta1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PrivateCatalog::V1beta1::SearchProductsRequest.new

# Call the search_products method.
result = client.search_products 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::PrivateCatalog::V1beta1::Product.
  p item
end
```

### #search_versions

    def search_versions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>
    def search_versions(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>

Search [Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Version "Google::Cloud::PrivateCatalog::V1beta1::Version (class)") resources that consumers have access to, within the
scope of the consumer cloud resource hierarchy context.
**Overloads**

    def search_versions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>

Pass arguments to `search_versions` via a request object, either of type [SearchVersionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-SearchVersionsRequest "Google::Cloud::PrivateCatalog::V1beta1::SearchVersionsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PrivateCatalog::V1beta1::SearchVersionsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-SearchVersionsRequest), ::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 search_versions(resource: nil, query: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::PrivateCatalog::V1beta1::Version>

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

- **resource** (::String) --- Required. The name of the resource context. See [SearchCatalogsRequest.resource](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-SearchCatalogsRequest#Google__Cloud__PrivateCatalog__V1beta1__SearchCatalogsRequest_resource_instance_ "Google::Cloud::PrivateCatalog::V1beta1::SearchCatalogsRequest#resource (method)") for details.
- **query** (::String) ---

  Required. The query to filter the versions.

  The supported queries are:
  - List versions under a product: `parent=catalogs/{catalog}/products/{product}`
  - Get a version by name: `name=catalogs/{catalog}/products/{product}/versions/{version}`
- **page_size** (::Integer) --- The maximum number of entries that are requested.
- **page_token** (::String) --- A pagination token returned from a previous call to SearchVersions that indicates where this listing should continue from.
**Yields**

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

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::PrivateCatalog::V1beta1::Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Version)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::PrivateCatalog::V1beta1::Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-private_catalog-v1beta1/latest/Google-Cloud-PrivateCatalog-V1beta1-Version)\>)
**Raises**

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

Basic example

```ruby
require "google/cloud/private_catalog/v1beta1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PrivateCatalog::V1beta1::SearchVersionsRequest.new

# Call the search_versions method.
result = client.search_versions 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::PrivateCatalog::V1beta1::Version.
  p item
end
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)