# Cloud Gaming V1 API - Class Google::Cloud::Gaming::V1::RealmsService::Rest::ServiceStub (v0.7.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.7.0 (latest)](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-RealmsService-Rest-ServiceStub)
- [0.6.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.6.0/Google-Cloud-Gaming-V1-RealmsService-Rest-ServiceStub)
- [0.5.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.5.0/Google-Cloud-Gaming-V1-RealmsService-Rest-ServiceStub)
- [0.4.4](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.4.4/Google-Cloud-Gaming-V1-RealmsService-Rest-ServiceStub)
Reference documentation and code samples for the Cloud Gaming V1 API class Google::Cloud::Gaming::V1::RealmsService::Rest::ServiceStub.

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

## Inherits

- Object

## Methods

### #create_realm

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

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

- **request_pb** ([::Google::Cloud::Gaming::V1::CreateRealmRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-CreateRealmRequest)) --- 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-gaming-v1/latest/Google-Longrunning-Operation))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

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

- (::ArgumentError)

### #delete_realm

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

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

- **request_pb** ([::Google::Cloud::Gaming::V1::DeleteRealmRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-DeleteRealmRequest)) --- 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-gaming-v1/latest/Google-Longrunning-Operation))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

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

- (::ArgumentError)

### #get_realm

    def get_realm(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Gaming::V1::Realm

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

- **request_pb** ([::Google::Cloud::Gaming::V1::GetRealmRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GetRealmRequest)) --- 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::Gaming::V1::Realm](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-Realm))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Gaming::V1::Realm](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-Realm)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #initialize

    def initialize(endpoint:, credentials:) -> ServiceStub

**Returns**

- ([ServiceStub](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-RealmsService-Rest-ServiceStub)) --- a new instance of ServiceStub

### #list_realms

    def list_realms(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Gaming::V1::ListRealmsResponse

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

- **request_pb** ([::Google::Cloud::Gaming::V1::ListRealmsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-ListRealmsRequest)) --- 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::Gaming::V1::ListRealmsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-ListRealmsResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Gaming::V1::ListRealmsResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-ListRealmsResponse)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #preview_realm_update

    def preview_realm_update(request_pb, options = nil) { |result, operation| ... } -> ::Google::Cloud::Gaming::V1::PreviewRealmUpdateResponse

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

- **request_pb** ([::Google::Cloud::Gaming::V1::PreviewRealmUpdateRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewRealmUpdateRequest)) --- 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::Gaming::V1::PreviewRealmUpdateResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewRealmUpdateResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Gaming::V1::PreviewRealmUpdateResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewRealmUpdateResponse)) --- A result object deserialized from the server's reply
**Raises**

- (::ArgumentError)

### #update_realm

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

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

- **request_pb** ([::Google::Cloud::Gaming::V1::UpdateRealmRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-UpdateRealmRequest)) --- 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-gaming-v1/latest/Google-Longrunning-Operation))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

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

- (::ArgumentError)