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

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

Overview

REST 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 REST client object.

Examples:


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

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

Yields:

  • (config)

    Configure the BusinessGlossaryService client.

Yield Parameters:



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
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 133

def initialize
  # 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 = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::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 = ::Google::Cloud::Dataplex::V1::BusinessGlossaryService::Rest::ServiceStub.new(
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    credentials: credentials,
    logger: @config.logger
  )

  @business_glossary_service_stub.logger(stub: true)&.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::Rest::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.bindings_override = @config.bindings_override
    config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger=
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::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.bindings_override = @config.bindings_override
    config.logger = @business_glossary_service_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

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

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

Returns:

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


219
220
221
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 219

def iam_policy_client
  @iam_policy_client
end

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

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

Returns:

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


212
213
214
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 212

def location_client
  @location_client
end

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

Get the associated client for long-running operations.



205
206
207
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 205

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::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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

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:



103
104
105
106
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 103

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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



291
292
293
294
295
296
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
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 291

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_glossary request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 755

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_glossary_category request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 1199

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.create_glossary_term request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 481

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_glossary request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 920

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_glossary_category request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1362
1363
1364
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
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 1362

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.delete_glossary_term request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 563

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_glossary request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 1000

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_glossary_category request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 1442

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.get_glossary_term request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_glossaries(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Glossary> #list_glossaries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 668

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_glossaries request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossaries, "glossaries", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_glossary_categories(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryCategory> #list_glossary_categories(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 1112

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_glossary_categories request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_categories, "categories", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_glossary_terms(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::GlossaryTerm> #list_glossary_terms(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::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::Rest::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::Rest::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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



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
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 1554

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.list_glossary_terms request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @business_glossary_service_stub, :list_glossary_terms, "terms", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


226
227
228
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 226

def logger
  @business_glossary_service_stub.logger
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


113
114
115
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 113

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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

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

    if the REST call is aborted.



386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 386

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_glossary request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 838

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_glossary_category request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => 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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



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
1315
# File 'lib/google/cloud/dataplex/v1/business_glossary_service/rest/client.rb', line 1282

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,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  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.update_glossary_term request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end