google-cloud-dataplex-v1 1.0.1 → 1.2.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/README.md +30 -20
- data/lib/google/cloud/dataplex/v1/bindings_override.rb +120 -0
- data/lib/google/cloud/dataplex/v1/catalog_pb.rb +17 -1
- data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +626 -144
- data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +12 -15
- data/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +19 -0
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +592 -144
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +72 -38
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +435 -133
- data/lib/google/cloud/dataplex/v1/catalog_service/rest.rb +4 -4
- data/lib/google/cloud/dataplex/v1/catalog_service.rb +4 -4
- data/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +44 -20
- data/lib/google/cloud/dataplex/v1/content_service/client.rb +30 -9
- data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +30 -9
- data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +78 -50
- data/lib/google/cloud/dataplex/v1/data_discovery_pb.rb +52 -0
- data/lib/google/cloud/dataplex/v1/data_quality_pb.rb +1 -1
- data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +34 -10
- data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +12 -15
- data/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +36 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +33 -10
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +72 -38
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +41 -16
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +12 -15
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +38 -16
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +72 -38
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +134 -92
- data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +54 -34
- data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +12 -15
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +52 -34
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +72 -38
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +278 -200
- data/lib/google/cloud/dataplex/v1/datascans_pb.rb +3 -1
- data/lib/google/cloud/dataplex/v1/logs_pb.rb +3 -1
- data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +31 -10
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +31 -10
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dataplex/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/api/field_info.rb +88 -0
- data/proto_docs/google/cloud/dataplex/v1/catalog.rb +710 -234
- data/proto_docs/google/cloud/dataplex/v1/data_discovery.rb +156 -0
- data/proto_docs/google/cloud/dataplex/v1/data_profile.rb +4 -4
- data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +7 -2
- data/proto_docs/google/cloud/dataplex/v1/datascans.rb +30 -12
- data/proto_docs/google/cloud/dataplex/v1/logs.rb +51 -1
- data/proto_docs/google/cloud/dataplex/v1/tasks.rb +3 -4
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +8 -5
@@ -34,10 +34,10 @@ module Google
|
|
34
34
|
module V1
|
35
35
|
##
|
36
36
|
# The primary resources offered by this service are EntryGroups, EntryTypes,
|
37
|
-
# AspectTypes,
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
37
|
+
# AspectTypes, and Entries. They collectively let data administrators organize,
|
38
|
+
# manage, secure, and catalog data located across cloud projects in their
|
39
|
+
# organization in a variety of storage systems, including Cloud Storage and
|
40
|
+
# BigQuery.
|
41
41
|
#
|
42
42
|
# To load this service and instantiate a REST client:
|
43
43
|
#
|
@@ -34,10 +34,10 @@ module Google
|
|
34
34
|
module V1
|
35
35
|
##
|
36
36
|
# The primary resources offered by this service are EntryGroups, EntryTypes,
|
37
|
-
# AspectTypes,
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
37
|
+
# AspectTypes, and Entries. They collectively let data administrators organize,
|
38
|
+
# manage, secure, and catalog data located across cloud projects in their
|
39
|
+
# organization in a variety of storage systems, including Cloud Storage and
|
40
|
+
# BigQuery.
|
41
41
|
#
|
42
42
|
# @example Load this service and instantiate a gRPC client
|
43
43
|
#
|
@@ -25,10 +25,10 @@ module Google
|
|
25
25
|
module V1
|
26
26
|
module CatalogService
|
27
27
|
# The primary resources offered by this service are EntryGroups, EntryTypes,
|
28
|
-
# AspectTypes,
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
28
|
+
# AspectTypes, and Entries. They collectively let data administrators organize,
|
29
|
+
# manage, secure, and catalog data located across cloud projects in their
|
30
|
+
# organization in a variety of storage systems, including Cloud Storage and
|
31
|
+
# BigQuery.
|
32
32
|
class Service
|
33
33
|
|
34
34
|
include ::GRPC::GenericService
|
@@ -37,35 +37,35 @@ module Google
|
|
37
37
|
self.unmarshal_class_method = :decode
|
38
38
|
self.service_name = 'google.cloud.dataplex.v1.CatalogService'
|
39
39
|
|
40
|
-
# Creates an EntryType
|
40
|
+
# Creates an EntryType.
|
41
41
|
rpc :CreateEntryType, ::Google::Cloud::Dataplex::V1::CreateEntryTypeRequest, ::Google::Longrunning::Operation
|
42
|
-
# Updates
|
42
|
+
# Updates an EntryType.
|
43
43
|
rpc :UpdateEntryType, ::Google::Cloud::Dataplex::V1::UpdateEntryTypeRequest, ::Google::Longrunning::Operation
|
44
|
-
# Deletes
|
44
|
+
# Deletes an EntryType.
|
45
45
|
rpc :DeleteEntryType, ::Google::Cloud::Dataplex::V1::DeleteEntryTypeRequest, ::Google::Longrunning::Operation
|
46
46
|
# Lists EntryType resources in a project and location.
|
47
47
|
rpc :ListEntryTypes, ::Google::Cloud::Dataplex::V1::ListEntryTypesRequest, ::Google::Cloud::Dataplex::V1::ListEntryTypesResponse
|
48
|
-
#
|
48
|
+
# Gets an EntryType.
|
49
49
|
rpc :GetEntryType, ::Google::Cloud::Dataplex::V1::GetEntryTypeRequest, ::Google::Cloud::Dataplex::V1::EntryType
|
50
|
-
# Creates an AspectType
|
50
|
+
# Creates an AspectType.
|
51
51
|
rpc :CreateAspectType, ::Google::Cloud::Dataplex::V1::CreateAspectTypeRequest, ::Google::Longrunning::Operation
|
52
|
-
# Updates
|
52
|
+
# Updates an AspectType.
|
53
53
|
rpc :UpdateAspectType, ::Google::Cloud::Dataplex::V1::UpdateAspectTypeRequest, ::Google::Longrunning::Operation
|
54
|
-
# Deletes
|
54
|
+
# Deletes an AspectType.
|
55
55
|
rpc :DeleteAspectType, ::Google::Cloud::Dataplex::V1::DeleteAspectTypeRequest, ::Google::Longrunning::Operation
|
56
56
|
# Lists AspectType resources in a project and location.
|
57
57
|
rpc :ListAspectTypes, ::Google::Cloud::Dataplex::V1::ListAspectTypesRequest, ::Google::Cloud::Dataplex::V1::ListAspectTypesResponse
|
58
|
-
#
|
58
|
+
# Gets an AspectType.
|
59
59
|
rpc :GetAspectType, ::Google::Cloud::Dataplex::V1::GetAspectTypeRequest, ::Google::Cloud::Dataplex::V1::AspectType
|
60
|
-
# Creates an EntryGroup
|
60
|
+
# Creates an EntryGroup.
|
61
61
|
rpc :CreateEntryGroup, ::Google::Cloud::Dataplex::V1::CreateEntryGroupRequest, ::Google::Longrunning::Operation
|
62
|
-
# Updates
|
62
|
+
# Updates an EntryGroup.
|
63
63
|
rpc :UpdateEntryGroup, ::Google::Cloud::Dataplex::V1::UpdateEntryGroupRequest, ::Google::Longrunning::Operation
|
64
|
-
# Deletes
|
64
|
+
# Deletes an EntryGroup.
|
65
65
|
rpc :DeleteEntryGroup, ::Google::Cloud::Dataplex::V1::DeleteEntryGroupRequest, ::Google::Longrunning::Operation
|
66
66
|
# Lists EntryGroup resources in a project and location.
|
67
67
|
rpc :ListEntryGroups, ::Google::Cloud::Dataplex::V1::ListEntryGroupsRequest, ::Google::Cloud::Dataplex::V1::ListEntryGroupsResponse
|
68
|
-
#
|
68
|
+
# Gets an EntryGroup.
|
69
69
|
rpc :GetEntryGroup, ::Google::Cloud::Dataplex::V1::GetEntryGroupRequest, ::Google::Cloud::Dataplex::V1::EntryGroup
|
70
70
|
# Creates an Entry.
|
71
71
|
rpc :CreateEntry, ::Google::Cloud::Dataplex::V1::CreateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry
|
@@ -73,14 +73,38 @@ module Google
|
|
73
73
|
rpc :UpdateEntry, ::Google::Cloud::Dataplex::V1::UpdateEntryRequest, ::Google::Cloud::Dataplex::V1::Entry
|
74
74
|
# Deletes an Entry.
|
75
75
|
rpc :DeleteEntry, ::Google::Cloud::Dataplex::V1::DeleteEntryRequest, ::Google::Cloud::Dataplex::V1::Entry
|
76
|
-
# Lists
|
76
|
+
# Lists Entries within an EntryGroup.
|
77
77
|
rpc :ListEntries, ::Google::Cloud::Dataplex::V1::ListEntriesRequest, ::Google::Cloud::Dataplex::V1::ListEntriesResponse
|
78
|
-
# Gets
|
78
|
+
# Gets an Entry.
|
79
|
+
#
|
80
|
+
# **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is
|
81
|
+
# changing. For more information, see [Changes to BigQuery metadata stored in
|
82
|
+
# Dataplex
|
83
|
+
# Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).
|
79
84
|
rpc :GetEntry, ::Google::Cloud::Dataplex::V1::GetEntryRequest, ::Google::Cloud::Dataplex::V1::Entry
|
80
|
-
# Looks up a single
|
85
|
+
# Looks up a single Entry by name using the permission on the source system.
|
86
|
+
#
|
87
|
+
# **Caution**: The BigQuery metadata that is stored in Dataplex Catalog is
|
88
|
+
# changing. For more information, see [Changes to BigQuery metadata stored in
|
89
|
+
# Dataplex
|
90
|
+
# Catalog](https://cloud.google.com/dataplex/docs/biqquery-metadata-changes).
|
81
91
|
rpc :LookupEntry, ::Google::Cloud::Dataplex::V1::LookupEntryRequest, ::Google::Cloud::Dataplex::V1::Entry
|
82
|
-
# Searches for
|
92
|
+
# Searches for Entries matching the given query and scope.
|
83
93
|
rpc :SearchEntries, ::Google::Cloud::Dataplex::V1::SearchEntriesRequest, ::Google::Cloud::Dataplex::V1::SearchEntriesResponse
|
94
|
+
# Creates a metadata job. For example, use a metadata job to import Dataplex
|
95
|
+
# Catalog entries and aspects from a third-party system into Dataplex.
|
96
|
+
rpc :CreateMetadataJob, ::Google::Cloud::Dataplex::V1::CreateMetadataJobRequest, ::Google::Longrunning::Operation
|
97
|
+
# Gets a metadata job.
|
98
|
+
rpc :GetMetadataJob, ::Google::Cloud::Dataplex::V1::GetMetadataJobRequest, ::Google::Cloud::Dataplex::V1::MetadataJob
|
99
|
+
# Lists metadata jobs.
|
100
|
+
rpc :ListMetadataJobs, ::Google::Cloud::Dataplex::V1::ListMetadataJobsRequest, ::Google::Cloud::Dataplex::V1::ListMetadataJobsResponse
|
101
|
+
# Cancels a metadata job.
|
102
|
+
#
|
103
|
+
# If you cancel a metadata import job that is in progress, the changes in the
|
104
|
+
# job might be partially applied. We recommend that you reset the state of
|
105
|
+
# the entry groups in your project by running another metadata job that
|
106
|
+
# reverts the changes from the canceled job.
|
107
|
+
rpc :CancelMetadataJob, ::Google::Cloud::Dataplex::V1::CancelMetadataJobRequest, ::Google::Protobuf::Empty
|
84
108
|
end
|
85
109
|
|
86
110
|
Stub = Service.rpc_stub_class
|
@@ -187,14 +187,26 @@ module Google
|
|
187
187
|
universe_domain: @config.universe_domain,
|
188
188
|
channel_args: @config.channel_args,
|
189
189
|
interceptors: @config.interceptors,
|
190
|
-
channel_pool_config: @config.channel_pool
|
190
|
+
channel_pool_config: @config.channel_pool,
|
191
|
+
logger: @config.logger
|
191
192
|
)
|
192
193
|
|
194
|
+
@content_service_stub.stub_logger&.info do |entry|
|
195
|
+
entry.set_system_name
|
196
|
+
entry.set_service
|
197
|
+
entry.message = "Created client for #{entry.service}"
|
198
|
+
entry.set_credentials_fields credentials
|
199
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
200
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
201
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
202
|
+
end
|
203
|
+
|
193
204
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
194
205
|
config.credentials = credentials
|
195
206
|
config.quota_project = @quota_project_id
|
196
207
|
config.endpoint = @content_service_stub.endpoint
|
197
208
|
config.universe_domain = @content_service_stub.universe_domain
|
209
|
+
config.logger = @content_service_stub.logger if config.respond_to? :logger=
|
198
210
|
end
|
199
211
|
|
200
212
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -202,6 +214,7 @@ module Google
|
|
202
214
|
config.quota_project = @quota_project_id
|
203
215
|
config.endpoint = @content_service_stub.endpoint
|
204
216
|
config.universe_domain = @content_service_stub.universe_domain
|
217
|
+
config.logger = @content_service_stub.logger if config.respond_to? :logger=
|
205
218
|
end
|
206
219
|
end
|
207
220
|
|
@@ -219,6 +232,15 @@ module Google
|
|
219
232
|
#
|
220
233
|
attr_reader :iam_policy_client
|
221
234
|
|
235
|
+
##
|
236
|
+
# The logger used for request/response debug logging.
|
237
|
+
#
|
238
|
+
# @return [Logger]
|
239
|
+
#
|
240
|
+
def logger
|
241
|
+
@content_service_stub.logger
|
242
|
+
end
|
243
|
+
|
222
244
|
# Service calls
|
223
245
|
|
224
246
|
##
|
@@ -307,7 +329,6 @@ module Google
|
|
307
329
|
|
308
330
|
@content_service_stub.call_rpc :create_content, request, options: options do |response, operation|
|
309
331
|
yield response, operation if block_given?
|
310
|
-
return response
|
311
332
|
end
|
312
333
|
rescue ::GRPC::BadStatus => e
|
313
334
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -399,7 +420,6 @@ module Google
|
|
399
420
|
|
400
421
|
@content_service_stub.call_rpc :update_content, request, options: options do |response, operation|
|
401
422
|
yield response, operation if block_given?
|
402
|
-
return response
|
403
423
|
end
|
404
424
|
rescue ::GRPC::BadStatus => e
|
405
425
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -486,7 +506,6 @@ module Google
|
|
486
506
|
|
487
507
|
@content_service_stub.call_rpc :delete_content, request, options: options do |response, operation|
|
488
508
|
yield response, operation if block_given?
|
489
|
-
return response
|
490
509
|
end
|
491
510
|
rescue ::GRPC::BadStatus => e
|
492
511
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -575,7 +594,6 @@ module Google
|
|
575
594
|
|
576
595
|
@content_service_stub.call_rpc :get_content, request, options: options do |response, operation|
|
577
596
|
yield response, operation if block_given?
|
578
|
-
return response
|
579
597
|
end
|
580
598
|
rescue ::GRPC::BadStatus => e
|
581
599
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -670,7 +688,6 @@ module Google
|
|
670
688
|
|
671
689
|
@content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
672
690
|
yield response, operation if block_given?
|
673
|
-
return response
|
674
691
|
end
|
675
692
|
rescue ::GRPC::BadStatus => e
|
676
693
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -772,7 +789,6 @@ module Google
|
|
772
789
|
|
773
790
|
@content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
774
791
|
yield response, operation if block_given?
|
775
|
-
return response
|
776
792
|
end
|
777
793
|
rescue ::GRPC::BadStatus => e
|
778
794
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -873,7 +889,6 @@ module Google
|
|
873
889
|
|
874
890
|
@content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
875
891
|
yield response, operation if block_given?
|
876
|
-
return response
|
877
892
|
end
|
878
893
|
rescue ::GRPC::BadStatus => e
|
879
894
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -984,7 +999,7 @@ module Google
|
|
984
999
|
@content_service_stub.call_rpc :list_content, request, options: options do |response, operation|
|
985
1000
|
response = ::Gapic::PagedEnumerable.new @content_service_stub, :list_content, request, response, operation, options
|
986
1001
|
yield response, operation if block_given?
|
987
|
-
|
1002
|
+
throw :response, response
|
988
1003
|
end
|
989
1004
|
rescue ::GRPC::BadStatus => e
|
990
1005
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1073,6 +1088,11 @@ module Google
|
|
1073
1088
|
# default endpoint URL. The default value of nil uses the environment
|
1074
1089
|
# universe (usually the default "googleapis.com" universe).
|
1075
1090
|
# @return [::String,nil]
|
1091
|
+
# @!attribute [rw] logger
|
1092
|
+
# A custom logger to use for request/response debug logging, or the value
|
1093
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1094
|
+
# explicitly disable logging.
|
1095
|
+
# @return [::Logger,:default,nil]
|
1076
1096
|
#
|
1077
1097
|
class Configuration
|
1078
1098
|
extend ::Gapic::Config
|
@@ -1097,6 +1117,7 @@ module Google
|
|
1097
1117
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1098
1118
|
config_attr :quota_project, nil, ::String, nil
|
1099
1119
|
config_attr :universe_domain, nil, ::String, nil
|
1120
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1100
1121
|
|
1101
1122
|
# @private
|
1102
1123
|
def initialize parent_config = nil
|
@@ -180,15 +180,27 @@ module Google
|
|
180
180
|
endpoint: @config.endpoint,
|
181
181
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
182
182
|
universe_domain: @config.universe_domain,
|
183
|
-
credentials: credentials
|
183
|
+
credentials: credentials,
|
184
|
+
logger: @config.logger
|
184
185
|
)
|
185
186
|
|
187
|
+
@content_service_stub.logger(stub: true)&.info do |entry|
|
188
|
+
entry.set_system_name
|
189
|
+
entry.set_service
|
190
|
+
entry.message = "Created client for #{entry.service}"
|
191
|
+
entry.set_credentials_fields credentials
|
192
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
193
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
194
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
195
|
+
end
|
196
|
+
|
186
197
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
187
198
|
config.credentials = credentials
|
188
199
|
config.quota_project = @quota_project_id
|
189
200
|
config.endpoint = @content_service_stub.endpoint
|
190
201
|
config.universe_domain = @content_service_stub.universe_domain
|
191
202
|
config.bindings_override = @config.bindings_override
|
203
|
+
config.logger = @content_service_stub.logger if config.respond_to? :logger=
|
192
204
|
end
|
193
205
|
|
194
206
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -197,6 +209,7 @@ module Google
|
|
197
209
|
config.endpoint = @content_service_stub.endpoint
|
198
210
|
config.universe_domain = @content_service_stub.universe_domain
|
199
211
|
config.bindings_override = @config.bindings_override
|
212
|
+
config.logger = @content_service_stub.logger if config.respond_to? :logger=
|
200
213
|
end
|
201
214
|
end
|
202
215
|
|
@@ -214,6 +227,15 @@ module Google
|
|
214
227
|
#
|
215
228
|
attr_reader :iam_policy_client
|
216
229
|
|
230
|
+
##
|
231
|
+
# The logger used for request/response debug logging.
|
232
|
+
#
|
233
|
+
# @return [Logger]
|
234
|
+
#
|
235
|
+
def logger
|
236
|
+
@content_service_stub.logger
|
237
|
+
end
|
238
|
+
|
217
239
|
# Service calls
|
218
240
|
|
219
241
|
##
|
@@ -295,7 +317,6 @@ module Google
|
|
295
317
|
|
296
318
|
@content_service_stub.create_content request, options do |result, operation|
|
297
319
|
yield result, operation if block_given?
|
298
|
-
return result
|
299
320
|
end
|
300
321
|
rescue ::Gapic::Rest::Error => e
|
301
322
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -380,7 +401,6 @@ module Google
|
|
380
401
|
|
381
402
|
@content_service_stub.update_content request, options do |result, operation|
|
382
403
|
yield result, operation if block_given?
|
383
|
-
return result
|
384
404
|
end
|
385
405
|
rescue ::Gapic::Rest::Error => e
|
386
406
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -460,7 +480,6 @@ module Google
|
|
460
480
|
|
461
481
|
@content_service_stub.delete_content request, options do |result, operation|
|
462
482
|
yield result, operation if block_given?
|
463
|
-
return result
|
464
483
|
end
|
465
484
|
rescue ::Gapic::Rest::Error => e
|
466
485
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -542,7 +561,6 @@ module Google
|
|
542
561
|
|
543
562
|
@content_service_stub.get_content request, options do |result, operation|
|
544
563
|
yield result, operation if block_given?
|
545
|
-
return result
|
546
564
|
end
|
547
565
|
rescue ::Gapic::Rest::Error => e
|
548
566
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -630,7 +648,6 @@ module Google
|
|
630
648
|
|
631
649
|
@content_service_stub.get_iam_policy request, options do |result, operation|
|
632
650
|
yield result, operation if block_given?
|
633
|
-
return result
|
634
651
|
end
|
635
652
|
rescue ::Gapic::Rest::Error => e
|
636
653
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -725,7 +742,6 @@ module Google
|
|
725
742
|
|
726
743
|
@content_service_stub.set_iam_policy request, options do |result, operation|
|
727
744
|
yield result, operation if block_given?
|
728
|
-
return result
|
729
745
|
end
|
730
746
|
rescue ::Gapic::Rest::Error => e
|
731
747
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -819,7 +835,6 @@ module Google
|
|
819
835
|
|
820
836
|
@content_service_stub.test_iam_permissions request, options do |result, operation|
|
821
837
|
yield result, operation if block_given?
|
822
|
-
return result
|
823
838
|
end
|
824
839
|
rescue ::Gapic::Rest::Error => e
|
825
840
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -923,7 +938,7 @@ module Google
|
|
923
938
|
@content_service_stub.list_content request, options do |result, operation|
|
924
939
|
result = ::Gapic::Rest::PagedEnumerable.new @content_service_stub, :list_content, "content", request, result, options
|
925
940
|
yield result, operation if block_given?
|
926
|
-
|
941
|
+
throw :response, result
|
927
942
|
end
|
928
943
|
rescue ::Gapic::Rest::Error => e
|
929
944
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1003,6 +1018,11 @@ module Google
|
|
1003
1018
|
# default endpoint URL. The default value of nil uses the environment
|
1004
1019
|
# universe (usually the default "googleapis.com" universe).
|
1005
1020
|
# @return [::String,nil]
|
1021
|
+
# @!attribute [rw] logger
|
1022
|
+
# A custom logger to use for request/response debug logging, or the value
|
1023
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1024
|
+
# explicitly disable logging.
|
1025
|
+
# @return [::Logger,:default,nil]
|
1006
1026
|
#
|
1007
1027
|
class Configuration
|
1008
1028
|
extend ::Gapic::Config
|
@@ -1031,6 +1051,7 @@ module Google
|
|
1031
1051
|
# by the host service.
|
1032
1052
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1033
1053
|
config_attr :bindings_override, {}, ::Hash, nil
|
1054
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1034
1055
|
|
1035
1056
|
# @private
|
1036
1057
|
def initialize parent_config = nil
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the create_content REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "create_content",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "update_content",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "delete_content",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "get_content",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "get_iam_policy",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "set_iam_policy",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -315,16 +339,18 @@ module Google
|
|
315
339
|
|
316
340
|
response = @client_stub.make_http_request(
|
317
341
|
verb,
|
318
|
-
uri:
|
319
|
-
body:
|
320
|
-
params:
|
342
|
+
uri: uri,
|
343
|
+
body: body || "",
|
344
|
+
params: query_string_params,
|
345
|
+
method_name: "test_iam_permissions",
|
321
346
|
options: options
|
322
347
|
)
|
323
348
|
operation = ::Gapic::Rest::TransportOperation.new response
|
324
349
|
result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
325
|
-
|
326
|
-
|
327
|
-
|
350
|
+
catch :response do
|
351
|
+
yield result, operation if block_given?
|
352
|
+
result
|
353
|
+
end
|
328
354
|
end
|
329
355
|
|
330
356
|
##
|
@@ -353,16 +379,18 @@ module Google
|
|
353
379
|
|
354
380
|
response = @client_stub.make_http_request(
|
355
381
|
verb,
|
356
|
-
uri:
|
357
|
-
body:
|
358
|
-
params:
|
382
|
+
uri: uri,
|
383
|
+
body: body || "",
|
384
|
+
params: query_string_params,
|
385
|
+
method_name: "list_content",
|
359
386
|
options: options
|
360
387
|
)
|
361
388
|
operation = ::Gapic::Rest::TransportOperation.new response
|
362
389
|
result = ::Google::Cloud::Dataplex::V1::ListContentResponse.decode_json response.body, ignore_unknown_fields: true
|
363
|
-
|
364
|
-
|
365
|
-
|
390
|
+
catch :response do
|
391
|
+
yield result, operation if block_given?
|
392
|
+
result
|
393
|
+
end
|
366
394
|
end
|
367
395
|
|
368
396
|
##
|