google-apis-managedkafka_v1 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1658,6 +1658,1782 @@ module Google
1658
1658
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1659
1659
  execute_or_queue_command(command, &block)
1660
1660
  end
1661
+
1662
+ # Create a schema registry instance.
1663
+ # @param [String] parent
1664
+ # Required. The parent whose schema registry instance is to be created.
1665
+ # Structured like: `projects/`project`/locations/`location``
1666
+ # @param [Google::Apis::ManagedkafkaV1::CreateSchemaRegistryRequest] create_schema_registry_request_object
1667
+ # @param [String] fields
1668
+ # Selector specifying which fields to include in a partial response.
1669
+ # @param [String] quota_user
1670
+ # Available to use for quota purposes for server-side applications. Can be any
1671
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1672
+ # @param [Google::Apis::RequestOptions] options
1673
+ # Request-specific options
1674
+ #
1675
+ # @yield [result, err] Result & error if block supplied
1676
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaRegistry] parsed result object
1677
+ # @yieldparam err [StandardError] error object if request failed
1678
+ #
1679
+ # @return [Google::Apis::ManagedkafkaV1::SchemaRegistry]
1680
+ #
1681
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1682
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1683
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1684
+ def create_schema_registry(parent, create_schema_registry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1685
+ command = make_simple_command(:post, 'v1/{+parent}/schemaRegistries', options)
1686
+ command.request_representation = Google::Apis::ManagedkafkaV1::CreateSchemaRegistryRequest::Representation
1687
+ command.request_object = create_schema_registry_request_object
1688
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaRegistry::Representation
1689
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaRegistry
1690
+ command.params['parent'] = parent unless parent.nil?
1691
+ command.query['fields'] = fields unless fields.nil?
1692
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1693
+ execute_or_queue_command(command, &block)
1694
+ end
1695
+
1696
+ # Delete a schema registry instance.
1697
+ # @param [String] name
1698
+ # Required. The name of the schema registry instance to delete. Structured like:
1699
+ # `projects/`project`/locations/`location`/schemaRegistries/`schema_registry``
1700
+ # @param [String] fields
1701
+ # Selector specifying which fields to include in a partial response.
1702
+ # @param [String] quota_user
1703
+ # Available to use for quota purposes for server-side applications. Can be any
1704
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1705
+ # @param [Google::Apis::RequestOptions] options
1706
+ # Request-specific options
1707
+ #
1708
+ # @yield [result, err] Result & error if block supplied
1709
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::Empty] parsed result object
1710
+ # @yieldparam err [StandardError] error object if request failed
1711
+ #
1712
+ # @return [Google::Apis::ManagedkafkaV1::Empty]
1713
+ #
1714
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1715
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1716
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1717
+ def delete_project_location_schema_registry(name, fields: nil, quota_user: nil, options: nil, &block)
1718
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1719
+ command.response_representation = Google::Apis::ManagedkafkaV1::Empty::Representation
1720
+ command.response_class = Google::Apis::ManagedkafkaV1::Empty
1721
+ command.params['name'] = name unless name.nil?
1722
+ command.query['fields'] = fields unless fields.nil?
1723
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1724
+ execute_or_queue_command(command, &block)
1725
+ end
1726
+
1727
+ # Get the schema registry instance.
1728
+ # @param [String] name
1729
+ # Required. The name of the schema registry instance to return. Structured like:
1730
+ # `projects/`project`/locations/`location`/schemaRegistries/`schema_registry``
1731
+ # @param [String] fields
1732
+ # Selector specifying which fields to include in a partial response.
1733
+ # @param [String] quota_user
1734
+ # Available to use for quota purposes for server-side applications. Can be any
1735
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1736
+ # @param [Google::Apis::RequestOptions] options
1737
+ # Request-specific options
1738
+ #
1739
+ # @yield [result, err] Result & error if block supplied
1740
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaRegistry] parsed result object
1741
+ # @yieldparam err [StandardError] error object if request failed
1742
+ #
1743
+ # @return [Google::Apis::ManagedkafkaV1::SchemaRegistry]
1744
+ #
1745
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1746
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1747
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1748
+ def get_project_location_schema_registry(name, fields: nil, quota_user: nil, options: nil, &block)
1749
+ command = make_simple_command(:get, 'v1/{+name}', options)
1750
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaRegistry::Representation
1751
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaRegistry
1752
+ command.params['name'] = name unless name.nil?
1753
+ command.query['fields'] = fields unless fields.nil?
1754
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1755
+ execute_or_queue_command(command, &block)
1756
+ end
1757
+
1758
+ # List schema registries.
1759
+ # @param [String] parent
1760
+ # Required. The parent whose schema registry instances are to be listed.
1761
+ # Structured like: `projects/`project`/locations/`location``
1762
+ # @param [String] fields
1763
+ # Selector specifying which fields to include in a partial response.
1764
+ # @param [String] quota_user
1765
+ # Available to use for quota purposes for server-side applications. Can be any
1766
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1767
+ # @param [Google::Apis::RequestOptions] options
1768
+ # Request-specific options
1769
+ #
1770
+ # @yield [result, err] Result & error if block supplied
1771
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::ListSchemaRegistriesResponse] parsed result object
1772
+ # @yieldparam err [StandardError] error object if request failed
1773
+ #
1774
+ # @return [Google::Apis::ManagedkafkaV1::ListSchemaRegistriesResponse]
1775
+ #
1776
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1777
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1778
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1779
+ def list_project_location_schema_registries(parent, fields: nil, quota_user: nil, options: nil, &block)
1780
+ command = make_simple_command(:get, 'v1/{+parent}/schemaRegistries', options)
1781
+ command.response_representation = Google::Apis::ManagedkafkaV1::ListSchemaRegistriesResponse::Representation
1782
+ command.response_class = Google::Apis::ManagedkafkaV1::ListSchemaRegistriesResponse
1783
+ command.params['parent'] = parent unless parent.nil?
1784
+ command.query['fields'] = fields unless fields.nil?
1785
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1786
+ execute_or_queue_command(command, &block)
1787
+ end
1788
+
1789
+ # Check compatibility of a schema with all versions or a specific version of a
1790
+ # subject.
1791
+ # @param [String] name
1792
+ # Required. The name of the resource to check compatibility for. The format is
1793
+ # either of following: * projects/`project`/locations/`location`/
1794
+ # schemaRegistries/`schema_registry`/compatibility/subjects/*/versions: Check
1795
+ # compatibility with one or more versions of the specified subject. * projects/`
1796
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/compatibility/
1797
+ # subjects/`subject`/versions/`version`: Check compatibility with a specific
1798
+ # version of the subject.
1799
+ # @param [Google::Apis::ManagedkafkaV1::CheckCompatibilityRequest] check_compatibility_request_object
1800
+ # @param [String] fields
1801
+ # Selector specifying which fields to include in a partial response.
1802
+ # @param [String] quota_user
1803
+ # Available to use for quota purposes for server-side applications. Can be any
1804
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1805
+ # @param [Google::Apis::RequestOptions] options
1806
+ # Request-specific options
1807
+ #
1808
+ # @yield [result, err] Result & error if block supplied
1809
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::CheckCompatibilityResponse] parsed result object
1810
+ # @yieldparam err [StandardError] error object if request failed
1811
+ #
1812
+ # @return [Google::Apis::ManagedkafkaV1::CheckCompatibilityResponse]
1813
+ #
1814
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1815
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1816
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1817
+ def check_project_location_schema_registry_compatibility_compatibility(name, check_compatibility_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1818
+ command = make_simple_command(:post, 'v1/{+name}', options)
1819
+ command.request_representation = Google::Apis::ManagedkafkaV1::CheckCompatibilityRequest::Representation
1820
+ command.request_object = check_compatibility_request_object
1821
+ command.response_representation = Google::Apis::ManagedkafkaV1::CheckCompatibilityResponse::Representation
1822
+ command.response_class = Google::Apis::ManagedkafkaV1::CheckCompatibilityResponse
1823
+ command.params['name'] = name unless name.nil?
1824
+ command.query['fields'] = fields unless fields.nil?
1825
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1826
+ execute_or_queue_command(command, &block)
1827
+ end
1828
+
1829
+ # Delete schema config for a subject.
1830
+ # @param [String] name
1831
+ # Required. The resource name of subject to delete the config for. The format is
1832
+ # * projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
1833
+ # config/`subject`
1834
+ # @param [String] fields
1835
+ # Selector specifying which fields to include in a partial response.
1836
+ # @param [String] quota_user
1837
+ # Available to use for quota purposes for server-side applications. Can be any
1838
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1839
+ # @param [Google::Apis::RequestOptions] options
1840
+ # Request-specific options
1841
+ #
1842
+ # @yield [result, err] Result & error if block supplied
1843
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaConfig] parsed result object
1844
+ # @yieldparam err [StandardError] error object if request failed
1845
+ #
1846
+ # @return [Google::Apis::ManagedkafkaV1::SchemaConfig]
1847
+ #
1848
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1849
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1850
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1851
+ def delete_project_location_schema_registry_config(name, fields: nil, quota_user: nil, options: nil, &block)
1852
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1853
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaConfig::Representation
1854
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaConfig
1855
+ command.params['name'] = name unless name.nil?
1856
+ command.query['fields'] = fields unless fields.nil?
1857
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1858
+ execute_or_queue_command(command, &block)
1859
+ end
1860
+
1861
+ # Get schema config at global level or for a subject.
1862
+ # @param [String] name
1863
+ # Required. The resource name to get the config for. It can be either of
1864
+ # following: * projects/`project`/locations/`location`/schemaRegistries/`
1865
+ # schema_registry`/config: Get config at global level. * projects/`project`/
1866
+ # locations/`location`/schemaRegistries/`schema_registry`/config/`subject`: Get
1867
+ # config for a specific subject.
1868
+ # @param [Boolean] default_to_global
1869
+ # Optional. If true, the config will fall back to the config at the global level
1870
+ # if no subject level config is found.
1871
+ # @param [String] fields
1872
+ # Selector specifying which fields to include in a partial response.
1873
+ # @param [String] quota_user
1874
+ # Available to use for quota purposes for server-side applications. Can be any
1875
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1876
+ # @param [Google::Apis::RequestOptions] options
1877
+ # Request-specific options
1878
+ #
1879
+ # @yield [result, err] Result & error if block supplied
1880
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaConfig] parsed result object
1881
+ # @yieldparam err [StandardError] error object if request failed
1882
+ #
1883
+ # @return [Google::Apis::ManagedkafkaV1::SchemaConfig]
1884
+ #
1885
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1886
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1887
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1888
+ def get_project_location_schema_registry_config(name, default_to_global: nil, fields: nil, quota_user: nil, options: nil, &block)
1889
+ command = make_simple_command(:get, 'v1/{+name}', options)
1890
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaConfig::Representation
1891
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaConfig
1892
+ command.params['name'] = name unless name.nil?
1893
+ command.query['defaultToGlobal'] = default_to_global unless default_to_global.nil?
1894
+ command.query['fields'] = fields unless fields.nil?
1895
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1896
+ execute_or_queue_command(command, &block)
1897
+ end
1898
+
1899
+ # Update config at global level or for a subject. Creates a SchemaSubject-level
1900
+ # SchemaConfig if it does not exist.
1901
+ # @param [String] name
1902
+ # Required. The resource name to update the config for. It can be either of
1903
+ # following: * projects/`project`/locations/`location`/schemaRegistries/`
1904
+ # schema_registry`/config: Update config at global level. * projects/`project`/
1905
+ # locations/`location`/schemaRegistries/`schema_registry`/config/`subject`:
1906
+ # Update config for a specific subject.
1907
+ # @param [Google::Apis::ManagedkafkaV1::UpdateSchemaConfigRequest] update_schema_config_request_object
1908
+ # @param [String] fields
1909
+ # Selector specifying which fields to include in a partial response.
1910
+ # @param [String] quota_user
1911
+ # Available to use for quota purposes for server-side applications. Can be any
1912
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1913
+ # @param [Google::Apis::RequestOptions] options
1914
+ # Request-specific options
1915
+ #
1916
+ # @yield [result, err] Result & error if block supplied
1917
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaConfig] parsed result object
1918
+ # @yieldparam err [StandardError] error object if request failed
1919
+ #
1920
+ # @return [Google::Apis::ManagedkafkaV1::SchemaConfig]
1921
+ #
1922
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1923
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1924
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1925
+ def update_project_location_schema_registry_config(name, update_schema_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1926
+ command = make_simple_command(:put, 'v1/{+name}', options)
1927
+ command.request_representation = Google::Apis::ManagedkafkaV1::UpdateSchemaConfigRequest::Representation
1928
+ command.request_object = update_schema_config_request_object
1929
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaConfig::Representation
1930
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaConfig
1931
+ command.params['name'] = name unless name.nil?
1932
+ command.query['fields'] = fields unless fields.nil?
1933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1934
+ execute_or_queue_command(command, &block)
1935
+ end
1936
+
1937
+ # Get the context.
1938
+ # @param [String] name
1939
+ # Required. The name of the context to return. Structured like: `projects/`
1940
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/contexts/`
1941
+ # context``
1942
+ # @param [String] fields
1943
+ # Selector specifying which fields to include in a partial response.
1944
+ # @param [String] quota_user
1945
+ # Available to use for quota purposes for server-side applications. Can be any
1946
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1947
+ # @param [Google::Apis::RequestOptions] options
1948
+ # Request-specific options
1949
+ #
1950
+ # @yield [result, err] Result & error if block supplied
1951
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::Context] parsed result object
1952
+ # @yieldparam err [StandardError] error object if request failed
1953
+ #
1954
+ # @return [Google::Apis::ManagedkafkaV1::Context]
1955
+ #
1956
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1957
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1958
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1959
+ def get_project_location_schema_registry_context(name, fields: nil, quota_user: nil, options: nil, &block)
1960
+ command = make_simple_command(:get, 'v1/{+name}', options)
1961
+ command.response_representation = Google::Apis::ManagedkafkaV1::Context::Representation
1962
+ command.response_class = Google::Apis::ManagedkafkaV1::Context
1963
+ command.params['name'] = name unless name.nil?
1964
+ command.query['fields'] = fields unless fields.nil?
1965
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1966
+ execute_or_queue_command(command, &block)
1967
+ end
1968
+
1969
+ # List contexts for a schema registry.
1970
+ # @param [String] parent
1971
+ # Required. The parent of the contexts. Structured like: `projects/`project`/
1972
+ # locations/`location`/schemaRegistries/`schema_registry``
1973
+ # @param [String] fields
1974
+ # Selector specifying which fields to include in a partial response.
1975
+ # @param [String] quota_user
1976
+ # Available to use for quota purposes for server-side applications. Can be any
1977
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1978
+ # @param [Google::Apis::RequestOptions] options
1979
+ # Request-specific options
1980
+ #
1981
+ # @yield [result, err] Result & error if block supplied
1982
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
1983
+ # @yieldparam err [StandardError] error object if request failed
1984
+ #
1985
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
1986
+ #
1987
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1988
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1989
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1990
+ def list_project_location_schema_registry_contexts(parent, fields: nil, quota_user: nil, options: nil, &block)
1991
+ command = make_simple_command(:get, 'v1/{+parent}/contexts', options)
1992
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
1993
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
1994
+ command.params['parent'] = parent unless parent.nil?
1995
+ command.query['fields'] = fields unless fields.nil?
1996
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1997
+ execute_or_queue_command(command, &block)
1998
+ end
1999
+
2000
+ # Check compatibility of a schema with all versions or a specific version of a
2001
+ # subject.
2002
+ # @param [String] name
2003
+ # Required. The name of the resource to check compatibility for. The format is
2004
+ # either of following: * projects/`project`/locations/`location`/
2005
+ # schemaRegistries/`schema_registry`/compatibility/subjects/*/versions: Check
2006
+ # compatibility with one or more versions of the specified subject. * projects/`
2007
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/compatibility/
2008
+ # subjects/`subject`/versions/`version`: Check compatibility with a specific
2009
+ # version of the subject.
2010
+ # @param [Google::Apis::ManagedkafkaV1::CheckCompatibilityRequest] check_compatibility_request_object
2011
+ # @param [String] fields
2012
+ # Selector specifying which fields to include in a partial response.
2013
+ # @param [String] quota_user
2014
+ # Available to use for quota purposes for server-side applications. Can be any
2015
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2016
+ # @param [Google::Apis::RequestOptions] options
2017
+ # Request-specific options
2018
+ #
2019
+ # @yield [result, err] Result & error if block supplied
2020
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::CheckCompatibilityResponse] parsed result object
2021
+ # @yieldparam err [StandardError] error object if request failed
2022
+ #
2023
+ # @return [Google::Apis::ManagedkafkaV1::CheckCompatibilityResponse]
2024
+ #
2025
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2026
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2027
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2028
+ def check_project_location_schema_registry_context_compatibility_compatibility(name, check_compatibility_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2029
+ command = make_simple_command(:post, 'v1/{+name}', options)
2030
+ command.request_representation = Google::Apis::ManagedkafkaV1::CheckCompatibilityRequest::Representation
2031
+ command.request_object = check_compatibility_request_object
2032
+ command.response_representation = Google::Apis::ManagedkafkaV1::CheckCompatibilityResponse::Representation
2033
+ command.response_class = Google::Apis::ManagedkafkaV1::CheckCompatibilityResponse
2034
+ command.params['name'] = name unless name.nil?
2035
+ command.query['fields'] = fields unless fields.nil?
2036
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2037
+ execute_or_queue_command(command, &block)
2038
+ end
2039
+
2040
+ # Delete schema config for a subject.
2041
+ # @param [String] name
2042
+ # Required. The resource name of subject to delete the config for. The format is
2043
+ # * projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
2044
+ # config/`subject`
2045
+ # @param [String] fields
2046
+ # Selector specifying which fields to include in a partial response.
2047
+ # @param [String] quota_user
2048
+ # Available to use for quota purposes for server-side applications. Can be any
2049
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2050
+ # @param [Google::Apis::RequestOptions] options
2051
+ # Request-specific options
2052
+ #
2053
+ # @yield [result, err] Result & error if block supplied
2054
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaConfig] parsed result object
2055
+ # @yieldparam err [StandardError] error object if request failed
2056
+ #
2057
+ # @return [Google::Apis::ManagedkafkaV1::SchemaConfig]
2058
+ #
2059
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2060
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2061
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2062
+ def delete_project_location_schema_registry_context_config(name, fields: nil, quota_user: nil, options: nil, &block)
2063
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2064
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaConfig::Representation
2065
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaConfig
2066
+ command.params['name'] = name unless name.nil?
2067
+ command.query['fields'] = fields unless fields.nil?
2068
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2069
+ execute_or_queue_command(command, &block)
2070
+ end
2071
+
2072
+ # Get schema config at global level or for a subject.
2073
+ # @param [String] name
2074
+ # Required. The resource name to get the config for. It can be either of
2075
+ # following: * projects/`project`/locations/`location`/schemaRegistries/`
2076
+ # schema_registry`/config: Get config at global level. * projects/`project`/
2077
+ # locations/`location`/schemaRegistries/`schema_registry`/config/`subject`: Get
2078
+ # config for a specific subject.
2079
+ # @param [Boolean] default_to_global
2080
+ # Optional. If true, the config will fall back to the config at the global level
2081
+ # if no subject level config is found.
2082
+ # @param [String] fields
2083
+ # Selector specifying which fields to include in a partial response.
2084
+ # @param [String] quota_user
2085
+ # Available to use for quota purposes for server-side applications. Can be any
2086
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2087
+ # @param [Google::Apis::RequestOptions] options
2088
+ # Request-specific options
2089
+ #
2090
+ # @yield [result, err] Result & error if block supplied
2091
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaConfig] parsed result object
2092
+ # @yieldparam err [StandardError] error object if request failed
2093
+ #
2094
+ # @return [Google::Apis::ManagedkafkaV1::SchemaConfig]
2095
+ #
2096
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2097
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2098
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2099
+ def get_project_location_schema_registry_context_config(name, default_to_global: nil, fields: nil, quota_user: nil, options: nil, &block)
2100
+ command = make_simple_command(:get, 'v1/{+name}', options)
2101
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaConfig::Representation
2102
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaConfig
2103
+ command.params['name'] = name unless name.nil?
2104
+ command.query['defaultToGlobal'] = default_to_global unless default_to_global.nil?
2105
+ command.query['fields'] = fields unless fields.nil?
2106
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2107
+ execute_or_queue_command(command, &block)
2108
+ end
2109
+
2110
+ # Update config at global level or for a subject. Creates a SchemaSubject-level
2111
+ # SchemaConfig if it does not exist.
2112
+ # @param [String] name
2113
+ # Required. The resource name to update the config for. It can be either of
2114
+ # following: * projects/`project`/locations/`location`/schemaRegistries/`
2115
+ # schema_registry`/config: Update config at global level. * projects/`project`/
2116
+ # locations/`location`/schemaRegistries/`schema_registry`/config/`subject`:
2117
+ # Update config for a specific subject.
2118
+ # @param [Google::Apis::ManagedkafkaV1::UpdateSchemaConfigRequest] update_schema_config_request_object
2119
+ # @param [String] fields
2120
+ # Selector specifying which fields to include in a partial response.
2121
+ # @param [String] quota_user
2122
+ # Available to use for quota purposes for server-side applications. Can be any
2123
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2124
+ # @param [Google::Apis::RequestOptions] options
2125
+ # Request-specific options
2126
+ #
2127
+ # @yield [result, err] Result & error if block supplied
2128
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaConfig] parsed result object
2129
+ # @yieldparam err [StandardError] error object if request failed
2130
+ #
2131
+ # @return [Google::Apis::ManagedkafkaV1::SchemaConfig]
2132
+ #
2133
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2134
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2135
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2136
+ def update_project_location_schema_registry_context_config(name, update_schema_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2137
+ command = make_simple_command(:put, 'v1/{+name}', options)
2138
+ command.request_representation = Google::Apis::ManagedkafkaV1::UpdateSchemaConfigRequest::Representation
2139
+ command.request_object = update_schema_config_request_object
2140
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaConfig::Representation
2141
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaConfig
2142
+ command.params['name'] = name unless name.nil?
2143
+ command.query['fields'] = fields unless fields.nil?
2144
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2145
+ execute_or_queue_command(command, &block)
2146
+ end
2147
+
2148
+ # Delete schema mode for a subject.
2149
+ # @param [String] name
2150
+ # Required. The resource name of subject to delete the mode for. The format is *
2151
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
2152
+ # mode/`subject` * projects/`project`/locations/`location`/schemaRegistries/`
2153
+ # schema_registry`/contexts/`context`/mode/`subject`
2154
+ # @param [String] fields
2155
+ # Selector specifying which fields to include in a partial response.
2156
+ # @param [String] quota_user
2157
+ # Available to use for quota purposes for server-side applications. Can be any
2158
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2159
+ # @param [Google::Apis::RequestOptions] options
2160
+ # Request-specific options
2161
+ #
2162
+ # @yield [result, err] Result & error if block supplied
2163
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaMode] parsed result object
2164
+ # @yieldparam err [StandardError] error object if request failed
2165
+ #
2166
+ # @return [Google::Apis::ManagedkafkaV1::SchemaMode]
2167
+ #
2168
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2169
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2170
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2171
+ def delete_project_location_schema_registry_context_mode(name, fields: nil, quota_user: nil, options: nil, &block)
2172
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2173
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaMode::Representation
2174
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaMode
2175
+ command.params['name'] = name unless name.nil?
2176
+ command.query['fields'] = fields unless fields.nil?
2177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2178
+ execute_or_queue_command(command, &block)
2179
+ end
2180
+
2181
+ # Get mode at global level or for a subject.
2182
+ # @param [String] name
2183
+ # Required. The resource name of the mode. The format is * projects/`project`/
2184
+ # locations/`location`/schemaRegistries/`schema_registry`/mode/`subject`: mode
2185
+ # for a schema registry, or * projects/`project`/locations/`location`/
2186
+ # schemaRegistries/`schema_registry`/contexts/`context`/mode/`subject`: mode for
2187
+ # a specific subject in a specific context
2188
+ # @param [String] fields
2189
+ # Selector specifying which fields to include in a partial response.
2190
+ # @param [String] quota_user
2191
+ # Available to use for quota purposes for server-side applications. Can be any
2192
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2193
+ # @param [Google::Apis::RequestOptions] options
2194
+ # Request-specific options
2195
+ #
2196
+ # @yield [result, err] Result & error if block supplied
2197
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaMode] parsed result object
2198
+ # @yieldparam err [StandardError] error object if request failed
2199
+ #
2200
+ # @return [Google::Apis::ManagedkafkaV1::SchemaMode]
2201
+ #
2202
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2203
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2204
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2205
+ def get_project_location_schema_registry_context_mode(name, fields: nil, quota_user: nil, options: nil, &block)
2206
+ command = make_simple_command(:get, 'v1/{+name}', options)
2207
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaMode::Representation
2208
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaMode
2209
+ command.params['name'] = name unless name.nil?
2210
+ command.query['fields'] = fields unless fields.nil?
2211
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2212
+ execute_or_queue_command(command, &block)
2213
+ end
2214
+
2215
+ # Update mode at global level or for a subject.
2216
+ # @param [String] name
2217
+ # Required. The resource name of the mode. The format is * projects/`project`/
2218
+ # locations/`location`/schemaRegistries/`schema_registry`/mode/`subject`: mode
2219
+ # for a schema registry, or * projects/`project`/locations/`location`/
2220
+ # schemaRegistries/`schema_registry`/contexts/`context`/mode/`subject`: mode for
2221
+ # a specific subject in a specific context
2222
+ # @param [Google::Apis::ManagedkafkaV1::UpdateSchemaModeRequest] update_schema_mode_request_object
2223
+ # @param [String] fields
2224
+ # Selector specifying which fields to include in a partial response.
2225
+ # @param [String] quota_user
2226
+ # Available to use for quota purposes for server-side applications. Can be any
2227
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2228
+ # @param [Google::Apis::RequestOptions] options
2229
+ # Request-specific options
2230
+ #
2231
+ # @yield [result, err] Result & error if block supplied
2232
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaMode] parsed result object
2233
+ # @yieldparam err [StandardError] error object if request failed
2234
+ #
2235
+ # @return [Google::Apis::ManagedkafkaV1::SchemaMode]
2236
+ #
2237
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2238
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2239
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2240
+ def update_project_location_schema_registry_context_mode(name, update_schema_mode_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2241
+ command = make_simple_command(:put, 'v1/{+name}', options)
2242
+ command.request_representation = Google::Apis::ManagedkafkaV1::UpdateSchemaModeRequest::Representation
2243
+ command.request_object = update_schema_mode_request_object
2244
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaMode::Representation
2245
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaMode
2246
+ command.params['name'] = name unless name.nil?
2247
+ command.query['fields'] = fields unless fields.nil?
2248
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2249
+ execute_or_queue_command(command, &block)
2250
+ end
2251
+
2252
+ # Get the schema for the given schema id.
2253
+ # @param [String] name
2254
+ # Required. The name of the schema to return. Structured like: `projects/`
2255
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/schemas/ids/`
2256
+ # schema``
2257
+ # @param [String] subject
2258
+ # Optional. Used to limit the search for the schema ID to a specific subject,
2259
+ # otherwise the schema ID will be searched for in all subjects in the given
2260
+ # specified context.
2261
+ # @param [String] fields
2262
+ # Selector specifying which fields to include in a partial response.
2263
+ # @param [String] quota_user
2264
+ # Available to use for quota purposes for server-side applications. Can be any
2265
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2266
+ # @param [Google::Apis::RequestOptions] options
2267
+ # Request-specific options
2268
+ #
2269
+ # @yield [result, err] Result & error if block supplied
2270
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::Schema] parsed result object
2271
+ # @yieldparam err [StandardError] error object if request failed
2272
+ #
2273
+ # @return [Google::Apis::ManagedkafkaV1::Schema]
2274
+ #
2275
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2276
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2277
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2278
+ def get_project_location_schema_registry_context_schema(name, subject: nil, fields: nil, quota_user: nil, options: nil, &block)
2279
+ command = make_simple_command(:get, 'v1/{+name}', options)
2280
+ command.response_representation = Google::Apis::ManagedkafkaV1::Schema::Representation
2281
+ command.response_class = Google::Apis::ManagedkafkaV1::Schema
2282
+ command.params['name'] = name unless name.nil?
2283
+ command.query['subject'] = subject unless subject.nil?
2284
+ command.query['fields'] = fields unless fields.nil?
2285
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2286
+ execute_or_queue_command(command, &block)
2287
+ end
2288
+
2289
+ # Get the schema string for the given schema id. The response will be the schema
2290
+ # string.
2291
+ # @param [String] name
2292
+ # Required. The name of the schema to return. Structured like: `projects/`
2293
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/schemas/ids/`
2294
+ # schema``
2295
+ # @param [String] subject
2296
+ # Optional. Used to limit the search for the schema ID to a specific subject,
2297
+ # otherwise the schema ID will be searched for in all subjects in the given
2298
+ # specified context.
2299
+ # @param [String] fields
2300
+ # Selector specifying which fields to include in a partial response.
2301
+ # @param [String] quota_user
2302
+ # Available to use for quota purposes for server-side applications. Can be any
2303
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2304
+ # @param [Google::Apis::RequestOptions] options
2305
+ # Request-specific options
2306
+ #
2307
+ # @yield [result, err] Result & error if block supplied
2308
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2309
+ # @yieldparam err [StandardError] error object if request failed
2310
+ #
2311
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2312
+ #
2313
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2314
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2315
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2316
+ def get_project_location_schema_registry_context_schema_schema(name, subject: nil, fields: nil, quota_user: nil, options: nil, &block)
2317
+ command = make_simple_command(:get, 'v1/{+name}/schema', options)
2318
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2319
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2320
+ command.params['name'] = name unless name.nil?
2321
+ command.query['subject'] = subject unless subject.nil?
2322
+ command.query['fields'] = fields unless fields.nil?
2323
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2324
+ execute_or_queue_command(command, &block)
2325
+ end
2326
+
2327
+ # List subjects which reference a particular schema id. The response will be an
2328
+ # array of subject names.
2329
+ # @param [String] parent
2330
+ # Required. The schema resource whose associated subjects are to be listed.
2331
+ # Structured like: `projects/`project`/locations/`location`/schemaRegistries/`
2332
+ # schema_registry`/schemas/ids/`schema`` or `projects/`project`/locations/`
2333
+ # location`/schemaRegistries/`schema_registry`/contexts/`context`/schemas/ids/`
2334
+ # schema``
2335
+ # @param [Boolean] deleted
2336
+ # Optional. If true, the response will include soft-deleted subjects. The
2337
+ # default is false.
2338
+ # @param [String] subject
2339
+ # Optional. The subject to filter the subjects by.
2340
+ # @param [String] fields
2341
+ # Selector specifying which fields to include in a partial response.
2342
+ # @param [String] quota_user
2343
+ # Available to use for quota purposes for server-side applications. Can be any
2344
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2345
+ # @param [Google::Apis::RequestOptions] options
2346
+ # Request-specific options
2347
+ #
2348
+ # @yield [result, err] Result & error if block supplied
2349
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2350
+ # @yieldparam err [StandardError] error object if request failed
2351
+ #
2352
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2353
+ #
2354
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2355
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2356
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2357
+ def list_project_location_schema_registry_context_schema_subjects(parent, deleted: nil, subject: nil, fields: nil, quota_user: nil, options: nil, &block)
2358
+ command = make_simple_command(:get, 'v1/{+parent}/subjects', options)
2359
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2360
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2361
+ command.params['parent'] = parent unless parent.nil?
2362
+ command.query['deleted'] = deleted unless deleted.nil?
2363
+ command.query['subject'] = subject unless subject.nil?
2364
+ command.query['fields'] = fields unless fields.nil?
2365
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2366
+ execute_or_queue_command(command, &block)
2367
+ end
2368
+
2369
+ # List the supported schema types. The response will be an array of schema types.
2370
+ # @param [String] parent
2371
+ # Required. The parent schema registry whose schema types are to be listed.
2372
+ # Structured like: `projects/`project`/locations/`location`/schemaRegistries/`
2373
+ # schema_registry``
2374
+ # @param [String] fields
2375
+ # Selector specifying which fields to include in a partial response.
2376
+ # @param [String] quota_user
2377
+ # Available to use for quota purposes for server-side applications. Can be any
2378
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2379
+ # @param [Google::Apis::RequestOptions] options
2380
+ # Request-specific options
2381
+ #
2382
+ # @yield [result, err] Result & error if block supplied
2383
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2384
+ # @yieldparam err [StandardError] error object if request failed
2385
+ #
2386
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2387
+ #
2388
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2389
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2390
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2391
+ def list_project_location_schema_registry_context_schema_types(parent, fields: nil, quota_user: nil, options: nil, &block)
2392
+ command = make_simple_command(:get, 'v1/{+parent}/schemas/types', options)
2393
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2394
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2395
+ command.params['parent'] = parent unless parent.nil?
2396
+ command.query['fields'] = fields unless fields.nil?
2397
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2398
+ execute_or_queue_command(command, &block)
2399
+ end
2400
+
2401
+ # List the schema versions for the given schema id. The response will be an
2402
+ # array of subject-version pairs as: [`"subject":"subject1", "version":1`, `"
2403
+ # subject":"subject2", "version":2`].
2404
+ # @param [String] parent
2405
+ # Required. The schema whose schema versions are to be listed. Structured like: `
2406
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
2407
+ # schemas/ids/`schema`` or `projects/`project`/locations/`location`/
2408
+ # schemaRegistries/`schema_registry`/contexts/`context`/schemas/ids/`schema``
2409
+ # @param [Boolean] deleted
2410
+ # Optional. If true, the response will include soft-deleted versions of the
2411
+ # schema, even if the subject is soft-deleted. The default is false.
2412
+ # @param [String] subject
2413
+ # Optional. The subject to filter the subjects by.
2414
+ # @param [String] fields
2415
+ # Selector specifying which fields to include in a partial response.
2416
+ # @param [String] quota_user
2417
+ # Available to use for quota purposes for server-side applications. Can be any
2418
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2419
+ # @param [Google::Apis::RequestOptions] options
2420
+ # Request-specific options
2421
+ #
2422
+ # @yield [result, err] Result & error if block supplied
2423
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2424
+ # @yieldparam err [StandardError] error object if request failed
2425
+ #
2426
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2427
+ #
2428
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2429
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2430
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2431
+ def list_project_location_schema_registry_context_schema_versions(parent, deleted: nil, subject: nil, fields: nil, quota_user: nil, options: nil, &block)
2432
+ command = make_simple_command(:get, 'v1/{+parent}/versions', options)
2433
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2434
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2435
+ command.params['parent'] = parent unless parent.nil?
2436
+ command.query['deleted'] = deleted unless deleted.nil?
2437
+ command.query['subject'] = subject unless subject.nil?
2438
+ command.query['fields'] = fields unless fields.nil?
2439
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2440
+ execute_or_queue_command(command, &block)
2441
+ end
2442
+
2443
+ # Delete a subject. The response will be an array of versions of the deleted
2444
+ # subject.
2445
+ # @param [String] name
2446
+ # Required. The name of the subject to delete. Structured like: `projects/`
2447
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/subjects/`
2448
+ # subject`` or `projects/`project`/locations/`location`/schemaRegistries/`
2449
+ # schema_registry`/contexts/`context`/subjects/`subject``
2450
+ # @param [Boolean] permanent
2451
+ # Optional. If true, the subject and all associated metadata including the
2452
+ # schema ID will be deleted permanently. Otherwise, only the subject is soft-
2453
+ # deleted. The default is false. Soft-deleted subjects can still be searched in
2454
+ # ListSubjects API call with deleted=true query parameter. A soft-delete of a
2455
+ # subject must be performed before a hard-delete.
2456
+ # @param [String] fields
2457
+ # Selector specifying which fields to include in a partial response.
2458
+ # @param [String] quota_user
2459
+ # Available to use for quota purposes for server-side applications. Can be any
2460
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2461
+ # @param [Google::Apis::RequestOptions] options
2462
+ # Request-specific options
2463
+ #
2464
+ # @yield [result, err] Result & error if block supplied
2465
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2466
+ # @yieldparam err [StandardError] error object if request failed
2467
+ #
2468
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2469
+ #
2470
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2471
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2472
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2473
+ def delete_project_location_schema_registry_context_subject(name, permanent: nil, fields: nil, quota_user: nil, options: nil, &block)
2474
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2475
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2476
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2477
+ command.params['name'] = name unless name.nil?
2478
+ command.query['permanent'] = permanent unless permanent.nil?
2479
+ command.query['fields'] = fields unless fields.nil?
2480
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2481
+ execute_or_queue_command(command, &block)
2482
+ end
2483
+
2484
+ # List subjects in the schema registry. The response will be an array of subject
2485
+ # names.
2486
+ # @param [String] parent
2487
+ # Required. The parent schema registry/context whose subjects are to be listed.
2488
+ # Structured like: `projects/`project`/locations/`location`/schemaRegistries/`
2489
+ # schema_registry`` or `projects/`project`/locations/`location`/schemaRegistries/
2490
+ # `schema_registry`/contexts/`context``
2491
+ # @param [Boolean] deleted
2492
+ # Optional. If true, the response will include soft-deleted subjects. The
2493
+ # default is false.
2494
+ # @param [String] subject_prefix
2495
+ # Optional. The context to filter the subjects by, in the format of `:.`context`:
2496
+ # `. If unset, all subjects in the registry are returned. Set to empty string or
2497
+ # add as '?subjectPrefix=' at the end of this request to list subjects in the
2498
+ # default context.
2499
+ # @param [String] fields
2500
+ # Selector specifying which fields to include in a partial response.
2501
+ # @param [String] quota_user
2502
+ # Available to use for quota purposes for server-side applications. Can be any
2503
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2504
+ # @param [Google::Apis::RequestOptions] options
2505
+ # Request-specific options
2506
+ #
2507
+ # @yield [result, err] Result & error if block supplied
2508
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2509
+ # @yieldparam err [StandardError] error object if request failed
2510
+ #
2511
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2512
+ #
2513
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2514
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2515
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2516
+ def list_project_location_schema_registry_context_subjects(parent, deleted: nil, subject_prefix: nil, fields: nil, quota_user: nil, options: nil, &block)
2517
+ command = make_simple_command(:get, 'v1/{+parent}/subjects', options)
2518
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2519
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2520
+ command.params['parent'] = parent unless parent.nil?
2521
+ command.query['deleted'] = deleted unless deleted.nil?
2522
+ command.query['subjectPrefix'] = subject_prefix unless subject_prefix.nil?
2523
+ command.query['fields'] = fields unless fields.nil?
2524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2525
+ execute_or_queue_command(command, &block)
2526
+ end
2527
+
2528
+ # Lookup a schema under the specified subject.
2529
+ # @param [String] parent
2530
+ # Required. The subject to lookup the schema in. Structured like: `projects/`
2531
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/subjects/`
2532
+ # subject`` or `projects/`project`/locations/`location`/schemaRegistries/`
2533
+ # schema_registry`/contexts/`context`/subjects/`subject``
2534
+ # @param [Google::Apis::ManagedkafkaV1::LookupVersionRequest] lookup_version_request_object
2535
+ # @param [String] fields
2536
+ # Selector specifying which fields to include in a partial response.
2537
+ # @param [String] quota_user
2538
+ # Available to use for quota purposes for server-side applications. Can be any
2539
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2540
+ # @param [Google::Apis::RequestOptions] options
2541
+ # Request-specific options
2542
+ #
2543
+ # @yield [result, err] Result & error if block supplied
2544
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaVersion] parsed result object
2545
+ # @yieldparam err [StandardError] error object if request failed
2546
+ #
2547
+ # @return [Google::Apis::ManagedkafkaV1::SchemaVersion]
2548
+ #
2549
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2550
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2551
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2552
+ def lookup_project_location_schema_registry_context_subject_version(parent, lookup_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2553
+ command = make_simple_command(:post, 'v1/{+parent}', options)
2554
+ command.request_representation = Google::Apis::ManagedkafkaV1::LookupVersionRequest::Representation
2555
+ command.request_object = lookup_version_request_object
2556
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaVersion::Representation
2557
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaVersion
2558
+ command.params['parent'] = parent unless parent.nil?
2559
+ command.query['fields'] = fields unless fields.nil?
2560
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2561
+ execute_or_queue_command(command, &block)
2562
+ end
2563
+
2564
+ # Register a new version under a given subject with the given schema.
2565
+ # @param [String] parent
2566
+ # Required. The subject to create the version for. Structured like: `projects/`
2567
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/subjects/`
2568
+ # subject`` or `projects/`project`/locations/`location`/schemaRegistries/`
2569
+ # schema_registry`/contexts/`context`/subjects/`subject``
2570
+ # @param [Google::Apis::ManagedkafkaV1::CreateVersionRequest] create_version_request_object
2571
+ # @param [String] fields
2572
+ # Selector specifying which fields to include in a partial response.
2573
+ # @param [String] quota_user
2574
+ # Available to use for quota purposes for server-side applications. Can be any
2575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2576
+ # @param [Google::Apis::RequestOptions] options
2577
+ # Request-specific options
2578
+ #
2579
+ # @yield [result, err] Result & error if block supplied
2580
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::CreateVersionResponse] parsed result object
2581
+ # @yieldparam err [StandardError] error object if request failed
2582
+ #
2583
+ # @return [Google::Apis::ManagedkafkaV1::CreateVersionResponse]
2584
+ #
2585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2588
+ def create_project_location_schema_registry_context_subject_version(parent, create_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2589
+ command = make_simple_command(:post, 'v1/{+parent}/versions', options)
2590
+ command.request_representation = Google::Apis::ManagedkafkaV1::CreateVersionRequest::Representation
2591
+ command.request_object = create_version_request_object
2592
+ command.response_representation = Google::Apis::ManagedkafkaV1::CreateVersionResponse::Representation
2593
+ command.response_class = Google::Apis::ManagedkafkaV1::CreateVersionResponse
2594
+ command.params['parent'] = parent unless parent.nil?
2595
+ command.query['fields'] = fields unless fields.nil?
2596
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2597
+ execute_or_queue_command(command, &block)
2598
+ end
2599
+
2600
+ # Delete a version of a subject. The response will be the deleted version id.
2601
+ # @param [String] name
2602
+ # Required. The name of the subject version to delete. Structured like: `
2603
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
2604
+ # subjects/`subject`/versions/`version`` or `projects/`project`/locations/`
2605
+ # location`/schemaRegistries/`schema_registry`/contexts/`context`/subjects/`
2606
+ # subject`/versions/`version``
2607
+ # @param [Boolean] permanent
2608
+ # Optional. If true, both the version and the referenced schema ID will be
2609
+ # permanently deleted. The default is false. If false, the version will be
2610
+ # deleted but the schema ID will be retained. Soft-deleted versions can still be
2611
+ # searched in ListVersions API call with deleted=true query parameter. A soft-
2612
+ # delete of a version must be performed before a hard-delete.
2613
+ # @param [String] fields
2614
+ # Selector specifying which fields to include in a partial response.
2615
+ # @param [String] quota_user
2616
+ # Available to use for quota purposes for server-side applications. Can be any
2617
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2618
+ # @param [Google::Apis::RequestOptions] options
2619
+ # Request-specific options
2620
+ #
2621
+ # @yield [result, err] Result & error if block supplied
2622
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2623
+ # @yieldparam err [StandardError] error object if request failed
2624
+ #
2625
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2626
+ #
2627
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2628
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2629
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2630
+ def delete_project_location_schema_registry_context_subject_version(name, permanent: nil, fields: nil, quota_user: nil, options: nil, &block)
2631
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2632
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2633
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2634
+ command.params['name'] = name unless name.nil?
2635
+ command.query['permanent'] = permanent unless permanent.nil?
2636
+ command.query['fields'] = fields unless fields.nil?
2637
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2638
+ execute_or_queue_command(command, &block)
2639
+ end
2640
+
2641
+ # Get a versioned schema (schema with subject/version) of a subject.
2642
+ # @param [String] name
2643
+ # Required. The name of the subject to return versions. Structured like: `
2644
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
2645
+ # subjects/`subject`/versions/`version`` or `projects/`project`/locations/`
2646
+ # location`/schemaRegistries/`schema_registry`/contexts/`context`/subjects/`
2647
+ # subject`/versions/`version``
2648
+ # @param [Boolean] deleted
2649
+ # Optional. If true, no matter if the subject/version is soft-deleted or not, it
2650
+ # returns the version details. If false, it returns NOT_FOUND error if the
2651
+ # subject/version is soft-deleted. The default is false.
2652
+ # @param [String] fields
2653
+ # Selector specifying which fields to include in a partial response.
2654
+ # @param [String] quota_user
2655
+ # Available to use for quota purposes for server-side applications. Can be any
2656
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2657
+ # @param [Google::Apis::RequestOptions] options
2658
+ # Request-specific options
2659
+ #
2660
+ # @yield [result, err] Result & error if block supplied
2661
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaVersion] parsed result object
2662
+ # @yieldparam err [StandardError] error object if request failed
2663
+ #
2664
+ # @return [Google::Apis::ManagedkafkaV1::SchemaVersion]
2665
+ #
2666
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2667
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2668
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2669
+ def get_project_location_schema_registry_context_subject_version(name, deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
2670
+ command = make_simple_command(:get, 'v1/{+name}', options)
2671
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaVersion::Representation
2672
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaVersion
2673
+ command.params['name'] = name unless name.nil?
2674
+ command.query['deleted'] = deleted unless deleted.nil?
2675
+ command.query['fields'] = fields unless fields.nil?
2676
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2677
+ execute_or_queue_command(command, &block)
2678
+ end
2679
+
2680
+ # Get the schema string only for a version of a subject. The response will be
2681
+ # the schema string.
2682
+ # @param [String] name
2683
+ # Required. The name of the subject to return versions. Structured like: `
2684
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
2685
+ # subjects/`subject`/versions/`version`` or `projects/`project`/locations/`
2686
+ # location`/schemaRegistries/`schema_registry`/contexts/`context`/subjects/`
2687
+ # subject`/versions/`version``
2688
+ # @param [Boolean] deleted
2689
+ # Optional. If true, no matter if the subject/version is soft-deleted or not, it
2690
+ # returns the version details. If false, it returns NOT_FOUND error if the
2691
+ # subject/version is soft-deleted. The default is false.
2692
+ # @param [String] fields
2693
+ # Selector specifying which fields to include in a partial response.
2694
+ # @param [String] quota_user
2695
+ # Available to use for quota purposes for server-side applications. Can be any
2696
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2697
+ # @param [Google::Apis::RequestOptions] options
2698
+ # Request-specific options
2699
+ #
2700
+ # @yield [result, err] Result & error if block supplied
2701
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2702
+ # @yieldparam err [StandardError] error object if request failed
2703
+ #
2704
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2705
+ #
2706
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2707
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2708
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2709
+ def get_project_location_schema_registry_context_subject_version_schema(name, deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
2710
+ command = make_simple_command(:get, 'v1/{+name}/schema', options)
2711
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2712
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2713
+ command.params['name'] = name unless name.nil?
2714
+ command.query['deleted'] = deleted unless deleted.nil?
2715
+ command.query['fields'] = fields unless fields.nil?
2716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2717
+ execute_or_queue_command(command, &block)
2718
+ end
2719
+
2720
+ # Get all versions of a subject. The response will be an array of versions of
2721
+ # the subject.
2722
+ # @param [String] parent
2723
+ # Required. The subject whose versions are to be listed. Structured like: `
2724
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
2725
+ # subjects/`subject`` or `projects/`project`/locations/`location`/
2726
+ # schemaRegistries/`schema_registry`/contexts/`context`/subjects/`subject``
2727
+ # @param [Boolean] deleted
2728
+ # Optional. If true, the response will include soft-deleted versions of an
2729
+ # active or soft-deleted subject. The default is false.
2730
+ # @param [String] fields
2731
+ # Selector specifying which fields to include in a partial response.
2732
+ # @param [String] quota_user
2733
+ # Available to use for quota purposes for server-side applications. Can be any
2734
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2735
+ # @param [Google::Apis::RequestOptions] options
2736
+ # Request-specific options
2737
+ #
2738
+ # @yield [result, err] Result & error if block supplied
2739
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2740
+ # @yieldparam err [StandardError] error object if request failed
2741
+ #
2742
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2743
+ #
2744
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2745
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2746
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2747
+ def list_project_location_schema_registry_context_subject_versions(parent, deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
2748
+ command = make_simple_command(:get, 'v1/{+parent}/versions', options)
2749
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2750
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2751
+ command.params['parent'] = parent unless parent.nil?
2752
+ command.query['deleted'] = deleted unless deleted.nil?
2753
+ command.query['fields'] = fields unless fields.nil?
2754
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2755
+ execute_or_queue_command(command, &block)
2756
+ end
2757
+
2758
+ # Get a list of IDs of schemas that reference the schema with the given subject
2759
+ # and version.
2760
+ # @param [String] parent
2761
+ # Required. The version to list referenced by. Structured like: `projects/`
2762
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/subjects/`
2763
+ # subject`/versions/`version`` or `projects/`project`/locations/`location`/
2764
+ # schemaRegistries/`schema_registry`/contexts/`context`/subjects/`subject`/
2765
+ # versions/`version``
2766
+ # @param [String] fields
2767
+ # Selector specifying which fields to include in a partial response.
2768
+ # @param [String] quota_user
2769
+ # Available to use for quota purposes for server-side applications. Can be any
2770
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2771
+ # @param [Google::Apis::RequestOptions] options
2772
+ # Request-specific options
2773
+ #
2774
+ # @yield [result, err] Result & error if block supplied
2775
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2776
+ # @yieldparam err [StandardError] error object if request failed
2777
+ #
2778
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2779
+ #
2780
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2781
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2782
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2783
+ def list_project_location_schema_registry_context_subject_version_referencedbies(parent, fields: nil, quota_user: nil, options: nil, &block)
2784
+ command = make_simple_command(:get, 'v1/{+parent}/referencedby', options)
2785
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2786
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2787
+ command.params['parent'] = parent unless parent.nil?
2788
+ command.query['fields'] = fields unless fields.nil?
2789
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2790
+ execute_or_queue_command(command, &block)
2791
+ end
2792
+
2793
+ # Delete schema mode for a subject.
2794
+ # @param [String] name
2795
+ # Required. The resource name of subject to delete the mode for. The format is *
2796
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
2797
+ # mode/`subject` * projects/`project`/locations/`location`/schemaRegistries/`
2798
+ # schema_registry`/contexts/`context`/mode/`subject`
2799
+ # @param [String] fields
2800
+ # Selector specifying which fields to include in a partial response.
2801
+ # @param [String] quota_user
2802
+ # Available to use for quota purposes for server-side applications. Can be any
2803
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2804
+ # @param [Google::Apis::RequestOptions] options
2805
+ # Request-specific options
2806
+ #
2807
+ # @yield [result, err] Result & error if block supplied
2808
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaMode] parsed result object
2809
+ # @yieldparam err [StandardError] error object if request failed
2810
+ #
2811
+ # @return [Google::Apis::ManagedkafkaV1::SchemaMode]
2812
+ #
2813
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2814
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2815
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2816
+ def delete_project_location_schema_registry_mode(name, fields: nil, quota_user: nil, options: nil, &block)
2817
+ command = make_simple_command(:delete, 'v1/{+name}', options)
2818
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaMode::Representation
2819
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaMode
2820
+ command.params['name'] = name unless name.nil?
2821
+ command.query['fields'] = fields unless fields.nil?
2822
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2823
+ execute_or_queue_command(command, &block)
2824
+ end
2825
+
2826
+ # Get mode at global level or for a subject.
2827
+ # @param [String] name
2828
+ # Required. The resource name of the mode. The format is * projects/`project`/
2829
+ # locations/`location`/schemaRegistries/`schema_registry`/mode/`subject`: mode
2830
+ # for a schema registry, or * projects/`project`/locations/`location`/
2831
+ # schemaRegistries/`schema_registry`/contexts/`context`/mode/`subject`: mode for
2832
+ # a specific subject in a specific context
2833
+ # @param [String] fields
2834
+ # Selector specifying which fields to include in a partial response.
2835
+ # @param [String] quota_user
2836
+ # Available to use for quota purposes for server-side applications. Can be any
2837
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2838
+ # @param [Google::Apis::RequestOptions] options
2839
+ # Request-specific options
2840
+ #
2841
+ # @yield [result, err] Result & error if block supplied
2842
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaMode] parsed result object
2843
+ # @yieldparam err [StandardError] error object if request failed
2844
+ #
2845
+ # @return [Google::Apis::ManagedkafkaV1::SchemaMode]
2846
+ #
2847
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2848
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2849
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2850
+ def get_project_location_schema_registry_mode(name, fields: nil, quota_user: nil, options: nil, &block)
2851
+ command = make_simple_command(:get, 'v1/{+name}', options)
2852
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaMode::Representation
2853
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaMode
2854
+ command.params['name'] = name unless name.nil?
2855
+ command.query['fields'] = fields unless fields.nil?
2856
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2857
+ execute_or_queue_command(command, &block)
2858
+ end
2859
+
2860
+ # Update mode at global level or for a subject.
2861
+ # @param [String] name
2862
+ # Required. The resource name of the mode. The format is * projects/`project`/
2863
+ # locations/`location`/schemaRegistries/`schema_registry`/mode/`subject`: mode
2864
+ # for a schema registry, or * projects/`project`/locations/`location`/
2865
+ # schemaRegistries/`schema_registry`/contexts/`context`/mode/`subject`: mode for
2866
+ # a specific subject in a specific context
2867
+ # @param [Google::Apis::ManagedkafkaV1::UpdateSchemaModeRequest] update_schema_mode_request_object
2868
+ # @param [String] fields
2869
+ # Selector specifying which fields to include in a partial response.
2870
+ # @param [String] quota_user
2871
+ # Available to use for quota purposes for server-side applications. Can be any
2872
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2873
+ # @param [Google::Apis::RequestOptions] options
2874
+ # Request-specific options
2875
+ #
2876
+ # @yield [result, err] Result & error if block supplied
2877
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaMode] parsed result object
2878
+ # @yieldparam err [StandardError] error object if request failed
2879
+ #
2880
+ # @return [Google::Apis::ManagedkafkaV1::SchemaMode]
2881
+ #
2882
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2883
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2884
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2885
+ def update_project_location_schema_registry_mode(name, update_schema_mode_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2886
+ command = make_simple_command(:put, 'v1/{+name}', options)
2887
+ command.request_representation = Google::Apis::ManagedkafkaV1::UpdateSchemaModeRequest::Representation
2888
+ command.request_object = update_schema_mode_request_object
2889
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaMode::Representation
2890
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaMode
2891
+ command.params['name'] = name unless name.nil?
2892
+ command.query['fields'] = fields unless fields.nil?
2893
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2894
+ execute_or_queue_command(command, &block)
2895
+ end
2896
+
2897
+ # Get the schema for the given schema id.
2898
+ # @param [String] name
2899
+ # Required. The name of the schema to return. Structured like: `projects/`
2900
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/schemas/ids/`
2901
+ # schema``
2902
+ # @param [String] subject
2903
+ # Optional. Used to limit the search for the schema ID to a specific subject,
2904
+ # otherwise the schema ID will be searched for in all subjects in the given
2905
+ # specified context.
2906
+ # @param [String] fields
2907
+ # Selector specifying which fields to include in a partial response.
2908
+ # @param [String] quota_user
2909
+ # Available to use for quota purposes for server-side applications. Can be any
2910
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2911
+ # @param [Google::Apis::RequestOptions] options
2912
+ # Request-specific options
2913
+ #
2914
+ # @yield [result, err] Result & error if block supplied
2915
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::Schema] parsed result object
2916
+ # @yieldparam err [StandardError] error object if request failed
2917
+ #
2918
+ # @return [Google::Apis::ManagedkafkaV1::Schema]
2919
+ #
2920
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2921
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2922
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2923
+ def get_project_location_schema_registry_schema(name, subject: nil, fields: nil, quota_user: nil, options: nil, &block)
2924
+ command = make_simple_command(:get, 'v1/{+name}', options)
2925
+ command.response_representation = Google::Apis::ManagedkafkaV1::Schema::Representation
2926
+ command.response_class = Google::Apis::ManagedkafkaV1::Schema
2927
+ command.params['name'] = name unless name.nil?
2928
+ command.query['subject'] = subject unless subject.nil?
2929
+ command.query['fields'] = fields unless fields.nil?
2930
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2931
+ execute_or_queue_command(command, &block)
2932
+ end
2933
+
2934
+ # Get the schema string for the given schema id. The response will be the schema
2935
+ # string.
2936
+ # @param [String] name
2937
+ # Required. The name of the schema to return. Structured like: `projects/`
2938
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/schemas/ids/`
2939
+ # schema``
2940
+ # @param [String] subject
2941
+ # Optional. Used to limit the search for the schema ID to a specific subject,
2942
+ # otherwise the schema ID will be searched for in all subjects in the given
2943
+ # specified context.
2944
+ # @param [String] fields
2945
+ # Selector specifying which fields to include in a partial response.
2946
+ # @param [String] quota_user
2947
+ # Available to use for quota purposes for server-side applications. Can be any
2948
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2949
+ # @param [Google::Apis::RequestOptions] options
2950
+ # Request-specific options
2951
+ #
2952
+ # @yield [result, err] Result & error if block supplied
2953
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2954
+ # @yieldparam err [StandardError] error object if request failed
2955
+ #
2956
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2957
+ #
2958
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2959
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2960
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2961
+ def get_project_location_schema_registry_schema_schema(name, subject: nil, fields: nil, quota_user: nil, options: nil, &block)
2962
+ command = make_simple_command(:get, 'v1/{+name}/schema', options)
2963
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
2964
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
2965
+ command.params['name'] = name unless name.nil?
2966
+ command.query['subject'] = subject unless subject.nil?
2967
+ command.query['fields'] = fields unless fields.nil?
2968
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2969
+ execute_or_queue_command(command, &block)
2970
+ end
2971
+
2972
+ # List subjects which reference a particular schema id. The response will be an
2973
+ # array of subject names.
2974
+ # @param [String] parent
2975
+ # Required. The schema resource whose associated subjects are to be listed.
2976
+ # Structured like: `projects/`project`/locations/`location`/schemaRegistries/`
2977
+ # schema_registry`/schemas/ids/`schema`` or `projects/`project`/locations/`
2978
+ # location`/schemaRegistries/`schema_registry`/contexts/`context`/schemas/ids/`
2979
+ # schema``
2980
+ # @param [Boolean] deleted
2981
+ # Optional. If true, the response will include soft-deleted subjects. The
2982
+ # default is false.
2983
+ # @param [String] subject
2984
+ # Optional. The subject to filter the subjects by.
2985
+ # @param [String] fields
2986
+ # Selector specifying which fields to include in a partial response.
2987
+ # @param [String] quota_user
2988
+ # Available to use for quota purposes for server-side applications. Can be any
2989
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2990
+ # @param [Google::Apis::RequestOptions] options
2991
+ # Request-specific options
2992
+ #
2993
+ # @yield [result, err] Result & error if block supplied
2994
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
2995
+ # @yieldparam err [StandardError] error object if request failed
2996
+ #
2997
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
2998
+ #
2999
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3000
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3001
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3002
+ def list_project_location_schema_registry_schema_subjects(parent, deleted: nil, subject: nil, fields: nil, quota_user: nil, options: nil, &block)
3003
+ command = make_simple_command(:get, 'v1/{+parent}/subjects', options)
3004
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3005
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3006
+ command.params['parent'] = parent unless parent.nil?
3007
+ command.query['deleted'] = deleted unless deleted.nil?
3008
+ command.query['subject'] = subject unless subject.nil?
3009
+ command.query['fields'] = fields unless fields.nil?
3010
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3011
+ execute_or_queue_command(command, &block)
3012
+ end
3013
+
3014
+ # List the supported schema types. The response will be an array of schema types.
3015
+ # @param [String] parent
3016
+ # Required. The parent schema registry whose schema types are to be listed.
3017
+ # Structured like: `projects/`project`/locations/`location`/schemaRegistries/`
3018
+ # schema_registry``
3019
+ # @param [String] fields
3020
+ # Selector specifying which fields to include in a partial response.
3021
+ # @param [String] quota_user
3022
+ # Available to use for quota purposes for server-side applications. Can be any
3023
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3024
+ # @param [Google::Apis::RequestOptions] options
3025
+ # Request-specific options
3026
+ #
3027
+ # @yield [result, err] Result & error if block supplied
3028
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
3029
+ # @yieldparam err [StandardError] error object if request failed
3030
+ #
3031
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
3032
+ #
3033
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3034
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3035
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3036
+ def list_project_location_schema_registry_schema_types(parent, fields: nil, quota_user: nil, options: nil, &block)
3037
+ command = make_simple_command(:get, 'v1/{+parent}/schemas/types', options)
3038
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3039
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3040
+ command.params['parent'] = parent unless parent.nil?
3041
+ command.query['fields'] = fields unless fields.nil?
3042
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3043
+ execute_or_queue_command(command, &block)
3044
+ end
3045
+
3046
+ # List the schema versions for the given schema id. The response will be an
3047
+ # array of subject-version pairs as: [`"subject":"subject1", "version":1`, `"
3048
+ # subject":"subject2", "version":2`].
3049
+ # @param [String] parent
3050
+ # Required. The schema whose schema versions are to be listed. Structured like: `
3051
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
3052
+ # schemas/ids/`schema`` or `projects/`project`/locations/`location`/
3053
+ # schemaRegistries/`schema_registry`/contexts/`context`/schemas/ids/`schema``
3054
+ # @param [Boolean] deleted
3055
+ # Optional. If true, the response will include soft-deleted versions of the
3056
+ # schema, even if the subject is soft-deleted. The default is false.
3057
+ # @param [String] subject
3058
+ # Optional. The subject to filter the subjects by.
3059
+ # @param [String] fields
3060
+ # Selector specifying which fields to include in a partial response.
3061
+ # @param [String] quota_user
3062
+ # Available to use for quota purposes for server-side applications. Can be any
3063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3064
+ # @param [Google::Apis::RequestOptions] options
3065
+ # Request-specific options
3066
+ #
3067
+ # @yield [result, err] Result & error if block supplied
3068
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
3069
+ # @yieldparam err [StandardError] error object if request failed
3070
+ #
3071
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
3072
+ #
3073
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3074
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3075
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3076
+ def list_project_location_schema_registry_schema_versions(parent, deleted: nil, subject: nil, fields: nil, quota_user: nil, options: nil, &block)
3077
+ command = make_simple_command(:get, 'v1/{+parent}/versions', options)
3078
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3079
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3080
+ command.params['parent'] = parent unless parent.nil?
3081
+ command.query['deleted'] = deleted unless deleted.nil?
3082
+ command.query['subject'] = subject unless subject.nil?
3083
+ command.query['fields'] = fields unless fields.nil?
3084
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3085
+ execute_or_queue_command(command, &block)
3086
+ end
3087
+
3088
+ # Delete a subject. The response will be an array of versions of the deleted
3089
+ # subject.
3090
+ # @param [String] name
3091
+ # Required. The name of the subject to delete. Structured like: `projects/`
3092
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/subjects/`
3093
+ # subject`` or `projects/`project`/locations/`location`/schemaRegistries/`
3094
+ # schema_registry`/contexts/`context`/subjects/`subject``
3095
+ # @param [Boolean] permanent
3096
+ # Optional. If true, the subject and all associated metadata including the
3097
+ # schema ID will be deleted permanently. Otherwise, only the subject is soft-
3098
+ # deleted. The default is false. Soft-deleted subjects can still be searched in
3099
+ # ListSubjects API call with deleted=true query parameter. A soft-delete of a
3100
+ # subject must be performed before a hard-delete.
3101
+ # @param [String] fields
3102
+ # Selector specifying which fields to include in a partial response.
3103
+ # @param [String] quota_user
3104
+ # Available to use for quota purposes for server-side applications. Can be any
3105
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3106
+ # @param [Google::Apis::RequestOptions] options
3107
+ # Request-specific options
3108
+ #
3109
+ # @yield [result, err] Result & error if block supplied
3110
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
3111
+ # @yieldparam err [StandardError] error object if request failed
3112
+ #
3113
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
3114
+ #
3115
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3116
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3117
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3118
+ def delete_project_location_schema_registry_subject(name, permanent: nil, fields: nil, quota_user: nil, options: nil, &block)
3119
+ command = make_simple_command(:delete, 'v1/{+name}', options)
3120
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3121
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3122
+ command.params['name'] = name unless name.nil?
3123
+ command.query['permanent'] = permanent unless permanent.nil?
3124
+ command.query['fields'] = fields unless fields.nil?
3125
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3126
+ execute_or_queue_command(command, &block)
3127
+ end
3128
+
3129
+ # List subjects in the schema registry. The response will be an array of subject
3130
+ # names.
3131
+ # @param [String] parent
3132
+ # Required. The parent schema registry/context whose subjects are to be listed.
3133
+ # Structured like: `projects/`project`/locations/`location`/schemaRegistries/`
3134
+ # schema_registry`` or `projects/`project`/locations/`location`/schemaRegistries/
3135
+ # `schema_registry`/contexts/`context``
3136
+ # @param [Boolean] deleted
3137
+ # Optional. If true, the response will include soft-deleted subjects. The
3138
+ # default is false.
3139
+ # @param [String] subject_prefix
3140
+ # Optional. The context to filter the subjects by, in the format of `:.`context`:
3141
+ # `. If unset, all subjects in the registry are returned. Set to empty string or
3142
+ # add as '?subjectPrefix=' at the end of this request to list subjects in the
3143
+ # default context.
3144
+ # @param [String] fields
3145
+ # Selector specifying which fields to include in a partial response.
3146
+ # @param [String] quota_user
3147
+ # Available to use for quota purposes for server-side applications. Can be any
3148
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3149
+ # @param [Google::Apis::RequestOptions] options
3150
+ # Request-specific options
3151
+ #
3152
+ # @yield [result, err] Result & error if block supplied
3153
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
3154
+ # @yieldparam err [StandardError] error object if request failed
3155
+ #
3156
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
3157
+ #
3158
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3159
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3160
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3161
+ def list_project_location_schema_registry_subjects(parent, deleted: nil, subject_prefix: nil, fields: nil, quota_user: nil, options: nil, &block)
3162
+ command = make_simple_command(:get, 'v1/{+parent}/subjects', options)
3163
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3164
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3165
+ command.params['parent'] = parent unless parent.nil?
3166
+ command.query['deleted'] = deleted unless deleted.nil?
3167
+ command.query['subjectPrefix'] = subject_prefix unless subject_prefix.nil?
3168
+ command.query['fields'] = fields unless fields.nil?
3169
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3170
+ execute_or_queue_command(command, &block)
3171
+ end
3172
+
3173
+ # Lookup a schema under the specified subject.
3174
+ # @param [String] parent
3175
+ # Required. The subject to lookup the schema in. Structured like: `projects/`
3176
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/subjects/`
3177
+ # subject`` or `projects/`project`/locations/`location`/schemaRegistries/`
3178
+ # schema_registry`/contexts/`context`/subjects/`subject``
3179
+ # @param [Google::Apis::ManagedkafkaV1::LookupVersionRequest] lookup_version_request_object
3180
+ # @param [String] fields
3181
+ # Selector specifying which fields to include in a partial response.
3182
+ # @param [String] quota_user
3183
+ # Available to use for quota purposes for server-side applications. Can be any
3184
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3185
+ # @param [Google::Apis::RequestOptions] options
3186
+ # Request-specific options
3187
+ #
3188
+ # @yield [result, err] Result & error if block supplied
3189
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaVersion] parsed result object
3190
+ # @yieldparam err [StandardError] error object if request failed
3191
+ #
3192
+ # @return [Google::Apis::ManagedkafkaV1::SchemaVersion]
3193
+ #
3194
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3195
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3196
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3197
+ def lookup_project_location_schema_registry_subject_version(parent, lookup_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3198
+ command = make_simple_command(:post, 'v1/{+parent}', options)
3199
+ command.request_representation = Google::Apis::ManagedkafkaV1::LookupVersionRequest::Representation
3200
+ command.request_object = lookup_version_request_object
3201
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaVersion::Representation
3202
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaVersion
3203
+ command.params['parent'] = parent unless parent.nil?
3204
+ command.query['fields'] = fields unless fields.nil?
3205
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3206
+ execute_or_queue_command(command, &block)
3207
+ end
3208
+
3209
+ # Register a new version under a given subject with the given schema.
3210
+ # @param [String] parent
3211
+ # Required. The subject to create the version for. Structured like: `projects/`
3212
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/subjects/`
3213
+ # subject`` or `projects/`project`/locations/`location`/schemaRegistries/`
3214
+ # schema_registry`/contexts/`context`/subjects/`subject``
3215
+ # @param [Google::Apis::ManagedkafkaV1::CreateVersionRequest] create_version_request_object
3216
+ # @param [String] fields
3217
+ # Selector specifying which fields to include in a partial response.
3218
+ # @param [String] quota_user
3219
+ # Available to use for quota purposes for server-side applications. Can be any
3220
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3221
+ # @param [Google::Apis::RequestOptions] options
3222
+ # Request-specific options
3223
+ #
3224
+ # @yield [result, err] Result & error if block supplied
3225
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::CreateVersionResponse] parsed result object
3226
+ # @yieldparam err [StandardError] error object if request failed
3227
+ #
3228
+ # @return [Google::Apis::ManagedkafkaV1::CreateVersionResponse]
3229
+ #
3230
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3231
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3232
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3233
+ def create_project_location_schema_registry_subject_version(parent, create_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3234
+ command = make_simple_command(:post, 'v1/{+parent}/versions', options)
3235
+ command.request_representation = Google::Apis::ManagedkafkaV1::CreateVersionRequest::Representation
3236
+ command.request_object = create_version_request_object
3237
+ command.response_representation = Google::Apis::ManagedkafkaV1::CreateVersionResponse::Representation
3238
+ command.response_class = Google::Apis::ManagedkafkaV1::CreateVersionResponse
3239
+ command.params['parent'] = parent unless parent.nil?
3240
+ command.query['fields'] = fields unless fields.nil?
3241
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3242
+ execute_or_queue_command(command, &block)
3243
+ end
3244
+
3245
+ # Delete a version of a subject. The response will be the deleted version id.
3246
+ # @param [String] name
3247
+ # Required. The name of the subject version to delete. Structured like: `
3248
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
3249
+ # subjects/`subject`/versions/`version`` or `projects/`project`/locations/`
3250
+ # location`/schemaRegistries/`schema_registry`/contexts/`context`/subjects/`
3251
+ # subject`/versions/`version``
3252
+ # @param [Boolean] permanent
3253
+ # Optional. If true, both the version and the referenced schema ID will be
3254
+ # permanently deleted. The default is false. If false, the version will be
3255
+ # deleted but the schema ID will be retained. Soft-deleted versions can still be
3256
+ # searched in ListVersions API call with deleted=true query parameter. A soft-
3257
+ # delete of a version must be performed before a hard-delete.
3258
+ # @param [String] fields
3259
+ # Selector specifying which fields to include in a partial response.
3260
+ # @param [String] quota_user
3261
+ # Available to use for quota purposes for server-side applications. Can be any
3262
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3263
+ # @param [Google::Apis::RequestOptions] options
3264
+ # Request-specific options
3265
+ #
3266
+ # @yield [result, err] Result & error if block supplied
3267
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
3268
+ # @yieldparam err [StandardError] error object if request failed
3269
+ #
3270
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
3271
+ #
3272
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3273
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3274
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3275
+ def delete_project_location_schema_registry_subject_version(name, permanent: nil, fields: nil, quota_user: nil, options: nil, &block)
3276
+ command = make_simple_command(:delete, 'v1/{+name}', options)
3277
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3278
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3279
+ command.params['name'] = name unless name.nil?
3280
+ command.query['permanent'] = permanent unless permanent.nil?
3281
+ command.query['fields'] = fields unless fields.nil?
3282
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3283
+ execute_or_queue_command(command, &block)
3284
+ end
3285
+
3286
+ # Get a versioned schema (schema with subject/version) of a subject.
3287
+ # @param [String] name
3288
+ # Required. The name of the subject to return versions. Structured like: `
3289
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
3290
+ # subjects/`subject`/versions/`version`` or `projects/`project`/locations/`
3291
+ # location`/schemaRegistries/`schema_registry`/contexts/`context`/subjects/`
3292
+ # subject`/versions/`version``
3293
+ # @param [Boolean] deleted
3294
+ # Optional. If true, no matter if the subject/version is soft-deleted or not, it
3295
+ # returns the version details. If false, it returns NOT_FOUND error if the
3296
+ # subject/version is soft-deleted. The default is false.
3297
+ # @param [String] fields
3298
+ # Selector specifying which fields to include in a partial response.
3299
+ # @param [String] quota_user
3300
+ # Available to use for quota purposes for server-side applications. Can be any
3301
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3302
+ # @param [Google::Apis::RequestOptions] options
3303
+ # Request-specific options
3304
+ #
3305
+ # @yield [result, err] Result & error if block supplied
3306
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::SchemaVersion] parsed result object
3307
+ # @yieldparam err [StandardError] error object if request failed
3308
+ #
3309
+ # @return [Google::Apis::ManagedkafkaV1::SchemaVersion]
3310
+ #
3311
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3312
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3313
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3314
+ def get_project_location_schema_registry_subject_version(name, deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
3315
+ command = make_simple_command(:get, 'v1/{+name}', options)
3316
+ command.response_representation = Google::Apis::ManagedkafkaV1::SchemaVersion::Representation
3317
+ command.response_class = Google::Apis::ManagedkafkaV1::SchemaVersion
3318
+ command.params['name'] = name unless name.nil?
3319
+ command.query['deleted'] = deleted unless deleted.nil?
3320
+ command.query['fields'] = fields unless fields.nil?
3321
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3322
+ execute_or_queue_command(command, &block)
3323
+ end
3324
+
3325
+ # Get the schema string only for a version of a subject. The response will be
3326
+ # the schema string.
3327
+ # @param [String] name
3328
+ # Required. The name of the subject to return versions. Structured like: `
3329
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
3330
+ # subjects/`subject`/versions/`version`` or `projects/`project`/locations/`
3331
+ # location`/schemaRegistries/`schema_registry`/contexts/`context`/subjects/`
3332
+ # subject`/versions/`version``
3333
+ # @param [Boolean] deleted
3334
+ # Optional. If true, no matter if the subject/version is soft-deleted or not, it
3335
+ # returns the version details. If false, it returns NOT_FOUND error if the
3336
+ # subject/version is soft-deleted. The default is false.
3337
+ # @param [String] fields
3338
+ # Selector specifying which fields to include in a partial response.
3339
+ # @param [String] quota_user
3340
+ # Available to use for quota purposes for server-side applications. Can be any
3341
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3342
+ # @param [Google::Apis::RequestOptions] options
3343
+ # Request-specific options
3344
+ #
3345
+ # @yield [result, err] Result & error if block supplied
3346
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
3347
+ # @yieldparam err [StandardError] error object if request failed
3348
+ #
3349
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
3350
+ #
3351
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3352
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3353
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3354
+ def get_project_location_schema_registry_subject_version_schema(name, deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
3355
+ command = make_simple_command(:get, 'v1/{+name}/schema', options)
3356
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3357
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3358
+ command.params['name'] = name unless name.nil?
3359
+ command.query['deleted'] = deleted unless deleted.nil?
3360
+ command.query['fields'] = fields unless fields.nil?
3361
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3362
+ execute_or_queue_command(command, &block)
3363
+ end
3364
+
3365
+ # Get all versions of a subject. The response will be an array of versions of
3366
+ # the subject.
3367
+ # @param [String] parent
3368
+ # Required. The subject whose versions are to be listed. Structured like: `
3369
+ # projects/`project`/locations/`location`/schemaRegistries/`schema_registry`/
3370
+ # subjects/`subject`` or `projects/`project`/locations/`location`/
3371
+ # schemaRegistries/`schema_registry`/contexts/`context`/subjects/`subject``
3372
+ # @param [Boolean] deleted
3373
+ # Optional. If true, the response will include soft-deleted versions of an
3374
+ # active or soft-deleted subject. The default is false.
3375
+ # @param [String] fields
3376
+ # Selector specifying which fields to include in a partial response.
3377
+ # @param [String] quota_user
3378
+ # Available to use for quota purposes for server-side applications. Can be any
3379
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3380
+ # @param [Google::Apis::RequestOptions] options
3381
+ # Request-specific options
3382
+ #
3383
+ # @yield [result, err] Result & error if block supplied
3384
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
3385
+ # @yieldparam err [StandardError] error object if request failed
3386
+ #
3387
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
3388
+ #
3389
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3390
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3391
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3392
+ def list_project_location_schema_registry_subject_versions(parent, deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
3393
+ command = make_simple_command(:get, 'v1/{+parent}/versions', options)
3394
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3395
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3396
+ command.params['parent'] = parent unless parent.nil?
3397
+ command.query['deleted'] = deleted unless deleted.nil?
3398
+ command.query['fields'] = fields unless fields.nil?
3399
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3400
+ execute_or_queue_command(command, &block)
3401
+ end
3402
+
3403
+ # Get a list of IDs of schemas that reference the schema with the given subject
3404
+ # and version.
3405
+ # @param [String] parent
3406
+ # Required. The version to list referenced by. Structured like: `projects/`
3407
+ # project`/locations/`location`/schemaRegistries/`schema_registry`/subjects/`
3408
+ # subject`/versions/`version`` or `projects/`project`/locations/`location`/
3409
+ # schemaRegistries/`schema_registry`/contexts/`context`/subjects/`subject`/
3410
+ # versions/`version``
3411
+ # @param [String] fields
3412
+ # Selector specifying which fields to include in a partial response.
3413
+ # @param [String] quota_user
3414
+ # Available to use for quota purposes for server-side applications. Can be any
3415
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
3416
+ # @param [Google::Apis::RequestOptions] options
3417
+ # Request-specific options
3418
+ #
3419
+ # @yield [result, err] Result & error if block supplied
3420
+ # @yieldparam result [Google::Apis::ManagedkafkaV1::HttpBody] parsed result object
3421
+ # @yieldparam err [StandardError] error object if request failed
3422
+ #
3423
+ # @return [Google::Apis::ManagedkafkaV1::HttpBody]
3424
+ #
3425
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3426
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3427
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
3428
+ def list_project_location_schema_registry_subject_version_referencedbies(parent, fields: nil, quota_user: nil, options: nil, &block)
3429
+ command = make_simple_command(:get, 'v1/{+parent}/referencedby', options)
3430
+ command.response_representation = Google::Apis::ManagedkafkaV1::HttpBody::Representation
3431
+ command.response_class = Google::Apis::ManagedkafkaV1::HttpBody
3432
+ command.params['parent'] = parent unless parent.nil?
3433
+ command.query['fields'] = fields unless fields.nil?
3434
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
3435
+ execute_or_queue_command(command, &block)
3436
+ end
1661
3437
 
1662
3438
  protected
1663
3439