# Capacity Planner V1BETA API - Class Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub (v0.5.0)

0.5.0 (latest) 0.4.0 0.3.1 0.2.0 0.1.0 Reference documentation and code samples for the Capacity Planner V1BETA API class Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.

REST service stub for the UsageService service.
Service stub contains baseline method implementations
including transcoding, making the REST call, and deserialing the response.

## Inherits

- Object

## Methods

### #endpoint

    def endpoint() -> String

The effective endpoint
**Returns**

- (String)

### #export_forecasts

    def export_forecasts(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the export_forecasts REST call
**Parameters**

- **request_pb** ([::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-ExportForecastsRequest)) --- A request object representing the call parameters. Required.
- **options** (::Gapic::CallOptions) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
**Yields**

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

- **result** ([::Google::Longrunning::Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Longrunning-Operation))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Longrunning::Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Longrunning-Operation)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #export_reservations_usage

    def export_reservations_usage(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the export_reservations_usage REST call
**Parameters**

- **request_pb** ([::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-ExportReservationsUsageRequest)) --- A request object representing the call parameters. Required.
- **options** (::Gapic::CallOptions) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
**Yields**

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

- **result** ([::Google::Longrunning::Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Longrunning-Operation))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Longrunning::Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Longrunning-Operation)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #export_usage_histories

    def export_usage_histories(request_pb, options = nil) { |result, operation| ... } -> ::Google::Longrunning::Operation

Baseline implementation for the export_usage_histories REST call
**Parameters**

- **request_pb** ([::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-ExportUsageHistoriesRequest)) --- A request object representing the call parameters. Required.
- **options** (::Gapic::CallOptions) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
**Yields**

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

- **result** ([::Google::Longrunning::Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Longrunning-Operation))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Longrunning::Operation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Longrunning-Operation)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #logger

    def logger(stub: false) -> Logger

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

- (Logger)

### #query_forecasts

    def query_forecasts(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse

Baseline implementation for the query_forecasts REST call
**Parameters**

- **request_pb** ([::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryForecastsRequest)) --- A request object representing the call parameters. Required.
- **options** (::Gapic::CallOptions) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
**Yields**

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

- **result** ([::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryForecastsResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryForecastsResponse)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #query_reservations

    def query_reservations(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse

Baseline implementation for the query_reservations REST call
**Parameters**

- **request_pb** ([::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryReservationsRequest)) --- A request object representing the call parameters. Required.
- **options** (::Gapic::CallOptions) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
**Yields**

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

- **result** ([::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryReservationsResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryReservationsResponse)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #query_usage_histories

    def query_usage_histories(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse

Baseline implementation for the query_usage_histories REST call
**Parameters**

- **request_pb** ([::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryUsageHistoriesRequest)) --- A request object representing the call parameters. Required.
- **options** (::Gapic::CallOptions) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
**Yields**

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

- **result** ([::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryUsageHistoriesResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest/Google-Cloud-CapacityPlanner-V1beta-QueryUsageHistoriesResponse)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)