google-apis-recommender_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 14fd323be59984e99e9863b90528ec5f4b1a4b25c907b3ce568c44cf0876ca2b
4
+ data.tar.gz: 3ee8667cd09dfe5baaaab2034f255d44d68eac79e79591b33a84b3280186b792
5
+ SHA512:
6
+ metadata.gz: 28b68f982ba69a6e0d468b67c0a6e7ed8a5a4484747e2567fb761bf2ed50de0a3303e3a9358f5f25717f7b0b4cd3018723dc0a10d976e8fb8a22595f3fed5dfb
7
+ data.tar.gz: 5726184f06e1b87f4f831fc901e429b1d12034cdaff75c56a2bc0a4a8dc4d9d3010dba5611ff53e3191340849d84ade9c5d792cc4da147585ed1b0722f4696d6
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-recommender_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/recommender_v1/*.rb
9
+ lib/google/apis/recommender_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-recommender_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201113
7
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,96 @@
1
+ # Simple REST client for version V1 of the Recommender API
2
+
3
+ This is a simple client library for version V1 of the Recommender API. It provides:
4
+
5
+ * A client object that connects to the HTTP/JSON REST endpoint for the service.
6
+ * Ruby objects for data structures related to the service.
7
+ * Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
8
+ * Control of retry, pagination, and timeouts.
9
+
10
+ Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
11
+
12
+ ## Getting started
13
+
14
+ ### Before you begin
15
+
16
+ There are a few setup steps you need to complete before you can use this library:
17
+
18
+ 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
19
+ 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
20
+ 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/recommender.googleapis.com) in the console.
21
+
22
+ ### Installation
23
+
24
+ Add this line to your application's Gemfile:
25
+
26
+ ```ruby
27
+ gem 'google-apis-recommender_v1', '~> 0.1'
28
+ ```
29
+
30
+ And then execute:
31
+
32
+ ```
33
+ $ bundle
34
+ ```
35
+
36
+ Or install it yourself as:
37
+
38
+ ```
39
+ $ gem install google-apis-recommender_v1
40
+ ```
41
+
42
+ ### Creating a client object
43
+
44
+ Once the gem is installed, you can load the client code and instantiate a client.
45
+
46
+ ```ruby
47
+ # Load the client
48
+ require "google/apis/recommender_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::RecommenderV1::RecommenderService.new
52
+
53
+ # Authenticate calls
54
+ client.authentication = # ... use the googleauth gem to create credentials
55
+ ```
56
+
57
+ See the class reference docs for information on the methods you can call from a client.
58
+
59
+ ## Documentation
60
+
61
+ More detailed descriptions of the Google simple REST clients are available in two documents.
62
+
63
+ * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
64
+ * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
65
+
66
+ (Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Recommender service in particular.)
67
+
68
+ For reference information on specific calls in the Recommender API, see the {Google::Apis::RecommenderV1::RecommenderService class reference docs}.
69
+
70
+ ## Which client should I use?
71
+
72
+ Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
73
+
74
+ This library, `google-apis-recommender_v1`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
75
+
76
+ Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
77
+
78
+ Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
79
+
80
+ **For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
81
+
82
+ The [product documentation](https://cloud.google.com/recommender/docs/) may provide guidance regarding the preferred client library to use.
83
+
84
+ ## Supported Ruby versions
85
+
86
+ This library is supported on Ruby 2.5+.
87
+
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
+
90
+ ## License
91
+
92
+ This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
93
+
94
+ ## Support
95
+
96
+ Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/recommender_v1"
@@ -0,0 +1,36 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/recommender_v1/service.rb'
16
+ require 'google/apis/recommender_v1/classes.rb'
17
+ require 'google/apis/recommender_v1/representations.rb'
18
+ require 'google/apis/recommender_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Recommender API
23
+ #
24
+ #
25
+ #
26
+ # @see https://cloud.google.com/recommender/docs/
27
+ module RecommenderV1
28
+ # Version of the Recommender API this client connects to.
29
+ # This is NOT the gem version.
30
+ VERSION = 'V1'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,692 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module RecommenderV1
24
+
25
+ # Contains metadata about how much money a recommendation can save or incur.
26
+ class GoogleCloudRecommenderV1CostProjection
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Represents an amount of money with its currency type.
30
+ # Corresponds to the JSON property `cost`
31
+ # @return [Google::Apis::RecommenderV1::GoogleTypeMoney]
32
+ attr_accessor :cost
33
+
34
+ # Duration for which this cost applies.
35
+ # Corresponds to the JSON property `duration`
36
+ # @return [String]
37
+ attr_accessor :duration
38
+
39
+ def initialize(**args)
40
+ update!(**args)
41
+ end
42
+
43
+ # Update properties of this object
44
+ def update!(**args)
45
+ @cost = args[:cost] if args.key?(:cost)
46
+ @duration = args[:duration] if args.key?(:duration)
47
+ end
48
+ end
49
+
50
+ # Contains the impact a recommendation can have for a given category.
51
+ class GoogleCloudRecommenderV1Impact
52
+ include Google::Apis::Core::Hashable
53
+
54
+ # Category that is being targeted.
55
+ # Corresponds to the JSON property `category`
56
+ # @return [String]
57
+ attr_accessor :category
58
+
59
+ # Contains metadata about how much money a recommendation can save or incur.
60
+ # Corresponds to the JSON property `costProjection`
61
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1CostProjection]
62
+ attr_accessor :cost_projection
63
+
64
+ def initialize(**args)
65
+ update!(**args)
66
+ end
67
+
68
+ # Update properties of this object
69
+ def update!(**args)
70
+ @category = args[:category] if args.key?(:category)
71
+ @cost_projection = args[:cost_projection] if args.key?(:cost_projection)
72
+ end
73
+ end
74
+
75
+ # An insight along with the information used to derive the insight. The insight
76
+ # may have associated recomendations as well.
77
+ class GoogleCloudRecommenderV1Insight
78
+ include Google::Apis::Core::Hashable
79
+
80
+ # Recommendations derived from this insight.
81
+ # Corresponds to the JSON property `associatedRecommendations`
82
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1InsightRecommendationReference>]
83
+ attr_accessor :associated_recommendations
84
+
85
+ # Category being targeted by the insight.
86
+ # Corresponds to the JSON property `category`
87
+ # @return [String]
88
+ attr_accessor :category
89
+
90
+ # A struct of custom fields to explain the insight. Example: "
91
+ # grantedPermissionsCount": "1000"
92
+ # Corresponds to the JSON property `content`
93
+ # @return [Hash<String,Object>]
94
+ attr_accessor :content
95
+
96
+ # Free-form human readable summary in English. The maximum length is 500
97
+ # characters.
98
+ # Corresponds to the JSON property `description`
99
+ # @return [String]
100
+ attr_accessor :description
101
+
102
+ # Fingerprint of the Insight. Provides optimistic locking when updating states.
103
+ # Corresponds to the JSON property `etag`
104
+ # @return [String]
105
+ attr_accessor :etag
106
+
107
+ # Insight subtype. Insight content schema will be stable for a given subtype.
108
+ # Corresponds to the JSON property `insightSubtype`
109
+ # @return [String]
110
+ attr_accessor :insight_subtype
111
+
112
+ # Timestamp of the latest data used to generate the insight.
113
+ # Corresponds to the JSON property `lastRefreshTime`
114
+ # @return [String]
115
+ attr_accessor :last_refresh_time
116
+
117
+ # Name of the insight.
118
+ # Corresponds to the JSON property `name`
119
+ # @return [String]
120
+ attr_accessor :name
121
+
122
+ # Observation period that led to the insight. The source data used to generate
123
+ # the insight ends at last_refresh_time and begins at (last_refresh_time -
124
+ # observation_period).
125
+ # Corresponds to the JSON property `observationPeriod`
126
+ # @return [String]
127
+ attr_accessor :observation_period
128
+
129
+ # Information related to insight state.
130
+ # Corresponds to the JSON property `stateInfo`
131
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1InsightStateInfo]
132
+ attr_accessor :state_info
133
+
134
+ # Fully qualified resource names that this insight is targeting.
135
+ # Corresponds to the JSON property `targetResources`
136
+ # @return [Array<String>]
137
+ attr_accessor :target_resources
138
+
139
+ def initialize(**args)
140
+ update!(**args)
141
+ end
142
+
143
+ # Update properties of this object
144
+ def update!(**args)
145
+ @associated_recommendations = args[:associated_recommendations] if args.key?(:associated_recommendations)
146
+ @category = args[:category] if args.key?(:category)
147
+ @content = args[:content] if args.key?(:content)
148
+ @description = args[:description] if args.key?(:description)
149
+ @etag = args[:etag] if args.key?(:etag)
150
+ @insight_subtype = args[:insight_subtype] if args.key?(:insight_subtype)
151
+ @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
152
+ @name = args[:name] if args.key?(:name)
153
+ @observation_period = args[:observation_period] if args.key?(:observation_period)
154
+ @state_info = args[:state_info] if args.key?(:state_info)
155
+ @target_resources = args[:target_resources] if args.key?(:target_resources)
156
+ end
157
+ end
158
+
159
+ # Reference to an associated recommendation.
160
+ class GoogleCloudRecommenderV1InsightRecommendationReference
161
+ include Google::Apis::Core::Hashable
162
+
163
+ # Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[
164
+ # LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]
165
+ # Corresponds to the JSON property `recommendation`
166
+ # @return [String]
167
+ attr_accessor :recommendation
168
+
169
+ def initialize(**args)
170
+ update!(**args)
171
+ end
172
+
173
+ # Update properties of this object
174
+ def update!(**args)
175
+ @recommendation = args[:recommendation] if args.key?(:recommendation)
176
+ end
177
+ end
178
+
179
+ # Information related to insight state.
180
+ class GoogleCloudRecommenderV1InsightStateInfo
181
+ include Google::Apis::Core::Hashable
182
+
183
+ # Insight state.
184
+ # Corresponds to the JSON property `state`
185
+ # @return [String]
186
+ attr_accessor :state
187
+
188
+ # A map of metadata for the state, provided by user or automations systems.
189
+ # Corresponds to the JSON property `stateMetadata`
190
+ # @return [Hash<String,String>]
191
+ attr_accessor :state_metadata
192
+
193
+ def initialize(**args)
194
+ update!(**args)
195
+ end
196
+
197
+ # Update properties of this object
198
+ def update!(**args)
199
+ @state = args[:state] if args.key?(:state)
200
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
201
+ end
202
+ end
203
+
204
+ # Response to the `ListInsights` method.
205
+ class GoogleCloudRecommenderV1ListInsightsResponse
206
+ include Google::Apis::Core::Hashable
207
+
208
+ # The set of insights for the `parent` resource.
209
+ # Corresponds to the JSON property `insights`
210
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight>]
211
+ attr_accessor :insights
212
+
213
+ # A token that can be used to request the next page of results. This field is
214
+ # empty if there are no additional results.
215
+ # Corresponds to the JSON property `nextPageToken`
216
+ # @return [String]
217
+ attr_accessor :next_page_token
218
+
219
+ def initialize(**args)
220
+ update!(**args)
221
+ end
222
+
223
+ # Update properties of this object
224
+ def update!(**args)
225
+ @insights = args[:insights] if args.key?(:insights)
226
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
227
+ end
228
+ end
229
+
230
+ # Response to the `ListRecommendations` method.
231
+ class GoogleCloudRecommenderV1ListRecommendationsResponse
232
+ include Google::Apis::Core::Hashable
233
+
234
+ # A token that can be used to request the next page of results. This field is
235
+ # empty if there are no additional results.
236
+ # Corresponds to the JSON property `nextPageToken`
237
+ # @return [String]
238
+ attr_accessor :next_page_token
239
+
240
+ # The set of recommendations for the `parent` resource.
241
+ # Corresponds to the JSON property `recommendations`
242
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation>]
243
+ attr_accessor :recommendations
244
+
245
+ def initialize(**args)
246
+ update!(**args)
247
+ end
248
+
249
+ # Update properties of this object
250
+ def update!(**args)
251
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
252
+ @recommendations = args[:recommendations] if args.key?(:recommendations)
253
+ end
254
+ end
255
+
256
+ # Request for the `MarkInsightAccepted` method.
257
+ class GoogleCloudRecommenderV1MarkInsightAcceptedRequest
258
+ include Google::Apis::Core::Hashable
259
+
260
+ # Required. Fingerprint of the Insight. Provides optimistic locking.
261
+ # Corresponds to the JSON property `etag`
262
+ # @return [String]
263
+ attr_accessor :etag
264
+
265
+ # Optional. State properties user wish to include with this state. Full replace
266
+ # of the current state_metadata.
267
+ # Corresponds to the JSON property `stateMetadata`
268
+ # @return [Hash<String,String>]
269
+ attr_accessor :state_metadata
270
+
271
+ def initialize(**args)
272
+ update!(**args)
273
+ end
274
+
275
+ # Update properties of this object
276
+ def update!(**args)
277
+ @etag = args[:etag] if args.key?(:etag)
278
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
279
+ end
280
+ end
281
+
282
+ # Request for the `MarkRecommendationClaimed` Method.
283
+ class GoogleCloudRecommenderV1MarkRecommendationClaimedRequest
284
+ include Google::Apis::Core::Hashable
285
+
286
+ # Required. Fingerprint of the Recommendation. Provides optimistic locking.
287
+ # Corresponds to the JSON property `etag`
288
+ # @return [String]
289
+ attr_accessor :etag
290
+
291
+ # State properties to include with this state. Overwrites any existing `
292
+ # state_metadata`. Keys must match the regex /^a-z0-9`0,62`$/. Values must match
293
+ # the regex /^[a-zA-Z0-9_./-]`0,255`$/.
294
+ # Corresponds to the JSON property `stateMetadata`
295
+ # @return [Hash<String,String>]
296
+ attr_accessor :state_metadata
297
+
298
+ def initialize(**args)
299
+ update!(**args)
300
+ end
301
+
302
+ # Update properties of this object
303
+ def update!(**args)
304
+ @etag = args[:etag] if args.key?(:etag)
305
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
306
+ end
307
+ end
308
+
309
+ # Request for the `MarkRecommendationFailed` Method.
310
+ class GoogleCloudRecommenderV1MarkRecommendationFailedRequest
311
+ include Google::Apis::Core::Hashable
312
+
313
+ # Required. Fingerprint of the Recommendation. Provides optimistic locking.
314
+ # Corresponds to the JSON property `etag`
315
+ # @return [String]
316
+ attr_accessor :etag
317
+
318
+ # State properties to include with this state. Overwrites any existing `
319
+ # state_metadata`. Keys must match the regex /^a-z0-9`0,62`$/. Values must match
320
+ # the regex /^[a-zA-Z0-9_./-]`0,255`$/.
321
+ # Corresponds to the JSON property `stateMetadata`
322
+ # @return [Hash<String,String>]
323
+ attr_accessor :state_metadata
324
+
325
+ def initialize(**args)
326
+ update!(**args)
327
+ end
328
+
329
+ # Update properties of this object
330
+ def update!(**args)
331
+ @etag = args[:etag] if args.key?(:etag)
332
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
333
+ end
334
+ end
335
+
336
+ # Request for the `MarkRecommendationSucceeded` Method.
337
+ class GoogleCloudRecommenderV1MarkRecommendationSucceededRequest
338
+ include Google::Apis::Core::Hashable
339
+
340
+ # Required. Fingerprint of the Recommendation. Provides optimistic locking.
341
+ # Corresponds to the JSON property `etag`
342
+ # @return [String]
343
+ attr_accessor :etag
344
+
345
+ # State properties to include with this state. Overwrites any existing `
346
+ # state_metadata`. Keys must match the regex /^a-z0-9`0,62`$/. Values must match
347
+ # the regex /^[a-zA-Z0-9_./-]`0,255`$/.
348
+ # Corresponds to the JSON property `stateMetadata`
349
+ # @return [Hash<String,String>]
350
+ attr_accessor :state_metadata
351
+
352
+ def initialize(**args)
353
+ update!(**args)
354
+ end
355
+
356
+ # Update properties of this object
357
+ def update!(**args)
358
+ @etag = args[:etag] if args.key?(:etag)
359
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
360
+ end
361
+ end
362
+
363
+ # Contains an operation for a resource loosely based on the JSON-PATCH format
364
+ # with support for: * Custom filters for describing partial array patch. *
365
+ # Extended path values for describing nested arrays. * Custom fields for
366
+ # describing the resource for which the operation is being described. * Allows
367
+ # extension to custom operations not natively supported by RFC6902. See https://
368
+ # tools.ietf.org/html/rfc6902 for details on the original RFC.
369
+ class GoogleCloudRecommenderV1Operation
370
+ include Google::Apis::Core::Hashable
371
+
372
+ # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move', '
373
+ # copy', 'test' and custom operations. This field is case-insensitive and always
374
+ # populated.
375
+ # Corresponds to the JSON property `action`
376
+ # @return [String]
377
+ attr_accessor :action
378
+
379
+ # Path to the target field being operated on. If the operation is at the
380
+ # resource level, then path should be "/". This field is always populated.
381
+ # Corresponds to the JSON property `path`
382
+ # @return [String]
383
+ attr_accessor :path
384
+
385
+ # Set of filters to apply if `path` refers to array elements or nested array
386
+ # elements in order to narrow down to a single unique element that is being
387
+ # tested/modified. This is intended to be an exact match per filter. To perform
388
+ # advanced matching, use path_value_matchers. * Example: ` "/versions/*/name" : "
389
+ # it-123" "/versions/*/targetSize/percent": 20 ` * Example: ` "/bindings/*/role":
390
+ # "roles/owner" "/bindings/*/condition" : null ` * Example: ` "/bindings/*/role"
391
+ # : "roles/owner" "/bindings/*/members/*" : ["x@example.com", "y@example.com"] `
392
+ # When both path_filters and path_value_matchers are set, an implicit AND must
393
+ # be performed.
394
+ # Corresponds to the JSON property `pathFilters`
395
+ # @return [Hash<String,Object>]
396
+ attr_accessor :path_filters
397
+
398
+ # Similar to path_filters, this contains set of filters to apply if `path` field
399
+ # referes to array elements. This is meant to support value matching beyond
400
+ # exact match. To perform exact match, use path_filters. When both path_filters
401
+ # and path_value_matchers are set, an implicit AND must be performed.
402
+ # Corresponds to the JSON property `pathValueMatchers`
403
+ # @return [Hash<String,Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ValueMatcher>]
404
+ attr_accessor :path_value_matchers
405
+
406
+ # Contains the fully qualified resource name. This field is always populated. ex:
407
+ # //cloudresourcemanager.googleapis.com/projects/foo.
408
+ # Corresponds to the JSON property `resource`
409
+ # @return [String]
410
+ attr_accessor :resource
411
+
412
+ # Type of GCP resource being modified/tested. This field is always populated.
413
+ # Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/
414
+ # Instance
415
+ # Corresponds to the JSON property `resourceType`
416
+ # @return [String]
417
+ attr_accessor :resource_type
418
+
419
+ # Can be set with action 'copy' or 'move' to indicate the source field within
420
+ # resource or source_resource, ignored if provided for other operation types.
421
+ # Corresponds to the JSON property `sourcePath`
422
+ # @return [String]
423
+ attr_accessor :source_path
424
+
425
+ # Can be set with action 'copy' to copy resource configuration across different
426
+ # resources of the same type. Example: A resource clone can be done via action =
427
+ # 'copy', path = "/", from = "/", source_resource = and resource_name = . This
428
+ # field is empty for all other values of `action`.
429
+ # Corresponds to the JSON property `sourceResource`
430
+ # @return [String]
431
+ attr_accessor :source_resource
432
+
433
+ # Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set
434
+ # for action: 'test'. Either this or `value_matcher` will be set for 'test'
435
+ # operation. An exact match must be performed.
436
+ # Corresponds to the JSON property `value`
437
+ # @return [Object]
438
+ attr_accessor :value
439
+
440
+ # Contains various matching options for values for a GCP resource field.
441
+ # Corresponds to the JSON property `valueMatcher`
442
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ValueMatcher]
443
+ attr_accessor :value_matcher
444
+
445
+ def initialize(**args)
446
+ update!(**args)
447
+ end
448
+
449
+ # Update properties of this object
450
+ def update!(**args)
451
+ @action = args[:action] if args.key?(:action)
452
+ @path = args[:path] if args.key?(:path)
453
+ @path_filters = args[:path_filters] if args.key?(:path_filters)
454
+ @path_value_matchers = args[:path_value_matchers] if args.key?(:path_value_matchers)
455
+ @resource = args[:resource] if args.key?(:resource)
456
+ @resource_type = args[:resource_type] if args.key?(:resource_type)
457
+ @source_path = args[:source_path] if args.key?(:source_path)
458
+ @source_resource = args[:source_resource] if args.key?(:source_resource)
459
+ @value = args[:value] if args.key?(:value)
460
+ @value_matcher = args[:value_matcher] if args.key?(:value_matcher)
461
+ end
462
+ end
463
+
464
+ # Group of operations that need to be performed atomically.
465
+ class GoogleCloudRecommenderV1OperationGroup
466
+ include Google::Apis::Core::Hashable
467
+
468
+ # List of operations across one or more resources that belong to this group.
469
+ # Loosely based on RFC6902 and should be performed in the order they appear.
470
+ # Corresponds to the JSON property `operations`
471
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Operation>]
472
+ attr_accessor :operations
473
+
474
+ def initialize(**args)
475
+ update!(**args)
476
+ end
477
+
478
+ # Update properties of this object
479
+ def update!(**args)
480
+ @operations = args[:operations] if args.key?(:operations)
481
+ end
482
+ end
483
+
484
+ # A recommendation along with a suggested action. E.g., a rightsizing
485
+ # recommendation for an underutilized VM, IAM role recommendations, etc
486
+ class GoogleCloudRecommenderV1Recommendation
487
+ include Google::Apis::Core::Hashable
488
+
489
+ # Optional set of additional impact that this recommendation may have when
490
+ # trying to optimize for the primary category. These may be positive or negative.
491
+ # Corresponds to the JSON property `additionalImpact`
492
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact>]
493
+ attr_accessor :additional_impact
494
+
495
+ # Insights that led to this recommendation.
496
+ # Corresponds to the JSON property `associatedInsights`
497
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationInsightReference>]
498
+ attr_accessor :associated_insights
499
+
500
+ # Contains what resources are changing and how they are changing.
501
+ # Corresponds to the JSON property `content`
502
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationContent]
503
+ attr_accessor :content
504
+
505
+ # Free-form human readable summary in English. The maximum length is 500
506
+ # characters.
507
+ # Corresponds to the JSON property `description`
508
+ # @return [String]
509
+ attr_accessor :description
510
+
511
+ # Fingerprint of the Recommendation. Provides optimistic locking when updating
512
+ # states.
513
+ # Corresponds to the JSON property `etag`
514
+ # @return [String]
515
+ attr_accessor :etag
516
+
517
+ # Last time this recommendation was refreshed by the system that created it in
518
+ # the first place.
519
+ # Corresponds to the JSON property `lastRefreshTime`
520
+ # @return [String]
521
+ attr_accessor :last_refresh_time
522
+
523
+ # Name of recommendation.
524
+ # Corresponds to the JSON property `name`
525
+ # @return [String]
526
+ attr_accessor :name
527
+
528
+ # Contains the impact a recommendation can have for a given category.
529
+ # Corresponds to the JSON property `primaryImpact`
530
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact]
531
+ attr_accessor :primary_impact
532
+
533
+ # Contains an identifier for a subtype of recommendations produced for the same
534
+ # recommender. Subtype is a function of content and impact, meaning a new
535
+ # subtype might be added when significant changes to `content` or `
536
+ # primary_impact.category` are introduced. See the Recommenders section to see a
537
+ # list of subtypes for a given Recommender. Examples: For recommender = "google.
538
+ # iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"
539
+ # REPLACE_ROLE"
540
+ # Corresponds to the JSON property `recommenderSubtype`
541
+ # @return [String]
542
+ attr_accessor :recommender_subtype
543
+
544
+ # Information for state. Contains state and metadata.
545
+ # Corresponds to the JSON property `stateInfo`
546
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationStateInfo]
547
+ attr_accessor :state_info
548
+
549
+ def initialize(**args)
550
+ update!(**args)
551
+ end
552
+
553
+ # Update properties of this object
554
+ def update!(**args)
555
+ @additional_impact = args[:additional_impact] if args.key?(:additional_impact)
556
+ @associated_insights = args[:associated_insights] if args.key?(:associated_insights)
557
+ @content = args[:content] if args.key?(:content)
558
+ @description = args[:description] if args.key?(:description)
559
+ @etag = args[:etag] if args.key?(:etag)
560
+ @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
561
+ @name = args[:name] if args.key?(:name)
562
+ @primary_impact = args[:primary_impact] if args.key?(:primary_impact)
563
+ @recommender_subtype = args[:recommender_subtype] if args.key?(:recommender_subtype)
564
+ @state_info = args[:state_info] if args.key?(:state_info)
565
+ end
566
+ end
567
+
568
+ # Contains what resources are changing and how they are changing.
569
+ class GoogleCloudRecommenderV1RecommendationContent
570
+ include Google::Apis::Core::Hashable
571
+
572
+ # Operations to one or more Google Cloud resources grouped in such a way that,
573
+ # all operations within one group are expected to be performed atomically and in
574
+ # an order.
575
+ # Corresponds to the JSON property `operationGroups`
576
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1OperationGroup>]
577
+ attr_accessor :operation_groups
578
+
579
+ def initialize(**args)
580
+ update!(**args)
581
+ end
582
+
583
+ # Update properties of this object
584
+ def update!(**args)
585
+ @operation_groups = args[:operation_groups] if args.key?(:operation_groups)
586
+ end
587
+ end
588
+
589
+ # Reference to an associated insight.
590
+ class GoogleCloudRecommenderV1RecommendationInsightReference
591
+ include Google::Apis::Core::Hashable
592
+
593
+ # Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/
594
+ # insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]
595
+ # Corresponds to the JSON property `insight`
596
+ # @return [String]
597
+ attr_accessor :insight
598
+
599
+ def initialize(**args)
600
+ update!(**args)
601
+ end
602
+
603
+ # Update properties of this object
604
+ def update!(**args)
605
+ @insight = args[:insight] if args.key?(:insight)
606
+ end
607
+ end
608
+
609
+ # Information for state. Contains state and metadata.
610
+ class GoogleCloudRecommenderV1RecommendationStateInfo
611
+ include Google::Apis::Core::Hashable
612
+
613
+ # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
614
+ # Corresponds to the JSON property `state`
615
+ # @return [String]
616
+ attr_accessor :state
617
+
618
+ # A map of metadata for the state, provided by user or automations systems.
619
+ # Corresponds to the JSON property `stateMetadata`
620
+ # @return [Hash<String,String>]
621
+ attr_accessor :state_metadata
622
+
623
+ def initialize(**args)
624
+ update!(**args)
625
+ end
626
+
627
+ # Update properties of this object
628
+ def update!(**args)
629
+ @state = args[:state] if args.key?(:state)
630
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
631
+ end
632
+ end
633
+
634
+ # Contains various matching options for values for a GCP resource field.
635
+ class GoogleCloudRecommenderV1ValueMatcher
636
+ include Google::Apis::Core::Hashable
637
+
638
+ # To be used for full regex matching. The regular expression is using the Google
639
+ # RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2:
640
+ # :FullMatch
641
+ # Corresponds to the JSON property `matchesPattern`
642
+ # @return [String]
643
+ attr_accessor :matches_pattern
644
+
645
+ def initialize(**args)
646
+ update!(**args)
647
+ end
648
+
649
+ # Update properties of this object
650
+ def update!(**args)
651
+ @matches_pattern = args[:matches_pattern] if args.key?(:matches_pattern)
652
+ end
653
+ end
654
+
655
+ # Represents an amount of money with its currency type.
656
+ class GoogleTypeMoney
657
+ include Google::Apis::Core::Hashable
658
+
659
+ # The three-letter currency code defined in ISO 4217.
660
+ # Corresponds to the JSON property `currencyCode`
661
+ # @return [String]
662
+ attr_accessor :currency_code
663
+
664
+ # Number of nano (10^-9) units of the amount. The value must be between -999,999,
665
+ # 999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be
666
+ # positive or zero. If `units` is zero, `nanos` can be positive, zero, or
667
+ # negative. If `units` is negative, `nanos` must be negative or zero. For
668
+ # example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
669
+ # Corresponds to the JSON property `nanos`
670
+ # @return [Fixnum]
671
+ attr_accessor :nanos
672
+
673
+ # The whole units of the amount. For example if `currencyCode` is `"USD"`, then
674
+ # 1 unit is one US dollar.
675
+ # Corresponds to the JSON property `units`
676
+ # @return [Fixnum]
677
+ attr_accessor :units
678
+
679
+ def initialize(**args)
680
+ update!(**args)
681
+ end
682
+
683
+ # Update properties of this object
684
+ def update!(**args)
685
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
686
+ @nanos = args[:nanos] if args.key?(:nanos)
687
+ @units = args[:units] if args.key?(:units)
688
+ end
689
+ end
690
+ end
691
+ end
692
+ end