google-cloud-datastore-admin-v1 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6ff3f5bfe3626f8918be4dc4ba8050e74e492f095b307e25bebafb27c6e94ff
4
- data.tar.gz: d4256e82209cacd23e9541250341a003de9b8decd19b4b7d021bd41c011b53e6
3
+ metadata.gz: 3625c8bbc579cb83a08da7a675c8193d06e8dc19524650f7371b9d8708f35f12
4
+ data.tar.gz: fdcbf5a5caa4cfb53d7d5eb09ef38cc89669dad416ddf485e8e0047eede1f3b6
5
5
  SHA512:
6
- metadata.gz: f4871dc6b6ae3d3a4ea9086ab4c2cc471c6b27f285f25fe7c25b5be42a2dc0321559b93b62d4a87ad0c72f817b17d52e5334d85157588b00677776a74e805469
7
- data.tar.gz: 6d5bc25cbb0900d54e28c318335cd3259af0d56a74a24869d6310447a19a681f8117d1eb50ab574d4df45180e9a5d99343b97d8395dfd16cf4283484119c04f3
6
+ metadata.gz: ced0fa3e2b18b60889b4105266559956b9b445f7ddfc1e1ffe24ecd83887cd66bd7ed23cd3bc39a6a78cc005f15dd9127622dd855ac95030ee9612a5064916fe
7
+ data.tar.gz: 7994125ffa47a36f100627f9bc143c8a696ee61852efaa5b899373c8b87217f74e065067c414456c461fd931e9a17aba25e1ff4b66de17d27ee3b5cd37484d4a
data/LICENSE.md CHANGED
@@ -1,192 +1,190 @@
1
- Apache License
2
- ==============
3
-
4
- * Version 2.0, January 2004
5
- * https://www.apache.org/licenses/
6
-
7
- ### TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. **Definitions.**
10
-
11
- "License" shall mean the terms and conditions for use, reproduction,
12
- and distribution as defined by Sections 1 through 9 of this document.
13
-
14
- "Licensor" shall mean the copyright owner or entity authorized by
15
- the copyright owner that is granting the License.
16
-
17
- "Legal Entity" shall mean the union of the acting entity and all
18
- other entities that control, are controlled by, or are under common
19
- control with that entity. For the purposes of this definition,
20
- "control" means (i) the power, direct or indirect, to cause the
21
- direction or management of such entity, whether by contract or
22
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
- outstanding shares, or (iii) beneficial ownership of such entity.
24
-
25
- "You" (or "Your") shall mean an individual or Legal Entity
26
- exercising permissions granted by this License.
27
-
28
- "Source" form shall mean the preferred form for making modifications,
29
- including but not limited to software source code, documentation
30
- source, and configuration files.
31
-
32
- "Object" form shall mean any form resulting from mechanical
33
- transformation or translation of a Source form, including but
34
- not limited to compiled object code, generated documentation,
35
- and conversions to other media types.
36
-
37
- "Work" shall mean the work of authorship, whether in Source or
38
- Object form, made available under the License, as indicated by a
39
- copyright notice that is included in or attached to the work
40
- (an example is provided in the Appendix below).
41
-
42
- "Derivative Works" shall mean any work, whether in Source or Object
43
- form, that is based on (or derived from) the Work and for which the
44
- editorial revisions, annotations, elaborations, or other modifications
45
- represent, as a whole, an original work of authorship. For the purposes
46
- of this License, Derivative Works shall not include works that remain
47
- separable from, or merely link (or bind by name) to the interfaces of,
48
- the Work and Derivative Works thereof.
49
-
50
- "Contribution" shall mean any work of authorship, including
51
- the original version of the Work and any modifications or additions
52
- to that Work or Derivative Works thereof, that is intentionally
53
- submitted to Licensor for inclusion in the Work by the copyright owner
54
- or by an individual or Legal Entity authorized to submit on behalf of
55
- the copyright owner. For the purposes of this definition, "submitted"
56
- means any form of electronic, verbal, or written communication sent
57
- to the Licensor or its representatives, including but not limited to
58
- communication on electronic mailing lists, source code control systems,
59
- and issue tracking systems that are managed by, or on behalf of, the
60
- Licensor for the purpose of discussing and improving the Work, but
61
- excluding communication that is conspicuously marked or otherwise
62
- designated in writing by the copyright owner as "Not a Contribution."
63
-
64
- "Contributor" shall mean Licensor and any individual or Legal Entity
65
- on behalf of whom a Contribution has been received by Licensor and
66
- subsequently incorporated within the Work.
67
-
68
- 2. **Grant of Copyright License.** Subject to the terms and conditions of
69
- this License, each Contributor hereby grants to You a perpetual,
70
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
- copyright license to reproduce, prepare Derivative Works of,
72
- publicly display, publicly perform, sublicense, and distribute the
73
- Work and such Derivative Works in Source or Object form.
74
-
75
- 3. **Grant of Patent License.** Subject to the terms and conditions of
76
- this License, each Contributor hereby grants to You a perpetual,
77
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
- (except as stated in this section) patent license to make, have made,
79
- use, offer to sell, sell, import, and otherwise transfer the Work,
80
- where such license applies only to those patent claims licensable
81
- by such Contributor that are necessarily infringed by their
82
- Contribution(s) alone or by combination of their Contribution(s)
83
- with the Work to which such Contribution(s) was submitted. If You
84
- institute patent litigation against any entity (including a
85
- cross-claim or counterclaim in a lawsuit) alleging that the Work
86
- or a Contribution incorporated within the Work constitutes direct
87
- or contributory patent infringement, then any patent licenses
88
- granted to You under this License for that Work shall terminate
89
- as of the date such litigation is filed.
90
-
91
- 4. **Redistribution.** You may reproduce and distribute copies of the
92
- Work or Derivative Works thereof in any medium, with or without
93
- modifications, and in Source or Object form, provided that You
94
- meet the following conditions:
95
-
96
- * **(a)** You must give any other recipients of the Work or
97
- Derivative Works a copy of this License; and
98
-
99
- * **(b)** You must cause any modified files to carry prominent notices
100
- stating that You changed the files; and
101
-
102
- * **(c)** You must retain, in the Source form of any Derivative Works
103
- that You distribute, all copyright, patent, trademark, and
104
- attribution notices from the Source form of the Work,
105
- excluding those notices that do not pertain to any part of
106
- the Derivative Works; and
107
-
108
- * **(d)** If the Work includes a "NOTICE" text file as part of its
109
- distribution, then any Derivative Works that You distribute must
110
- include a readable copy of the attribution notices contained
111
- within such NOTICE file, excluding those notices that do not
112
- pertain to any part of the Derivative Works, in at least one
113
- of the following places: within a NOTICE text file distributed
114
- as part of the Derivative Works; within the Source form or
115
- documentation, if provided along with the Derivative Works; or,
116
- within a display generated by the Derivative Works, if and
117
- wherever such third-party notices normally appear. The contents
118
- of the NOTICE file are for informational purposes only and
119
- do not modify the License. You may add Your own attribution
120
- notices within Derivative Works that You distribute, alongside
121
- or as an addendum to the NOTICE text from the Work, provided
122
- that such additional attribution notices cannot be construed
123
- as modifying the License.
124
-
125
- You may add Your own copyright statement to Your modifications and
126
- may provide additional or different license terms and conditions
127
- for use, reproduction, or distribution of Your modifications, or
128
- for any such Derivative Works as a whole, provided Your use,
129
- reproduction, and distribution of the Work otherwise complies with
130
- the conditions stated in this License.
131
-
132
- 5. **Submission of Contributions.** Unless You explicitly state otherwise,
133
- any Contribution intentionally submitted for inclusion in the Work
134
- by You to the Licensor shall be under the terms and conditions of
135
- this License, without any additional terms or conditions.
136
- Notwithstanding the above, nothing herein shall supersede or modify
137
- the terms of any separate license agreement you may have executed
138
- with Licensor regarding such Contributions.
139
-
140
- 6. **Trademarks.** This License does not grant permission to use the trade
141
- names, trademarks, service marks, or product names of the Licensor,
142
- except as required for reasonable and customary use in describing the
143
- origin of the Work and reproducing the content of the NOTICE file.
144
-
145
- 7. **Disclaimer of Warranty.** Unless required by applicable law or
146
- agreed to in writing, Licensor provides the Work (and each
147
- Contributor provides its Contributions) on an "AS IS" BASIS,
148
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
- implied, including, without limitation, any warranties or conditions
150
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
- PARTICULAR PURPOSE. You are solely responsible for determining the
152
- appropriateness of using or redistributing the Work and assume any
153
- risks associated with Your exercise of permissions under this License.
154
-
155
- 8. **Limitation of Liability.** In no event and under no legal theory,
156
- whether in tort (including negligence), contract, or otherwise,
157
- unless required by applicable law (such as deliberate and grossly
158
- negligent acts) or agreed to in writing, shall any Contributor be
159
- liable to You for damages, including any direct, indirect, special,
160
- incidental, or consequential damages of any character arising as a
161
- result of this License or out of the use or inability to use the
162
- Work (including but not limited to damages for loss of goodwill,
163
- work stoppage, computer failure or malfunction, or any and all
164
- other commercial damages or losses), even if such Contributor
165
- has been advised of the possibility of such damages.
166
-
167
- 9. **Accepting Warranty or Additional Liability.** While redistributing
168
- the Work or Derivative Works thereof, You may choose to offer,
169
- and charge a fee for, acceptance of support, warranty, indemnity,
170
- or other liability obligations and/or rights consistent with this
171
- License. However, in accepting such obligations, You may act only
172
- on Your own behalf and on Your sole responsibility, not on behalf
173
- of any other Contributor, and only if You agree to indemnify,
174
- defend, and hold each Contributor harmless for any liability
175
- incurred by, or claims asserted against, such Contributor by reason
176
- of your accepting any such warranty or additional liability.
177
-
178
- _END OF TERMS AND CONDITIONS_
179
-
180
- ### APPENDIX: How to apply the Apache License to your work.
181
-
182
- To apply the Apache License to your work, attach the following
183
- boilerplate notice, with the fields enclosed by brackets "`[]`"
184
- replaced with your own identifying information. (Don't include
185
- the brackets!) The text should be enclosed in the appropriate
186
- comment syntax for the file format. We also recommend that a
187
- file or class name and description of purpose be included on the
188
- same "printed page" as the copyright notice for easier
189
- identification within third-party archives.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
190
188
 
191
189
  Copyright [yyyy] [name of copyright owner]
192
190
 
@@ -194,7 +192,7 @@ identification within third-party archives.
194
192
  you may not use this file except in compliance with the License.
195
193
  You may obtain a copy of the License at
196
194
 
197
- https://www.apache.org/licenses/LICENSE-2.0
195
+ http://www.apache.org/licenses/LICENSE-2.0
198
196
 
199
197
  Unless required by applicable law or agreed to in writing, software
200
198
  distributed under the License is distributed on an "AS IS" BASIS,
@@ -128,6 +128,10 @@ module Google
128
128
 
129
129
  default_config.rpcs.import_entities.timeout = 60.0
130
130
 
131
+ default_config.rpcs.create_index.timeout = 60.0
132
+
133
+ default_config.rpcs.delete_index.timeout = 60.0
134
+
131
135
  default_config.rpcs.get_index.timeout = 60.0
132
136
  default_config.rpcs.get_index.retry_policy = {
133
137
  initial_delay: 0.1,
@@ -430,6 +434,168 @@ module Google
430
434
  raise ::Google::Cloud::Error.from_error(e)
431
435
  end
432
436
 
437
+ ##
438
+ # Creates the specified index.
439
+ # A newly created index's initial state is `CREATING`. On completion of the
440
+ # returned {::Google::Longrunning::Operation google.longrunning.Operation}, the state will be `READY`.
441
+ # If the index already exists, the call will return an `ALREADY_EXISTS`
442
+ # status.
443
+ #
444
+ # During index creation, the process could result in an error, in which
445
+ # case the index will move to the `ERROR` state. The process can be recovered
446
+ # by fixing the data that caused the error, removing the index with
447
+ # {::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client#delete_index delete}, then
448
+ # re-creating the index with [create]
449
+ # [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].
450
+ #
451
+ # Indexes with a single property cannot be created.
452
+ #
453
+ # @overload create_index(request, options = nil)
454
+ # Pass arguments to `create_index` via a request object, either of type
455
+ # {::Google::Cloud::Datastore::Admin::V1::CreateIndexRequest} or an equivalent Hash.
456
+ #
457
+ # @param request [::Google::Cloud::Datastore::Admin::V1::CreateIndexRequest, ::Hash]
458
+ # A request object representing the call parameters. Required. To specify no
459
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
460
+ # @param options [::Gapic::CallOptions, ::Hash]
461
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
462
+ #
463
+ # @overload create_index(project_id: nil, index: nil)
464
+ # Pass arguments to `create_index` via keyword arguments. Note that at
465
+ # least one keyword argument is required. To specify no parameters, or to keep all
466
+ # the default parameter values, pass an empty Hash as a request object (see above).
467
+ #
468
+ # @param project_id [::String]
469
+ # Project ID against which to make the request.
470
+ # @param index [::Google::Cloud::Datastore::Admin::V1::Index, ::Hash]
471
+ # The index to create. The name and state fields are output only and will be
472
+ # ignored. Single property indexes cannot be created or deleted.
473
+ #
474
+ # @yield [response, operation] Access the result along with the RPC operation
475
+ # @yieldparam response [::Gapic::Operation]
476
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
477
+ #
478
+ # @return [::Gapic::Operation]
479
+ #
480
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
481
+ #
482
+ def create_index request, options = nil
483
+ raise ::ArgumentError, "request must be provided" if request.nil?
484
+
485
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastore::Admin::V1::CreateIndexRequest
486
+
487
+ # Converts hash and nil to an options object
488
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
489
+
490
+ # Customize the options with defaults
491
+ metadata = @config.rpcs.create_index.metadata.to_h
492
+
493
+ # Set x-goog-api-client and x-goog-user-project headers
494
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
495
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
496
+ gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
497
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
498
+
499
+ header_params = {
500
+ "project_id" => request.project_id
501
+ }
502
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
503
+ metadata[:"x-goog-request-params"] ||= request_params_header
504
+
505
+ options.apply_defaults timeout: @config.rpcs.create_index.timeout,
506
+ metadata: metadata,
507
+ retry_policy: @config.rpcs.create_index.retry_policy
508
+ options.apply_defaults metadata: @config.metadata,
509
+ retry_policy: @config.retry_policy
510
+
511
+ @datastore_admin_stub.call_rpc :create_index, request, options: options do |response, operation|
512
+ response = ::Gapic::Operation.new response, @operations_client, options: options
513
+ yield response, operation if block_given?
514
+ return response
515
+ end
516
+ rescue ::GRPC::BadStatus => e
517
+ raise ::Google::Cloud::Error.from_error(e)
518
+ end
519
+
520
+ ##
521
+ # Deletes an existing index.
522
+ # An index can only be deleted if it is in a `READY` or `ERROR` state. On
523
+ # successful execution of the request, the index will be in a `DELETING`
524
+ # {::Google::Cloud::Datastore::Admin::V1::Index::State state}. And on completion of the
525
+ # returned {::Google::Longrunning::Operation google.longrunning.Operation}, the index will be removed.
526
+ #
527
+ # During index deletion, the process could result in an error, in which
528
+ # case the index will move to the `ERROR` state. The process can be recovered
529
+ # by fixing the data that caused the error, followed by calling
530
+ # {::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client#delete_index delete} again.
531
+ #
532
+ # @overload delete_index(request, options = nil)
533
+ # Pass arguments to `delete_index` via a request object, either of type
534
+ # {::Google::Cloud::Datastore::Admin::V1::DeleteIndexRequest} or an equivalent Hash.
535
+ #
536
+ # @param request [::Google::Cloud::Datastore::Admin::V1::DeleteIndexRequest, ::Hash]
537
+ # A request object representing the call parameters. Required. To specify no
538
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
539
+ # @param options [::Gapic::CallOptions, ::Hash]
540
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
541
+ #
542
+ # @overload delete_index(project_id: nil, index_id: nil)
543
+ # Pass arguments to `delete_index` via keyword arguments. Note that at
544
+ # least one keyword argument is required. To specify no parameters, or to keep all
545
+ # the default parameter values, pass an empty Hash as a request object (see above).
546
+ #
547
+ # @param project_id [::String]
548
+ # Project ID against which to make the request.
549
+ # @param index_id [::String]
550
+ # The resource ID of the index to delete.
551
+ #
552
+ # @yield [response, operation] Access the result along with the RPC operation
553
+ # @yieldparam response [::Gapic::Operation]
554
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
555
+ #
556
+ # @return [::Gapic::Operation]
557
+ #
558
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
559
+ #
560
+ def delete_index request, options = nil
561
+ raise ::ArgumentError, "request must be provided" if request.nil?
562
+
563
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Datastore::Admin::V1::DeleteIndexRequest
564
+
565
+ # Converts hash and nil to an options object
566
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
567
+
568
+ # Customize the options with defaults
569
+ metadata = @config.rpcs.delete_index.metadata.to_h
570
+
571
+ # Set x-goog-api-client and x-goog-user-project headers
572
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
573
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
574
+ gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
575
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
576
+
577
+ header_params = {
578
+ "project_id" => request.project_id,
579
+ "index_id" => request.index_id
580
+ }
581
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
582
+ metadata[:"x-goog-request-params"] ||= request_params_header
583
+
584
+ options.apply_defaults timeout: @config.rpcs.delete_index.timeout,
585
+ metadata: metadata,
586
+ retry_policy: @config.rpcs.delete_index.retry_policy
587
+ options.apply_defaults metadata: @config.metadata,
588
+ retry_policy: @config.retry_policy
589
+
590
+ @datastore_admin_stub.call_rpc :delete_index, request, options: options do |response, operation|
591
+ response = ::Gapic::Operation.new response, @operations_client, options: options
592
+ yield response, operation if block_given?
593
+ return response
594
+ end
595
+ rescue ::GRPC::BadStatus => e
596
+ raise ::Google::Cloud::Error.from_error(e)
597
+ end
598
+
433
599
  ##
434
600
  # Gets an index.
435
601
  #
@@ -721,6 +887,16 @@ module Google
721
887
  #
722
888
  attr_reader :import_entities
723
889
  ##
890
+ # RPC-specific configuration for `create_index`
891
+ # @return [::Gapic::Config::Method]
892
+ #
893
+ attr_reader :create_index
894
+ ##
895
+ # RPC-specific configuration for `delete_index`
896
+ # @return [::Gapic::Config::Method]
897
+ #
898
+ attr_reader :delete_index
899
+ ##
724
900
  # RPC-specific configuration for `get_index`
725
901
  # @return [::Gapic::Config::Method]
726
902
  #
@@ -737,6 +913,10 @@ module Google
737
913
  @export_entities = ::Gapic::Config::Method.new export_entities_config
738
914
  import_entities_config = parent_rpcs&.import_entities if parent_rpcs&.respond_to? :import_entities
739
915
  @import_entities = ::Gapic::Config::Method.new import_entities_config
916
+ create_index_config = parent_rpcs&.create_index if parent_rpcs&.respond_to? :create_index
917
+ @create_index = ::Gapic::Config::Method.new create_index_config
918
+ delete_index_config = parent_rpcs&.delete_index if parent_rpcs&.respond_to? :delete_index
919
+ @delete_index = ::Gapic::Config::Method.new delete_index_config
740
920
  get_index_config = parent_rpcs&.get_index if parent_rpcs&.respond_to? :get_index
741
921
  @get_index = ::Gapic::Config::Method.new get_index_config
742
922
  list_indexes_config = parent_rpcs&.list_indexes if parent_rpcs&.respond_to? :list_indexes
@@ -22,7 +22,7 @@ module Google
22
22
  module Datastore
23
23
  module Admin
24
24
  module V1
25
- VERSION = "0.2.0"
25
+ VERSION = "0.3.0"
26
26
  end
27
27
  end
28
28
  end
@@ -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
@@ -0,0 +1,44 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/datastore/admin/v1/migration.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("google/datastore/admin/v1/migration.proto", :syntax => :proto3) do
8
+ add_message "google.datastore.admin.v1.MigrationStateEvent" do
9
+ optional :state, :enum, 1, "google.datastore.admin.v1.MigrationState"
10
+ end
11
+ add_message "google.datastore.admin.v1.MigrationProgressEvent" do
12
+ optional :step, :enum, 1, "google.datastore.admin.v1.MigrationStep"
13
+ end
14
+ add_enum "google.datastore.admin.v1.MigrationState" do
15
+ value :MIGRATION_STATE_UNSPECIFIED, 0
16
+ value :RUNNING, 1
17
+ value :PAUSED, 2
18
+ value :COMPLETE, 3
19
+ end
20
+ add_enum "google.datastore.admin.v1.MigrationStep" do
21
+ value :MIGRATION_STEP_UNSPECIFIED, 0
22
+ value :START, 1
23
+ value :COPY_AND_VERIFY, 2
24
+ value :REDIRECT_EVENTUALLY_CONSISTENT_READS, 3
25
+ value :REDIRECT_STRONGLY_CONSISTENT_READS, 4
26
+ value :REDIRECT_WRITES, 5
27
+ end
28
+ end
29
+ end
30
+
31
+ module Google
32
+ module Cloud
33
+ module Datastore
34
+ module Admin
35
+ module V1
36
+ MigrationStateEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationStateEvent").msgclass
37
+ MigrationProgressEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationProgressEvent").msgclass
38
+ MigrationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationState").enummodule
39
+ MigrationStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationStep").enummodule
40
+ end
41
+ end
42
+ end
43
+ end
44
+ 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.
@@ -0,0 +1,90 @@
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 Cloud
22
+ module Datastore
23
+ module Admin
24
+ module V1
25
+ # An event signifying a change in state of a [migration from Cloud Datastore to
26
+ # Cloud Firestore in Datastore
27
+ # mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
28
+ # @!attribute [rw] state
29
+ # @return [::Google::Cloud::Datastore::Admin::V1::MigrationState]
30
+ # The new state of the migration.
31
+ class MigrationStateEvent
32
+ include ::Google::Protobuf::MessageExts
33
+ extend ::Google::Protobuf::MessageExts::ClassMethods
34
+ end
35
+
36
+ # An event signifying the start of a new step in a [migration from Cloud
37
+ # Datastore to Cloud Firestore in Datastore
38
+ # mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
39
+ # @!attribute [rw] step
40
+ # @return [::Google::Cloud::Datastore::Admin::V1::MigrationStep]
41
+ # The step that is starting.
42
+ #
43
+ # An event with step set to `START` indicates that the migration
44
+ # has been reverted back to the initial pre-migration state.
45
+ class MigrationProgressEvent
46
+ include ::Google::Protobuf::MessageExts
47
+ extend ::Google::Protobuf::MessageExts::ClassMethods
48
+ end
49
+
50
+ # States for a migration.
51
+ module MigrationState
52
+ # Unspecified.
53
+ MIGRATION_STATE_UNSPECIFIED = 0
54
+
55
+ # The migration is running.
56
+ RUNNING = 1
57
+
58
+ # The migration is paused.
59
+ PAUSED = 2
60
+
61
+ # The migration is complete.
62
+ COMPLETE = 3
63
+ end
64
+
65
+ # Steps in a migration.
66
+ module MigrationStep
67
+ # Unspecified.
68
+ MIGRATION_STEP_UNSPECIFIED = 0
69
+
70
+ # Start of migration.
71
+ START = 1
72
+
73
+ # Data is copied to Cloud Firestore and then verified to match the data in
74
+ # Cloud Datastore.
75
+ COPY_AND_VERIFY = 2
76
+
77
+ # Eventually-consistent reads are redirected to Cloud Firestore.
78
+ REDIRECT_EVENTUALLY_CONSISTENT_READS = 3
79
+
80
+ # Strongly-consistent reads are redirected to Cloud Firestore.
81
+ REDIRECT_STRONGLY_CONSISTENT_READS = 4
82
+
83
+ # Writes are redirected to Cloud Firestore.
84
+ REDIRECT_WRITES = 5
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore-admin-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
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-02-02 00:00:00.000000000 Z
11
+ date: 2021-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -174,11 +174,13 @@ files:
174
174
  - lib/google/datastore/admin/v1/datastore_admin_pb.rb
175
175
  - lib/google/datastore/admin/v1/datastore_admin_services_pb.rb
176
176
  - lib/google/datastore/admin/v1/index_pb.rb
177
+ - lib/google/datastore/admin/v1/migration_pb.rb
177
178
  - proto_docs/README.md
178
179
  - proto_docs/google/api/field_behavior.rb
179
180
  - proto_docs/google/api/resource.rb
180
181
  - proto_docs/google/datastore/admin/v1/datastore_admin.rb
181
182
  - proto_docs/google/datastore/admin/v1/index.rb
183
+ - proto_docs/google/datastore/admin/v1/migration.rb
182
184
  - proto_docs/google/longrunning/operations.rb
183
185
  - proto_docs/google/protobuf/any.rb
184
186
  - proto_docs/google/protobuf/duration.rb
@@ -204,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
206
  - !ruby/object:Gem::Version
205
207
  version: '0'
206
208
  requirements: []
207
- rubygems_version: 3.2.6
209
+ rubygems_version: 3.2.11
208
210
  signing_key:
209
211
  specification_version: 4
210
212
  summary: API Client library for the Firestore in Datastore mode Admin V1 API