google-cloud-recommender-v1 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b854a911691f57d45c304c4d4bf74de62eb83a70d1c252eda9250f244f558f88
4
- data.tar.gz: fb0efe36c11e2aae0434710ae36b1d20aaaea6df823b243578147edbe0b0685d
3
+ metadata.gz: 731ed6c78c054da3bbdf1cc6b41bb469fab9af92b5293940871863ab10240557
4
+ data.tar.gz: 28f51bb11efe1aafd3f7f83282c47d891b7e14425b0375be7e86cdddc2f2e46a
5
5
  SHA512:
6
- metadata.gz: e15d154a646a9676d3335c7f1029469d51d3ebd27e654179dbd686dab57f9aca70d6559f71c3bd0a2225c9ac9a46286b8aed8a76179c4d3b744287fb1f2fb16e
7
- data.tar.gz: 3191ab85ba008bbc482030e491535c3051859a7b10fb897d2caf701c7be648fa28ccda4930a92801b4e9a6c154f8f19aaa47a800b14baeccfa0cfd46407d00af
6
+ metadata.gz: 72dedccefbda969920ad42bdacba992825abfd3ab02b1e81fa15e29ae131226fe242cf2deb5624ce302b895f788209abeb89ec911a8c9a22099953652e884ed4
7
+ data.tar.gz: 1d2bf1dcdff912fe365b5ec3aabe2d6a24cbffec9c56f6903c8c3cc9e25f7c847ac23e30d43c571485abc2a8c71d44e9ea56833c7bf6dde12084af9302b97766
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Recommender V1
1
+ # Ruby Client for the Recommender V1 API
2
2
 
3
3
  API Client library for the Recommender V1 API
4
4
 
@@ -12,6 +12,53 @@ https://github.com/googleapis/google-cloud-ruby
12
12
  $ gem install google-cloud-recommender-v1
13
13
  ```
14
14
 
15
+ ## Before You Begin
16
+
17
+ In order to use this library, you first need to go through the following steps:
18
+
19
+ 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
+ 1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. {file:AUTHENTICATION.md Set up authentication.}
22
+
23
+ ## Quick Start
24
+
25
+ ```ruby
26
+ require "google/cloud/recommender/v1"
27
+
28
+ client = Google::Cloud::Recommender::V1::Recommender::Client.new
29
+ request = my_create_request
30
+ response = client.list_recommendations request
31
+ ```
32
+
33
+ View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-recommender-v1/latest)
34
+ for class and method documentation.
35
+
36
+ ## Enabling Logging
37
+
38
+ To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
39
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
40
+ or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
41
+ that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
42
+ and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
43
+
44
+ Configuring a Ruby stdlib logger:
45
+
46
+ ```ruby
47
+ require "logger"
48
+
49
+ module MyLogger
50
+ LOGGER = Logger.new $stderr, level: Logger::WARN
51
+ def logger
52
+ LOGGER
53
+ end
54
+ end
55
+
56
+ # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
57
+ module GRPC
58
+ extend MyLogger
59
+ end
60
+ ```
61
+
15
62
  ## Supported Ruby Versions
16
63
 
17
64
  This library is supported on Ruby 2.4+.
@@ -1 +1,21 @@
1
- require "google/cloud/recommender/v1/version"
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/cloud/recommender/v1"
@@ -17,3 +17,19 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/recommender/v1/recommender"
20
+ require "google/cloud/recommender/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Recommender
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # require "google/cloud/recommender/v1"
29
+ # client = Google::Cloud::Recommender::V1::Recommender::Client.new
30
+ #
31
+ module V1
32
+ end
33
+ end
34
+ end
35
+ end
@@ -16,5 +16,37 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "google/cloud/recommender/v1/recommender/client"
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/recommender/v1/version"
24
+
20
25
  require "google/cloud/recommender/v1/recommender/credentials"
26
+ require "google/cloud/recommender/v1/recommender/paths"
27
+ require "google/cloud/recommender/v1/recommender/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Recommender
32
+ module V1
33
+ ##
34
+ # Provides recommendations for cloud customers for various categories like
35
+ # performance optimization, cost savings, reliability, feature discovery, etc.
36
+ # These recommendations are generated automatically based on analysis of user
37
+ # resources, configuration and monitoring metrics.
38
+ #
39
+ # To load this service and instantiate a client:
40
+ #
41
+ # require "google/cloud/recommender/v1/recommender"
42
+ # client = Google::Cloud::Recommender::V1::Recommender::Client.new
43
+ #
44
+ module Recommender
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "recommender", "helpers.rb"
52
+ require "google/cloud/recommender/v1/recommender/helpers" if ::File.file? helper_path
@@ -16,15 +16,8 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "gapic/common"
20
- require "gapic/config"
21
- require "gapic/config/method"
22
-
23
19
  require "google/cloud/errors"
24
- require "google/cloud/recommender/v1/version"
25
20
  require "google/cloud/recommender/v1/recommender_service_pb"
26
- require "google/cloud/recommender/v1/recommender/credentials"
27
- require "google/cloud/recommender/v1/recommender/paths"
28
21
 
29
22
  module Google
30
23
  module Cloud
@@ -180,13 +173,20 @@ module Google
180
173
  # IAM permission for the specified recommender.
181
174
  #
182
175
  # @overload list_recommendations(request, options = nil)
183
- # @param request [Google::Cloud::Recommender::V1::ListRecommendationsRequest | Hash]
184
- # Lists recommendations for a Cloud project. Requires the recommender.*.list
185
- # IAM permission for the specified recommender.
176
+ # Pass arguments to `list_recommendations` via a request object, either of type
177
+ # {Google::Cloud::Recommender::V1::ListRecommendationsRequest} or an equivalent Hash.
178
+ #
179
+ # @param request [Google::Cloud::Recommender::V1::ListRecommendationsRequest, Hash]
180
+ # A request object representing the call parameters. Required. To specify no
181
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
186
182
  # @param options [Gapic::CallOptions, Hash]
187
183
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
188
184
  #
189
185
  # @overload list_recommendations(parent: nil, page_size: nil, page_token: nil, filter: nil)
186
+ # Pass arguments to `list_recommendations` via keyword arguments. Note that at
187
+ # least one keyword argument is required. To specify no parameters, or to keep all
188
+ # the default parameter values, pass an empty Hash as a request object (see above).
189
+ #
190
190
  # @param parent [String]
191
191
  # Required. The container resource on which to execute the request.
192
192
  # Acceptable formats:
@@ -210,7 +210,6 @@ module Google
210
210
  # filter fields: state_info.state
211
211
  # Eg: `state_info.state:"DISMISSED" or state_info.state:"FAILED"
212
212
  #
213
- #
214
213
  # @yield [response, operation] Access the result along with the RPC operation
215
214
  # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Recommender::V1::Recommendation>]
216
215
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -262,17 +261,23 @@ module Google
262
261
  # IAM permission for the specified recommender.
263
262
  #
264
263
  # @overload get_recommendation(request, options = nil)
265
- # @param request [Google::Cloud::Recommender::V1::GetRecommendationRequest | Hash]
266
- # Gets the requested recommendation. Requires the recommender.*.get
267
- # IAM permission for the specified recommender.
264
+ # Pass arguments to `get_recommendation` via a request object, either of type
265
+ # {Google::Cloud::Recommender::V1::GetRecommendationRequest} or an equivalent Hash.
266
+ #
267
+ # @param request [Google::Cloud::Recommender::V1::GetRecommendationRequest, Hash]
268
+ # A request object representing the call parameters. Required. To specify no
269
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
268
270
  # @param options [Gapic::CallOptions, Hash]
269
271
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
270
272
  #
271
273
  # @overload get_recommendation(name: nil)
274
+ # Pass arguments to `get_recommendation` via keyword arguments. Note that at
275
+ # least one keyword argument is required. To specify no parameters, or to keep all
276
+ # the default parameter values, pass an empty Hash as a request object (see above).
277
+ #
272
278
  # @param name [String]
273
279
  # Required. Name of the recommendation.
274
280
  #
275
- #
276
281
  # @yield [response, operation] Access the result along with the RPC operation
277
282
  # @yieldparam response [Google::Cloud::Recommender::V1::Recommendation]
278
283
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -331,21 +336,20 @@ module Google
331
336
  # recommender.
332
337
  #
333
338
  # @overload mark_recommendation_claimed(request, options = nil)
334
- # @param request [Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest | Hash]
335
- # Mark the Recommendation State as Claimed. Users can use this method to
336
- # indicate to the Recommender API that they are starting to apply the
337
- # recommendation themselves. This stops the recommendation content from being
338
- # updated.
339
- #
340
- # MarkRecommendationClaimed can be applied to recommendations in CLAIMED,
341
- # SUCCEEDED, FAILED, or ACTIVE state.
339
+ # Pass arguments to `mark_recommendation_claimed` via a request object, either of type
340
+ # {Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest} or an equivalent Hash.
342
341
  #
343
- # Requires the recommender.*.update IAM permission for the specified
344
- # recommender.
342
+ # @param request [Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest, Hash]
343
+ # A request object representing the call parameters. Required. To specify no
344
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
345
345
  # @param options [Gapic::CallOptions, Hash]
346
346
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
347
347
  #
348
348
  # @overload mark_recommendation_claimed(name: nil, state_metadata: nil, etag: nil)
349
+ # Pass arguments to `mark_recommendation_claimed` via keyword arguments. Note that at
350
+ # least one keyword argument is required. To specify no parameters, or to keep all
351
+ # the default parameter values, pass an empty Hash as a request object (see above).
352
+ #
349
353
  # @param name [String]
350
354
  # Required. Name of the recommendation.
351
355
  # @param state_metadata [Hash{String => String}]
@@ -356,7 +360,6 @@ module Google
356
360
  # @param etag [String]
357
361
  # Required. Fingerprint of the Recommendation. Provides optimistic locking.
358
362
  #
359
- #
360
363
  # @yield [response, operation] Access the result along with the RPC operation
361
364
  # @yieldparam response [Google::Cloud::Recommender::V1::Recommendation]
362
365
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -415,21 +418,20 @@ module Google
415
418
  # recommender.
416
419
  #
417
420
  # @overload mark_recommendation_succeeded(request, options = nil)
418
- # @param request [Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest | Hash]
419
- # Mark the Recommendation State as Succeeded. Users can use this method to
420
- # indicate to the Recommender API that they have applied the recommendation
421
- # themselves, and the operation was successful. This stops the recommendation
422
- # content from being updated.
421
+ # Pass arguments to `mark_recommendation_succeeded` via a request object, either of type
422
+ # {Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest} or an equivalent Hash.
423
423
  #
424
- # MarkRecommendationSucceeded can be applied to recommendations in ACTIVE,
425
- # CLAIMED, SUCCEEDED, or FAILED state.
426
- #
427
- # Requires the recommender.*.update IAM permission for the specified
428
- # recommender.
424
+ # @param request [Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest, Hash]
425
+ # A request object representing the call parameters. Required. To specify no
426
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
429
427
  # @param options [Gapic::CallOptions, Hash]
430
428
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
431
429
  #
432
430
  # @overload mark_recommendation_succeeded(name: nil, state_metadata: nil, etag: nil)
431
+ # Pass arguments to `mark_recommendation_succeeded` via keyword arguments. Note that at
432
+ # least one keyword argument is required. To specify no parameters, or to keep all
433
+ # the default parameter values, pass an empty Hash as a request object (see above).
434
+ #
433
435
  # @param name [String]
434
436
  # Required. Name of the recommendation.
435
437
  # @param state_metadata [Hash{String => String}]
@@ -440,7 +442,6 @@ module Google
440
442
  # @param etag [String]
441
443
  # Required. Fingerprint of the Recommendation. Provides optimistic locking.
442
444
  #
443
- #
444
445
  # @yield [response, operation] Access the result along with the RPC operation
445
446
  # @yieldparam response [Google::Cloud::Recommender::V1::Recommendation]
446
447
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -499,21 +500,20 @@ module Google
499
500
  # recommender.
500
501
  #
501
502
  # @overload mark_recommendation_failed(request, options = nil)
502
- # @param request [Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest | Hash]
503
- # Mark the Recommendation State as Failed. Users can use this method to
504
- # indicate to the Recommender API that they have applied the recommendation
505
- # themselves, and the operation failed. This stops the recommendation content
506
- # from being updated.
503
+ # Pass arguments to `mark_recommendation_failed` via a request object, either of type
504
+ # {Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest} or an equivalent Hash.
507
505
  #
508
- # MarkRecommendationFailed can be applied to recommendations in ACTIVE,
509
- # CLAIMED, SUCCEEDED, or FAILED state.
510
- #
511
- # Requires the recommender.*.update IAM permission for the specified
512
- # recommender.
506
+ # @param request [Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest, Hash]
507
+ # A request object representing the call parameters. Required. To specify no
508
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
513
509
  # @param options [Gapic::CallOptions, Hash]
514
510
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
515
511
  #
516
512
  # @overload mark_recommendation_failed(name: nil, state_metadata: nil, etag: nil)
513
+ # Pass arguments to `mark_recommendation_failed` via keyword arguments. Note that at
514
+ # least one keyword argument is required. To specify no parameters, or to keep all
515
+ # the default parameter values, pass an empty Hash as a request object (see above).
516
+ #
517
517
  # @param name [String]
518
518
  # Required. Name of the recommendation.
519
519
  # @param state_metadata [Hash{String => String}]
@@ -524,7 +524,6 @@ module Google
524
524
  # @param etag [String]
525
525
  # Required. Fingerprint of the Recommendation. Provides optimistic locking.
526
526
  #
527
- #
528
527
  # @yield [response, operation] Access the result along with the RPC operation
529
528
  # @yieldparam response [Google::Cloud::Recommender::V1::Recommendation]
530
529
  # @yieldparam operation [GRPC::ActiveCall::Operation]
@@ -751,13 +750,3 @@ module Google
751
750
  end
752
751
  end
753
752
  end
754
-
755
- # rubocop:disable Lint/HandleExceptions
756
-
757
- # Once client is loaded, load helpers.rb if it exists.
758
- begin
759
- require "google/cloud/recommender/v1/recommender/helpers"
760
- rescue LoadError
761
- end
762
-
763
- # rubocop:enable Lint/HandleExceptions
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Recommender
23
23
  module V1
24
- VERSION = "0.3.1"
24
+ VERSION = "0.3.2"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-recommender-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-01 00:00:00.000000000 Z
11
+ date: 2020-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common