google-cloud-security_center-v1 0.3.5 → 0.7.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 +4 -4
- data/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/cloud/security_center/v1.rb +3 -0
- data/lib/google/cloud/security_center/v1/security_center/client.rb +126 -106
- data/lib/google/cloud/security_center/v1/security_center/operations.rb +95 -10
- data/lib/google/cloud/security_center/v1/security_center/paths.rb +175 -17
- data/lib/google/cloud/security_center/v1/version.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/asset_pb.rb +4 -1
- data/lib/google/cloud/securitycenter/v1/finding_pb.rb +11 -1
- data/lib/google/cloud/securitycenter/v1/folder_pb.rb +24 -0
- data/lib/google/cloud/securitycenter/v1/notification_config_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/notification_message_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb +2 -1
- data/lib/google/cloud/securitycenter/v1/resource_pb.rb +3 -0
- data/lib/google/cloud/securitycenter/v1/run_asset_discovery_response_pb.rb +1 -1
- data/lib/google/cloud/securitycenter/v1/security_marks_pb.rb +2 -1
- data/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb +2 -0
- data/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +28 -25
- data/lib/google/cloud/securitycenter/v1/source_pb.rb +2 -1
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/cloud/securitycenter/v1/asset.rb +13 -2
- data/proto_docs/google/cloud/securitycenter/v1/finding.rb +73 -1
- data/proto_docs/google/cloud/securitycenter/v1/folder.rb +40 -0
- data/proto_docs/google/cloud/securitycenter/v1/notification_config.rb +2 -2
- data/proto_docs/google/cloud/securitycenter/v1/organization_settings.rb +4 -0
- data/proto_docs/google/cloud/securitycenter/v1/resource.rb +5 -0
- data/proto_docs/google/cloud/securitycenter/v1/security_marks.rb +10 -0
- data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +62 -45
- data/proto_docs/google/cloud/securitycenter/v1/source.rb +8 -0
- data/proto_docs/google/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- metadata +13 -9
@@ -60,7 +60,7 @@ module Google
|
|
60
60
|
parent_config = while namespace.any?
|
61
61
|
parent_name = namespace.join "::"
|
62
62
|
parent_const = const_get parent_name
|
63
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
64
|
namespace.pop
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
@@ -76,81 +76,81 @@ module Google
|
|
76
76
|
default_config.rpcs.get_iam_policy.timeout = 60.0
|
77
77
|
default_config.rpcs.get_iam_policy.retry_policy = {
|
78
78
|
initial_delay: 0.1,
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
max_delay: 60.0,
|
80
|
+
multiplier: 1.3,
|
81
|
+
retry_codes: [4, 14]
|
82
82
|
}
|
83
83
|
|
84
84
|
default_config.rpcs.get_notification_config.timeout = 60.0
|
85
85
|
default_config.rpcs.get_notification_config.retry_policy = {
|
86
86
|
initial_delay: 0.1,
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
max_delay: 60.0,
|
88
|
+
multiplier: 1.3,
|
89
|
+
retry_codes: [4, 14]
|
90
90
|
}
|
91
91
|
|
92
92
|
default_config.rpcs.get_organization_settings.timeout = 60.0
|
93
93
|
default_config.rpcs.get_organization_settings.retry_policy = {
|
94
94
|
initial_delay: 0.1,
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
max_delay: 60.0,
|
96
|
+
multiplier: 1.3,
|
97
|
+
retry_codes: [4, 14]
|
98
98
|
}
|
99
99
|
|
100
100
|
default_config.rpcs.get_source.timeout = 60.0
|
101
101
|
default_config.rpcs.get_source.retry_policy = {
|
102
102
|
initial_delay: 0.1,
|
103
|
-
|
104
|
-
|
105
|
-
|
103
|
+
max_delay: 60.0,
|
104
|
+
multiplier: 1.3,
|
105
|
+
retry_codes: [4, 14]
|
106
106
|
}
|
107
107
|
|
108
108
|
default_config.rpcs.group_assets.timeout = 480.0
|
109
109
|
default_config.rpcs.group_assets.retry_policy = {
|
110
110
|
initial_delay: 0.1,
|
111
|
-
|
112
|
-
|
113
|
-
|
111
|
+
max_delay: 60.0,
|
112
|
+
multiplier: 1.3,
|
113
|
+
retry_codes: [4, 14]
|
114
114
|
}
|
115
115
|
|
116
116
|
default_config.rpcs.group_findings.timeout = 480.0
|
117
117
|
default_config.rpcs.group_findings.retry_policy = {
|
118
118
|
initial_delay: 0.1,
|
119
|
-
|
120
|
-
|
121
|
-
|
119
|
+
max_delay: 60.0,
|
120
|
+
multiplier: 1.3,
|
121
|
+
retry_codes: [4, 14]
|
122
122
|
}
|
123
123
|
|
124
124
|
default_config.rpcs.list_assets.timeout = 480.0
|
125
125
|
default_config.rpcs.list_assets.retry_policy = {
|
126
126
|
initial_delay: 0.1,
|
127
|
-
|
128
|
-
|
129
|
-
|
127
|
+
max_delay: 60.0,
|
128
|
+
multiplier: 1.3,
|
129
|
+
retry_codes: [4, 14]
|
130
130
|
}
|
131
131
|
|
132
132
|
default_config.rpcs.list_findings.timeout = 480.0
|
133
133
|
default_config.rpcs.list_findings.retry_policy = {
|
134
134
|
initial_delay: 0.1,
|
135
|
-
|
136
|
-
|
137
|
-
|
135
|
+
max_delay: 60.0,
|
136
|
+
multiplier: 1.3,
|
137
|
+
retry_codes: [4, 14]
|
138
138
|
}
|
139
139
|
|
140
140
|
default_config.rpcs.list_notification_configs.timeout = 60.0
|
141
141
|
default_config.rpcs.list_notification_configs.retry_policy = {
|
142
142
|
initial_delay: 0.1,
|
143
|
-
|
144
|
-
|
145
|
-
|
143
|
+
max_delay: 60.0,
|
144
|
+
multiplier: 1.3,
|
145
|
+
retry_codes: [4, 14]
|
146
146
|
}
|
147
147
|
|
148
148
|
default_config.rpcs.list_sources.timeout = 60.0
|
149
149
|
default_config.rpcs.list_sources.retry_policy = {
|
150
150
|
initial_delay: 0.1,
|
151
|
-
|
152
|
-
|
153
|
-
|
151
|
+
max_delay: 60.0,
|
152
|
+
multiplier: 1.3,
|
153
|
+
retry_codes: [4, 14]
|
154
154
|
}
|
155
155
|
|
156
156
|
default_config.rpcs.run_asset_discovery.timeout = 60.0
|
@@ -162,9 +162,9 @@ module Google
|
|
162
162
|
default_config.rpcs.test_iam_permissions.timeout = 60.0
|
163
163
|
default_config.rpcs.test_iam_permissions.retry_policy = {
|
164
164
|
initial_delay: 0.1,
|
165
|
-
|
166
|
-
|
167
|
-
|
165
|
+
max_delay: 60.0,
|
166
|
+
multiplier: 1.3,
|
167
|
+
retry_codes: [4, 14]
|
168
168
|
}
|
169
169
|
|
170
170
|
default_config.rpcs.update_finding.timeout = 60.0
|
@@ -238,7 +238,13 @@ module Google
|
|
238
238
|
|
239
239
|
# Create credentials
|
240
240
|
credentials = @config.credentials
|
241
|
-
|
241
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
242
|
+
# but only if the default endpoint does not have a region prefix.
|
243
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
244
|
+
@config.endpoint == Client.configure.endpoint &&
|
245
|
+
!@config.endpoint.split(".").first.include?("-")
|
246
|
+
credentials ||= Credentials.default scope: @config.scope,
|
247
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
242
248
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
243
249
|
credentials = Credentials.new credentials, scope: @config.scope
|
244
250
|
end
|
@@ -290,8 +296,8 @@ module Google
|
|
290
296
|
# Required. Resource name of the new source's parent. Its format should be
|
291
297
|
# "organizations/[organization_id]".
|
292
298
|
# @param source [::Google::Cloud::SecurityCenter::V1::Source, ::Hash]
|
293
|
-
# Required. The Source being created, only the display_name and description
|
294
|
-
#
|
299
|
+
# Required. The Source being created, only the display_name and description will be
|
300
|
+
# used. All other fields will be ignored.
|
295
301
|
#
|
296
302
|
# @yield [response, operation] Access the result along with the RPC operation
|
297
303
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::Source]
|
@@ -365,8 +371,8 @@ module Google
|
|
365
371
|
# It must be alphanumeric and less than or equal to 32 characters and
|
366
372
|
# greater than 0 characters in length.
|
367
373
|
# @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
|
368
|
-
# Required. The Finding being created. The name and security_marks will be
|
369
|
-
#
|
374
|
+
# Required. The Finding being created. The name and security_marks will be ignored as
|
375
|
+
# they are both output only fields on this resource.
|
370
376
|
#
|
371
377
|
# @yield [response, operation] Access the result along with the RPC operation
|
372
378
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::Finding]
|
@@ -432,17 +438,16 @@ module Google
|
|
432
438
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
433
439
|
#
|
434
440
|
# @param parent [::String]
|
435
|
-
# Required. Resource name of the new notification config's parent. Its format
|
436
|
-
#
|
441
|
+
# Required. Resource name of the new notification config's parent. Its format is
|
442
|
+
# "organizations/[organization_id]".
|
437
443
|
# @param config_id [::String]
|
438
444
|
# Required.
|
439
445
|
# Unique identifier provided by the client within the parent scope.
|
440
446
|
# It must be between 1 and 128 characters, and contains alphanumeric
|
441
447
|
# characters, underscores or hyphens only.
|
442
448
|
# @param notification_config [::Google::Cloud::SecurityCenter::V1::NotificationConfig, ::Hash]
|
443
|
-
# Required. The notification config being created. The name and the service
|
444
|
-
#
|
445
|
-
# resource.
|
449
|
+
# Required. The notification config being created. The name and the service account
|
450
|
+
# will be ignored as they are both output only fields on this resource.
|
446
451
|
#
|
447
452
|
# @yield [response, operation] Access the result along with the RPC operation
|
448
453
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::NotificationConfig]
|
@@ -712,8 +717,8 @@ module Google
|
|
712
717
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
713
718
|
#
|
714
719
|
# @param name [::String]
|
715
|
-
# Required. Name of the organization to get organization settings for. Its
|
716
|
-
#
|
720
|
+
# Required. Name of the organization to get organization settings for. Its format is
|
721
|
+
# "organizations/[organization_id]/organizationSettings".
|
717
722
|
#
|
718
723
|
# @yield [response, operation] Access the result along with the RPC operation
|
719
724
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
|
@@ -848,7 +853,8 @@ module Google
|
|
848
853
|
#
|
849
854
|
# @param parent [::String]
|
850
855
|
# Required. Name of the organization to groupBy. Its format is
|
851
|
-
# "organizations/[organization_id]
|
856
|
+
# "organizations/[organization_id], folders/[folder_id], or
|
857
|
+
# projects/[project_id]".
|
852
858
|
# @param filter [::String]
|
853
859
|
# Expression that defines the filter to apply across assets.
|
854
860
|
# The expression is a list of zero or more restrictions combined via logical
|
@@ -908,14 +914,14 @@ module Google
|
|
908
914
|
# For example, `resource_properties.size = 100` is a valid filter string.
|
909
915
|
#
|
910
916
|
# Use a partial match on the empty string to filter based on a property
|
911
|
-
# existing
|
917
|
+
# existing: `resource_properties.my_property : ""`
|
912
918
|
#
|
913
919
|
# Use a negated partial match on the empty string to filter based on a
|
914
920
|
# property not existing: `-resource_properties.my_property : ""`
|
915
921
|
# @param group_by [::String]
|
916
|
-
# Required. Expression that defines what assets fields to use for grouping.
|
917
|
-
#
|
918
|
-
#
|
922
|
+
# Required. Expression that defines what assets fields to use for grouping. The string
|
923
|
+
# value should follow SQL syntax: comma separated list of fields. For
|
924
|
+
# example:
|
919
925
|
# "security_center_properties.resource_project,security_center_properties.project".
|
920
926
|
#
|
921
927
|
# The following fields are supported when compare_duration is not set:
|
@@ -1023,7 +1029,9 @@ module Google
|
|
1023
1029
|
# specified properties.
|
1024
1030
|
#
|
1025
1031
|
# To group across all sources provide a `-` as the source id.
|
1026
|
-
# Example: /v1/organizations/\\{organization_id}/sources/-/findings
|
1032
|
+
# Example: /v1/organizations/\\{organization_id}/sources/-/findings,
|
1033
|
+
# /v1/folders/\\{folder_id}/sources/-/findings,
|
1034
|
+
# /v1/projects/\\{project_id}/sources/-/findings
|
1027
1035
|
#
|
1028
1036
|
# @overload group_findings(request, options = nil)
|
1029
1037
|
# Pass arguments to `group_findings` via a request object, either of type
|
@@ -1042,9 +1050,12 @@ module Google
|
|
1042
1050
|
#
|
1043
1051
|
# @param parent [::String]
|
1044
1052
|
# Required. Name of the source to groupBy. Its format is
|
1045
|
-
# "organizations/[organization_id]/sources/[source_id]"
|
1046
|
-
#
|
1047
|
-
#
|
1053
|
+
# "organizations/[organization_id]/sources/[source_id]",
|
1054
|
+
# folders/[folder_id]/sources/[source_id], or
|
1055
|
+
# projects/[project_id]/sources/[source_id]. To groupBy across all sources
|
1056
|
+
# provide a source_id of `-`. For example:
|
1057
|
+
# organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/-,
|
1058
|
+
# or projects/\\{project_id}/sources/-
|
1048
1059
|
# @param filter [::String]
|
1049
1060
|
# Expression that defines the filter to apply across findings.
|
1050
1061
|
# The expression is a list of one or more restrictions combined via logical
|
@@ -1079,6 +1090,7 @@ module Google
|
|
1079
1090
|
# * category: `=`, `:`
|
1080
1091
|
# * external_uri: `=`, `:`
|
1081
1092
|
# * event_time: `=`, `>`, `<`, `>=`, `<=`
|
1093
|
+
# * severity: `=`, `:`
|
1082
1094
|
#
|
1083
1095
|
# Usage: This should be milliseconds since epoch or an RFC3339 string.
|
1084
1096
|
# Examples:
|
@@ -1096,9 +1108,9 @@ module Google
|
|
1096
1108
|
# Use a negated partial match on the empty string to filter based on a
|
1097
1109
|
# property not existing: `-source_properties.my_property : ""`
|
1098
1110
|
# @param group_by [::String]
|
1099
|
-
# Required. Expression that defines what assets fields to use for grouping
|
1100
|
-
#
|
1101
|
-
#
|
1111
|
+
# Required. Expression that defines what assets fields to use for grouping (including
|
1112
|
+
# `state_change`). The string value should follow SQL syntax: comma separated
|
1113
|
+
# list of fields. For example: "parent,resource_name".
|
1102
1114
|
#
|
1103
1115
|
# The following fields are supported:
|
1104
1116
|
#
|
@@ -1106,6 +1118,7 @@ module Google
|
|
1106
1118
|
# * category
|
1107
1119
|
# * state
|
1108
1120
|
# * parent
|
1121
|
+
# * severity
|
1109
1122
|
#
|
1110
1123
|
# The following fields are supported when compare_duration is set:
|
1111
1124
|
#
|
@@ -1222,7 +1235,8 @@ module Google
|
|
1222
1235
|
#
|
1223
1236
|
# @param parent [::String]
|
1224
1237
|
# Required. Name of the organization assets should belong to. Its format is
|
1225
|
-
# "organizations/[organization_id]
|
1238
|
+
# "organizations/[organization_id], folders/[folder_id], or
|
1239
|
+
# projects/[project_id]".
|
1226
1240
|
# @param filter [::String]
|
1227
1241
|
# Expression that defines the filter to apply across assets.
|
1228
1242
|
# The expression is a list of zero or more restrictions combined via logical
|
@@ -1339,8 +1353,9 @@ module Google
|
|
1339
1353
|
# is "UNUSED", which will be the state_change set for all assets present at
|
1340
1354
|
# read_time.
|
1341
1355
|
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1342
|
-
#
|
1343
|
-
#
|
1356
|
+
# A field mask to specify the ListAssetsResult fields to be listed in the
|
1357
|
+
# response.
|
1358
|
+
# An empty field mask will list all fields.
|
1344
1359
|
# @param page_token [::String]
|
1345
1360
|
# The value returned by the last `ListAssetsResponse`; indicates
|
1346
1361
|
# that this is a continuation of a prior `ListAssets` call, and
|
@@ -1418,9 +1433,12 @@ module Google
|
|
1418
1433
|
#
|
1419
1434
|
# @param parent [::String]
|
1420
1435
|
# Required. Name of the source the findings belong to. Its format is
|
1421
|
-
# "organizations/[organization_id]/sources/[source_id]
|
1422
|
-
# sources
|
1423
|
-
#
|
1436
|
+
# "organizations/[organization_id]/sources/[source_id],
|
1437
|
+
# folders/[folder_id]/sources/[source_id], or
|
1438
|
+
# projects/[project_id]/sources/[source_id]". To list across all sources
|
1439
|
+
# provide a source_id of `-`. For example:
|
1440
|
+
# organizations/\\{organization_id}/sources/-, folders/\\{folder_id}/sources/- or
|
1441
|
+
# projects/\\{projects_id}/sources/-
|
1424
1442
|
# @param filter [::String]
|
1425
1443
|
# Expression that defines the filter to apply across findings.
|
1426
1444
|
# The expression is a list of one or more restrictions combined via logical
|
@@ -1448,13 +1466,14 @@ module Google
|
|
1448
1466
|
#
|
1449
1467
|
# The following field and operator combinations are supported:
|
1450
1468
|
#
|
1451
|
-
# name: `=`
|
1452
|
-
# parent: `=`, `:`
|
1453
|
-
# resource_name: `=`, `:`
|
1454
|
-
# state: `=`, `:`
|
1455
|
-
# category: `=`, `:`
|
1456
|
-
# external_uri: `=`, `:`
|
1457
|
-
# event_time: `=`, `>`, `<`, `>=`, `<=`
|
1469
|
+
# * name: `=`
|
1470
|
+
# * parent: `=`, `:`
|
1471
|
+
# * resource_name: `=`, `:`
|
1472
|
+
# * state: `=`, `:`
|
1473
|
+
# * category: `=`, `:`
|
1474
|
+
# * external_uri: `=`, `:`
|
1475
|
+
# * event_time: `=`, `>`, `<`, `>=`, `<=`
|
1476
|
+
# * severity: `=`, `:`
|
1458
1477
|
#
|
1459
1478
|
# Usage: This should be milliseconds since epoch or an RFC3339 string.
|
1460
1479
|
# Examples:
|
@@ -1527,8 +1546,8 @@ module Google
|
|
1527
1546
|
# is "UNUSED", which will be the state_change set for all findings present at
|
1528
1547
|
# read_time.
|
1529
1548
|
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1530
|
-
#
|
1531
|
-
#
|
1549
|
+
# A field mask to specify the Finding fields to be listed in the response.
|
1550
|
+
# An empty field mask will list all fields.
|
1532
1551
|
# @param page_token [::String]
|
1533
1552
|
# The value returned by the last `ListFindingsResponse`; indicates
|
1534
1553
|
# that this is a continuation of a prior `ListFindings` call, and
|
@@ -1677,8 +1696,9 @@ module Google
|
|
1677
1696
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1678
1697
|
#
|
1679
1698
|
# @param parent [::String]
|
1680
|
-
# Required. Resource name of the parent of sources to list. Its format should
|
1681
|
-
#
|
1699
|
+
# Required. Resource name of the parent of sources to list. Its format should be
|
1700
|
+
# "organizations/[organization_id], folders/[folder_id], or
|
1701
|
+
# projects/[project_id]".
|
1682
1702
|
# @param page_token [::String]
|
1683
1703
|
# The value returned by the last `ListSourcesResponse`; indicates
|
1684
1704
|
# that this is a continuation of a prior `ListSources` call, and
|
@@ -1757,8 +1777,8 @@ module Google
|
|
1757
1777
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1758
1778
|
#
|
1759
1779
|
# @param parent [::String]
|
1760
|
-
# Required. Name of the organization to run asset discovery for. Its format
|
1761
|
-
#
|
1780
|
+
# Required. Name of the organization to run asset discovery for. Its format is
|
1781
|
+
# "organizations/[organization_id]".
|
1762
1782
|
#
|
1763
1783
|
# @yield [response, operation] Access the result along with the RPC operation
|
1764
1784
|
# @yieldparam response [::Gapic::Operation]
|
@@ -2043,8 +2063,8 @@ module Google
|
|
2043
2063
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
2044
2064
|
#
|
2045
2065
|
# @param finding [::Google::Cloud::SecurityCenter::V1::Finding, ::Hash]
|
2046
|
-
# Required. The finding resource to update or create if it does not already
|
2047
|
-
#
|
2066
|
+
# Required. The finding resource to update or create if it does not already exist.
|
2067
|
+
# parent, security_marks, and update_time will be ignored.
|
2048
2068
|
#
|
2049
2069
|
# In the case of creation, the finding id portion of the name must be
|
2050
2070
|
# alphanumeric and less than or equal to 32 characters and greater than 0
|
@@ -2197,7 +2217,7 @@ module Google
|
|
2197
2217
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2198
2218
|
# The FieldMask to use when updating the settings resource.
|
2199
2219
|
#
|
2200
|
-
#
|
2220
|
+
# If empty all mutable fields will be updated.
|
2201
2221
|
#
|
2202
2222
|
# @yield [response, operation] Access the result along with the RPC operation
|
2203
2223
|
# @yieldparam response [::Google::Cloud::SecurityCenter::V1::OrganizationSettings]
|
@@ -2482,7 +2502,7 @@ module Google
|
|
2482
2502
|
config_attr :scope, nil, ::String, ::Array, nil
|
2483
2503
|
config_attr :lib_name, nil, ::String, nil
|
2484
2504
|
config_attr :lib_version, nil, ::String, nil
|
2485
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
2505
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
2486
2506
|
config_attr :interceptors, nil, ::Array, nil
|
2487
2507
|
config_attr :timeout, nil, ::Numeric, nil
|
2488
2508
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -2503,7 +2523,7 @@ module Google
|
|
2503
2523
|
def rpcs
|
2504
2524
|
@rpcs ||= begin
|
2505
2525
|
parent_rpcs = nil
|
2506
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
2526
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2507
2527
|
Rpcs.new parent_rpcs
|
2508
2528
|
end
|
2509
2529
|
end
|
@@ -2515,7 +2535,7 @@ module Google
|
|
2515
2535
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2516
2536
|
# the following configuration fields:
|
2517
2537
|
#
|
2518
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
2538
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2519
2539
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
2520
2540
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2521
2541
|
# include the following keys:
|
@@ -2644,51 +2664,51 @@ module Google
|
|
2644
2664
|
|
2645
2665
|
# @private
|
2646
2666
|
def initialize parent_rpcs = nil
|
2647
|
-
create_source_config = parent_rpcs
|
2667
|
+
create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source
|
2648
2668
|
@create_source = ::Gapic::Config::Method.new create_source_config
|
2649
|
-
create_finding_config = parent_rpcs
|
2669
|
+
create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding
|
2650
2670
|
@create_finding = ::Gapic::Config::Method.new create_finding_config
|
2651
|
-
create_notification_config_config = parent_rpcs
|
2671
|
+
create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config
|
2652
2672
|
@create_notification_config = ::Gapic::Config::Method.new create_notification_config_config
|
2653
|
-
delete_notification_config_config = parent_rpcs
|
2673
|
+
delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
|
2654
2674
|
@delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
|
2655
|
-
get_iam_policy_config = parent_rpcs
|
2675
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
2656
2676
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
2657
|
-
get_notification_config_config = parent_rpcs
|
2677
|
+
get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config
|
2658
2678
|
@get_notification_config = ::Gapic::Config::Method.new get_notification_config_config
|
2659
|
-
get_organization_settings_config = parent_rpcs
|
2679
|
+
get_organization_settings_config = parent_rpcs.get_organization_settings if parent_rpcs.respond_to? :get_organization_settings
|
2660
2680
|
@get_organization_settings = ::Gapic::Config::Method.new get_organization_settings_config
|
2661
|
-
get_source_config = parent_rpcs
|
2681
|
+
get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source
|
2662
2682
|
@get_source = ::Gapic::Config::Method.new get_source_config
|
2663
|
-
group_assets_config = parent_rpcs
|
2683
|
+
group_assets_config = parent_rpcs.group_assets if parent_rpcs.respond_to? :group_assets
|
2664
2684
|
@group_assets = ::Gapic::Config::Method.new group_assets_config
|
2665
|
-
group_findings_config = parent_rpcs
|
2685
|
+
group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings
|
2666
2686
|
@group_findings = ::Gapic::Config::Method.new group_findings_config
|
2667
|
-
list_assets_config = parent_rpcs
|
2687
|
+
list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets
|
2668
2688
|
@list_assets = ::Gapic::Config::Method.new list_assets_config
|
2669
|
-
list_findings_config = parent_rpcs
|
2689
|
+
list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings
|
2670
2690
|
@list_findings = ::Gapic::Config::Method.new list_findings_config
|
2671
|
-
list_notification_configs_config = parent_rpcs
|
2691
|
+
list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs
|
2672
2692
|
@list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config
|
2673
|
-
list_sources_config = parent_rpcs
|
2693
|
+
list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources
|
2674
2694
|
@list_sources = ::Gapic::Config::Method.new list_sources_config
|
2675
|
-
run_asset_discovery_config = parent_rpcs
|
2695
|
+
run_asset_discovery_config = parent_rpcs.run_asset_discovery if parent_rpcs.respond_to? :run_asset_discovery
|
2676
2696
|
@run_asset_discovery = ::Gapic::Config::Method.new run_asset_discovery_config
|
2677
|
-
set_finding_state_config = parent_rpcs
|
2697
|
+
set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state
|
2678
2698
|
@set_finding_state = ::Gapic::Config::Method.new set_finding_state_config
|
2679
|
-
set_iam_policy_config = parent_rpcs
|
2699
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
2680
2700
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
2681
|
-
test_iam_permissions_config = parent_rpcs
|
2701
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
2682
2702
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
2683
|
-
update_finding_config = parent_rpcs
|
2703
|
+
update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding
|
2684
2704
|
@update_finding = ::Gapic::Config::Method.new update_finding_config
|
2685
|
-
update_notification_config_config = parent_rpcs
|
2705
|
+
update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config
|
2686
2706
|
@update_notification_config = ::Gapic::Config::Method.new update_notification_config_config
|
2687
|
-
update_organization_settings_config = parent_rpcs
|
2707
|
+
update_organization_settings_config = parent_rpcs.update_organization_settings if parent_rpcs.respond_to? :update_organization_settings
|
2688
2708
|
@update_organization_settings = ::Gapic::Config::Method.new update_organization_settings_config
|
2689
|
-
update_source_config = parent_rpcs
|
2709
|
+
update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source
|
2690
2710
|
@update_source = ::Gapic::Config::Method.new update_source_config
|
2691
|
-
update_security_marks_config = parent_rpcs
|
2711
|
+
update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks
|
2692
2712
|
@update_security_marks = ::Gapic::Config::Method.new update_security_marks_config
|
2693
2713
|
|
2694
2714
|
yield self if block_given?
|