google-cloud-dlp 0.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 611fcdc6b6008b90f7cf40518dcb1d8816fb463fbf31581aa741a3e10a56af6d
4
- data.tar.gz: ec08a94091ed1154519a7403d7a95c5f7574f49847dce2325f77721110d13921
3
+ metadata.gz: b40701e5640ffa38f3a66e29a0b268073f95c0267bb2606d64ced1c051fbefd7
4
+ data.tar.gz: ca8f7e187230232e6344651795e4e560d64642b6cd476594e61943cdcaf5e84b
5
5
  SHA512:
6
- metadata.gz: cbe6fab2b0dad1d0e422edb6938851d707529d60ef2b4a72d5364d4a9daa26cadbaad8a7f8c50c7eaea100d675e8778755972de9ba34c87b1df53a5cdeecec54
7
- data.tar.gz: 8b11fb1f7dd7d4306706b797058d0bdc56cc117ad71e2b403ba7420a8e5c241815ef7b99df8ca777adac59e3554c8469660b10c5cd2c0e871872359fa136a71c
6
+ metadata.gz: 8e805b1ef9671d77d991d740be4e779c1df7e3e3c25074622ba87e9136988598777a007a921e46ffb9d9f5a9c99ce6310f9d2adf2b74b5cfce0782f1c90d88bb
7
+ data.tar.gz: ea51848100a0800c2bf7a1b5636d1fdeb47bfc27a6175732aaa24d099a962e508f321d3b395065741cf9851ddab8f32ad7a092cb4cbdf553daead9c2149f1cfc
@@ -75,7 +75,11 @@ module Google
75
75
  "list_job_triggers" => Google::Gax::PageDescriptor.new(
76
76
  "page_token",
77
77
  "next_page_token",
78
- "job_triggers")
78
+ "job_triggers"),
79
+ "list_stored_info_types" => Google::Gax::PageDescriptor.new(
80
+ "page_token",
81
+ "next_page_token",
82
+ "stored_info_types")
79
83
  }.freeze
80
84
 
81
85
  private_constant :PAGE_DESCRIPTORS
@@ -135,6 +139,18 @@ module Google
135
139
 
136
140
  private_constant :DLP_JOB_PATH_TEMPLATE
137
141
 
142
+ ORGANIZATION_STORED_INFO_TYPE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
143
+ "organizations/{organization}/storedInfoTypes/{stored_info_type}"
144
+ )
145
+
146
+ private_constant :ORGANIZATION_STORED_INFO_TYPE_PATH_TEMPLATE
147
+
148
+ PROJECT_STORED_INFO_TYPE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
149
+ "projects/{project}/storedInfoTypes/{stored_info_type}"
150
+ )
151
+
152
+ private_constant :PROJECT_STORED_INFO_TYPE_PATH_TEMPLATE
153
+
138
154
  # Returns a fully-qualified organization resource name string.
139
155
  # @param organization [String]
140
156
  # @return [String]
@@ -219,6 +235,28 @@ module Google
219
235
  )
220
236
  end
221
237
 
238
+ # Returns a fully-qualified organization_stored_info_type resource name string.
239
+ # @param organization [String]
240
+ # @param stored_info_type [String]
241
+ # @return [String]
242
+ def self.organization_stored_info_type_path organization, stored_info_type
243
+ ORGANIZATION_STORED_INFO_TYPE_PATH_TEMPLATE.render(
244
+ :"organization" => organization,
245
+ :"stored_info_type" => stored_info_type
246
+ )
247
+ end
248
+
249
+ # Returns a fully-qualified project_stored_info_type resource name string.
250
+ # @param project [String]
251
+ # @param stored_info_type [String]
252
+ # @return [String]
253
+ def self.project_stored_info_type_path project, stored_info_type
254
+ PROJECT_STORED_INFO_TYPE_PATH_TEMPLATE.render(
255
+ :"project" => project,
256
+ :"stored_info_type" => stored_info_type
257
+ )
258
+ end
259
+
222
260
  # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
223
261
  # Provides the means for authenticating requests made by the client. This parameter can
224
262
  # be many types.
@@ -447,6 +485,31 @@ module Google
447
485
  defaults["create_job_trigger"],
448
486
  exception_transformer: exception_transformer
449
487
  )
488
+ @create_stored_info_type = Google::Gax.create_api_call(
489
+ @dlp_service_stub.method(:create_stored_info_type),
490
+ defaults["create_stored_info_type"],
491
+ exception_transformer: exception_transformer
492
+ )
493
+ @update_stored_info_type = Google::Gax.create_api_call(
494
+ @dlp_service_stub.method(:update_stored_info_type),
495
+ defaults["update_stored_info_type"],
496
+ exception_transformer: exception_transformer
497
+ )
498
+ @get_stored_info_type = Google::Gax.create_api_call(
499
+ @dlp_service_stub.method(:get_stored_info_type),
500
+ defaults["get_stored_info_type"],
501
+ exception_transformer: exception_transformer
502
+ )
503
+ @list_stored_info_types = Google::Gax.create_api_call(
504
+ @dlp_service_stub.method(:list_stored_info_types),
505
+ defaults["list_stored_info_types"],
506
+ exception_transformer: exception_transformer
507
+ )
508
+ @delete_stored_info_type = Google::Gax.create_api_call(
509
+ @dlp_service_stub.method(:delete_stored_info_type),
510
+ defaults["delete_stored_info_type"],
511
+ exception_transformer: exception_transformer
512
+ )
450
513
  end
451
514
 
452
515
  # Service calls
@@ -1312,6 +1375,20 @@ module Google
1312
1375
  # resources in a page.
1313
1376
  # @param type [Google::Privacy::Dlp::V2::DlpJobType]
1314
1377
  # The type of job. Defaults to `DlpJobType.INSPECT`
1378
+ # @param order_by [String]
1379
+ # Optional comma separated list of fields to order by,
1380
+ # followed by `asc` or `desc` postfix. This list is case-insensitive,
1381
+ # default sorting order is ascending, redundant space characters are
1382
+ # insignificant.
1383
+ #
1384
+ # Example: `name asc, end_time asc, create_time desc`
1385
+ #
1386
+ # Supported fields are:
1387
+ #
1388
+ # * `create_time`: corresponds to time the job was created.
1389
+ # * `end_time`: corresponds to time the job ended.
1390
+ # * `name`: corresponds to job's name.
1391
+ # * `state`: corresponds to `state`
1315
1392
  # @param options [Google::Gax::CallOptions]
1316
1393
  # Overrides the default settings for this call, e.g, timeout,
1317
1394
  # retries, etc.
@@ -1348,13 +1425,15 @@ module Google
1348
1425
  filter: nil,
1349
1426
  page_size: nil,
1350
1427
  type: nil,
1428
+ order_by: nil,
1351
1429
  options: nil,
1352
1430
  &block
1353
1431
  req = {
1354
1432
  parent: parent,
1355
1433
  filter: filter,
1356
1434
  page_size: page_size,
1357
- type: type
1435
+ type: type,
1436
+ order_by: order_by
1358
1437
  }.delete_if { |_, v| v.nil? }
1359
1438
  req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ListDlpJobsRequest)
1360
1439
  @list_dlp_jobs.call(req, options, &block)
@@ -1686,6 +1765,243 @@ module Google
1686
1765
  req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::CreateJobTriggerRequest)
1687
1766
  @create_job_trigger.call(req, options, &block)
1688
1767
  end
1768
+
1769
+ # Creates a pre-built stored infoType to be used for inspection.
1770
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1771
+ # learn more.
1772
+ #
1773
+ # @param parent [String]
1774
+ # The parent resource name, for example projects/my-project-id or
1775
+ # organizations/my-org-id.
1776
+ # @param config [Google::Privacy::Dlp::V2::StoredInfoTypeConfig | Hash]
1777
+ # Configuration of the storedInfoType to create.
1778
+ # A hash of the same form as `Google::Privacy::Dlp::V2::StoredInfoTypeConfig`
1779
+ # can also be provided.
1780
+ # @param stored_info_type_id [String]
1781
+ # The storedInfoType ID can contain uppercase and lowercase letters,
1782
+ # numbers, and hyphens; that is, it must match the regular
1783
+ # expression: `[a-zA-Z\\d-]+`. The maximum length is 100
1784
+ # characters. Can be empty to allow the system to generate one.
1785
+ # @param options [Google::Gax::CallOptions]
1786
+ # Overrides the default settings for this call, e.g, timeout,
1787
+ # retries, etc.
1788
+ # @yield [result, operation] Access the result along with the RPC operation
1789
+ # @yieldparam result [Google::Privacy::Dlp::V2::StoredInfoType]
1790
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1791
+ # @return [Google::Privacy::Dlp::V2::StoredInfoType]
1792
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1793
+ # @example
1794
+ # require "google/cloud/dlp"
1795
+ #
1796
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1797
+ # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
1798
+ # response = dlp_service_client.create_stored_info_type(formatted_parent)
1799
+
1800
+ def create_stored_info_type \
1801
+ parent,
1802
+ config: nil,
1803
+ stored_info_type_id: nil,
1804
+ options: nil,
1805
+ &block
1806
+ req = {
1807
+ parent: parent,
1808
+ config: config,
1809
+ stored_info_type_id: stored_info_type_id
1810
+ }.delete_if { |_, v| v.nil? }
1811
+ req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::CreateStoredInfoTypeRequest)
1812
+ @create_stored_info_type.call(req, options, &block)
1813
+ end
1814
+
1815
+ # Updates the stored infoType by creating a new version. The existing version
1816
+ # will continue to be used until the new version is ready.
1817
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1818
+ # learn more.
1819
+ #
1820
+ # @param name [String]
1821
+ # Resource name of organization and storedInfoType to be updated, for
1822
+ # example `organizations/433245324/storedInfoTypes/432452342` or
1823
+ # projects/project-id/storedInfoTypes/432452342.
1824
+ # @param config [Google::Privacy::Dlp::V2::StoredInfoTypeConfig | Hash]
1825
+ # Updated configuration for the storedInfoType. If not provided, a new
1826
+ # version of the storedInfoType will be created with the existing
1827
+ # configuration.
1828
+ # A hash of the same form as `Google::Privacy::Dlp::V2::StoredInfoTypeConfig`
1829
+ # can also be provided.
1830
+ # @param update_mask [Google::Protobuf::FieldMask | Hash]
1831
+ # Mask to control which fields get updated.
1832
+ # A hash of the same form as `Google::Protobuf::FieldMask`
1833
+ # can also be provided.
1834
+ # @param options [Google::Gax::CallOptions]
1835
+ # Overrides the default settings for this call, e.g, timeout,
1836
+ # retries, etc.
1837
+ # @yield [result, operation] Access the result along with the RPC operation
1838
+ # @yieldparam result [Google::Privacy::Dlp::V2::StoredInfoType]
1839
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1840
+ # @return [Google::Privacy::Dlp::V2::StoredInfoType]
1841
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1842
+ # @example
1843
+ # require "google/cloud/dlp"
1844
+ #
1845
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1846
+ # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_stored_info_type_path("[ORGANIZATION]", "[STORED_INFO_TYPE]")
1847
+ # response = dlp_service_client.update_stored_info_type(formatted_name)
1848
+
1849
+ def update_stored_info_type \
1850
+ name,
1851
+ config: nil,
1852
+ update_mask: nil,
1853
+ options: nil,
1854
+ &block
1855
+ req = {
1856
+ name: name,
1857
+ config: config,
1858
+ update_mask: update_mask
1859
+ }.delete_if { |_, v| v.nil? }
1860
+ req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::UpdateStoredInfoTypeRequest)
1861
+ @update_stored_info_type.call(req, options, &block)
1862
+ end
1863
+
1864
+ # Gets a stored infoType.
1865
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1866
+ # learn more.
1867
+ #
1868
+ # @param name [String]
1869
+ # Resource name of the organization and storedInfoType to be read, for
1870
+ # example `organizations/433245324/storedInfoTypes/432452342` or
1871
+ # projects/project-id/storedInfoTypes/432452342.
1872
+ # @param options [Google::Gax::CallOptions]
1873
+ # Overrides the default settings for this call, e.g, timeout,
1874
+ # retries, etc.
1875
+ # @yield [result, operation] Access the result along with the RPC operation
1876
+ # @yieldparam result [Google::Privacy::Dlp::V2::StoredInfoType]
1877
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1878
+ # @return [Google::Privacy::Dlp::V2::StoredInfoType]
1879
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1880
+ # @example
1881
+ # require "google/cloud/dlp"
1882
+ #
1883
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1884
+ # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_stored_info_type_path("[ORGANIZATION]", "[STORED_INFO_TYPE]")
1885
+ # response = dlp_service_client.get_stored_info_type(formatted_name)
1886
+
1887
+ def get_stored_info_type \
1888
+ name,
1889
+ options: nil,
1890
+ &block
1891
+ req = {
1892
+ name: name
1893
+ }.delete_if { |_, v| v.nil? }
1894
+ req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::GetStoredInfoTypeRequest)
1895
+ @get_stored_info_type.call(req, options, &block)
1896
+ end
1897
+
1898
+ # Lists stored infoTypes.
1899
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1900
+ # learn more.
1901
+ #
1902
+ # @param parent [String]
1903
+ # The parent resource name, for example projects/my-project-id or
1904
+ # organizations/my-org-id.
1905
+ # @param page_size [Integer]
1906
+ # The maximum number of resources contained in the underlying API
1907
+ # response. If page streaming is performed per-resource, this
1908
+ # parameter does not affect the return value. If page streaming is
1909
+ # performed per-page, this determines the maximum number of
1910
+ # resources in a page.
1911
+ # @param order_by [String]
1912
+ # Optional comma separated list of fields to order by,
1913
+ # followed by `asc` or `desc` postfix. This list is case-insensitive,
1914
+ # default sorting order is ascending, redundant space characters are
1915
+ # insignificant.
1916
+ #
1917
+ # Example: `name asc, display_name, create_time desc`
1918
+ #
1919
+ # Supported fields are:
1920
+ #
1921
+ # * `create_time`: corresponds to time the most recent version of the
1922
+ # resource was created.
1923
+ # * `state`: corresponds to the state of the resource.
1924
+ # * `name`: corresponds to resource name.
1925
+ # * `display_name`: corresponds to info type's display name.
1926
+ # @param options [Google::Gax::CallOptions]
1927
+ # Overrides the default settings for this call, e.g, timeout,
1928
+ # retries, etc.
1929
+ # @yield [result, operation] Access the result along with the RPC operation
1930
+ # @yieldparam result [Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::StoredInfoType>]
1931
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1932
+ # @return [Google::Gax::PagedEnumerable<Google::Privacy::Dlp::V2::StoredInfoType>]
1933
+ # An enumerable of Google::Privacy::Dlp::V2::StoredInfoType instances.
1934
+ # See Google::Gax::PagedEnumerable documentation for other
1935
+ # operations such as per-page iteration or access to the response
1936
+ # object.
1937
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1938
+ # @example
1939
+ # require "google/cloud/dlp"
1940
+ #
1941
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1942
+ # formatted_parent = Google::Cloud::Dlp::V2::DlpServiceClient.organization_path("[ORGANIZATION]")
1943
+ #
1944
+ # # Iterate over all results.
1945
+ # dlp_service_client.list_stored_info_types(formatted_parent).each do |element|
1946
+ # # Process element.
1947
+ # end
1948
+ #
1949
+ # # Or iterate over results one page at a time.
1950
+ # dlp_service_client.list_stored_info_types(formatted_parent).each_page do |page|
1951
+ # # Process each page at a time.
1952
+ # page.each do |element|
1953
+ # # Process element.
1954
+ # end
1955
+ # end
1956
+
1957
+ def list_stored_info_types \
1958
+ parent,
1959
+ page_size: nil,
1960
+ order_by: nil,
1961
+ options: nil,
1962
+ &block
1963
+ req = {
1964
+ parent: parent,
1965
+ page_size: page_size,
1966
+ order_by: order_by
1967
+ }.delete_if { |_, v| v.nil? }
1968
+ req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::ListStoredInfoTypesRequest)
1969
+ @list_stored_info_types.call(req, options, &block)
1970
+ end
1971
+
1972
+ # Deletes a stored infoType.
1973
+ # See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1974
+ # learn more.
1975
+ #
1976
+ # @param name [String]
1977
+ # Resource name of the organization and storedInfoType to be deleted, for
1978
+ # example `organizations/433245324/storedInfoTypes/432452342` or
1979
+ # projects/project-id/storedInfoTypes/432452342.
1980
+ # @param options [Google::Gax::CallOptions]
1981
+ # Overrides the default settings for this call, e.g, timeout,
1982
+ # retries, etc.
1983
+ # @yield [result, operation] Access the result along with the RPC operation
1984
+ # @yieldparam result []
1985
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
1986
+ # @raise [Google::Gax::GaxError] if the RPC is aborted.
1987
+ # @example
1988
+ # require "google/cloud/dlp"
1989
+ #
1990
+ # dlp_service_client = Google::Cloud::Dlp.new(version: :v2)
1991
+ # formatted_name = Google::Cloud::Dlp::V2::DlpServiceClient.organization_stored_info_type_path("[ORGANIZATION]", "[STORED_INFO_TYPE]")
1992
+ # dlp_service_client.delete_stored_info_type(formatted_name)
1993
+
1994
+ def delete_stored_info_type \
1995
+ name,
1996
+ options: nil,
1997
+ &block
1998
+ req = {
1999
+ name: name
2000
+ }.delete_if { |_, v| v.nil? }
2001
+ req = Google::Gax::to_proto(req, Google::Privacy::Dlp::V2::DeleteStoredInfoTypeRequest)
2002
+ @delete_stored_info_type.call(req, options, &block)
2003
+ nil
2004
+ end
1689
2005
  end
1690
2006
  end
1691
2007
  end
@@ -6,12 +6,7 @@
6
6
  "DEADLINE_EXCEEDED",
7
7
  "UNAVAILABLE"
8
8
  ],
9
- "http_get": [
10
- "DEADLINE_EXCEEDED",
11
- "UNAVAILABLE"
12
- ],
13
- "non_idempotent": [],
14
- "no_retry": []
9
+ "non_idempotent": []
15
10
  },
16
11
  "retry_params": {
17
12
  "default": {
@@ -149,6 +144,31 @@
149
144
  "timeout_millis": 300000,
150
145
  "retry_codes_name": "non_idempotent",
151
146
  "retry_params_name": "default"
147
+ },
148
+ "CreateStoredInfoType": {
149
+ "timeout_millis": 300000,
150
+ "retry_codes_name": "non_idempotent",
151
+ "retry_params_name": "default"
152
+ },
153
+ "UpdateStoredInfoType": {
154
+ "timeout_millis": 300000,
155
+ "retry_codes_name": "non_idempotent",
156
+ "retry_params_name": "default"
157
+ },
158
+ "GetStoredInfoType": {
159
+ "timeout_millis": 300000,
160
+ "retry_codes_name": "idempotent",
161
+ "retry_params_name": "default"
162
+ },
163
+ "ListStoredInfoTypes": {
164
+ "timeout_millis": 300000,
165
+ "retry_codes_name": "idempotent",
166
+ "retry_params_name": "default"
167
+ },
168
+ "DeleteStoredInfoType": {
169
+ "timeout_millis": 300000,
170
+ "retry_codes_name": "idempotent",
171
+ "retry_params_name": "default"
152
172
  }
153
173
  }
154
174
  }
@@ -258,9 +258,15 @@ module Google
258
258
  # @!attribute [rw] container_name
259
259
  # @return [String]
260
260
  # Name of the container where the finding is located.
261
- # The top level name is the source file name or table name. Nested names
262
- # could be absent if the embedded object has no string identifier
263
- # (for an example an image contained within a document).
261
+ # The top level name is the source file name or table name. Names of some
262
+ # common storage containers are formatted as follows:
263
+ #
264
+ # * BigQuery tables: `<project_id>:<dataset_id>.<table_id>`
265
+ # * Cloud Storage files: `gs://<bucket>/<path>`
266
+ # * Datastore namespace: <namespace>
267
+ #
268
+ # Nested names could be absent if the embedded object has no string
269
+ # identifier (for an example an image contained within a document).
264
270
  # @!attribute [rw] record_location
265
271
  # @return [Google::Privacy::Dlp::V2::RecordLocation]
266
272
  # Location within a row or record of a database table.
@@ -540,8 +546,9 @@ module Google
540
546
  # from the predefined schema that are missing will be added. No columns in
541
547
  # the existing table will be deleted.
542
548
  #
543
- # If unspecified, then all available columns will be used for a new table,
544
- # and no changes will be made to an existing table.
549
+ # If unspecified, then all available columns will be used for a new table or
550
+ # an (existing) table with no schema, and no changes will be made to an
551
+ # existing table that has a schema.
545
552
  class OutputStorageConfig
546
553
  # Predefined schemas for storing findings.
547
554
  module OutputSchema
@@ -741,7 +748,7 @@ module Google
741
748
  # @return [Google::Privacy::Dlp::V2::EntityId]
742
749
  # Optional message indicating that multiple rows might be associated to a
743
750
  # single individual. If the same entity_id is associated to multiple
744
- # quasi-identifier tuples over distict rows, we consider the entire
751
+ # quasi-identifier tuples over distinct rows, we consider the entire
745
752
  # collection of tuples as the composite quasi-identifier. This collection
746
753
  # is a multiset: the order in which the different tuples appear in the
747
754
  # dataset is ignored, but their frequency is taken into account.
@@ -1133,9 +1140,11 @@ module Google
1133
1140
  # Message for infoType-dependent details parsed from quote.
1134
1141
  # @!attribute [rw] date_time
1135
1142
  # @return [Google::Privacy::Dlp::V2::DateTime]
1143
+ # The date time indicated by the quote.
1136
1144
  class QuoteInfo; end
1137
1145
 
1138
1146
  # Message for a date time object.
1147
+ # e.g. 2018-01-01, 5th August.
1139
1148
  # @!attribute [rw] date
1140
1149
  # @return [Google::Type::Date]
1141
1150
  # One or more of the following must be set. All fields are optional, but
@@ -1807,7 +1816,7 @@ module Google
1807
1816
  # @!attribute [rw] errors
1808
1817
  # @return [Array<Google::Privacy::Dlp::V2::Error>]
1809
1818
  # A stream of errors encountered when the trigger was activated. Repeated
1810
- # errors may result in the JobTrigger automaticaly being paused.
1819
+ # errors may result in the JobTrigger automatically being paused.
1811
1820
  # Will return the last 100 errors. Whenever the JobTrigger is modified
1812
1821
  # this list will be cleared. Output only field.
1813
1822
  # @!attribute [rw] create_time
@@ -2190,6 +2199,21 @@ module Google
2190
2199
  # @!attribute [rw] type
2191
2200
  # @return [Google::Privacy::Dlp::V2::DlpJobType]
2192
2201
  # The type of job. Defaults to `DlpJobType.INSPECT`
2202
+ # @!attribute [rw] order_by
2203
+ # @return [String]
2204
+ # Optional comma separated list of fields to order by,
2205
+ # followed by `asc` or `desc` postfix. This list is case-insensitive,
2206
+ # default sorting order is ascending, redundant space characters are
2207
+ # insignificant.
2208
+ #
2209
+ # Example: `name asc, end_time asc, create_time desc`
2210
+ #
2211
+ # Supported fields are:
2212
+ #
2213
+ # * `create_time`: corresponds to time the job was created.
2214
+ # * `end_time`: corresponds to time the job ended.
2215
+ # * `name`: corresponds to job's name.
2216
+ # * `state`: corresponds to `state`
2193
2217
  class ListDlpJobsRequest; end
2194
2218
 
2195
2219
  # The response message for listing DLP jobs.
@@ -23,7 +23,8 @@ module Google
23
23
  # Name of the information type. Either a name of your choosing when
24
24
  # creating a CustomInfoType, or one of the names listed
25
25
  # at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
26
- # a built-in type.
26
+ # a built-in type. InfoType names should conform to the pattern
27
+ # [a-zA-Z0-9_]\\{1,64}.
27
28
  class InfoType; end
28
29
 
29
30
  # A reference to a StoredInfoType to use with scanning.
@@ -236,6 +237,63 @@ module Google
236
237
  # The kind to process.
237
238
  class DatastoreOptions; end
238
239
 
240
+ # Message representing a set of files in a Cloud Storage bucket. Regular
241
+ # expressions are used to allow fine-grained control over which files in the
242
+ # bucket to include.
243
+ #
244
+ # Included files are those that match at least one item in `include_regex` and
245
+ # do not match any items in `exclude_regex`. Note that a file that matches
246
+ # items from both lists will _not_ be included. For a match to occur, the
247
+ # entire file path (i.e., everything in the url after the bucket name) must
248
+ # match the regular expression.
249
+ #
250
+ # For example, given the input `{bucket_name: "mybucket", include_regex:
251
+ # ["directory1/.*"], exclude_regex:
252
+ # ["directory1/excluded.*"]}`:
253
+ #
254
+ # * `gs://mybucket/directory1/myfile` will be included
255
+ # * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches
256
+ # across `/`)
257
+ # * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the
258
+ # full path doesn't match any items in `include_regex`)
259
+ # * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path
260
+ # matches an item in `exclude_regex`)
261
+ #
262
+ # If `include_regex` is left empty, it will match all files by default
263
+ # (this is equivalent to setting `include_regex: [".*"]`).
264
+ #
265
+ # Some other common use cases:
266
+ #
267
+ # * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all
268
+ # files in `mybucket` except for .pdf files
269
+ # * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will
270
+ # include all files directly under `gs://mybucket/directory/`, without matching
271
+ # across `/`
272
+ # @!attribute [rw] bucket_name
273
+ # @return [String]
274
+ # The name of a Cloud Storage bucket. Required.
275
+ # @!attribute [rw] include_regex
276
+ # @return [Array<String>]
277
+ # A list of regular expressions matching file paths to include. All files in
278
+ # the bucket that match at least one of these regular expressions will be
279
+ # included in the set of files, except for those that also match an item in
280
+ # `exclude_regex`. Leaving this field empty will match all files by default
281
+ # (this is equivalent to including `.*` in the list).
282
+ #
283
+ # Regular expressions use RE2
284
+ # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
285
+ # under the google/re2 repository on GitHub.
286
+ # @!attribute [rw] exclude_regex
287
+ # @return [Array<String>]
288
+ # A list of regular expressions matching file paths to exclude. All files in
289
+ # the bucket that match at least one of these regular expressions will be
290
+ # excluded from the scan.
291
+ #
292
+ # Regular expressions use RE2
293
+ # [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found
294
+ # under the google/re2 repository on GitHub.
295
+ class CloudStorageRegexFileSet; end
296
+
239
297
  # Options defining a file or a set of files within a Google Cloud Storage
240
298
  # bucket.
241
299
  # @!attribute [rw] file_set
@@ -256,7 +314,8 @@ module Google
256
314
  # @return [Array<Google::Privacy::Dlp::V2::FileType>]
257
315
  # List of file type groups to include in the scan.
258
316
  # If empty, all files are scanned and available data format processors
259
- # are applied.
317
+ # are applied. In addition, the binary content of the selected files
318
+ # is always scanned as well.
260
319
  # @!attribute [rw] sample_method
261
320
  # @return [Google::Privacy::Dlp::V2::CloudStorageOptions::SampleMethod]
262
321
  # @!attribute [rw] files_limit_percent
@@ -269,7 +328,12 @@ module Google
269
328
  # @!attribute [rw] url
270
329
  # @return [String]
271
330
  # The Cloud Storage url of the file(s) to scan, in the format
272
- # `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed.
331
+ # `gs://<bucket>/<path>`. Trailing wildcard in the path is allowed. Exactly
332
+ # one of `url` or `regex_file_set` must be set.
333
+ # @!attribute [rw] regex_file_set
334
+ # @return [Google::Privacy::Dlp::V2::CloudStorageRegexFileSet]
335
+ # The regex-filtered set of files to scan. Exactly one of `url` or
336
+ # `regex_file_set` must be set.
273
337
  class FileSet; end
274
338
 
275
339
  # How to sample bytes if not all bytes are scanned. Meaningful only when used
@@ -324,6 +388,10 @@ module Google
324
388
  # TimespanConfig.
325
389
  # @!attribute [rw] sample_method
326
390
  # @return [Google::Privacy::Dlp::V2::BigQueryOptions::SampleMethod]
391
+ # @!attribute [rw] excluded_fields
392
+ # @return [Array<Google::Privacy::Dlp::V2::FieldId>]
393
+ # References to fields excluded from scanning. This allows you to skip
394
+ # inspection of entire columns which you know have no findings.
327
395
  class BigQueryOptions
328
396
  # How to sample rows if not all rows are scanned. Meaningful only when used
329
397
  # in conjunction with rows_limit. If not specified, scanning would start
@@ -766,6 +766,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
766
766
  optional :page_size, :int32, 2
767
767
  optional :page_token, :string, 3
768
768
  optional :type, :enum, 5, "google.privacy.dlp.v2.DlpJobType"
769
+ optional :order_by, :string, 6
769
770
  end
770
771
  add_message "google.privacy.dlp.v2.ListDlpJobsResponse" do
771
772
  repeated :jobs, :message, 1, "google.privacy.dlp.v2.DlpJob"
@@ -78,6 +78,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
78
78
  optional :partition_id, :message, 1, "google.privacy.dlp.v2.PartitionId"
79
79
  optional :kind, :message, 2, "google.privacy.dlp.v2.KindExpression"
80
80
  end
81
+ add_message "google.privacy.dlp.v2.CloudStorageRegexFileSet" do
82
+ optional :bucket_name, :string, 1
83
+ repeated :include_regex, :string, 2
84
+ repeated :exclude_regex, :string, 3
85
+ end
81
86
  add_message "google.privacy.dlp.v2.CloudStorageOptions" do
82
87
  optional :file_set, :message, 1, "google.privacy.dlp.v2.CloudStorageOptions.FileSet"
83
88
  optional :bytes_limit_per_file, :int64, 4
@@ -88,6 +93,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
88
93
  end
89
94
  add_message "google.privacy.dlp.v2.CloudStorageOptions.FileSet" do
90
95
  optional :url, :string, 1
96
+ optional :regex_file_set, :message, 2, "google.privacy.dlp.v2.CloudStorageRegexFileSet"
91
97
  end
92
98
  add_enum "google.privacy.dlp.v2.CloudStorageOptions.SampleMethod" do
93
99
  value :SAMPLE_METHOD_UNSPECIFIED, 0
@@ -106,6 +112,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
106
112
  optional :rows_limit, :int64, 3
107
113
  optional :rows_limit_percent, :int32, 6
108
114
  optional :sample_method, :enum, 4, "google.privacy.dlp.v2.BigQueryOptions.SampleMethod"
115
+ repeated :excluded_fields, :message, 5, "google.privacy.dlp.v2.FieldId"
109
116
  end
110
117
  add_enum "google.privacy.dlp.v2.BigQueryOptions.SampleMethod" do
111
118
  value :SAMPLE_METHOD_UNSPECIFIED, 0
@@ -197,6 +204,7 @@ module Google
197
204
  PartitionId = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.PartitionId").msgclass
198
205
  KindExpression = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.KindExpression").msgclass
199
206
  DatastoreOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.DatastoreOptions").msgclass
207
+ CloudStorageRegexFileSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageRegexFileSet").msgclass
200
208
  CloudStorageOptions = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions").msgclass
201
209
  CloudStorageOptions::FileSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.FileSet").msgclass
202
210
  CloudStorageOptions::SampleMethod = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.privacy.dlp.v2.CloudStorageOptions.SampleMethod").enummodule
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dlp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-03 00:00:00.000000000 Z
11
+ date: 2018-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.50.0
61
+ version: 0.59.2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.50.0
68
+ version: 0.59.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement