Class: Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/dataplex/v1/business_glossary_service/client.rb

Overview

Client for the BusinessGlossaryService service.

BusinessGlossaryService provides APIs for managing business glossary resources for enterprise customers. The resources currently supported in Business Glossary are:

  1. Glossary
  2. GlossaryCategory
  3. GlossaryTerm

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#glossary_category_path, #glossary_path, #glossary_term_path, #location_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new BusinessGlossaryService client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the BusinessGlossaryService client.

Yield Parameters:



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 131

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/dataplex/v1/business_glossary_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @business_glossary_service_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool,
    logger: @config.logger
  )

  @business_glossary_service_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @business_glossary_service_stub.endpoint
    config.universe_domain = @business_glossary_service_stub.universe_domain
    config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger=
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @business_glossary_service_stub.endpoint
    config.universe_domain = @business_glossary_service_stub.universe_domain
    config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Client)


224
225
226
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 224

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Client)


217
218
219
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 217

def location_client
  @location_client
end

#operations_client::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Operations (readonly)

Get the associated client for long-running operations.



210
211
212
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 210

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the BusinessGlossaryService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all BusinessGlossaryService clients
::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 69

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Dataplex", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the BusinessGlossaryService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



101
102
103
104
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 101

def configure
  yield @config if block_given?
  @config
end

#create_glossary(request, options = nil) ⇒ ::Gapic::Operation #create_glossary(parent: nil, glossary_id: nil, glossary: nil, validate_only: nil) ⇒ ::Gapic::Operation

Creates a new Glossary resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new

# Call the create_glossary method.
result = client.create_glossary request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_glossary(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_glossary via a request object, either of type CreateGlossaryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CreateGlossaryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_glossary(parent: nil, glossary_id: nil, glossary: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_glossary via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource where this Glossary will be created. Format: projects/{project_id_or_number}/locations/{location_id} where location_id refers to a Google Cloud region.

    • glossary_id (::String) (defaults to: nil)

      Required. Glossary ID: Glossary identifier.

    • glossary (::Google::Cloud::Dataplex::V1::Glossary, ::Hash) (defaults to: nil)

      Required. The Glossary to create.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Validates the request without actually creating the Glossary. Default: false.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 297

def create_glossary request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_glossary..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_glossary.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_glossary.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :create_glossary, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_glossary_category(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory #create_glossary_category(parent: nil, category_id: nil, category: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

Creates a new GlossaryCategory resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest.new

# Call the create_glossary_category method.
result = client.create_glossary_category request

# The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory.
p result

Overloads:

  • #create_glossary_category(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

    Pass arguments to create_glossary_category via a request object, either of type CreateGlossaryCategoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_glossary_category(parent: nil, category_id: nil, category: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

    Pass arguments to create_glossary_category via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource where this GlossaryCategory will be created. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} where locationId refers to a Google Cloud region.

    • category_id (::String) (defaults to: nil)

      Required. GlossaryCategory identifier.

    • category (::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash) (defaults to: nil)

      Required. The GlossaryCategory to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 796

def create_glossary_category request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryCategoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_glossary_category..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_glossary_category.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_glossary_category.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :create_glossary_category, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_glossary_term(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm #create_glossary_term(parent: nil, term_id: nil, term: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

Creates a new GlossaryTerm resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest.new

# Call the create_glossary_term method.
result = client.create_glossary_term request

# The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm.
p result

Overloads:

  • #create_glossary_term(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

    Pass arguments to create_glossary_term via a request object, either of type CreateGlossaryTermRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_glossary_term(parent: nil, term_id: nil, term: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

    Pass arguments to create_glossary_term via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent resource where the GlossaryTerm will be created. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} where location_id refers to a Google Cloud region.

    • term_id (::String) (defaults to: nil)

      Required. GlossaryTerm identifier.

    • term (::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash) (defaults to: nil)

      Required. The GlossaryTerm to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 1275

def create_glossary_term request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateGlossaryTermRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_glossary_term..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_glossary_term.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_glossary_term.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :create_glossary_term, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_glossary(request, options = nil) ⇒ ::Gapic::Operation #delete_glossary(name: nil, etag: nil) ⇒ ::Gapic::Operation

Deletes a Glossary resource. All the categories and terms within the Glossary must be deleted before the Glossary can be deleted.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new

# Call the delete_glossary method.
result = client.delete_glossary request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_glossary(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_glossary via a request object, either of type DeleteGlossaryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_glossary(name: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_glossary via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Glossary to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}

    • etag (::String) (defaults to: nil)

      Optional. The etag of the Glossary. If this is provided, it must match the server's etag. If the etag is provided and does not match the server-computed etag, the request must fail with a ABORTED error code.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 501

def delete_glossary request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_glossary..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_glossary.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_glossary.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :delete_glossary, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_glossary_category(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_glossary_category(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a GlossaryCategory resource. All the GlossaryCategories and GlossaryTerms nested directly under the specified GlossaryCategory will be moved one level up to the parent in the hierarchy.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest.new

# Call the delete_glossary_category method.
result = client.delete_glossary_category request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_glossary_category(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_glossary_category via a request object, either of type DeleteGlossaryCategoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_glossary_category(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_glossary_category via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the GlossaryCategory to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 975

def delete_glossary_category request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryCategoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_glossary_category..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_glossary_category.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_glossary_category.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :delete_glossary_category, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_glossary_term(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_glossary_term(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a GlossaryTerm resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest.new

# Call the delete_glossary_term method.
result = client.delete_glossary_term request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_glossary_term(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_glossary_term via a request object, either of type DeleteGlossaryTermRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_glossary_term(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_glossary_term via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the GlossaryTerm to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 1452

def delete_glossary_term request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteGlossaryTermRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_glossary_term..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_glossary_term.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_glossary_term.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :delete_glossary_term, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_glossary(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Glossary #get_glossary(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Glossary

Gets a Glossary resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetGlossaryRequest.new

# Call the get_glossary method.
result = client.get_glossary request

# The returned object is of type Google::Cloud::Dataplex::V1::Glossary.
p result

Overloads:

  • #get_glossary(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::Glossary

    Pass arguments to get_glossary via a request object, either of type GetGlossaryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetGlossaryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_glossary(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::Glossary

    Pass arguments to get_glossary via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Glossary to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 590

def get_glossary request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_glossary..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_glossary.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_glossary.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :get_glossary, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_glossary_category(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory #get_glossary_category(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

Gets a GlossaryCategory resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest.new

# Call the get_glossary_category method.
result = client.get_glossary_category request

# The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory.
p result

Overloads:

  • #get_glossary_category(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

    Pass arguments to get_glossary_category via a request object, either of type GetGlossaryCategoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_glossary_category(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

    Pass arguments to get_glossary_category via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the GlossaryCategory to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 1062

def get_glossary_category request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryCategoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_glossary_category..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_glossary_category.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_glossary_category.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :get_glossary_category, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_glossary_term(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm #get_glossary_term(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

Gets a GlossaryTerm resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetGlossaryTermRequest.new

# Call the get_glossary_term method.
result = client.get_glossary_term request

# The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm.
p result

Overloads:

  • #get_glossary_term(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

    Pass arguments to get_glossary_term via a request object, either of type GetGlossaryTermRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_glossary_term(name: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

    Pass arguments to get_glossary_term via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the GlossaryTerm to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 1539

def get_glossary_term request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetGlossaryTermRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_glossary_term..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_glossary_term.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_glossary_term.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :get_glossary_term, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_glossaries(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary> #list_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>

Lists Glossary resources in a project and location.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new

# Call the list_glossaries method.
result = client.list_glossaries request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary.
  p item
end

Overloads:

  • #list_glossaries(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>

    Pass arguments to list_glossaries via a request object, either of type ListGlossariesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListGlossariesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary>

    Pass arguments to list_glossaries via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which has this collection of Glossaries. Format: projects/{project_id_or_number}/locations/{location_id} where location_id refers to a Google Cloud region.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of Glossaries to return. The service may return fewer than this value. If unspecified, at most 50 Glossaries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListGlossaries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListGlossaries must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter expression that filters Glossaries listed in the response. Filters on proto fields of Glossary are supported. Examples of using a filter are:

      • display_name="my-glossary"
      • categoryCount=1
      • termCount=0
    • order_by (::String) (defaults to: nil)

      Optional. Order by expression that orders Glossaries listed in the response. Order by fields are: name or create_time for the result. If not specified, the ordering is undefined.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 702

def list_glossaries request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossariesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_glossaries..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_glossaries.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_glossaries.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :list_glossaries, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossaries, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_glossary_categories(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory> #list_glossary_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>

Lists GlossaryCategory resources in a Glossary.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest.new

# Call the list_glossary_categories method.
result = client.list_glossary_categories request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryCategory.
  p item
end

Overloads:

  • #list_glossary_categories(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>

    Pass arguments to list_glossary_categories via a request object, either of type ListGlossaryCategoriesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_glossary_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory>

    Pass arguments to list_glossary_categories via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which has this collection of GlossaryCategories. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} Location is the Google Cloud region.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of GlossaryCategories to return. The service may return fewer than this value. If unspecified, at most 50 GlossaryCategories will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListGlossaryCategories call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListGlossaryCategories must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter expression that filters GlossaryCategories listed in the response. Filters are supported on the following fields:

      • immediate_parent

      Examples of using a filter are: - immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}" - immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"

      This will only return the GlossaryCategories that are directly nested under the specified parent.

    • order_by (::String) (defaults to: nil)

      Optional. Order by expression that orders GlossaryCategories listed in the response. Order by fields are: name or create_time for the result. If not specified, the ordering is undefined.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 1181

def list_glossary_categories request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryCategoriesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_glossary_categories..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_glossary_categories.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_glossary_categories.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :list_glossary_categories, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_categories, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_glossary_terms(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm> #list_glossary_terms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>

Lists GlossaryTerm resources in a Glossary.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest.new

# Call the list_glossary_terms method.
result = client.list_glossary_terms request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Dataplex::V1::GlossaryTerm.
  p item
end

Overloads:

  • #list_glossary_terms(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>

    Pass arguments to list_glossary_terms via a request object, either of type ListGlossaryTermsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_glossary_terms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm>

    Pass arguments to list_glossary_terms via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent, which has this collection of GlossaryTerms. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} where location_id refers to a Google Cloud region.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of GlossaryTerms to return. The service may return fewer than this value. If unspecified, at most 50 GlossaryTerms will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListGlossaryTerms call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListGlossaryTerms must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Optional. Filter expression that filters GlossaryTerms listed in the response. Filters are supported on the following fields:

      • immediate_parent

      Examples of using a filter are: - immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}" - immediate_parent="projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}"

      This will only return the GlossaryTerms that are directly nested under the specified parent.

    • order_by (::String) (defaults to: nil)

      Optional. Order by expression that orders GlossaryTerms listed in the response. Order by fields are: name or create_time for the result. If not specified, the ordering is undefined.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 1658

def list_glossary_terms request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListGlossaryTermsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_glossary_terms..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_glossary_terms.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_glossary_terms.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :list_glossary_terms, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_terms, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


231
232
233
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 231

def logger
  @business_glossary_service_stub.logger
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


111
112
113
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 111

def universe_domain
  @business_glossary_service_stub.universe_domain
end

#update_glossary(request, options = nil) ⇒ ::Gapic::Operation #update_glossary(glossary: nil, update_mask: nil, validate_only: nil) ⇒ ::Gapic::Operation

Updates a Glossary resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::UpdateGlossaryRequest.new

# Call the update_glossary method.
result = client.update_glossary request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_glossary(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_glossary via a request object, either of type UpdateGlossaryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_glossary(glossary: nil, update_mask: nil, validate_only: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_glossary via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • glossary (::Google::Cloud::Dataplex::V1::Glossary, ::Hash) (defaults to: nil)

      Required. The Glossary to update. The Glossary's name field is used to identify the Glossary to update. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to update.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Validates the request without actually updating the Glossary. Default: false.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 399

def update_glossary request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_glossary..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.glossary&.name
    header_params["glossary.name"] = request.glossary.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_glossary.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_glossary.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :update_glossary, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_glossary_category(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory #update_glossary_category(category: nil, update_mask: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

Updates a GlossaryCategory resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest.new

# Call the update_glossary_category method.
result = client.update_glossary_category request

# The returned object is of type Google::Cloud::Dataplex::V1::GlossaryCategory.
p result

Overloads:

  • #update_glossary_category(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

    Pass arguments to update_glossary_category via a request object, either of type UpdateGlossaryCategoryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_glossary_category(category: nil, update_mask: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryCategory

    Pass arguments to update_glossary_category via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • category (::Google::Cloud::Dataplex::V1::GlossaryCategory, ::Hash) (defaults to: nil)

      Required. The GlossaryCategory to update. The GlossaryCategory's name field is used to identify the GlossaryCategory to update. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to update.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 886

def update_glossary_category request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryCategoryRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_glossary_category..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.category&.name
    header_params["category.name"] = request.category.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_glossary_category.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_glossary_category.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :update_glossary_category, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_glossary_term(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm #update_glossary_term(term: nil, update_mask: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

Updates a GlossaryTerm resource.

Examples:

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest.new

# Call the update_glossary_term method.
result = client.update_glossary_term request

# The returned object is of type Google::Cloud::Dataplex::V1::GlossaryTerm.
p result

Overloads:

  • #update_glossary_term(request, options = nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

    Pass arguments to update_glossary_term via a request object, either of type UpdateGlossaryTermRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_glossary_term(term: nil, update_mask: nil) ⇒ ::Google::Cloud::Dataplex::V1::GlossaryTerm

    Pass arguments to update_glossary_term via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • term (::Google::Cloud::Dataplex::V1::GlossaryTerm, ::Hash) (defaults to: nil)

      Required. The GlossaryTerm to update. The GlossaryTerm's name field is used to identify the GlossaryTerm to update. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to update.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/client.rb', line 1365

def update_glossary_term request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateGlossaryTermRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_glossary_term..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.term&.name
    header_params["term.name"] = request.term.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_glossary_term.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_glossary_term.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @business_glossary_service_stub.call_rpc :update_glossary_term, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end