Class: Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client
- Inherits:
-
Object
- Object
- Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb
Overview
Client for the ManagedSchemaRegistry service.
SchemaRegistry is a service that allows users to manage schemas for their Kafka clusters. It provides APIs to register, list, and delete schemas, as well as to get the schema for a given schema id or a given version id under a subject, to update the global or subject-specific compatibility mode, and to check the compatibility of a schema against a subject or a version. The main resource hierarchy is as follows:
- SchemaRegistry
- SchemaRegistry/Context
- SchemaRegistry/Context/Schema
- SchemaRegistry/Context/Subject
- SchemaRegistry/Context/Subject/Version
- SchemaRegistry/Config
- SchemaRegistry/Mode
SchemaRegistry is the root resource to represent a schema registry instance. A customer can have multiple schema registry instances in a project.
Context is a context resource that represents a group of schemas, subjects and versions. A schema registry instance can have multiple contexts and always has a 'default' context. Contexts are independent of each other. Context is optional and if not specified, it falls back to the 'default' context.
Schema is a schema resource that represents a unique schema in a context of a schema registry instance. Each schema has a unique schema id, and can be referenced by a version of a subject.
Subject refers to the name under which the schema is registered. A typical subject is the Kafka topic name. A schema registry instance can have multiple subjects.
Version represents a version of a subject. A subject can have multiple versions. Creation of new version of a subject is guarded by the compatibility mode configured globally or for the subject specifically.
Config represents a config at global level cross all registry instances or at subject level. Currently, only compatibility is supported in config.
Mode represents the mode of a schema registry or a specific subject. Three modes are supported:
- READONLY: The schema registry is in read-only mode, no write operations allowed..
- READWRITE: The schema registry is in read-write mode, which allows limited write operations on the schema.
- IMPORT: The schema registry is in import mode, which allows more editing operations on the schema for data importing purposes.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Client
readonly
Get the associated client for mix-in of the Locations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the ManagedSchemaRegistry Client class.
Instance Method Summary collapse
-
#check_compatibility(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse
Check compatibility of a schema with all versions or a specific version of a subject.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the ManagedSchemaRegistry Client instance.
-
#create_schema_registry(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry
Create a schema registry instance.
-
#create_version(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse
Register a new version under a given subject with the given schema.
-
#delete_schema_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Delete schema config for a subject.
-
#delete_schema_mode(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode
Delete schema mode for a subject.
-
#delete_schema_registry(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Delete a schema registry instance.
-
#delete_subject(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
Delete a subject.
-
#delete_version(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
Delete a version of a subject.
-
#get_context(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context
Get the context.
-
#get_raw_schema(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
Get the schema string for the given schema id.
-
#get_raw_schema_version(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
Get the schema string only for a version of a subject.
-
#get_schema(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema
Get the schema for the given schema id.
-
#get_schema_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Get schema config at global level or for a subject.
-
#get_schema_mode(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode
Get mode at global level or for a subject.
-
#get_schema_registry(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry
Get the schema registry instance.
-
#get_version(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion
Get a versioned schema (schema with subject/version) of a subject.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new ManagedSchemaRegistry client object.
-
#list_contexts(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
List contexts for a schema registry.
-
#list_referenced_schemas(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
Get a list of IDs of schemas that reference the schema with the given subject and version.
-
#list_schema_registries(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse
List schema registries.
-
#list_schema_types(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
List the supported schema types.
-
#list_schema_versions(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
List the schema versions for the given schema id.
-
#list_subjects(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
List subjects in the schema registry.
-
#list_subjects_by_schema_id(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
List subjects which reference a particular schema id.
-
#list_versions(request, options = nil) {|response, operation| ... } ⇒ ::Google::Api::HttpBody
Get all versions of a subject.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#lookup_version(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion
Lookup a schema under the specified subject.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_schema_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Update config at global level or for a subject.
-
#update_schema_mode(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode
Update mode at global level or for a subject.
Methods included from Paths
#schema_config_path, #schema_context_path, #schema_mode_path, #schema_path, #schema_registry_path, #schema_subject_path, #schema_version_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new ManagedSchemaRegistry client object.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 174 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/managedkafka/schemaregistry/v1/schema_registry_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @managed_schema_registry_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool, logger: @config.logger ) @managed_schema_registry_stub.stub_logger&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @managed_schema_registry_stub.endpoint config.universe_domain = @managed_schema_registry_stub.universe_domain config.logger = @managed_schema_registry_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Client (readonly)
Get the associated client for mix-in of the Locations.
238 239 240 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 238 def location_client @location_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the ManagedSchemaRegistry Client class.
See Configuration for a description of the configuration fields.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 112 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "ManagedKafka", "SchemaRegistry", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config end yield @configure if block_given? @configure end |
Instance Method Details
#check_compatibility(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse #check_compatibility(name: nil, schema_type: nil, schema: nil, references: nil, verbose: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityResponse
Check compatibility of a schema with all versions or a specific version of a subject.
2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 2159 def check_compatibility request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CheckCompatibilityRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.check_compatibility..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.check_compatibility.timeout, metadata: , retry_policy: @config.rpcs.check_compatibility.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :check_compatibility, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#configure {|config| ... } ⇒ Client::Configuration
Configure the ManagedSchemaRegistry 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 configure.
See Configuration for a description of the configuration fields.
144 145 146 147 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 144 def configure yield @config if block_given? @config end |
#create_schema_registry(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry #create_schema_registry(parent: nil, schema_registry_id: nil, schema_registry: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry
Create a schema registry instance.
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 477 def create_schema_registry request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateSchemaRegistryRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_schema_registry..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_schema_registry.timeout, metadata: , retry_policy: @config.rpcs.create_schema_registry.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :create_schema_registry, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_version(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse #create_version(parent: nil, version: nil, id: nil, schema_type: nil, schema: nil, references: nil, normalize: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionResponse
Register a new version under a given subject with the given schema.
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1875 def create_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::CreateVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_version.timeout, metadata: , retry_policy: @config.rpcs.create_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :create_version, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_schema_config(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig #delete_schema_config(name: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Delete schema config for a subject.
2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 2436 def delete_schema_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_schema_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_schema_config.timeout, metadata: , retry_policy: @config.rpcs.delete_schema_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :delete_schema_config, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_schema_mode(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode #delete_schema_mode(name: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode
Delete schema mode for a subject.
2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 2700 def delete_schema_mode request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaModeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_schema_mode..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_schema_mode.timeout, metadata: , retry_policy: @config.rpcs.delete_schema_mode.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :delete_schema_mode, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_schema_registry(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_schema_registry(name: nil) ⇒ ::Google::Protobuf::Empty
Delete a schema registry instance.
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 564 def delete_schema_registry request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSchemaRegistryRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_schema_registry..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_schema_registry.timeout, metadata: , retry_policy: @config.rpcs.delete_schema_registry.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :delete_schema_registry, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_subject(request, options = nil) ⇒ ::Google::Api::HttpBody #delete_subject(name: nil, permanent: nil) ⇒ ::Google::Api::HttpBody
Delete a subject. The response will be an array of versions of the deleted subject.
1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1390 def delete_subject request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteSubjectRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_subject..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_subject.timeout, metadata: , retry_policy: @config.rpcs.delete_subject.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :delete_subject, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_version(request, options = nil) ⇒ ::Google::Api::HttpBody #delete_version(name: nil, permanent: nil) ⇒ ::Google::Api::HttpBody
Delete a version of a subject. The response will be the deleted version id.
1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1970 def delete_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::DeleteVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_version.timeout, metadata: , retry_policy: @config.rpcs.delete_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :delete_version, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_context(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context #get_context(name: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context
Get the context.
650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 650 def get_context request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetContextRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_context..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_context.timeout, metadata: , retry_policy: @config.rpcs.get_context.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :get_context, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_raw_schema(request, options = nil) ⇒ ::Google::Api::HttpBody #get_raw_schema(name: nil, subject: nil) ⇒ ::Google::Api::HttpBody
Get the schema string for the given schema id. The response will be the schema string.
917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 917 def get_raw_schema request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_raw_schema..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_raw_schema.timeout, metadata: , retry_policy: @config.rpcs.get_raw_schema.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :get_raw_schema, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_raw_schema_version(request, options = nil) ⇒ ::Google::Api::HttpBody #get_raw_schema_version(name: nil, deleted: nil) ⇒ ::Google::Api::HttpBody
Get the schema string only for a version of a subject. The response will be the schema string.
1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1676 def get_raw_schema_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_raw_schema_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_raw_schema_version.timeout, metadata: , retry_policy: @config.rpcs.get_raw_schema_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :get_raw_schema_version, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_schema(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema #get_schema(name: nil, subject: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema
Get the schema for the given schema id.
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 826 def get_schema request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_schema..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_schema.timeout, metadata: , retry_policy: @config.rpcs.get_schema.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :get_schema, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_schema_config(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig #get_schema_config(name: nil, default_to_global: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Get schema config at global level or for a subject.
2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 2250 def get_schema_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_schema_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_schema_config.timeout, metadata: , retry_policy: @config.rpcs.get_schema_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :get_schema_config, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_schema_mode(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode #get_schema_mode(name: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode
Get mode at global level or for a subject.
2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 2523 def get_schema_mode request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaModeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_schema_mode..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_schema_mode.timeout, metadata: , retry_policy: @config.rpcs.get_schema_mode.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :get_schema_mode, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_schema_registry(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry #get_schema_registry(name: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry
Get the schema registry instance.
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 297 def get_schema_registry request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetSchemaRegistryRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_schema_registry..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_schema_registry.timeout, metadata: , retry_policy: @config.rpcs.get_schema_registry.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :get_schema_registry, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_version(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion #get_version(name: nil, deleted: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion
Get a versioned schema (schema with subject/version) of a subject.
1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1583 def get_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::GetVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_version.timeout, metadata: , retry_policy: @config.rpcs.get_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :get_version, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_contexts(request, options = nil) ⇒ ::Google::Api::HttpBody #list_contexts(parent: nil) ⇒ ::Google::Api::HttpBody
List contexts for a schema registry.
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 736 def list_contexts request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListContextsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_contexts..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_contexts.timeout, metadata: , retry_policy: @config.rpcs.list_contexts.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :list_contexts, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_referenced_schemas(request, options = nil) ⇒ ::Google::Api::HttpBody #list_referenced_schemas(parent: nil) ⇒ ::Google::Api::HttpBody
Get a list of IDs of schemas that reference the schema with the given subject and version.
2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 2059 def list_referenced_schemas request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListReferencedSchemasRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_referenced_schemas..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_referenced_schemas.timeout, metadata: , retry_policy: @config.rpcs.list_referenced_schemas.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :list_referenced_schemas, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_schema_registries(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse #list_schema_registries(parent: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse
List schema registries.
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 383 def list_schema_registries request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_schema_registries..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_schema_registries.timeout, metadata: , retry_policy: @config.rpcs.list_schema_registries.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :list_schema_registries, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_schema_types(request, options = nil) ⇒ ::Google::Api::HttpBody #list_schema_types(parent: nil) ⇒ ::Google::Api::HttpBody
List the supported schema types. The response will be an array of schema types.
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1101 def list_schema_types request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaTypesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_schema_types..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_schema_types.timeout, metadata: , retry_policy: @config.rpcs.list_schema_types.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :list_schema_types, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_schema_versions(request, options = nil) ⇒ ::Google::Api::HttpBody #list_schema_versions(parent: nil, subject: nil, deleted: nil) ⇒ ::Google::Api::HttpBody
List the schema versions for the given schema id. The response will be an array of subject-version pairs as: [{"subject":"subject1", "version":1}, {"subject":"subject2", "version":2}].
1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1013 def list_schema_versions request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaVersionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_schema_versions..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_schema_versions.timeout, metadata: , retry_policy: @config.rpcs.list_schema_versions.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :list_schema_versions, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_subjects(request, options = nil) ⇒ ::Google::Api::HttpBody #list_subjects(parent: nil, subject_prefix: nil, deleted: nil) ⇒ ::Google::Api::HttpBody
List subjects in the schema registry. The response will be an array of subject names.
1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1200 def list_subjects request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_subjects..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_subjects.timeout, metadata: , retry_policy: @config.rpcs.list_subjects.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :list_subjects, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_subjects_by_schema_id(request, options = nil) ⇒ ::Google::Api::HttpBody #list_subjects_by_schema_id(parent: nil, subject: nil, deleted: nil) ⇒ ::Google::Api::HttpBody
List subjects which reference a particular schema id. The response will be an array of subject names.
1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1295 def list_subjects_by_schema_id request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSubjectsBySchemaIdRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_subjects_by_schema_id..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_subjects_by_schema_id.timeout, metadata: , retry_policy: @config.rpcs.list_subjects_by_schema_id.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :list_subjects_by_schema_id, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_versions(request, options = nil) ⇒ ::Google::Api::HttpBody #list_versions(parent: nil, deleted: nil) ⇒ ::Google::Api::HttpBody
Get all versions of a subject. The response will be an array of versions of the subject.
1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1768 def list_versions request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListVersionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_versions..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_versions.timeout, metadata: , retry_policy: @config.rpcs.list_versions.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :list_versions, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
245 246 247 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 245 def logger @managed_schema_registry_stub.logger end |
#lookup_version(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion #lookup_version(parent: nil, schema_type: nil, schema: nil, references: nil, normalize: nil, deleted: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaVersion
Lookup a schema under the specified subject.
1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 1491 def lookup_version request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::LookupVersionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.lookup_version..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.lookup_version.timeout, metadata: , retry_policy: @config.rpcs.lookup_version.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :lookup_version, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
154 155 156 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 154 def universe_domain @managed_schema_registry_stub.universe_domain end |
#update_schema_config(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig #update_schema_config(name: nil, compatibility: nil, normalize: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Update config at global level or for a subject. Creates a SchemaSubject-level SchemaConfig if it does not exist.
2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 2349 def update_schema_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_schema_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_schema_config.timeout, metadata: , retry_policy: @config.rpcs.update_schema_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :update_schema_config, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_schema_mode(request, options = nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode #update_schema_mode(name: nil, mode: nil) ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode
Update mode at global level or for a subject.
2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/client.rb', line 2612 def update_schema_mode request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::UpdateSchemaModeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_schema_mode..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_schema_mode.timeout, metadata: , retry_policy: @config.rpcs.update_schema_mode.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @managed_schema_registry_stub.call_rpc :update_schema_mode, request, options: do |response, operation| yield response, operation if block_given? end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |