1.1.0 (latest) 1.0.0 0.6.0 0.5.0 0.4.0 0.3.1 0.2.0 0.1.0 Reference documentation and code samples for the License Manager V1 API class Google::Cloud::LicenseManager::V1::LicenseManager::Rest::Client.

REST client for the LicenseManager service.


<br />

Service describing handlers for resources

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the LicenseManager Client class.


<br />

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

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

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

### #aggregate_usage

    def aggregate_usage(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>
    def aggregate_usage(name: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, start_time: nil, end_time: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>

Aggregates Usage per Instance for a Configuration.
**Overloads**

    def aggregate_usage(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>

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

- **request** ([::Google::Cloud::LicenseManager::V1::AggregateUsageRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-AggregateUsageRequest), ::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 aggregate_usage(name: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, start_time: nil, end_time: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>

Pass arguments to `aggregate_usage` 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. Parent value for AggregateUsageRequest
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results
- **order_by** (::String) --- Optional. Hint for how to order the results
- **start_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Required. Licenses are purchased per month - so usage track needs start time of a month.
- **end_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Required. Usage track is always for a month. This parameter is for the end time of the month.
**Yields**

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

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

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

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

Basic example

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

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

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

# Call the aggregate_usage method.
result = client.aggregate_usage 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::LicenseManager::V1::Usage.
  p item
end
```

### #configure

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

Configure the LicenseManager 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-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-LicenseManager-Rest-Client#Google__Cloud__LicenseManager__V1__LicenseManager__Rest__Client_configure_class_ "Google::Cloud::LicenseManager::V1::LicenseManager::Rest::Client.configure (method)").

<br />

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

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

### #create_configuration

    def create_configuration(request, options = nil) -> ::Gapic::Operation
    def create_configuration(parent: nil, configuration_id: nil, configuration: nil, request_id: nil) -> ::Gapic::Operation

Creates a new Configuration in a given project and location.
**Overloads**

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

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

- **request** ([::Google::Cloud::LicenseManager::V1::CreateConfigurationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-CreateConfigurationRequest), ::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_configuration(parent: nil, configuration_id: nil, configuration: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_configuration` 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. Value for parent.
- **configuration_id** (::String) --- Required. Id of the requesting object
- **configuration** ([::Google::Cloud::LicenseManager::V1::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-Configuration), ::Hash) --- Required. The resource being created
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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/license_manager/v1"

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

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

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

### #deactivate_configuration

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

Deactivates the given configuration.
**Overloads**

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

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

- **request** ([::Google::Cloud::LicenseManager::V1::DeactivateConfigurationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-DeactivateConfigurationRequest), ::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 deactivate_configuration(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `deactivate_configuration` 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. Name of the resource.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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/license_manager/v1"

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

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

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

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

Deletes a single Configuration.
**Overloads**

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

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

- **request** ([::Google::Cloud::LicenseManager::V1::DeleteConfigurationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-DeleteConfigurationRequest), ::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_configuration(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_configuration` 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. Name of the resource
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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/license_manager/v1"

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

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

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

    def get_configuration(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Configuration
    def get_configuration(name: nil) -> ::Google::Cloud::LicenseManager::V1::Configuration

Gets details of a single Configuration.
**Overloads**

    def get_configuration(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Configuration

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

- **request** ([::Google::Cloud::LicenseManager::V1::GetConfigurationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-GetConfigurationRequest), ::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_configuration(name: nil) -> ::Google::Cloud::LicenseManager::V1::Configuration

Pass arguments to `get_configuration` 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. Name of the resource
**Yields**

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

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

- ([::Google::Cloud::LicenseManager::V1::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-Configuration))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::LicenseManager::V1::Configuration.
p result
```

### #get_instance

    def get_instance(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Instance
    def get_instance(name: nil) -> ::Google::Cloud::LicenseManager::V1::Instance

Gets details of a single Instance.
**Overloads**

    def get_instance(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Instance

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

- **request** ([::Google::Cloud::LicenseManager::V1::GetInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-GetInstanceRequest), ::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_instance(name: nil) -> ::Google::Cloud::LicenseManager::V1::Instance

Pass arguments to `get_instance` 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. Name of the resource
**Yields**

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

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

- ([::Google::Cloud::LicenseManager::V1::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-Instance))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::LicenseManager::V1::Instance.
p result
```

### #get_product

    def get_product(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Product
    def get_product(name: nil) -> ::Google::Cloud::LicenseManager::V1::Product

Gets details of a single Product.
**Overloads**

    def get_product(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Product

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

- **request** ([::Google::Cloud::LicenseManager::V1::GetProductRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-GetProductRequest), ::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_product(name: nil) -> ::Google::Cloud::LicenseManager::V1::Product

Pass arguments to `get_product` 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. Name of the resource
**Yields**

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

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

- ([::Google::Cloud::LicenseManager::V1::Product](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-Product))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::LicenseManager::V1::Product.
p result
```

### #initialize

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

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

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

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

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

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

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

### #list_configurations

    def list_configurations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>
    def list_configurations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>

Lists Configurations in a given project and location.
**Overloads**

    def list_configurations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>

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

- **request** ([::Google::Cloud::LicenseManager::V1::ListConfigurationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-ListConfigurationsRequest), ::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_configurations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>

Pass arguments to `list_configurations` 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. Parent value for ListConfigurationsRequest
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results
- **order_by** (::String) --- Optional. Hint for how to order the results
**Yields**

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

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

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

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

Basic example

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

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

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

# Call the list_configurations method.
result = client.list_configurations 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::LicenseManager::V1::Configuration.
  p item
end
```

### #list_instances

    def list_instances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>
    def list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>

Lists Instances in a given project and location.
**Overloads**

    def list_instances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>

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

- **request** ([::Google::Cloud::LicenseManager::V1::ListInstancesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-ListInstancesRequest), ::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_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>

Pass arguments to `list_instances` 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. Parent value for ListInstancesRequest
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results
- **order_by** (::String) --- Optional. Hint for how to order the results
**Yields**

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

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

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

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

Basic example

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

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

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

# Call the list_instances method.
result = client.list_instances 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::LicenseManager::V1::Instance.
  p item
end
```

### #list_products

    def list_products(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>
    def list_products(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>

Lists Products in a given project and location.
**Overloads**

    def list_products(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>

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

- **request** ([::Google::Cloud::LicenseManager::V1::ListProductsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-ListProductsRequest), ::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_products(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>

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

- **parent** (::String) --- Required. Parent value for ListProductsRequest
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results
- **order_by** (::String) --- Optional. Hint for how to order the results
**Yields**

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

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

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

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

Basic example

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

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

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

# Call the list_products method.
result = client.list_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::LicenseManager::V1::Product.
  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)

### #operations_client

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

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

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

### #query_configuration_license_usage

    def query_configuration_license_usage(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse
    def query_configuration_license_usage(name: nil, start_time: nil, end_time: nil) -> ::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse

License Usage information for a Configuration.
**Overloads**

    def query_configuration_license_usage(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse

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

- **request** ([::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-QueryConfigurationLicenseUsageRequest), ::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 query_configuration_license_usage(name: nil, start_time: nil, end_time: nil) -> ::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse

Pass arguments to `query_configuration_license_usage` 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 resource path of the Configuration.
- **start_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Required. The start time for retrieving the usage. If not specified, we will use the first day of the current billing period.
- **end_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Required. The end time for retrieving the usage. If not specified, we will use the last day of the current billing period.
**Yields**

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

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

- ([::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-QueryConfigurationLicenseUsageResponse))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse.
p result
```

### #reactivate_configuration

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

Reactivates the given configuration.
**Overloads**

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

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

- **request** ([::Google::Cloud::LicenseManager::V1::ReactivateConfigurationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-ReactivateConfigurationRequest), ::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 reactivate_configuration(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `reactivate_configuration` 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. Name of the resource.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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/license_manager/v1"

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

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

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

### #update_configuration

    def update_configuration(request, options = nil) -> ::Gapic::Operation
    def update_configuration(update_mask: nil, configuration: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single Configuration.
**Overloads**

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

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

- **request** ([::Google::Cloud::LicenseManager::V1::UpdateConfigurationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-UpdateConfigurationRequest), ::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_configuration(update_mask: nil, configuration: nil, request_id: nil) -> ::Gapic::Operation

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

- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. Field mask is used to specify the fields to be overwritten in the Configuration resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- **configuration** ([::Google::Cloud::LicenseManager::V1::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-license_manager-v1/latest/Google-Cloud-LicenseManager-V1-Configuration), ::Hash) --- Required. The resource being updated
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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/license_manager/v1"

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

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

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