google-cloud-developer_connect 2.0.0 → 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: e320a19fc090692430d9d56fac13b68a07cdc92d8dfb507bfbdc21c00fc1a3e6
4
- data.tar.gz: 5675523bd479280d45b8fb1e0d9262449be52dc6850e8114268983aa31b1342b
3
+ metadata.gz: 05fb62bff7246d1d6d4424b8e4307bd235c4fcddbdb2bec76e3aa7bd7940ed2a
4
+ data.tar.gz: d8345b93e2f2165c5260d976fd8be94a4584e8f1c2be681ec6f8678d85250536
5
5
  SHA512:
6
- metadata.gz: 22e1b0a2dd70a9db5aad13f85bab1d9e161bff47434d1625fd10c31c41c5fe519d189b1c41ba3daea07558eedd38ed6ec379beafb443b1aa0940a92a3832a4f4
7
- data.tar.gz: 0e9d9420cceba5139074823144008bc188ee8e9d231afa5977fa31f3e0afd066c3bb500f2d76c630e2f04d3414a39a7228c802af5da4188bf3dbaf0bbdb61ac1
6
+ metadata.gz: ed62cce4ab8556fd22545ef2d5738ab6d27f9b86145f1de03988e4e7263ac2ab48bcf37ae5995561bfbcd32a9c8d7e1a4e4001b197aaa6cd47e01568b84946ed
7
+ data.tar.gz: 52a94dd43dd888fd4ae1c36afdbc20a05c23a13c3326447414e4eb61b21d6cbcd041548afbeae08e64a418fbfcbc70a952381d1c4dda6a7e8eb5cd41019e0742
data/README.md CHANGED
@@ -7,7 +7,7 @@ Developer Connect streamlines integration with third-party source code managemen
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-cloud-developer_connect-v*`.
9
9
  The gem `google-cloud-developer_connect` is the main client library that brings the
10
- verisoned gems in as dependencies, and provides high-level methods for
10
+ versioned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module DeveloperConnect
23
- VERSION = "2.0.0"
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,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-developer_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-13 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-core
@@ -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.3
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: []