google-cloud-dlp-v2 0.22.0 → 0.23.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.
@@ -1695,6 +1695,44 @@ module Google
1695
1695
  result
1696
1696
  end
1697
1697
 
1698
+ ##
1699
+ # Baseline implementation for the delete_table_data_profile REST call
1700
+ #
1701
+ # @param request_pb [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest]
1702
+ # A request object representing the call parameters. Required.
1703
+ # @param options [::Gapic::CallOptions]
1704
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1705
+ #
1706
+ # @yield [result, operation] Access the result along with the TransportOperation object
1707
+ # @yieldparam result [::Google::Protobuf::Empty]
1708
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1709
+ #
1710
+ # @return [::Google::Protobuf::Empty]
1711
+ # A result object deserialized from the server's reply
1712
+ def delete_table_data_profile request_pb, options = nil
1713
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1714
+
1715
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_table_data_profile_request request_pb
1716
+ query_string_params = if query_string_params.any?
1717
+ query_string_params.to_h { |p| p.split "=", 2 }
1718
+ else
1719
+ {}
1720
+ end
1721
+
1722
+ response = @client_stub.make_http_request(
1723
+ verb,
1724
+ uri: uri,
1725
+ body: body || "",
1726
+ params: query_string_params,
1727
+ options: options
1728
+ )
1729
+ operation = ::Gapic::Rest::TransportOperation.new response
1730
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
1731
+
1732
+ yield result, operation if block_given?
1733
+ result
1734
+ end
1735
+
1698
1736
  ##
1699
1737
  # Baseline implementation for the hybrid_inspect_dlp_job REST call
1700
1738
  #
@@ -1771,6 +1809,234 @@ module Google
1771
1809
  result
1772
1810
  end
1773
1811
 
1812
+ ##
1813
+ # Baseline implementation for the create_connection REST call
1814
+ #
1815
+ # @param request_pb [::Google::Cloud::Dlp::V2::CreateConnectionRequest]
1816
+ # A request object representing the call parameters. Required.
1817
+ # @param options [::Gapic::CallOptions]
1818
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1819
+ #
1820
+ # @yield [result, operation] Access the result along with the TransportOperation object
1821
+ # @yieldparam result [::Google::Cloud::Dlp::V2::Connection]
1822
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1823
+ #
1824
+ # @return [::Google::Cloud::Dlp::V2::Connection]
1825
+ # A result object deserialized from the server's reply
1826
+ def create_connection request_pb, options = nil
1827
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1828
+
1829
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_connection_request request_pb
1830
+ query_string_params = if query_string_params.any?
1831
+ query_string_params.to_h { |p| p.split "=", 2 }
1832
+ else
1833
+ {}
1834
+ end
1835
+
1836
+ response = @client_stub.make_http_request(
1837
+ verb,
1838
+ uri: uri,
1839
+ body: body || "",
1840
+ params: query_string_params,
1841
+ options: options
1842
+ )
1843
+ operation = ::Gapic::Rest::TransportOperation.new response
1844
+ result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true
1845
+
1846
+ yield result, operation if block_given?
1847
+ result
1848
+ end
1849
+
1850
+ ##
1851
+ # Baseline implementation for the get_connection REST call
1852
+ #
1853
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetConnectionRequest]
1854
+ # A request object representing the call parameters. Required.
1855
+ # @param options [::Gapic::CallOptions]
1856
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1857
+ #
1858
+ # @yield [result, operation] Access the result along with the TransportOperation object
1859
+ # @yieldparam result [::Google::Cloud::Dlp::V2::Connection]
1860
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1861
+ #
1862
+ # @return [::Google::Cloud::Dlp::V2::Connection]
1863
+ # A result object deserialized from the server's reply
1864
+ def get_connection request_pb, options = nil
1865
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1866
+
1867
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_connection_request request_pb
1868
+ query_string_params = if query_string_params.any?
1869
+ query_string_params.to_h { |p| p.split "=", 2 }
1870
+ else
1871
+ {}
1872
+ end
1873
+
1874
+ response = @client_stub.make_http_request(
1875
+ verb,
1876
+ uri: uri,
1877
+ body: body || "",
1878
+ params: query_string_params,
1879
+ options: options
1880
+ )
1881
+ operation = ::Gapic::Rest::TransportOperation.new response
1882
+ result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true
1883
+
1884
+ yield result, operation if block_given?
1885
+ result
1886
+ end
1887
+
1888
+ ##
1889
+ # Baseline implementation for the list_connections REST call
1890
+ #
1891
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListConnectionsRequest]
1892
+ # A request object representing the call parameters. Required.
1893
+ # @param options [::Gapic::CallOptions]
1894
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1895
+ #
1896
+ # @yield [result, operation] Access the result along with the TransportOperation object
1897
+ # @yieldparam result [::Google::Cloud::Dlp::V2::ListConnectionsResponse]
1898
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1899
+ #
1900
+ # @return [::Google::Cloud::Dlp::V2::ListConnectionsResponse]
1901
+ # A result object deserialized from the server's reply
1902
+ def list_connections request_pb, options = nil
1903
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1904
+
1905
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_connections_request request_pb
1906
+ query_string_params = if query_string_params.any?
1907
+ query_string_params.to_h { |p| p.split "=", 2 }
1908
+ else
1909
+ {}
1910
+ end
1911
+
1912
+ response = @client_stub.make_http_request(
1913
+ verb,
1914
+ uri: uri,
1915
+ body: body || "",
1916
+ params: query_string_params,
1917
+ options: options
1918
+ )
1919
+ operation = ::Gapic::Rest::TransportOperation.new response
1920
+ result = ::Google::Cloud::Dlp::V2::ListConnectionsResponse.decode_json response.body, ignore_unknown_fields: true
1921
+
1922
+ yield result, operation if block_given?
1923
+ result
1924
+ end
1925
+
1926
+ ##
1927
+ # Baseline implementation for the search_connections REST call
1928
+ #
1929
+ # @param request_pb [::Google::Cloud::Dlp::V2::SearchConnectionsRequest]
1930
+ # A request object representing the call parameters. Required.
1931
+ # @param options [::Gapic::CallOptions]
1932
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1933
+ #
1934
+ # @yield [result, operation] Access the result along with the TransportOperation object
1935
+ # @yieldparam result [::Google::Cloud::Dlp::V2::SearchConnectionsResponse]
1936
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1937
+ #
1938
+ # @return [::Google::Cloud::Dlp::V2::SearchConnectionsResponse]
1939
+ # A result object deserialized from the server's reply
1940
+ def search_connections request_pb, options = nil
1941
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1942
+
1943
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_connections_request request_pb
1944
+ query_string_params = if query_string_params.any?
1945
+ query_string_params.to_h { |p| p.split "=", 2 }
1946
+ else
1947
+ {}
1948
+ end
1949
+
1950
+ response = @client_stub.make_http_request(
1951
+ verb,
1952
+ uri: uri,
1953
+ body: body || "",
1954
+ params: query_string_params,
1955
+ options: options
1956
+ )
1957
+ operation = ::Gapic::Rest::TransportOperation.new response
1958
+ result = ::Google::Cloud::Dlp::V2::SearchConnectionsResponse.decode_json response.body, ignore_unknown_fields: true
1959
+
1960
+ yield result, operation if block_given?
1961
+ result
1962
+ end
1963
+
1964
+ ##
1965
+ # Baseline implementation for the delete_connection REST call
1966
+ #
1967
+ # @param request_pb [::Google::Cloud::Dlp::V2::DeleteConnectionRequest]
1968
+ # A request object representing the call parameters. Required.
1969
+ # @param options [::Gapic::CallOptions]
1970
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1971
+ #
1972
+ # @yield [result, operation] Access the result along with the TransportOperation object
1973
+ # @yieldparam result [::Google::Protobuf::Empty]
1974
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1975
+ #
1976
+ # @return [::Google::Protobuf::Empty]
1977
+ # A result object deserialized from the server's reply
1978
+ def delete_connection request_pb, options = nil
1979
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1980
+
1981
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_connection_request request_pb
1982
+ query_string_params = if query_string_params.any?
1983
+ query_string_params.to_h { |p| p.split "=", 2 }
1984
+ else
1985
+ {}
1986
+ end
1987
+
1988
+ response = @client_stub.make_http_request(
1989
+ verb,
1990
+ uri: uri,
1991
+ body: body || "",
1992
+ params: query_string_params,
1993
+ options: options
1994
+ )
1995
+ operation = ::Gapic::Rest::TransportOperation.new response
1996
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
1997
+
1998
+ yield result, operation if block_given?
1999
+ result
2000
+ end
2001
+
2002
+ ##
2003
+ # Baseline implementation for the update_connection REST call
2004
+ #
2005
+ # @param request_pb [::Google::Cloud::Dlp::V2::UpdateConnectionRequest]
2006
+ # A request object representing the call parameters. Required.
2007
+ # @param options [::Gapic::CallOptions]
2008
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2009
+ #
2010
+ # @yield [result, operation] Access the result along with the TransportOperation object
2011
+ # @yieldparam result [::Google::Cloud::Dlp::V2::Connection]
2012
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2013
+ #
2014
+ # @return [::Google::Cloud::Dlp::V2::Connection]
2015
+ # A result object deserialized from the server's reply
2016
+ def update_connection request_pb, options = nil
2017
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
2018
+
2019
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_connection_request request_pb
2020
+ query_string_params = if query_string_params.any?
2021
+ query_string_params.to_h { |p| p.split "=", 2 }
2022
+ else
2023
+ {}
2024
+ end
2025
+
2026
+ response = @client_stub.make_http_request(
2027
+ verb,
2028
+ uri: uri,
2029
+ body: body || "",
2030
+ params: query_string_params,
2031
+ options: options
2032
+ )
2033
+ operation = ::Gapic::Rest::TransportOperation.new response
2034
+ result = ::Google::Cloud::Dlp::V2::Connection.decode_json response.body, ignore_unknown_fields: true
2035
+
2036
+ yield result, operation if block_given?
2037
+ result
2038
+ end
2039
+
1774
2040
  ##
1775
2041
  # @private
1776
2042
  #
@@ -3267,6 +3533,34 @@ module Google
3267
3533
  transcoder.transcode request_pb
3268
3534
  end
3269
3535
 
3536
+ ##
3537
+ # @private
3538
+ #
3539
+ # GRPC transcoding helper method for the delete_table_data_profile REST call
3540
+ #
3541
+ # @param request_pb [::Google::Cloud::Dlp::V2::DeleteTableDataProfileRequest]
3542
+ # A request object representing the call parameters. Required.
3543
+ # @return [Array(String, [String, nil], Hash{String => String})]
3544
+ # Uri, Body, Query string parameters
3545
+ def self.transcode_delete_table_data_profile_request request_pb
3546
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3547
+ .with_bindings(
3548
+ uri_method: :delete,
3549
+ uri_template: "/v2/{name}",
3550
+ matches: [
3551
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false]
3552
+ ]
3553
+ )
3554
+ .with_bindings(
3555
+ uri_method: :delete,
3556
+ uri_template: "/v2/{name}",
3557
+ matches: [
3558
+ ["name", %r{^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+/?$}, false]
3559
+ ]
3560
+ )
3561
+ transcoder.transcode request_pb
3562
+ end
3563
+
3270
3564
  ##
3271
3565
  # @private
3272
3566
  #
@@ -3310,6 +3604,141 @@ module Google
3310
3604
  )
3311
3605
  transcoder.transcode request_pb
3312
3606
  end
3607
+
3608
+ ##
3609
+ # @private
3610
+ #
3611
+ # GRPC transcoding helper method for the create_connection REST call
3612
+ #
3613
+ # @param request_pb [::Google::Cloud::Dlp::V2::CreateConnectionRequest]
3614
+ # A request object representing the call parameters. Required.
3615
+ # @return [Array(String, [String, nil], Hash{String => String})]
3616
+ # Uri, Body, Query string parameters
3617
+ def self.transcode_create_connection_request request_pb
3618
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3619
+ .with_bindings(
3620
+ uri_method: :post,
3621
+ uri_template: "/v2/{parent}/connections",
3622
+ body: "*",
3623
+ matches: [
3624
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3625
+ ]
3626
+ )
3627
+ transcoder.transcode request_pb
3628
+ end
3629
+
3630
+ ##
3631
+ # @private
3632
+ #
3633
+ # GRPC transcoding helper method for the get_connection REST call
3634
+ #
3635
+ # @param request_pb [::Google::Cloud::Dlp::V2::GetConnectionRequest]
3636
+ # A request object representing the call parameters. Required.
3637
+ # @return [Array(String, [String, nil], Hash{String => String})]
3638
+ # Uri, Body, Query string parameters
3639
+ def self.transcode_get_connection_request request_pb
3640
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3641
+ .with_bindings(
3642
+ uri_method: :get,
3643
+ uri_template: "/v2/{name}",
3644
+ matches: [
3645
+ ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false]
3646
+ ]
3647
+ )
3648
+ transcoder.transcode request_pb
3649
+ end
3650
+
3651
+ ##
3652
+ # @private
3653
+ #
3654
+ # GRPC transcoding helper method for the list_connections REST call
3655
+ #
3656
+ # @param request_pb [::Google::Cloud::Dlp::V2::ListConnectionsRequest]
3657
+ # A request object representing the call parameters. Required.
3658
+ # @return [Array(String, [String, nil], Hash{String => String})]
3659
+ # Uri, Body, Query string parameters
3660
+ def self.transcode_list_connections_request request_pb
3661
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3662
+ .with_bindings(
3663
+ uri_method: :get,
3664
+ uri_template: "/v2/{parent}/connections",
3665
+ matches: [
3666
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3667
+ ]
3668
+ )
3669
+ transcoder.transcode request_pb
3670
+ end
3671
+
3672
+ ##
3673
+ # @private
3674
+ #
3675
+ # GRPC transcoding helper method for the search_connections REST call
3676
+ #
3677
+ # @param request_pb [::Google::Cloud::Dlp::V2::SearchConnectionsRequest]
3678
+ # A request object representing the call parameters. Required.
3679
+ # @return [Array(String, [String, nil], Hash{String => String})]
3680
+ # Uri, Body, Query string parameters
3681
+ def self.transcode_search_connections_request request_pb
3682
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3683
+ .with_bindings(
3684
+ uri_method: :get,
3685
+ uri_template: "/v2/{parent}/connections:search",
3686
+ matches: [
3687
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
3688
+ ]
3689
+ )
3690
+ .with_bindings(
3691
+ uri_method: :get,
3692
+ uri_template: "/v2/{parent}/connections:search",
3693
+ matches: [
3694
+ ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false]
3695
+ ]
3696
+ )
3697
+ transcoder.transcode request_pb
3698
+ end
3699
+
3700
+ ##
3701
+ # @private
3702
+ #
3703
+ # GRPC transcoding helper method for the delete_connection REST call
3704
+ #
3705
+ # @param request_pb [::Google::Cloud::Dlp::V2::DeleteConnectionRequest]
3706
+ # A request object representing the call parameters. Required.
3707
+ # @return [Array(String, [String, nil], Hash{String => String})]
3708
+ # Uri, Body, Query string parameters
3709
+ def self.transcode_delete_connection_request request_pb
3710
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3711
+ .with_bindings(
3712
+ uri_method: :delete,
3713
+ uri_template: "/v2/{name}",
3714
+ matches: [
3715
+ ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false]
3716
+ ]
3717
+ )
3718
+ transcoder.transcode request_pb
3719
+ end
3720
+
3721
+ ##
3722
+ # @private
3723
+ #
3724
+ # GRPC transcoding helper method for the update_connection REST call
3725
+ #
3726
+ # @param request_pb [::Google::Cloud::Dlp::V2::UpdateConnectionRequest]
3727
+ # A request object representing the call parameters. Required.
3728
+ # @return [Array(String, [String, nil], Hash{String => String})]
3729
+ # Uri, Body, Query string parameters
3730
+ def self.transcode_update_connection_request request_pb
3731
+ transcoder = Gapic::Rest::GrpcTranscoder.new
3732
+ .with_bindings(
3733
+ uri_method: :patch,
3734
+ uri_template: "/v2/{name}",
3735
+ body: "*",
3736
+ matches: [
3737
+ ["name", %r{^projects/[^/]+/locations/[^/]+/connections/[^/]+/?$}, false]
3738
+ ]
3739
+ )
3740
+ transcoder.transcode request_pb
3741
+ end
3313
3742
  end
3314
3743
  end
3315
3744
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dlp
23
23
  module V2
24
- VERSION = "0.22.0"
24
+ VERSION = "0.23.0"
25
25
  end
26
26
  end
27
27
  end