Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::ApiHubDiscovery::Rest::Client.
REST client for the ApiHubDiscovery service.
This service exposes methods used to manage DiscoveredApiObservations and DiscoveredApiOperations.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ApiHubDiscovery Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ApiHubDiscovery clients ::Google::Cloud::ApiHub::V1::ApiHubDiscovery::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ApiHubDiscovery 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_discovered_api_observation
def get_discovered_api_observation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiObservation
def get_discovered_api_observation(name: nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiObservation
Gets a DiscoveredAPIObservation in a given project, location and ApiObservation.
def get_discovered_api_observation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiObservation
get_discovered_api_observation
via a request object, either of type
GetDiscoveredApiObservationRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::GetDiscoveredApiObservationRequest, ::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_discovered_api_observation(name: nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiObservation
get_discovered_api_observation
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. The name of the DiscoveredApiObservation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::DiscoveredApiObservation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ApiHubDiscovery::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::GetDiscoveredApiObservationRequest.new # Call the get_discovered_api_observation method. result = client.get_discovered_api_observation request # The returned object is of type Google::Cloud::ApiHub::V1::DiscoveredApiObservation. p result
#get_discovered_api_operation
def get_discovered_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiOperation
def get_discovered_api_operation(name: nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiOperation
Gets a DiscoveredAPIOperation in a given project, location, ApiObservation and ApiOperation.
def get_discovered_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiOperation
get_discovered_api_operation
via a request object, either of type
GetDiscoveredApiOperationRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::GetDiscoveredApiOperationRequest, ::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_discovered_api_operation(name: nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiOperation
get_discovered_api_operation
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. The name of the DiscoveredApiOperation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::ApiHub::V1::DiscoveredApiOperation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ApiHubDiscovery::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::GetDiscoveredApiOperationRequest.new # Call the get_discovered_api_operation method. result = client.get_discovered_api_operation request # The returned object is of type Google::Cloud::ApiHub::V1::DiscoveredApiOperation. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new ApiHubDiscovery REST client object.
- (config) — Configure the ApiHubDiscovery client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::ApiHub::V1::ApiHubDiscovery::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ApiHub::V1::ApiHubDiscovery::Rest::Client.new do |config| config.timeout = 10.0 end
#list_discovered_api_observations
def list_discovered_api_observations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>
def list_discovered_api_observations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>
Lists all the DiscoveredAPIObservations in a given project and location.
def list_discovered_api_observations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>
list_discovered_api_observations
via a request object, either of type
ListDiscoveredApiObservationsRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::ListDiscoveredApiObservationsRequest, ::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_discovered_api_observations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>
list_discovered_api_observations
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. The parent, which owns this collection of ApiObservations. Format: projects/{project}/locations/{location}
- page_size (::Integer) — Optional. The maximum number of ApiObservations to return. The service may return fewer than this value. If unspecified, at most 10 ApiObservations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
ListApiObservations
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListApiObservations
must match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ApiHubDiscovery::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::ListDiscoveredApiObservationsRequest.new # Call the list_discovered_api_observations method. result = client.list_discovered_api_observations 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::ApiHub::V1::DiscoveredApiObservation. p item end
#list_discovered_api_operations
def list_discovered_api_operations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>
def list_discovered_api_operations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>
Lists all the DiscoveredAPIOperations in a given project, location and ApiObservation.
def list_discovered_api_operations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>
list_discovered_api_operations
via a request object, either of type
ListDiscoveredApiOperationsRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::ListDiscoveredApiOperationsRequest, ::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_discovered_api_operations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>
list_discovered_api_operations
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. The parent, which owns this collection of DiscoveredApiOperations. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
- page_size (::Integer) — Optional. DiscoveredApiOperations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
-
page_token (::String) — Optional. A page token, received from a previous
ListDiscoveredApiApiOperations
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListDiscoveredApiApiOperations
must match the call that provided the page token.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::ApiHubDiscovery::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::ListDiscoveredApiOperationsRequest.new # Call the list_discovered_api_operations method. result = client.list_discovered_api_operations 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::ApiHub::V1::DiscoveredApiOperation. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)