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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d7a4083ec0c4a87d24edca8c3f5a53fb38a7273ff8d34d674c8e2293998aedd
4
- data.tar.gz: 336f2441c809da40e7854aa7b61d8a1c4ba1087946a5313529f03512182f2448
3
+ metadata.gz: 998b580e320b3b698b1c3bad6612e3ac26a1c083205c0977c0ce33776f8c8e06
4
+ data.tar.gz: 365e572da95c64a6385e3e5ac9f65c0171bcdf77163e09cf53250c06945b23af
5
5
  SHA512:
6
- metadata.gz: e1dda9adeb6487348cbc8fb167021fdade1328ec000933ff6756dff207218d352adafc29e4577fb1e23487f785ecd42eb3572e5306aee71ce0e54a5162ad2773
7
- data.tar.gz: a1facfe40eca2e609208bef34aff1044966e3f464333d8be927f6c82dbb569e43ea5aeabac1f222452cd0a1c6789d89196c6e28321ffbf655eee188b7e90a8a5
6
+ metadata.gz: f0c5ed0f81771ea79e01fb1dd4fb99145dd8bf16cfd4a9d8808d17ae16638e0d46b303816a2dccced2b0bca7ebfc709cbd1ce133b51266538848b564d8a36df8
7
+ data.tar.gz: b77ffe76d9441eb8761717c84b6bb487070fcd1bd5bf6fe572d043ca8cb8c03d7eaae2be6458a219abce390f41b18e1b7103badaf1dc4dfdef41a541d10e080e
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Chronicle
23
- VERSION = "0.5.0"
23
+ VERSION = "0.6.0"
24
24
  end
25
25
  end
26
26
  end
@@ -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
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-chronicle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC