google-cloud-recommender-v1 0.11.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +2 -2
- data/lib/google/cloud/recommender/v1/insight_pb.rb +27 -42
- data/lib/google/cloud/recommender/v1/insight_type_config_pb.rb +26 -13
- data/lib/google/cloud/recommender/v1/recommendation_pb.rb +28 -84
- data/lib/google/cloud/recommender/v1/recommender/client.rb +10 -14
- data/lib/google/cloud/recommender/v1/recommender/rest/client.rb +1324 -0
- data/lib/google/cloud/recommender/v1/recommender/rest/service_stub.rb +972 -0
- data/lib/google/cloud/recommender/v1/recommender/rest.rb +55 -0
- data/lib/google/cloud/recommender/v1/recommender.rb +7 -1
- data/lib/google/cloud/recommender/v1/recommender_config_pb.rb +26 -13
- data/lib/google/cloud/recommender/v1/recommender_service_pb.rb +29 -63
- data/lib/google/cloud/recommender/v1/rest.rb +37 -0
- data/lib/google/cloud/recommender/v1/version.rb +1 -1
- data/lib/google/cloud/recommender/v1.rb +7 -2
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/struct.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2815a42960253e0b94acb6c0d0af70bb8e3c1a51edc5942c927a5a3b9c2aec4
|
4
|
+
data.tar.gz: a026c31f9568dceb8d5d606ee068a1fb16fb7a561b518def108f64b645e746e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83802766054e6a7cdfb145c514d9e071f60fdab46e6ca5a41ca673f6390d6be0c7bd367721b34a2920571a3348cfcaad7c57167f58eaa10854c34274ae4338b9
|
7
|
+
data.tar.gz: 9805563a000af6eb0204248bcaf06bc7d8ac93c324e690138819f2944300ea331d9d027fef11ccf67e3fba69d293a7777ac6c142d6db8f5a402eb1f43a7e71ec
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
data/README.md
CHANGED
@@ -46,8 +46,8 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
50
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
49
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
51
51
|
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)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
53
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/recommender/v1/insight.proto
|
3
4
|
|
@@ -8,50 +9,34 @@ require 'google/protobuf/duration_pb'
|
|
8
9
|
require 'google/protobuf/struct_pb'
|
9
10
|
require 'google/protobuf/timestamp_pb'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
value :MANAGEABILITY, 4
|
36
|
-
end
|
37
|
-
add_enum "google.cloud.recommender.v1.Insight.Severity" do
|
38
|
-
value :SEVERITY_UNSPECIFIED, 0
|
39
|
-
value :LOW, 1
|
40
|
-
value :MEDIUM, 2
|
41
|
-
value :HIGH, 3
|
42
|
-
value :CRITICAL, 4
|
43
|
-
end
|
44
|
-
add_message "google.cloud.recommender.v1.InsightStateInfo" do
|
45
|
-
optional :state, :enum, 1, "google.cloud.recommender.v1.InsightStateInfo.State"
|
46
|
-
map :state_metadata, :string, :string, 2
|
47
|
-
end
|
48
|
-
add_enum "google.cloud.recommender.v1.InsightStateInfo.State" do
|
49
|
-
value :STATE_UNSPECIFIED, 0
|
50
|
-
value :ACTIVE, 1
|
51
|
-
value :ACCEPTED, 2
|
52
|
-
value :DISMISSED, 3
|
12
|
+
|
13
|
+
descriptor_data = "\n)google/cloud/recommender/v1/insight.proto\x12\x1bgoogle.cloud.recommender.v1\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb6\t\n\x07Insight\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x18\n\x10target_resources\x18\t \x03(\t\x12\x17\n\x0finsight_subtype\x18\n \x01(\t\x12(\n\x07\x63ontent\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x35\n\x11last_refresh_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12observation_period\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x41\n\nstate_info\x18\x06 \x01(\x0b\x32-.google.cloud.recommender.v1.InsightStateInfo\x12?\n\x08\x63\x61tegory\x18\x07 \x01(\x0e\x32-.google.cloud.recommender.v1.Insight.Category\x12?\n\x08severity\x18\x0f \x01(\x0e\x32-.google.cloud.recommender.v1.Insight.Severity\x12\x0c\n\x04\x65tag\x18\x0b \x01(\t\x12`\n\x1a\x61ssociated_recommendations\x18\x08 \x03(\x0b\x32<.google.cloud.recommender.v1.Insight.RecommendationReference\x1a\x31\n\x17RecommendationReference\x12\x16\n\x0erecommendation\x18\x01 \x01(\t\"`\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x08\n\x04\x43OST\x10\x01\x12\x0c\n\x08SECURITY\x10\x02\x12\x0f\n\x0bPERFORMANCE\x10\x03\x12\x11\n\rMANAGEABILITY\x10\x04\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x12\x0c\n\x08\x43RITICAL\x10\x04:\x9f\x03\xea\x41\x9b\x03\n\"recommender.googleapis.com/Insight\x12Vprojects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12\x65\x62illingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12Tfolders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12`organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\"\xaf\x02\n\x10InsightStateInfo\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32\x33.google.cloud.recommender.v1.InsightStateInfo.State\x12X\n\x0estate_metadata\x18\x02 \x03(\x0b\x32@.google.cloud.recommender.v1.InsightStateInfo.StateMetadataEntry\x1a\x34\n\x12StateMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"G\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08\x41\x43\x43\x45PTED\x10\x02\x12\r\n\tDISMISSED\x10\x03\x42\xf0\x03\n\x1f\x63om.google.cloud.recommender.v1B\x0cInsightProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xa2\x02\x04\x43REC\xaa\x02\x1bGoogle.Cloud.Recommender.V1\xea\x41\xd3\x02\n&recommender.googleapis.com/InsightType\x12\x43projects/{project}/locations/{location}/insightTypes/{insight_type}\x12RbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}\x12\x41\x66olders/{folder}/locations/{location}/insightTypes/{insight_type}\x12Morganizations/{organization}/locations/{location}/insightTypes/{insight_type}b\x06proto3"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError => e
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.protobuf.Struct", "google/protobuf/struct.proto"],
|
29
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
30
|
+
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
31
|
+
]
|
32
|
+
imports.each do |type_name, expected_filename|
|
33
|
+
import_file = pool.lookup(type_name).file_descriptor
|
34
|
+
if import_file.name != expected_filename
|
35
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
53
36
|
end
|
54
37
|
end
|
38
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
39
|
+
warn "This will become an error in the next major version."
|
55
40
|
end
|
56
41
|
|
57
42
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/recommender/v1/insight_type_config.proto
|
3
4
|
|
@@ -8,21 +9,33 @@ require 'google/api/resource_pb'
|
|
8
9
|
require 'google/protobuf/struct_pb'
|
9
10
|
require 'google/protobuf/timestamp_pb'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
12
|
+
|
13
|
+
descriptor_data = "\n5google/cloud/recommender/v1/insight_type_config.proto\x12\x1bgoogle.cloud.recommender.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd6\x04\n\x11InsightTypeConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12`\n\x1einsight_type_generation_config\x18\x02 \x01(\x0b\x32\x38.google.cloud.recommender.v1.InsightTypeGenerationConfig\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1b\n\x0brevision_id\x18\x05 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x03\x12T\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32?.google.cloud.recommender.v1.InsightTypeConfig.AnnotationsEntry\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xd4\x01\xea\x41\xd0\x01\n,recommender.googleapis.com/InsightTypeConfig\x12Jprojects/{project}/locations/{location}/insightTypes/{insight_type}/config\x12Torganizations/{organization}/locations/{location}/insightTypes/{insight_type}/config\"F\n\x1bInsightTypeGenerationConfig\x12\'\n\x06params\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructB\xa3\x01\n\x1f\x63om.google.cloud.recommender.v1B\x16InsightTypeConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xa2\x02\x04\x43REC\xaa\x02\x1bGoogle.Cloud.Recommender.V1b\x06proto3"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError => e
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
29
|
+
["google.protobuf.Struct", "google/protobuf/struct.proto"],
|
30
|
+
]
|
31
|
+
imports.each do |type_name, expected_filename|
|
32
|
+
import_file = pool.lookup(type_name).file_descriptor
|
33
|
+
if import_file.name != expected_filename
|
34
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
24
35
|
end
|
25
36
|
end
|
37
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
38
|
+
warn "This will become an error in the next major version."
|
26
39
|
end
|
27
40
|
|
28
41
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/recommender/v1/recommendation.proto
|
3
4
|
|
@@ -9,92 +10,35 @@ require 'google/protobuf/struct_pb'
|
|
9
10
|
require 'google/protobuf/timestamp_pb'
|
10
11
|
require 'google/type/money_pb'
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
end
|
38
|
-
add_message "google.cloud.recommender.v1.RecommendationContent" do
|
39
|
-
repeated :operation_groups, :message, 2, "google.cloud.recommender.v1.OperationGroup"
|
40
|
-
optional :overview, :message, 3, "google.protobuf.Struct"
|
41
|
-
end
|
42
|
-
add_message "google.cloud.recommender.v1.OperationGroup" do
|
43
|
-
repeated :operations, :message, 1, "google.cloud.recommender.v1.Operation"
|
44
|
-
end
|
45
|
-
add_message "google.cloud.recommender.v1.Operation" do
|
46
|
-
optional :action, :string, 1
|
47
|
-
optional :resource_type, :string, 2
|
48
|
-
optional :resource, :string, 3
|
49
|
-
optional :path, :string, 4
|
50
|
-
optional :source_resource, :string, 5
|
51
|
-
optional :source_path, :string, 6
|
52
|
-
map :path_filters, :string, :message, 8, "google.protobuf.Value"
|
53
|
-
map :path_value_matchers, :string, :message, 11, "google.cloud.recommender.v1.ValueMatcher"
|
54
|
-
oneof :path_value do
|
55
|
-
optional :value, :message, 7, "google.protobuf.Value"
|
56
|
-
optional :value_matcher, :message, 10, "google.cloud.recommender.v1.ValueMatcher"
|
57
|
-
end
|
58
|
-
end
|
59
|
-
add_message "google.cloud.recommender.v1.ValueMatcher" do
|
60
|
-
oneof :match_variant do
|
61
|
-
optional :matches_pattern, :string, 1
|
62
|
-
end
|
63
|
-
end
|
64
|
-
add_message "google.cloud.recommender.v1.CostProjection" do
|
65
|
-
optional :cost, :message, 1, "google.type.Money"
|
66
|
-
optional :duration, :message, 2, "google.protobuf.Duration"
|
67
|
-
end
|
68
|
-
add_message "google.cloud.recommender.v1.SecurityProjection" do
|
69
|
-
optional :details, :message, 2, "google.protobuf.Struct"
|
70
|
-
end
|
71
|
-
add_message "google.cloud.recommender.v1.Impact" do
|
72
|
-
optional :category, :enum, 1, "google.cloud.recommender.v1.Impact.Category"
|
73
|
-
oneof :projection do
|
74
|
-
optional :cost_projection, :message, 100, "google.cloud.recommender.v1.CostProjection"
|
75
|
-
optional :security_projection, :message, 101, "google.cloud.recommender.v1.SecurityProjection"
|
76
|
-
end
|
77
|
-
end
|
78
|
-
add_enum "google.cloud.recommender.v1.Impact.Category" do
|
79
|
-
value :CATEGORY_UNSPECIFIED, 0
|
80
|
-
value :COST, 1
|
81
|
-
value :SECURITY, 2
|
82
|
-
value :PERFORMANCE, 3
|
83
|
-
value :MANAGEABILITY, 4
|
84
|
-
end
|
85
|
-
add_message "google.cloud.recommender.v1.RecommendationStateInfo" do
|
86
|
-
optional :state, :enum, 1, "google.cloud.recommender.v1.RecommendationStateInfo.State"
|
87
|
-
map :state_metadata, :string, :string, 2
|
88
|
-
end
|
89
|
-
add_enum "google.cloud.recommender.v1.RecommendationStateInfo.State" do
|
90
|
-
value :STATE_UNSPECIFIED, 0
|
91
|
-
value :ACTIVE, 1
|
92
|
-
value :CLAIMED, 6
|
93
|
-
value :SUCCEEDED, 3
|
94
|
-
value :FAILED, 4
|
95
|
-
value :DISMISSED, 5
|
13
|
+
|
14
|
+
descriptor_data = "\n0google/cloud/recommender/v1/recommendation.proto\x12\x1bgoogle.cloud.recommender.v1\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/type/money.proto\"\xa2\t\n\x0eRecommendation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1b\n\x13recommender_subtype\x18\x0c \x01(\t\x12\x35\n\x11last_refresh_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12;\n\x0eprimary_impact\x18\x05 \x01(\x0b\x32#.google.cloud.recommender.v1.Impact\x12>\n\x11\x61\x64\x64itional_impact\x18\x06 \x03(\x0b\x32#.google.cloud.recommender.v1.Impact\x12\x46\n\x08priority\x18\x11 \x01(\x0e\x32\x34.google.cloud.recommender.v1.Recommendation.Priority\x12\x43\n\x07\x63ontent\x18\x07 \x01(\x0b\x32\x32.google.cloud.recommender.v1.RecommendationContent\x12H\n\nstate_info\x18\n \x01(\x0b\x32\x34.google.cloud.recommender.v1.RecommendationStateInfo\x12\x0c\n\x04\x65tag\x18\x0b \x01(\t\x12Y\n\x13\x61ssociated_insights\x18\x0e \x03(\x0b\x32<.google.cloud.recommender.v1.Recommendation.InsightReference\x12\x14\n\x0cxor_group_id\x18\x12 \x01(\t\x1a#\n\x10InsightReference\x12\x0f\n\x07insight\x18\x01 \x01(\t\"D\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\n\x02P4\x10\x01\x12\x06\n\x02P3\x10\x02\x12\x06\n\x02P2\x10\x03\x12\x06\n\x02P1\x10\x04:\xda\x03\xea\x41\xd6\x03\n)recommender.googleapis.com/Recommendation\x12\x63projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12rbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12\x61\x66olders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12morganizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\"\x89\x01\n\x15RecommendationContent\x12\x45\n\x10operation_groups\x18\x02 \x03(\x0b\x32+.google.cloud.recommender.v1.OperationGroup\x12)\n\x08overview\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"L\n\x0eOperationGroup\x12:\n\noperations\x18\x01 \x03(\x0b\x32&.google.cloud.recommender.v1.Operation\"\xd7\x04\n\tOperation\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\t\x12\x15\n\rresource_type\x18\x02 \x01(\t\x12\x10\n\x08resource\x18\x03 \x01(\t\x12\x0c\n\x04path\x18\x04 \x01(\t\x12\x17\n\x0fsource_resource\x18\x05 \x01(\t\x12\x13\n\x0bsource_path\x18\x06 \x01(\t\x12\'\n\x05value\x18\x07 \x01(\x0b\x32\x16.google.protobuf.ValueH\x00\x12\x42\n\rvalue_matcher\x18\n \x01(\x0b\x32).google.cloud.recommender.v1.ValueMatcherH\x00\x12M\n\x0cpath_filters\x18\x08 \x03(\x0b\x32\x37.google.cloud.recommender.v1.Operation.PathFiltersEntry\x12Z\n\x13path_value_matchers\x18\x0b \x03(\x0b\x32=.google.cloud.recommender.v1.Operation.PathValueMatchersEntry\x1aJ\n\x10PathFiltersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x63\n\x16PathValueMatchersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.cloud.recommender.v1.ValueMatcher:\x02\x38\x01\x42\x0c\n\npath_value\":\n\x0cValueMatcher\x12\x19\n\x0fmatches_pattern\x18\x01 \x01(\tH\x00\x42\x0f\n\rmatch_variant\"_\n\x0e\x43ostProjection\x12 \n\x04\x63ost\x18\x01 \x01(\x0b\x32\x12.google.type.Money\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\">\n\x12SecurityProjection\x12(\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xd0\x02\n\x06Impact\x12>\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32,.google.cloud.recommender.v1.Impact.Category\x12\x46\n\x0f\x63ost_projection\x18\x64 \x01(\x0b\x32+.google.cloud.recommender.v1.CostProjectionH\x00\x12N\n\x13security_projection\x18\x65 \x01(\x0b\x32/.google.cloud.recommender.v1.SecurityProjectionH\x00\"`\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x08\n\x04\x43OST\x10\x01\x12\x0c\n\x08SECURITY\x10\x02\x12\x0f\n\x0bPERFORMANCE\x10\x03\x12\x11\n\rMANAGEABILITY\x10\x04\x42\x0c\n\nprojection\"\xde\x02\n\x17RecommendationStateInfo\x12I\n\x05state\x18\x01 \x01(\x0e\x32:.google.cloud.recommender.v1.RecommendationStateInfo.State\x12_\n\x0estate_metadata\x18\x02 \x03(\x0b\x32G.google.cloud.recommender.v1.RecommendationStateInfo.StateMetadataEntry\x1a\x34\n\x12StateMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07\x43LAIMED\x10\x06\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tDISMISSED\x10\x05\x42\xde\x03\n\x1f\x63om.google.cloud.recommender.v1P\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xa2\x02\x04\x43REC\xaa\x02\x1bGoogle.Cloud.Recommender.V1\xea\x41\xcf\x02\n&recommender.googleapis.com/Recommender\x12\x42projects/{project}/locations/{location}/recommenders/{recommender}\x12QbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}\x12@folders/{folder}/locations/{location}/recommenders/{recommender}\x12Lorganizations/{organization}/locations/{location}/recommenders/{recommender}b\x06proto3"
|
15
|
+
|
16
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
|
+
|
18
|
+
begin
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
20
|
+
rescue TypeError => e
|
21
|
+
# Compatibility code: will be removed in the next major version.
|
22
|
+
require 'google/protobuf/descriptor_pb'
|
23
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
24
|
+
parsed.clear_dependency
|
25
|
+
serialized = parsed.class.encode(parsed)
|
26
|
+
file = pool.add_serialized_file(serialized)
|
27
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
28
|
+
imports = [
|
29
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
30
|
+
["google.protobuf.Struct", "google/protobuf/struct.proto"],
|
31
|
+
["google.type.Money", "google/type/money.proto"],
|
32
|
+
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
33
|
+
]
|
34
|
+
imports.each do |type_name, expected_filename|
|
35
|
+
import_file = pool.lookup(type_name).file_descriptor
|
36
|
+
if import_file.name != expected_filename
|
37
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
96
38
|
end
|
97
39
|
end
|
40
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
41
|
+
warn "This will become an error in the next major version."
|
98
42
|
end
|
99
43
|
|
100
44
|
module Google
|
@@ -264,13 +264,11 @@ module Google
|
|
264
264
|
# # Call the list_insights method.
|
265
265
|
# result = client.list_insights request
|
266
266
|
#
|
267
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
268
|
-
# #
|
269
|
-
#
|
270
|
-
# # methods are also available for managing paging directly.
|
271
|
-
# result.each do |response|
|
267
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
268
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
269
|
+
# result.each do |item|
|
272
270
|
# # Each element is of type ::Google::Cloud::Recommender::V1::Insight.
|
273
|
-
# p
|
271
|
+
# p item
|
274
272
|
# end
|
275
273
|
#
|
276
274
|
def list_insights request, options = nil
|
@@ -585,13 +583,11 @@ module Google
|
|
585
583
|
# # Call the list_recommendations method.
|
586
584
|
# result = client.list_recommendations request
|
587
585
|
#
|
588
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
589
|
-
# #
|
590
|
-
#
|
591
|
-
# # methods are also available for managing paging directly.
|
592
|
-
# result.each do |response|
|
586
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
587
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
588
|
+
# result.each do |item|
|
593
589
|
# # Each element is of type ::Google::Cloud::Recommender::V1::Recommendation.
|
594
|
-
# p
|
590
|
+
# p item
|
595
591
|
# end
|
596
592
|
#
|
597
593
|
def list_recommendations request, options = nil
|
@@ -1435,9 +1431,9 @@ module Google
|
|
1435
1431
|
# * (`String`) The path to a service account key file in JSON format
|
1436
1432
|
# * (`Hash`) A service account key as a Hash
|
1437
1433
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1438
|
-
# (see the [googleauth docs](https://
|
1434
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1439
1435
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1440
|
-
# (see the [signet docs](https://
|
1436
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1441
1437
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1442
1438
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1443
1439
|
# * (`nil`) indicating no credentials
|