google-cloud-chronicle 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/chronicle/version.rb +1 -1
- data/lib/google/cloud/chronicle.rb +71 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 998b580e320b3b698b1c3bad6612e3ac26a1c083205c0977c0ce33776f8c8e06
|
|
4
|
+
data.tar.gz: 365e572da95c64a6385e3e5ac9f65c0171bcdf77163e09cf53250c06945b23af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0c5ed0f81771ea79e01fb1dd4fb99145dd8bf16cfd4a9d8808d17ae16638e0d46b303816a2dccced2b0bca7ebfc709cbd1ce133b51266538848b564d8a36df8
|
|
7
|
+
data.tar.gz: b77ffe76d9441eb8761717c84b6bb487070fcd1bd5bf6fe572d043ca8cb8c03d7eaae2be6458a219abce390f41b18e1b7103badaf1dc4dfdef41a541d10e080e
|
|
@@ -817,6 +817,77 @@ module Google
|
|
|
817
817
|
false
|
|
818
818
|
end
|
|
819
819
|
|
|
820
|
+
##
|
|
821
|
+
# Create a new client object for RuleExecutionErrorService.
|
|
822
|
+
#
|
|
823
|
+
# By default, this returns an instance of
|
|
824
|
+
# [Google::Cloud::Chronicle::V1::RuleExecutionErrorService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest/Google-Cloud-Chronicle-V1-RuleExecutionErrorService-Client)
|
|
825
|
+
# for a gRPC client for version V1 of the API.
|
|
826
|
+
# However, you can specify a different API version by passing it in the
|
|
827
|
+
# `version` parameter. If the RuleExecutionErrorService service is
|
|
828
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
829
|
+
# appropriate versioned client will be returned.
|
|
830
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
831
|
+
# the `transport` parameter.
|
|
832
|
+
#
|
|
833
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
834
|
+
# given API version does not support the given transport of the RuleExecutionErrorService service.
|
|
835
|
+
# You can determine whether the method will succeed by calling
|
|
836
|
+
# {Google::Cloud::Chronicle.rule_execution_error_service_available?}.
|
|
837
|
+
#
|
|
838
|
+
# ## About RuleExecutionErrorService
|
|
839
|
+
#
|
|
840
|
+
# RuleExecutionErrorService contains endpoints related to rule execution
|
|
841
|
+
# errors.
|
|
842
|
+
#
|
|
843
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
844
|
+
# Defaults to `:v1`.
|
|
845
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
846
|
+
# @return [::Object] A client object for the specified version.
|
|
847
|
+
#
|
|
848
|
+
def self.rule_execution_error_service version: :v1, transport: :grpc, &block
|
|
849
|
+
require "google/cloud/chronicle/#{version.to_s.downcase}"
|
|
850
|
+
|
|
851
|
+
package_name = Google::Cloud::Chronicle
|
|
852
|
+
.constants
|
|
853
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
854
|
+
.first
|
|
855
|
+
service_module = Google::Cloud::Chronicle.const_get(package_name).const_get(:RuleExecutionErrorService)
|
|
856
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
857
|
+
service_module.const_get(:Client).new(&block)
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
##
|
|
861
|
+
# Determines whether the RuleExecutionErrorService service is supported by the current client.
|
|
862
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Chronicle.rule_execution_error_service}.
|
|
863
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
864
|
+
# API version does not exist or does not support the RuleExecutionErrorService service,
|
|
865
|
+
# or if the versioned client gem needs an update to support the RuleExecutionErrorService service.
|
|
866
|
+
#
|
|
867
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
868
|
+
# Defaults to `:v1`.
|
|
869
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
870
|
+
# @return [boolean] Whether the service is available.
|
|
871
|
+
#
|
|
872
|
+
def self.rule_execution_error_service_available? version: :v1, transport: :grpc
|
|
873
|
+
require "google/cloud/chronicle/#{version.to_s.downcase}"
|
|
874
|
+
package_name = Google::Cloud::Chronicle
|
|
875
|
+
.constants
|
|
876
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
877
|
+
.first
|
|
878
|
+
return false unless package_name
|
|
879
|
+
service_module = Google::Cloud::Chronicle.const_get package_name
|
|
880
|
+
return false unless service_module.const_defined? :RuleExecutionErrorService
|
|
881
|
+
service_module = service_module.const_get :RuleExecutionErrorService
|
|
882
|
+
if transport == :rest
|
|
883
|
+
return false unless service_module.const_defined? :Rest
|
|
884
|
+
service_module = service_module.const_get :Rest
|
|
885
|
+
end
|
|
886
|
+
service_module.const_defined? :Client
|
|
887
|
+
rescue ::LoadError
|
|
888
|
+
false
|
|
889
|
+
end
|
|
890
|
+
|
|
820
891
|
##
|
|
821
892
|
# Configure the google-cloud-chronicle library.
|
|
822
893
|
#
|