google-apis-ml_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: e416c8eb7b4db4a4db71c0d9347711bbb1d7f5dc76b5efdeb353aa910ed54727
4
+ data.tar.gz: a8b8b01acdcdac792a7b0e72867351fb1ddec4d9d4e089f7b3a739a17cc915cf
5
+ SHA512:
6
+ metadata.gz: cbfaa1a12f92458200f062e8c856245c673f934ec05a9fb83dac48c70e8e309067419af347224721c1663ef20e0b25763922ddd090d3788cb688183c8141c9b6
7
+ data.tar.gz: fa0637774a835ce417fbb008f3a69e1e766d3b94fec583c09523f6639d1596b1ad5c1c39e7cff5a757ab647a0eee6e1b581d1874cd6ac11ec997e0d92720929d
@@ -0,0 +1,13 @@
1
+ --hide-void-return
2
+ --no-private
3
+ --verbose
4
+ --title=google-apis-ml_v1
5
+ --markup-provider=redcarpet
6
+ --markup=markdown
7
+ --main OVERVIEW.md
8
+ lib/google/apis/ml_v1/*.rb
9
+ lib/google/apis/ml_v1.rb
10
+ -
11
+ OVERVIEW.md
12
+ CHANGELOG.md
13
+ LICENSE.md
@@ -0,0 +1,7 @@
1
+ # Release history for google-apis-ml_v1
2
+
3
+ ### v0.1.0 (2021-01-07)
4
+
5
+ * Regenerated using generator version 0.1.1
6
+ * Regenerated from discovery document revision 20201207
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 AI Platform Training & Prediction API
2
+
3
+ This is a simple client library for version V1 of the AI Platform Training & Prediction 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/ml.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-ml_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-ml_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/ml_v1"
49
+
50
+ # Create a client object
51
+ client = Google::Apis::MlV1::CloudMachineLearningEngineService.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 Ml service in particular.)
67
+
68
+ For reference information on specific calls in the AI Platform Training & Prediction API, see the {Google::Apis::MlV1::CloudMachineLearningEngineService 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-ml_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/ml/) 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/ml_v1"
@@ -0,0 +1,39 @@
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/ml_v1/service.rb'
16
+ require 'google/apis/ml_v1/classes.rb'
17
+ require 'google/apis/ml_v1/representations.rb'
18
+ require 'google/apis/ml_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # AI Platform Training & Prediction API
23
+ #
24
+ # An API to enable creating and using machine learning models.
25
+ #
26
+ # @see https://cloud.google.com/ml/
27
+ module MlV1
28
+ # Version of the AI Platform Training & Prediction 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
+
35
+ # View your data across Google Cloud Platform services
36
+ AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only'
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,3799 @@
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 MlV1
24
+
25
+ # Message that represents an arbitrary HTTP body. It should only be used for
26
+ # payload formats that can't be represented as JSON, such as raw binary or an
27
+ # HTML page. This message can be used both in streaming and non-streaming API
28
+ # methods in the request as well as the response. It can be used as a top-level
29
+ # request field, which is convenient if one wants to extract parameters from
30
+ # either the URL or HTTP template into the request fields and also want access
31
+ # to the raw HTTP body. Example: message GetResourceRequest ` // A unique
32
+ # request id. string request_id = 1; // The raw HTTP body is bound to this field.
33
+ # google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
34
+ # GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
35
+ # UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
36
+ # with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
37
+ # api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
38
+ # google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
39
+ # only changes how the request and response bodies are handled, all other
40
+ # features will continue to work unchanged.
41
+ class GoogleApiHttpBody
42
+ include Google::Apis::Core::Hashable
43
+
44
+ # The HTTP Content-Type header value specifying the content type of the body.
45
+ # Corresponds to the JSON property `contentType`
46
+ # @return [String]
47
+ attr_accessor :content_type
48
+
49
+ # The HTTP request/response body as raw binary.
50
+ # Corresponds to the JSON property `data`
51
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
52
+ # @return [String]
53
+ attr_accessor :data
54
+
55
+ # Application specific response metadata. Must be set in the first response for
56
+ # streaming APIs.
57
+ # Corresponds to the JSON property `extensions`
58
+ # @return [Array<Hash<String,Object>>]
59
+ attr_accessor :extensions
60
+
61
+ def initialize(**args)
62
+ update!(**args)
63
+ end
64
+
65
+ # Update properties of this object
66
+ def update!(**args)
67
+ @content_type = args[:content_type] if args.key?(:content_type)
68
+ @data = args[:data] if args.key?(:data)
69
+ @extensions = args[:extensions] if args.key?(:extensions)
70
+ end
71
+ end
72
+
73
+ #
74
+ class GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig
75
+ include Google::Apis::Core::Hashable
76
+
77
+ # If true, measurement.elapsed_time is used as the x-axis of each Trials Decay
78
+ # Curve. Otherwise, Measurement.steps will be used as the x-axis.
79
+ # Corresponds to the JSON property `useElapsedTime`
80
+ # @return [Boolean]
81
+ attr_accessor :use_elapsed_time
82
+ alias_method :use_elapsed_time?, :use_elapsed_time
83
+
84
+ def initialize(**args)
85
+ update!(**args)
86
+ end
87
+
88
+ # Update properties of this object
89
+ def update!(**args)
90
+ @use_elapsed_time = args[:use_elapsed_time] if args.key?(:use_elapsed_time)
91
+ end
92
+ end
93
+
94
+ # The median automated stopping rule stops a pending trial if the trial's best
95
+ # objective_value is strictly below the median 'performance' of all completed
96
+ # trials reported up to the trial's last measurement. Currently, 'performance'
97
+ # refers to the running average of the objective values reported by the trial in
98
+ # each measurement.
99
+ class GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig
100
+ include Google::Apis::Core::Hashable
101
+
102
+ # If true, the median automated stopping rule applies to measurement.
103
+ # use_elapsed_time, which means the elapsed_time field of the current trial's
104
+ # latest measurement is used to compute the median objective value for each
105
+ # completed trial.
106
+ # Corresponds to the JSON property `useElapsedTime`
107
+ # @return [Boolean]
108
+ attr_accessor :use_elapsed_time
109
+ alias_method :use_elapsed_time?, :use_elapsed_time
110
+
111
+ def initialize(**args)
112
+ update!(**args)
113
+ end
114
+
115
+ # Update properties of this object
116
+ def update!(**args)
117
+ @use_elapsed_time = args[:use_elapsed_time] if args.key?(:use_elapsed_time)
118
+ end
119
+ end
120
+
121
+ # An observed value of a metric.
122
+ class GoogleCloudMlV1HyperparameterOutputHyperparameterMetric
123
+ include Google::Apis::Core::Hashable
124
+
125
+ # The objective value at this training step.
126
+ # Corresponds to the JSON property `objectiveValue`
127
+ # @return [Float]
128
+ attr_accessor :objective_value
129
+
130
+ # The global training step for this metric.
131
+ # Corresponds to the JSON property `trainingStep`
132
+ # @return [Fixnum]
133
+ attr_accessor :training_step
134
+
135
+ def initialize(**args)
136
+ update!(**args)
137
+ end
138
+
139
+ # Update properties of this object
140
+ def update!(**args)
141
+ @objective_value = args[:objective_value] if args.key?(:objective_value)
142
+ @training_step = args[:training_step] if args.key?(:training_step)
143
+ end
144
+ end
145
+
146
+ # A message representing a metric in the measurement.
147
+ class GoogleCloudMlV1MeasurementMetric
148
+ include Google::Apis::Core::Hashable
149
+
150
+ # Required. Metric name.
151
+ # Corresponds to the JSON property `metric`
152
+ # @return [String]
153
+ attr_accessor :metric
154
+
155
+ # Required. The value for this metric.
156
+ # Corresponds to the JSON property `value`
157
+ # @return [Float]
158
+ attr_accessor :value
159
+
160
+ def initialize(**args)
161
+ update!(**args)
162
+ end
163
+
164
+ # Update properties of this object
165
+ def update!(**args)
166
+ @metric = args[:metric] if args.key?(:metric)
167
+ @value = args[:value] if args.key?(:value)
168
+ end
169
+ end
170
+
171
+ #
172
+ class GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec
173
+ include Google::Apis::Core::Hashable
174
+
175
+ # Must be specified if type is `CATEGORICAL`. The list of possible categories.
176
+ # Corresponds to the JSON property `values`
177
+ # @return [Array<String>]
178
+ attr_accessor :values
179
+
180
+ def initialize(**args)
181
+ update!(**args)
182
+ end
183
+
184
+ # Update properties of this object
185
+ def update!(**args)
186
+ @values = args[:values] if args.key?(:values)
187
+ end
188
+ end
189
+
190
+ #
191
+ class GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec
192
+ include Google::Apis::Core::Hashable
193
+
194
+ # Must be specified if type is `DISCRETE`. A list of feasible points. The list
195
+ # should be in strictly increasing order. For instance, this parameter might
196
+ # have possible settings of 1.5, 2.5, and 4.0. This list should not contain more
197
+ # than 1,000 values.
198
+ # Corresponds to the JSON property `values`
199
+ # @return [Array<Float>]
200
+ attr_accessor :values
201
+
202
+ def initialize(**args)
203
+ update!(**args)
204
+ end
205
+
206
+ # Update properties of this object
207
+ def update!(**args)
208
+ @values = args[:values] if args.key?(:values)
209
+ end
210
+ end
211
+
212
+ #
213
+ class GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec
214
+ include Google::Apis::Core::Hashable
215
+
216
+ # Must be specified if type is `DOUBLE`. Maximum value of the parameter.
217
+ # Corresponds to the JSON property `maxValue`
218
+ # @return [Float]
219
+ attr_accessor :max_value
220
+
221
+ # Must be specified if type is `DOUBLE`. Minimum value of the parameter.
222
+ # Corresponds to the JSON property `minValue`
223
+ # @return [Float]
224
+ attr_accessor :min_value
225
+
226
+ def initialize(**args)
227
+ update!(**args)
228
+ end
229
+
230
+ # Update properties of this object
231
+ def update!(**args)
232
+ @max_value = args[:max_value] if args.key?(:max_value)
233
+ @min_value = args[:min_value] if args.key?(:min_value)
234
+ end
235
+ end
236
+
237
+ #
238
+ class GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec
239
+ include Google::Apis::Core::Hashable
240
+
241
+ # Must be specified if type is `INTEGER`. Maximum value of the parameter.
242
+ # Corresponds to the JSON property `maxValue`
243
+ # @return [Fixnum]
244
+ attr_accessor :max_value
245
+
246
+ # Must be specified if type is `INTEGER`. Minimum value of the parameter.
247
+ # Corresponds to the JSON property `minValue`
248
+ # @return [Fixnum]
249
+ attr_accessor :min_value
250
+
251
+ def initialize(**args)
252
+ update!(**args)
253
+ end
254
+
255
+ # Update properties of this object
256
+ def update!(**args)
257
+ @max_value = args[:max_value] if args.key?(:max_value)
258
+ @min_value = args[:min_value] if args.key?(:min_value)
259
+ end
260
+ end
261
+
262
+ # Represents the spec to match categorical values from parent parameter.
263
+ class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec
264
+ include Google::Apis::Core::Hashable
265
+
266
+ # Matches values of the parent parameter with type 'CATEGORICAL'. All values
267
+ # must exist in `categorical_value_spec` of parent parameter.
268
+ # Corresponds to the JSON property `values`
269
+ # @return [Array<String>]
270
+ attr_accessor :values
271
+
272
+ def initialize(**args)
273
+ update!(**args)
274
+ end
275
+
276
+ # Update properties of this object
277
+ def update!(**args)
278
+ @values = args[:values] if args.key?(:values)
279
+ end
280
+ end
281
+
282
+ # Represents the spec to match discrete values from parent parameter.
283
+ class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec
284
+ include Google::Apis::Core::Hashable
285
+
286
+ # Matches values of the parent parameter with type 'DISCRETE'. All values must
287
+ # exist in `discrete_value_spec` of parent parameter.
288
+ # Corresponds to the JSON property `values`
289
+ # @return [Array<Float>]
290
+ attr_accessor :values
291
+
292
+ def initialize(**args)
293
+ update!(**args)
294
+ end
295
+
296
+ # Update properties of this object
297
+ def update!(**args)
298
+ @values = args[:values] if args.key?(:values)
299
+ end
300
+ end
301
+
302
+ # Represents the spec to match integer values from parent parameter.
303
+ class GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec
304
+ include Google::Apis::Core::Hashable
305
+
306
+ # Matches values of the parent parameter with type 'INTEGER'. All values must
307
+ # lie in `integer_value_spec` of parent parameter.
308
+ # Corresponds to the JSON property `values`
309
+ # @return [Array<Fixnum>]
310
+ attr_accessor :values
311
+
312
+ def initialize(**args)
313
+ update!(**args)
314
+ end
315
+
316
+ # Update properties of this object
317
+ def update!(**args)
318
+ @values = args[:values] if args.key?(:values)
319
+ end
320
+ end
321
+
322
+ # Represents a metric to optimize.
323
+ class GoogleCloudMlV1StudyConfigMetricSpec
324
+ include Google::Apis::Core::Hashable
325
+
326
+ # Required. The optimization goal of the metric.
327
+ # Corresponds to the JSON property `goal`
328
+ # @return [String]
329
+ attr_accessor :goal
330
+
331
+ # Required. The name of the metric.
332
+ # Corresponds to the JSON property `metric`
333
+ # @return [String]
334
+ attr_accessor :metric
335
+
336
+ def initialize(**args)
337
+ update!(**args)
338
+ end
339
+
340
+ # Update properties of this object
341
+ def update!(**args)
342
+ @goal = args[:goal] if args.key?(:goal)
343
+ @metric = args[:metric] if args.key?(:metric)
344
+ end
345
+ end
346
+
347
+ # Represents a single parameter to optimize.
348
+ class GoogleCloudMlV1StudyConfigParameterSpec
349
+ include Google::Apis::Core::Hashable
350
+
351
+ # The value spec for a 'CATEGORICAL' parameter.
352
+ # Corresponds to the JSON property `categoricalValueSpec`
353
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec]
354
+ attr_accessor :categorical_value_spec
355
+
356
+ # A child node is active if the parameter's value matches the child node's
357
+ # matching_parent_values. If two items in child_parameter_specs have the same
358
+ # name, they must have disjoint matching_parent_values.
359
+ # Corresponds to the JSON property `childParameterSpecs`
360
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpec>]
361
+ attr_accessor :child_parameter_specs
362
+
363
+ # The value spec for a 'DISCRETE' parameter.
364
+ # Corresponds to the JSON property `discreteValueSpec`
365
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec]
366
+ attr_accessor :discrete_value_spec
367
+
368
+ # The value spec for a 'DOUBLE' parameter.
369
+ # Corresponds to the JSON property `doubleValueSpec`
370
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec]
371
+ attr_accessor :double_value_spec
372
+
373
+ # The value spec for an 'INTEGER' parameter.
374
+ # Corresponds to the JSON property `integerValueSpec`
375
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec]
376
+ attr_accessor :integer_value_spec
377
+
378
+ # Required. The parameter name must be unique amongst all ParameterSpecs.
379
+ # Corresponds to the JSON property `parameter`
380
+ # @return [String]
381
+ attr_accessor :parameter
382
+
383
+ # Represents the spec to match categorical values from parent parameter.
384
+ # Corresponds to the JSON property `parentCategoricalValues`
385
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec]
386
+ attr_accessor :parent_categorical_values
387
+
388
+ # Represents the spec to match discrete values from parent parameter.
389
+ # Corresponds to the JSON property `parentDiscreteValues`
390
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec]
391
+ attr_accessor :parent_discrete_values
392
+
393
+ # Represents the spec to match integer values from parent parameter.
394
+ # Corresponds to the JSON property `parentIntValues`
395
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec]
396
+ attr_accessor :parent_int_values
397
+
398
+ # How the parameter should be scaled. Leave unset for categorical parameters.
399
+ # Corresponds to the JSON property `scaleType`
400
+ # @return [String]
401
+ attr_accessor :scale_type
402
+
403
+ # Required. The type of the parameter.
404
+ # Corresponds to the JSON property `type`
405
+ # @return [String]
406
+ attr_accessor :type
407
+
408
+ def initialize(**args)
409
+ update!(**args)
410
+ end
411
+
412
+ # Update properties of this object
413
+ def update!(**args)
414
+ @categorical_value_spec = args[:categorical_value_spec] if args.key?(:categorical_value_spec)
415
+ @child_parameter_specs = args[:child_parameter_specs] if args.key?(:child_parameter_specs)
416
+ @discrete_value_spec = args[:discrete_value_spec] if args.key?(:discrete_value_spec)
417
+ @double_value_spec = args[:double_value_spec] if args.key?(:double_value_spec)
418
+ @integer_value_spec = args[:integer_value_spec] if args.key?(:integer_value_spec)
419
+ @parameter = args[:parameter] if args.key?(:parameter)
420
+ @parent_categorical_values = args[:parent_categorical_values] if args.key?(:parent_categorical_values)
421
+ @parent_discrete_values = args[:parent_discrete_values] if args.key?(:parent_discrete_values)
422
+ @parent_int_values = args[:parent_int_values] if args.key?(:parent_int_values)
423
+ @scale_type = args[:scale_type] if args.key?(:scale_type)
424
+ @type = args[:type] if args.key?(:type)
425
+ end
426
+ end
427
+
428
+ # A message representing a parameter to be tuned. Contains the name of the
429
+ # parameter and the suggested value to use for this trial.
430
+ class GoogleCloudMlV1TrialParameter
431
+ include Google::Apis::Core::Hashable
432
+
433
+ # Must be set if ParameterType is DOUBLE or DISCRETE.
434
+ # Corresponds to the JSON property `floatValue`
435
+ # @return [Float]
436
+ attr_accessor :float_value
437
+
438
+ # Must be set if ParameterType is INTEGER
439
+ # Corresponds to the JSON property `intValue`
440
+ # @return [Fixnum]
441
+ attr_accessor :int_value
442
+
443
+ # The name of the parameter.
444
+ # Corresponds to the JSON property `parameter`
445
+ # @return [String]
446
+ attr_accessor :parameter
447
+
448
+ # Must be set if ParameterTypeis CATEGORICAL
449
+ # Corresponds to the JSON property `stringValue`
450
+ # @return [String]
451
+ attr_accessor :string_value
452
+
453
+ def initialize(**args)
454
+ update!(**args)
455
+ end
456
+
457
+ # Update properties of this object
458
+ def update!(**args)
459
+ @float_value = args[:float_value] if args.key?(:float_value)
460
+ @int_value = args[:int_value] if args.key?(:int_value)
461
+ @parameter = args[:parameter] if args.key?(:parameter)
462
+ @string_value = args[:string_value] if args.key?(:string_value)
463
+ end
464
+ end
465
+
466
+ # Represents a hardware accelerator request config. Note that the
467
+ # AcceleratorConfig can be used in both Jobs and Versions. Learn more about [
468
+ # accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for
469
+ # online prediction](/ml-engine/docs/machine-types-online-prediction#gpus).
470
+ class GoogleCloudMlV1AcceleratorConfig
471
+ include Google::Apis::Core::Hashable
472
+
473
+ # The number of accelerators to attach to each machine running the job.
474
+ # Corresponds to the JSON property `count`
475
+ # @return [Fixnum]
476
+ attr_accessor :count
477
+
478
+ # The type of accelerator to use.
479
+ # Corresponds to the JSON property `type`
480
+ # @return [String]
481
+ attr_accessor :type
482
+
483
+ def initialize(**args)
484
+ update!(**args)
485
+ end
486
+
487
+ # Update properties of this object
488
+ def update!(**args)
489
+ @count = args[:count] if args.key?(:count)
490
+ @type = args[:type] if args.key?(:type)
491
+ end
492
+ end
493
+
494
+ # The request message for the AddTrialMeasurement service method.
495
+ class GoogleCloudMlV1AddTrialMeasurementRequest
496
+ include Google::Apis::Core::Hashable
497
+
498
+ # A message representing a measurement.
499
+ # Corresponds to the JSON property `measurement`
500
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Measurement]
501
+ attr_accessor :measurement
502
+
503
+ def initialize(**args)
504
+ update!(**args)
505
+ end
506
+
507
+ # Update properties of this object
508
+ def update!(**args)
509
+ @measurement = args[:measurement] if args.key?(:measurement)
510
+ end
511
+ end
512
+
513
+ # Options for automatically scaling a model.
514
+ class GoogleCloudMlV1AutoScaling
515
+ include Google::Apis::Core::Hashable
516
+
517
+ # The maximum number of nodes to scale this model under load. The actual value
518
+ # will depend on resource quota and availability.
519
+ # Corresponds to the JSON property `maxNodes`
520
+ # @return [Fixnum]
521
+ attr_accessor :max_nodes
522
+
523
+ # MetricSpec contains the specifications to use to calculate the desired nodes
524
+ # count.
525
+ # Corresponds to the JSON property `metrics`
526
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1MetricSpec>]
527
+ attr_accessor :metrics
528
+
529
+ # Optional. The minimum number of nodes to allocate for this model. These nodes
530
+ # are always up, starting from the time the model is deployed. Therefore, the
531
+ # cost of operating this model will be at least `rate` * `min_nodes` * number of
532
+ # hours since last billing cycle, where `rate` is the cost per node-hour as
533
+ # documented in the [pricing guide](/ml-engine/docs/pricing), even if no
534
+ # predictions are performed. There is additional cost for each prediction
535
+ # performed. Unlike manual scaling, if the load gets too heavy for the nodes
536
+ # that are up, the service will automatically add nodes to handle the increased
537
+ # load as well as scale back as traffic drops, always maintaining at least `
538
+ # min_nodes`. You will be charged for the time in which additional nodes are
539
+ # used. If `min_nodes` is not specified and AutoScaling is used with a [legacy (
540
+ # MLS1) machine type](/ml-engine/docs/machine-types-online-prediction), `
541
+ # min_nodes` defaults to 0, in which case, when traffic to a model stops (and
542
+ # after a cool-down period), nodes will be shut down and no charges will be
543
+ # incurred until traffic to the model resumes. If `min_nodes` is not specified
544
+ # and AutoScaling is used with a [Compute Engine (N1) machine type](/ml-engine/
545
+ # docs/machine-types-online-prediction), `min_nodes` defaults to 1. `min_nodes`
546
+ # must be at least 1 for use with a Compute Engine machine type. Note that you
547
+ # cannot use AutoScaling if your version uses [GPUs](#Version.FIELDS.
548
+ # accelerator_config). Instead, you must use ManualScaling. You can set `
549
+ # min_nodes` when creating the model version, and you can also update `min_nodes`
550
+ # for an existing version: update_body.json: ` 'autoScaling': ` 'minNodes': 5 `
551
+ # ` HTTP request: PATCH https://ml.googleapis.com/v1/`name=projects/*/models/*/
552
+ # versions/*`?update_mask=autoScaling.minNodes -d @./update_body.json
553
+ # Corresponds to the JSON property `minNodes`
554
+ # @return [Fixnum]
555
+ attr_accessor :min_nodes
556
+
557
+ def initialize(**args)
558
+ update!(**args)
559
+ end
560
+
561
+ # Update properties of this object
562
+ def update!(**args)
563
+ @max_nodes = args[:max_nodes] if args.key?(:max_nodes)
564
+ @metrics = args[:metrics] if args.key?(:metrics)
565
+ @min_nodes = args[:min_nodes] if args.key?(:min_nodes)
566
+ end
567
+ end
568
+
569
+ # Configuration for Automated Early Stopping of Trials. If no
570
+ # implementation_config is set, automated early stopping will not be run.
571
+ class GoogleCloudMlV1AutomatedStoppingConfig
572
+ include Google::Apis::Core::Hashable
573
+
574
+ #
575
+ # Corresponds to the JSON property `decayCurveStoppingConfig`
576
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig]
577
+ attr_accessor :decay_curve_stopping_config
578
+
579
+ # The median automated stopping rule stops a pending trial if the trial's best
580
+ # objective_value is strictly below the median 'performance' of all completed
581
+ # trials reported up to the trial's last measurement. Currently, 'performance'
582
+ # refers to the running average of the objective values reported by the trial in
583
+ # each measurement.
584
+ # Corresponds to the JSON property `medianAutomatedStoppingConfig`
585
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig]
586
+ attr_accessor :median_automated_stopping_config
587
+
588
+ def initialize(**args)
589
+ update!(**args)
590
+ end
591
+
592
+ # Update properties of this object
593
+ def update!(**args)
594
+ @decay_curve_stopping_config = args[:decay_curve_stopping_config] if args.key?(:decay_curve_stopping_config)
595
+ @median_automated_stopping_config = args[:median_automated_stopping_config] if args.key?(:median_automated_stopping_config)
596
+ end
597
+ end
598
+
599
+ # Represents output related to a built-in algorithm Job.
600
+ class GoogleCloudMlV1BuiltInAlgorithmOutput
601
+ include Google::Apis::Core::Hashable
602
+
603
+ # Framework on which the built-in algorithm was trained.
604
+ # Corresponds to the JSON property `framework`
605
+ # @return [String]
606
+ attr_accessor :framework
607
+
608
+ # The Cloud Storage path to the `model/` directory where the training job saves
609
+ # the trained model. Only set for successful jobs that don't use hyperparameter
610
+ # tuning.
611
+ # Corresponds to the JSON property `modelPath`
612
+ # @return [String]
613
+ attr_accessor :model_path
614
+
615
+ # Python version on which the built-in algorithm was trained.
616
+ # Corresponds to the JSON property `pythonVersion`
617
+ # @return [String]
618
+ attr_accessor :python_version
619
+
620
+ # AI Platform runtime version on which the built-in algorithm was trained.
621
+ # Corresponds to the JSON property `runtimeVersion`
622
+ # @return [String]
623
+ attr_accessor :runtime_version
624
+
625
+ def initialize(**args)
626
+ update!(**args)
627
+ end
628
+
629
+ # Update properties of this object
630
+ def update!(**args)
631
+ @framework = args[:framework] if args.key?(:framework)
632
+ @model_path = args[:model_path] if args.key?(:model_path)
633
+ @python_version = args[:python_version] if args.key?(:python_version)
634
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
635
+ end
636
+ end
637
+
638
+ # Request message for the CancelJob method.
639
+ class GoogleCloudMlV1CancelJobRequest
640
+ include Google::Apis::Core::Hashable
641
+
642
+ def initialize(**args)
643
+ update!(**args)
644
+ end
645
+
646
+ # Update properties of this object
647
+ def update!(**args)
648
+ end
649
+ end
650
+
651
+ #
652
+ class GoogleCloudMlV1Capability
653
+ include Google::Apis::Core::Hashable
654
+
655
+ # Available accelerators for the capability.
656
+ # Corresponds to the JSON property `availableAccelerators`
657
+ # @return [Array<String>]
658
+ attr_accessor :available_accelerators
659
+
660
+ #
661
+ # Corresponds to the JSON property `type`
662
+ # @return [String]
663
+ attr_accessor :type
664
+
665
+ def initialize(**args)
666
+ update!(**args)
667
+ end
668
+
669
+ # Update properties of this object
670
+ def update!(**args)
671
+ @available_accelerators = args[:available_accelerators] if args.key?(:available_accelerators)
672
+ @type = args[:type] if args.key?(:type)
673
+ end
674
+ end
675
+
676
+ # This message will be placed in the metadata field of a google.longrunning.
677
+ # Operation associated with a CheckTrialEarlyStoppingState request.
678
+ class GoogleCloudMlV1CheckTrialEarlyStoppingStateMetatdata
679
+ include Google::Apis::Core::Hashable
680
+
681
+ # The time at which the operation was submitted.
682
+ # Corresponds to the JSON property `createTime`
683
+ # @return [String]
684
+ attr_accessor :create_time
685
+
686
+ # The name of the study that the trial belongs to.
687
+ # Corresponds to the JSON property `study`
688
+ # @return [String]
689
+ attr_accessor :study
690
+
691
+ # The trial name.
692
+ # Corresponds to the JSON property `trial`
693
+ # @return [String]
694
+ attr_accessor :trial
695
+
696
+ def initialize(**args)
697
+ update!(**args)
698
+ end
699
+
700
+ # Update properties of this object
701
+ def update!(**args)
702
+ @create_time = args[:create_time] if args.key?(:create_time)
703
+ @study = args[:study] if args.key?(:study)
704
+ @trial = args[:trial] if args.key?(:trial)
705
+ end
706
+ end
707
+
708
+ # The request message for the CheckTrialEarlyStoppingState service method.
709
+ class GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest
710
+ include Google::Apis::Core::Hashable
711
+
712
+ def initialize(**args)
713
+ update!(**args)
714
+ end
715
+
716
+ # Update properties of this object
717
+ def update!(**args)
718
+ end
719
+ end
720
+
721
+ # The message will be placed in the response field of a completed google.
722
+ # longrunning.Operation associated with a CheckTrialEarlyStoppingState request.
723
+ class GoogleCloudMlV1CheckTrialEarlyStoppingStateResponse
724
+ include Google::Apis::Core::Hashable
725
+
726
+ # The time at which operation processing completed.
727
+ # Corresponds to the JSON property `endTime`
728
+ # @return [String]
729
+ attr_accessor :end_time
730
+
731
+ # True if the Trial should stop.
732
+ # Corresponds to the JSON property `shouldStop`
733
+ # @return [Boolean]
734
+ attr_accessor :should_stop
735
+ alias_method :should_stop?, :should_stop
736
+
737
+ # The time at which the operation was started.
738
+ # Corresponds to the JSON property `startTime`
739
+ # @return [String]
740
+ attr_accessor :start_time
741
+
742
+ def initialize(**args)
743
+ update!(**args)
744
+ end
745
+
746
+ # Update properties of this object
747
+ def update!(**args)
748
+ @end_time = args[:end_time] if args.key?(:end_time)
749
+ @should_stop = args[:should_stop] if args.key?(:should_stop)
750
+ @start_time = args[:start_time] if args.key?(:start_time)
751
+ end
752
+ end
753
+
754
+ # The request message for the CompleteTrial service method.
755
+ class GoogleCloudMlV1CompleteTrialRequest
756
+ include Google::Apis::Core::Hashable
757
+
758
+ # A message representing a measurement.
759
+ # Corresponds to the JSON property `finalMeasurement`
760
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Measurement]
761
+ attr_accessor :final_measurement
762
+
763
+ # Optional. A human readable reason why the trial was infeasible. This should
764
+ # only be provided if `trial_infeasible` is true.
765
+ # Corresponds to the JSON property `infeasibleReason`
766
+ # @return [String]
767
+ attr_accessor :infeasible_reason
768
+
769
+ # Optional. True if the trial cannot be run with the given Parameter, and
770
+ # final_measurement will be ignored.
771
+ # Corresponds to the JSON property `trialInfeasible`
772
+ # @return [Boolean]
773
+ attr_accessor :trial_infeasible
774
+ alias_method :trial_infeasible?, :trial_infeasible
775
+
776
+ def initialize(**args)
777
+ update!(**args)
778
+ end
779
+
780
+ # Update properties of this object
781
+ def update!(**args)
782
+ @final_measurement = args[:final_measurement] if args.key?(:final_measurement)
783
+ @infeasible_reason = args[:infeasible_reason] if args.key?(:infeasible_reason)
784
+ @trial_infeasible = args[:trial_infeasible] if args.key?(:trial_infeasible)
785
+ end
786
+ end
787
+
788
+ #
789
+ class GoogleCloudMlV1Config
790
+ include Google::Apis::Core::Hashable
791
+
792
+ # The service account Cloud ML uses to run on TPU node.
793
+ # Corresponds to the JSON property `tpuServiceAccount`
794
+ # @return [String]
795
+ attr_accessor :tpu_service_account
796
+
797
+ def initialize(**args)
798
+ update!(**args)
799
+ end
800
+
801
+ # Update properties of this object
802
+ def update!(**args)
803
+ @tpu_service_account = args[:tpu_service_account] if args.key?(:tpu_service_account)
804
+ end
805
+ end
806
+
807
+ # Represents a network port in a single container. This message is a subset of
808
+ # the [Kubernetes ContainerPort v1 core specification](https://kubernetes.io/
809
+ # docs/reference/generated/kubernetes-api/v1.18/#containerport-v1-core).
810
+ class GoogleCloudMlV1ContainerPort
811
+ include Google::Apis::Core::Hashable
812
+
813
+ # Number of the port to expose on the container. This must be a valid port
814
+ # number: 0 < PORT_NUMBER < 65536.
815
+ # Corresponds to the JSON property `containerPort`
816
+ # @return [Fixnum]
817
+ attr_accessor :container_port
818
+
819
+ def initialize(**args)
820
+ update!(**args)
821
+ end
822
+
823
+ # Update properties of this object
824
+ def update!(**args)
825
+ @container_port = args[:container_port] if args.key?(:container_port)
826
+ end
827
+ end
828
+
829
+ # Specification of a custom container for serving predictions. This message is a
830
+ # subset of the [Kubernetes Container v1 core specification](https://kubernetes.
831
+ # io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).
832
+ class GoogleCloudMlV1ContainerSpec
833
+ include Google::Apis::Core::Hashable
834
+
835
+ # Immutable. Specifies arguments for the command that runs when the container
836
+ # starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/
837
+ # reference/builder/#cmd). Specify this field as an array of executable and
838
+ # arguments, similar to a Docker `CMD`'s "default parameters" form. If you don't
839
+ # specify this field but do specify the command field, then the command from the
840
+ # `command` field runs without any additional arguments. See the [Kubernetes
841
+ # documentation about how the `command` and `args` fields interact with a
842
+ # container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-
843
+ # data-application/define-command-argument-container/#notes). If you don't
844
+ # specify this field and don't specify the `commmand` field, then the container'
845
+ # s [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `
846
+ # CMD` determine what runs based on their default behavior. See the [Docker
847
+ # documentation about how `CMD` and `ENTRYPOINT` interact](https://docs.docker.
848
+ # com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In
849
+ # this field, you can reference [environment variables set by AI Platform
850
+ # Prediction](/ai-platform/prediction/docs/custom-container-requirements#aip-
851
+ # variables) and environment variables set in the env field. You cannot
852
+ # reference environment variables set in the Docker image. In order for
853
+ # environment variables to be expanded, reference them by using the following
854
+ # syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion,
855
+ # which does not use parentheses. If a variable cannot be resolved, the
856
+ # reference in the input string is used unchanged. To avoid variable expansion,
857
+ # you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This
858
+ # field corresponds to the `args` field of the [Kubernetes Containers v1 core
859
+ # API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#
860
+ # container-v1-core).
861
+ # Corresponds to the JSON property `args`
862
+ # @return [Array<String>]
863
+ attr_accessor :args
864
+
865
+ # Immutable. Specifies the command that runs when the container starts. This
866
+ # overrides the container's [`ENTRYPOINT`](https://docs.docker.com/engine/
867
+ # reference/builder/#entrypoint). Specify this field as an array of executable
868
+ # and arguments, similar to a Docker `ENTRYPOINT`'s "exec" form, not its "shell"
869
+ # form. If you do not specify this field, then the container's `ENTRYPOINT` runs,
870
+ # in conjunction with the args field or the container's [`CMD`](https://docs.
871
+ # docker.com/engine/reference/builder/#cmd), if either exists. If this field is
872
+ # not specified and the container does not have an `ENTRYPOINT`, then refer to
873
+ # the [Docker documentation about how `CMD` and `ENTRYPOINT` interact](https://
874
+ # docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-
875
+ # interact). If you specify this field, then you can also specify the `args`
876
+ # field to provide additional arguments for this command. However, if you
877
+ # specify this field, then the container's `CMD` is ignored. See the [Kubernetes
878
+ # documentation about how the `command` and `args` fields interact with a
879
+ # container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-
880
+ # data-application/define-command-argument-container/#notes). In this field, you
881
+ # can reference [environment variables set by AI Platform Prediction](/ai-
882
+ # platform/prediction/docs/custom-container-requirements#aip-variables) and
883
+ # environment variables set in the env field. You cannot reference environment
884
+ # variables set in the Docker image. In order for environment variables to be
885
+ # expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note
886
+ # that this differs from Bash variable expansion, which does not use parentheses.
887
+ # If a variable cannot be resolved, the reference in the input string is used
888
+ # unchanged. To avoid variable expansion, you can escape this syntax with `$$`;
889
+ # for example: $$(VARIABLE_NAME) This field corresponds to the `command` field
890
+ # of the [Kubernetes Containers v1 core API](https://kubernetes.io/docs/
891
+ # reference/generated/kubernetes-api/v1.18/#container-v1-core).
892
+ # Corresponds to the JSON property `command`
893
+ # @return [Array<String>]
894
+ attr_accessor :command
895
+
896
+ # Immutable. List of environment variables to set in the container. After the
897
+ # container starts running, code running in the container can read these
898
+ # environment variables. Additionally, the command and args fields can reference
899
+ # these variables. Later entries in this list can also reference earlier entries.
900
+ # For example, the following example sets the variable `VAR_2` to have the
901
+ # value `foo bar`: ```json [ ` "name": "VAR_1", "value": "foo" `, ` "name": "
902
+ # VAR_2", "value": "$(VAR_1) bar" ` ] ``` If you switch the order of the
903
+ # variables in the example, then the expansion does not occur. This field
904
+ # corresponds to the `env` field of the [Kubernetes Containers v1 core API](
905
+ # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-
906
+ # v1-core).
907
+ # Corresponds to the JSON property `env`
908
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1EnvVar>]
909
+ attr_accessor :env
910
+
911
+ # URI of the Docker image to be used as the custom container for serving
912
+ # predictions. This URI must identify [an image in Artifact Registry](/artifact-
913
+ # registry/docs/overview) and begin with the hostname ``REGION`-docker.pkg.dev`,
914
+ # where ``REGION`` is replaced by the region that matches AI Platform Prediction
915
+ # [regional endpoint](/ai-platform/prediction/docs/regional-endpoints) that you
916
+ # are using. For example, if you are using the `us-central1-ml.googleapis.com`
917
+ # endpoint, then this URI must begin with `us-central1-docker.pkg.dev`. To use a
918
+ # custom container, the [AI Platform Google-managed service account](/ai-
919
+ # platform/prediction/docs/custom-service-account#default) must have permission
920
+ # to pull (read) the Docker image at this URI. The AI Platform Google-managed
921
+ # service account has the following format: `service-`PROJECT_NUMBER`@cloud-ml.
922
+ # google.com.iam.gserviceaccount.com` `PROJECT_NUMBER` is replaced by your
923
+ # Google Cloud project number. By default, this service account has necessary
924
+ # permissions to pull an Artifact Registry image in the same Google Cloud
925
+ # project where you are using AI Platform Prediction. In this case, no
926
+ # configuration is necessary. If you want to use an image from a different
927
+ # Google Cloud project, learn how to [grant the Artifact Registry Reader (roles/
928
+ # artifactregistry.reader) role for a repository](/artifact-registry/docs/access-
929
+ # control#grant-repo) to your projet's AI Platform Google-managed service
930
+ # account. To learn about the requirements for the Docker image itself, read [
931
+ # Custom container requirements](/ai-platform/prediction/docs/custom-container-
932
+ # requirements).
933
+ # Corresponds to the JSON property `image`
934
+ # @return [String]
935
+ attr_accessor :image
936
+
937
+ # Immutable. List of ports to expose from the container. AI Platform Prediction
938
+ # sends any prediction requests that it receives to the first port on this list.
939
+ # AI Platform Prediction also sends [liveness and health checks](/ai-platform/
940
+ # prediction/docs/custom-container-requirements#health) to this port. If you do
941
+ # not specify this field, it defaults to following value: ```json [ ` "
942
+ # containerPort": 8080 ` ] ``` AI Platform Prediction does not use ports other
943
+ # than the first one listed. This field corresponds to the `ports` field of the [
944
+ # Kubernetes Containers v1 core API](https://kubernetes.io/docs/reference/
945
+ # generated/kubernetes-api/v1.18/#container-v1-core).
946
+ # Corresponds to the JSON property `ports`
947
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1ContainerPort>]
948
+ attr_accessor :ports
949
+
950
+ def initialize(**args)
951
+ update!(**args)
952
+ end
953
+
954
+ # Update properties of this object
955
+ def update!(**args)
956
+ @args = args[:args] if args.key?(:args)
957
+ @command = args[:command] if args.key?(:command)
958
+ @env = args[:env] if args.key?(:env)
959
+ @image = args[:image] if args.key?(:image)
960
+ @ports = args[:ports] if args.key?(:ports)
961
+ end
962
+ end
963
+
964
+ # Represents the config of disk options.
965
+ class GoogleCloudMlV1DiskConfig
966
+ include Google::Apis::Core::Hashable
967
+
968
+ # Size in GB of the boot disk (default is 100GB).
969
+ # Corresponds to the JSON property `bootDiskSizeGb`
970
+ # @return [Fixnum]
971
+ attr_accessor :boot_disk_size_gb
972
+
973
+ # Type of the boot disk (default is "pd-standard"). Valid values: "pd-ssd" (
974
+ # Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk
975
+ # Drive).
976
+ # Corresponds to the JSON property `bootDiskType`
977
+ # @return [String]
978
+ attr_accessor :boot_disk_type
979
+
980
+ def initialize(**args)
981
+ update!(**args)
982
+ end
983
+
984
+ # Update properties of this object
985
+ def update!(**args)
986
+ @boot_disk_size_gb = args[:boot_disk_size_gb] if args.key?(:boot_disk_size_gb)
987
+ @boot_disk_type = args[:boot_disk_type] if args.key?(:boot_disk_type)
988
+ end
989
+ end
990
+
991
+ # Represents a custom encryption key configuration that can be applied to a
992
+ # resource.
993
+ class GoogleCloudMlV1EncryptionConfig
994
+ include Google::Apis::Core::Hashable
995
+
996
+ # The Cloud KMS resource identifier of the customer-managed encryption key used
997
+ # to protect a resource, such as a training job. It has the following format: `
998
+ # projects/`PROJECT_ID`/locations/`REGION`/keyRings/`KEY_RING_NAME`/cryptoKeys/`
999
+ # KEY_NAME``
1000
+ # Corresponds to the JSON property `kmsKeyName`
1001
+ # @return [String]
1002
+ attr_accessor :kms_key_name
1003
+
1004
+ def initialize(**args)
1005
+ update!(**args)
1006
+ end
1007
+
1008
+ # Update properties of this object
1009
+ def update!(**args)
1010
+ @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
1011
+ end
1012
+ end
1013
+
1014
+ # Represents an environment variable to be made available in a container. This
1015
+ # message is a subset of the [Kubernetes EnvVar v1 core specification](https://
1016
+ # kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envvar-v1-core).
1017
+ class GoogleCloudMlV1EnvVar
1018
+ include Google::Apis::Core::Hashable
1019
+
1020
+ # Name of the environment variable. Must be a [valid C identifier](https://
1021
+ # github.com/kubernetes/kubernetes/blob/v1.18.8/staging/src/k8s.io/apimachinery/
1022
+ # pkg/util/validation/validation.go#L258) and must not begin with the prefix `
1023
+ # AIP_`.
1024
+ # Corresponds to the JSON property `name`
1025
+ # @return [String]
1026
+ attr_accessor :name
1027
+
1028
+ # Value of the environment variable. Defaults to an empty string. In this field,
1029
+ # you can reference [environment variables set by AI Platform Prediction](/ai-
1030
+ # platform/prediction/docs/custom-container-requirements#aip-variables) and
1031
+ # environment variables set earlier in the same env field as where this message
1032
+ # occurs. You cannot reference environment variables set in the Docker image. In
1033
+ # order for environment variables to be expanded, reference them by using the
1034
+ # following syntax: $(VARIABLE_NAME) Note that this differs from Bash variable
1035
+ # expansion, which does not use parentheses. If a variable cannot be resolved,
1036
+ # the reference in the input string is used unchanged. To avoid variable
1037
+ # expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME)
1038
+ # Corresponds to the JSON property `value`
1039
+ # @return [String]
1040
+ attr_accessor :value
1041
+
1042
+ def initialize(**args)
1043
+ update!(**args)
1044
+ end
1045
+
1046
+ # Update properties of this object
1047
+ def update!(**args)
1048
+ @name = args[:name] if args.key?(:name)
1049
+ @value = args[:value] if args.key?(:value)
1050
+ end
1051
+ end
1052
+
1053
+ # Request for explanations to be issued against a trained model.
1054
+ class GoogleCloudMlV1ExplainRequest
1055
+ include Google::Apis::Core::Hashable
1056
+
1057
+ # Message that represents an arbitrary HTTP body. It should only be used for
1058
+ # payload formats that can't be represented as JSON, such as raw binary or an
1059
+ # HTML page. This message can be used both in streaming and non-streaming API
1060
+ # methods in the request as well as the response. It can be used as a top-level
1061
+ # request field, which is convenient if one wants to extract parameters from
1062
+ # either the URL or HTTP template into the request fields and also want access
1063
+ # to the raw HTTP body. Example: message GetResourceRequest ` // A unique
1064
+ # request id. string request_id = 1; // The raw HTTP body is bound to this field.
1065
+ # google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
1066
+ # GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
1067
+ # UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
1068
+ # with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
1069
+ # api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
1070
+ # google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
1071
+ # only changes how the request and response bodies are handled, all other
1072
+ # features will continue to work unchanged.
1073
+ # Corresponds to the JSON property `httpBody`
1074
+ # @return [Google::Apis::MlV1::GoogleApiHttpBody]
1075
+ attr_accessor :http_body
1076
+
1077
+ def initialize(**args)
1078
+ update!(**args)
1079
+ end
1080
+
1081
+ # Update properties of this object
1082
+ def update!(**args)
1083
+ @http_body = args[:http_body] if args.key?(:http_body)
1084
+ end
1085
+ end
1086
+
1087
+ # Message holding configuration options for explaining model predictions. There
1088
+ # are three feature attribution methods supported for TensorFlow models:
1089
+ # integrated gradients, sampled Shapley, and XRAI. [Learn more about feature
1090
+ # attributions.](/ai-platform/prediction/docs/ai-explanations/overview)
1091
+ class GoogleCloudMlV1ExplanationConfig
1092
+ include Google::Apis::Core::Hashable
1093
+
1094
+ # Attributes credit by computing the Aumann-Shapley value taking advantage of
1095
+ # the model's fully differentiable structure. Refer to this paper for more
1096
+ # details: https://arxiv.org/abs/1703.01365
1097
+ # Corresponds to the JSON property `integratedGradientsAttribution`
1098
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1IntegratedGradientsAttribution]
1099
+ attr_accessor :integrated_gradients_attribution
1100
+
1101
+ # An attribution method that approximates Shapley values for features that
1102
+ # contribute to the label being predicted. A sampling strategy is used to
1103
+ # approximate the value rather than considering all subsets of features.
1104
+ # Corresponds to the JSON property `sampledShapleyAttribution`
1105
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution]
1106
+ attr_accessor :sampled_shapley_attribution
1107
+
1108
+ # Attributes credit by computing the XRAI taking advantage of the model's fully
1109
+ # differentiable structure. Refer to this paper for more details: https://arxiv.
1110
+ # org/abs/1906.02825 Currently only implemented for models with natural image
1111
+ # inputs.
1112
+ # Corresponds to the JSON property `xraiAttribution`
1113
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1XraiAttribution]
1114
+ attr_accessor :xrai_attribution
1115
+
1116
+ def initialize(**args)
1117
+ update!(**args)
1118
+ end
1119
+
1120
+ # Update properties of this object
1121
+ def update!(**args)
1122
+ @integrated_gradients_attribution = args[:integrated_gradients_attribution] if args.key?(:integrated_gradients_attribution)
1123
+ @sampled_shapley_attribution = args[:sampled_shapley_attribution] if args.key?(:sampled_shapley_attribution)
1124
+ @xrai_attribution = args[:xrai_attribution] if args.key?(:xrai_attribution)
1125
+ end
1126
+ end
1127
+
1128
+ # Returns service account information associated with a project.
1129
+ class GoogleCloudMlV1GetConfigResponse
1130
+ include Google::Apis::Core::Hashable
1131
+
1132
+ #
1133
+ # Corresponds to the JSON property `config`
1134
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Config]
1135
+ attr_accessor :config
1136
+
1137
+ # The service account Cloud ML uses to access resources in the project.
1138
+ # Corresponds to the JSON property `serviceAccount`
1139
+ # @return [String]
1140
+ attr_accessor :service_account
1141
+
1142
+ # The project number for `service_account`.
1143
+ # Corresponds to the JSON property `serviceAccountProject`
1144
+ # @return [Fixnum]
1145
+ attr_accessor :service_account_project
1146
+
1147
+ def initialize(**args)
1148
+ update!(**args)
1149
+ end
1150
+
1151
+ # Update properties of this object
1152
+ def update!(**args)
1153
+ @config = args[:config] if args.key?(:config)
1154
+ @service_account = args[:service_account] if args.key?(:service_account)
1155
+ @service_account_project = args[:service_account_project] if args.key?(:service_account_project)
1156
+ end
1157
+ end
1158
+
1159
+ # Represents the result of a single hyperparameter tuning trial from a training
1160
+ # job. The TrainingOutput object that is returned on successful completion of a
1161
+ # training job with hyperparameter tuning includes a list of
1162
+ # HyperparameterOutput objects, one for each successful trial.
1163
+ class GoogleCloudMlV1HyperparameterOutput
1164
+ include Google::Apis::Core::Hashable
1165
+
1166
+ # All recorded object metrics for this trial. This field is not currently
1167
+ # populated.
1168
+ # Corresponds to the JSON property `allMetrics`
1169
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutputHyperparameterMetric>]
1170
+ attr_accessor :all_metrics
1171
+
1172
+ # Represents output related to a built-in algorithm Job.
1173
+ # Corresponds to the JSON property `builtInAlgorithmOutput`
1174
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1BuiltInAlgorithmOutput]
1175
+ attr_accessor :built_in_algorithm_output
1176
+
1177
+ # Output only. End time for the trial.
1178
+ # Corresponds to the JSON property `endTime`
1179
+ # @return [String]
1180
+ attr_accessor :end_time
1181
+
1182
+ # An observed value of a metric.
1183
+ # Corresponds to the JSON property `finalMetric`
1184
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutputHyperparameterMetric]
1185
+ attr_accessor :final_metric
1186
+
1187
+ # The hyperparameters given to this trial.
1188
+ # Corresponds to the JSON property `hyperparameters`
1189
+ # @return [Hash<String,String>]
1190
+ attr_accessor :hyperparameters
1191
+
1192
+ # True if the trial is stopped early.
1193
+ # Corresponds to the JSON property `isTrialStoppedEarly`
1194
+ # @return [Boolean]
1195
+ attr_accessor :is_trial_stopped_early
1196
+ alias_method :is_trial_stopped_early?, :is_trial_stopped_early
1197
+
1198
+ # Output only. Start time for the trial.
1199
+ # Corresponds to the JSON property `startTime`
1200
+ # @return [String]
1201
+ attr_accessor :start_time
1202
+
1203
+ # Output only. The detailed state of the trial.
1204
+ # Corresponds to the JSON property `state`
1205
+ # @return [String]
1206
+ attr_accessor :state
1207
+
1208
+ # The trial id for these results.
1209
+ # Corresponds to the JSON property `trialId`
1210
+ # @return [String]
1211
+ attr_accessor :trial_id
1212
+
1213
+ def initialize(**args)
1214
+ update!(**args)
1215
+ end
1216
+
1217
+ # Update properties of this object
1218
+ def update!(**args)
1219
+ @all_metrics = args[:all_metrics] if args.key?(:all_metrics)
1220
+ @built_in_algorithm_output = args[:built_in_algorithm_output] if args.key?(:built_in_algorithm_output)
1221
+ @end_time = args[:end_time] if args.key?(:end_time)
1222
+ @final_metric = args[:final_metric] if args.key?(:final_metric)
1223
+ @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters)
1224
+ @is_trial_stopped_early = args[:is_trial_stopped_early] if args.key?(:is_trial_stopped_early)
1225
+ @start_time = args[:start_time] if args.key?(:start_time)
1226
+ @state = args[:state] if args.key?(:state)
1227
+ @trial_id = args[:trial_id] if args.key?(:trial_id)
1228
+ end
1229
+ end
1230
+
1231
+ # Represents a set of hyperparameters to optimize.
1232
+ class GoogleCloudMlV1HyperparameterSpec
1233
+ include Google::Apis::Core::Hashable
1234
+
1235
+ # Optional. The search algorithm specified for the hyperparameter tuning job.
1236
+ # Uses the default AI Platform hyperparameter tuning algorithm if unspecified.
1237
+ # Corresponds to the JSON property `algorithm`
1238
+ # @return [String]
1239
+ attr_accessor :algorithm
1240
+
1241
+ # Optional. Indicates if the hyperparameter tuning job enables auto trial early
1242
+ # stopping.
1243
+ # Corresponds to the JSON property `enableTrialEarlyStopping`
1244
+ # @return [Boolean]
1245
+ attr_accessor :enable_trial_early_stopping
1246
+ alias_method :enable_trial_early_stopping?, :enable_trial_early_stopping
1247
+
1248
+ # Required. The type of goal to use for tuning. Available types are `MAXIMIZE`
1249
+ # and `MINIMIZE`. Defaults to `MAXIMIZE`.
1250
+ # Corresponds to the JSON property `goal`
1251
+ # @return [String]
1252
+ attr_accessor :goal
1253
+
1254
+ # Optional. The TensorFlow summary tag name to use for optimizing trials. For
1255
+ # current versions of TensorFlow, this tag name should exactly match what is
1256
+ # shown in TensorBoard, including all scopes. For versions of TensorFlow prior
1257
+ # to 0.12, this should be only the tag passed to tf.Summary. By default, "
1258
+ # training/hptuning/metric" will be used.
1259
+ # Corresponds to the JSON property `hyperparameterMetricTag`
1260
+ # @return [String]
1261
+ attr_accessor :hyperparameter_metric_tag
1262
+
1263
+ # Optional. The number of failed trials that need to be seen before failing the
1264
+ # hyperparameter tuning job. You can specify this field to override the default
1265
+ # failing criteria for AI Platform hyperparameter tuning jobs. Defaults to zero,
1266
+ # which means the service decides when a hyperparameter job should fail.
1267
+ # Corresponds to the JSON property `maxFailedTrials`
1268
+ # @return [Fixnum]
1269
+ attr_accessor :max_failed_trials
1270
+
1271
+ # Optional. The number of training trials to run concurrently. You can reduce
1272
+ # the time it takes to perform hyperparameter tuning by adding trials in
1273
+ # parallel. However, each trail only benefits from the information gained in
1274
+ # completed trials. That means that a trial does not get access to the results
1275
+ # of trials running at the same time, which could reduce the quality of the
1276
+ # overall optimization. Each trial will use the same scale tier and machine
1277
+ # types. Defaults to one.
1278
+ # Corresponds to the JSON property `maxParallelTrials`
1279
+ # @return [Fixnum]
1280
+ attr_accessor :max_parallel_trials
1281
+
1282
+ # Optional. How many training trials should be attempted to optimize the
1283
+ # specified hyperparameters. Defaults to one.
1284
+ # Corresponds to the JSON property `maxTrials`
1285
+ # @return [Fixnum]
1286
+ attr_accessor :max_trials
1287
+
1288
+ # Required. The set of parameters to tune.
1289
+ # Corresponds to the JSON property `params`
1290
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec>]
1291
+ attr_accessor :params
1292
+
1293
+ # Optional. The prior hyperparameter tuning job id that users hope to continue
1294
+ # with. The job id will be used to find the corresponding vizier study guid and
1295
+ # resume the study.
1296
+ # Corresponds to the JSON property `resumePreviousJobId`
1297
+ # @return [String]
1298
+ attr_accessor :resume_previous_job_id
1299
+
1300
+ def initialize(**args)
1301
+ update!(**args)
1302
+ end
1303
+
1304
+ # Update properties of this object
1305
+ def update!(**args)
1306
+ @algorithm = args[:algorithm] if args.key?(:algorithm)
1307
+ @enable_trial_early_stopping = args[:enable_trial_early_stopping] if args.key?(:enable_trial_early_stopping)
1308
+ @goal = args[:goal] if args.key?(:goal)
1309
+ @hyperparameter_metric_tag = args[:hyperparameter_metric_tag] if args.key?(:hyperparameter_metric_tag)
1310
+ @max_failed_trials = args[:max_failed_trials] if args.key?(:max_failed_trials)
1311
+ @max_parallel_trials = args[:max_parallel_trials] if args.key?(:max_parallel_trials)
1312
+ @max_trials = args[:max_trials] if args.key?(:max_trials)
1313
+ @params = args[:params] if args.key?(:params)
1314
+ @resume_previous_job_id = args[:resume_previous_job_id] if args.key?(:resume_previous_job_id)
1315
+ end
1316
+ end
1317
+
1318
+ # Attributes credit by computing the Aumann-Shapley value taking advantage of
1319
+ # the model's fully differentiable structure. Refer to this paper for more
1320
+ # details: https://arxiv.org/abs/1703.01365
1321
+ class GoogleCloudMlV1IntegratedGradientsAttribution
1322
+ include Google::Apis::Core::Hashable
1323
+
1324
+ # Number of steps for approximating the path integral. A good value to start is
1325
+ # 50 and gradually increase until the sum to diff property is met within the
1326
+ # desired error range.
1327
+ # Corresponds to the JSON property `numIntegralSteps`
1328
+ # @return [Fixnum]
1329
+ attr_accessor :num_integral_steps
1330
+
1331
+ def initialize(**args)
1332
+ update!(**args)
1333
+ end
1334
+
1335
+ # Update properties of this object
1336
+ def update!(**args)
1337
+ @num_integral_steps = args[:num_integral_steps] if args.key?(:num_integral_steps)
1338
+ end
1339
+ end
1340
+
1341
+ # Represents a training or prediction job.
1342
+ class GoogleCloudMlV1Job
1343
+ include Google::Apis::Core::Hashable
1344
+
1345
+ # Output only. When the job was created.
1346
+ # Corresponds to the JSON property `createTime`
1347
+ # @return [String]
1348
+ attr_accessor :create_time
1349
+
1350
+ # Output only. When the job processing was completed.
1351
+ # Corresponds to the JSON property `endTime`
1352
+ # @return [String]
1353
+ attr_accessor :end_time
1354
+
1355
+ # Output only. The details of a failure or a cancellation.
1356
+ # Corresponds to the JSON property `errorMessage`
1357
+ # @return [String]
1358
+ attr_accessor :error_message
1359
+
1360
+ # `etag` is used for optimistic concurrency control as a way to help prevent
1361
+ # simultaneous updates of a job from overwriting each other. It is strongly
1362
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
1363
+ # to perform job updates in order to avoid race conditions: An `etag` is
1364
+ # returned in the response to `GetJob`, and systems are expected to put that
1365
+ # etag in the request to `UpdateJob` to ensure that their change will be applied
1366
+ # to the same version of the job.
1367
+ # Corresponds to the JSON property `etag`
1368
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1369
+ # @return [String]
1370
+ attr_accessor :etag
1371
+
1372
+ # Required. The user-specified id of the job.
1373
+ # Corresponds to the JSON property `jobId`
1374
+ # @return [String]
1375
+ attr_accessor :job_id
1376
+
1377
+ # Optional. One or more labels that you can add, to organize your jobs. Each
1378
+ # label is a key-value pair, where both the key and the value are arbitrary
1379
+ # strings that you supply. For more information, see the documentation on using
1380
+ # labels.
1381
+ # Corresponds to the JSON property `labels`
1382
+ # @return [Hash<String,String>]
1383
+ attr_accessor :labels
1384
+
1385
+ # Represents input parameters for a prediction job.
1386
+ # Corresponds to the JSON property `predictionInput`
1387
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1PredictionInput]
1388
+ attr_accessor :prediction_input
1389
+
1390
+ # Represents results of a prediction job.
1391
+ # Corresponds to the JSON property `predictionOutput`
1392
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput]
1393
+ attr_accessor :prediction_output
1394
+
1395
+ # Output only. When the job processing was started.
1396
+ # Corresponds to the JSON property `startTime`
1397
+ # @return [String]
1398
+ attr_accessor :start_time
1399
+
1400
+ # Output only. The detailed state of a job.
1401
+ # Corresponds to the JSON property `state`
1402
+ # @return [String]
1403
+ attr_accessor :state
1404
+
1405
+ # Represents input parameters for a training job. When using the gcloud command
1406
+ # to submit your training job, you can specify the input parameters as command-
1407
+ # line arguments and/or in a YAML configuration file referenced from the --
1408
+ # config command-line argument. For details, see the guide to [submitting a
1409
+ # training job](/ai-platform/training/docs/training-jobs).
1410
+ # Corresponds to the JSON property `trainingInput`
1411
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1TrainingInput]
1412
+ attr_accessor :training_input
1413
+
1414
+ # Represents results of a training job. Output only.
1415
+ # Corresponds to the JSON property `trainingOutput`
1416
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1TrainingOutput]
1417
+ attr_accessor :training_output
1418
+
1419
+ def initialize(**args)
1420
+ update!(**args)
1421
+ end
1422
+
1423
+ # Update properties of this object
1424
+ def update!(**args)
1425
+ @create_time = args[:create_time] if args.key?(:create_time)
1426
+ @end_time = args[:end_time] if args.key?(:end_time)
1427
+ @error_message = args[:error_message] if args.key?(:error_message)
1428
+ @etag = args[:etag] if args.key?(:etag)
1429
+ @job_id = args[:job_id] if args.key?(:job_id)
1430
+ @labels = args[:labels] if args.key?(:labels)
1431
+ @prediction_input = args[:prediction_input] if args.key?(:prediction_input)
1432
+ @prediction_output = args[:prediction_output] if args.key?(:prediction_output)
1433
+ @start_time = args[:start_time] if args.key?(:start_time)
1434
+ @state = args[:state] if args.key?(:state)
1435
+ @training_input = args[:training_input] if args.key?(:training_input)
1436
+ @training_output = args[:training_output] if args.key?(:training_output)
1437
+ end
1438
+ end
1439
+
1440
+ # Response message for the ListJobs method.
1441
+ class GoogleCloudMlV1ListJobsResponse
1442
+ include Google::Apis::Core::Hashable
1443
+
1444
+ # The list of jobs.
1445
+ # Corresponds to the JSON property `jobs`
1446
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Job>]
1447
+ attr_accessor :jobs
1448
+
1449
+ # Optional. Pass this token as the `page_token` field of the request for a
1450
+ # subsequent call.
1451
+ # Corresponds to the JSON property `nextPageToken`
1452
+ # @return [String]
1453
+ attr_accessor :next_page_token
1454
+
1455
+ def initialize(**args)
1456
+ update!(**args)
1457
+ end
1458
+
1459
+ # Update properties of this object
1460
+ def update!(**args)
1461
+ @jobs = args[:jobs] if args.key?(:jobs)
1462
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1463
+ end
1464
+ end
1465
+
1466
+ #
1467
+ class GoogleCloudMlV1ListLocationsResponse
1468
+ include Google::Apis::Core::Hashable
1469
+
1470
+ # Locations where at least one type of CMLE capability is available.
1471
+ # Corresponds to the JSON property `locations`
1472
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Location>]
1473
+ attr_accessor :locations
1474
+
1475
+ # Optional. Pass this token as the `page_token` field of the request for a
1476
+ # subsequent call.
1477
+ # Corresponds to the JSON property `nextPageToken`
1478
+ # @return [String]
1479
+ attr_accessor :next_page_token
1480
+
1481
+ def initialize(**args)
1482
+ update!(**args)
1483
+ end
1484
+
1485
+ # Update properties of this object
1486
+ def update!(**args)
1487
+ @locations = args[:locations] if args.key?(:locations)
1488
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1489
+ end
1490
+ end
1491
+
1492
+ # Response message for the ListModels method.
1493
+ class GoogleCloudMlV1ListModelsResponse
1494
+ include Google::Apis::Core::Hashable
1495
+
1496
+ # The list of models.
1497
+ # Corresponds to the JSON property `models`
1498
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Model>]
1499
+ attr_accessor :models
1500
+
1501
+ # Optional. Pass this token as the `page_token` field of the request for a
1502
+ # subsequent call.
1503
+ # Corresponds to the JSON property `nextPageToken`
1504
+ # @return [String]
1505
+ attr_accessor :next_page_token
1506
+
1507
+ def initialize(**args)
1508
+ update!(**args)
1509
+ end
1510
+
1511
+ # Update properties of this object
1512
+ def update!(**args)
1513
+ @models = args[:models] if args.key?(:models)
1514
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1515
+ end
1516
+ end
1517
+
1518
+ # The request message for the ListTrials service method.
1519
+ class GoogleCloudMlV1ListOptimalTrialsRequest
1520
+ include Google::Apis::Core::Hashable
1521
+
1522
+ def initialize(**args)
1523
+ update!(**args)
1524
+ end
1525
+
1526
+ # Update properties of this object
1527
+ def update!(**args)
1528
+ end
1529
+ end
1530
+
1531
+ # The response message for the ListOptimalTrials method.
1532
+ class GoogleCloudMlV1ListOptimalTrialsResponse
1533
+ include Google::Apis::Core::Hashable
1534
+
1535
+ # The pareto-optimal trials for multiple objective study or the optimal trial
1536
+ # for single objective study. The definition of pareto-optimal can be checked in
1537
+ # wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
1538
+ # Corresponds to the JSON property `trials`
1539
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Trial>]
1540
+ attr_accessor :trials
1541
+
1542
+ def initialize(**args)
1543
+ update!(**args)
1544
+ end
1545
+
1546
+ # Update properties of this object
1547
+ def update!(**args)
1548
+ @trials = args[:trials] if args.key?(:trials)
1549
+ end
1550
+ end
1551
+
1552
+ #
1553
+ class GoogleCloudMlV1ListStudiesResponse
1554
+ include Google::Apis::Core::Hashable
1555
+
1556
+ # The studies associated with the project.
1557
+ # Corresponds to the JSON property `studies`
1558
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Study>]
1559
+ attr_accessor :studies
1560
+
1561
+ def initialize(**args)
1562
+ update!(**args)
1563
+ end
1564
+
1565
+ # Update properties of this object
1566
+ def update!(**args)
1567
+ @studies = args[:studies] if args.key?(:studies)
1568
+ end
1569
+ end
1570
+
1571
+ # The response message for the ListTrials method.
1572
+ class GoogleCloudMlV1ListTrialsResponse
1573
+ include Google::Apis::Core::Hashable
1574
+
1575
+ # The trials associated with the study.
1576
+ # Corresponds to the JSON property `trials`
1577
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Trial>]
1578
+ attr_accessor :trials
1579
+
1580
+ def initialize(**args)
1581
+ update!(**args)
1582
+ end
1583
+
1584
+ # Update properties of this object
1585
+ def update!(**args)
1586
+ @trials = args[:trials] if args.key?(:trials)
1587
+ end
1588
+ end
1589
+
1590
+ # Response message for the ListVersions method.
1591
+ class GoogleCloudMlV1ListVersionsResponse
1592
+ include Google::Apis::Core::Hashable
1593
+
1594
+ # Optional. Pass this token as the `page_token` field of the request for a
1595
+ # subsequent call.
1596
+ # Corresponds to the JSON property `nextPageToken`
1597
+ # @return [String]
1598
+ attr_accessor :next_page_token
1599
+
1600
+ # The list of versions.
1601
+ # Corresponds to the JSON property `versions`
1602
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Version>]
1603
+ attr_accessor :versions
1604
+
1605
+ def initialize(**args)
1606
+ update!(**args)
1607
+ end
1608
+
1609
+ # Update properties of this object
1610
+ def update!(**args)
1611
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1612
+ @versions = args[:versions] if args.key?(:versions)
1613
+ end
1614
+ end
1615
+
1616
+ #
1617
+ class GoogleCloudMlV1Location
1618
+ include Google::Apis::Core::Hashable
1619
+
1620
+ # Capabilities available in the location.
1621
+ # Corresponds to the JSON property `capabilities`
1622
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Capability>]
1623
+ attr_accessor :capabilities
1624
+
1625
+ #
1626
+ # Corresponds to the JSON property `name`
1627
+ # @return [String]
1628
+ attr_accessor :name
1629
+
1630
+ def initialize(**args)
1631
+ update!(**args)
1632
+ end
1633
+
1634
+ # Update properties of this object
1635
+ def update!(**args)
1636
+ @capabilities = args[:capabilities] if args.key?(:capabilities)
1637
+ @name = args[:name] if args.key?(:name)
1638
+ end
1639
+ end
1640
+
1641
+ # Options for manually scaling a model.
1642
+ class GoogleCloudMlV1ManualScaling
1643
+ include Google::Apis::Core::Hashable
1644
+
1645
+ # The number of nodes to allocate for this model. These nodes are always up,
1646
+ # starting from the time the model is deployed, so the cost of operating this
1647
+ # model will be proportional to `nodes` * number of hours since last billing
1648
+ # cycle plus the cost for each prediction performed.
1649
+ # Corresponds to the JSON property `nodes`
1650
+ # @return [Fixnum]
1651
+ attr_accessor :nodes
1652
+
1653
+ def initialize(**args)
1654
+ update!(**args)
1655
+ end
1656
+
1657
+ # Update properties of this object
1658
+ def update!(**args)
1659
+ @nodes = args[:nodes] if args.key?(:nodes)
1660
+ end
1661
+ end
1662
+
1663
+ # A message representing a measurement.
1664
+ class GoogleCloudMlV1Measurement
1665
+ include Google::Apis::Core::Hashable
1666
+
1667
+ # Output only. Time that the trial has been running at the point of this
1668
+ # measurement.
1669
+ # Corresponds to the JSON property `elapsedTime`
1670
+ # @return [String]
1671
+ attr_accessor :elapsed_time
1672
+
1673
+ # Provides a list of metrics that act as inputs into the objective function.
1674
+ # Corresponds to the JSON property `metrics`
1675
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1MeasurementMetric>]
1676
+ attr_accessor :metrics
1677
+
1678
+ # The number of steps a machine learning model has been trained for. Must be non-
1679
+ # negative.
1680
+ # Corresponds to the JSON property `stepCount`
1681
+ # @return [Fixnum]
1682
+ attr_accessor :step_count
1683
+
1684
+ def initialize(**args)
1685
+ update!(**args)
1686
+ end
1687
+
1688
+ # Update properties of this object
1689
+ def update!(**args)
1690
+ @elapsed_time = args[:elapsed_time] if args.key?(:elapsed_time)
1691
+ @metrics = args[:metrics] if args.key?(:metrics)
1692
+ @step_count = args[:step_count] if args.key?(:step_count)
1693
+ end
1694
+ end
1695
+
1696
+ # MetricSpec contains the specifications to use to calculate the desired nodes
1697
+ # count when autoscaling is enabled.
1698
+ class GoogleCloudMlV1MetricSpec
1699
+ include Google::Apis::Core::Hashable
1700
+
1701
+ # metric name.
1702
+ # Corresponds to the JSON property `name`
1703
+ # @return [String]
1704
+ attr_accessor :name
1705
+
1706
+ # Target specifies the target value for the given metric; once real metric
1707
+ # deviates from the threshold by a certain percentage, the node count changes.
1708
+ # Corresponds to the JSON property `target`
1709
+ # @return [Fixnum]
1710
+ attr_accessor :target
1711
+
1712
+ def initialize(**args)
1713
+ update!(**args)
1714
+ end
1715
+
1716
+ # Update properties of this object
1717
+ def update!(**args)
1718
+ @name = args[:name] if args.key?(:name)
1719
+ @target = args[:target] if args.key?(:target)
1720
+ end
1721
+ end
1722
+
1723
+ # Represents a machine learning solution. A model can have multiple versions,
1724
+ # each of which is a deployed, trained model ready to receive prediction
1725
+ # requests. The model itself is just a container.
1726
+ class GoogleCloudMlV1Model
1727
+ include Google::Apis::Core::Hashable
1728
+
1729
+ # Represents a version of the model. Each version is a trained model deployed in
1730
+ # the cloud, ready to handle prediction requests. A model can have multiple
1731
+ # versions. You can get information about all of the versions of a given model
1732
+ # by calling projects.models.versions.list.
1733
+ # Corresponds to the JSON property `defaultVersion`
1734
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
1735
+ attr_accessor :default_version
1736
+
1737
+ # Optional. The description specified for the model when it was created.
1738
+ # Corresponds to the JSON property `description`
1739
+ # @return [String]
1740
+ attr_accessor :description
1741
+
1742
+ # `etag` is used for optimistic concurrency control as a way to help prevent
1743
+ # simultaneous updates of a model from overwriting each other. It is strongly
1744
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
1745
+ # to perform model updates in order to avoid race conditions: An `etag` is
1746
+ # returned in the response to `GetModel`, and systems are expected to put that
1747
+ # etag in the request to `UpdateModel` to ensure that their change will be
1748
+ # applied to the model as intended.
1749
+ # Corresponds to the JSON property `etag`
1750
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1751
+ # @return [String]
1752
+ attr_accessor :etag
1753
+
1754
+ # Optional. One or more labels that you can add, to organize your models. Each
1755
+ # label is a key-value pair, where both the key and the value are arbitrary
1756
+ # strings that you supply. For more information, see the documentation on using
1757
+ # labels.
1758
+ # Corresponds to the JSON property `labels`
1759
+ # @return [Hash<String,String>]
1760
+ attr_accessor :labels
1761
+
1762
+ # Required. The name specified for the model when it was created. The model name
1763
+ # must be unique within the project it is created in.
1764
+ # Corresponds to the JSON property `name`
1765
+ # @return [String]
1766
+ attr_accessor :name
1767
+
1768
+ # Optional. If true, online prediction nodes send `stderr` and `stdout` streams
1769
+ # to Cloud Logging. These can be more verbose than the standard access logs (see
1770
+ # `onlinePredictionLogging`) and can incur higher cost. However, they are
1771
+ # helpful for debugging. Note that [logs may incur a cost](/stackdriver/pricing),
1772
+ # especially if your project receives prediction requests at a high QPS.
1773
+ # Estimate your costs before enabling this option. Default is false.
1774
+ # Corresponds to the JSON property `onlinePredictionConsoleLogging`
1775
+ # @return [Boolean]
1776
+ attr_accessor :online_prediction_console_logging
1777
+ alias_method :online_prediction_console_logging?, :online_prediction_console_logging
1778
+
1779
+ # Optional. If true, online prediction access logs are sent to Cloud Logging.
1780
+ # These logs are like standard server access logs, containing information like
1781
+ # timestamp and latency for each request. Note that [logs may incur a cost](/
1782
+ # stackdriver/pricing), especially if your project receives prediction requests
1783
+ # at a high queries per second rate (QPS). Estimate your costs before enabling
1784
+ # this option. Default is false.
1785
+ # Corresponds to the JSON property `onlinePredictionLogging`
1786
+ # @return [Boolean]
1787
+ attr_accessor :online_prediction_logging
1788
+ alias_method :online_prediction_logging?, :online_prediction_logging
1789
+
1790
+ # Optional. The list of regions where the model is going to be deployed. Only
1791
+ # one region per model is supported. Defaults to 'us-central1' if nothing is set.
1792
+ # See the available regions for AI Platform services. Note: * No matter where a
1793
+ # model is deployed, it can always be accessed by users from anywhere, both for
1794
+ # online and batch prediction. * The region for a batch prediction job is set by
1795
+ # the region field when submitting the batch prediction job and does not take
1796
+ # its value from this field.
1797
+ # Corresponds to the JSON property `regions`
1798
+ # @return [Array<String>]
1799
+ attr_accessor :regions
1800
+
1801
+ def initialize(**args)
1802
+ update!(**args)
1803
+ end
1804
+
1805
+ # Update properties of this object
1806
+ def update!(**args)
1807
+ @default_version = args[:default_version] if args.key?(:default_version)
1808
+ @description = args[:description] if args.key?(:description)
1809
+ @etag = args[:etag] if args.key?(:etag)
1810
+ @labels = args[:labels] if args.key?(:labels)
1811
+ @name = args[:name] if args.key?(:name)
1812
+ @online_prediction_console_logging = args[:online_prediction_console_logging] if args.key?(:online_prediction_console_logging)
1813
+ @online_prediction_logging = args[:online_prediction_logging] if args.key?(:online_prediction_logging)
1814
+ @regions = args[:regions] if args.key?(:regions)
1815
+ end
1816
+ end
1817
+
1818
+ # Represents the metadata of the long-running operation.
1819
+ class GoogleCloudMlV1OperationMetadata
1820
+ include Google::Apis::Core::Hashable
1821
+
1822
+ # The time the operation was submitted.
1823
+ # Corresponds to the JSON property `createTime`
1824
+ # @return [String]
1825
+ attr_accessor :create_time
1826
+
1827
+ # The time operation processing completed.
1828
+ # Corresponds to the JSON property `endTime`
1829
+ # @return [String]
1830
+ attr_accessor :end_time
1831
+
1832
+ # Indicates whether a request to cancel this operation has been made.
1833
+ # Corresponds to the JSON property `isCancellationRequested`
1834
+ # @return [Boolean]
1835
+ attr_accessor :is_cancellation_requested
1836
+ alias_method :is_cancellation_requested?, :is_cancellation_requested
1837
+
1838
+ # The user labels, inherited from the model or the model version being operated
1839
+ # on.
1840
+ # Corresponds to the JSON property `labels`
1841
+ # @return [Hash<String,String>]
1842
+ attr_accessor :labels
1843
+
1844
+ # Contains the name of the model associated with the operation.
1845
+ # Corresponds to the JSON property `modelName`
1846
+ # @return [String]
1847
+ attr_accessor :model_name
1848
+
1849
+ # The operation type.
1850
+ # Corresponds to the JSON property `operationType`
1851
+ # @return [String]
1852
+ attr_accessor :operation_type
1853
+
1854
+ # Contains the project number associated with the operation.
1855
+ # Corresponds to the JSON property `projectNumber`
1856
+ # @return [Fixnum]
1857
+ attr_accessor :project_number
1858
+
1859
+ # The time operation processing started.
1860
+ # Corresponds to the JSON property `startTime`
1861
+ # @return [String]
1862
+ attr_accessor :start_time
1863
+
1864
+ # Represents a version of the model. Each version is a trained model deployed in
1865
+ # the cloud, ready to handle prediction requests. A model can have multiple
1866
+ # versions. You can get information about all of the versions of a given model
1867
+ # by calling projects.models.versions.list.
1868
+ # Corresponds to the JSON property `version`
1869
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
1870
+ attr_accessor :version
1871
+
1872
+ def initialize(**args)
1873
+ update!(**args)
1874
+ end
1875
+
1876
+ # Update properties of this object
1877
+ def update!(**args)
1878
+ @create_time = args[:create_time] if args.key?(:create_time)
1879
+ @end_time = args[:end_time] if args.key?(:end_time)
1880
+ @is_cancellation_requested = args[:is_cancellation_requested] if args.key?(:is_cancellation_requested)
1881
+ @labels = args[:labels] if args.key?(:labels)
1882
+ @model_name = args[:model_name] if args.key?(:model_name)
1883
+ @operation_type = args[:operation_type] if args.key?(:operation_type)
1884
+ @project_number = args[:project_number] if args.key?(:project_number)
1885
+ @start_time = args[:start_time] if args.key?(:start_time)
1886
+ @version = args[:version] if args.key?(:version)
1887
+ end
1888
+ end
1889
+
1890
+ # Represents a single hyperparameter to optimize.
1891
+ class GoogleCloudMlV1ParameterSpec
1892
+ include Google::Apis::Core::Hashable
1893
+
1894
+ # Required if type is `CATEGORICAL`. The list of possible categories.
1895
+ # Corresponds to the JSON property `categoricalValues`
1896
+ # @return [Array<String>]
1897
+ attr_accessor :categorical_values
1898
+
1899
+ # Required if type is `DISCRETE`. A list of feasible points. The list should be
1900
+ # in strictly increasing order. For instance, this parameter might have possible
1901
+ # settings of 1.5, 2.5, and 4.0. This list should not contain more than 1,000
1902
+ # values.
1903
+ # Corresponds to the JSON property `discreteValues`
1904
+ # @return [Array<Float>]
1905
+ attr_accessor :discrete_values
1906
+
1907
+ # Required if type is `DOUBLE` or `INTEGER`. This field should be unset if type
1908
+ # is `CATEGORICAL`. This value should be integers if type is `INTEGER`.
1909
+ # Corresponds to the JSON property `maxValue`
1910
+ # @return [Float]
1911
+ attr_accessor :max_value
1912
+
1913
+ # Required if type is `DOUBLE` or `INTEGER`. This field should be unset if type
1914
+ # is `CATEGORICAL`. This value should be integers if type is INTEGER.
1915
+ # Corresponds to the JSON property `minValue`
1916
+ # @return [Float]
1917
+ attr_accessor :min_value
1918
+
1919
+ # Required. The parameter name must be unique amongst all ParameterConfigs in a
1920
+ # HyperparameterSpec message. E.g., "learning_rate".
1921
+ # Corresponds to the JSON property `parameterName`
1922
+ # @return [String]
1923
+ attr_accessor :parameter_name
1924
+
1925
+ # Optional. How the parameter should be scaled to the hypercube. Leave unset for
1926
+ # categorical parameters. Some kind of scaling is strongly recommended for real
1927
+ # or integral parameters (e.g., `UNIT_LINEAR_SCALE`).
1928
+ # Corresponds to the JSON property `scaleType`
1929
+ # @return [String]
1930
+ attr_accessor :scale_type
1931
+
1932
+ # Required. The type of the parameter.
1933
+ # Corresponds to the JSON property `type`
1934
+ # @return [String]
1935
+ attr_accessor :type
1936
+
1937
+ def initialize(**args)
1938
+ update!(**args)
1939
+ end
1940
+
1941
+ # Update properties of this object
1942
+ def update!(**args)
1943
+ @categorical_values = args[:categorical_values] if args.key?(:categorical_values)
1944
+ @discrete_values = args[:discrete_values] if args.key?(:discrete_values)
1945
+ @max_value = args[:max_value] if args.key?(:max_value)
1946
+ @min_value = args[:min_value] if args.key?(:min_value)
1947
+ @parameter_name = args[:parameter_name] if args.key?(:parameter_name)
1948
+ @scale_type = args[:scale_type] if args.key?(:scale_type)
1949
+ @type = args[:type] if args.key?(:type)
1950
+ end
1951
+ end
1952
+
1953
+ # Request for predictions to be issued against a trained model.
1954
+ class GoogleCloudMlV1PredictRequest
1955
+ include Google::Apis::Core::Hashable
1956
+
1957
+ # Message that represents an arbitrary HTTP body. It should only be used for
1958
+ # payload formats that can't be represented as JSON, such as raw binary or an
1959
+ # HTML page. This message can be used both in streaming and non-streaming API
1960
+ # methods in the request as well as the response. It can be used as a top-level
1961
+ # request field, which is convenient if one wants to extract parameters from
1962
+ # either the URL or HTTP template into the request fields and also want access
1963
+ # to the raw HTTP body. Example: message GetResourceRequest ` // A unique
1964
+ # request id. string request_id = 1; // The raw HTTP body is bound to this field.
1965
+ # google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
1966
+ # GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
1967
+ # UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
1968
+ # with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
1969
+ # api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
1970
+ # google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
1971
+ # only changes how the request and response bodies are handled, all other
1972
+ # features will continue to work unchanged.
1973
+ # Corresponds to the JSON property `httpBody`
1974
+ # @return [Google::Apis::MlV1::GoogleApiHttpBody]
1975
+ attr_accessor :http_body
1976
+
1977
+ def initialize(**args)
1978
+ update!(**args)
1979
+ end
1980
+
1981
+ # Update properties of this object
1982
+ def update!(**args)
1983
+ @http_body = args[:http_body] if args.key?(:http_body)
1984
+ end
1985
+ end
1986
+
1987
+ # Represents input parameters for a prediction job.
1988
+ class GoogleCloudMlV1PredictionInput
1989
+ include Google::Apis::Core::Hashable
1990
+
1991
+ # Optional. Number of records per batch, defaults to 64. The service will buffer
1992
+ # batch_size number of records in memory before invoking one Tensorflow
1993
+ # prediction call internally. So take the record size and memory available into
1994
+ # consideration when setting this parameter.
1995
+ # Corresponds to the JSON property `batchSize`
1996
+ # @return [Fixnum]
1997
+ attr_accessor :batch_size
1998
+
1999
+ # Required. The format of the input data files.
2000
+ # Corresponds to the JSON property `dataFormat`
2001
+ # @return [String]
2002
+ attr_accessor :data_format
2003
+
2004
+ # Required. The Cloud Storage location of the input data files. May contain
2005
+ # wildcards.
2006
+ # Corresponds to the JSON property `inputPaths`
2007
+ # @return [Array<String>]
2008
+ attr_accessor :input_paths
2009
+
2010
+ # Optional. The maximum number of workers to be used for parallel processing.
2011
+ # Defaults to 10 if not specified.
2012
+ # Corresponds to the JSON property `maxWorkerCount`
2013
+ # @return [Fixnum]
2014
+ attr_accessor :max_worker_count
2015
+
2016
+ # Use this field if you want to use the default version for the specified model.
2017
+ # The string must use the following format: `"projects/YOUR_PROJECT/models/
2018
+ # YOUR_MODEL"`
2019
+ # Corresponds to the JSON property `modelName`
2020
+ # @return [String]
2021
+ attr_accessor :model_name
2022
+
2023
+ # Optional. Format of the output data files, defaults to JSON.
2024
+ # Corresponds to the JSON property `outputDataFormat`
2025
+ # @return [String]
2026
+ attr_accessor :output_data_format
2027
+
2028
+ # Required. The output Google Cloud Storage location.
2029
+ # Corresponds to the JSON property `outputPath`
2030
+ # @return [String]
2031
+ attr_accessor :output_path
2032
+
2033
+ # Required. The Google Compute Engine region to run the prediction job in. See
2034
+ # the available regions for AI Platform services.
2035
+ # Corresponds to the JSON property `region`
2036
+ # @return [String]
2037
+ attr_accessor :region
2038
+
2039
+ # Optional. The AI Platform runtime version to use for this batch prediction. If
2040
+ # not set, AI Platform will pick the runtime version used during the
2041
+ # CreateVersion request for this model version, or choose the latest stable
2042
+ # version when model version information is not available such as when the model
2043
+ # is specified by uri.
2044
+ # Corresponds to the JSON property `runtimeVersion`
2045
+ # @return [String]
2046
+ attr_accessor :runtime_version
2047
+
2048
+ # Optional. The name of the signature defined in the SavedModel to use for this
2049
+ # job. Please refer to [SavedModel](https://tensorflow.github.io/serving/
2050
+ # serving_basic.html) for information about how to use signatures. Defaults to [
2051
+ # DEFAULT_SERVING_SIGNATURE_DEF_KEY](https://www.tensorflow.org/api_docs/python/
2052
+ # tf/saved_model/signature_constants) , which is "serving_default".
2053
+ # Corresponds to the JSON property `signatureName`
2054
+ # @return [String]
2055
+ attr_accessor :signature_name
2056
+
2057
+ # Use this field if you want to specify a Google Cloud Storage path for the
2058
+ # model to use.
2059
+ # Corresponds to the JSON property `uri`
2060
+ # @return [String]
2061
+ attr_accessor :uri
2062
+
2063
+ # Use this field if you want to specify a version of the model to use. The
2064
+ # string is formatted the same way as `model_version`, with the addition of the
2065
+ # version information: `"projects/YOUR_PROJECT/models/YOUR_MODEL/versions/
2066
+ # YOUR_VERSION"`
2067
+ # Corresponds to the JSON property `versionName`
2068
+ # @return [String]
2069
+ attr_accessor :version_name
2070
+
2071
+ def initialize(**args)
2072
+ update!(**args)
2073
+ end
2074
+
2075
+ # Update properties of this object
2076
+ def update!(**args)
2077
+ @batch_size = args[:batch_size] if args.key?(:batch_size)
2078
+ @data_format = args[:data_format] if args.key?(:data_format)
2079
+ @input_paths = args[:input_paths] if args.key?(:input_paths)
2080
+ @max_worker_count = args[:max_worker_count] if args.key?(:max_worker_count)
2081
+ @model_name = args[:model_name] if args.key?(:model_name)
2082
+ @output_data_format = args[:output_data_format] if args.key?(:output_data_format)
2083
+ @output_path = args[:output_path] if args.key?(:output_path)
2084
+ @region = args[:region] if args.key?(:region)
2085
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
2086
+ @signature_name = args[:signature_name] if args.key?(:signature_name)
2087
+ @uri = args[:uri] if args.key?(:uri)
2088
+ @version_name = args[:version_name] if args.key?(:version_name)
2089
+ end
2090
+ end
2091
+
2092
+ # Represents results of a prediction job.
2093
+ class GoogleCloudMlV1PredictionOutput
2094
+ include Google::Apis::Core::Hashable
2095
+
2096
+ # The number of data instances which resulted in errors.
2097
+ # Corresponds to the JSON property `errorCount`
2098
+ # @return [Fixnum]
2099
+ attr_accessor :error_count
2100
+
2101
+ # Node hours used by the batch prediction job.
2102
+ # Corresponds to the JSON property `nodeHours`
2103
+ # @return [Float]
2104
+ attr_accessor :node_hours
2105
+
2106
+ # The output Google Cloud Storage location provided at the job creation time.
2107
+ # Corresponds to the JSON property `outputPath`
2108
+ # @return [String]
2109
+ attr_accessor :output_path
2110
+
2111
+ # The number of generated predictions.
2112
+ # Corresponds to the JSON property `predictionCount`
2113
+ # @return [Fixnum]
2114
+ attr_accessor :prediction_count
2115
+
2116
+ def initialize(**args)
2117
+ update!(**args)
2118
+ end
2119
+
2120
+ # Update properties of this object
2121
+ def update!(**args)
2122
+ @error_count = args[:error_count] if args.key?(:error_count)
2123
+ @node_hours = args[:node_hours] if args.key?(:node_hours)
2124
+ @output_path = args[:output_path] if args.key?(:output_path)
2125
+ @prediction_count = args[:prediction_count] if args.key?(:prediction_count)
2126
+ end
2127
+ end
2128
+
2129
+ # Represents the configuration for a replica in a cluster.
2130
+ class GoogleCloudMlV1ReplicaConfig
2131
+ include Google::Apis::Core::Hashable
2132
+
2133
+ # Represents a hardware accelerator request config. Note that the
2134
+ # AcceleratorConfig can be used in both Jobs and Versions. Learn more about [
2135
+ # accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for
2136
+ # online prediction](/ml-engine/docs/machine-types-online-prediction#gpus).
2137
+ # Corresponds to the JSON property `acceleratorConfig`
2138
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1AcceleratorConfig]
2139
+ attr_accessor :accelerator_config
2140
+
2141
+ # Arguments to the entrypoint command. The following rules apply for
2142
+ # container_command and container_args: - If you do not supply command or args:
2143
+ # The defaults defined in the Docker image are used. - If you supply a command
2144
+ # but no args: The default EntryPoint and the default Cmd defined in the Docker
2145
+ # image are ignored. Your command is run without any arguments. - If you supply
2146
+ # only args: The default Entrypoint defined in the Docker image is run with the
2147
+ # args that you supplied. - If you supply a command and args: The default
2148
+ # Entrypoint and the default Cmd defined in the Docker image are ignored. Your
2149
+ # command is run with your args. It cannot be set if custom container image is
2150
+ # not provided. Note that this field and [TrainingInput.args] are mutually
2151
+ # exclusive, i.e., both cannot be set at the same time.
2152
+ # Corresponds to the JSON property `containerArgs`
2153
+ # @return [Array<String>]
2154
+ attr_accessor :container_args
2155
+
2156
+ # The command with which the replica's custom container is run. If provided, it
2157
+ # will override default ENTRYPOINT of the docker image. If not provided, the
2158
+ # docker image's ENTRYPOINT is used. It cannot be set if custom container image
2159
+ # is not provided. Note that this field and [TrainingInput.args] are mutually
2160
+ # exclusive, i.e., both cannot be set at the same time.
2161
+ # Corresponds to the JSON property `containerCommand`
2162
+ # @return [Array<String>]
2163
+ attr_accessor :container_command
2164
+
2165
+ # Represents the config of disk options.
2166
+ # Corresponds to the JSON property `diskConfig`
2167
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1DiskConfig]
2168
+ attr_accessor :disk_config
2169
+
2170
+ # The Docker image to run on the replica. This image must be in Container
2171
+ # Registry. Learn more about [configuring custom containers](/ai-platform/
2172
+ # training/docs/distributed-training-containers).
2173
+ # Corresponds to the JSON property `imageUri`
2174
+ # @return [String]
2175
+ attr_accessor :image_uri
2176
+
2177
+ # The AI Platform runtime version that includes a TensorFlow version matching
2178
+ # the one used in the custom container. This field is required if the replica is
2179
+ # a TPU worker that uses a custom container. Otherwise, do not specify this
2180
+ # field. This must be a [runtime version that currently supports training with
2181
+ # TPUs](/ml-engine/docs/tensorflow/runtime-version-list#tpu-support). Note that
2182
+ # the version of TensorFlow included in a runtime version may differ from the
2183
+ # numbering of the runtime version itself, because it may have a different [
2184
+ # patch version](https://www.tensorflow.org/guide/version_compat#
2185
+ # semantic_versioning_20). In this field, you must specify the runtime version (
2186
+ # TensorFlow minor version). For example, if your custom container runs
2187
+ # TensorFlow `1.x.y`, specify `1.x`.
2188
+ # Corresponds to the JSON property `tpuTfVersion`
2189
+ # @return [String]
2190
+ attr_accessor :tpu_tf_version
2191
+
2192
+ def initialize(**args)
2193
+ update!(**args)
2194
+ end
2195
+
2196
+ # Update properties of this object
2197
+ def update!(**args)
2198
+ @accelerator_config = args[:accelerator_config] if args.key?(:accelerator_config)
2199
+ @container_args = args[:container_args] if args.key?(:container_args)
2200
+ @container_command = args[:container_command] if args.key?(:container_command)
2201
+ @disk_config = args[:disk_config] if args.key?(:disk_config)
2202
+ @image_uri = args[:image_uri] if args.key?(:image_uri)
2203
+ @tpu_tf_version = args[:tpu_tf_version] if args.key?(:tpu_tf_version)
2204
+ end
2205
+ end
2206
+
2207
+ # Configuration for logging request-response pairs to a BigQuery table. Online
2208
+ # prediction requests to a model version and the responses to these requests are
2209
+ # converted to raw strings and saved to the specified BigQuery table. Logging is
2210
+ # constrained by [BigQuery quotas and limits](/bigquery/quotas). If your project
2211
+ # exceeds BigQuery quotas or limits, AI Platform Prediction does not log request-
2212
+ # response pairs, but it continues to serve predictions. If you are using [
2213
+ # continuous evaluation](/ml-engine/docs/continuous-evaluation/), you do not
2214
+ # need to specify this configuration manually. Setting up continuous evaluation
2215
+ # automatically enables logging of request-response pairs.
2216
+ class GoogleCloudMlV1RequestLoggingConfig
2217
+ include Google::Apis::Core::Hashable
2218
+
2219
+ # Required. Fully qualified BigQuery table name in the following format: "
2220
+ # project_id.dataset_name.table_name" The specified table must already exist,
2221
+ # and the "Cloud ML Service Agent" for your project must have permission to
2222
+ # write to it. The table must have the following [schema](/bigquery/docs/schemas)
2223
+ # : Field nameType Mode model STRING REQUIRED model_version STRING REQUIRED time
2224
+ # TIMESTAMP REQUIRED raw_data STRING REQUIRED raw_prediction STRING NULLABLE
2225
+ # groundtruth STRING NULLABLE
2226
+ # Corresponds to the JSON property `bigqueryTableName`
2227
+ # @return [String]
2228
+ attr_accessor :bigquery_table_name
2229
+
2230
+ # Percentage of requests to be logged, expressed as a fraction from 0 to 1. For
2231
+ # example, if you want to log 10% of requests, enter `0.1`. The sampling window
2232
+ # is the lifetime of the model version. Defaults to 0.
2233
+ # Corresponds to the JSON property `samplingPercentage`
2234
+ # @return [Float]
2235
+ attr_accessor :sampling_percentage
2236
+
2237
+ def initialize(**args)
2238
+ update!(**args)
2239
+ end
2240
+
2241
+ # Update properties of this object
2242
+ def update!(**args)
2243
+ @bigquery_table_name = args[:bigquery_table_name] if args.key?(:bigquery_table_name)
2244
+ @sampling_percentage = args[:sampling_percentage] if args.key?(:sampling_percentage)
2245
+ end
2246
+ end
2247
+
2248
+ # Specifies HTTP paths served by a custom container. AI Platform Prediction
2249
+ # sends requests to these paths on the container; the custom container must run
2250
+ # an HTTP server that responds to these requests with appropriate responses.
2251
+ # Read [Custom container requirements](/ai-platform/prediction/docs/custom-
2252
+ # container-requirements) for details on how to create your container image to
2253
+ # meet these requirements.
2254
+ class GoogleCloudMlV1RouteMap
2255
+ include Google::Apis::Core::Hashable
2256
+
2257
+ # HTTP path on the container to send health checkss to. AI Platform Prediction
2258
+ # intermittently sends GET requests to this path on the container's IP address
2259
+ # and port to check that the container is healthy. Read more about [health
2260
+ # checks](/ai-platform/prediction/docs/custom-container-requirements#checks).
2261
+ # For example, if you set this field to `/bar`, then AI Platform Prediction
2262
+ # intermittently sends a GET request to the `/bar` path on the port of your
2263
+ # container specified by the first value of Version.container.ports. If you don'
2264
+ # t specify this field, it defaults to the following value: /v1/models/ MODEL/
2265
+ # versions/VERSION The placeholders in this value are replaced as follows: *
2266
+ # MODEL: The name of the parent Model. This does not include the "projects/
2267
+ # PROJECT_ID/models/" prefix that the API returns in output; it is the bare
2268
+ # model name, as provided to projects.models.create. * VERSION: The name of the
2269
+ # model version. This does not include the "projects/PROJECT_ID /models/MODEL/
2270
+ # versions/" prefix that the API returns in output; it is the bare version name,
2271
+ # as provided to projects.models.versions.create.
2272
+ # Corresponds to the JSON property `health`
2273
+ # @return [String]
2274
+ attr_accessor :health
2275
+
2276
+ # HTTP path on the container to send prediction requests to. AI Platform
2277
+ # Prediction forwards requests sent using projects.predict to this path on the
2278
+ # container's IP address and port. AI Platform Prediction then returns the
2279
+ # container's response in the API response. For example, if you set this field
2280
+ # to `/foo`, then when AI Platform Prediction receives a prediction request, it
2281
+ # forwards the request body in a POST request to the `/foo` path on the port of
2282
+ # your container specified by the first value of Version.container.ports. If you
2283
+ # don't specify this field, it defaults to the following value: /v1/models/MODEL/
2284
+ # versions/VERSION:predict The placeholders in this value are replaced as
2285
+ # follows: * MODEL: The name of the parent Model. This does not include the "
2286
+ # projects/PROJECT_ID/models/" prefix that the API returns in output; it is the
2287
+ # bare model name, as provided to projects.models.create. * VERSION: The name of
2288
+ # the model version. This does not include the "projects/PROJECT_ID/models/MODEL/
2289
+ # versions/" prefix that the API returns in output; it is the bare version name,
2290
+ # as provided to projects.models.versions.create.
2291
+ # Corresponds to the JSON property `predict`
2292
+ # @return [String]
2293
+ attr_accessor :predict
2294
+
2295
+ def initialize(**args)
2296
+ update!(**args)
2297
+ end
2298
+
2299
+ # Update properties of this object
2300
+ def update!(**args)
2301
+ @health = args[:health] if args.key?(:health)
2302
+ @predict = args[:predict] if args.key?(:predict)
2303
+ end
2304
+ end
2305
+
2306
+ # An attribution method that approximates Shapley values for features that
2307
+ # contribute to the label being predicted. A sampling strategy is used to
2308
+ # approximate the value rather than considering all subsets of features.
2309
+ class GoogleCloudMlV1SampledShapleyAttribution
2310
+ include Google::Apis::Core::Hashable
2311
+
2312
+ # The number of feature permutations to consider when approximating the Shapley
2313
+ # values.
2314
+ # Corresponds to the JSON property `numPaths`
2315
+ # @return [Fixnum]
2316
+ attr_accessor :num_paths
2317
+
2318
+ def initialize(**args)
2319
+ update!(**args)
2320
+ end
2321
+
2322
+ # Update properties of this object
2323
+ def update!(**args)
2324
+ @num_paths = args[:num_paths] if args.key?(:num_paths)
2325
+ end
2326
+ end
2327
+
2328
+ # All parameters related to scheduling of training jobs.
2329
+ class GoogleCloudMlV1Scheduling
2330
+ include Google::Apis::Core::Hashable
2331
+
2332
+ # Optional. The maximum job running time, expressed in seconds. The field can
2333
+ # contain up to nine fractional digits, terminated by `s`. If not specified,
2334
+ # this field defaults to `604800s` (seven days). If the training job is still
2335
+ # running after this duration, AI Platform Training cancels it. The duration is
2336
+ # measured from when the job enters the `RUNNING` state; therefore it does not
2337
+ # overlap with the duration limited by Scheduling.max_wait_time. For example, if
2338
+ # you want to ensure your job runs for no more than 2 hours, set this field to `
2339
+ # 7200s` (2 hours * 60 minutes / hour * 60 seconds / minute). If you submit your
2340
+ # training job using the `gcloud` tool, you can [specify this field in a `config.
2341
+ # yaml` file](/ai-platform/training/docs/training-jobs#
2342
+ # formatting_your_configuration_parameters). For example: ```yaml trainingInput:
2343
+ # scheduling: maxRunningTime: 7200s ```
2344
+ # Corresponds to the JSON property `maxRunningTime`
2345
+ # @return [String]
2346
+ attr_accessor :max_running_time
2347
+
2348
+ # Optional. The maximum job wait time, expressed in seconds. The field can
2349
+ # contain up to nine fractional digits, terminated by `s`. If not specified,
2350
+ # there is no limit to the wait time. The minimum for this field is `1800s` (30
2351
+ # minutes). If the training job has not entered the `RUNNING` state after this
2352
+ # duration, AI Platform Training cancels it. After the job begins running, it
2353
+ # can no longer be cancelled due to the maximum wait time. Therefore the
2354
+ # duration limited by this field does not overlap with the duration limited by
2355
+ # Scheduling.max_running_time. For example, if the job temporarily stops running
2356
+ # and retries due to a [VM restart](/ai-platform/training/docs/overview#restarts)
2357
+ # , this cannot lead to a maximum wait time cancellation. However, independently
2358
+ # of this constraint, AI Platform Training might stop a job if there are too
2359
+ # many retries due to exhausted resources in a region. The following example
2360
+ # describes how you might use this field: To cancel your job if it doesn't start
2361
+ # running within 1 hour, set this field to `3600s` (1 hour * 60 minutes / hour *
2362
+ # 60 seconds / minute). If the job is still in the `QUEUED` or `PREPARING` state
2363
+ # after an hour of waiting, AI Platform Training cancels the job. If you submit
2364
+ # your training job using the `gcloud` tool, you can [specify this field in a `
2365
+ # config.yaml` file](/ai-platform/training/docs/training-jobs#
2366
+ # formatting_your_configuration_parameters). For example: ```yaml trainingInput:
2367
+ # scheduling: maxWaitTime: 3600s ```
2368
+ # Corresponds to the JSON property `maxWaitTime`
2369
+ # @return [String]
2370
+ attr_accessor :max_wait_time
2371
+
2372
+ def initialize(**args)
2373
+ update!(**args)
2374
+ end
2375
+
2376
+ # Update properties of this object
2377
+ def update!(**args)
2378
+ @max_running_time = args[:max_running_time] if args.key?(:max_running_time)
2379
+ @max_wait_time = args[:max_wait_time] if args.key?(:max_wait_time)
2380
+ end
2381
+ end
2382
+
2383
+ # Request message for the SetDefaultVersion request.
2384
+ class GoogleCloudMlV1SetDefaultVersionRequest
2385
+ include Google::Apis::Core::Hashable
2386
+
2387
+ def initialize(**args)
2388
+ update!(**args)
2389
+ end
2390
+
2391
+ # Update properties of this object
2392
+ def update!(**args)
2393
+ end
2394
+ end
2395
+
2396
+ #
2397
+ class GoogleCloudMlV1StopTrialRequest
2398
+ include Google::Apis::Core::Hashable
2399
+
2400
+ def initialize(**args)
2401
+ update!(**args)
2402
+ end
2403
+
2404
+ # Update properties of this object
2405
+ def update!(**args)
2406
+ end
2407
+ end
2408
+
2409
+ # A message representing a Study.
2410
+ class GoogleCloudMlV1Study
2411
+ include Google::Apis::Core::Hashable
2412
+
2413
+ # Output only. Time at which the study was created.
2414
+ # Corresponds to the JSON property `createTime`
2415
+ # @return [String]
2416
+ attr_accessor :create_time
2417
+
2418
+ # Output only. A human readable reason why the Study is inactive. This should be
2419
+ # empty if a study is ACTIVE or COMPLETED.
2420
+ # Corresponds to the JSON property `inactiveReason`
2421
+ # @return [String]
2422
+ attr_accessor :inactive_reason
2423
+
2424
+ # Output only. The name of a study.
2425
+ # Corresponds to the JSON property `name`
2426
+ # @return [String]
2427
+ attr_accessor :name
2428
+
2429
+ # Output only. The detailed state of a study.
2430
+ # Corresponds to the JSON property `state`
2431
+ # @return [String]
2432
+ attr_accessor :state
2433
+
2434
+ # Represents configuration of a study.
2435
+ # Corresponds to the JSON property `studyConfig`
2436
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1StudyConfig]
2437
+ attr_accessor :study_config
2438
+
2439
+ def initialize(**args)
2440
+ update!(**args)
2441
+ end
2442
+
2443
+ # Update properties of this object
2444
+ def update!(**args)
2445
+ @create_time = args[:create_time] if args.key?(:create_time)
2446
+ @inactive_reason = args[:inactive_reason] if args.key?(:inactive_reason)
2447
+ @name = args[:name] if args.key?(:name)
2448
+ @state = args[:state] if args.key?(:state)
2449
+ @study_config = args[:study_config] if args.key?(:study_config)
2450
+ end
2451
+ end
2452
+
2453
+ # Represents configuration of a study.
2454
+ class GoogleCloudMlV1StudyConfig
2455
+ include Google::Apis::Core::Hashable
2456
+
2457
+ # The search algorithm specified for the study.
2458
+ # Corresponds to the JSON property `algorithm`
2459
+ # @return [String]
2460
+ attr_accessor :algorithm
2461
+
2462
+ # Configuration for Automated Early Stopping of Trials. If no
2463
+ # implementation_config is set, automated early stopping will not be run.
2464
+ # Corresponds to the JSON property `automatedStoppingConfig`
2465
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1AutomatedStoppingConfig]
2466
+ attr_accessor :automated_stopping_config
2467
+
2468
+ # Metric specs for the study.
2469
+ # Corresponds to the JSON property `metrics`
2470
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1StudyConfigMetricSpec>]
2471
+ attr_accessor :metrics
2472
+
2473
+ # Required. The set of parameters to tune.
2474
+ # Corresponds to the JSON property `parameters`
2475
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1StudyConfigParameterSpec>]
2476
+ attr_accessor :parameters
2477
+
2478
+ def initialize(**args)
2479
+ update!(**args)
2480
+ end
2481
+
2482
+ # Update properties of this object
2483
+ def update!(**args)
2484
+ @algorithm = args[:algorithm] if args.key?(:algorithm)
2485
+ @automated_stopping_config = args[:automated_stopping_config] if args.key?(:automated_stopping_config)
2486
+ @metrics = args[:metrics] if args.key?(:metrics)
2487
+ @parameters = args[:parameters] if args.key?(:parameters)
2488
+ end
2489
+ end
2490
+
2491
+ # Metadata field of a google.longrunning.Operation associated with a
2492
+ # SuggestTrialsRequest.
2493
+ class GoogleCloudMlV1SuggestTrialsMetadata
2494
+ include Google::Apis::Core::Hashable
2495
+
2496
+ # The identifier of the client that is requesting the suggestion.
2497
+ # Corresponds to the JSON property `clientId`
2498
+ # @return [String]
2499
+ attr_accessor :client_id
2500
+
2501
+ # The time operation was submitted.
2502
+ # Corresponds to the JSON property `createTime`
2503
+ # @return [String]
2504
+ attr_accessor :create_time
2505
+
2506
+ # The name of the study that the trial belongs to.
2507
+ # Corresponds to the JSON property `study`
2508
+ # @return [String]
2509
+ attr_accessor :study
2510
+
2511
+ # The number of suggestions requested.
2512
+ # Corresponds to the JSON property `suggestionCount`
2513
+ # @return [Fixnum]
2514
+ attr_accessor :suggestion_count
2515
+
2516
+ def initialize(**args)
2517
+ update!(**args)
2518
+ end
2519
+
2520
+ # Update properties of this object
2521
+ def update!(**args)
2522
+ @client_id = args[:client_id] if args.key?(:client_id)
2523
+ @create_time = args[:create_time] if args.key?(:create_time)
2524
+ @study = args[:study] if args.key?(:study)
2525
+ @suggestion_count = args[:suggestion_count] if args.key?(:suggestion_count)
2526
+ end
2527
+ end
2528
+
2529
+ # The request message for the SuggestTrial service method.
2530
+ class GoogleCloudMlV1SuggestTrialsRequest
2531
+ include Google::Apis::Core::Hashable
2532
+
2533
+ # Required. The identifier of the client that is requesting the suggestion. If
2534
+ # multiple SuggestTrialsRequests have the same `client_id`, the service will
2535
+ # return the identical suggested trial if the trial is pending, and provide a
2536
+ # new trial if the last suggested trial was completed.
2537
+ # Corresponds to the JSON property `clientId`
2538
+ # @return [String]
2539
+ attr_accessor :client_id
2540
+
2541
+ # Required. The number of suggestions requested.
2542
+ # Corresponds to the JSON property `suggestionCount`
2543
+ # @return [Fixnum]
2544
+ attr_accessor :suggestion_count
2545
+
2546
+ def initialize(**args)
2547
+ update!(**args)
2548
+ end
2549
+
2550
+ # Update properties of this object
2551
+ def update!(**args)
2552
+ @client_id = args[:client_id] if args.key?(:client_id)
2553
+ @suggestion_count = args[:suggestion_count] if args.key?(:suggestion_count)
2554
+ end
2555
+ end
2556
+
2557
+ # This message will be placed in the response field of a completed google.
2558
+ # longrunning.Operation associated with a SuggestTrials request.
2559
+ class GoogleCloudMlV1SuggestTrialsResponse
2560
+ include Google::Apis::Core::Hashable
2561
+
2562
+ # The time at which operation processing completed.
2563
+ # Corresponds to the JSON property `endTime`
2564
+ # @return [String]
2565
+ attr_accessor :end_time
2566
+
2567
+ # The time at which the operation was started.
2568
+ # Corresponds to the JSON property `startTime`
2569
+ # @return [String]
2570
+ attr_accessor :start_time
2571
+
2572
+ # The state of the study.
2573
+ # Corresponds to the JSON property `studyState`
2574
+ # @return [String]
2575
+ attr_accessor :study_state
2576
+
2577
+ # A list of trials.
2578
+ # Corresponds to the JSON property `trials`
2579
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Trial>]
2580
+ attr_accessor :trials
2581
+
2582
+ def initialize(**args)
2583
+ update!(**args)
2584
+ end
2585
+
2586
+ # Update properties of this object
2587
+ def update!(**args)
2588
+ @end_time = args[:end_time] if args.key?(:end_time)
2589
+ @start_time = args[:start_time] if args.key?(:start_time)
2590
+ @study_state = args[:study_state] if args.key?(:study_state)
2591
+ @trials = args[:trials] if args.key?(:trials)
2592
+ end
2593
+ end
2594
+
2595
+ # Represents input parameters for a training job. When using the gcloud command
2596
+ # to submit your training job, you can specify the input parameters as command-
2597
+ # line arguments and/or in a YAML configuration file referenced from the --
2598
+ # config command-line argument. For details, see the guide to [submitting a
2599
+ # training job](/ai-platform/training/docs/training-jobs).
2600
+ class GoogleCloudMlV1TrainingInput
2601
+ include Google::Apis::Core::Hashable
2602
+
2603
+ # Optional. Command-line arguments passed to the training application when it
2604
+ # starts. If your job uses a custom container, then the arguments are passed to
2605
+ # the container's `ENTRYPOINT` command.
2606
+ # Corresponds to the JSON property `args`
2607
+ # @return [Array<String>]
2608
+ attr_accessor :args
2609
+
2610
+ # Represents a custom encryption key configuration that can be applied to a
2611
+ # resource.
2612
+ # Corresponds to the JSON property `encryptionConfig`
2613
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1EncryptionConfig]
2614
+ attr_accessor :encryption_config
2615
+
2616
+ # Represents the configuration for a replica in a cluster.
2617
+ # Corresponds to the JSON property `evaluatorConfig`
2618
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig]
2619
+ attr_accessor :evaluator_config
2620
+
2621
+ # Optional. The number of evaluator replicas to use for the training job. Each
2622
+ # replica in the cluster will be of the type specified in `evaluator_type`. This
2623
+ # value can only be used when `scale_tier` is set to `CUSTOM`. If you set this
2624
+ # value, you must also set `evaluator_type`. The default value is zero.
2625
+ # Corresponds to the JSON property `evaluatorCount`
2626
+ # @return [Fixnum]
2627
+ attr_accessor :evaluator_count
2628
+
2629
+ # Optional. Specifies the type of virtual machine to use for your training job's
2630
+ # evaluator nodes. The supported values are the same as those described in the
2631
+ # entry for `masterType`. This value must be consistent with the category of
2632
+ # machine type that `masterType` uses. In other words, both must be Compute
2633
+ # Engine machine types or both must be legacy machine types. This value must be
2634
+ # present when `scaleTier` is set to `CUSTOM` and `evaluatorCount` is greater
2635
+ # than zero.
2636
+ # Corresponds to the JSON property `evaluatorType`
2637
+ # @return [String]
2638
+ attr_accessor :evaluator_type
2639
+
2640
+ # Represents a set of hyperparameters to optimize.
2641
+ # Corresponds to the JSON property `hyperparameters`
2642
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec]
2643
+ attr_accessor :hyperparameters
2644
+
2645
+ # Optional. A Google Cloud Storage path in which to store training outputs and
2646
+ # other data needed for training. This path is passed to your TensorFlow program
2647
+ # as the '--job-dir' command-line argument. The benefit of specifying this field
2648
+ # is that Cloud ML validates the path for use in training.
2649
+ # Corresponds to the JSON property `jobDir`
2650
+ # @return [String]
2651
+ attr_accessor :job_dir
2652
+
2653
+ # Represents the configuration for a replica in a cluster.
2654
+ # Corresponds to the JSON property `masterConfig`
2655
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig]
2656
+ attr_accessor :master_config
2657
+
2658
+ # Optional. Specifies the type of virtual machine to use for your training job's
2659
+ # master worker. You must specify this field when `scaleTier` is set to `CUSTOM`.
2660
+ # You can use certain Compute Engine machine types directly in this field. The
2661
+ # following types are supported: - `n1-standard-4` - `n1-standard-8` - `n1-
2662
+ # standard-16` - `n1-standard-32` - `n1-standard-64` - `n1-standard-96` - `n1-
2663
+ # highmem-2` - `n1-highmem-4` - `n1-highmem-8` - `n1-highmem-16` - `n1-highmem-
2664
+ # 32` - `n1-highmem-64` - `n1-highmem-96` - `n1-highcpu-16` - `n1-highcpu-32` - `
2665
+ # n1-highcpu-64` - `n1-highcpu-96` Learn more about [using Compute Engine
2666
+ # machine types](/ml-engine/docs/machine-types#compute-engine-machine-types).
2667
+ # Alternatively, you can use the following legacy machine types: - `standard` - `
2668
+ # large_model` - `complex_model_s` - `complex_model_m` - `complex_model_l` - `
2669
+ # standard_gpu` - `complex_model_m_gpu` - `complex_model_l_gpu` - `standard_p100`
2670
+ # - `complex_model_m_p100` - `standard_v100` - `large_model_v100` - `
2671
+ # complex_model_m_v100` - `complex_model_l_v100` Learn more about [using legacy
2672
+ # machine types](/ml-engine/docs/machine-types#legacy-machine-types). Finally,
2673
+ # if you want to use a TPU for training, specify `cloud_tpu` in this field.
2674
+ # Learn more about the [special configuration options for training with TPUs](/
2675
+ # ml-engine/docs/tensorflow/using-tpus#configuring_a_custom_tpu_machine).
2676
+ # Corresponds to the JSON property `masterType`
2677
+ # @return [String]
2678
+ attr_accessor :master_type
2679
+
2680
+ # Optional. The full name of the [Compute Engine network](/vpc/docs/vpc) to
2681
+ # which the Job is peered. For example, `projects/12345/global/networks/myVPC`.
2682
+ # The format of this field is `projects/`project`/global/networks/`network``,
2683
+ # where `project` is a project number (like `12345`) and `network` is network
2684
+ # name. Private services access must already be configured for the network. If
2685
+ # left unspecified, the Job is not peered with any network. [Learn about using
2686
+ # VPC Network Peering.](/ai-platform/training/docs/vpc-peering).
2687
+ # Corresponds to the JSON property `network`
2688
+ # @return [String]
2689
+ attr_accessor :network
2690
+
2691
+ # Required. The Google Cloud Storage location of the packages with the training
2692
+ # program and any additional dependencies. The maximum number of package URIs is
2693
+ # 100.
2694
+ # Corresponds to the JSON property `packageUris`
2695
+ # @return [Array<String>]
2696
+ attr_accessor :package_uris
2697
+
2698
+ # Represents the configuration for a replica in a cluster.
2699
+ # Corresponds to the JSON property `parameterServerConfig`
2700
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig]
2701
+ attr_accessor :parameter_server_config
2702
+
2703
+ # Optional. The number of parameter server replicas to use for the training job.
2704
+ # Each replica in the cluster will be of the type specified in `
2705
+ # parameter_server_type`. This value can only be used when `scale_tier` is set
2706
+ # to `CUSTOM`. If you set this value, you must also set `parameter_server_type`.
2707
+ # The default value is zero.
2708
+ # Corresponds to the JSON property `parameterServerCount`
2709
+ # @return [Fixnum]
2710
+ attr_accessor :parameter_server_count
2711
+
2712
+ # Optional. Specifies the type of virtual machine to use for your training job's
2713
+ # parameter server. The supported values are the same as those described in the
2714
+ # entry for `master_type`. This value must be consistent with the category of
2715
+ # machine type that `masterType` uses. In other words, both must be Compute
2716
+ # Engine machine types or both must be legacy machine types. This value must be
2717
+ # present when `scaleTier` is set to `CUSTOM` and `parameter_server_count` is
2718
+ # greater than zero.
2719
+ # Corresponds to the JSON property `parameterServerType`
2720
+ # @return [String]
2721
+ attr_accessor :parameter_server_type
2722
+
2723
+ # Required. The Python module name to run after installing the packages.
2724
+ # Corresponds to the JSON property `pythonModule`
2725
+ # @return [String]
2726
+ attr_accessor :python_module
2727
+
2728
+ # Optional. The version of Python used in training. You must either specify this
2729
+ # field or specify `masterConfig.imageUri`. The following Python versions are
2730
+ # available: * Python '3.7' is available when `runtime_version` is set to '1.15'
2731
+ # or later. * Python '3.5' is available when `runtime_version` is set to a
2732
+ # version from '1.4' to '1.14'. * Python '2.7' is available when `
2733
+ # runtime_version` is set to '1.15' or earlier. Read more about the Python
2734
+ # versions available for [each runtime version](/ml-engine/docs/runtime-version-
2735
+ # list).
2736
+ # Corresponds to the JSON property `pythonVersion`
2737
+ # @return [String]
2738
+ attr_accessor :python_version
2739
+
2740
+ # Required. The region to run the training job in. See the [available regions](/
2741
+ # ai-platform/training/docs/regions) for AI Platform Training.
2742
+ # Corresponds to the JSON property `region`
2743
+ # @return [String]
2744
+ attr_accessor :region
2745
+
2746
+ # Optional. The AI Platform runtime version to use for training. You must either
2747
+ # specify this field or specify `masterConfig.imageUri`. For more information,
2748
+ # see the [runtime version list](/ai-platform/training/docs/runtime-version-list)
2749
+ # and learn [how to manage runtime versions](/ai-platform/training/docs/
2750
+ # versioning).
2751
+ # Corresponds to the JSON property `runtimeVersion`
2752
+ # @return [String]
2753
+ attr_accessor :runtime_version
2754
+
2755
+ # Required. Specifies the machine types, the number of replicas for workers and
2756
+ # parameter servers.
2757
+ # Corresponds to the JSON property `scaleTier`
2758
+ # @return [String]
2759
+ attr_accessor :scale_tier
2760
+
2761
+ # All parameters related to scheduling of training jobs.
2762
+ # Corresponds to the JSON property `scheduling`
2763
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Scheduling]
2764
+ attr_accessor :scheduling
2765
+
2766
+ # Optional. The email address of a service account to use when running the
2767
+ # training appplication. You must have the `iam.serviceAccounts.actAs`
2768
+ # permission for the specified service account. In addition, the AI Platform
2769
+ # Training Google-managed service account must have the `roles/iam.
2770
+ # serviceAccountAdmin` role for the specified service account. [Learn more about
2771
+ # configuring a service account.](/ai-platform/training/docs/custom-service-
2772
+ # account) If not specified, the AI Platform Training Google-managed service
2773
+ # account is used by default.
2774
+ # Corresponds to the JSON property `serviceAccount`
2775
+ # @return [String]
2776
+ attr_accessor :service_account
2777
+
2778
+ # Optional. Use `chief` instead of `master` in the `TF_CONFIG` environment
2779
+ # variable when training with a custom container. Defaults to `false`. [Learn
2780
+ # more about this field.](/ai-platform/training/docs/distributed-training-
2781
+ # details#chief-versus-master) This field has no effect for training jobs that
2782
+ # don't use a custom container.
2783
+ # Corresponds to the JSON property `useChiefInTfConfig`
2784
+ # @return [Boolean]
2785
+ attr_accessor :use_chief_in_tf_config
2786
+ alias_method :use_chief_in_tf_config?, :use_chief_in_tf_config
2787
+
2788
+ # Represents the configuration for a replica in a cluster.
2789
+ # Corresponds to the JSON property `workerConfig`
2790
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ReplicaConfig]
2791
+ attr_accessor :worker_config
2792
+
2793
+ # Optional. The number of worker replicas to use for the training job. Each
2794
+ # replica in the cluster will be of the type specified in `worker_type`. This
2795
+ # value can only be used when `scale_tier` is set to `CUSTOM`. If you set this
2796
+ # value, you must also set `worker_type`. The default value is zero.
2797
+ # Corresponds to the JSON property `workerCount`
2798
+ # @return [Fixnum]
2799
+ attr_accessor :worker_count
2800
+
2801
+ # Optional. Specifies the type of virtual machine to use for your training job's
2802
+ # worker nodes. The supported values are the same as those described in the
2803
+ # entry for `masterType`. This value must be consistent with the category of
2804
+ # machine type that `masterType` uses. In other words, both must be Compute
2805
+ # Engine machine types or both must be legacy machine types. If you use `
2806
+ # cloud_tpu` for this value, see special instructions for [configuring a custom
2807
+ # TPU machine](/ml-engine/docs/tensorflow/using-tpus#
2808
+ # configuring_a_custom_tpu_machine). This value must be present when `scaleTier`
2809
+ # is set to `CUSTOM` and `workerCount` is greater than zero.
2810
+ # Corresponds to the JSON property `workerType`
2811
+ # @return [String]
2812
+ attr_accessor :worker_type
2813
+
2814
+ def initialize(**args)
2815
+ update!(**args)
2816
+ end
2817
+
2818
+ # Update properties of this object
2819
+ def update!(**args)
2820
+ @args = args[:args] if args.key?(:args)
2821
+ @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
2822
+ @evaluator_config = args[:evaluator_config] if args.key?(:evaluator_config)
2823
+ @evaluator_count = args[:evaluator_count] if args.key?(:evaluator_count)
2824
+ @evaluator_type = args[:evaluator_type] if args.key?(:evaluator_type)
2825
+ @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters)
2826
+ @job_dir = args[:job_dir] if args.key?(:job_dir)
2827
+ @master_config = args[:master_config] if args.key?(:master_config)
2828
+ @master_type = args[:master_type] if args.key?(:master_type)
2829
+ @network = args[:network] if args.key?(:network)
2830
+ @package_uris = args[:package_uris] if args.key?(:package_uris)
2831
+ @parameter_server_config = args[:parameter_server_config] if args.key?(:parameter_server_config)
2832
+ @parameter_server_count = args[:parameter_server_count] if args.key?(:parameter_server_count)
2833
+ @parameter_server_type = args[:parameter_server_type] if args.key?(:parameter_server_type)
2834
+ @python_module = args[:python_module] if args.key?(:python_module)
2835
+ @python_version = args[:python_version] if args.key?(:python_version)
2836
+ @region = args[:region] if args.key?(:region)
2837
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
2838
+ @scale_tier = args[:scale_tier] if args.key?(:scale_tier)
2839
+ @scheduling = args[:scheduling] if args.key?(:scheduling)
2840
+ @service_account = args[:service_account] if args.key?(:service_account)
2841
+ @use_chief_in_tf_config = args[:use_chief_in_tf_config] if args.key?(:use_chief_in_tf_config)
2842
+ @worker_config = args[:worker_config] if args.key?(:worker_config)
2843
+ @worker_count = args[:worker_count] if args.key?(:worker_count)
2844
+ @worker_type = args[:worker_type] if args.key?(:worker_type)
2845
+ end
2846
+ end
2847
+
2848
+ # Represents results of a training job. Output only.
2849
+ class GoogleCloudMlV1TrainingOutput
2850
+ include Google::Apis::Core::Hashable
2851
+
2852
+ # Represents output related to a built-in algorithm Job.
2853
+ # Corresponds to the JSON property `builtInAlgorithmOutput`
2854
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1BuiltInAlgorithmOutput]
2855
+ attr_accessor :built_in_algorithm_output
2856
+
2857
+ # The number of hyperparameter tuning trials that completed successfully. Only
2858
+ # set for hyperparameter tuning jobs.
2859
+ # Corresponds to the JSON property `completedTrialCount`
2860
+ # @return [Fixnum]
2861
+ attr_accessor :completed_trial_count
2862
+
2863
+ # The amount of ML units consumed by the job.
2864
+ # Corresponds to the JSON property `consumedMLUnits`
2865
+ # @return [Float]
2866
+ attr_accessor :consumed_ml_units
2867
+
2868
+ # The TensorFlow summary tag name used for optimizing hyperparameter tuning
2869
+ # trials. See [`HyperparameterSpec.hyperparameterMetricTag`](#HyperparameterSpec.
2870
+ # FIELDS.hyperparameter_metric_tag) for more information. Only set for
2871
+ # hyperparameter tuning jobs.
2872
+ # Corresponds to the JSON property `hyperparameterMetricTag`
2873
+ # @return [String]
2874
+ attr_accessor :hyperparameter_metric_tag
2875
+
2876
+ # Whether this job is a built-in Algorithm job.
2877
+ # Corresponds to the JSON property `isBuiltInAlgorithmJob`
2878
+ # @return [Boolean]
2879
+ attr_accessor :is_built_in_algorithm_job
2880
+ alias_method :is_built_in_algorithm_job?, :is_built_in_algorithm_job
2881
+
2882
+ # Whether this job is a hyperparameter tuning job.
2883
+ # Corresponds to the JSON property `isHyperparameterTuningJob`
2884
+ # @return [Boolean]
2885
+ attr_accessor :is_hyperparameter_tuning_job
2886
+ alias_method :is_hyperparameter_tuning_job?, :is_hyperparameter_tuning_job
2887
+
2888
+ # Results for individual Hyperparameter trials. Only set for hyperparameter
2889
+ # tuning jobs.
2890
+ # Corresponds to the JSON property `trials`
2891
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutput>]
2892
+ attr_accessor :trials
2893
+
2894
+ def initialize(**args)
2895
+ update!(**args)
2896
+ end
2897
+
2898
+ # Update properties of this object
2899
+ def update!(**args)
2900
+ @built_in_algorithm_output = args[:built_in_algorithm_output] if args.key?(:built_in_algorithm_output)
2901
+ @completed_trial_count = args[:completed_trial_count] if args.key?(:completed_trial_count)
2902
+ @consumed_ml_units = args[:consumed_ml_units] if args.key?(:consumed_ml_units)
2903
+ @hyperparameter_metric_tag = args[:hyperparameter_metric_tag] if args.key?(:hyperparameter_metric_tag)
2904
+ @is_built_in_algorithm_job = args[:is_built_in_algorithm_job] if args.key?(:is_built_in_algorithm_job)
2905
+ @is_hyperparameter_tuning_job = args[:is_hyperparameter_tuning_job] if args.key?(:is_hyperparameter_tuning_job)
2906
+ @trials = args[:trials] if args.key?(:trials)
2907
+ end
2908
+ end
2909
+
2910
+ # A message representing a trial.
2911
+ class GoogleCloudMlV1Trial
2912
+ include Google::Apis::Core::Hashable
2913
+
2914
+ # Output only. The identifier of the client that originally requested this trial.
2915
+ # Corresponds to the JSON property `clientId`
2916
+ # @return [String]
2917
+ attr_accessor :client_id
2918
+
2919
+ # Output only. Time at which the trial's status changed to COMPLETED.
2920
+ # Corresponds to the JSON property `endTime`
2921
+ # @return [String]
2922
+ attr_accessor :end_time
2923
+
2924
+ # A message representing a measurement.
2925
+ # Corresponds to the JSON property `finalMeasurement`
2926
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Measurement]
2927
+ attr_accessor :final_measurement
2928
+
2929
+ # Output only. A human readable string describing why the trial is infeasible.
2930
+ # This should only be set if trial_infeasible is true.
2931
+ # Corresponds to the JSON property `infeasibleReason`
2932
+ # @return [String]
2933
+ attr_accessor :infeasible_reason
2934
+
2935
+ # A list of measurements that are strictly lexicographically ordered by their
2936
+ # induced tuples (steps, elapsed_time). These are used for early stopping
2937
+ # computations.
2938
+ # Corresponds to the JSON property `measurements`
2939
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1Measurement>]
2940
+ attr_accessor :measurements
2941
+
2942
+ # Output only. Name of the trial assigned by the service.
2943
+ # Corresponds to the JSON property `name`
2944
+ # @return [String]
2945
+ attr_accessor :name
2946
+
2947
+ # The parameters of the trial.
2948
+ # Corresponds to the JSON property `parameters`
2949
+ # @return [Array<Google::Apis::MlV1::GoogleCloudMlV1TrialParameter>]
2950
+ attr_accessor :parameters
2951
+
2952
+ # Output only. Time at which the trial was started.
2953
+ # Corresponds to the JSON property `startTime`
2954
+ # @return [String]
2955
+ attr_accessor :start_time
2956
+
2957
+ # The detailed state of a trial.
2958
+ # Corresponds to the JSON property `state`
2959
+ # @return [String]
2960
+ attr_accessor :state
2961
+
2962
+ # Output only. If true, the parameters in this trial are not attempted again.
2963
+ # Corresponds to the JSON property `trialInfeasible`
2964
+ # @return [Boolean]
2965
+ attr_accessor :trial_infeasible
2966
+ alias_method :trial_infeasible?, :trial_infeasible
2967
+
2968
+ def initialize(**args)
2969
+ update!(**args)
2970
+ end
2971
+
2972
+ # Update properties of this object
2973
+ def update!(**args)
2974
+ @client_id = args[:client_id] if args.key?(:client_id)
2975
+ @end_time = args[:end_time] if args.key?(:end_time)
2976
+ @final_measurement = args[:final_measurement] if args.key?(:final_measurement)
2977
+ @infeasible_reason = args[:infeasible_reason] if args.key?(:infeasible_reason)
2978
+ @measurements = args[:measurements] if args.key?(:measurements)
2979
+ @name = args[:name] if args.key?(:name)
2980
+ @parameters = args[:parameters] if args.key?(:parameters)
2981
+ @start_time = args[:start_time] if args.key?(:start_time)
2982
+ @state = args[:state] if args.key?(:state)
2983
+ @trial_infeasible = args[:trial_infeasible] if args.key?(:trial_infeasible)
2984
+ end
2985
+ end
2986
+
2987
+ # Represents a version of the model. Each version is a trained model deployed in
2988
+ # the cloud, ready to handle prediction requests. A model can have multiple
2989
+ # versions. You can get information about all of the versions of a given model
2990
+ # by calling projects.models.versions.list.
2991
+ class GoogleCloudMlV1Version
2992
+ include Google::Apis::Core::Hashable
2993
+
2994
+ # Represents a hardware accelerator request config. Note that the
2995
+ # AcceleratorConfig can be used in both Jobs and Versions. Learn more about [
2996
+ # accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for
2997
+ # online prediction](/ml-engine/docs/machine-types-online-prediction#gpus).
2998
+ # Corresponds to the JSON property `acceleratorConfig`
2999
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1AcceleratorConfig]
3000
+ attr_accessor :accelerator_config
3001
+
3002
+ # Options for automatically scaling a model.
3003
+ # Corresponds to the JSON property `autoScaling`
3004
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1AutoScaling]
3005
+ attr_accessor :auto_scaling
3006
+
3007
+ # Specification of a custom container for serving predictions. This message is a
3008
+ # subset of the [Kubernetes Container v1 core specification](https://kubernetes.
3009
+ # io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).
3010
+ # Corresponds to the JSON property `container`
3011
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ContainerSpec]
3012
+ attr_accessor :container
3013
+
3014
+ # Output only. The time the version was created.
3015
+ # Corresponds to the JSON property `createTime`
3016
+ # @return [String]
3017
+ attr_accessor :create_time
3018
+
3019
+ # The Cloud Storage URI of a directory containing trained model artifacts to be
3020
+ # used to create the model version. See the [guide to deploying models](/ai-
3021
+ # platform/prediction/docs/deploying-models) for more information. The total
3022
+ # number of files under this directory must not exceed 1000. During projects.
3023
+ # models.versions.create, AI Platform Prediction copies all files from the
3024
+ # specified directory to a location managed by the service. From then on, AI
3025
+ # Platform Prediction uses these copies of the model artifacts to serve
3026
+ # predictions, not the original files in Cloud Storage, so this location is
3027
+ # useful only as a historical record. If you specify container, then this field
3028
+ # is optional. Otherwise, it is required. Learn [how to use this field with a
3029
+ # custom container](/ai-platform/prediction/docs/custom-container-requirements#
3030
+ # artifacts).
3031
+ # Corresponds to the JSON property `deploymentUri`
3032
+ # @return [String]
3033
+ attr_accessor :deployment_uri
3034
+
3035
+ # Optional. The description specified for the version when it was created.
3036
+ # Corresponds to the JSON property `description`
3037
+ # @return [String]
3038
+ attr_accessor :description
3039
+
3040
+ # Output only. The details of a failure or a cancellation.
3041
+ # Corresponds to the JSON property `errorMessage`
3042
+ # @return [String]
3043
+ attr_accessor :error_message
3044
+
3045
+ # `etag` is used for optimistic concurrency control as a way to help prevent
3046
+ # simultaneous updates of a model from overwriting each other. It is strongly
3047
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
3048
+ # to perform model updates in order to avoid race conditions: An `etag` is
3049
+ # returned in the response to `GetVersion`, and systems are expected to put that
3050
+ # etag in the request to `UpdateVersion` to ensure that their change will be
3051
+ # applied to the model as intended.
3052
+ # Corresponds to the JSON property `etag`
3053
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
3054
+ # @return [String]
3055
+ attr_accessor :etag
3056
+
3057
+ # Message holding configuration options for explaining model predictions. There
3058
+ # are three feature attribution methods supported for TensorFlow models:
3059
+ # integrated gradients, sampled Shapley, and XRAI. [Learn more about feature
3060
+ # attributions.](/ai-platform/prediction/docs/ai-explanations/overview)
3061
+ # Corresponds to the JSON property `explanationConfig`
3062
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ExplanationConfig]
3063
+ attr_accessor :explanation_config
3064
+
3065
+ # Optional. The machine learning framework AI Platform uses to train this
3066
+ # version of the model. Valid values are `TENSORFLOW`, `SCIKIT_LEARN`, `XGBOOST`.
3067
+ # If you do not specify a framework, AI Platform will analyze files in the
3068
+ # deployment_uri to determine a framework. If you choose `SCIKIT_LEARN` or `
3069
+ # XGBOOST`, you must also set the runtime version of the model to 1.4 or greater.
3070
+ # Do **not** specify a framework if you're deploying a [custom prediction
3071
+ # routine](/ai-platform/prediction/docs/custom-prediction-routines) or if you're
3072
+ # using a [custom container](/ai-platform/prediction/docs/use-custom-container).
3073
+ # Corresponds to the JSON property `framework`
3074
+ # @return [String]
3075
+ attr_accessor :framework
3076
+
3077
+ # Output only. If true, this version will be used to handle prediction requests
3078
+ # that do not specify a version. You can change the default version by calling
3079
+ # projects.methods.versions.setDefault.
3080
+ # Corresponds to the JSON property `isDefault`
3081
+ # @return [Boolean]
3082
+ attr_accessor :is_default
3083
+ alias_method :is_default?, :is_default
3084
+
3085
+ # Optional. One or more labels that you can add, to organize your model versions.
3086
+ # Each label is a key-value pair, where both the key and the value are
3087
+ # arbitrary strings that you supply. For more information, see the documentation
3088
+ # on using labels.
3089
+ # Corresponds to the JSON property `labels`
3090
+ # @return [Hash<String,String>]
3091
+ attr_accessor :labels
3092
+
3093
+ # Output only. The time the version was last used for prediction.
3094
+ # Corresponds to the JSON property `lastUseTime`
3095
+ # @return [String]
3096
+ attr_accessor :last_use_time
3097
+
3098
+ # Optional. The type of machine on which to serve the model. Currently only
3099
+ # applies to online prediction service. If this field is not specified, it
3100
+ # defaults to `mls1-c1-m2`. Online prediction supports the following machine
3101
+ # types: * `mls1-c1-m2` * `mls1-c4-m2` * `n1-standard-2` * `n1-standard-4` * `n1-
3102
+ # standard-8` * `n1-standard-16` * `n1-standard-32` * `n1-highmem-2` * `n1-
3103
+ # highmem-4` * `n1-highmem-8` * `n1-highmem-16` * `n1-highmem-32` * `n1-highcpu-
3104
+ # 2` * `n1-highcpu-4` * `n1-highcpu-8` * `n1-highcpu-16` * `n1-highcpu-32` `mls1-
3105
+ # c4-m2` is in beta. All other machine types are generally available. Learn more
3106
+ # about the [differences between machine types](/ml-engine/docs/machine-types-
3107
+ # online-prediction).
3108
+ # Corresponds to the JSON property `machineType`
3109
+ # @return [String]
3110
+ attr_accessor :machine_type
3111
+
3112
+ # Options for manually scaling a model.
3113
+ # Corresponds to the JSON property `manualScaling`
3114
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ManualScaling]
3115
+ attr_accessor :manual_scaling
3116
+
3117
+ # Required. The name specified for the version when it was created. The version
3118
+ # name must be unique within the model it is created in.
3119
+ # Corresponds to the JSON property `name`
3120
+ # @return [String]
3121
+ attr_accessor :name
3122
+
3123
+ # Optional. Cloud Storage paths (`gs://…`) of packages for [custom prediction
3124
+ # routines](/ml-engine/docs/tensorflow/custom-prediction-routines) or [scikit-
3125
+ # learn pipelines with custom code](/ml-engine/docs/scikit/exporting-for-
3126
+ # prediction#custom-pipeline-code). For a custom prediction routine, one of
3127
+ # these packages must contain your Predictor class (see [`predictionClass`](#
3128
+ # Version.FIELDS.prediction_class)). Additionally, include any dependencies used
3129
+ # by your Predictor or scikit-learn pipeline uses that are not already included
3130
+ # in your selected [runtime version](/ml-engine/docs/tensorflow/runtime-version-
3131
+ # list). If you specify this field, you must also set [`runtimeVersion`](#
3132
+ # Version.FIELDS.runtime_version) to 1.4 or greater.
3133
+ # Corresponds to the JSON property `packageUris`
3134
+ # @return [Array<String>]
3135
+ attr_accessor :package_uris
3136
+
3137
+ # Optional. The fully qualified name (module_name.class_name) of a class that
3138
+ # implements the Predictor interface described in this reference field. The
3139
+ # module containing this class should be included in a package provided to the [`
3140
+ # packageUris` field](#Version.FIELDS.package_uris). Specify this field if and
3141
+ # only if you are deploying a [custom prediction routine (beta)](/ml-engine/docs/
3142
+ # tensorflow/custom-prediction-routines). If you specify this field, you must
3143
+ # set [`runtimeVersion`](#Version.FIELDS.runtime_version) to 1.4 or greater and
3144
+ # you must set `machineType` to a [legacy (MLS1) machine type](/ml-engine/docs/
3145
+ # machine-types-online-prediction). The following code sample provides the
3146
+ # Predictor interface: class Predictor(object): """Interface for constructing
3147
+ # custom predictors.""" def predict(self, instances, **kwargs): """Performs
3148
+ # custom prediction. Instances are the decoded values from the request. They
3149
+ # have already been deserialized from JSON. Args: instances: A list of
3150
+ # prediction input instances. **kwargs: A dictionary of keyword args provided as
3151
+ # additional fields on the predict request body. Returns: A list of outputs
3152
+ # containing the prediction results. This list must be JSON serializable. """
3153
+ # raise NotImplementedError() @classmethod def from_path(cls, model_dir): """
3154
+ # Creates an instance of Predictor using the given path. Loading of the
3155
+ # predictor should be done in this method. Args: model_dir: The local directory
3156
+ # that contains the exported model file along with any additional files uploaded
3157
+ # when creating the version resource. Returns: An instance implementing this
3158
+ # Predictor class. """ raise NotImplementedError() Learn more about [the
3159
+ # Predictor interface and custom prediction routines](/ml-engine/docs/tensorflow/
3160
+ # custom-prediction-routines).
3161
+ # Corresponds to the JSON property `predictionClass`
3162
+ # @return [String]
3163
+ attr_accessor :prediction_class
3164
+
3165
+ # Required. The version of Python used in prediction. The following Python
3166
+ # versions are available: * Python '3.7' is available when `runtime_version` is
3167
+ # set to '1.15' or later. * Python '3.5' is available when `runtime_version` is
3168
+ # set to a version from '1.4' to '1.14'. * Python '2.7' is available when `
3169
+ # runtime_version` is set to '1.15' or earlier. Read more about the Python
3170
+ # versions available for [each runtime version](/ml-engine/docs/runtime-version-
3171
+ # list).
3172
+ # Corresponds to the JSON property `pythonVersion`
3173
+ # @return [String]
3174
+ attr_accessor :python_version
3175
+
3176
+ # Configuration for logging request-response pairs to a BigQuery table. Online
3177
+ # prediction requests to a model version and the responses to these requests are
3178
+ # converted to raw strings and saved to the specified BigQuery table. Logging is
3179
+ # constrained by [BigQuery quotas and limits](/bigquery/quotas). If your project
3180
+ # exceeds BigQuery quotas or limits, AI Platform Prediction does not log request-
3181
+ # response pairs, but it continues to serve predictions. If you are using [
3182
+ # continuous evaluation](/ml-engine/docs/continuous-evaluation/), you do not
3183
+ # need to specify this configuration manually. Setting up continuous evaluation
3184
+ # automatically enables logging of request-response pairs.
3185
+ # Corresponds to the JSON property `requestLoggingConfig`
3186
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1RequestLoggingConfig]
3187
+ attr_accessor :request_logging_config
3188
+
3189
+ # Specifies HTTP paths served by a custom container. AI Platform Prediction
3190
+ # sends requests to these paths on the container; the custom container must run
3191
+ # an HTTP server that responds to these requests with appropriate responses.
3192
+ # Read [Custom container requirements](/ai-platform/prediction/docs/custom-
3193
+ # container-requirements) for details on how to create your container image to
3194
+ # meet these requirements.
3195
+ # Corresponds to the JSON property `routes`
3196
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1RouteMap]
3197
+ attr_accessor :routes
3198
+
3199
+ # Required. The AI Platform runtime version to use for this deployment. For more
3200
+ # information, see the [runtime version list](/ml-engine/docs/runtime-version-
3201
+ # list) and [how to manage runtime versions](/ml-engine/docs/versioning).
3202
+ # Corresponds to the JSON property `runtimeVersion`
3203
+ # @return [String]
3204
+ attr_accessor :runtime_version
3205
+
3206
+ # Optional. Specifies the service account for resource access control. If you
3207
+ # specify this field, then you must also specify either the `containerSpec` or
3208
+ # the `predictionClass` field. Learn more about [using a custom service account](
3209
+ # /ai-platform/prediction/docs/custom-service-account).
3210
+ # Corresponds to the JSON property `serviceAccount`
3211
+ # @return [String]
3212
+ attr_accessor :service_account
3213
+
3214
+ # Output only. The state of a version.
3215
+ # Corresponds to the JSON property `state`
3216
+ # @return [String]
3217
+ attr_accessor :state
3218
+
3219
+ def initialize(**args)
3220
+ update!(**args)
3221
+ end
3222
+
3223
+ # Update properties of this object
3224
+ def update!(**args)
3225
+ @accelerator_config = args[:accelerator_config] if args.key?(:accelerator_config)
3226
+ @auto_scaling = args[:auto_scaling] if args.key?(:auto_scaling)
3227
+ @container = args[:container] if args.key?(:container)
3228
+ @create_time = args[:create_time] if args.key?(:create_time)
3229
+ @deployment_uri = args[:deployment_uri] if args.key?(:deployment_uri)
3230
+ @description = args[:description] if args.key?(:description)
3231
+ @error_message = args[:error_message] if args.key?(:error_message)
3232
+ @etag = args[:etag] if args.key?(:etag)
3233
+ @explanation_config = args[:explanation_config] if args.key?(:explanation_config)
3234
+ @framework = args[:framework] if args.key?(:framework)
3235
+ @is_default = args[:is_default] if args.key?(:is_default)
3236
+ @labels = args[:labels] if args.key?(:labels)
3237
+ @last_use_time = args[:last_use_time] if args.key?(:last_use_time)
3238
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
3239
+ @manual_scaling = args[:manual_scaling] if args.key?(:manual_scaling)
3240
+ @name = args[:name] if args.key?(:name)
3241
+ @package_uris = args[:package_uris] if args.key?(:package_uris)
3242
+ @prediction_class = args[:prediction_class] if args.key?(:prediction_class)
3243
+ @python_version = args[:python_version] if args.key?(:python_version)
3244
+ @request_logging_config = args[:request_logging_config] if args.key?(:request_logging_config)
3245
+ @routes = args[:routes] if args.key?(:routes)
3246
+ @runtime_version = args[:runtime_version] if args.key?(:runtime_version)
3247
+ @service_account = args[:service_account] if args.key?(:service_account)
3248
+ @state = args[:state] if args.key?(:state)
3249
+ end
3250
+ end
3251
+
3252
+ # Attributes credit by computing the XRAI taking advantage of the model's fully
3253
+ # differentiable structure. Refer to this paper for more details: https://arxiv.
3254
+ # org/abs/1906.02825 Currently only implemented for models with natural image
3255
+ # inputs.
3256
+ class GoogleCloudMlV1XraiAttribution
3257
+ include Google::Apis::Core::Hashable
3258
+
3259
+ # Number of steps for approximating the path integral. A good value to start is
3260
+ # 50 and gradually increase until the sum to diff property is met within the
3261
+ # desired error range.
3262
+ # Corresponds to the JSON property `numIntegralSteps`
3263
+ # @return [Fixnum]
3264
+ attr_accessor :num_integral_steps
3265
+
3266
+ def initialize(**args)
3267
+ update!(**args)
3268
+ end
3269
+
3270
+ # Update properties of this object
3271
+ def update!(**args)
3272
+ @num_integral_steps = args[:num_integral_steps] if args.key?(:num_integral_steps)
3273
+ end
3274
+ end
3275
+
3276
+ # Specifies the audit configuration for a service. The configuration determines
3277
+ # which permission types are logged, and what identities, if any, are exempted
3278
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
3279
+ # are AuditConfigs for both `allServices` and a specific service, the union of
3280
+ # the two AuditConfigs is used for that service: the log_types specified in each
3281
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
3282
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
3283
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
3284
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
3285
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
3286
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
3287
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
3288
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
3289
+ # exempts jose@example.com from DATA_READ logging, and aliya@example.com from
3290
+ # DATA_WRITE logging.
3291
+ class GoogleIamV1AuditConfig
3292
+ include Google::Apis::Core::Hashable
3293
+
3294
+ # The configuration for logging of each type of permission.
3295
+ # Corresponds to the JSON property `auditLogConfigs`
3296
+ # @return [Array<Google::Apis::MlV1::GoogleIamV1AuditLogConfig>]
3297
+ attr_accessor :audit_log_configs
3298
+
3299
+ # Specifies a service that will be enabled for audit logging. For example, `
3300
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
3301
+ # value that covers all services.
3302
+ # Corresponds to the JSON property `service`
3303
+ # @return [String]
3304
+ attr_accessor :service
3305
+
3306
+ def initialize(**args)
3307
+ update!(**args)
3308
+ end
3309
+
3310
+ # Update properties of this object
3311
+ def update!(**args)
3312
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
3313
+ @service = args[:service] if args.key?(:service)
3314
+ end
3315
+ end
3316
+
3317
+ # Provides the configuration for logging a type of permissions. Example: ` "
3318
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
3319
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
3320
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
3321
+ # DATA_READ logging.
3322
+ class GoogleIamV1AuditLogConfig
3323
+ include Google::Apis::Core::Hashable
3324
+
3325
+ # Specifies the identities that do not cause logging for this type of permission.
3326
+ # Follows the same format of Binding.members.
3327
+ # Corresponds to the JSON property `exemptedMembers`
3328
+ # @return [Array<String>]
3329
+ attr_accessor :exempted_members
3330
+
3331
+ # The log type that this config enables.
3332
+ # Corresponds to the JSON property `logType`
3333
+ # @return [String]
3334
+ attr_accessor :log_type
3335
+
3336
+ def initialize(**args)
3337
+ update!(**args)
3338
+ end
3339
+
3340
+ # Update properties of this object
3341
+ def update!(**args)
3342
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
3343
+ @log_type = args[:log_type] if args.key?(:log_type)
3344
+ end
3345
+ end
3346
+
3347
+ # Associates `members` with a `role`.
3348
+ class GoogleIamV1Binding
3349
+ include Google::Apis::Core::Hashable
3350
+
3351
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
3352
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
3353
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
3354
+ # "Summary size limit" description: "Determines if a summary is less than 100
3355
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
3356
+ # Requestor is owner" description: "Determines if requestor is the document
3357
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
3358
+ # Logic): title: "Public documents" description: "Determine whether the document
3359
+ # should be publicly visible" expression: "document.type != 'private' &&
3360
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
3361
+ # string" description: "Create a notification string with a timestamp."
3362
+ # expression: "'New message received at ' + string(document.create_time)" The
3363
+ # exact variables and functions that may be referenced within an expression are
3364
+ # determined by the service that evaluates it. See the service documentation for
3365
+ # additional information.
3366
+ # Corresponds to the JSON property `condition`
3367
+ # @return [Google::Apis::MlV1::GoogleTypeExpr]
3368
+ attr_accessor :condition
3369
+
3370
+ # Specifies the identities requesting access for a Cloud Platform resource. `
3371
+ # members` can have the following values: * `allUsers`: A special identifier
3372
+ # that represents anyone who is on the internet; with or without a Google
3373
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
3374
+ # anyone who is authenticated with a Google account or a service account. * `
3375
+ # user:`emailid``: An email address that represents a specific Google account.
3376
+ # For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
3377
+ # address that represents a service account. For example, `my-other-app@appspot.
3378
+ # gserviceaccount.com`. * `group:`emailid``: An email address that represents a
3379
+ # Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
3380
+ # `uniqueid``: An email address (plus unique identifier) representing a user
3381
+ # that has been recently deleted. For example, `alice@example.com?uid=
3382
+ # 123456789012345678901`. If the user is recovered, this value reverts to `user:`
3383
+ # emailid`` and the recovered user retains the role in the binding. * `deleted:
3384
+ # serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
3385
+ # identifier) representing a service account that has been recently deleted. For
3386
+ # example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
3387
+ # If the service account is undeleted, this value reverts to `serviceAccount:`
3388
+ # emailid`` and the undeleted service account retains the role in the binding. *
3389
+ # `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
3390
+ # identifier) representing a Google group that has been recently deleted. For
3391
+ # example, `admins@example.com?uid=123456789012345678901`. If the group is
3392
+ # recovered, this value reverts to `group:`emailid`` and the recovered group
3393
+ # retains the role in the binding. * `domain:`domain``: The G Suite domain (
3394
+ # primary) that represents all the users of that domain. For example, `google.
3395
+ # com` or `example.com`.
3396
+ # Corresponds to the JSON property `members`
3397
+ # @return [Array<String>]
3398
+ attr_accessor :members
3399
+
3400
+ # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`
3401
+ # , or `roles/owner`.
3402
+ # Corresponds to the JSON property `role`
3403
+ # @return [String]
3404
+ attr_accessor :role
3405
+
3406
+ def initialize(**args)
3407
+ update!(**args)
3408
+ end
3409
+
3410
+ # Update properties of this object
3411
+ def update!(**args)
3412
+ @condition = args[:condition] if args.key?(:condition)
3413
+ @members = args[:members] if args.key?(:members)
3414
+ @role = args[:role] if args.key?(:role)
3415
+ end
3416
+ end
3417
+
3418
+ # An Identity and Access Management (IAM) policy, which specifies access
3419
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
3420
+ # A `binding` binds one or more `members` to a single `role`. Members can be
3421
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
3422
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
3423
+ # role or a user-created custom role. For some types of Google Cloud resources,
3424
+ # a `binding` can also specify a `condition`, which is a logical expression that
3425
+ # allows access to a resource only if the expression evaluates to `true`. A
3426
+ # condition can add constraints based on attributes of the request, the resource,
3427
+ # or both. To learn which resources support conditions in their IAM policies,
3428
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
3429
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
3430
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
3431
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
3432
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
3433
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
3434
+ # title": "expirable access", "description": "Does not grant access after Sep
3435
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
3436
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
3437
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
3438
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
3439
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
3440
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
3441
+ # description: Does not grant access after Sep 2020 expression: request.time <
3442
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
3443
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
3444
+ # google.com/iam/docs/).
3445
+ class GoogleIamV1Policy
3446
+ include Google::Apis::Core::Hashable
3447
+
3448
+ # Specifies cloud audit logging configuration for this policy.
3449
+ # Corresponds to the JSON property `auditConfigs`
3450
+ # @return [Array<Google::Apis::MlV1::GoogleIamV1AuditConfig>]
3451
+ attr_accessor :audit_configs
3452
+
3453
+ # Associates a list of `members` to a `role`. Optionally, may specify a `
3454
+ # condition` that determines how and when the `bindings` are applied. Each of
3455
+ # the `bindings` must contain at least one member.
3456
+ # Corresponds to the JSON property `bindings`
3457
+ # @return [Array<Google::Apis::MlV1::GoogleIamV1Binding>]
3458
+ attr_accessor :bindings
3459
+
3460
+ # `etag` is used for optimistic concurrency control as a way to help prevent
3461
+ # simultaneous updates of a policy from overwriting each other. It is strongly
3462
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
3463
+ # to perform policy updates in order to avoid race conditions: An `etag` is
3464
+ # returned in the response to `getIamPolicy`, and systems are expected to put
3465
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
3466
+ # applied to the same version of the policy. **Important:** If you use IAM
3467
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
3468
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
3469
+ # with a version `1` policy, and all of the conditions in the version `3` policy
3470
+ # are lost.
3471
+ # Corresponds to the JSON property `etag`
3472
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
3473
+ # @return [String]
3474
+ attr_accessor :etag
3475
+
3476
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
3477
+ # Requests that specify an invalid value are rejected. Any operation that
3478
+ # affects conditional role bindings must specify version `3`. This requirement
3479
+ # applies to the following operations: * Getting a policy that includes a
3480
+ # conditional role binding * Adding a conditional role binding to a policy *
3481
+ # Changing a conditional role binding in a policy * Removing any role binding,
3482
+ # with or without a condition, from a policy that includes conditions **
3483
+ # Important:** If you use IAM Conditions, you must include the `etag` field
3484
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
3485
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
3486
+ # conditions in the version `3` policy are lost. If a policy does not include
3487
+ # any conditions, operations on that policy may specify any valid version or
3488
+ # leave the field unset. To learn which resources support conditions in their
3489
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
3490
+ # conditions/resource-policies).
3491
+ # Corresponds to the JSON property `version`
3492
+ # @return [Fixnum]
3493
+ attr_accessor :version
3494
+
3495
+ def initialize(**args)
3496
+ update!(**args)
3497
+ end
3498
+
3499
+ # Update properties of this object
3500
+ def update!(**args)
3501
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
3502
+ @bindings = args[:bindings] if args.key?(:bindings)
3503
+ @etag = args[:etag] if args.key?(:etag)
3504
+ @version = args[:version] if args.key?(:version)
3505
+ end
3506
+ end
3507
+
3508
+ # Request message for `SetIamPolicy` method.
3509
+ class GoogleIamV1SetIamPolicyRequest
3510
+ include Google::Apis::Core::Hashable
3511
+
3512
+ # An Identity and Access Management (IAM) policy, which specifies access
3513
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
3514
+ # A `binding` binds one or more `members` to a single `role`. Members can be
3515
+ # user accounts, service accounts, Google groups, and domains (such as G Suite).
3516
+ # A `role` is a named list of permissions; each `role` can be an IAM predefined
3517
+ # role or a user-created custom role. For some types of Google Cloud resources,
3518
+ # a `binding` can also specify a `condition`, which is a logical expression that
3519
+ # allows access to a resource only if the expression evaluates to `true`. A
3520
+ # condition can add constraints based on attributes of the request, the resource,
3521
+ # or both. To learn which resources support conditions in their IAM policies,
3522
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
3523
+ # resource-policies). **JSON example:** ` "bindings": [ ` "role": "roles/
3524
+ # resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "
3525
+ # group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@
3526
+ # appspot.gserviceaccount.com" ] `, ` "role": "roles/resourcemanager.
3527
+ # organizationViewer", "members": [ "user:eve@example.com" ], "condition": ` "
3528
+ # title": "expirable access", "description": "Does not grant access after Sep
3529
+ # 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", `
3530
+ # ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:** bindings: -
3531
+ # members: - user:mike@example.com - group:admins@example.com - domain:google.
3532
+ # com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/
3533
+ # resourcemanager.organizationAdmin - members: - user:eve@example.com role:
3534
+ # roles/resourcemanager.organizationViewer condition: title: expirable access
3535
+ # description: Does not grant access after Sep 2020 expression: request.time <
3536
+ # timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version: 3 For a
3537
+ # description of IAM and its features, see the [IAM documentation](https://cloud.
3538
+ # google.com/iam/docs/).
3539
+ # Corresponds to the JSON property `policy`
3540
+ # @return [Google::Apis::MlV1::GoogleIamV1Policy]
3541
+ attr_accessor :policy
3542
+
3543
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
3544
+ # the fields in the mask will be modified. If no mask is provided, the following
3545
+ # default mask is used: `paths: "bindings, etag"`
3546
+ # Corresponds to the JSON property `updateMask`
3547
+ # @return [String]
3548
+ attr_accessor :update_mask
3549
+
3550
+ def initialize(**args)
3551
+ update!(**args)
3552
+ end
3553
+
3554
+ # Update properties of this object
3555
+ def update!(**args)
3556
+ @policy = args[:policy] if args.key?(:policy)
3557
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
3558
+ end
3559
+ end
3560
+
3561
+ # Request message for `TestIamPermissions` method.
3562
+ class GoogleIamV1TestIamPermissionsRequest
3563
+ include Google::Apis::Core::Hashable
3564
+
3565
+ # The set of permissions to check for the `resource`. Permissions with wildcards
3566
+ # (such as '*' or 'storage.*') are not allowed. For more information see [IAM
3567
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
3568
+ # Corresponds to the JSON property `permissions`
3569
+ # @return [Array<String>]
3570
+ attr_accessor :permissions
3571
+
3572
+ def initialize(**args)
3573
+ update!(**args)
3574
+ end
3575
+
3576
+ # Update properties of this object
3577
+ def update!(**args)
3578
+ @permissions = args[:permissions] if args.key?(:permissions)
3579
+ end
3580
+ end
3581
+
3582
+ # Response message for `TestIamPermissions` method.
3583
+ class GoogleIamV1TestIamPermissionsResponse
3584
+ include Google::Apis::Core::Hashable
3585
+
3586
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
3587
+ # Corresponds to the JSON property `permissions`
3588
+ # @return [Array<String>]
3589
+ attr_accessor :permissions
3590
+
3591
+ def initialize(**args)
3592
+ update!(**args)
3593
+ end
3594
+
3595
+ # Update properties of this object
3596
+ def update!(**args)
3597
+ @permissions = args[:permissions] if args.key?(:permissions)
3598
+ end
3599
+ end
3600
+
3601
+ # The response message for Operations.ListOperations.
3602
+ class GoogleLongrunningListOperationsResponse
3603
+ include Google::Apis::Core::Hashable
3604
+
3605
+ # The standard List next-page token.
3606
+ # Corresponds to the JSON property `nextPageToken`
3607
+ # @return [String]
3608
+ attr_accessor :next_page_token
3609
+
3610
+ # A list of operations that matches the specified filter in the request.
3611
+ # Corresponds to the JSON property `operations`
3612
+ # @return [Array<Google::Apis::MlV1::GoogleLongrunningOperation>]
3613
+ attr_accessor :operations
3614
+
3615
+ def initialize(**args)
3616
+ update!(**args)
3617
+ end
3618
+
3619
+ # Update properties of this object
3620
+ def update!(**args)
3621
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3622
+ @operations = args[:operations] if args.key?(:operations)
3623
+ end
3624
+ end
3625
+
3626
+ # This resource represents a long-running operation that is the result of a
3627
+ # network API call.
3628
+ class GoogleLongrunningOperation
3629
+ include Google::Apis::Core::Hashable
3630
+
3631
+ # If the value is `false`, it means the operation is still in progress. If `true`
3632
+ # , the operation is completed, and either `error` or `response` is available.
3633
+ # Corresponds to the JSON property `done`
3634
+ # @return [Boolean]
3635
+ attr_accessor :done
3636
+ alias_method :done?, :done
3637
+
3638
+ # The `Status` type defines a logical error model that is suitable for different
3639
+ # programming environments, including REST APIs and RPC APIs. It is used by [
3640
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
3641
+ # data: error code, error message, and error details. You can find out more
3642
+ # about this error model and how to work with it in the [API Design Guide](https:
3643
+ # //cloud.google.com/apis/design/errors).
3644
+ # Corresponds to the JSON property `error`
3645
+ # @return [Google::Apis::MlV1::GoogleRpcStatus]
3646
+ attr_accessor :error
3647
+
3648
+ # Service-specific metadata associated with the operation. It typically contains
3649
+ # progress information and common metadata such as create time. Some services
3650
+ # might not provide such metadata. Any method that returns a long-running
3651
+ # operation should document the metadata type, if any.
3652
+ # Corresponds to the JSON property `metadata`
3653
+ # @return [Hash<String,Object>]
3654
+ attr_accessor :metadata
3655
+
3656
+ # The server-assigned name, which is only unique within the same service that
3657
+ # originally returns it. If you use the default HTTP mapping, the `name` should
3658
+ # be a resource name ending with `operations/`unique_id``.
3659
+ # Corresponds to the JSON property `name`
3660
+ # @return [String]
3661
+ attr_accessor :name
3662
+
3663
+ # The normal response of the operation in case of success. If the original
3664
+ # method returns no data on success, such as `Delete`, the response is `google.
3665
+ # protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
3666
+ # the response should be the resource. For other methods, the response should
3667
+ # have the type `XxxResponse`, where `Xxx` is the original method name. For
3668
+ # example, if the original method name is `TakeSnapshot()`, the inferred
3669
+ # response type is `TakeSnapshotResponse`.
3670
+ # Corresponds to the JSON property `response`
3671
+ # @return [Hash<String,Object>]
3672
+ attr_accessor :response
3673
+
3674
+ def initialize(**args)
3675
+ update!(**args)
3676
+ end
3677
+
3678
+ # Update properties of this object
3679
+ def update!(**args)
3680
+ @done = args[:done] if args.key?(:done)
3681
+ @error = args[:error] if args.key?(:error)
3682
+ @metadata = args[:metadata] if args.key?(:metadata)
3683
+ @name = args[:name] if args.key?(:name)
3684
+ @response = args[:response] if args.key?(:response)
3685
+ end
3686
+ end
3687
+
3688
+ # A generic empty message that you can re-use to avoid defining duplicated empty
3689
+ # messages in your APIs. A typical example is to use it as the request or the
3690
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
3691
+ # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
3692
+ # `Empty` is empty JSON object ````.
3693
+ class GoogleProtobufEmpty
3694
+ include Google::Apis::Core::Hashable
3695
+
3696
+ def initialize(**args)
3697
+ update!(**args)
3698
+ end
3699
+
3700
+ # Update properties of this object
3701
+ def update!(**args)
3702
+ end
3703
+ end
3704
+
3705
+ # The `Status` type defines a logical error model that is suitable for different
3706
+ # programming environments, including REST APIs and RPC APIs. It is used by [
3707
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
3708
+ # data: error code, error message, and error details. You can find out more
3709
+ # about this error model and how to work with it in the [API Design Guide](https:
3710
+ # //cloud.google.com/apis/design/errors).
3711
+ class GoogleRpcStatus
3712
+ include Google::Apis::Core::Hashable
3713
+
3714
+ # The status code, which should be an enum value of google.rpc.Code.
3715
+ # Corresponds to the JSON property `code`
3716
+ # @return [Fixnum]
3717
+ attr_accessor :code
3718
+
3719
+ # A list of messages that carry the error details. There is a common set of
3720
+ # message types for APIs to use.
3721
+ # Corresponds to the JSON property `details`
3722
+ # @return [Array<Hash<String,Object>>]
3723
+ attr_accessor :details
3724
+
3725
+ # A developer-facing error message, which should be in English. Any user-facing
3726
+ # error message should be localized and sent in the google.rpc.Status.details
3727
+ # field, or localized by the client.
3728
+ # Corresponds to the JSON property `message`
3729
+ # @return [String]
3730
+ attr_accessor :message
3731
+
3732
+ def initialize(**args)
3733
+ update!(**args)
3734
+ end
3735
+
3736
+ # Update properties of this object
3737
+ def update!(**args)
3738
+ @code = args[:code] if args.key?(:code)
3739
+ @details = args[:details] if args.key?(:details)
3740
+ @message = args[:message] if args.key?(:message)
3741
+ end
3742
+ end
3743
+
3744
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
3745
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
3746
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
3747
+ # "Summary size limit" description: "Determines if a summary is less than 100
3748
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
3749
+ # Requestor is owner" description: "Determines if requestor is the document
3750
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
3751
+ # Logic): title: "Public documents" description: "Determine whether the document
3752
+ # should be publicly visible" expression: "document.type != 'private' &&
3753
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
3754
+ # string" description: "Create a notification string with a timestamp."
3755
+ # expression: "'New message received at ' + string(document.create_time)" The
3756
+ # exact variables and functions that may be referenced within an expression are
3757
+ # determined by the service that evaluates it. See the service documentation for
3758
+ # additional information.
3759
+ class GoogleTypeExpr
3760
+ include Google::Apis::Core::Hashable
3761
+
3762
+ # Optional. Description of the expression. This is a longer text which describes
3763
+ # the expression, e.g. when hovered over it in a UI.
3764
+ # Corresponds to the JSON property `description`
3765
+ # @return [String]
3766
+ attr_accessor :description
3767
+
3768
+ # Textual representation of an expression in Common Expression Language syntax.
3769
+ # Corresponds to the JSON property `expression`
3770
+ # @return [String]
3771
+ attr_accessor :expression
3772
+
3773
+ # Optional. String indicating the location of the expression for error reporting,
3774
+ # e.g. a file name and a position in the file.
3775
+ # Corresponds to the JSON property `location`
3776
+ # @return [String]
3777
+ attr_accessor :location
3778
+
3779
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
3780
+ # This can be used e.g. in UIs which allow to enter the expression.
3781
+ # Corresponds to the JSON property `title`
3782
+ # @return [String]
3783
+ attr_accessor :title
3784
+
3785
+ def initialize(**args)
3786
+ update!(**args)
3787
+ end
3788
+
3789
+ # Update properties of this object
3790
+ def update!(**args)
3791
+ @description = args[:description] if args.key?(:description)
3792
+ @expression = args[:expression] if args.key?(:expression)
3793
+ @location = args[:location] if args.key?(:location)
3794
+ @title = args[:title] if args.key?(:title)
3795
+ end
3796
+ end
3797
+ end
3798
+ end
3799
+ end