google-cloud-datastore-admin-v1 0.1.2 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -65,6 +65,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
65
65
  repeated :kinds, :string, 1
66
66
  repeated :namespace_ids, :string, 2
67
67
  end
68
+ add_message "google.datastore.admin.v1.CreateIndexRequest" do
69
+ optional :project_id, :string, 1
70
+ optional :index, :message, 3, "google.datastore.admin.v1.Index"
71
+ end
72
+ add_message "google.datastore.admin.v1.DeleteIndexRequest" do
73
+ optional :project_id, :string, 1
74
+ optional :index_id, :string, 3
75
+ end
68
76
  add_message "google.datastore.admin.v1.GetIndexRequest" do
69
77
  optional :project_id, :string, 1
70
78
  optional :index_id, :string, 3
@@ -108,6 +116,8 @@ module Google
108
116
  ExportEntitiesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.ExportEntitiesMetadata").msgclass
109
117
  ImportEntitiesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.ImportEntitiesMetadata").msgclass
110
118
  EntityFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.EntityFilter").msgclass
119
+ CreateIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.CreateIndexRequest").msgclass
120
+ DeleteIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.DeleteIndexRequest").msgclass
111
121
  GetIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.GetIndexRequest").msgclass
112
122
  ListIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.ListIndexesRequest").msgclass
113
123
  ListIndexesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.ListIndexesResponse").msgclass
@@ -109,6 +109,32 @@ module Google
109
109
  # created. If an ImportEntities operation is cancelled, it is possible
110
110
  # that a subset of the data has already been imported to Cloud Datastore.
111
111
  rpc :ImportEntities, ::Google::Cloud::Datastore::Admin::V1::ImportEntitiesRequest, ::Google::Longrunning::Operation
112
+ # Creates the specified index.
113
+ # A newly created index's initial state is `CREATING`. On completion of the
114
+ # returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`.
115
+ # If the index already exists, the call will return an `ALREADY_EXISTS`
116
+ # status.
117
+ #
118
+ # During index creation, the process could result in an error, in which
119
+ # case the index will move to the `ERROR` state. The process can be recovered
120
+ # by fixing the data that caused the error, removing the index with
121
+ # [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then
122
+ # re-creating the index with [create]
123
+ # [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].
124
+ #
125
+ # Indexes with a single property cannot be created.
126
+ rpc :CreateIndex, ::Google::Cloud::Datastore::Admin::V1::CreateIndexRequest, ::Google::Longrunning::Operation
127
+ # Deletes an existing index.
128
+ # An index can only be deleted if it is in a `READY` or `ERROR` state. On
129
+ # successful execution of the request, the index will be in a `DELETING`
130
+ # [state][google.datastore.admin.v1.Index.State]. And on completion of the
131
+ # returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed.
132
+ #
133
+ # During index deletion, the process could result in an error, in which
134
+ # case the index will move to the `ERROR` state. The process can be recovered
135
+ # by fixing the data that caused the error, followed by calling
136
+ # [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again.
137
+ rpc :DeleteIndex, ::Google::Cloud::Datastore::Admin::V1::DeleteIndexRequest, ::Google::Longrunning::Operation
112
138
  # Gets an index.
113
139
  rpc :GetIndex, ::Google::Cloud::Datastore::Admin::V1::GetIndexRequest, ::Google::Cloud::Datastore::Admin::V1::Index
114
140
  # Lists the indexes that match the specified filters. Datastore uses an
@@ -54,6 +54,18 @@ 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
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
57
69
  end
58
70
  end
59
71
  end
@@ -281,6 +281,33 @@ module Google
281
281
  extend ::Google::Protobuf::MessageExts::ClassMethods
282
282
  end
283
283
 
284
+ # The request for
285
+ # {::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client#create_index google.datastore.admin.v1.DatastoreAdmin.CreateIndex}.
286
+ # @!attribute [rw] project_id
287
+ # @return [::String]
288
+ # Project ID against which to make the request.
289
+ # @!attribute [rw] index
290
+ # @return [::Google::Cloud::Datastore::Admin::V1::Index]
291
+ # The index to create. The name and state fields are output only and will be
292
+ # ignored. Single property indexes cannot be created or deleted.
293
+ class CreateIndexRequest
294
+ include ::Google::Protobuf::MessageExts
295
+ extend ::Google::Protobuf::MessageExts::ClassMethods
296
+ end
297
+
298
+ # The request for
299
+ # {::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client#delete_index google.datastore.admin.v1.DatastoreAdmin.DeleteIndex}.
300
+ # @!attribute [rw] project_id
301
+ # @return [::String]
302
+ # Project ID against which to make the request.
303
+ # @!attribute [rw] index_id
304
+ # @return [::String]
305
+ # The resource ID of the index to delete.
306
+ class DeleteIndexRequest
307
+ include ::Google::Protobuf::MessageExts
308
+ extend ::Google::Protobuf::MessageExts::ClassMethods
309
+ end
310
+
284
311
  # The request for {::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client#get_index google.datastore.admin.v1.DatastoreAdmin.GetIndex}.
285
312
  # @!attribute [rw] project_id
286
313
  # @return [::String]
@@ -22,7 +22,7 @@ module Google
22
22
  module Datastore
23
23
  module Admin
24
24
  module V1
25
- # A minimal index definition.
25
+ # Datastore composite index definition.
26
26
  # @!attribute [r] project_id
27
27
  # @return [::String]
28
28
  # Output only. Project ID.
@@ -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-datastore-admin-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.4.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: 2021-01-20 00:00:00.000000000 Z
11
+ date: 2021-07-12 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
@@ -151,7 +157,10 @@ dependencies:
151
157
  - !ruby/object:Gem::Version
152
158
  version: '0.9'
153
159
  description: Firestore in Datastore mode is a NoSQL document database built for automatic
154
- scaling, high performance, and ease of application development.
160
+ scaling, high performance, and ease of application development. Note that google-cloud-datastore-admin-v1
161
+ is a version-specific client library. For most uses, we recommend installing the
162
+ main client library google-cloud-datastore-admin instead. See the readme for more
163
+ details.
155
164
  email: googleapis-packages@google.com
156
165
  executables: []
157
166
  extensions: []
@@ -178,6 +187,7 @@ files:
178
187
  - proto_docs/google/datastore/admin/v1/index.rb
179
188
  - proto_docs/google/longrunning/operations.rb
180
189
  - proto_docs/google/protobuf/any.rb
190
+ - proto_docs/google/protobuf/duration.rb
181
191
  - proto_docs/google/protobuf/empty.rb
182
192
  - proto_docs/google/protobuf/timestamp.rb
183
193
  - proto_docs/google/rpc/status.rb
@@ -193,14 +203,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
193
203
  requirements:
194
204
  - - ">="
195
205
  - !ruby/object:Gem::Version
196
- version: '2.4'
206
+ version: '2.5'
197
207
  required_rubygems_version: !ruby/object:Gem::Requirement
198
208
  requirements:
199
209
  - - ">="
200
210
  - !ruby/object:Gem::Version
201
211
  version: '0'
202
212
  requirements: []
203
- rubygems_version: 3.2.6
213
+ rubygems_version: 3.2.17
204
214
  signing_key:
205
215
  specification_version: 4
206
216
  summary: API Client library for the Firestore in Datastore mode Admin V1 API