Module: Google::Cloud::Chronicle

Defined in:
lib/google/cloud/chronicle.rb,
lib/google/cloud/chronicle/version.rb

Constant Summary collapse

VERSION =
"0.4.0"

Class Method Summary collapse

Class Method Details

.big_query_export_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for BigQueryExportService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::BigQueryExportService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the BigQueryExportService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the BigQueryExportService service. You can determine whether the method will succeed by calling big_query_export_service_available?.

About BigQueryExportService

Service for managing BigQuery export configurations for Chronicle instances.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



75
76
77
78
79
80
81
82
83
84
85
# File 'lib/google/cloud/chronicle.rb', line 75

def self.big_query_export_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:BigQueryExportService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.big_query_export_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the BigQueryExportService service is supported by the current client. If true, you can retrieve a client object by calling big_query_export_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the BigQueryExportService service, or if the versioned client gem needs an update to support the BigQueryExportService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/google/cloud/chronicle.rb', line 99

def self.big_query_export_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :BigQueryExportService
  service_module = service_module.const_get :BigQueryExportService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.configure {|::Google::Cloud.configure.chronicle| ... } ⇒ ::Google::Cloud::Config

Configure the google-cloud-chronicle library.

The following configuration parameters are supported:

  • credentials (type: String, Hash, Google::Auth::Credentials) - The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object.
  • lib_name (type: String) - The library name as recorded in instrumentation and logging.
  • lib_version (type: String) - The library version as recorded in instrumentation and logging.
  • interceptors (type: Array<GRPC::ClientInterceptor>) - An array of interceptors that are run before calls are executed.
  • timeout (type: Numeric) - Default timeout in seconds.
  • metadata (type: Hash{Symbol=>String}) - Additional headers to be sent with the call.
  • retry_policy (type: Hash) - The retry policy. The value is a hash with the following keys:
    • :initial_delay (type: Numeric) - The initial delay in seconds.
    • :max_delay (type: Numeric) - The max delay in seconds.
    • :multiplier (type: Numeric) - The incremental backoff multiplier.
    • :retry_codes (type: Array<String>) - The error codes that should trigger a retry.

Yields:

Returns:

  • (::Google::Cloud::Config)

    The default configuration used by this library



848
849
850
851
852
# File 'lib/google/cloud/chronicle.rb', line 848

def self.configure
  yield ::Google::Cloud.configure.chronicle if block_given?

  ::Google::Cloud.configure.chronicle
end

.dashboard_chart_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for DashboardChartService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::DashboardChartService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the DashboardChartService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the DashboardChartService service. You can determine whether the method will succeed by calling dashboard_chart_service_available?.

About DashboardChartService

A service providing functionality for managing dashboards' charts.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



215
216
217
218
219
220
221
222
223
224
225
# File 'lib/google/cloud/chronicle.rb', line 215

def self.dashboard_chart_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:DashboardChartService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.dashboard_chart_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the DashboardChartService service is supported by the current client. If true, you can retrieve a client object by calling dashboard_chart_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the DashboardChartService service, or if the versioned client gem needs an update to support the DashboardChartService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/google/cloud/chronicle.rb', line 239

def self.dashboard_chart_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :DashboardChartService
  service_module = service_module.const_get :DashboardChartService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.dashboard_query_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for DashboardQueryService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::DashboardQueryService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the DashboardQueryService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the DashboardQueryService service. You can determine whether the method will succeed by calling dashboard_query_service_available?.

About DashboardQueryService

A service providing functionality for managing dashboards' queries.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



145
146
147
148
149
150
151
152
153
154
155
# File 'lib/google/cloud/chronicle.rb', line 145

def self.dashboard_query_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:DashboardQueryService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.dashboard_query_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the DashboardQueryService service is supported by the current client. If true, you can retrieve a client object by calling dashboard_query_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the DashboardQueryService service, or if the versioned client gem needs an update to support the DashboardQueryService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/google/cloud/chronicle.rb', line 169

def self.dashboard_query_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :DashboardQueryService
  service_module = service_module.const_get :DashboardQueryService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.data_access_control_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for DataAccessControlService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::DataAccessControlService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the DataAccessControlService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the DataAccessControlService service. You can determine whether the method will succeed by calling data_access_control_service_available?.

About DataAccessControlService

DataAccessControlService exposes resources and endpoints related to data access control.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



286
287
288
289
290
291
292
293
294
295
296
# File 'lib/google/cloud/chronicle.rb', line 286

def self.data_access_control_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:DataAccessControlService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.data_access_control_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the DataAccessControlService service is supported by the current client. If true, you can retrieve a client object by calling data_access_control_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the DataAccessControlService service, or if the versioned client gem needs an update to support the DataAccessControlService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/google/cloud/chronicle.rb', line 310

def self.data_access_control_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :DataAccessControlService
  service_module = service_module.const_get :DataAccessControlService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.data_table_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for DataTableService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::DataTableService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the DataTableService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the DataTableService service. You can determine whether the method will succeed by calling data_table_service_available?.

About DataTableService

DataTableManager provides an interface for managing data tables.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



356
357
358
359
360
361
362
363
364
365
366
# File 'lib/google/cloud/chronicle.rb', line 356

def self.data_table_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:DataTableService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.data_table_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the DataTableService service is supported by the current client. If true, you can retrieve a client object by calling data_table_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the DataTableService service, or if the versioned client gem needs an update to support the DataTableService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/google/cloud/chronicle.rb', line 380

def self.data_table_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :DataTableService
  service_module = service_module.const_get :DataTableService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.entity_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for EntityService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::EntityService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the EntityService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the EntityService service. You can determine whether the method will succeed by calling entity_service_available?.

About EntityService

EntityService contains apis for finding entities.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



426
427
428
429
430
431
432
433
434
435
436
# File 'lib/google/cloud/chronicle.rb', line 426

def self.entity_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:EntityService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.entity_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the EntityService service is supported by the current client. If true, you can retrieve a client object by calling entity_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the EntityService service, or if the versioned client gem needs an update to support the EntityService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
# File 'lib/google/cloud/chronicle.rb', line 450

def self.entity_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :EntityService
  service_module = service_module.const_get :EntityService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

Create a new client object for FeaturedContentNativeDashboardService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the FeaturedContentNativeDashboardService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the FeaturedContentNativeDashboardService service. You can determine whether the method will succeed by calling featured_content_native_dashboard_service_available?.

About FeaturedContentNativeDashboardService

This service provides functionality for managing FeaturedContentNativeDashboard.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



567
568
569
570
571
572
573
574
575
576
577
# File 'lib/google/cloud/chronicle.rb', line 567

def self.featured_content_native_dashboard_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:FeaturedContentNativeDashboardService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

Determines whether the FeaturedContentNativeDashboardService service is supported by the current client. If true, you can retrieve a client object by calling featured_content_native_dashboard_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the FeaturedContentNativeDashboardService service, or if the versioned client gem needs an update to support the FeaturedContentNativeDashboardService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
# File 'lib/google/cloud/chronicle.rb', line 591

def self.featured_content_native_dashboard_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :FeaturedContentNativeDashboardService
  service_module = service_module.const_get :FeaturedContentNativeDashboardService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.instance_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for InstanceService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::InstanceService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the InstanceService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the InstanceService service. You can determine whether the method will succeed by calling instance_service_available?.

About InstanceService

InstanceService provides the entry interface for the Chronicle API.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



637
638
639
640
641
642
643
644
645
646
647
# File 'lib/google/cloud/chronicle.rb', line 637

def self.instance_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:InstanceService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.instance_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the InstanceService service is supported by the current client. If true, you can retrieve a client object by calling instance_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the InstanceService service, or if the versioned client gem needs an update to support the InstanceService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
# File 'lib/google/cloud/chronicle.rb', line 661

def self.instance_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :InstanceService
  service_module = service_module.const_get :InstanceService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.native_dashboard_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for NativeDashboardService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::NativeDashboardService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the NativeDashboardService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the NativeDashboardService service. You can determine whether the method will succeed by calling native_dashboard_service_available?.

About NativeDashboardService

A service providing functionality for managing native dashboards.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



496
497
498
499
500
501
502
503
504
505
506
# File 'lib/google/cloud/chronicle.rb', line 496

def self.native_dashboard_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:NativeDashboardService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.native_dashboard_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the NativeDashboardService service is supported by the current client. If true, you can retrieve a client object by calling native_dashboard_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the NativeDashboardService service, or if the versioned client gem needs an update to support the NativeDashboardService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# File 'lib/google/cloud/chronicle.rb', line 520

def self.native_dashboard_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :NativeDashboardService
  service_module = service_module.const_get :NativeDashboardService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.reference_list_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for ReferenceListService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::ReferenceListService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the ReferenceListService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the ReferenceListService service. You can determine whether the method will succeed by calling reference_list_service_available?.

About ReferenceListService

ReferenceListService provides an interface for managing reference lists.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



707
708
709
710
711
712
713
714
715
716
717
# File 'lib/google/cloud/chronicle.rb', line 707

def self.reference_list_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:ReferenceListService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.reference_list_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the ReferenceListService service is supported by the current client. If true, you can retrieve a client object by calling reference_list_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the ReferenceListService service, or if the versioned client gem needs an update to support the ReferenceListService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'lib/google/cloud/chronicle.rb', line 731

def self.reference_list_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :ReferenceListService
  service_module = service_module.const_get :ReferenceListService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end

.rule_service(version: :v1, transport: :grpc, &block) ⇒ ::Object

Create a new client object for RuleService.

By default, this returns an instance of Google::Cloud::Chronicle::V1::RuleService::Client for a gRPC client for version V1 of the API. However, you can specify a different API version by passing it in the version parameter. If the RuleService service is supported by that API version, and the corresponding gem is available, the appropriate versioned client will be returned. You can also specify a different transport by passing :rest or :grpc in the transport parameter.

Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the RuleService service. You can determine whether the method will succeed by calling rule_service_available?.

About RuleService

RuleService provides interface for user-created rules.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (::Object)

    A client object for the specified version.



777
778
779
780
781
782
783
784
785
786
787
# File 'lib/google/cloud/chronicle.rb', line 777

def self.rule_service version: :v1, transport: :grpc, &block
  require "google/cloud/chronicle/#{version.to_s.downcase}"

  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:RuleService)
  service_module = service_module.const_get(:Rest) if transport == :rest
  service_module.const_get(:Client).new(&block)
end

.rule_service_available?(version: :v1, transport: :grpc) ⇒ boolean

Determines whether the RuleService service is supported by the current client. If true, you can retrieve a client object by calling rule_service. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the RuleService service, or if the versioned client gem needs an update to support the RuleService service.

Parameters:

  • version (::String, ::Symbol) (defaults to: :v1)

    The API version to connect to. Optional. Defaults to :v1.

  • transport (:grpc, :rest) (defaults to: :grpc)

    The transport to use. Defaults to :grpc.

Returns:

  • (boolean)

    Whether the service is available.



801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/google/cloud/chronicle.rb', line 801

def self.rule_service_available? version: :v1, transport: :grpc
  require "google/cloud/chronicle/#{version.to_s.downcase}"
  package_name = Google::Cloud::Chronicle
                 .constants
                 .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
                 .first
  return false unless package_name
  service_module = Google::Cloud::Chronicle.const_get package_name
  return false unless service_module.const_defined? :RuleService
  service_module = service_module.const_get :RuleService
  if transport == :rest
    return false unless service_module.const_defined? :Rest
    service_module = service_module.const_get :Rest
  end
  service_module.const_defined? :Client
rescue ::LoadError
  false
end