google-cloud-developer_connect 2.0.1 → 2.1.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: 76cfe099416478c89d64ed9b86710ae092205ea41126841a24fc83557969a238
4
- data.tar.gz: 3b9fe49ee664892e77599e56c95ffc19b7b6b13efaab2c96715fb5ee951886d7
3
+ metadata.gz: 05fb62bff7246d1d6d4424b8e4307bd235c4fcddbdb2bec76e3aa7bd7940ed2a
4
+ data.tar.gz: d8345b93e2f2165c5260d976fd8be94a4584e8f1c2be681ec6f8678d85250536
5
5
  SHA512:
6
- metadata.gz: 4d916871ebfc9ddf133c70228da134f27245596d821c6ef88ca1a5b9fb4f900fb243d32e187146e271a4e72f4fc74727710722e59d8c3dce9ea29dd0fd3db39b
7
- data.tar.gz: 3e87aa3cf4e82ec940c1edb75b8deebe3d951f3079b48116dede5594e7d98fa1effb311fd7212ad8742fe0fb00ca22bf1753f6ccdb09d109443925363e4cbd80
6
+ metadata.gz: ed62cce4ab8556fd22545ef2d5738ab6d27f9b86145f1de03988e4e7263ac2ab48bcf37ae5995561bfbcd32a9c8d7e1a4e4001b197aaa6cd47e01568b84946ed
7
+ data.tar.gz: 52a94dd43dd888fd4ae1c36afdbc20a05c23a13c3326447414e4eb61b21d6cbcd041548afbeae08e64a418fbfcbc70a952381d1c4dda6a7e8eb5cd41019e0742
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module DeveloperConnect
23
- VERSION = "2.0.1"
23
+ VERSION = "2.1.0"
24
24
  end
25
25
  end
26
26
  end
@@ -115,6 +115,84 @@ module Google
115
115
  false
116
116
  end
117
117
 
118
+ ##
119
+ # Create a new client object for InsightsConfigService.
120
+ #
121
+ # By default, this returns an instance of
122
+ # [Google::Cloud::DeveloperConnect::V1::InsightsConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-developer_connect-v1/latest/Google-Cloud-DeveloperConnect-V1-InsightsConfigService-Client)
123
+ # for a gRPC client for version V1 of the API.
124
+ # However, you can specify a different API version by passing it in the
125
+ # `version` parameter. If the InsightsConfigService service is
126
+ # supported by that API version, and the corresponding gem is available, the
127
+ # appropriate versioned client will be returned.
128
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
129
+ # the `transport` parameter.
130
+ #
131
+ # Raises an exception if the currently installed versioned client gem for the
132
+ # given API version does not support the given transport of the InsightsConfigService service.
133
+ # You can determine whether the method will succeed by calling
134
+ # {Google::Cloud::DeveloperConnect.insights_config_service_available?}.
135
+ #
136
+ # ## About InsightsConfigService
137
+ #
138
+ # Creates and manages InsightsConfigs.
139
+ #
140
+ # The InsightsConfig resource is the core configuration object to capture
141
+ # events from your Software Development Lifecycle. It acts as the central hub
142
+ # for managing how Developer connect understands your application, its runtime
143
+ # environments, and the artifacts deployed within them.
144
+ # A user can create an InsightsConfig, list previously-requested
145
+ # InsightsConfigs or get InsightsConfigs by their ID to determine the status of
146
+ # the InsightsConfig.
147
+ #
148
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
149
+ # Defaults to `:v1`.
150
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
151
+ # @return [::Object] A client object for the specified version.
152
+ #
153
+ def self.insights_config_service version: :v1, transport: :grpc, &block
154
+ require "google/cloud/developer_connect/#{version.to_s.downcase}"
155
+
156
+ package_name = Google::Cloud::DeveloperConnect
157
+ .constants
158
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
159
+ .first
160
+ service_module = Google::Cloud::DeveloperConnect.const_get(package_name).const_get(:InsightsConfigService)
161
+ service_module = service_module.const_get(:Rest) if transport == :rest
162
+ service_module.const_get(:Client).new(&block)
163
+ end
164
+
165
+ ##
166
+ # Determines whether the InsightsConfigService service is supported by the current client.
167
+ # If true, you can retrieve a client object by calling {Google::Cloud::DeveloperConnect.insights_config_service}.
168
+ # If false, that method will raise an exception. This could happen if the given
169
+ # API version does not exist or does not support the InsightsConfigService service,
170
+ # or if the versioned client gem needs an update to support the InsightsConfigService service.
171
+ #
172
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
173
+ # Defaults to `:v1`.
174
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
175
+ # @return [boolean] Whether the service is available.
176
+ #
177
+ def self.insights_config_service_available? version: :v1, transport: :grpc
178
+ require "google/cloud/developer_connect/#{version.to_s.downcase}"
179
+ package_name = Google::Cloud::DeveloperConnect
180
+ .constants
181
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
182
+ .first
183
+ return false unless package_name
184
+ service_module = Google::Cloud::DeveloperConnect.const_get package_name
185
+ return false unless service_module.const_defined? :InsightsConfigService
186
+ service_module = service_module.const_get :InsightsConfigService
187
+ if transport == :rest
188
+ return false unless service_module.const_defined? :Rest
189
+ service_module = service_module.const_get :Rest
190
+ end
191
+ service_module.const_defined? :Client
192
+ rescue ::LoadError
193
+ false
194
+ end
195
+
118
196
  ##
119
197
  # Configure the google-cloud-developer_connect library.
120
198
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-developer_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  requirements: []
73
- rubygems_version: 3.6.8
73
+ rubygems_version: 3.6.9
74
74
  specification_version: 4
75
75
  summary: Connect third-party source code management to Google.
76
76
  test_files: []