google-cloud-recommendation_engine-v1beta1 0.1.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +188 -190
  3. data/README.md +66 -2
  4. data/lib/google/cloud/recommendation_engine/v1beta1.rb +3 -0
  5. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/client.rb +40 -34
  6. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/operations.rb +95 -10
  7. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/client.rb +26 -20
  8. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/client.rb +16 -10
  9. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/client.rb +36 -30
  10. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/operations.rb +95 -10
  11. data/lib/google/cloud/recommendation_engine/v1beta1/version.rb +1 -1
  12. data/lib/google/cloud/recommendationengine/v1beta1/catalog_service_services_pb.rb +1 -1
  13. data/lib/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service_services_pb.rb +1 -1
  14. data/lib/google/cloud/recommendationengine/v1beta1/prediction_service_services_pb.rb +1 -1
  15. data/lib/google/cloud/recommendationengine/v1beta1/user_event_service_services_pb.rb +1 -1
  16. data/proto_docs/google/api/field_behavior.rb +6 -0
  17. data/proto_docs/google/cloud/recommendationengine/v1beta1/catalog_service.rb +4 -4
  18. data/proto_docs/google/cloud/recommendationengine/v1beta1/import.rb +4 -4
  19. data/proto_docs/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.rb +3 -3
  20. data/proto_docs/google/cloud/recommendationengine/v1beta1/prediction_service.rb +1 -1
  21. data/proto_docs/google/cloud/recommendationengine/v1beta1/user_event_service.rb +4 -4
  22. data/proto_docs/google/longrunning/operations.rb +17 -3
  23. data/proto_docs/google/protobuf/any.rb +5 -2
  24. data/proto_docs/google/protobuf/duration.rb +98 -0
  25. data/proto_docs/google/protobuf/timestamp.rb +10 -1
  26. metadata +21 -11
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -25,7 +25,7 @@ module Google
25
25
  # @!attribute [rw] parent
26
26
  # @return [::String]
27
27
  # Required. The parent catalog resource name, such as
28
- # "projects/*/locations/global/catalogs/default_catalog".
28
+ # `projects/*/locations/global/catalogs/default_catalog`.
29
29
  # @!attribute [rw] catalog_item
30
30
  # @return [::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem]
31
31
  # Required. The catalog item to create.
@@ -38,7 +38,7 @@ module Google
38
38
  # @!attribute [rw] name
39
39
  # @return [::String]
40
40
  # Required. Full resource name of catalog item, such as
41
- # "projects/*/locations/global/catalogs/default_catalog/catalogitems/some_catalog_item_id".
41
+ # `projects/*/locations/global/catalogs/default_catalog/catalogitems/some_catalog_item_id`.
42
42
  class GetCatalogItemRequest
43
43
  include ::Google::Protobuf::MessageExts
44
44
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -48,7 +48,7 @@ module Google
48
48
  # @!attribute [rw] parent
49
49
  # @return [::String]
50
50
  # Required. The parent catalog resource name, such as
51
- # "projects/*/locations/global/catalogs/default_catalog".
51
+ # `projects/*/locations/global/catalogs/default_catalog`.
52
52
  # @!attribute [rw] page_size
53
53
  # @return [::Integer]
54
54
  # Optional. Maximum number of results to return per page. If zero, the
@@ -99,7 +99,7 @@ module Google
99
99
  # @!attribute [rw] name
100
100
  # @return [::String]
101
101
  # Required. Full resource name of catalog item, such as
102
- # "projects/*/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id".
102
+ # `projects/*/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id`.
103
103
  class DeleteCatalogItemRequest
104
104
  include ::Google::Protobuf::MessageExts
105
105
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -27,8 +27,8 @@ module Google
27
27
  # @return [::Array<::String>]
28
28
  # Required. Google Cloud Storage URIs to input files. URI can be up to
29
29
  # 2000 characters long. URIs can match the full object path (for example,
30
- # gs://bucket/directory/object.json) or a pattern matching one or more
31
- # files, such as gs://bucket/directory/*.json. A request can
30
+ # `gs://bucket/directory/object.json`) or a pattern matching one or more
31
+ # files, such as `gs://bucket/directory/*.json`. A request can
32
32
  # contain at most 100 files, and each file can be up to 2 GB. See
33
33
  # [Importing catalog information](/recommendations-ai/docs/upload-catalog)
34
34
  # for the expected file format and setup instructions.
@@ -71,7 +71,7 @@ module Google
71
71
  # Request message for Import methods.
72
72
  # @!attribute [rw] parent
73
73
  # @return [::String]
74
- # Required. "projects/1234/locations/global/catalogs/default_catalog"
74
+ # Required. `projects/1234/locations/global/catalogs/default_catalog`
75
75
  # @!attribute [rw] request_id
76
76
  # @return [::String]
77
77
  # Optional. Unique identifier provided by client, within the ancestor
@@ -93,7 +93,7 @@ module Google
93
93
  # @!attribute [rw] parent
94
94
  # @return [::String]
95
95
  # Required.
96
- # "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store"
96
+ # `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`
97
97
  # @!attribute [rw] request_id
98
98
  # @return [::String]
99
99
  # Optional. Unique identifier provided by client, within the ancestor
@@ -34,7 +34,7 @@ module Google
34
34
  # @!attribute [rw] parent
35
35
  # @return [::String]
36
36
  # Required. The parent resource path.
37
- # "projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store".
37
+ # `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`.
38
38
  # @!attribute [rw] prediction_api_key_registration
39
39
  # @return [::Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistration]
40
40
  # Required. The prediction API key registration.
@@ -47,7 +47,7 @@ module Google
47
47
  # @!attribute [rw] parent
48
48
  # @return [::String]
49
49
  # Required. The parent placement resource name such as
50
- # "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store"
50
+ # `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`
51
51
  # @!attribute [rw] page_size
52
52
  # @return [::Integer]
53
53
  # Optional. Maximum number of results to return per page. If unset, the
@@ -77,7 +77,7 @@ module Google
77
77
  # @!attribute [rw] name
78
78
  # @return [::String]
79
79
  # Required. The API key to unregister including full resource path.
80
- # "projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>"
80
+ # `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/<YOUR_API_KEY>`
81
81
  class DeletePredictionApiKeyRegistrationRequest
82
82
  include ::Google::Protobuf::MessageExts
83
83
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -25,7 +25,7 @@ module Google
25
25
  # @!attribute [rw] name
26
26
  # @return [::String]
27
27
  # Required. Full resource name of the format:
28
- # \\{name=projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/placements/*}
28
+ # `{name=projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/placements/*}`
29
29
  # The id of the recommendation engine placement. This id is used to identify
30
30
  # the set of models that will be used to make the prediction.
31
31
  #
@@ -26,7 +26,7 @@ module Google
26
26
  # @return [::String]
27
27
  # Required. The resource name of the event_store under which the events are
28
28
  # created. The format is
29
- # "projects/$\\{projectId}/locations/global/catalogs/$\\{catalogId}/eventStores/$\\{eventStoreId}"
29
+ # `projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}`
30
30
  # @!attribute [rw] filter
31
31
  # @return [::String]
32
32
  # Required. The filter string to specify the events to be deleted. Empty
@@ -89,7 +89,7 @@ module Google
89
89
  # @!attribute [rw] parent
90
90
  # @return [::String]
91
91
  # Required. The parent eventStore resource name, such as
92
- # "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store".
92
+ # `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.
93
93
  # @!attribute [rw] user_event
94
94
  # @return [::Google::Cloud::RecommendationEngine::V1beta1::UserEvent]
95
95
  # Required. User event to write.
@@ -102,7 +102,7 @@ module Google
102
102
  # @!attribute [rw] parent
103
103
  # @return [::String]
104
104
  # Required. The parent eventStore name, such as
105
- # "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store".
105
+ # `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.
106
106
  # @!attribute [rw] user_event
107
107
  # @return [::String]
108
108
  # Required. URL encoded UserEvent proto.
@@ -126,7 +126,7 @@ module Google
126
126
  # @!attribute [rw] parent
127
127
  # @return [::String]
128
128
  # Required. The parent eventStore resource name, such as
129
- # "projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store".
129
+ # `projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store`.
130
130
  # @!attribute [rw] page_size
131
131
  # @return [::Integer]
132
132
  # Optional. Maximum number of results to return per page. If zero, the
@@ -25,7 +25,7 @@ module Google
25
25
  # @return [::String]
26
26
  # The server-assigned name, which is only unique within the same service that
27
27
  # originally returns it. If you use the default HTTP mapping, the
28
- # `name` should have the format of `operations/some/unique/name`.
28
+ # `name` should be a resource name ending with `operations/{unique_id}`.
29
29
  # @!attribute [rw] metadata
30
30
  # @return [::Google::Protobuf::Any]
31
31
  # Service-specific metadata associated with the operation. It typically
@@ -35,7 +35,7 @@ module Google
35
35
  # @!attribute [rw] done
36
36
  # @return [::Boolean]
37
37
  # If the value is `false`, it means the operation is still in progress.
38
- # If true, the operation is completed, and either `error` or `response` is
38
+ # If `true`, the operation is completed, and either `error` or `response` is
39
39
  # available.
40
40
  # @!attribute [rw] error
41
41
  # @return [::Google::Rpc::Status]
@@ -67,7 +67,7 @@ module Google
67
67
  # The request message for Operations.ListOperations.
68
68
  # @!attribute [rw] name
69
69
  # @return [::String]
70
- # The name of the operation collection.
70
+ # The name of the operation's parent resource.
71
71
  # @!attribute [rw] filter
72
72
  # @return [::String]
73
73
  # The standard list filter.
@@ -112,6 +112,20 @@ module Google
112
112
  extend ::Google::Protobuf::MessageExts::ClassMethods
113
113
  end
114
114
 
115
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
115
129
  # A message representing the message types used by a long-running operation.
116
130
  #
117
131
  # Example:
@@ -57,10 +57,13 @@ module Google
57
57
  # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
- # any, err := ptypes.MarshalAny(foo)
60
+ # any, err := anypb.New(foo)
61
+ # if err != nil {
62
+ # ...
63
+ # }
61
64
  # ...
62
65
  # foo := &pb.Foo{}
63
- # if err := ptypes.UnmarshalAny(any, foo); err != nil {
66
+ # if err := any.UnmarshalTo(foo); err != nil {
64
67
  # ...
65
68
  # }
66
69
  #
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Protobuf
22
+ # A Duration represents a signed, fixed-length span of time represented
23
+ # as a count of seconds and fractions of seconds at nanosecond
24
+ # resolution. It is independent of any calendar and concepts like "day"
25
+ # or "month". It is related to Timestamp in that the difference between
26
+ # two Timestamp values is a Duration and it can be added or subtracted
27
+ # from a Timestamp. Range is approximately +-10,000 years.
28
+ #
29
+ # # Examples
30
+ #
31
+ # Example 1: Compute Duration from two Timestamps in pseudo code.
32
+ #
33
+ # Timestamp start = ...;
34
+ # Timestamp end = ...;
35
+ # Duration duration = ...;
36
+ #
37
+ # duration.seconds = end.seconds - start.seconds;
38
+ # duration.nanos = end.nanos - start.nanos;
39
+ #
40
+ # if (duration.seconds < 0 && duration.nanos > 0) {
41
+ # duration.seconds += 1;
42
+ # duration.nanos -= 1000000000;
43
+ # } else if (duration.seconds > 0 && duration.nanos < 0) {
44
+ # duration.seconds -= 1;
45
+ # duration.nanos += 1000000000;
46
+ # }
47
+ #
48
+ # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
49
+ #
50
+ # Timestamp start = ...;
51
+ # Duration duration = ...;
52
+ # Timestamp end = ...;
53
+ #
54
+ # end.seconds = start.seconds + duration.seconds;
55
+ # end.nanos = start.nanos + duration.nanos;
56
+ #
57
+ # if (end.nanos < 0) {
58
+ # end.seconds -= 1;
59
+ # end.nanos += 1000000000;
60
+ # } else if (end.nanos >= 1000000000) {
61
+ # end.seconds += 1;
62
+ # end.nanos -= 1000000000;
63
+ # }
64
+ #
65
+ # Example 3: Compute Duration from datetime.timedelta in Python.
66
+ #
67
+ # td = datetime.timedelta(days=3, minutes=10)
68
+ # duration = Duration()
69
+ # duration.FromTimedelta(td)
70
+ #
71
+ # # JSON Mapping
72
+ #
73
+ # In JSON format, the Duration type is encoded as a string rather than an
74
+ # object, where the string ends in the suffix "s" (indicating seconds) and
75
+ # is preceded by the number of seconds, with nanoseconds expressed as
76
+ # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
77
+ # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
78
+ # be expressed in JSON format as "3.000000001s", and 3 seconds and 1
79
+ # microsecond should be expressed in JSON format as "3.000001s".
80
+ # @!attribute [rw] seconds
81
+ # @return [::Integer]
82
+ # Signed seconds of the span of time. Must be from -315,576,000,000
83
+ # to +315,576,000,000 inclusive. Note: these bounds are computed from:
84
+ # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
85
+ # @!attribute [rw] nanos
86
+ # @return [::Integer]
87
+ # Signed fractions of a second at nanosecond resolution of the span
88
+ # of time. Durations less than one second are represented with a 0
89
+ # `seconds` field and a positive or negative `nanos` field. For durations
90
+ # of one second or more, a non-zero value for the `nanos` field must be
91
+ # of the same sign as the `seconds` field. Must be from -999,999,999
92
+ # to +999,999,999 inclusive.
93
+ class Duration
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+ end
98
+ end
@@ -70,7 +70,16 @@ module Google
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
72
  #
73
- # Example 5: Compute Timestamp from current time in Python.
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
74
83
  #
75
84
  # timestamp = Timestamp()
76
85
  # timestamp.GetCurrentTime()
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-recommendation_engine-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-04 00:00:00.000000000 Z
11
+ date: 2021-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.5'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.5'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +50,14 @@ dependencies:
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 1.24.0
53
+ version: 1.25.1
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: 1.24.0
60
+ version: 1.25.1
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: minitest
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -152,7 +158,10 @@ dependencies:
152
158
  version: '0.9'
153
159
  description: Recommendations AI enables you to build an end-to-end personalized recommendation
154
160
  system based on state-of-the-art deep learning ML models, without a need for expertise
155
- in ML or recommendation systems.
161
+ in ML or recommendation systems. Note that google-cloud-recommendation_engine-v1beta1
162
+ is a version-specific client library. For most uses, we recommend installing the
163
+ main client library google-cloud-recommendation_engine instead. See the readme for
164
+ more details.
156
165
  email: googleapis-packages@google.com
157
166
  executables: []
158
167
  extensions: []
@@ -210,6 +219,7 @@ files:
210
219
  - proto_docs/google/cloud/recommendationengine/v1beta1/user_event_service.rb
211
220
  - proto_docs/google/longrunning/operations.rb
212
221
  - proto_docs/google/protobuf/any.rb
222
+ - proto_docs/google/protobuf/duration.rb
213
223
  - proto_docs/google/protobuf/empty.rb
214
224
  - proto_docs/google/protobuf/field_mask.rb
215
225
  - proto_docs/google/protobuf/struct.rb
@@ -228,14 +238,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
238
  requirements:
229
239
  - - ">="
230
240
  - !ruby/object:Gem::Version
231
- version: '2.4'
241
+ version: '2.5'
232
242
  required_rubygems_version: !ruby/object:Gem::Requirement
233
243
  requirements:
234
244
  - - ">="
235
245
  - !ruby/object:Gem::Version
236
246
  version: '0'
237
247
  requirements: []
238
- rubygems_version: 3.1.4
248
+ rubygems_version: 3.2.17
239
249
  signing_key:
240
250
  specification_version: 4
241
251
  summary: API Client library for the Recommendations AI V1beta1 API