Cloud Gaming V1 API - Class Google::Cloud::Gaming::V1::RealmsService::Rest::Client (v0.6.0)

Reference documentation and code samples for the Cloud Gaming V1 API class Google::Cloud::Gaming::V1::RealmsService::Rest::Client.

REST client for the RealmsService service.

A realm is a grouping of game server clusters that are considered interchangeable.

Inherits

  • Object

Methods

.configure

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

Configure the RealmsService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all RealmsService clients
::Google::Cloud::Gaming::V1::RealmsService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the RealmsService 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.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_realm

def create_realm(request, options = nil) -> ::Gapic::Operation
def create_realm(parent: nil, realm_id: nil, realm: nil) -> ::Gapic::Operation

Creates a new realm in a given project and location.

Overloads
def create_realm(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_realm via a request object, either of type CreateRealmRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Gaming::V1::CreateRealmRequest, ::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_realm(parent: nil, realm_id: nil, realm: nil) -> ::Gapic::Operation
Pass arguments to create_realm 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 resource name, in the following form: projects/{project}/locations/{location}.
  • realm_id (::String) — Required. The ID of the realm resource to be created.
  • realm (::Google::Cloud::Gaming::V1::Realm, ::Hash) — Required. The realm resource to be created.
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.

#delete_realm

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

Deletes a single realm.

Overloads
def delete_realm(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_realm via a request object, either of type DeleteRealmRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Gaming::V1::DeleteRealmRequest, ::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_realm(name: nil) -> ::Gapic::Operation
Pass arguments to delete_realm 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. The name of the realm to delete, in the following form: projects/{project}/locations/{location}/realms/{realm}.
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.

#get_realm

def get_realm(request, options = nil) -> ::Google::Cloud::Gaming::V1::Realm
def get_realm(name: nil) -> ::Google::Cloud::Gaming::V1::Realm

Gets details of a single realm.

Overloads
def get_realm(request, options = nil) -> ::Google::Cloud::Gaming::V1::Realm
Pass arguments to get_realm via a request object, either of type GetRealmRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Gaming::V1::GetRealmRequest, ::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_realm(name: nil) -> ::Google::Cloud::Gaming::V1::Realm
Pass arguments to get_realm 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. The name of the realm to retrieve, in the following form: projects/{project}/locations/{location}/realms/{realm}.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

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

Create a new RealmsService REST client object.

Yields
  • (config) — Configure the RealmsService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Gaming::V1::RealmsService::Rest::Client.new

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

#list_realms

def list_realms(request, options = nil) -> ::Google::Cloud::Gaming::V1::ListRealmsResponse
def list_realms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Gaming::V1::ListRealmsResponse

Lists realms in a given project and location.

Overloads
def list_realms(request, options = nil) -> ::Google::Cloud::Gaming::V1::ListRealmsResponse
Pass arguments to list_realms via a request object, either of type ListRealmsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Gaming::V1::ListRealmsRequest, ::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_realms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Gaming::V1::ListRealmsResponse
Pass arguments to list_realms 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 resource name, in the following form: projects/{project}/locations/{location}.
  • page_size (::Integer) — Optional. The maximum number of items to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more realms left to be queried.
  • page_token (::String) — Optional. The next_page_token value returned from a previous List request, if any.
  • filter (::String) — Optional. The filter to apply to list results.
  • order_by (::String) — Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#operations_client

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

Get the associated client for long-running operations.

#preview_realm_update

def preview_realm_update(request, options = nil) -> ::Google::Cloud::Gaming::V1::PreviewRealmUpdateResponse
def preview_realm_update(realm: nil, update_mask: nil, preview_time: nil) -> ::Google::Cloud::Gaming::V1::PreviewRealmUpdateResponse

Previews patches to a single realm.

Overloads
def preview_realm_update(request, options = nil) -> ::Google::Cloud::Gaming::V1::PreviewRealmUpdateResponse
Pass arguments to preview_realm_update via a request object, either of type PreviewRealmUpdateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Gaming::V1::PreviewRealmUpdateRequest, ::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 preview_realm_update(realm: nil, update_mask: nil, preview_time: nil) -> ::Google::Cloud::Gaming::V1::PreviewRealmUpdateResponse
Pass arguments to preview_realm_update 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
  • realm (::Google::Cloud::Gaming::V1::Realm, ::Hash) — Required. The realm to be updated. Only fields specified in update_mask are updated.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The update mask applies to the resource. For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
  • preview_time (::Google::Protobuf::Timestamp, ::Hash) — Optional. The target timestamp to compute the preview.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_realm

def update_realm(request, options = nil) -> ::Gapic::Operation
def update_realm(realm: nil, update_mask: nil) -> ::Gapic::Operation

Patches a single realm.

Overloads
def update_realm(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_realm via a request object, either of type UpdateRealmRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Gaming::V1::UpdateRealmRequest, ::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_realm(realm: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_realm 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
  • realm (::Google::Cloud::Gaming::V1::Realm, ::Hash) — Required. The realm to be updated. Only fields specified in update_mask are updated.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The update mask applies to the resource. For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
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.