Class: Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb
Overview
REST 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::Rest::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) {|result, 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) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry
Create a schema registry instance.
-
#create_version(request, options = nil) {|result, 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) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Delete schema config for a subject.
-
#delete_schema_mode(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode
Delete schema mode for a subject.
-
#delete_schema_registry(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Delete a schema registry instance.
-
#delete_subject(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
Delete a subject.
-
#delete_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
Delete a version of a subject.
-
#get_context(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Context
Get the context.
-
#get_raw_schema(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
Get the schema string for the given schema id.
-
#get_raw_schema_version(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
Get the schema string only for a version of a subject.
-
#get_schema(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::Schema
Get the schema for the given schema id.
-
#get_schema_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Get schema config at global level or for a subject.
-
#get_schema_mode(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaMode
Get mode at global level or for a subject.
-
#get_schema_registry(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaRegistry
Get the schema registry instance.
-
#get_version(request, options = nil) {|result, 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 REST client object.
-
#list_contexts(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
List contexts for a schema registry.
-
#list_referenced_schemas(request, options = nil) {|result, 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) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ListSchemaRegistriesResponse
List schema registries.
-
#list_schema_types(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
List the supported schema types.
-
#list_schema_versions(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
List the schema versions for the given schema id.
-
#list_subjects(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
List subjects in the schema registry.
-
#list_subjects_by_schema_id(request, options = nil) {|result, operation| ... } ⇒ ::Google::Api::HttpBody
List subjects which reference a particular schema id.
-
#list_versions(request, options = nil) {|result, 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) {|result, 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) {|result, operation| ... } ⇒ ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::SchemaConfig
Update config at global level or for a subject.
-
#update_schema_mode(request, options = nil) {|result, 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 REST client object.
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 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 176 def initialize # 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 = ::Google::Cloud::ManagedKafka::SchemaRegistry::V1::ManagedSchemaRegistry::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @managed_schema_registry_stub.logger(stub: true)&.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::Rest::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.bindings_override = @config.bindings_override config.logger = @managed_schema_registry_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
232 233 234 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 232 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.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 114 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.
2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 2012 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.check_compatibility request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
146 147 148 149 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 146 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.
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 456 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.create_schema_registry request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1749 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.create_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 2268 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.delete_schema_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 2511 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.delete_schema_mode request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 536 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.delete_schema_registry request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
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 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1299 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.delete_subject request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1837 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.delete_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 615 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.get_context request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 861 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.get_raw_schema request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1564 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.get_raw_schema_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 777 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.get_schema request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 2096 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.get_schema_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
2348 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 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 2348 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.get_schema_mode request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
290 291 292 293 294 295 296 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 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 290 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.get_schema_registry request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1478 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.get_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 694 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.list_contexts request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1919 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.list_referenced_schemas request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 369 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.list_schema_registries request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1031 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.list_schema_types request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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}].
950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 950 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.list_schema_versions request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1123 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.list_subjects request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
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 1240 1241 1242 1243 1244 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1211 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.list_subjects_by_schema_id request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1649 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.list_versions request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
239 240 241 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 239 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.
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 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 1393 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.lookup_version request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
156 157 158 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 156 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.
2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 2188 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.update_schema_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => 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.
2430 2431 2432 2433 2434 2435 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 |
# File 'lib/google/cloud/managed_kafka/schema_registry/v1/managed_schema_registry/rest/client.rb', line 2430 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, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .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.update_schema_mode request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |