Reference documentation and code samples for the Cloud API Registry V1BETA API class Google::Cloud::ApiRegistry::V1beta::CloudApiRegistry::Rest::Client.
REST client for the CloudApiRegistry service.
The Cloud API Registry service provides a central registry for managing API Data.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the CloudApiRegistry Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all CloudApiRegistry clients ::Google::Cloud::ApiRegistry::V1beta::CloudApiRegistry::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the CloudApiRegistry 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#get_mcp_server
def get_mcp_server(request, options = nil) -> ::Google::Cloud::ApiRegistry::V1beta::McpServer
def get_mcp_server(name: nil) -> ::Google::Cloud::ApiRegistry::V1beta::McpServerGets a single McpServer.
def get_mcp_server(request, options = nil) -> ::Google::Cloud::ApiRegistry::V1beta::McpServerget_mcp_server via a request object, either of type
GetMcpServerRequest or an equivalent Hash.
- request (::Google::Cloud::ApiRegistry::V1beta::GetMcpServerRequest, ::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_mcp_server(name: nil) -> ::Google::Cloud::ApiRegistry::V1beta::McpServerget_mcp_server 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).
- name (::String) — Required. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiRegistry::V1beta::McpServer)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_registry/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiRegistry::V1beta::CloudApiRegistry::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiRegistry::V1beta::GetMcpServerRequest.new # Call the get_mcp_server method. result = client.get_mcp_server request # The returned object is of type Google::Cloud::ApiRegistry::V1beta::McpServer. p result
#get_mcp_tool
def get_mcp_tool(request, options = nil) -> ::Google::Cloud::ApiRegistry::V1beta::McpTool
def get_mcp_tool(name: nil) -> ::Google::Cloud::ApiRegistry::V1beta::McpToolGets a single McpTool.
def get_mcp_tool(request, options = nil) -> ::Google::Cloud::ApiRegistry::V1beta::McpToolget_mcp_tool via a request object, either of type
GetMcpToolRequest or an equivalent Hash.
- request (::Google::Cloud::ApiRegistry::V1beta::GetMcpToolRequest, ::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_mcp_tool(name: nil) -> ::Google::Cloud::ApiRegistry::V1beta::McpToolget_mcp_tool 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).
- name (::String) — Required. Name of the resource
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiRegistry::V1beta::McpTool)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_registry/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiRegistry::V1beta::CloudApiRegistry::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiRegistry::V1beta::GetMcpToolRequest.new # Call the get_mcp_tool method. result = client.get_mcp_tool request # The returned object is of type Google::Cloud::ApiRegistry::V1beta::McpTool. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new CloudApiRegistry REST client object.
- (config) — Configure the CloudApiRegistry client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::ApiRegistry::V1beta::CloudApiRegistry::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ApiRegistry::V1beta::CloudApiRegistry::Rest::Client.new do |config| config.timeout = 10.0 end
#list_mcp_servers
def list_mcp_servers(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpServer>
def list_mcp_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpServer>Lists McpServers in a given Project.
def list_mcp_servers(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpServer>list_mcp_servers via a request object, either of type
ListMcpServersRequest or an equivalent Hash.
- request (::Google::Cloud::ApiRegistry::V1beta::ListMcpServersRequest, ::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_mcp_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpServer>list_mcp_servers 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).
- parent (::String) — Required. Parent value for ListMcpServersRequest
- 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
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpServer>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpServer>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_registry/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiRegistry::V1beta::CloudApiRegistry::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiRegistry::V1beta::ListMcpServersRequest.new # Call the list_mcp_servers method. result = client.list_mcp_servers 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::ApiRegistry::V1beta::McpServer. p item end
#list_mcp_tools
def list_mcp_tools(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpTool>
def list_mcp_tools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpTool>Lists McpTools in a given McpServer.
def list_mcp_tools(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpTool>list_mcp_tools via a request object, either of type
ListMcpToolsRequest or an equivalent Hash.
- request (::Google::Cloud::ApiRegistry::V1beta::ListMcpToolsRequest, ::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_mcp_tools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpTool>list_mcp_tools 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).
- parent (::String) — Required. Parent value for ListMcpToolsRequest
- 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
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpTool>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiRegistry::V1beta::McpTool>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/api_registry/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiRegistry::V1beta::CloudApiRegistry::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiRegistry::V1beta::ListMcpToolsRequest.new # Call the list_mcp_tools method. result = client.list_mcp_tools 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::ApiRegistry::V1beta::McpTool. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)