API hub V1 API - Class Google::Cloud::ApiHub::V1::ApiHubPlugin::Client (v0.1.0)

Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::ApiHubPlugin::Client.

Client for the ApiHubPlugin service.

This service is used for managing plugins inside the API Hub.

Inherits

  • Object

Methods

.configure

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

Configure the ApiHubPlugin 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 ApiHubPlugin clients
::Google::Cloud::ApiHub::V1::ApiHubPlugin::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the ApiHubPlugin 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

#disable_plugin

def disable_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
def disable_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin

Disables a plugin. The state of the plugin after disabling is DISABLED

Overloads
def disable_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Pass arguments to disable_plugin via a request object, either of type DisablePluginRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::DisablePluginRequest, ::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 disable_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Pass arguments to disable_plugin 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 plugin to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

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

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

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

# The returned object is of type Google::Cloud::ApiHub::V1::Plugin.
p result

#enable_plugin

def enable_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
def enable_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin

Enables a plugin. The state of the plugin after enabling is ENABLED

Overloads
def enable_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Pass arguments to enable_plugin via a request object, either of type EnablePluginRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::EnablePluginRequest, ::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 enable_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Pass arguments to enable_plugin 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 plugin to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

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

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

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

# The returned object is of type Google::Cloud::ApiHub::V1::Plugin.
p result

#get_plugin

def get_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
def get_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin

Get details about an API Hub plugin.

Overloads
def get_plugin(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Pass arguments to get_plugin via a request object, either of type GetPluginRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::ApiHub::V1::GetPluginRequest, ::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_plugin(name: nil) -> ::Google::Cloud::ApiHub::V1::Plugin
Pass arguments to get_plugin 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 plugin to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/api_hub/v1"

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

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

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

# The returned object is of type Google::Cloud::ApiHub::V1::Plugin.
p result

#initialize

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

Create a new ApiHubPlugin client object.

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

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

#location_client

def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Client)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)