diff --git a/google-cloud-database_center-v1beta/.owlbot-manifest.json b/google-cloud-database_center-v1beta/.owlbot-manifest.json index 091f98cb0b69..3906b5cb9f5f 100644 --- a/google-cloud-database_center-v1beta/.owlbot-manifest.json +++ b/google-cloud-database_center-v1beta/.owlbot-manifest.json @@ -55,6 +55,7 @@ "snippets/database_center/aggregate_fleet.rb", "snippets/database_center/aggregate_issue_stats.rb", "snippets/database_center/query_database_resource_groups.rb", + "snippets/database_center/query_issues.rb", "snippets/database_center/query_products.rb", "snippets/snippet_metadata_google.cloud.databasecenter.v1beta.json", "test/google/cloud/database_center/v1beta/database_center_rest_test.rb", diff --git a/google-cloud-database_center-v1beta/README.md b/google-cloud-database_center-v1beta/README.md index 7908ada925a9..ed551ec38b84 100644 --- a/google-cloud-database_center-v1beta/README.md +++ b/google-cloud-database_center-v1beta/README.md @@ -1,6 +1,6 @@ # Ruby Client for the Database Center V1BETA API -Database Center provides an organization-wide, cross-product fleet health platform to eliminate the overhead, complexity, and risk associated with aggregating and summarizing health signals through custom dashboards. Through Database Center’s fleet health dashboard and API, database platform teams that are responsible for reliability, compliance, security, cost, and administration of database fleets will now have a single pane of glass that pinpoints issues relevant to each team. +Database Center offers a comprehensive, organization-wide platform for monitoring database fleet health across various products. It simplifies management and reduces risk by automatically aggregating and summarizing key health signals, removing the need for custom dashboards. The platform provides a unified view through its dashboard and API, enabling teams focused on reliability, compliance, security, cost, and administration to quickly identify and address relevant issues within their database fleets. The Database Center API provides access to an organization-wide, cross-product database fleet health platform. It aggregates health, security, and compliance signals from various Google Cloud databases, offering a single pane of glass to identify and manage issues. diff --git a/google-cloud-database_center-v1beta/gapic_metadata.json b/google-cloud-database_center-v1beta/gapic_metadata.json index e9702b951c3c..48cacf49f126 100644 --- a/google-cloud-database_center-v1beta/gapic_metadata.json +++ b/google-cloud-database_center-v1beta/gapic_metadata.json @@ -29,6 +29,11 @@ "methods": [ "aggregate_issue_stats" ] + }, + "QueryIssues": { + "methods": [ + "query_issues" + ] } } } diff --git a/google-cloud-database_center-v1beta/google-cloud-database_center-v1beta.gemspec b/google-cloud-database_center-v1beta/google-cloud-database_center-v1beta.gemspec index d8b8fb2c3ab3..4d0446fb3d3f 100644 --- a/google-cloud-database_center-v1beta/google-cloud-database_center-v1beta.gemspec +++ b/google-cloud-database_center-v1beta/google-cloud-database_center-v1beta.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |gem| gem.authors = ["Google LLC"] gem.email = "googleapis-packages@google.com" gem.description = "The Database Center API provides access to an organization-wide, cross-product database fleet health platform. It aggregates health, security, and compliance signals from various Google Cloud databases, offering a single pane of glass to identify and manage issues. Note that google-cloud-database_center-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-database_center instead. See the readme for more details." - gem.summary = "Database Center provides an organization-wide, cross-product fleet health platform to eliminate the overhead, complexity, and risk associated with aggregating and summarizing health signals through custom dashboards. Through Database Center’s fleet health dashboard and API, database platform teams that are responsible for reliability, compliance, security, cost, and administration of database fleets will now have a single pane of glass that pinpoints issues relevant to each team." + gem.summary = "Database Center offers a comprehensive, organization-wide platform for monitoring database fleet health across various products. It simplifies management and reduces risk by automatically aggregating and summarizing key health signals, removing the need for custom dashboards. The platform provides a unified view through its dashboard and API, enabling teams focused on reliability, compliance, security, cost, and administration to quickly identify and address relevant issues within their database fleets." gem.homepage = "https://github.com/googleapis/google-cloud-ruby" gem.license = "Apache-2.0" diff --git a/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/client.rb b/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/client.rb index 2cbaa893b3df..ead427033f89 100644 --- a/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/client.rb +++ b/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/client.rb @@ -331,10 +331,10 @@ def query_products request, options = nil # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` # @param group_by [::String] # Optional. A field that statistics are grouped by. # Valid values are any combination of the following: @@ -364,9 +364,10 @@ def query_products request, options = nil # descending order. Add "ASC" after the field name to indicate ascending # order. It supports ordering using multiple fields. # For example: - # order_by = "resource_groups_count" sorts response in ascending order - # order_by = "resource_groups_count DESC" sorts response in descending order - # order_by = "product.type, product.version DESC, location" orders by type + # `order_by = "resource_groups_count"` sorts response in ascending order + # `order_by = "resource_groups_count DESC"` sorts response in descending + # order + # `order_by = "product.type, product.version DESC, location"` orders by type # in ascending order, version in descending order and location in ascending # order # @param page_size [::Integer] @@ -498,12 +499,12 @@ def aggregate_fleet request, options = nil # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" - # Example: full_resource_name=~"test" - # Example: full_resource_name=~"test.*master" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` + # Example: `full_resource_name=~"test"` + # Example: `full_resource_name=~"test.*master"` # @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>] # Optional. Groups of signal types that are requested. # @param signal_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalFilter, ::Hash>] @@ -544,12 +545,13 @@ def aggregate_fleet request, options = nil # order. It only supports a single field at a time. # # For example: - # order_by = "full_resource_name" sorts response in ascending order - # order_by = "full_resource_name DESC" sorts response in descending order - # order_by = "issue_count DESC" sorts response in descending order of + # `order_by = "full_resource_name"` sorts response in ascending order + # `order_by = "full_resource_name DESC"` sorts response in descending order + # `order_by = "issue_count DESC"` sorts response in descending order of # count of all issues associated with a resource. # - # More explicitly, order_by = "full_resource_name, product" is not supported. + # More explicitly, `order_by = "full_resource_name, product"` is not + # supported. # @param page_size [::Integer] # Optional. If unspecified, at most 50 resource groups will be returned. # The maximum value is 1000; values above 1000 will be coerced to 1000. @@ -662,10 +664,10 @@ def query_database_resource_groups request, options = nil # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` # @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>] # Optional. Lists of signal types that are issues. # @param baseline_date [::Google::Type::Date, ::Hash] @@ -729,6 +731,128 @@ def aggregate_issue_stats request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # QueryIssues provides a list of issues and recommendations + # that a user has access to and that are within the requested scope. + # + # @overload query_issues(request, options = nil) + # Pass arguments to `query_issues` via a request object, either of type + # {::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest, ::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. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_issues(parent: nil, filter: nil, signal_products_filters: nil, order_by: nil, page_size: nil, page_token: nil) + # Pass arguments to `query_issues` 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). + # + # @param parent [::String] + # Required. Parent can be a project, a folder, or an organization. The list + # is limited to the one attached to resources within the `scope` that a user + # has access to. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param filter [::String] + # Optional. + # Supported fields are: + # 'product', + # `location`, + # `issue_severity`, + # 'tags', + # 'labels', + # @param signal_products_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalProductsFilters, ::Hash>] + # Optional. Filters based on signal and product. The filter list will be ORed + # across pairs and ANDed within a signal and products pair. + # @param order_by [::String] + # Optional. Following fields are sortable: + # SignalType + # Product + # Location + # IssueSeverity + # + # The default order is ascending. Add "DESC" after the field name to indicate + # descending order. Add "ASC" after the field name to indicate ascending + # order. It only supports a single field at a time. + # @param page_size [::Integer] + # Optional. If unspecified, at most 50 issues will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `QueryIssues` call. + # Provide this to retrieve the subsequent page. + # All parameters except page size should match the parameters used in the + # call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/database_center/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new + # + # # Call the query_issues method. + # result = client.query_issues 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::DatabaseCenter::V1beta::DatabaseResourceIssue. + # p item + # end + # + def query_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.query_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_issues.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_center_stub.call_rpc :query_issues, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @database_center_stub, :query_issues, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the DatabaseCenter API. # @@ -932,6 +1056,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :aggregate_issue_stats + ## + # RPC-specific configuration for `query_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :query_issues # @private def initialize parent_rpcs = nil @@ -943,6 +1072,8 @@ def initialize parent_rpcs = nil @query_database_resource_groups = ::Gapic::Config::Method.new query_database_resource_groups_config aggregate_issue_stats_config = parent_rpcs.aggregate_issue_stats if parent_rpcs.respond_to? :aggregate_issue_stats @aggregate_issue_stats = ::Gapic::Config::Method.new aggregate_issue_stats_config + query_issues_config = parent_rpcs.query_issues if parent_rpcs.respond_to? :query_issues + @query_issues = ::Gapic::Config::Method.new query_issues_config yield self if block_given? end diff --git a/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/rest/client.rb b/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/rest/client.rb index 97d6d1ce6088..a09dfb6324a8 100644 --- a/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/rest/client.rb +++ b/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/rest/client.rb @@ -325,10 +325,10 @@ def query_products request, options = nil # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` # @param group_by [::String] # Optional. A field that statistics are grouped by. # Valid values are any combination of the following: @@ -358,9 +358,10 @@ def query_products request, options = nil # descending order. Add "ASC" after the field name to indicate ascending # order. It supports ordering using multiple fields. # For example: - # order_by = "resource_groups_count" sorts response in ascending order - # order_by = "resource_groups_count DESC" sorts response in descending order - # order_by = "product.type, product.version DESC, location" orders by type + # `order_by = "resource_groups_count"` sorts response in ascending order + # `order_by = "resource_groups_count DESC"` sorts response in descending + # order + # `order_by = "product.type, product.version DESC, location"` orders by type # in ascending order, version in descending order and location in ascending # order # @param page_size [::Integer] @@ -493,12 +494,12 @@ def aggregate_fleet request, options = nil # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" - # Example: full_resource_name=~"test" - # Example: full_resource_name=~"test.*master" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` + # Example: `full_resource_name=~"test"` + # Example: `full_resource_name=~"test.*master"` # @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>] # Optional. Groups of signal types that are requested. # @param signal_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalFilter, ::Hash>] @@ -539,12 +540,13 @@ def aggregate_fleet request, options = nil # order. It only supports a single field at a time. # # For example: - # order_by = "full_resource_name" sorts response in ascending order - # order_by = "full_resource_name DESC" sorts response in descending order - # order_by = "issue_count DESC" sorts response in descending order of + # `order_by = "full_resource_name"` sorts response in ascending order + # `order_by = "full_resource_name DESC"` sorts response in descending order + # `order_by = "issue_count DESC"` sorts response in descending order of # count of all issues associated with a resource. # - # More explicitly, order_by = "full_resource_name, product" is not supported. + # More explicitly, `order_by = "full_resource_name, product"` is not + # supported. # @param page_size [::Integer] # Optional. If unspecified, at most 50 resource groups will be returned. # The maximum value is 1000; values above 1000 will be coerced to 1000. @@ -658,10 +660,10 @@ def query_database_resource_groups request, options = nil # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` # @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>] # Optional. Lists of signal types that are issues. # @param baseline_date [::Google::Type::Date, ::Hash] @@ -726,6 +728,129 @@ def aggregate_issue_stats request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # QueryIssues provides a list of issues and recommendations + # that a user has access to and that are within the requested scope. + # + # @overload query_issues(request, options = nil) + # Pass arguments to `query_issues` via a request object, either of type + # {::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest, ::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. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_issues(parent: nil, filter: nil, signal_products_filters: nil, order_by: nil, page_size: nil, page_token: nil) + # Pass arguments to `query_issues` 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). + # + # @param parent [::String] + # Required. Parent can be a project, a folder, or an organization. The list + # is limited to the one attached to resources within the `scope` that a user + # has access to. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @param filter [::String] + # Optional. + # Supported fields are: + # 'product', + # `location`, + # `issue_severity`, + # 'tags', + # 'labels', + # @param signal_products_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalProductsFilters, ::Hash>] + # Optional. Filters based on signal and product. The filter list will be ORed + # across pairs and ANDed within a signal and products pair. + # @param order_by [::String] + # Optional. Following fields are sortable: + # SignalType + # Product + # Location + # IssueSeverity + # + # The default order is ascending. Add "DESC" after the field name to indicate + # descending order. Add "ASC" after the field name to indicate ascending + # order. It only supports a single field at a time. + # @param page_size [::Integer] + # Optional. If unspecified, at most 50 issues will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `QueryIssues` call. + # Provide this to retrieve the subsequent page. + # All parameters except page size should match the parameters used in the + # call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/database_center/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new + # + # # Call the query_issues method. + # result = client.query_issues 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::DatabaseCenter::V1beta::DatabaseResourceIssue. + # p item + # end + # + def query_issues request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.query_issues.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_issues.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_issues.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @database_center_stub.query_issues request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @database_center_stub, :query_issues, "resource_issues", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the DatabaseCenter REST API. # @@ -892,6 +1017,11 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :aggregate_issue_stats + ## + # RPC-specific configuration for `query_issues` + # @return [::Gapic::Config::Method] + # + attr_reader :query_issues # @private def initialize parent_rpcs = nil @@ -903,6 +1033,8 @@ def initialize parent_rpcs = nil @query_database_resource_groups = ::Gapic::Config::Method.new query_database_resource_groups_config aggregate_issue_stats_config = parent_rpcs.aggregate_issue_stats if parent_rpcs.respond_to? :aggregate_issue_stats @aggregate_issue_stats = ::Gapic::Config::Method.new aggregate_issue_stats_config + query_issues_config = parent_rpcs.query_issues if parent_rpcs.respond_to? :query_issues + @query_issues = ::Gapic::Config::Method.new query_issues_config yield self if block_given? end diff --git a/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/rest/service_stub.rb b/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/rest/service_stub.rb index d48bc6c370de..6a06184bfd64 100644 --- a/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/rest/service_stub.rb +++ b/google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/rest/service_stub.rb @@ -233,6 +233,46 @@ def aggregate_issue_stats request_pb, options = nil end end + ## + # Baseline implementation for the query_issues REST call + # + # @param request_pb [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse] + # A result object deserialized from the server's reply + def query_issues request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_issues_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "query_issues", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # @private # @@ -310,6 +350,26 @@ def self.transcode_aggregate_issue_stats_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the query_issues REST call + # + # @param request_pb [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_issues_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta:queryIssues", + body: "*", + matches: [] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/maintenance_pb.rb b/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/maintenance_pb.rb index 4afcd62699ca..254224cd486f 100644 --- a/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/maintenance_pb.rb +++ b/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/maintenance_pb.rb @@ -10,7 +10,7 @@ require 'google/type/timeofday_pb' -descriptor_data = "\n4google/cloud/databasecenter/v1beta/maintenance.proto\x12\"google.cloud.databasecenter.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xb7\x01\n\x1bResourceMaintenanceSchedule\x12/\n\nstart_time\x18\x01 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\x12(\n\x03\x64\x61y\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12=\n\x05phase\x18\x03 \x01(\x0e\x32).google.cloud.databasecenter.v1beta.PhaseB\x03\xe0\x41\x01\"\xa2\x01\n\x1fResourceMaintenanceDenySchedule\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12)\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\"\x85\x02\n\x0fMaintenanceInfo\x12\x62\n\x14maintenance_schedule\x18\x01 \x01(\x0b\x32?.google.cloud.databasecenter.v1beta.ResourceMaintenanceScheduleB\x03\xe0\x41\x01\x12l\n\x1a\x64\x65ny_maintenance_schedules\x18\x02 \x03(\x0b\x32\x43.google.cloud.databasecenter.v1beta.ResourceMaintenanceDenyScheduleB\x03\xe0\x41\x01\x12 \n\x13maintenance_version\x18\x03 \x01(\tB\x03\xe0\x41\x01*`\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPHASE_WEEK1\x10\x01\x12\x0f\n\x0bPHASE_WEEK2\x10\x02\x12\x0f\n\x0bPHASE_WEEK5\x10\x03\x12\r\n\tPHASE_ANY\x10\x04\x42\xfe\x01\n&com.google.cloud.databasecenter.v1betaB\x10MaintenanceProtoP\x01ZNcloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb\xaa\x02\"Google.Cloud.DatabaseCenter.V1Beta\xca\x02\"Google\\Cloud\\DatabaseCenter\\V1beta\xea\x02%Google::Cloud::DatabaseCenter::V1betab\x06proto3" +descriptor_data = "\n4google/cloud/databasecenter/v1beta/maintenance.proto\x12\"google.cloud.databasecenter.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xb7\x01\n\x1bResourceMaintenanceSchedule\x12/\n\nstart_time\x18\x01 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\x12(\n\x03\x64\x61y\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12=\n\x05phase\x18\x03 \x01(\x0e\x32).google.cloud.databasecenter.v1beta.PhaseB\x03\xe0\x41\x01\"\xa2\x01\n\x1fResourceMaintenanceDenySchedule\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12)\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\"\x85\x02\n\x0fMaintenanceInfo\x12\x62\n\x14maintenance_schedule\x18\x01 \x01(\x0b\x32?.google.cloud.databasecenter.v1beta.ResourceMaintenanceScheduleB\x03\xe0\x41\x01\x12l\n\x1a\x64\x65ny_maintenance_schedules\x18\x02 \x03(\x0b\x32\x43.google.cloud.databasecenter.v1beta.ResourceMaintenanceDenyScheduleB\x03\xe0\x41\x01\x12 \n\x13maintenance_version\x18\x03 \x01(\tB\x03\xe0\x41\x03*`\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPHASE_WEEK1\x10\x01\x12\x0f\n\x0bPHASE_WEEK2\x10\x02\x12\x0f\n\x0bPHASE_WEEK5\x10\x03\x12\r\n\tPHASE_ANY\x10\x04\x42\xfe\x01\n&com.google.cloud.databasecenter.v1betaB\x10MaintenanceProtoP\x01ZNcloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb\xaa\x02\"Google.Cloud.DatabaseCenter.V1Beta\xca\x02\"Google\\Cloud\\DatabaseCenter\\V1beta\xea\x02%Google::Cloud::DatabaseCenter::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool diff --git a/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/service_pb.rb b/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/service_pb.rb index 4bc64256786f..775a9c4cfc4d 100644 --- a/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/service_pb.rb +++ b/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/service_pb.rb @@ -15,7 +15,7 @@ require 'google/type/date_pb' -descriptor_data = "\n0google/cloud/databasecenter/v1beta/service.proto\x12\"google.cloud.databasecenter.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x37google/cloud/databasecenter/v1beta/machine_config.proto\x1a\x34google/cloud/databasecenter/v1beta/maintenance.proto\x1a\x34google/cloud/databasecenter/v1beta/metric_data.proto\x1a\x30google/cloud/databasecenter/v1beta/product.proto\x1a\x30google/cloud/databasecenter/v1beta/signals.proto\x1a\x16google/type/date.proto\"\\\n\x14QueryProductsRequest\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n\x15QueryProductsResponse\x12=\n\x08products\x18\x01 \x03(\x0b\x32+.google.cloud.databasecenter.v1beta.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\xbb\x02\n\"QueryDatabaseResourceGroupsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12T\n\x12signal_type_groups\x18\x03 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.SignalTypeGroupB\x03\xe0\x41\x01\x12M\n\x0esignal_filters\x18\x04 \x03(\x0b\x32\x30.google.cloud.databasecenter.v1beta.SignalFilterB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n#QueryDatabaseResourceGroupsResponse\x12R\n\x0fresource_groups\x18\x01 \x03(\x0b\x32\x39.google.cloud.databasecenter.v1beta.DatabaseResourceGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\xac\x01\n\x15\x44\x61tabaseResourceGroup\x12L\n\x0eroot_resources\x18\x01 \x03(\x0b\x32\x34.google.cloud.databasecenter.v1beta.DatabaseResource\x12\x45\n\rsignal_groups\x18\x02 \x03(\x0b\x32..google.cloud.databasecenter.v1beta.IssueCount\"\xd6\x07\n\x10\x44\x61tabaseResource\x12M\n\x0f\x63hild_resources\x18\x01 \x03(\x0b\x32\x34.google.cloud.databasecenter.v1beta.DatabaseResource\x12\x1a\n\x12\x66ull_resource_name\x18\x03 \x01(\t\x12\x11\n\tcontainer\x18\x04 \x01(\t\x12<\n\x07product\x18\x05 \x01(\x0b\x32+.google.cloud.databasecenter.v1beta.Product\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x39\n\x06labels\x18\x07 \x03(\x0b\x32).google.cloud.databasecenter.v1beta.Label\x12\x35\n\x04tags\x18\x10 \x03(\x0b\x32\'.google.cloud.databasecenter.v1beta.Tag\x12\x15\n\rresource_type\x18\x08 \x01(\t\x12N\n\x11sub_resource_type\x18\t \x01(\x0e\x32\x33.google.cloud.databasecenter.v1beta.SubResourceType\x12I\n\x0emachine_config\x18\x0c \x01(\x0b\x32\x31.google.cloud.databasecenter.v1beta.MachineConfig\x12\x46\n\rsignal_groups\x18\n \x03(\x0b\x32/.google.cloud.databasecenter.v1beta.SignalGroup\x12<\n\x07metrics\x18\r \x01(\x0b\x32+.google.cloud.databasecenter.v1beta.Metrics\x12O\n\x11resource_category\x18\x0e \x01(\x0e\x32\x34.google.cloud.databasecenter.v1beta.ResourceCategory\x12\x15\n\rresource_name\x18\x0f \x01(\t\x12P\n\x0f\x62\x61\x63kupdr_config\x18\x11 \x01(\x0b\x32\x32.google.cloud.databasecenter.v1beta.BackupDRConfigB\x03\xe0\x41\x01\x12<\n\x07\x65\x64ition\x18\x12 \x01(\x0e\x32+.google.cloud.databasecenter.v1beta.Edition\x12R\n\x10maintenance_info\x18\x13 \x01(\x0b\x32\x33.google.cloud.databasecenter.v1beta.MaintenanceInfoB\x03\xe0\x41\x01\"\xe2\x01\n\x1a\x41ggregateIssueStatsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12T\n\x12signal_type_groups\x18\x03 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.SignalTypeGroupB\x03\xe0\x41\x01\x12\x32\n\rbaseline_date\x18\x04 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x10\n\x0e_baseline_date\"\xcb\x01\n\x1b\x41ggregateIssueStatsResponse\x12N\n\x11issue_group_stats\x18\x01 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.IssueGroupStats\x12\x1d\n\x15total_resources_count\x18\x02 \x01(\x05\x12#\n\x1btotal_resource_groups_count\x18\x03 \x01(\x05\x12\x18\n\x0bunreachable\x18\x04 \x03(\tB\x03\xe0\x41\x06\"\xec\x01\n\x0fIssueGroupStats\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x1d\n\x15resource_groups_count\x18\x02 \x01(\x05\x12\x17\n\x0fresources_count\x18\x03 \x01(\x05\x12%\n\x1dhealthy_resource_groups_count\x18\x04 \x01(\x05\x12\x1f\n\x17healthy_resources_count\x18\x05 \x01(\x05\x12\x43\n\x0bissue_stats\x18\x06 \x03(\x0b\x32..google.cloud.databasecenter.v1beta.IssueStats\"\xb1\x02\n\nIssueStats\x12\x43\n\x0bsignal_type\x18\x01 \x01(\x0e\x32..google.cloud.databasecenter.v1beta.SignalType\x12\x16\n\x0eresource_count\x18\x02 \x01(\x05\x12Q\n\rdelta_details\x18\x03 \x01(\x0b\x32\x30.google.cloud.databasecenter.v1beta.DeltaDetailsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12N\n\x0eissue_severity\x18\x04 \x01(\x0e\x32\x31.google.cloud.databasecenter.v1beta.IssueSeverityH\x01\x88\x01\x01\x42\x10\n\x0e_delta_detailsB\x11\n\x0f_issue_severity\"3\n\x05Label\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\"\xe6\x01\n\x15\x41ggregateFleetRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\rbaseline_date\x18\x07 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x10\n\x0e_baseline_date\"\xd3\x01\n\x16\x41ggregateFleetResponse\x12\x43\n\x04rows\x18\x01 \x03(\x0b\x32\x35.google.cloud.databasecenter.v1beta.AggregateFleetRow\x12#\n\x1bresource_groups_total_count\x18\x02 \x01(\x05\x12\x1c\n\x14resource_total_count\x18\x03 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\t\x12\x18\n\x0bunreachable\x18\x05 \x03(\tB\x03\xe0\x41\x06\"\xf2\x01\n\x11\x41ggregateFleetRow\x12@\n\tdimension\x18\x01 \x03(\x0b\x32-.google.cloud.databasecenter.v1beta.Dimension\x12\x1d\n\x15resource_groups_count\x18\x02 \x01(\x05\x12\x17\n\x0fresources_count\x18\x03 \x01(\x05\x12Q\n\rdelta_details\x18\x04 \x01(\x0b\x32\x30.google.cloud.databasecenter.v1beta.DeltaDetailsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x10\n\x0e_delta_details\"\xa1\x06\n\tDimension\x12\x13\n\tcontainer\x18\x02 \x01(\tH\x00\x12G\n\x0cproduct_type\x18\x03 \x01(\x0e\x32/.google.cloud.databasecenter.v1beta.ProductTypeH\x00\x12\x44\n\x0eproduct_engine\x18\x04 \x01(\x0e\x32*.google.cloud.databasecenter.v1beta.EngineH\x00\x12\x19\n\x0fproduct_version\x18\x05 \x01(\tH\x00\x12\x12\n\x08location\x18\x06 \x01(\tH\x00\x12\x17\n\rresource_type\x18\x07 \x01(\tH\x00\x12P\n\x11sub_resource_type\x18\x08 \x01(\x0e\x32\x33.google.cloud.databasecenter.v1beta.SubResourceTypeH\x00\x12Q\n\x11resource_category\x18\t \x01(\x0e\x32\x34.google.cloud.databasecenter.v1beta.ResourceCategoryH\x00\x12M\n\x0fmanagement_type\x18\n \x01(\x0e\x32\x32.google.cloud.databasecenter.v1beta.ManagementTypeH\x00\x12>\n\x07\x65\x64ition\x18\x0b \x01(\x0e\x32+.google.cloud.databasecenter.v1beta.EditionH\x00\x12\x11\n\x07tag_key\x18\x0c \x01(\tH\x00\x12\x13\n\ttag_value\x18\r \x01(\tH\x00\x12\x14\n\ntag_source\x18\x0e \x01(\tH\x00\x12\x17\n\rtag_inherited\x18\x0f \x01(\x08H\x00\x12\x13\n\tlabel_key\x18\x10 \x01(\tH\x00\x12\x15\n\x0blabel_value\x18\x11 \x01(\tH\x00\x12\x16\n\x0clabel_source\x18\x12 \x01(\tH\x00\x12\"\n\x18has_maintenance_schedule\x18\x13 \x01(\x08H\x00\x12(\n\x1ehas_deny_maintenance_schedules\x18\x14 \x01(\x08H\x00\x42\x0b\n\tdimension\"D\n\x0e\x42\x61\x63kupDRConfig\x12\x1d\n\x10\x62\x61\x63kupdr_managed\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x13\n\x11_backupdr_managed\"D\n\x03Tag\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x11\n\tinherited\x18\x04 \x01(\x08\"\x90\x01\n\x0fResourceDetails\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12<\n\x07product\x18\x03 \x01(\x0b\x32+.google.cloud.databasecenter.v1beta.Product\x12\x10\n\x08location\x18\x04 \x01(\t\"\xb2\x01\n\x0c\x44\x65ltaDetails\x12P\n\x13increased_resources\x18\x01 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.ResourceDetails\x12P\n\x13\x64\x65\x63reased_resources\x18\x02 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.ResourceDetails*^\n\x10ResourceCategory\x12!\n\x1dRESOURCE_CATEGORY_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x0b\n\x07\x43LUSTER\x10\x02\x12\x0c\n\x08\x44\x41TABASE\x10\x03*m\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45\x44ITION_ENTERPRISE\x10\x01\x12\x1b\n\x17\x45\x44ITION_ENTERPRISE_PLUS\x10\x02\x12\x14\n\x10\x45\x44ITION_STANDARD\x10\x03*\xdd\x01\n\x0fSubResourceType\x12!\n\x1dSUB_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19SUB_RESOURCE_TYPE_PRIMARY\x10\x01\x12\x1f\n\x1bSUB_RESOURCE_TYPE_SECONDARY\x10\x02\x12\"\n\x1eSUB_RESOURCE_TYPE_READ_REPLICA\x10\x03\x12&\n\"SUB_RESOURCE_TYPE_EXTERNAL_PRIMARY\x10\x05\x12\x1b\n\x17SUB_RESOURCE_TYPE_OTHER\x10\x04*t\n\x0eManagementType\x12\x1f\n\x1bMANAGEMENT_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMANAGEMENT_TYPE_GCP_MANAGED\x10\x01\x12 \n\x1cMANAGEMENT_TYPE_SELF_MANAGED\x10\x02\x32\xd5\x06\n\x0e\x44\x61tabaseCenter\x12\xa3\x01\n\rQueryProducts\x12\x38.google.cloud.databasecenter.v1beta.QueryProductsRequest\x1a\x39.google.cloud.databasecenter.v1beta.QueryProductsResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/v1beta:queryProducts\x12\xa7\x01\n\x0e\x41ggregateFleet\x12\x39.google.cloud.databasecenter.v1beta.AggregateFleetRequest\x1a:.google.cloud.databasecenter.v1beta.AggregateFleetResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/v1beta:aggregateFleet\x12\xde\x01\n\x1bQueryDatabaseResourceGroups\x12\x46.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest\x1aG.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsResponse\".\x82\xd3\xe4\x93\x02(\"#/v1beta:queryDatabaseResourceGroups:\x01*\x12\xbe\x01\n\x13\x41ggregateIssueStats\x12>.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest\x1a?.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse\"&\x82\xd3\xe4\x93\x02 \"\x1b/v1beta:aggregateIssueStats:\x01*\x1aQ\xca\x41\x1d\x64\x61tabasecenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfa\x01\n&com.google.cloud.databasecenter.v1betaB\x0cServiceProtoP\x01ZNcloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb\xaa\x02\"Google.Cloud.DatabaseCenter.V1Beta\xca\x02\"Google\\Cloud\\DatabaseCenter\\V1beta\xea\x02%Google::Cloud::DatabaseCenter::V1betab\x06proto3" +descriptor_data = "\n0google/cloud/databasecenter/v1beta/service.proto\x12\"google.cloud.databasecenter.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x37google/cloud/databasecenter/v1beta/machine_config.proto\x1a\x34google/cloud/databasecenter/v1beta/maintenance.proto\x1a\x34google/cloud/databasecenter/v1beta/metric_data.proto\x1a\x30google/cloud/databasecenter/v1beta/product.proto\x1a\x30google/cloud/databasecenter/v1beta/signals.proto\x1a\x16google/type/date.proto\"\\\n\x14QueryProductsRequest\x12\x13\n\x06parent\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n\x15QueryProductsResponse\x12=\n\x08products\x18\x01 \x03(\x0b\x32+.google.cloud.databasecenter.v1beta.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\xbb\x02\n\"QueryDatabaseResourceGroupsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12T\n\x12signal_type_groups\x18\x03 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.SignalTypeGroupB\x03\xe0\x41\x01\x12M\n\x0esignal_filters\x18\x04 \x03(\x0b\x32\x30.google.cloud.databasecenter.v1beta.SignalFilterB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x07 \x01(\tB\x03\xe0\x41\x01\"\xac\x01\n#QueryDatabaseResourceGroupsResponse\x12R\n\x0fresource_groups\x18\x01 \x03(\x0b\x32\x39.google.cloud.databasecenter.v1beta.DatabaseResourceGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\xac\x01\n\x15\x44\x61tabaseResourceGroup\x12L\n\x0eroot_resources\x18\x01 \x03(\x0b\x32\x34.google.cloud.databasecenter.v1beta.DatabaseResource\x12\x45\n\rsignal_groups\x18\x02 \x03(\x0b\x32..google.cloud.databasecenter.v1beta.IssueCount\"\xd6\x07\n\x10\x44\x61tabaseResource\x12M\n\x0f\x63hild_resources\x18\x01 \x03(\x0b\x32\x34.google.cloud.databasecenter.v1beta.DatabaseResource\x12\x1a\n\x12\x66ull_resource_name\x18\x03 \x01(\t\x12\x11\n\tcontainer\x18\x04 \x01(\t\x12<\n\x07product\x18\x05 \x01(\x0b\x32+.google.cloud.databasecenter.v1beta.Product\x12\x10\n\x08location\x18\x06 \x01(\t\x12\x39\n\x06labels\x18\x07 \x03(\x0b\x32).google.cloud.databasecenter.v1beta.Label\x12\x35\n\x04tags\x18\x10 \x03(\x0b\x32\'.google.cloud.databasecenter.v1beta.Tag\x12\x15\n\rresource_type\x18\x08 \x01(\t\x12N\n\x11sub_resource_type\x18\t \x01(\x0e\x32\x33.google.cloud.databasecenter.v1beta.SubResourceType\x12I\n\x0emachine_config\x18\x0c \x01(\x0b\x32\x31.google.cloud.databasecenter.v1beta.MachineConfig\x12\x46\n\rsignal_groups\x18\n \x03(\x0b\x32/.google.cloud.databasecenter.v1beta.SignalGroup\x12<\n\x07metrics\x18\r \x01(\x0b\x32+.google.cloud.databasecenter.v1beta.Metrics\x12O\n\x11resource_category\x18\x0e \x01(\x0e\x32\x34.google.cloud.databasecenter.v1beta.ResourceCategory\x12\x15\n\rresource_name\x18\x0f \x01(\t\x12P\n\x0f\x62\x61\x63kupdr_config\x18\x11 \x01(\x0b\x32\x32.google.cloud.databasecenter.v1beta.BackupDRConfigB\x03\xe0\x41\x01\x12<\n\x07\x65\x64ition\x18\x12 \x01(\x0e\x32+.google.cloud.databasecenter.v1beta.Edition\x12R\n\x10maintenance_info\x18\x13 \x01(\x0b\x32\x33.google.cloud.databasecenter.v1beta.MaintenanceInfoB\x03\xe0\x41\x01\"\xe2\x01\n\x1a\x41ggregateIssueStatsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12T\n\x12signal_type_groups\x18\x03 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.SignalTypeGroupB\x03\xe0\x41\x01\x12\x32\n\rbaseline_date\x18\x04 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x10\n\x0e_baseline_date\"\xcb\x01\n\x1b\x41ggregateIssueStatsResponse\x12N\n\x11issue_group_stats\x18\x01 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.IssueGroupStats\x12\x1d\n\x15total_resources_count\x18\x02 \x01(\x05\x12#\n\x1btotal_resource_groups_count\x18\x03 \x01(\x05\x12\x18\n\x0bunreachable\x18\x04 \x03(\tB\x03\xe0\x41\x06\"\xec\x01\n\x0fIssueGroupStats\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x1d\n\x15resource_groups_count\x18\x02 \x01(\x05\x12\x17\n\x0fresources_count\x18\x03 \x01(\x05\x12%\n\x1dhealthy_resource_groups_count\x18\x04 \x01(\x05\x12\x1f\n\x17healthy_resources_count\x18\x05 \x01(\x05\x12\x43\n\x0bissue_stats\x18\x06 \x03(\x0b\x32..google.cloud.databasecenter.v1beta.IssueStats\"\xb1\x02\n\nIssueStats\x12\x43\n\x0bsignal_type\x18\x01 \x01(\x0e\x32..google.cloud.databasecenter.v1beta.SignalType\x12\x16\n\x0eresource_count\x18\x02 \x01(\x05\x12Q\n\rdelta_details\x18\x03 \x01(\x0b\x32\x30.google.cloud.databasecenter.v1beta.DeltaDetailsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12N\n\x0eissue_severity\x18\x04 \x01(\x0e\x32\x31.google.cloud.databasecenter.v1beta.IssueSeverityH\x01\x88\x01\x01\x42\x10\n\x0e_delta_detailsB\x11\n\x0f_issue_severity\"3\n\x05Label\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\"\xe6\x01\n\x15\x41ggregateFleetRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08group_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x32\n\rbaseline_date\x18\x07 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x10\n\x0e_baseline_date\"\xd3\x01\n\x16\x41ggregateFleetResponse\x12\x43\n\x04rows\x18\x01 \x03(\x0b\x32\x35.google.cloud.databasecenter.v1beta.AggregateFleetRow\x12#\n\x1bresource_groups_total_count\x18\x02 \x01(\x05\x12\x1c\n\x14resource_total_count\x18\x03 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x04 \x01(\t\x12\x18\n\x0bunreachable\x18\x05 \x03(\tB\x03\xe0\x41\x06\"\xf2\x01\n\x11\x41ggregateFleetRow\x12@\n\tdimension\x18\x01 \x03(\x0b\x32-.google.cloud.databasecenter.v1beta.Dimension\x12\x1d\n\x15resource_groups_count\x18\x02 \x01(\x05\x12\x17\n\x0fresources_count\x18\x03 \x01(\x05\x12Q\n\rdelta_details\x18\x04 \x01(\x0b\x32\x30.google.cloud.databasecenter.v1beta.DeltaDetailsB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x10\n\x0e_delta_details\"\xa1\x06\n\tDimension\x12\x13\n\tcontainer\x18\x02 \x01(\tH\x00\x12G\n\x0cproduct_type\x18\x03 \x01(\x0e\x32/.google.cloud.databasecenter.v1beta.ProductTypeH\x00\x12\x44\n\x0eproduct_engine\x18\x04 \x01(\x0e\x32*.google.cloud.databasecenter.v1beta.EngineH\x00\x12\x19\n\x0fproduct_version\x18\x05 \x01(\tH\x00\x12\x12\n\x08location\x18\x06 \x01(\tH\x00\x12\x17\n\rresource_type\x18\x07 \x01(\tH\x00\x12P\n\x11sub_resource_type\x18\x08 \x01(\x0e\x32\x33.google.cloud.databasecenter.v1beta.SubResourceTypeH\x00\x12Q\n\x11resource_category\x18\t \x01(\x0e\x32\x34.google.cloud.databasecenter.v1beta.ResourceCategoryH\x00\x12M\n\x0fmanagement_type\x18\n \x01(\x0e\x32\x32.google.cloud.databasecenter.v1beta.ManagementTypeH\x00\x12>\n\x07\x65\x64ition\x18\x0b \x01(\x0e\x32+.google.cloud.databasecenter.v1beta.EditionH\x00\x12\x11\n\x07tag_key\x18\x0c \x01(\tH\x00\x12\x13\n\ttag_value\x18\r \x01(\tH\x00\x12\x14\n\ntag_source\x18\x0e \x01(\tH\x00\x12\x17\n\rtag_inherited\x18\x0f \x01(\x08H\x00\x12\x13\n\tlabel_key\x18\x10 \x01(\tH\x00\x12\x15\n\x0blabel_value\x18\x11 \x01(\tH\x00\x12\x16\n\x0clabel_source\x18\x12 \x01(\tH\x00\x12\"\n\x18has_maintenance_schedule\x18\x13 \x01(\x08H\x00\x12(\n\x1ehas_deny_maintenance_schedules\x18\x14 \x01(\x08H\x00\x42\x0b\n\tdimension\"D\n\x0e\x42\x61\x63kupDRConfig\x12\x1d\n\x10\x62\x61\x63kupdr_managed\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x13\n\x11_backupdr_managed\"\xe7\x01\n\x12QueryIssuesRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12_\n\x17signal_products_filters\x18\x03 \x03(\x0b\x32\x39.google.cloud.databasecenter.v1beta.SignalProductsFiltersB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xa5\x01\n\x15SignalProductsFilters\x12H\n\x0bsignal_type\x18\x01 \x01(\x0e\x32..google.cloud.databasecenter.v1beta.SignalTypeB\x03\xe0\x41\x01\x12\x42\n\x08products\x18\x02 \x03(\x0b\x32+.google.cloud.databasecenter.v1beta.ProductB\x03\xe0\x41\x01\"\x9c\x01\n\x13QueryIssuesResponse\x12R\n\x0fresource_issues\x18\x01 \x03(\x0b\x32\x39.google.cloud.databasecenter.v1beta.DatabaseResourceIssue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"\x9b\x01\n\x15\x44\x61tabaseResourceIssue\x12:\n\x06signal\x18\x01 \x01(\x0b\x32*.google.cloud.databasecenter.v1beta.Signal\x12\x46\n\x08resource\x18\x02 \x01(\x0b\x32\x34.google.cloud.databasecenter.v1beta.DatabaseResource\"D\n\x03Tag\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x0e\n\x06source\x18\x03 \x01(\t\x12\x11\n\tinherited\x18\x04 \x01(\x08\"\x90\x01\n\x0fResourceDetails\x12\x1a\n\x12\x66ull_resource_name\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12<\n\x07product\x18\x03 \x01(\x0b\x32+.google.cloud.databasecenter.v1beta.Product\x12\x10\n\x08location\x18\x04 \x01(\t\"\xb2\x01\n\x0c\x44\x65ltaDetails\x12P\n\x13increased_resources\x18\x01 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.ResourceDetails\x12P\n\x13\x64\x65\x63reased_resources\x18\x02 \x03(\x0b\x32\x33.google.cloud.databasecenter.v1beta.ResourceDetails*^\n\x10ResourceCategory\x12!\n\x1dRESOURCE_CATEGORY_UNSPECIFIED\x10\x00\x12\x0c\n\x08INSTANCE\x10\x01\x12\x0b\n\x07\x43LUSTER\x10\x02\x12\x0c\n\x08\x44\x41TABASE\x10\x03*m\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45\x44ITION_ENTERPRISE\x10\x01\x12\x1b\n\x17\x45\x44ITION_ENTERPRISE_PLUS\x10\x02\x12\x14\n\x10\x45\x44ITION_STANDARD\x10\x03*\xdd\x01\n\x0fSubResourceType\x12!\n\x1dSUB_RESOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19SUB_RESOURCE_TYPE_PRIMARY\x10\x01\x12\x1f\n\x1bSUB_RESOURCE_TYPE_SECONDARY\x10\x02\x12\"\n\x1eSUB_RESOURCE_TYPE_READ_REPLICA\x10\x03\x12&\n\"SUB_RESOURCE_TYPE_EXTERNAL_PRIMARY\x10\x05\x12\x1b\n\x17SUB_RESOURCE_TYPE_OTHER\x10\x04*t\n\x0eManagementType\x12\x1f\n\x1bMANAGEMENT_TYPE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMANAGEMENT_TYPE_GCP_MANAGED\x10\x01\x12 \n\x1cMANAGEMENT_TYPE_SELF_MANAGED\x10\x02\x32\xff\x07\n\x0e\x44\x61tabaseCenter\x12\xa3\x01\n\rQueryProducts\x12\x38.google.cloud.databasecenter.v1beta.QueryProductsRequest\x1a\x39.google.cloud.databasecenter.v1beta.QueryProductsResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\x12\x15/v1beta:queryProducts\x12\xa7\x01\n\x0e\x41ggregateFleet\x12\x39.google.cloud.databasecenter.v1beta.AggregateFleetRequest\x1a:.google.cloud.databasecenter.v1beta.AggregateFleetResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/v1beta:aggregateFleet\x12\xde\x01\n\x1bQueryDatabaseResourceGroups\x12\x46.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest\x1aG.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsResponse\".\x82\xd3\xe4\x93\x02(\"#/v1beta:queryDatabaseResourceGroups:\x01*\x12\xbe\x01\n\x13\x41ggregateIssueStats\x12>.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest\x1a?.google.cloud.databasecenter.v1beta.AggregateIssueStatsResponse\"&\x82\xd3\xe4\x93\x02 \"\x1b/v1beta:aggregateIssueStats:\x01*\x12\xa7\x01\n\x0bQueryIssues\x12\x36.google.cloud.databasecenter.v1beta.QueryIssuesRequest\x1a\x37.google.cloud.databasecenter.v1beta.QueryIssuesResponse\"\'\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x18\"\x13/v1beta:queryIssues:\x01*\x1aQ\xca\x41\x1d\x64\x61tabasecenter.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfa\x01\n&com.google.cloud.databasecenter.v1betaB\x0cServiceProtoP\x01ZNcloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb\xaa\x02\"Google.Cloud.DatabaseCenter.V1Beta\xca\x02\"Google\\Cloud\\DatabaseCenter\\V1beta\xea\x02%Google::Cloud::DatabaseCenter::V1betab\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -67,6 +67,10 @@ module V1beta AggregateFleetRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.AggregateFleetRow").msgclass Dimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.Dimension").msgclass BackupDRConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.BackupDRConfig").msgclass + QueryIssuesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.QueryIssuesRequest").msgclass + SignalProductsFilters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.SignalProductsFilters").msgclass + QueryIssuesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.QueryIssuesResponse").msgclass + DatabaseResourceIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.DatabaseResourceIssue").msgclass Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.Tag").msgclass ResourceDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.ResourceDetails").msgclass DeltaDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.databasecenter.v1beta.DeltaDetails").msgclass diff --git a/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/service_services_pb.rb b/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/service_services_pb.rb index de7b8e7db0bd..343299edb494 100644 --- a/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/service_services_pb.rb +++ b/google-cloud-database_center-v1beta/lib/google/cloud/databasecenter/v1beta/service_services_pb.rb @@ -43,6 +43,9 @@ class Service rpc :QueryDatabaseResourceGroups, ::Google::Cloud::DatabaseCenter::V1beta::QueryDatabaseResourceGroupsRequest, ::Google::Cloud::DatabaseCenter::V1beta::QueryDatabaseResourceGroupsResponse # AggregateIssueStats provides database resource issues statistics. rpc :AggregateIssueStats, ::Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsRequest, ::Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsResponse + # QueryIssues provides a list of issues and recommendations + # that a user has access to and that are within the requested scope. + rpc :QueryIssues, ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest, ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse end Stub = Service.rpc_stub_class diff --git a/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/maintenance.rb b/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/maintenance.rb index d7cff4cd12e7..d8598a7a6ed1 100644 --- a/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/maintenance.rb +++ b/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/maintenance.rb @@ -69,9 +69,9 @@ class ResourceMaintenanceDenySchedule # @!attribute [rw] deny_maintenance_schedules # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::ResourceMaintenanceDenySchedule>] # Optional. List of Deny maintenance period for the database resource. - # @!attribute [rw] maintenance_version + # @!attribute [r] maintenance_version # @return [::String] - # Optional. Current Maintenance version of the database resource. Example: + # Output only. Current Maintenance version of the database resource. Example: # "MYSQL_8_0_41.R20250531.01_15" class MaintenanceInfo include ::Google::Protobuf::MessageExts diff --git a/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/product.rb b/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/product.rb index a597bc2316eb..53fef53cff44 100644 --- a/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/product.rb +++ b/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/product.rb @@ -95,31 +95,31 @@ module ProductType # didn't provide this field in the request. PRODUCT_TYPE_UNSPECIFIED = 0 - # Cloud SQL product area in GCP + # Cloud SQL product area in Google Cloud PRODUCT_TYPE_CLOUD_SQL = 1 - # AlloyDB product area in GCP + # AlloyDB product area in Google Cloud PRODUCT_TYPE_ALLOYDB = 2 - # Spanner product area in GCP + # Spanner product area in Google Cloud PRODUCT_TYPE_SPANNER = 3 - # Bigtable product area in GCP + # Bigtable product area in Google Cloud PRODUCT_TYPE_BIGTABLE = 6 - # Memorystore product area in GCP + # Memorystore product area in Google Cloud PRODUCT_TYPE_MEMORYSTORE = 7 - # Firestore product area in GCP + # Firestore product area in Google Cloud PRODUCT_TYPE_FIRESTORE = 8 # Compute Engine self managed databases PRODUCT_TYPE_COMPUTE_ENGINE = 9 - # Oracle product area in GCP + # Oracle product area in Google Cloud PRODUCT_TYPE_ORACLE_ON_GCP = 10 - # BigQuery product area in GCP + # BigQuery product area in Google Cloud PRODUCT_TYPE_BIGQUERY = 11 # Other refers to rest of other product type. This is to be when product type diff --git a/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/service.rb b/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/service.rb index f8b08209ec0e..b867f2b31dea 100644 --- a/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/service.rb +++ b/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/service.rb @@ -112,12 +112,12 @@ class QueryProductsResponse # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" - # Example: full_resource_name=~"test" - # Example: full_resource_name=~"test.*master" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` + # Example: `full_resource_name=~"test"` + # Example: `full_resource_name=~"test.*master"` # @!attribute [rw] signal_type_groups # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup>] # Optional. Groups of signal types that are requested. @@ -161,12 +161,13 @@ class QueryProductsResponse # order. It only supports a single field at a time. # # For example: - # order_by = "full_resource_name" sorts response in ascending order - # order_by = "full_resource_name DESC" sorts response in descending order - # order_by = "issue_count DESC" sorts response in descending order of + # `order_by = "full_resource_name"` sorts response in ascending order + # `order_by = "full_resource_name DESC"` sorts response in descending order + # `order_by = "issue_count DESC"` sorts response in descending order of # count of all issues associated with a resource. # - # More explicitly, order_by = "full_resource_name, product" is not supported. + # More explicitly, `order_by = "full_resource_name, product"` is not + # supported. # @!attribute [rw] page_size # @return [::Integer] # Optional. If unspecified, at most 50 resource groups will be returned. @@ -220,7 +221,6 @@ class DatabaseResourceGroup # DatabaseResource represents every individually configured database unit # representing compute and/or storage. - # NextId: 20 # @!attribute [rw] child_resources # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResource>] # List of children associated with a database group. @@ -238,16 +238,17 @@ class DatabaseResourceGroup # `//alloydb.googleapis.com/projects/project-number/locations/us-central1/clusters/c1/instances/i1` # @!attribute [rw] container # @return [::String] - # Specifies where the resource is created. For GCP, it is the full name of - # the project. + # Specifies where the resource is created. For Google Cloud resources, it is + # the full name of the project. # @!attribute [rw] product # @return [::Google::Cloud::DatabaseCenter::V1beta::Product] # The product this resource represents. # @!attribute [rw] location # @return [::String] # The location of the resources. It supports returning only regional - # locations in GCP. These are of the form: "us-central1", "us-east1", etc. - # See https://cloud.google.com/about/locations for a list of such regions. + # locations in Google Cloud. These are of the form: "us-central1", + # "us-east1", etc. See https://cloud.google.com/about/locations for a list of + # such regions. # @!attribute [rw] labels # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::Label>] # Labels applied on the resource. The requirements for labels assigned to @@ -336,10 +337,10 @@ class DatabaseResource # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` # @!attribute [rw] signal_type_groups # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup>] # Optional. Lists of signal types that are issues. @@ -469,10 +470,10 @@ class Label # expression, parentheses must be appropriately used to group the # combinations. # - # Example: location="us-east1" - # Example: container="projects/123" OR container="projects/456" - # Example: (container="projects/123" OR - # container="projects/456") AND location="us-east1" + # Example: `location="us-east1"` + # Example: `container="projects/123" OR container="projects/456"` + # Example: `(container="projects/123" OR + # container="projects/456") AND location="us-east1"` # @!attribute [rw] group_by # @return [::String] # Optional. A field that statistics are grouped by. @@ -504,9 +505,10 @@ class Label # descending order. Add "ASC" after the field name to indicate ascending # order. It supports ordering using multiple fields. # For example: - # order_by = "resource_groups_count" sorts response in ascending order - # order_by = "resource_groups_count DESC" sorts response in descending order - # order_by = "product.type, product.version DESC, location" orders by type + # `order_by = "resource_groups_count"` sorts response in ascending order + # `order_by = "resource_groups_count DESC"` sorts response in descending + # order + # `order_by = "product.type, product.version DESC, location"` orders by type # in ascending order, version in descending order and location in ascending # order # @!attribute [rw] page_size @@ -529,7 +531,8 @@ class AggregateFleetRequest extend ::Google::Protobuf::MessageExts::ClassMethods end - # The response message to aggregate a fleet by some group by fields. + # The response message to aggregate a fleet by some group by + # fields. # @!attribute [rw] rows # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::AggregateFleetRow>] # Represents a row grouped by the fields in the input. @@ -575,8 +578,8 @@ class AggregateFleetRow # Dimension used to aggregate the fleet. # @!attribute [rw] container # @return [::String] - # Specifies where the resource is created. For GCP, it is the full name of - # the project. + # Specifies where the resource is created. For Google Cloud resources, it + # is the full name of the project. # # Note: The following fields are mutually exclusive: `container`, `product_type`, `product_engine`, `product_version`, `location`, `resource_type`, `sub_resource_type`, `resource_category`, `management_type`, `edition`, `tag_key`, `tag_value`, `tag_source`, `tag_inherited`, `label_key`, `label_value`, `label_source`, `has_maintenance_schedule`, `has_deny_maintenance_schedules`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] product_type @@ -597,7 +600,7 @@ class AggregateFleetRow # @!attribute [rw] location # @return [::String] # The location of the resources. It supports returning only regional - # locations in GCP. + # locations in Google Cloud. # # Note: The following fields are mutually exclusive: `location`, `container`, `product_type`, `product_engine`, `product_version`, `resource_type`, `sub_resource_type`, `resource_category`, `management_type`, `edition`, `tag_key`, `tag_value`, `tag_source`, `tag_inherited`, `label_key`, `label_value`, `label_source`, `has_maintenance_schedule`, `has_deny_maintenance_schedules`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] resource_type @@ -690,6 +693,100 @@ class BackupDRConfig extend ::Google::Protobuf::MessageExts::ClassMethods end + # QueryIssuesRequest is the request to get a list of issues. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent can be a project, a folder, or an organization. The list + # is limited to the one attached to resources within the `scope` that a user + # has access to. + # + # The allowed values are: + # + # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar") + # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678") + # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567") + # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456") + # @!attribute [rw] filter + # @return [::String] + # Optional. + # Supported fields are: + # 'product', + # `location`, + # `issue_severity`, + # 'tags', + # 'labels', + # @!attribute [rw] signal_products_filters + # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalProductsFilters>] + # Optional. Filters based on signal and product. The filter list will be ORed + # across pairs and ANDed within a signal and products pair. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Following fields are sortable: + # SignalType + # Product + # Location + # IssueSeverity + # + # The default order is ascending. Add "DESC" after the field name to indicate + # descending order. Add "ASC" after the field name to indicate ascending + # order. It only supports a single field at a time. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. If unspecified, at most 50 issues will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `QueryIssues` call. + # Provide this to retrieve the subsequent page. + # All parameters except page size should match the parameters used in the + # call that provided the page token. + class QueryIssuesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SignalProductsFilters represents a signal and list of supported products. + # @!attribute [rw] signal_type + # @return [::Google::Cloud::DatabaseCenter::V1beta::SignalType] + # Optional. The type of signal. + # @!attribute [rw] products + # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::Product>] + # Optional. Product type of the resource. The version of the product will be + # ignored in filtering. + class SignalProductsFilters + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # QueryIssuesResponse is the response containing a list of issues. + # @!attribute [rw] resource_issues + # @return [::Array<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>] + # List of issues and resource details. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. List of unreachable regions from where data could not be + # retrieved. + class QueryIssuesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DatabaseResource and Issue associated with it. + # @!attribute [rw] signal + # @return [::Google::Cloud::DatabaseCenter::V1beta::Signal] + # Signal associated with the issue. + # @!attribute [rw] resource + # @return [::Google::Cloud::DatabaseCenter::V1beta::DatabaseResource] + # Resource associated with the issue. + class DatabaseResourceIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Tag is a key value pair attached to a resource. # @!attribute [rw] key # @return [::String] @@ -725,8 +822,8 @@ class Tag # Full resource name of the resource. # @!attribute [rw] container # @return [::String] - # Specifies where the resource is created. For GCP, it is the full name of - # the project. + # Specifies where the resource is created. For Google Cloud resources, it is + # the full name of the project. # @!attribute [rw] product # @return [::Google::Cloud::DatabaseCenter::V1beta::Product] # Product type of the resource. diff --git a/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/signals.rb b/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/signals.rb index 397d12ca74ed..526561159aa8 100644 --- a/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/signals.rb +++ b/google-cloud-database_center-v1beta/proto_docs/google/cloud/databasecenter/v1beta/signals.rb @@ -210,8 +210,8 @@ class AdditionalDetail # OPTIONAL # @!attribute [rw] container # @return [::String] - # Specifies where the resource is created. For GCP, it is the full name of - # the project. + # Specifies where the resource is created. For Google Cloud resources, it is + # the full name of the project. class SubResource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -530,19 +530,19 @@ module SignalType # value. SIGNAL_TYPE_LAST_BACKUP_OLD = 7 - # Represents if a resource violates CIS GCP Foundation 2.0. + # Represents if a resource violates CIS Google Cloud Platform Foundation 2.0. SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0 = 8 - # Represents if a resource violates CIS GCP Foundation 1.3. + # Represents if a resource violates CIS Google Cloud Platform Foundation 1.3. SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3 = 9 - # Represents if a resource violates CIS GCP Foundation 1.2. + # Represents if a resource violates CIS Google Cloud Platform Foundation 1.2. SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2 = 10 - # Represents if a resource violates CIS GCP Foundation 1.1. + # Represents if a resource violates CIS Google Cloud Platform Foundation 1.1. SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1 = 11 - # Represents if a resource violates CIS GCP Foundation 1.0. + # Represents if a resource violates CIS Google Cloud Platform Foundation 1.0. SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0 = 12 # Represents if a resource violates CIS Controls 8.0. diff --git a/google-cloud-database_center-v1beta/snippets/database_center/query_issues.rb b/google-cloud-database_center-v1beta/snippets/database_center/query_issues.rb new file mode 100644 index 000000000000..e51d2a134416 --- /dev/null +++ b/google-cloud-database_center-v1beta/snippets/database_center/query_issues.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START databasecenter_v1beta_generated_DatabaseCenter_QueryIssues_sync] +require "google/cloud/database_center/v1beta" + +## +# Snippet for the query_issues call in the DatabaseCenter service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client#query_issues. +# +def query_issues + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new + + # Call the query_issues method. + result = client.query_issues 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::DatabaseCenter::V1beta::DatabaseResourceIssue. + p item + end +end +# [END databasecenter_v1beta_generated_DatabaseCenter_QueryIssues_sync] diff --git a/google-cloud-database_center-v1beta/snippets/snippet_metadata_google.cloud.databasecenter.v1beta.json b/google-cloud-database_center-v1beta/snippets/snippet_metadata_google.cloud.databasecenter.v1beta.json index 8314714769e7..9dbea02850ee 100644 --- a/google-cloud-database_center-v1beta/snippets/snippet_metadata_google.cloud.databasecenter.v1beta.json +++ b/google-cloud-database_center-v1beta/snippets/snippet_metadata_google.cloud.databasecenter.v1beta.json @@ -170,6 +170,46 @@ "type": "FULL" } ] + }, + { + "region_tag": "databasecenter_v1beta_generated_DatabaseCenter_QueryIssues_sync", + "title": "Snippet for the query_issues call in the DatabaseCenter service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client#query_issues.", + "file": "database_center/query_issues.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_issues", + "full_name": "::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client#query_issues", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse", + "client": { + "short_name": "DatabaseCenter::Client", + "full_name": "::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client" + }, + "method": { + "short_name": "QueryIssues", + "full_name": "google.cloud.databasecenter.v1beta.DatabaseCenter.QueryIssues", + "service": { + "short_name": "DatabaseCenter", + "full_name": "google.cloud.databasecenter.v1beta.DatabaseCenter" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-database_center-v1beta/test/google/cloud/database_center/v1beta/database_center_rest_test.rb b/google-cloud-database_center-v1beta/test/google/cloud/database_center/v1beta/database_center_rest_test.rb index c0acb538581c..2450ec74d065 100644 --- a/google-cloud-database_center-v1beta/test/google/cloud/database_center/v1beta/database_center_rest_test.rb +++ b/google-cloud-database_center-v1beta/test/google/cloud/database_center/v1beta/database_center_rest_test.rb @@ -311,6 +311,65 @@ def test_aggregate_issue_stats end end + def test_query_issues + # Create test objects. + client_result = ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + signal_products_filters = [{}] + order_by = "hello world" + page_size = 42 + page_token = "hello world" + + query_issues_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::ServiceStub.stub :transcode_query_issues_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_issues_client_stub do + # Create client + client = ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_issues({ parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_issues parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_issues ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new(parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_issues({ parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_issues(::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new(parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_issues_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-database_center-v1beta/test/google/cloud/database_center/v1beta/database_center_test.rb b/google-cloud-database_center-v1beta/test/google/cloud/database_center/v1beta/database_center_test.rb index b407f275f721..f2497f2947db 100644 --- a/google-cloud-database_center-v1beta/test/google/cloud/database_center/v1beta/database_center_test.rb +++ b/google-cloud-database_center-v1beta/test/google/cloud/database_center/v1beta/database_center_test.rb @@ -346,6 +346,79 @@ def test_aggregate_issue_stats end end + def test_query_issues + # Create GRPC objects. + grpc_response = ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + signal_products_filters = [{}] + order_by = "hello world" + page_size = 42 + page_token = "hello world" + + query_issues_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_issues, name + assert_kind_of ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_kind_of ::Google::Cloud::DatabaseCenter::V1beta::SignalProductsFilters, request["signal_products_filters"].first + assert_equal "hello world", request["order_by"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_issues_client_stub do + # Create client + client = ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_issues({ parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_issues parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_issues ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new(parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_issues({ parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_issues(::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new(parent: parent, filter: filter, signal_products_filters: signal_products_filters, order_by: order_by, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_issues_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure