google-cloud-memcache-v1 0.4.0 → 0.5.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: bc79a4cc37fadef741fe07b88e9904a00c1aa16436d251c1661c9c3c47285b61
4
- data.tar.gz: 169f349cbf4c95481e05ccd40cf14219b557acdf192dee3066028d46a000cb9c
3
+ metadata.gz: 9d5b101df76e47180f366a6a5acc49c7de7963dfdae129935d69e6602234d6cc
4
+ data.tar.gz: 24951d294951436cb68e372826f2db88819ce0a9b566a559731ee9e4390231c9
5
5
  SHA512:
6
- metadata.gz: 3832b363ab2c6cd3288708b4e7c2f18746ac00c6db9ef0c63d6dcfa83a9e6346b04e5ed374c393308c4b5a87d898697407b9ca0ab8f37647d7400570033f2da8
7
- data.tar.gz: 3c17eaf9825bac0fdebdad1c5ec7913ddf826f20528211aed4422c579acca76e33ea5b45be32e762876bc356882d8cce272c36db44316a5b197a22371dca65cd
6
+ metadata.gz: 4f85333ead1097df6ae3c8d5cc2782be2d7d15c3f81e9a7ae53ac98e62614678010f728394674d868a2983135ff72565d7f84f784501b1c423cfccb07428fc29
7
+ data.tar.gz: 5c0c96605b6b8cdf226e5657ba35b951a169da6ce21e3fdb309402323d3ed7be068ebd4f285aefa24efceb15d13267f3d092dcce0fcf616d3834d2b02debfa1e
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Google Cloud Memorystore for Memcached V1 API
2
2
 
3
- API Client library for the Google Cloud Memorystore for Memcached V1 API
3
+ Google Cloud Memorystore for Memcached API is used for creating and managing Memcached instances in GCP.
4
4
 
5
5
  Google Cloud Memorystore for Memcached API is used for creating and managing Memcached instances in GCP.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Memcache
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/memcache/v1/rest"
28
+ # client = ::Google::Cloud::Memcache::V1::CloudMemcache::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "Memcache"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # @private
75
+ # Configuration class for the google.cloud.memcache.v1 package.
76
+ #
77
+ # This class contains common configuration for all services
78
+ # of the google.cloud.memcache.v1 package.
79
+ #
80
+ # This configuration is for internal use of the client library classes,
81
+ # and it is not intended that the end-users will read or change it.
82
+ #
83
+ class Configuration
84
+ extend ::Gapic::Config
85
+
86
+ # @private
87
+ # Overrides for http bindings for the RPC of the mixins for this package.
88
+ # Services in this package should use these when creating clients for the mixin services.
89
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
90
+ config_attr :bindings_override, {}, ::Hash, nil
91
+
92
+ # @private
93
+ def initialize parent_config = nil
94
+ @parent_config = parent_config unless parent_config.nil?
95
+
96
+ yield self if block_given?
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -259,13 +259,11 @@ module Google
259
259
  # # Call the list_instances method.
260
260
  # result = client.list_instances request
261
261
  #
262
- # # The returned object is of type Gapic::PagedEnumerable. You can
263
- # # iterate over all elements by calling #each, and the enumerable
264
- # # will lazily make API calls to fetch subsequent pages. Other
265
- # # methods are also available for managing paging directly.
266
- # result.each do |response|
262
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
263
+ # # over elements, and API calls will be issued to fetch pages as needed.
264
+ # result.each do |item|
267
265
  # # Each element is of type ::Google::Cloud::Memcache::V1::Instance.
268
- # p response
266
+ # p item
269
267
  # end
270
268
  #
271
269
  def list_instances request, options = nil
@@ -453,14 +451,14 @@ module Google
453
451
  # # Call the create_instance method.
454
452
  # result = client.create_instance request
455
453
  #
456
- # # The returned object is of type Gapic::Operation. You can use this
457
- # # object to check the status of an operation, cancel it, or wait
458
- # # for results. Here is how to block until completion:
454
+ # # The returned object is of type Gapic::Operation. You can use it to
455
+ # # check the status of an operation, cancel it, or wait for results.
456
+ # # Here is how to wait for a response.
459
457
  # result.wait_until_done! timeout: 60
460
458
  # if result.response?
461
459
  # p result.response
462
460
  # else
463
- # puts "Error!"
461
+ # puts "No response received."
464
462
  # end
465
463
  #
466
464
  def create_instance request, options = nil
@@ -551,14 +549,14 @@ module Google
551
549
  # # Call the update_instance method.
552
550
  # result = client.update_instance request
553
551
  #
554
- # # The returned object is of type Gapic::Operation. You can use this
555
- # # object to check the status of an operation, cancel it, or wait
556
- # # for results. Here is how to block until completion:
552
+ # # The returned object is of type Gapic::Operation. You can use it to
553
+ # # check the status of an operation, cancel it, or wait for results.
554
+ # # Here is how to wait for a response.
557
555
  # result.wait_until_done! timeout: 60
558
556
  # if result.response?
559
557
  # p result.response
560
558
  # else
561
- # puts "Error!"
559
+ # puts "No response received."
562
560
  # end
563
561
  #
564
562
  def update_instance request, options = nil
@@ -652,14 +650,14 @@ module Google
652
650
  # # Call the update_parameters method.
653
651
  # result = client.update_parameters request
654
652
  #
655
- # # The returned object is of type Gapic::Operation. You can use this
656
- # # object to check the status of an operation, cancel it, or wait
657
- # # for results. Here is how to block until completion:
653
+ # # The returned object is of type Gapic::Operation. You can use it to
654
+ # # check the status of an operation, cancel it, or wait for results.
655
+ # # Here is how to wait for a response.
658
656
  # result.wait_until_done! timeout: 60
659
657
  # if result.response?
660
658
  # p result.response
661
659
  # else
662
- # puts "Error!"
660
+ # puts "No response received."
663
661
  # end
664
662
  #
665
663
  def update_parameters request, options = nil
@@ -747,14 +745,14 @@ module Google
747
745
  # # Call the delete_instance method.
748
746
  # result = client.delete_instance request
749
747
  #
750
- # # The returned object is of type Gapic::Operation. You can use this
751
- # # object to check the status of an operation, cancel it, or wait
752
- # # for results. Here is how to block until completion:
748
+ # # The returned object is of type Gapic::Operation. You can use it to
749
+ # # check the status of an operation, cancel it, or wait for results.
750
+ # # Here is how to wait for a response.
753
751
  # result.wait_until_done! timeout: 60
754
752
  # if result.response?
755
753
  # p result.response
756
754
  # else
757
- # puts "Error!"
755
+ # puts "No response received."
758
756
  # end
759
757
  #
760
758
  def delete_instance request, options = nil
@@ -848,14 +846,14 @@ module Google
848
846
  # # Call the apply_parameters method.
849
847
  # result = client.apply_parameters request
850
848
  #
851
- # # The returned object is of type Gapic::Operation. You can use this
852
- # # object to check the status of an operation, cancel it, or wait
853
- # # for results. Here is how to block until completion:
849
+ # # The returned object is of type Gapic::Operation. You can use it to
850
+ # # check the status of an operation, cancel it, or wait for results.
851
+ # # Here is how to wait for a response.
854
852
  # result.wait_until_done! timeout: 60
855
853
  # if result.response?
856
854
  # p result.response
857
855
  # else
858
- # puts "Error!"
856
+ # puts "No response received."
859
857
  # end
860
858
  #
861
859
  def apply_parameters request, options = nil
@@ -949,14 +947,14 @@ module Google
949
947
  # # Call the reschedule_maintenance method.
950
948
  # result = client.reschedule_maintenance request
951
949
  #
952
- # # The returned object is of type Gapic::Operation. You can use this
953
- # # object to check the status of an operation, cancel it, or wait
954
- # # for results. Here is how to block until completion:
950
+ # # The returned object is of type Gapic::Operation. You can use it to
951
+ # # check the status of an operation, cancel it, or wait for results.
952
+ # # Here is how to wait for a response.
955
953
  # result.wait_until_done! timeout: 60
956
954
  # if result.response?
957
955
  # p result.response
958
956
  # else
959
- # puts "Error!"
957
+ # puts "No response received."
960
958
  # end
961
959
  #
962
960
  def reschedule_maintenance request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil